Posts

Showing posts from July, 2015

javascript - jQuery UI dialog picking title from cache -

javascript - jQuery UI dialog picking title from cache - here code i'm using http://jsbin.com/evike5/edit when jquery ui dialog fired sec time. updated title not shown. am doing wrong? this because you're opening same dialog, take effect either need destroy old dialog, this: $("#hello").dialog('destroy').attr("title", "helloooooooo!") try here. or set title , button behavior without re-creating dialog, ok button: ok: function () { $(this).dialog("close") .dialog("option", { buttons: { ok: function () { $(this).dialog("close"); } }, title: "helloooooooo!" }).dialog("open"); } you can give seek here. javascript jquery jquery-ui jquery-ui-dialog

php - MySQL find only different in 2 table -

php - MySQL find only different in 2 table - i have 2 table in mysql. table1 , table2. in table1 number, email , phone number. in table 2 same, sometime different email or phone number. want list of records number same , email or phone number different. sometime both email , phone number different. tnx. you can join tables, filter accordingly: class="lang-sql prettyprint-override"> select * table1 bring together table2 using (number) table1.email <> table2.email or table1.phonenumber <> table2.phonenumber php mysql

objective c - Parse AST from an ObjC header using libClang -

objective c - Parse AST from an ObjC header using libClang - i'm using libclang lint objective-c codes. stuck in parsing objc header file (.m fine) , can ast standalone ? here's test codes, trying @interfaces , @protocols. void clangtest(void) { cxindex index = clang_createindex(0, 1); const char *args[] = { // should have 1 ? }; int numargs = sizeof(args) / sizeof(*args); cxtranslationunit tu = clang_parsetranslationunit(index, "/path/to/anobjcclass.h", args, numargs, null, 0, cxtranslationunit_none); clang_visitchildrenwithblock(clang_gettranslationunitcursor(tu), ^(cxcursor cursor, cxcursor parent){ // never reach here if (clang_getcursorkind(cursor) == cxcursor_objcinterfacedecl || clang_getcursorkind(cursor) == cxcursor_objcprotocoldecl) { // neither here, hoped } homecoming cxchildvisit_continue; }); } objective-c libclang

hibernate - Unable to see ForeignKey Reference in swagger API model -

hibernate - Unable to see ForeignKey Reference in swagger API model - i have written swagger implementation. in domain definition, have foreignkey reference defined as @jsonignore @manytoone @joincolumn(name = "id",nullable = false) but, in swagger ui , not see column in model . entityname { entity_id (integer, optional), name (string, optional) } hibernate jpa many-to-one swagger-ui

Appending column name in csv with Python -

Appending column name in csv with Python - i have csvs next header row: "participating_states", "number_of_participating_agencies", "population_covered", "agencies_submitting_incident_reports", "total_number_of_incidents_reported." i need find percentages dividing 4th column sec column, i've found python script allows me that, , adds percentage 6th column: import csv import tempfile import shutil input_file = '2000_percentage.csv' open(input_file, 'rb') f, \ tempfile.namedtemporaryfile(delete=false) out_f: reader = csv.reader(f) author = csv.writer(out_f) writer.writerow(next(reader)) row in reader: try: val1 = float(row[3]) val2 = float(row[1]) writer.writerows([row + [val1 / val2 * 100]]) except valueerror: print('there strings in file.') ...

vba - How to make For loop work with non integers -

vba - How to make For loop work with non integers - the next code easy , outputs expected code: option explicit sub test_loop2() dim long = -3 3 step 1 debug.print next end sub output: the next code exiting due rounding option explicit sub test_loop2() dim double = -0.3 0.3 step 0.1 debug.print next end sub output: what reliable method can utilize whilst retaining for loop ensure lastly value run in loop non integers? eg = x y step z - y must reached if it's multiple of z for = 0 0.3 step 0.1 0.3 in loop for = 0 0.3 step 0.2 0.3 not in loop floating point arithmetic screw if utilize double (or single) counter. for counters, stick whole numbers. derive floating point value counter. example: dim long dim d double = 0 6 d = (i - 3) * 0.1 ' or whatever formula needed debug.print d next vba

java - Comparing two fixed doubles with . Is there really an issue? -

java - Comparing two fixed doubles with <, =, >. Is there really an issue? - i'd check if double smaller, equal to, or bigger double . though read lot floats , doubles not beingness exactly comparable because of how computer calculates @ binary level, using simple binary operators works charm far. tested dozens of different numbers , hasn't failed me 1 time far. so there problem comparing them in case? , if there - why can't locate , how prepare it? edit: i'm aware 0.1 + 0.2 != 0.3 if decide compare them. thing - want compare 2 fixed doubles . won't have compare 0.1 + 0.2 , 0.3 . i'd have compare 0.3 , 0.3 @ best. or 0.4 , 0.3 . that. need utilize bigdecimal, or epsilon, or whatever that? double s discrete representation of decimal numbers. means not numbers can represented double. for illustration double can't represent big numbers accurately, in case "rounded" closest available double. see example: publi...

c++ - Snake game border collision -

c++ - Snake game border collision - i'm wondering if can help me code. below have code controllable circle (representing snake head) what modify/add below code when snake collides border/boundaries, repeats opposite side? i have set game resolution 1024 x 768 any help appreciated :) snake.cpp #include "snake.hpp" #include <cstdlib> void snake::move() { switch(direction_){ case direction::north: position_.y += 10; break; case direction::east: position_.x += 10; break; case direction::south: position_.y -= 10; break; case direction::west: position_.x -= 10; } } void snake::render(prg::canvas& canvas) const { canvas.drawcircle(getposition().x, getposition().y,20,prg::colour::white); } void snake::changedirection(direction new_direction) { direction_ = new_direction; } play_state.cpp #include "play_state.hpp" #include "ai_snake.hpp"...

d3.js - Changing data for selected D3 object -

d3.js - Changing data for selected D3 object - i'd alter x value in info variable line object while i'm changing x1 , x2 attributes. how do that? see code , image below. function updateborder(x, whichborder) { temp_border = svg.selectall(whichborder) .attr("x1", x) .attr("x2", x); } you can modify info in d3 callbacks. function updateborder(x, whichborder) { temp_border = svg.selectall(whichborder) .each(function (d) { d.x = x }) .attr("x1", x) .attr("x2", x); } but mutating info in random places not idea. d3.js

C (Windows) - GPU usage (load %) -

C (Windows) - GPU usage (load %) - according many sources on net possible gpu usage (load) using d3dkmtquerystatistics. how query gpu usage in directx? i've succeded memory info using code here slight modifications: http://processhacker.sourceforge.net/forums/viewtopic.php?t=325#p1338 however didn't find fellow member of d3dkmt_querystatistics construction should carry info regarding gpu usage. c windows gpu

ruby - A way to implement `String#split!` -

ruby - A way to implement `String#split!` - sometimes need such method, alter class of own object. there string#delete! , #downcase! , #encode! , #gsub! , #strip! , #slice! , etc. trying alter string, resulting class anyway still string . , want method, can convert string array . way create this: irb(main):082:0> str = "qwerty" => "qwerty" irb(main):083:0> str.split! "e" => ["qw", "rty"] irb(main):084:0> str => ["qw", "rty"] is possible? maybe cool state of japan kung-fu or ugly bicycles — see solution. nope, not possible. objects can't alter classes in ruby. in smalltalk, example, utilize become: : becomesubstrings: astring self become: (self substrings: astring). if phone call this: s := 'qwerty'. s becomesubstrings: 'e'. now, s array: transcript show: s printstring. the result is: #('qw' 'rty') technicall...

php - filtering form inputs -

php - filtering form inputs - i have simple contact form name, email, select list, , textarea. in mailer php script i'm trying add together simple filter prevent sql injection or other forms of hacking. for example, i'm using $name = filter_input(input_post, 'name', filter_sanitize_special_chars); is good? firstly allow me tell 85% of protection methods done 2 functions. htmlspecialchars mysql_real_escape_string firstly if sends info site such $_post['name'] , , wish utilize value on html side such <p>the next string: {$_post['name']} invalid</p> should create sure that value has been through htmlspecialchars, protect most of xss attempts next injection, if value of $_post['name'] going database create sure utilize mysql_real_escape_string on value. that give 100% protection sql injection, means db cannot run commands user, dont mean text should be. the functions should utilize before inserti...

.net - sqldatasource insert return identity value -

.net - sqldatasource insert return identity value - im using sqldatasource sds = new sqldatasource(); in code behind , inserting using sds.insert(); please tell me how inserted record primary key value? please note im not using stored procedure. last_insert_id(); gives lastly primary key id, can append on end of current insert , key value returned insert. here c# example: tring sqlins = "insert table (name, information, other) values (@name, @information, @other)"; db.open(); seek { sqlcommand cmdins = new sqlcommand(sqlins, db.connection); cmdins.parameters.add("@name", info); cmdins.parameters.add("@information", info1); cmdins.parameters.add("@other", info2); cmdins.executenonquery(); cmdins.parameters.clear(); cmdins.commandtext = "select @@identity"; // lastly inserted id. int insertid = convert.toint32( cmdins.executescalar() ); cmdins.dispose(); cmdins = null; } catch(exception ex) { throw...

pandas - How to fix AttributeError: 'Series' object has no attribute 'find'? -

pandas - How to fix AttributeError: 'Series' object has no attribute 'find'? - i trying play online data, , having problem plotting due 'attribute' error in plot function # reading info online info sets import pandas pd import requests, zipfile, stringio r = requests.get('https://archive.ics.uci.edu/ml/machine-learning-databases/00287/activity recognition single chest-mounted accelerometer.zip') z = zipfile.zipfile(stringio.stringio(r.content)) activity_files = [name name in z.namelist() if name.endswith('.csv')] # loading pandas dataframe z_data = z.read(activity_files[4]).split('\n') activity_data = pd.dataframe([z.split(',') z in z_data], columns=('seq','ax','ay','az','label')) # filtering working_desk_data = activity_data[activity_data.label == '1'] standing_data = activity_data[activity_data.label == '3'] walking_data = activity_data[activity_data.label =...

zend framework - set form values by query parameters in zend2 form -

zend framework - set form values by query parameters in zend2 form - i created form zend 2 want utilize form in method after form submitted url : zendtst.com/search?price=2 but when page load default value in input empty excepted 2 my input created : <div class="form-group"> <label for="title" class="control-label col-md-1 pull-right"><?php echo $this->formlabel($form->get('price')); ?></label> <div class="col-md-3 pull-right"> <?php echo $this->formelement($form->get('price')); ?> </div> <div class="col-md-3 pull-right"> <?php echo $this->formelementerrors($form->get('price')); ?> </div> what should query params default of inputs need utilize query params search page you need phone call setdata on form object , pas...

angularjs - Ionic/Laravel App Client Side Auth Management -

angularjs - Ionic/Laravel App Client Side Auth Management - i have been fumbling around different implementations , ideas work, sense not doing dry or smart be. i've been next "tutorial" angular auth so, have functional laravel (4.2) end set resource routes protected oauth filter. using password grant , working fine there. i've got log in/out routes set , able sign in ionic app , obtain , access_token , refresh_token laravel fine. obtaining new access_tokens using refesh_token works fine well. but, having issues trying figure out how correctly handle next things in ionic: make sure access_token hasn't expired before user hits ionic state consume resource end. handle case user's access_token & refresh token have both expired requiring them log in laravel end in order obtain new pair of access & refresh tokens. have user "log in" when need obtain new access_token & refresh token (or first registering) route, oauth/access_token,...

javascript - How to compare only date in moment.js -

javascript - How to compare only date in moment.js - i new moment.js. have date object , has time associated it. want compare if date greater or equal today's date, excluding time when comparing. var datetocompare = 2015-04-06t18:30:00.000z i want check if datetocompare equal or greater today's date. have checked issame of moment.js, seems take string , date part. not want convert date string or manipulate further. because worried javascript may unexpected when converting date string(like adding offset or dst,etc), or may wrong. sample issame() docs moment('2010-10-20').issame('2010-10-20'); also looking issame() , isafter() combined 1 statement. i need compare using moment.js only.please not suggest plain javascript date comparison. the docs pretty clear pass in sec parameter specify granularity. if want limit granularity unit other milliseconds, pass units sec parameter. moment('2010-10-20').isafter('2010-01-0...

php - IIS Express Hangs with Curl Request -

php - IIS Express Hangs with Curl Request - i developing website php 5.4 using visual studio 2013, xdebug, , iis express. whenever effort curl request localhost:port, page hangs until the curl request fails due timeout. however, after curl timeout occurs, rest of code on requesting page executes, , code on requested page executes, not help me need info page. here script makes curl request: $logfh = fopen("c:\windows\temp\curl_log.log", 'a+'); $ch = curl_init(); curl_setopt($ch,curlopt_url,'http://localhost:46746/test.php'); curl_setopt($ch,curlopt_returntransfer, true); curl_setopt($ch, curlopt_cookie, "xdebug_session=" . $_cookie['xdebug_session'] . ';'); curl_setopt($ch, curlopt_followlocation, true); curl_setopt($ch, curlopt_timeout,5); curl_setopt($ch,curlopt_verbose , true); curl_setopt($ch,curlopt_stderr ,$logfh ); $result = curl_exec($ch); curl_close($ch); fclose($l...

javascript - set css background doesn't work in firefox -

javascript - set css background doesn't work in firefox - $(function () { var getbg = $('.one').css('background'); $('.two').css('background', getbg); }); fiddle worked in chrome, doesn't work in ie , ff, missing? from jquery documentation on .css( propertyname ) : retrieval of shorthand css properties (e.g., margin , background , border ), although functional browsers, not guaranteed. it looks in firefox using window.getcomputedstyle( element ) , believe used jquery under hood .css('property') [1], returns css2properties collection background property empty string. more specific background-related properties (like background-image , background-position etc) fine. it's same other shorthand properties, illustration font empty string while font-family , font-size etc. have values. you can prepare cloning these properties 1 one: http://jsfiddle.net/ohvulqwe/5/ $(function () { // refer...

c - Memory representation of differemt translations units -

c - Memory representation of differemt translations units - how different translation units represented in memory? for e.g. //internallinkage.h static int var = 10; //file a.h void updatestatica(); //file a.cpp #include "internallinkage.h" void updatestatica() { var = 20; } //file b.h void updatestaticb(); //file b.cpp #include "internallinkage.h" void updatestaticb() { var = 30; } //main.cpp #include "internallinkage.h" #include "classa.h" #include "classb.h" int _tmain(int argc, _tchar* argv[]) { updatestatica(); updatestaticb(); printf("var = %d",var); } the output here 10 know have 3 translations units each having there own re-create of static variable var. question is how these translation units maintained in memory? do have separated sections each translation unit in memory compiler can maintain static variable 'var' each translation unit? clearly there 3 different copies...

ios - download web page source code on iphone -

ios - download web page source code on iphone - i need download particular webpage on iphone. redirects me if utilize desktop. tools out there help me this? have tried sitesucker didnt work. thanks! if redirects when utilize desktop access it, can right click link , download page source. since want on iphone, can following: // download webpage nsurl *url = [nsurl urlwithstring:@"https://yoururl.here"]; nsdata *urldata = [nsdata datawithcontentsofurl:url]; [urldata writetofile:filepath atomically:yes]; and can access info through simulator folder or straight nsstring. nsurl *url = [nsurl urlwithstring:@"https://yoururl.here"]; nsstring *source = [nsstring stringwithcontentsofurl:url encoding:nsutf8stringencoding error:null] ios mobile-safari

c# - Change the alias column name with a variable -

c# - Change the alias column name with a variable - i'm still beginner in asp.net , wanted know if there's way pass variable column name(alias) select in linq. want way gain flexibily using linq. reading request date|idcourrier|sens var req = courrier in db.elise_stat_courriers select new { date =dbfunctions.truncatetime(courrier.datecourrier).tostring().substring(0,10), courrier.idcourrier, courrier.sens, }; list<string> l = new list<string> { "arrivé", "départ", "dossier", "interne" }; those column names , if it's possible pass them variable date|arrivé|départ|dossier|interne var req1 = courrier in req gro...

angularjs - ng-repeat + ng-switch: how to use correctly? -

angularjs - ng-repeat + ng-switch: how to use correctly? - premise: i've seen several similar questions. can't figure out how solve doubt. i have array of objects: $scope.messages = [obj1, obj2, ...]; where each object has next structure: { id: <int>, printonlyfirst: <boolean>, text1: <string>, text2: <string> } where text1 / text2 conditionally printed (in real time through track by) according printonlyfirst. <div id="container"> <div ng-switch="printonlyfirst" ng-repeat="message in messages track message.id"> <div ng-switch-when="true" class="text1"> <!-- case 1 --> {{message.text1} </div> <div ng-switch-when="false" class="text2"> <!-- case 2 --> {{message.text2} </div> </div> </div> i think code fine. however noticed ...

php - Problems to scan many images folders -

php - Problems to scan many images folders - i have more 10 sections/articles in single pages , each section display 3 thumbs. 3 thumbs > linking > 1 images_main images_main = thumb1, thumb2, thumb3 structure: images |_______ 1stsection |__________ images_main |__________ img1 |__________ img2 |__________ img3 |___________ thumb |__________ img1 |__________ img2 |__________ img3 so, have wrote little code, working fine first section not working. not show right thumbs &/or images_main rest of sections. it keeps showing images first folder, not matter if change: $smallsecond_dir = 'images/small225x341/ ** 2nd / 3rd / 4ththeme/ **'; gets images_main: <h5> <?php $smallsecond_dir = 'images/s...

mysql - PHP if statement stops remainder of HTML page from loading -

mysql - PHP if statement stops remainder of HTML page from loading - this question has reply here: how useful error messages in php? 26 answers the next if statement not seem working me. the 2 values in b1rafrica , b2rafrica bigints beingness pulled mysql database (perhaps might it?). when run these values site doesn't load: b1rafrica = 200 b2rafrica = 150 if remove else site works... i'm total php noob apologise in advance if i'm doing stupid. class="snippet-code-html lang-html prettyprint-override"> if ($b1rafrica >= $b2rafrica) { $africastyle ="africab1"; } } else { $africastyle ="africab2"; } cheers, will please provice more info, errors you're getting. seek this: if ($b1rafrica >= $b2rafrica) { $africastyle ="africab1"; } else { $afr...

rest - OAuth on Windows Phone 8 with native broweser -

rest - OAuth on Windows Phone 8 with native broweser - i want authorize user oauth using quizlet api. have problems oauth authentication. described here: https://quizlet.com/api/2.0/docs/authorization_code_flow. it not allowed utilize browser control: "if in mobile setting, must sent via native browser, not in-app browser." how can this? found several tutorials access external authentication sites using web browser control. not net explorer. how can via native browser? i tried webbrowsertask. cannot retrieve info net explorer. can this? thanks in advice, axel rest authentication windows-phone-8 oauth restful-authentication

xcode - Impossible to achieve certain float value -

xcode - Impossible to achieve certain float value - i testing code. have boolean conditions float numbers. i assign float value test code: float testfloatvalue = 0.9; and boolean status not met: if (testfloatvalue == 0.9) { } because when debugging, float number has changed 0.9 0.899999976 i not understand anything! due nature of floating point numbers values not possible represented exactly. never want direct check equality... there numerous articles on web , if search find many. here quick routine can utilize in objective c check equal. bool arealmostequal(double result, double expectedresult) { homecoming fabs(result - expectedresult) < .0000000001; } you utilize per values in original question: if(arealmostequal(testfloatvalue, 0.9) { // } xcode floating-accuracy

html - PHP regex pattern not identifying closing bracket for tag -

html - PHP regex pattern not identifying closing bracket for tag - i have text area of text can perchance contain tags in them. need identify these tags specific string of text in src attribute ("/storyimages/") , delete them. instance, if have text <br><img src="/storyimages/myimage.jpg" align="right" width="105" height="131"><b>(cns) </b>lorem ipsum dolor... i want rid of whole tag , replace ''. regex pattern i'm trying utilize /<img src=.*\/storyimages\/.*>/ but it's not working. happens identifies start of string ok, it's not identifying closing > character, if utilize preg_match(), match starts . i know you're not supposed utilize regex on html, isn't embedded tags; it's 1 tag in midst of bunch of text, should ok. can see, > isn't special character, if escape it, still same result. is there simple i'm missing create work? or nee...

java - How can I deserialize an object of a class that comes from another project? -

java - How can I deserialize an object of a class that comes from another project? - i want import class made in eclipse project in android studio. have been working on project in eclipse involves custom class called wordlist , have serialized instance of class binary file. now, have started larn android programming , wanted create app uses file. want utilize read wordlist object file: objectinputstream in = new objectinputstream( new fileinputstream(new file( /*file name*/ ))); homecoming (wordlist) in.readobject(); but in order that, programme of course of study needs know wordlist class, otherwise i'll classnotfoundexception @ cast. did first create new wordlist class in android project exact re-create of 1 in eclipse project, got exception: java.lang.classnotfoundexception: didn't find class "package_name.wordlist" on path: dexpathlist[[zip file "/data/app/my_project_directory-2/base.apk"],nativelibrarydirecto...

javascript - How to find and remove duplicate entry from dropdown list -

javascript - How to find and remove duplicate entry from dropdown list - this question has reply here: filter duplicate options select dropdown 3 answers i have dropdown list having duplicate entries. 1 of duplicate entry selected value in dropdown. eg: <select id="country"> <option value="nz">new zealand</option> //new zealand selected alternative <option value="usa">united states</option> <option value="ind">india</option> <option value="nz">new zealand</option> <option value="sa">south africa</option> <option value="uk">united kingdom</option> <option value="jp">japan</option> </select> now, im trying remove new zealand alternative (duplicate), @ same time, im trying creat...

javascript - Unix socket via websockets? -

javascript - Unix socket via websockets? - is possible connect unix socket websockets using classic browsers ? how can ? i want utilize docker remote api through unix socket (/var/run/docker.sock) javascript websocket

objective c - [iOS][push notification] not receiving notification -

objective c - [iOS][push notification] not receiving notification - my situation app not receive force notification after process: quit app, app in background open many other apps app killed in background, or utilize double tap home button simulate that enter aeroplane mode, simulating user beingness in lift or smth that quit aeroplane mode, phone reconnect internet send force notification app, no force notification received. this mutual case me, when user using old phones low memory , background apps killed. i have tested other apps(facebook, twitter, etc) , work mine isn't, there i'm missing? any help appreciated. sorry bad grammar. ** update: sorry made mistake, forgot mention step 4 = = i don't know if quite notifications since ios 8 or 7 can enable background mode force notifications. did enable in -> project -> capabilities -> background modes ? ios objective-c notifications push-notification apple-push-notifications

mysql - rails where query with dates does not return boundary date data -

mysql - rails where query with dates does not return boundary date data - i trying retrieve info mysql database using rails. working fine not homecoming info near boundary dates. example if params[:from] , params[:to] fr = nil; fr = datetime.parse(params[:from]) unless params[:from].empty? = nil = datetime.parse(params[:to]) unless params[:to].empty? if !fr.nil? , !to.nil? puts "------------------" puts fr puts @m = @m.where(start: fr..to) end end @m.size logs info app 30303 stdout: ------------------ app 30303 stdout: app 30303 stdout: 2015-04-12t16:26:16+02:00 app 30303 stdout: app 30303 stdout: 2015-04-13t16:26:16+02:00 app 30303 stdout: app 30303 stdout: 0 i sure there info , hr before 268129 | 2015-04-13 15:21:53 | 2015-04-13 15:21:53 | where first id, sec coulum start date sure date right can see in logs , particular user has info ....i trying extract info lastly 24 hours... suggestion o...

objective c - iphone memory management strange issue -

objective c - iphone memory management strange issue - this piece of code had written in xcode foo * myfoo = [[foo alloc] init] ; [myfoo release] ; [myfoo printmessage] ; if right, should give runtime error when printmessage function called myfoo gets deallocated time. in xcode , code working , print message getting called, problem due setting on xcode? regards abhijit you're invoking undefined behaviour accessing freed memory. it might crash, might work fine, might result in dancing unicorns spewing forth nose. to observe memory errors whilst you're developing code, should enable nszombie's, see instructions here: http://www.cocoadev.com/index.pl?nszombieenabled update you might wonder why works - certainly os should throw error when seek access memory isn't valid? the reason why don't error (and why behaviour undefined) checking memory valid on every access result in performance penalty - ie. code run slower, check shouldn't...

c# - Forms authentication and server time -

c# - Forms authentication and server time - i have server gets time reset 7 hours in past. when happens forms authentication no longer works. when resync time server time works again. what causing this? , issue me more changing time, because don't think possible maintain clients , servers in sync. you can't have production server jumping time. google "windows ntp time synchronization" find how configure servers within microseconds of right time. c# asp.net forms-authentication

I turn off my computer, and eclipse deleted all the content inside the files -

I turn off my computer, and eclipse deleted all the content inside the files - i building android app. pc slow , turn pc off, eclipse running, , forgot close it, saved project. i turn pc on again, , when tried open project, eclipse deleted folders. checked workspace folder, , files empty, including java files, there no way have code back, don't have backups. i tried recover scheme 3 times, didn't work, failed. installed lot of softwares recover deleted files, had no success. i'm sad. what do? eclipse

nginx downloads php files instead of executing them (HHVM) -

nginx downloads php files instead of executing them (HHVM) - i'm trying setup hhvm execute php code. using apache, switched nginx , i've got working. however, when seek access index.php download file instead of execute/serve it. configuration, , ran usr/share/hhvm/install_fastcgi after configuring , subsequently restarted nginx service. server { hear 80; hear [::]:80; root /var/www/domain.com/public_html; index index.php index.html index.htm; server_name domain.com www.domain.com; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; include fastcgi_params; } } any ideas? i fixed it. had include hhvm.conf file, , try_files stuff. here's new configuration: server { hear 80; hear [::]:80; root /var/www/domain.com/public_html; index index.php index.html index.htm; server_name domain.com www.domain.co...

joomla3.4 - How to add pagination for component front end (Joomla 3.4) -

joomla3.4 - How to add pagination for component front end (Joomla 3.4) - i new in joomla , want know how add pagination component front end, searching not found still pagination in front end end. you can follow guide here on official documentation, 1.5 works great 3.4 well: https://docs.joomla.org/j1.5:using_jpagination_in_your_component#implementing_pagination_in_front_end just 3 steps :) next maybe need update html construction pagination links generated joomla, can overrides , see link: https://docs.joomla.org/understanding_output_overrides#pagination_links_overrides pagination joomla3.4

php - Error connecting with QuickBooks Web Connector -

php - Error connecting with QuickBooks Web Connector - i using keith palmer's quickbooks php devkit connect php pos quickbooks. have installed @ several different installations , have never had issue this. unfortunately else wrote code while back. please help me find what's going wrong one. after adding application qb webconnector, when trying connect, 'authentication failed' error. entire message below. below qwc file , part of php file connecting to. error version: not provided service message: authentication failed description: qbwc1012: authentication failed due next error message. client found response content type of 'text/html', expected 'text/xml'. request failed error message: -- deprecated: mysql_connect(): mysql extension deprecated , removed in future: utilize mysqli or pdo instead in /home/domaincom/public_html/shop/qbconnector/quickbooks/driver/sql/mysql.php on line 267 deprecated: mysql_connect(): ...

Extract Specific info from gmail to google Spreadsheet -

Extract Specific info from gmail to google Spreadsheet - i received emails format from same email address: showinvalue@system.com below email content: you have new showing(s) elizabeth luchenbill showed listing 123 abc dr, marietta, cobb 30062 (keybox# 31369022) on 03/31/2015 4:51pm 517-123-1234 agentname@somegmail.com for additional info on showings please login supraweb. next email you have new showing(s) amanda taylor showed listing 678 champions vista ct, milton, ga 30004 (keybox# 31369030) on 03/30/2015 12:59pm 770-123-5678 realtor.hello@gmail.com end of message i have script , "email extractor gmail". extract name, phone number , property address google spreadsheet. there, export crm. me? jack gmail google-spreadsheet

Android: Slide gesture and animation for switching between tabs -

Android: Slide gesture and animation for switching between tabs - i'm sure has been answered somewhere, already, can't find it: have tabhost 3 tabs, each containing different views (not activities). want create swiping gesture right left , allow current view slide out left , next view slide in right, changing current tab. so, want switch between tabs triggered gesture (rather clicking on tab) , want show animation when current tab changed. i looked @ viewflipper examples , tutorials, can't find 1 explains how slide between tabs. again, sorry if has been answered before, can't find it. basic gesture detection - stackoverflow introduction gestures - mobile tuts you have definde gestures android gesture tool (you can find in emulator) , implement gesture listener hear gesture events. android animation tabs slide gesture

visual studio - Can I change the language of ASP.NET Configuration Tool? -

visual studio - Can I change the language of ASP.NET Configuration Tool? - my visual studio in english language asp.net configuration tool runs in os language because don't work in english language country. how configure english language language if possible ? i checked folder on own machine: c:\windows\microsoft.net\framework\v4.0.30319\asp.netwebadminfiles\app_globalresources , app_localresources . the resx files in english language on machine, assume language follows language installed framework with. installed english language version of framework, getting english language resource files. if hold of resource files english language version of framework, can either replace existing files, or add together them name.en-us.resx , modify web.config set uiculture. <globalization uiculture="auto:en-us" /> this default on machine, automatic depending on browser language, , fallback en-us (which 1 present). asp.net visual-studio

dynamic language runtime - How to redirect the input of ironruby to a textbox (WinForms & Silverlight 4) -

dynamic language runtime - How to redirect the input of ironruby to a textbox (WinForms & Silverlight 4) - i'm building ironruby console in silverlight 4 , winforms (net4). can redirect output without problems: myruntime = ruby.createruntime(); msoutput = new memorystream(); myruntime.io.setoutput(msoutput, encoding.utf8); myengine = myruntime.getengine("rb"); mysource = myengine.createscriptsourcefromstring("a='123'\nputs a", sourcecodekind.statements); mysource.execute(); textbox2.text = readfromstream(msoutput); now, want redirect input also, getting 'nil' script: myruntime = ruby.createruntime(); msoutput = new memorystream(); msinput = new memorystream(); myruntime.io.setoutput(msoutput, encoding.utf8); myruntime.io.setinput(msinput, encoding.utf8); myengine = myruntime.getengine("rb"); mysource = myengine.createscriptsourcefromstring("a=gets\nputs a", sourcecodekind.statements); byte[] bytearray = enco...

WPF loading animation on a separate UI thread? (C#) -

WPF loading animation on a separate UI thread? (C#) - okay, have loading animation runs while big datatable populated allow user know programme has not frozen. have animation working fine, freezes while datatable updatingv well. there way have multiple ui threads, animation go on run while datatable loading information? edit: current code below. private void createfiletable() { file_data = new dataset(); data_table = new datatable(); file_data.tables.add(data_table); datacolumn tempcol = new datacolumn("file name", typeof(string)); data_table.columns.add(tempcol); tempcol = new datacolumn("ext", typeof(string)); data_table.columns.add(tempcol); tempcol = new datacolumn("size", typeof(string)); data_table.columns.add(tempcol); tempcol = new datacolumn("created", typeof(label)); data_table.columns.add(tempcol); tempcol = new datacolumn("modified", typeof(label)); data_...

java - OneTime Setup Screen Android Error -

java - OneTime Setup Screen Android Error - i new android development , trying create app screen showing first time , asking user set password , after password set ,that screen never shown 1 time again . wrote basic code implementing this,but when running app on emulator ,the same setup screen shown 1 time again , again.can point out reason this? code: bundle com.example.homeautomation.zigbeehomeauto; import android.content.intent; import android.content.sharedpreferences; import android.os.bundle; import android.support.v7.app.actionbaractivity; import android.view.view; import android.widget.edittext; public class setupscreen extends actionbaractivity { view v ; public static final string prefs_name = "myprefsfile"; @override protected void oncreate(bundle savedinstancestate) { sharedpreferences check = getsharedpreferences(prefs_name, 0); boolean hasloggedin = check.getboolean("name", false); if (h...

C# manually create window like java's JFrame, JPanel / Canvas & Graphics -

C# manually create window like java's JFrame, JPanel / Canvas & Graphics - i've worked java , creating rpg game, created window game using jframe. how can in visual studio in c# using code , not design editor in java eclipse? more how can create window using c# in microsoft visual studio using java in eclipse? want because want manually draw images , each pixel of window , able create fullscreen on specific screen can changed in-game. because seeking analog jframe, presume "full screen" mean "maximized." you can command on rendering of windows form overriding onpaint() method. careful calculations relative dimensions of form. also, since shirking ide , wysiwyg editor, beware become hard alter course of study later if decide want utilize design tools create toolbars, buttons, etc. might create more sense instead create form wysiwyg editor , place panel onto form, create custom drawing routine on panel. in event, based on question ...

java - Using Thread in Android for sending message -

java - Using Thread in Android for sending message - i have code: if (value) { thread = new thread() { @override public void run() { seek { while (!isconnected()) { synchronized (this) { wait(3000); } } } grab (interruptedexception ex) { } if(wifimanager.iswifienabled()){ sendmessagewidget(); } else { showwifisettingsalert(); } } }; thread.start(); } i want app wait until google api client connected , send message. the code isconnected method is: public boolean isconnected() { mgoogleapiclient.connect(); if (mgoogleapiclient.isconnected()) { homeco...