Posts

Showing posts from September, 2014

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

i have following code almost works properly; private void cbstatus_drawitem(object sender, listboxdrawitemeventargs e) { string item = e.item string; if (item != null) { switch (item) { case "1": e.appearance.forecolor = color.green; e.appearance.backcolor = color.green; break; case "2": e.appearance.forecolor = color.orange; e.appearance.backcolor = color.orange; break; case "3": e.appearance.forecolor = color.red; e.appearance.backcolor = color.red; break; } } } when dropdown shown, items forecolor correct, backcolor remains whatever backcolor of theme is; i.e. if i've got set dark theme, backcolor dark, cells in gridview, rather being green/orange/red. i've tried setting e.appearance.options.usebackcolor trying set e....

bytecode - Where can I find the opcode numbers for the LLVM bitcode? -

where can find llvm bytecode representation of llvm ir language? like <result> = add <ty> <op1>, <op2> , in binary form this incept llvm instead of jvm. more want opcode numbers can study bitcode on binary level. i think canonical source llvm bit codes file : llvm-src/include/llvm/bitcode/llvmbitcodes.h from llvm source can found here: http://llvm.org/releases/ you may want @ code in llvm-src/lib/bitcode/reader, reads bitcode.

c++ - Declaring multiple instances of a TFT screen class? -

undoubtedly due lack of encyclopedic knowledge of c/c++, have found myself in quagmire while trying initialize multiple instances of tft screen class. tft screen adafruit_ssd1331, , have 1 small sketch control more 1 of these identical code. these errors i'm getting: slapbmp.ino:61:5: error: 'tft' in 'class adafruit_ssd1331' not name type slapbmp.ino:62:5: error: 'tft' in 'class adafruit_ssd1331' not name type slapbmp.ino:63:3: error: missing type-name in typedef-declaration ...when try to compile code: #include <adafruit_gfx.h> #include <adafruit_ssd1331.h> #include <sd.h> #include <spi.h> // if using hardware spi interface, these pins (for future ref) #define sclk 13 #define mosi 11 #define rst 9 #define cs 10 #define dc 8 #define cs2 5 #define dc2 4 // color definitions #define black 0x0000 #define blue 0x001f #define red 0xf800 #define green 0x07e0 #defin...

matlab - How to rearrange each image patch into number of column vector -

this question has answer here: efficient implementation of `im2col` , `col2im` 2 answers i working on project have used image size (512x512)then have divided whole image 8 there 64x64 block have rearrange each 8x8 image patch single column new size 64x4069. unable understand how it.please help. here code enter code here a=imread('lena.png'); b=double(a); [r,c]=size(b); bl=8; br=r/bl; bc=r/bl; it arrange in such order first column image patch of (1:8,1:8)next column be(9:16,9:16)likewise. if reshape allowed, permute allowed. assuming both original , block sub-matrix square matrices here 1 approach out = permute(reshape(a,blsz,size(a,1)/blsz,blsz,[]),[1 3 2 4]); out = reshape(out,size(out,1)*size(out,1),[]); sample inputs: a = randi(50,8); %// change original `512x512` matrix blsz = 2; %// change 8 problem results: ...

How to display multiple KML files on one map -

i'm trying display multiple historic shape boundaries on google map via google's api using js. have 1 kml file displayed correctly currently, i'd have op 100 of these displayed @ once, , have ability highlight particular one. here's how i'm loading 1 kml file now: function loadkmllayer(src, map) { var kmllayer = new google.maps.kmllayer(src, { preserveviewport: false, map: map }); is there way display hundreds of these @ once? there limit how many can disaply? in advance you can display 1 in each kmllayer, can't control them other hide/show them. there limitation, @ point internal url request (which includes of individual kmllayer urls) exceeds limit, , none of them display. described in documentation : there limit on number of kml layers can displayed on single google map. if exceed limit, none of layers display. limit based on total length of urls passed kmllayer class, , consequently vary application; on average, should ...

