Posts

git - Heroku fails to build and push Clojure Project -

i'm getting following errors when i'm trying git push heroku master remote: retrieving ring/ring-jetty-adapter/1.4.0/ring-jetty-adapter-1.4.0.jar clojars remote: not transfer artifact clj-http:clj-http:pom:2.1.0 from/to clojars (https://clojars.org/repo/): error occurred while retrieving remote repository repository[clojars|https://clojars.org/repo/]: not in gzip format remote: not transfer artifact clj-json:clj-json:pom:0.5.3 from/to clojars (https://clojars.org/repo/): error occurred while retrieving remote repository repository[clojars|https://clojars.org/repo/]: not in gzip format remote: not transfer artifact clojure-csv:clojure-csv:pom:2.0.2 from/to clojars (https://clojars.org/repo/): error occurred while retrieving remote repository repository[clojars|https://clojars.org/repo/]: not in gzip format remote: not transfer artifact enlive:enlive:pom:1.1.6 from/to clojars (https://clojars.org/repo/): error occurred while retrieving remote repository repository[clojars|...

Using a Position Function in a Case Function - PostgreSQL -

i'm new sql , postgres , isn't hard figure out of you. i'm trying use position function within case statement, keep getting error "error: syntax error @ or near ""project"". line 2: case when position('(' in "project") >0 then". i've used position function before , worked fine, i'm confused problem here. i've tried table name, such "xyztable.project" , "project" - both without quotation marks. here entire statement: select "project", case when postion('(' in "project") >0 substring("project",position('(' in "project")+1,position(')' in "project")-2) case when postion('('in "project") null "project" end "2015budget"; as haven't gotten past second line of statement, if sees prevent statement running correctly, please feel free point out. new s...

Is Visual Studio the same thing as Visual C++ -

this 1 of questions utterly obvious except uninitiated. so, @ risk of losing "geek card" i'm afraid must bite bullet , ask: is visual studio same thing visual c++? need install visual studio express, example in conjunction wit visual c++? visual c++ provide things need (particular respect assembly programming) don't come visual studio express? the question might seem basic not require answer. alas, that's precisely why feel need ask it, can't find answers online. results "assume" user knows answer question, can't seem find explicitly states 2 applications provide precisely same functionality or not. thank time. visual studio refers microsoft's integrated development envrioment , includes support c++, c#, basic, , several other languages. visual-c++ refers c++ specific component of visual-studio. one can install visual-studio (express, or other version), , install only c++ component. installing "visual-c++" c...

php - Get ID of an element from a loop -

Image
example: i posted yesterday feel if unclear on looking for. have loop generates placeholder input text boxes. each own id , name loop id="$row['number'] name="$row['number'] . when click button, want perform update. $sendname = $db->prepare("update table set name = ? number = ?"); since number looped, can't $number=$_post['number'] so think made more clear , simple post, solution? thanks. you can inputs in form jquery $('#submit').click(function () { $("#formid input").each(function(){ var input = $(this); // input element var name = input.attr("name"); // name of input var id = input.attr("id"); // id of input }); }); and store names in array , pass php ajax.

android - How can I set invisible area in ListView? -

Image
listview image hi. i'm using listview in android app. want set listview above image. app user can see left , center area only. , want set component in right area, area must not visible. how can this? here current layout xml code : <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:padding="8dp" > <!-- left area start (visible) --> <linearlayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginright="5dp" android:layout_weight="1" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" ...

java - Is it possible to specify a default View for all Jersey resource methods? -

here's situation. i've large codebase using jersey 2.17, jackson 2.6.3, , spring 4.2.0. i have quite few models small subset of properties exposed @jsonproperty. rest excluded default. there many jersey resource methods are not using jsonview annotation. enter me. need write new internal api endpoints expose different subset of internal/confidential model properties. i've annotated these "private" properties @jsonproperty , @jsonview(supersecretandinternal.class) . the original, public, properties i've added @jsonview(publicforeveryone.class) annotation. the problem there many many resource method handlers don't use specify jsonview. result properties (publicforeveryone , supersecretandintenal alike) being exposed. edit. adding example code. // pojo - before @jsonautodetect(gettervisibility = none, isgettervisibility = none, fieldvisibility = none) class person { @jsonproperty string name; @jsonproperty string age...

javascript - Calculate value auto into form field using JS -

Image
i have 6 fields editable in yii2 form widget. want once input integer values editable fields calculate "green leaf net weight" automatically based on given input. coding work perfectly. problem if change input value in fields it'll not update the "green leaf net weight" read field. $(document).ready(function(){ var = $('#a'); var b = $('#b'); var c = $('#c'); var d = $('#d'); var e = $('#e'); e.change(function(e){ var result = ((a.val() - b.val()) * c.val())/100; var result2 = ((a.val() - b.val()) * d.val()) / 100; var final = ((a.val() - b.val()) - result - result2) - e.val(); math.round(final); $('#f').val(final); }) }); my form widget coding (updated code) <?php $form = activeform::begin(); ?> <?= $form->field($model, 'gross_weight',[ 'feedbackicon' => [ 'default' => 'shopping-cart', ...