Windows Store: textbox inside flipview, cannot dismiss SIP keyboard when lost focus -

i using full-screen flipview allow background rotate behind set of inputs. if tap input textbox, sip keyboard appears. however, tapping outside of textbox not dismiss keyboard expected. realized because of flipview. verified adding 250 margin around flipview. if tap in area covered control still doesn't dismiss, if tap areas covered margins (that is, outside flipview) sip dismiss expected. i tried setting istabstop false , istapenabled false flipview, sip still remains active unless tap outside flipview. since need flipview full screen, need know if there way disable control closes keyboard. can done? property or event on flipview can leverage make happen? aha, handling "tapped" event did old trick of disabling , enabling flipview , sure enough keyboard dismissed!

Android custom UI code fails to draw when SDK is changed -

i'm using code http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ basis custom ui code. original code's androidmanifest.xml contains code follows: <application> ... </application> <uses-sdk android:minsdkversion="3" /> i modified to: <uses-sdk android:minsdkversion="18" android:targetsdkversion="19" /> <application> ... </application> and hand fails draw. background canvas draws fine, handscrew (although color seems incorrect). what's issue? need update sdk since i'll using apis available in newer sdks. also notice moved <uses-sdk> stuff above <application> otherwise warning occurs. if leave <uses-sdk> stuff below <application> sdk version 'seems' work , hand draws properly. 'seems' in quotes since it's not working right. if <uses-sdk> stuff put above <application> , minsdkversion="...

Delete string from linked list - C -

this question has answer here: delete element of linked list criterion 1 answer so problem i'm running deleting user-inputted string linked list full of strings. i'm still having few issues in understanding just precisely how linked lists work, explanation doing wrong appreciated! also, every other function seems working fine, having issues deleteitem function! edit - problem i'm getting when run deleteitem function terminal window crashing after getting hung bit. here's code: #include<stdio.h> #include<stdlib.h> #include<string.h> struct node { char name[50]; struct node *next; }*head; void display(); void insert(); void count(); void deleteitem(); int main(){ int choice = 1; char name[50]; struct node *first; head = null; while(1){ printf("menu options\n"); printf("------------...

javascript - get angular ui router $location.search() to use Basic URL Parameters -

i have ui-router set follows .state('root.event', { url : '/event/:id', templateurl : 'templates/event.html' }) (the controller initiated in template) which gives nice looking basic url parameters like: www.mysite.com/event/1234 when user navigates directly www.mysite.com/event path (ie param missing) template controller looks recent id parameter either: - js variable stored in value - localstorage / cookie etc i return state using $location.search('id', 1234) ...however, results in urls have query url parameters like: www.mysite.com/event/?id=1234 is there technique ensure $stateparams updates present url in basic format on update ? ...or possible url parameter & update $state before state change ? (i looked @ resolve seems passing parameters controllers) i've had here , here , here - of questions relate how avoid reload on update of $state params $location.search that. adds query url para...

reactjs - How to pass arguments to functions in React js? -

i want display person's email in alert window. but, not know how pass email arguments displayalert method. also, wont let me use either. so, have assign displayalert methos variable , use in onclick. not know why wont let me call directly. class people extends react.component{ render (){ var handleclick = this.displayalert; var items = this.props.items.map(function(item) { return( <ul key = {item.id}> <li> <button onclick= {handleclick}>{item.lastname + ', ' + item.firstname}</button> </li> </ul> ) }); return (<div>{items}</div>); } displayalert (){ alert('hi'); } } class personlist extends react.component{ render () { return ( <div> <people items={this.props.people}/> /* people array of people*/ </div> ...

jQuery Validate not triggering -

i have following html , js, not triggering jquery.validate validation on text input field blur or form submit. if add "required" attribute directly text input field, default error message kicks in instead. can please me figure out why below not work? <!doctype html> <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.validate.min.js"></script> <script type="text/javascript" src="jquery.validate.unobtrusive.min.js"></script> </head> <body> <form id="test" action="test.html" method="post"> <input type="text" name="txtname" /> <input type="submit" name="btnsubmit" /> </form> </body> </html> <script type="text/javascript"> $(document).re...

Fisher exact test does not give expected results in R -

i want test if counts of greater counts of b. i'm trying use fisher exact test gives me different results depending on how arrange data. dont know if problem comes particular dataset (too many zeros) or if comes way arranged. first, tried constructing contingency table (m) explained in internet. factor counts b 0 205 226 1 33 29 2 15 18 3 13 8 4 4 2 5 5 1 6 3 0 7 2 0 9 1 0 12 2 0 23 1 0 fisher.test(m, workspace = 200000, hybrid = false, control = list(), or = 1, alternative = "two.sided", conf.int = true, conf.level = 0.95, simulate.p.value = t, b = 2000) #results: data: m pvalue = 0.1184 alternative hypothesis: two.sided this gives me insignificant differences, totally unexpected when looking @ data , table. dataset big , complicated post here or s...

java - Cannot access to local webpage in Spring MVC -

i started learn ' introduction spring mvc ' course pluralsight. when trying access http://localhost:8080/fitnesstracker/greeting.html http status 404 . have access localhost:8080/fitnesstracker shows index.jsp . in tutorials works fine i'm confused because did same way. web.xml <?xml version="1.0" encoding="utf-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <servlet> <servlet-name>fittrackerservlet</servlet-name> <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> <init-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/config/servlet-config.xml</param-value> </init-...

platform - Standard OS naming scheme -

i releasing multi-platform application. potentially released on windows, osx, , linux distributions. users expect install wherever like, not package rpm. simple archive file. i plan put platform name in name of downloadable file, like: myapp-0.6.3-osname.tgz while use osname, follow whatever standard there is. is there standard? i've no idea if there standard. here's java's current naming convention jdk se 8u45 , , seems pretty me: product / file description file size download ------------------------------------------------------------------------------------ linux x86 146.89 mb jdk-8u45-linux-i586.rpm linux x86 166.88 mb jdk-8u45-linux-i586.tar.gz linux x64 145.19 mb jdk-8u45-linux-x64.rpm linux x64 165.24 mb jdk-8u45-linux-x64.tar.gz mac os x x64 221.98 m...

osx - CoreMIDI: midiReadProc only receives the first packet of 3 packets with the same timestamp -

Image
i working on small program monitor midi output ni maschine 2. (idea add program change messages parts in ni machine , use them trigger vj-efects , other stuff) the following test case gives problem. test part in ni machine has 1 note , 2 program change messages on first beat , second note 16th later. when hit start , capture output midi monitor tool see: this correct. maschine sending. - notice 2 control changes , next note on packets have same timestamp. when same simple virtual client (see code below) this: as can see second control change , note on packets missing! notice second third line (song position , continue) have same timestamp , in both cases received. if took trouble read until point understand problem. know big difference between simpel virtual client , midi monitor program use of coremidi service plugin 'spying' midi output. limitation of coremidi or missing something? below code virtual client: stripped down basic needs receive ni mashine. ...

javascript - Cross Domain Request with TypeScript and Angular $http Service -

i new typescript , trying set cross domain requests $http service. in past javascript able this: $httpprovider.defaults.usexdomain = true; $httpprovider.defaults.withcredentials = true; when @ irequestconfig options of definitivelytyped class required use angularjs see there withcredentials property not usexdomain property. is there way this? i don't believe possible this, may seem bad news. have news. don't need this, because setting usexdomain true has no effect. in fact, usexdomain not thing in angular . here great tutorial on cors more info.

ruby on rails - Devise won't send email when unicorn worker_processes is 1 -

here's start of unicorn.rb worker_processes 1 timeout integer 25 preload_app true ... with settings, when try password reset devise, in log (lightly edited security): started post "/password" 127.0.0.1 @ 2015-06-02 13:21:56 -0700 processing devise::passwordscontroller#create parameters: {"utf8"=>"✓", "authenticity_token"=>"(removed)", "user"=>{"email"=>"(removed)@(removed).com"}, "button"=>""} rendered users/mailer/reset_password_instructions.html.slim within layouts/email (5.2ms) devise::mailer#reset_password_instructions: processed outbound mail in 143.8ms unicorn fork complete. env['ar_db_pool_size']=, env['sidekiq_concurrency']=, rails configured 5. note last line. unicorn timed out , had restarted! (why?) other processes send email work fine. devise seems affected. after many hours of debugging determined if change unicorn us...

javascript - Bootstrap Carousel is not changing pictures or sliding -

my bootstrap carousel not changing pictures. it's not sliding automatically or allowing me choose picture. it's showing active picture @ given time. <!--html code--> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>bootsrtap </title> <meta name="description" content="hello world"> <!-- latest compiled , minified css --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> <!--my links--> <link href="css/boostrap.mincss" rel= "stylesheet"> <link href="css/styles.css" rel = "sylesheet"> <style > .grey{ ...

json - Need to extract the timestamp from a logstash elasticsearch cluster -

i'm trying determine freshness of recent record in logstash cluster, i'm having bit of trouble digesting elasticsearch dsl. right doing extract timestamp: curl -sx ' http://localhost:9200/logstash-2015.06.02/ ' -d'{"query": {"match_all": {} } }' | json_pp | grep timestamp which gets me; "@timestamp" : "2015-06-02t00:00:28.371+00:00", i'd use elasticsearch query directly no grep hackiness. the raw json (snipped length) looks this: { "took" : 115, "timed_out" : false, "hits" : { "hits" : [ { "_index" : "logstash-2015.06.02", "_source" : { "type" : "syslog", "@timestamp" : "2015-06-02t00:00:28.371+00:00", "tags" : [ "sys", "inf" ...

vba - Reading and writing MS Project TimeScaleData for Resources, and Assignments -

i pulling projected cost excel reports , external db. part of monthly projections update project overheads. need accurately pull monthly cost write monthly cost overheads tasks. i having trouble understanding why read , write assignment instead of directly cost resource? read month cost resource (simplified): dim tsvs timescalevalues dim res resource until budgetdate > activeproject.projectfinish each res in activeproject.resources set tsvs = res.timescaledata(startdate:=budgetdate, enddate:=budgetdate, type:=pjresourcetimescaledcost, timescaleunit:=pjtimescalemonths, count:=1) mymonthcost = val(tsvs(1).value) next res budgetdate = dateadd("m", budgetdate, 1) loop there 1 timescalevalue in tsvs (the single month) believe i'm fine referencing tsvs(1).value instead of having increment through collection. read month cost assignments: do until budgetdate > laborfinishdate each res in activeproject.resources set as...

checkbox - Android: Compound Drawables With Intrinsic Bounds on 4.2.2 and below -

Image
i try use checkbox left compound drawable this: holder.selcategorycheckbox.setcompounddrawableswithintrinsicbounds(imageresource, 0, 0, 0); xml: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="50dp" android:orientation="horizontal"> <checkbox android:id="@+id/category_sel_checkbox" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:layout_toleftof="@+id/categoryselectionoptions" android:layout_tostartof="@+id/categoryselectionoptions" android:drawablepadding="@dimen/more_than_big_padding" android:paddingleft="@dimen/big_padding" android:paddingtop="@dimen/big_padding" android:paddingbottom="...

powershell - Pipe to Out-GridView and Out-File got different rows? -

the following command returns 1 row (the parameter -context 10 ignored.) select-string -path file.txt -pattern "..." -context 10 | out-gridview however, following command create file lines. select-string -path file.txt -pattern "..." -context 10 | out-file file2 why there difference? this because out-gridview consumes entire matchinfo object select-string outputs, , displays of properties of object columns. out-file on other hand performs tostring() method on before outputs file, , kind of object when converts string outputs line, , context lines well. if want out-gridview have pipe out-string , out-gridview .

git - How to change one remote branch into an exact copy of another remote branch? -

i have 2 branches in remote. release , master. both branches have similar code. want code in release match master branch. means additional changes in release , not in master should destroyed , changes in master , not in release should placed release. if literally mean want discard current release branch , recreate mirrors current master branch, command sequence use (in clean clone of repo) is > git checkout -t origin/release > git reset --hard master > git push origin --force release:release but there's no way this

ios - Spacing between UITableview header and top cell -

Image
i'm getting odd behavior uitableview. there's spacing between uitableview header , first cell. idea why is? #define kdefaulttableviewsectionheight 50 - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { return self.posts.count; } - (nsinteger)numberofsectionsintableview:(uitableview *)tableview { return 1; } - (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { return kdefaulttableviewcellheight; } - (cgfloat)tableview:(uitableview *)tableview heightforheaderinsection:(nsinteger)section { return kdefaulttableviewsectionheight; } - (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section { uiview *view = [[uiview alloc] initwithframe:cgrectmake(0, 0, self.view.frame.size.width, kdefaulttableviewsectionheight)]; uibutton *hot = [[uibutton alloc] initwithframe:cgrectmake(self.view.frame.size.width/2, 0, 100, kdefaulttableviewsectionhe...

forms - auto relate a foreign Key Field to a pk object django -

i have 2 models: class post(models.model): title = models.charfield(max_length=200) class addimg(models.model): post = models.foreignkey('post') image = models.imagefield(upload_to='%y/%m/%d') now have view addimg model append images post: def addimg(request): if request.method == "post": form = addimgform(request.post, request.files) if form.is_valid(): addimg = form.save(commit=false) addimg.image = request.files['image'] addimg.save() return redirect('blog.views.list') else: form = addimgform() return render(request, 'blog/edit.html', {'form': form}) working far of course image field in form choice field select post want image related to. want: ve detail view of every post in there button "add image" wonder if possible request pk of current post , auto relate addimg model pk without field in form. suggestion...

php - View content inside phar created archives -

i have .tar.gz, .tar.bzip2 , .tar files, , display contents. since created them phar, make sense try , view them trough phar, tried few things. first tried php examples $p = new phar($myarchive[0], 0); // phar extends spl's directoryiterator class foreach (new recursiveiteratoriterator($p) $file) { // $file pharfileinfo class, , inherits splfileinfo echo $file->getfilename() . "\n"; echo file_get_contents($file->getpathname()) . "\n"; // display contents; } it didn't work. $fh = new recursiveiteratoriterator(newrecursivedirectoryiterator('phar://'.$myarchive[0]), recursiveiteratoriterator::child_first); foreach ($fh $splfileinfo){ echo file_get_contents($splfileinfo->getpathname()); } did not work. i tried $p = new phardata($myarchive[0]); foreach($p $file) { echo "$file"; } which strangely seems produce results output tar file strange: phar://c:/zend/apache2/htdocs/application/archives/shaddox/...

ruby - How to install code of gem and all its dependencies into one folder -

is there way place code specific gem , dependencies 1 folder? to install gem , dependencies specific folder one-off operation, can use --install-dir option gem install : gem install unicorn --install-dir my_folder that install unicorn, along dependencies kgio, rack, , raindrops, under my_folder.

javascript - How to maintain the jquery inputmask when the DOM is updated? -

hard describe. here snippet. (function() { var phonenumber = function() { this.name = ko.observable(); this.phone = ko.observable(); }; $('[data-mask="phone"]').inputmask({ mask: '(999)999-9999' }); var vm = { newnumber: ko.observable(new phonenumber()), numbers: ko.observablearray([]), }; console.log('vm', vm.numbers()); vm.numbersjson = ko.computed(function() { return ko.tojson(vm.numbers); }); vm.newnumberjson = ko.computed(function() { return ko.tojson(vm.newnumber); }); ko.applybindings(vm); //events function addnewnumber() { vm.numbers.push(vm.newnumber()); vm.newnumber(new phonenumber()); } function removenumber() { var item = ko.datafor(this); var remval = _.reject(vm.numbers(), function(el) { return el.name === item.name; }); vm.numbers(remval); }; $(document).on('click', '#...

sql - Create autoserial column in informix -

is possible create autoserial index in order 1,2,3,4... in informix , syntax. have query , of timestamps identical unable query using timestamp variable. thanks! that serial data type .

c - bash: /usr/bin/hydra_pmi_proxy: No such file or directory -

i struggling set mpi cluster, following setting mpich2 cluster in ubuntu tutorial. have running , machine file this: pythagoras:2 # spawn 2 processes on pythagoras geomcomp # spawn 1 process on geomcomp the tutorial states: and run (the parameter next -n specifies number of processes spawn , distribute among nodes): mpiu@ub0:~$ mpiexec -n 8 -f machinefile ./mpi_hello with -n 1 , -n 2 runs fine, -n 3, fails, can see below: gsamaras@pythagoras:/mirror$ mpiexec -n 1 -f machinefile ./mpi_hello hello processor 0 of 1 gsamaras@pythagoras:/mirror$ mpiexec -n 2 -f machinefile ./mpi_hello hello processor 0 of 2 hello processor 1 of 2 gsamaras@pythagoras:/mirror$ mpiexec -n 3 -f machinefile ./mpi_hello bash: /usr/bin/hydra_pmi_proxy: no such file or directory {hungs up} maybe parameter next -n specifies number of machines? mean number of processes stated in machinefile, isn't it? also, have used 2 machines mpi cluster (hope case , output getting not m...

javascript - CSS Additional Pseudo Elements to One Class (before, after, +more) -

i'm trying achieve below result using "labels" class (eg. don't want "arrow" class/html). possible pseudo elements only? ".labels:tesing{}" etc. .labels{ position: relative; display: inline-block; vertical-align: top; font-size: 16px; font-weight: bold; font-family: tahoma; padding: 5px; color: #fff; border-radius: 5px; background-color: red; } .labels:before{ display: inline-block; vertical-align: top; font-size: 12px; content: '$'; } .labels:after{ display: inline-block; vertical-align: top; margin-left: 1px; font-size: 12px; content: 'usd'; } .arrow{ position: absolute; bottom: -10px; left: 20px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid blue; } html: <div class="labels">199 <div class="arrow"></...

osx - Hadoop: start-dfs/start-yarn.sh: No such file or directory -

it giving me 2 above errors despite me checking both files exist in directory , hadoop has access folders. i installed hadoop using following tutorial: link whats going wrong , how can fixed? you might not have exported path of directory. try giving /entirepath/start-dfs.sh . also in .bash_rc file add hadoop_home=/pathtohadoopinstallationfolder. give command source .bash_rc source bash_rc file.

performance - Employing Version control on Android code -

my work store files android device cloud storage. however, each file stored in cloud want employ version control independent of cloud's version control mechanism. there version control library or other mechanism available can used in android code ? can guess limited capacity android device enabling version control mechanism may slow application in case suggestion regarding way maintain file before sending them cloud appreciated.

Fatal error: Call to a member function bind_param() on a non-object in webserver -

<php> $ueberpruefeaufsvnreintrag = $conn->prepare('select p_svnr p_patient p_svnr = ? '); $ueberpruefeaufsvnreintrag -> bind_param('s', $svnr); $ueberpruefeaufsvnreintrag -> execute(); $resul = $ueberpruefeaufsvnreintrag -> get_result(); $rowav = $resul -> fetch_assoc(); $ueberpruefeaufsvnreintrag -> close(); </php> i error in my webspace in localhost works fine. idea why? assuming using php , mysqli (you should really add tags). apparently $conn->prepare didn't return object. returned false in case of error. reason preparing failed may have several causes. 1 possibility: there syntax error in query. doesn't seem case, there kind of error, instance if p_patient doesn't exist. other causes didn't select right database or didn't make connection @ all. so, although can't tell exact error, can tell you should check result value of functions, ch...

javascript - How not to submit form, then submit it? -

i have form email input, 1 button overlapse it, when click on button, button sliding across input can input email. when click on button must submit form. how make that? <form action="http://databox.createsend.com/t/d/s/itkkyu/" method="post" class="subscribe-form" accept-charset="utf-8"> <input id="fieldemail" name="cm-itkkyu-itkkyu" class="input" type="email" placeholder="your company email"> <button class="get-notified" type="submit">get notified</button> </form> js: (function () { var count = 0; $('.subscribe-form button').click(function () { $('.subscribe-form').submit(function(e) { e.preventdefault(); count += 1; }); if (count == 1) { console.log('oj'); $('.subscribe-form').submit(function() { }); } ...

spring - How to define TcpOutboundGateway bean in java-class configuraiton -

when i've tried define tcpoutboundgateway bean, found class doesn't have "requestchannel" , "replychannelname" setters. how can correctly define bean in java-class configuration? which java-class configuration equal xml-configuration presented below? <int-ip:tcp-outbound-gateway id="outgateway" request-channel="input" reply-channel="clientbytes2stringchannel" connection-factory="client" request-timeout="10000" reply-timeout="10000"/> this code equal client xml configuration presented link . public static final string string_to_bytes_channel = "stringtobyteschannel"; public static final string request_channel = "requestchannel"; private string host = "localhost"; private int port = 2020; @bean public tcpnetclientconnectionfactory connectionfactory() { tcpnetclientconnectionfactory factory = new tcpnet...

cdn - What is the best way to delete an image in Cloudinary Using PHP? -

i'm new cloudinary , programming in general. i'm integrating cloudinary image cdn app creating , know difference in using " \cloudinary\uploader::destroy('zombie'); " vs " $api->delete_resources('zombie'); ". is speed advantage using 1 on other or use scenario them? your responses appreciated. the destroy method supports single-file deletion , isn't rate limited. delete_resources admin api method supports bulk deletions rate limited.

function - Where exactly is this object being stored? (Swift) -

consider following code: class foo { } func foo() -> (void -> foo) { var foo = foo() return { foo } } var foogen = foo() now whenever call foogen , stored foo instance. foo being stored? inside stack? , if so, it's lifetime? both classes , closures reference types . var foo = foo() creates foo object on heap, , stores (strong) reference object in local stack variable foo . return { foo } creates closure captures foo , closure holds (strong) reference object. on return function, local foo variable goes out of scope, 1 reference closure remains. var foogen = foo() makes foogen reference returned closure (which in turn has reference foo object): foogen -> closure -> foo object so foo object exists long foogen reference exists (assuming no additional strong references created). demo: class foo { deinit { println("deinit") } } func foo() -> (void -> foo) { var foo = foo() return ...

java - Where did the Log4j Log Output Go? -

i running java class directly has main(), eclipse. no web servers running. main() of class run. in main() have statement, import org.apache.log4j.logger; //... private static final logger logger = logger.getlogger(myclass.class); public static void main(string[] args){ try { //... } catch (exception e) { logger.error(e); } nothing shown in eclipse console when error encountered. error log written, somewhere else. written to? it depends on logging configuration, check log4j.properties or log4j.xml (which ever in case).

How get something from Parse.com database? -

how show parse.com data base ? give me code please. sturted learning js. example how show users. or how show information 1 user. please ) hi suggest start learning parse ans js proper documentation provided. documentations if looking simple example using parse , js, take @ below code, myobject.fetch({ success: function(myobject) { // object refreshed successfully. }, error: function(myobject, error) { // object not refreshed successfully. // error parse.error error code , message. } }); or can refer below example also, can make use of handlebar.js display each blog object. $(function() { parse.$ = jquery; // replace line 1 on quickstart guide page parse.initialize("keys", "keys"); // parse application key var blog = parse.object.extend("blog"); var blogs = parse.collection.extend({ model: blog }); var blogs = new blogs(); blogs.fetch...

javascript - How to use page object variable on protractor .each() function? -

i wondering how use page object variable on .each() function. the scenario every click delete link, sweet alert confirmation shown, , must confirm dialog delete data. here page object: 'use strict'; // page object name var data = function() { // delete links this.delete_links = element.all(by.css('div[ng-click="delete(data.id)"]')); // confirm button this.btn_confirm = element(by.css('.confirm')); // delete function this.delete = function() { // delete links confirmation this.delete_links.each(function(element, index) { // click delete link element.click().then(function() { browser.sleep(1000); }); // click yes this.btn_confirm.click().then(function() { browser.sleep(1000); }); }); }; }; module.exports = data; this inside "each"...

Failed to run new ios xcode project -

i have yosemite 10.10.3 installed xcode 6 downloaded mac app store. when try execute 1 single view application project, newly created, without modify anything, following error: clang: error: linker command failed exit code 1 (use -v see invocation) have install anything? idea of what's happening? (xcode newbie) that mean few things, did make sure make first view "initial view controller"? is there other error message or there somewhere in code caused error?

Parameterising node relationships using Chef -

i have group of servers perform specific roles dependencies between them i.e. web server -> application server -> database server i have chef cookbooks can build nodes roles. generating each node's hosts file using chef , using hosted chef server . far good. can't quite grips how flexibly represent relationships between nodes different roles. by flexibly mean in development may have 1 node fulfils 3 roles, whereas in staging , production environments they'd separated out @ least 1 node per role. it's not clear me how parameterise generation of hosts files accommodate requirement. how other people tackling issue? thanks in advance. do have chef-server setup/hosted chef? chef runs tool called ohai on each converge collects information node (e.g. ip addresses, interfaces, storage, package data) , writes node object. when converge finished, chef-client upload node object data chef-server stored , available search other nodes/clients: manua...

logic - Are infinite loops truly infinite? -

i have pretty understanding of loops in general, , have accidentally created infinite loops several times while programming in various languages. however, infinite loop infinite? if given unlimited resources , time, infinite loop run eternity? i'm not sure if on topic or not, figured due being programming logic. if not, comment , i'll remove question (i want keep little rep have). an infinite loop run until interrupted externally. if allocated inside loop, however, application may run out of memory, or, recursive call, "stack overflow" stops application.

android - Getting a null pointer exception in logcat when using radiobutton.getText() -

in android app using 2 radiobuttons. one of them selected , value stored in database rdbbut.gettext() throwing null pointer exception in onclick method here: checklogin(email, password, rdbbut.gettext().tostring()) my code: @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_login); inputemail = (edittext) findviewbyid(r.id.email); inputpassword = (edittext) findviewbyid(r.id.password); rggrp = (radiogroup) findviewbyid(r.id.radiogroup); rb1 = (radiobutton) findviewbyid(r.id.radiobutton1); rb2 = (radiobutton) findviewbyid(r.id.radiobutton2); btnlogin = (button) findviewbyid(r.id.btnlogin); btnlinktoregister = (button) findviewbyid(r.id.btnlinktoregisterscreen); final int selectedid = rggrp.getcheckedradiobuttonid(); // progress dialog pdialog = new progressdialog(this); pdialog.setcancelable(false); // session manager session = new ses...