Posts

Showing posts from May, 2015

java - OSRM functions vs. GoogleMaps functions -

is there url in osrm ( http://project-osrm.org/ ) call in java program , parse json file returned, instance: https://maps.googleapis.com/maps/api/geocode/json?address=rue+de+la+chambre+33+paris i have ! nominatim (from latin, 'by name') tool search osm data name , address , generate synthetic addresses of osm points (reverse geocoding) http://nominatim.openstreetmap.org/search?format=json&q=42+rue+de+la+folie-m%c3%a9ricourt+11e+paris

c - Function address is different in nm output and gdb -

let's focus on rect_isempty() function. the nm command gives me output: (...) 00021af0 t rect_isempty (...) on other hand, when launch gdb , see address of function, get: (gdb) info address rect_isempty symbol "rect_isempty" @ 0x8057c84 in file compiled without debugging. could anyone, please, explain why these addresses not same? gdb address from? nm gives mangled name symbol table's address offset. gdb gives actual virtual process's memory address. when looking address of function (in case gdb), shows address of inside code segment of unit located: current process or shared library. if function located inside object file running, code segment being loaded process's memory each time run os. in other case, if function in shared library , don't explicitly load dlopen , os loads it's code segment no in process memory in place. so, code segment of shared libraries shared between applications using it, it's data segme...

android - How to update the user location after enabling the GPS from an in App prompt -

i developing android app prompts user enable gps if it's not on , have used alertdialog purpose. after enable gps settings , come app pressing button, mapview doesn't reflect current location. although if have gps on before running app, app displays location. want know method use refresh user location after enabling gps purpose. relevant article help. following code gps part: gpstracker.java public class gpstracker extends service implements locationlistener { private final context mcontext; // flag gps status boolean isgpsenabled = false; // flag network status boolean isnetworkenabled = false; // flag gps status boolean cangetlocation = false; location location; // location double latitude; // latitude double longitude; // longitude // minimum distance change updates in meters private static final long min_distance_change_for_updates = 10; // 10 meters // minimum time between updates in milliseconds private static final long min_time_bw_updates = 1000 * 60 * ...

Callback function for push notifications while app is killed (titanium iOS) -

i cant find clear answer in titanium documentation. possible directly respond push notification while app killed ? i know callback called when open app trough push notification. there way respond when app opened manually ? i tried use remote-notification uibackgroundmodes, helps paused apps. my goal show push notification in in-app message center. you should never rely on push notifications deliver payloads, limited that. if user receives 5 push notifications , opens app via app icon, never receive of payloads. if opens app via 1 of notifications receive payload. you use silentpush: http://docs.appcelerator.com/platform/latest/#!/guide/ios_background_services-section-37539664_iosbackgroundservices-silentpush but app should query back-end actual data. that's how whatsapp well, can see when open via notification still fetch message(s) form server.

c# - Can't refresh data on a DataGridView -

i have datagridview on top of tablepanellayout . datagridview 's data bound on database , using code: dgvitems.datasource = gc.cshr_sorepo.tolist(); now, have other methods changes values database table datagridview references to. when change happens, can't refresh values of grid. i have tried dgvitems.refresh(); tablepanellayout.refresh(); , tablepanellayout.refreshedit(); even refreshing form itself. missing something?

c++ - Read file with separator a space and a semicolon -

i wrote parse file numbers, separator space. goal read every number of file , store in corresponding index of matrix a. so, first number read, should go a[0][0], second number a[0][1] , on. #include <iostream> #include <string> #include <fstream> using namespace std; int main() { const int n = 5, m = 5; double a[n*m]; string fname("test_problem.txt"); ifstream file(fname.c_str()); (int r = 0; r < n; ++r) { (int c = 0; c < m; ++c) { file >> *(a + n*c + r); } } (int r = 0; r < n; ++r) { (int c = 0; c < m; ++c) { cout << *(a + n*c + r) << " "; } cout << "\n"; } cout << endl; return 0; } now, trying parse file this: 1 ;2 ;3 ;4 ;5 10 ;20 ;30 ;40 ;50 0.1 ;0.2 ;0.3 ;0.4 ;0.5 11 ;21 ;31 ;41 ;5 1 ;2 ;3 ;4 ;534 but print (thus read) garbage. should do? edit here attempt in c, fails: ...

javascript - How to prevent this ad network http requests ? and how are the requests being inserted? -

i have simple webpage javascript sends various requests server. between getting following network requests , website not responsible. my html page <div class="container"> <div class="row"> <div> <div class="row"> <div class="col-md-6 "> <div class="form-group"> <label for="inputdate" class="col-sm-1 control-label">date</label> <div class="col-sm-6"> <input type="date" class="form-control" id="inputdate" name="inputdate" placeholder="date" required> </div> <button type="submit" class="btn btn-primary get" onclick="getdata()">get</button> </div> </div> </div> </div> </div> <div class="...

wso2 IS Table 'wso2.sp_app' doesn't exist -

i trying started ws02 identityserver 5.0. have changed default data source mysql 5.6. have executed scripts in wso2is-5.0.0\dbscripts\mysql.sql , wso2is-5.0.0\dbscripts\identity\mysql.sql. the server starts without errors. however, when try create user local dashboard below exception thrown. missing here? appreciated. [2015-07-08 16:19:25,729] error {org.wso2.carbon.identity.provisioning.outboundprovisioningmanager} - error while out-bound provisioning. org.wso2.carbon.identity.application.common.identityapplicationmanagementexception: failed update service provider 0 @ org.wso2.carbon.identity.application.mgt.dao.impl.applicationdaoimpl.getapplication(applicationdaoimpl.java:1090) @ org.wso2.carbon.identity.application.mgt.applicationinfoprovider.getserviceprovider(applicationinfoprovider.java:178) @ org.wso2.carbon.identity.provisioning.outboundprovisioningmanager.provision(outboundprovisioningmanager.java:343) @ org.wso2.carbon.identity.pro...

android - How to logout after killing all activities? -

on app, have following process log on user: the user enters credentials on mainactivity , redirected homeactivity using code navigation: intent accueilintent = new intent(getapplicationcontext(), homeactivity.class); accueilintent.addflags(intent.flag_activity_clear_task | intent.flag_activity_new_task); finish(); startactivity(accueilintent); when user on homeactivity , able log out log out button. since event fired, kill activities , redirect user login activity ( mainactivity ). code fired on event following: intent intent = new intent(this, mainactivity.class); intent.setflags(intent.flag_activity_new_task | intent.flag_activity_clear_top | intent.flag_activity_clear_task); startactivity(intent); the user redirected mainpage . when press home button on android home screen , come app, right mainactivity appears. however, when press native button return android home screen , come app, homeactivity appe...

php - How do you set the NODE namespace with NuSoap? -

is there way in nusoap set node's namespace? using normal php soap, can done soapvar. what equivalent in nusoap? i have: <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:own="www.ownyourliferewards.co.za" xmlns:own1="http://schemas.datacontract.org/2004/07/ownyourlife.webservices.webservicesbase" xmlns:own2="http://schemas.datacontract.org/2004/07/ownyourlife.webservices.generic.dataobjects"> <soap-env:body> <authenticatemember xmlns="www.ownyourliferewards.co.za"> <request> <securitytoken>9415cd31-0c7e-40ab-a45f-d3538b98b96b</own1:securitytoken> <membershipnumber>200803407801</own2:membershipnumber> </request> </authenticatemember> </soap-env:body> </soap-env:envelope> and want: <soap-env:envelope xmlns:soap-env="http://...

Android stopped connecting to computers via USB -

suddenly started giving me no notification time plug pc. i've used different usb cables,turned on usb debugging mode,restored factory settings, updated phone software. don't know else do. need here browse sdk on studio terminal , type adb devices , check if shows. if not try adb killall-server , adb start-server otherwise try updating usb driver phone

performance - Improve genbank feature addition -

i trying add more 70000 new features genbank file using biopython. i have code: from bio import seqio bio.seqfeature import seqfeature, featurelocation fi = "myoriginal.gbk" fo = "mynewfile.gbk" result in results: start = 0 end = 0 result = result.split("\t") start = int(result[0]) end = int(result[1]) record in seqio.parse(original, "gb"): record.features.append(seqfeature(featurelocation(start, end), type = "misc_feat")) seqio.write(record, fo, "gb") results list of lists containing start , end of each 1 of features need add original gbk file. this solution extremely costly computer , not know how improve performance. idea? you should parse genbank file once. omitting results contains (i not know exactly, because there missing pieces of code in example), guess improve performance, modifying code: fi = "myoriginal.gbk" fo = "mynewfile.g...

unity3d - Can effectors apply different effect to different objects? -

i'm making first 2d game using unity , wonder how 2d area effectors apply different effect different objects. specific, i'm implementing magnetic forces. when negative charge passes field (aka. 2d area effector), force applied should reverse when positive charge passes field. 2d area effector, apply same (absorbing) force both negative charge , positive charge. however, that's not want. body has solution this? thanks! you need 2 diffrent area effectors attached 1 gameobject. each effector has diffrent collidermask dependings on layer , should affect.

html - Anchor tag issue with full width -

code this: <div>overall advance rating(1 foodees rated)</div> <a href="#"> <img src="#"/> <img src="#"/> <img src="#"/> <img src="#"/> <img src="#"/> </a> here getting cursor after rating images also. how can handle cursor until images only. had tried width , max width not able solution. you trying have pointer cursor on images , not in between if understand question correctly. if so, try this: a { cursor: default; } img { cursor: pointer; } <div>overall advance rating(1 foodees rated)</div> <a href="#"> <img src="#"/> <img src="#"/> <img src="#"/> <img src="#"/> <img src="#"/> </a> otherwise believe might have try harder question across.

java - Issues while executing Armstrong number program -

i trying out code finds out whether number entered armstrong or not. here code: import java.util.*; public class arm { int a, b, c; void m1() { scanner obj = new scanner(system.in); system.out.println("enter number"); int number = obj.nextint(); number = (100 * a) + (10 * b) + (1 * c); if ((a * * a) + (b * b * b) + (c * c * c) == number) { system.out.println("number armstrong"); } else { system.out.println("number not armstrong"); } } public static void main(string args[]) { arm obj = new arm(); obj.m1(); } } here value of a,b , c comes out zero. not correct result. if enter number 345 . a , b , c should 3, 4 , 5 respectively. please guide. that not how calculate a, b, c. to find a,b,c repeatedly divide 10 , remainder modulus . int digit = 0; int sum = 0; while(num > 0) { digit = num % 10; sum += math.pow(digi...

java - Set root logging level in application.yml -

i used application.properties spring boot (1.3 m1) , started translate yaml file because grew more , more complex. but have problems translating yaml: logging.level.*=warn logging.level.com.filenet.wcm=error logging.level.de.mycompany=debug the last 2 lines translated this: logging: level: com.filenet.wcm: error de.mycompany: debug but how add values root logging level ? these 2 approaches failed: failed approach 1: logging: level: warn com.filenet.wcm: error de.mycompany: debug failed approach 2: logging: level: star: warn com.filenet.wcm: error de.mycompany: debug i read docs , searched stackoverflow , googled did not find example valid syntax. you can use root configure root logging level: logging: level: root: debug

actionscript 3 - Detects no microphone when using Chrome browser -

the code down bellow should detects microphone. works on browser, when tested on mac latest google chrome browser flash player detects no microphone. when click on "reload button" on browser detect mic. var mic:microphone = microphone.getmicrophone(); try { prompt.text ="mic.name "+mic.name; trace("mic.name "+mic.name) } catch (e:error) { prompt.text ="no mic detected"; trace("no mic detected") } i heave searched google , spent many days trying fix it... thing / way overcome problem "reload" not kind of fix want. pleas me out fix it.. works other browsers..

html - Horizontal div tree -

i want generate horizontal tree out of nested divs using css without javascript. child elements should in same depth. therefore, created nested div structure float left , clear elements. child elements aren't in same depth: please see jsfiddle: https://jsfiddle.net/bpb680l9/ is possible, position child element relative left side of parent, not text element within parent? or adjust high of text parent, following child elements adjusted end of text element? or there other elegant solution build horizontal tree variable number of child elements , siblings css , html? css div.layout { border: 1px solid black; display: inline-block; position: relative; left: 50px; } div.clear { clear: both; } html <div> content <div class="layout"> content <div class="layout"> content </div> <div class="clear"></div> <div class="layout...

java - TextView Span with custom content -

i want create span can modify content. so, example need draw text without first 3 , last 4 characters. i'm trying use replacable span: class italicreplacement extends replacementspan { @override public int getsize(paint paint, charsequence text, int start, int end, paint.fontmetricsint fm) { paint.settextskewx(-0.25f); return (int) paint.measuretext(text, start + 3, end - 4); } @override public void draw(canvas canvas, charsequence text, int start, int end, float x, int top, int y, int bottom, paint paint) { paint.settextskewx(-0.25f); canvas.drawtext(text, start + 3, end - 4, x, y, paint); } } but replacable span draws image. not text. so, can't work regular text. , main problem wrapping ( http://i.stack.imgur.com/lxjuj.png ). i saw this , this . there same problems. so, there other way want? example, want clickable spoilers or urls displays domain. may other *span can that?

python - Pandas DataFrame index by belonging to a set -

i have pandas dataframe that, among columns, has 1 called phone_number. want rows have phone number shows 50 times or more. best attempt this: counts = data.phone_number.value_counts() counts = counts[counts.values > 50] data[data.phone_number in counts.index] i get, however, error: typeerror: 'series' objects mutable, cannot hashed what best way rows in data frame situation? thank much! you can use groupby filter . import pandas pd import numpy np # generate artificial data # =================================================== np.random.seed(0) # 450 rows/records in total df = pd.dataframe(np.random.randint(1, 10, 450), columns=['phone_number']) out[74]: phone_number 0 6 1 1 2 4 3 4 4 8 5 4 6 6 7 3 .. ... 442 7 443 1 444 9 445 1 446 8 447 7 448 ...

angularjs - dynamic orderBy not working with ng-model -

i'm having trouble getting list ordered based on selected value. considered better practice this? <select ng-model='selected'> <option value="name">name</option> <option value="score">score</option> </select> <ul ng-repeat="shop in shops track $index | orderby: 'data.{{selected}}' "> <li class="name">{{shop.data.name}}</li> <li class="score">score: {{shop.data.score}}</li> <li><img ng-src="{{shop.data.img}}"> </li> </ul> here have tried. html : <select ng-model="selected"> <option value="name">name</option> <option value="score">score</option> </select> <ul ng-repeat="shop in shops | orderby:selected"> ...

javascript - Detecting if bootstrap modal window is show don't work properly -

i have draw in bootstrap modal window if user click on button. code is: $('#button').on('click', function (evt) { dosomecrazystuff(); $('#mymodal').modal('show'); $('#mymodal').on('shown.bs.modal', function (e) { alert('debug'); drawstuffinmodal(); }); }); for first click works fine. second click 2 alerts, third click - 3 alerts etc. user can click button if modal hidden, need close modal before next drawing. i found out problem detecting of modal window state - if don't use $('#mymodal').on('shown.bs.modal', function (e) {}) waiting: $('#button').on('click', function (evt) { dosomecrazystuff(); $('#mymodal').modal('show'); settimeout(function () { alert('debug'); drawstuffinmodal(); }, 500); }); ... alert once. works, it's ugly solution. ...

Issue with flash animation with record button swift -

i trying make record button when user click on , it's start recording , want apply flash animation on button , found this post. , convert code swift not working , here swift code: var buttonflashing = false @ibaction func record(sender: anyobject) { println("button tapped") if !buttonflashing { startflashingbutton() } else { stopflashingbutton() } } func startflashingbutton() { buttonflashing = true recordbutton.alpha = 1 uiview.animatewithduration(0.5 , delay: 0.0, options: uiviewanimationoptions.curveeaseinout | uiviewanimationoptions.repeat | uiviewanimationoptions.autoreverse | uiviewanimationoptions.allowuserinteraction, animations: { self.recordbutton.alpha = 0 }, completion: {bool in }) } func stopflashingbutton() { buttonflashing = false uiview.animatewithduration(0.1, delay: 0.0, options: uiviewanimationoptions.curveeaseinout | uiviewanimationoptions.beginfromcurrentstate, ani...

Web service migration from Local IIS to Azure -

Image
i used azure website migration assistance migrate web service running on local vm's iis. migration process successful , able use web service. can't find find migrated source code in azure portal. can see 20mb of data in on dashboard graph of azure portal. if need changed of code this? what on azure web app should match on iis server. now, update web app, can use deployment techniques here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/ the simplest method deploy check content on web app use scm site. available at: https://your-site-name.scm.azurewebsites.net . go debug console > cmd , site > wwwroot folder see web app content. can upload site via drag , drop. alternatively, can download publishing settings web app via portal , re-use migration tool, select site, , upload publishing settings. suggest using deployment techniques above first. (disclaimer: wrote migration tool.)

Find the docker containers using an image? -

if have id of image how can find out containers using image? when removing image still used error message: $ docker rmi 77b0318b76b3 error response daemon: conflict, cannot delete 77b0318b76b3 because container 21ee2cbc7cec using it, use -f force but how find out in automated way without trying remove it? f want list images of active containers docker inspect -f '{{ .config.image}}' $(docker ps -q) , containers docker inspect -f '{{ .config.image}}' $(docker ps -qa)

java - Getting same session object -

in simple hibernate program getting detail of employee table using following code. :- employee employee = (employee) session.get(employee.class, new integer(6)); , same time print information in console system.out.println("name : -"+employee.getname() + "address :- " + employee.getaddress()); now paused execution 15000 ms. thread.sleep(15000); during time go through database , manually change details of employee table. when 15000ms completed , clear session cache , again try fetch same record i'm getting same object having same information . whatever information change during sleep time not reflected. below program configuration configuration = new configuration(); configuration.configure("hibernate.cfg.xml"); serviceregistry registry = (serviceregistry) builder.buildserviceregistry(); builder.applysettings(configuration.getproperties()); serviceregistry registry = (serviceregistry) builder.buildserviceregistry(); factory = configurat...

ckeditor - CK Editor add style for a page -

how add style using ck editor ? i want create style use in class attribute on liferay editor . for example - in page javascript section ckeditor.xxxx(// add style class red color called 'myred') and in editor - <p class="myred">text</p> would give red text . place in theme: .myred { color: red; } then include class in source mode of editor described in question: <p class="myred">text</p> that's it.

android - facebook login in my app gives nullpointer exception. I do not have the facebook app installed in my phone -

facebook login in app gives nullpointer exception. not have facebook app installed in phone. exception below. "java.lang.runtimeexception: failure delivering result resultinfo{who=null, request=64206, result=-1, data=intent { (has extras) }} activity {com.example.foodiepipe.foodiepipe/com.example.foodiepipe.foodiepipe.mainactivity}: java.lang.nullpointerexception\n\tat android.app.activitythread.deliverresults(activitythread.java:3500)\ how check if facebook app installed on phone , allow login? the error facing maybe due other issue. however, if want check if facebook application installed or not use method given below: public static boolean isfacebookappinstalled(context p_context) throws throwable { intent m_shareintent; packagemanager m_packagemanager; list<resolveinfo> m_activitylist; boolean m_isappinstall = false; try { m_shareintent = new intent(android.content.intent.action_send); ...

How to build 102 example of libigl tutorial in Visual C++? -

i using visual c++ 10.0(2010) on win7 32bit os. when tried build basic examples of libigl github tutorials: libigl tutorials the following installation code works fine: #include <igl/cotmatrix.h> #include <eigen/dense> #include <eigen/sparse> #include <iostream> int main() { eigen::matrixxd v(4,2); v<<0,0, 1,0, 1,1, 0,1; eigen::matrixxi f(2,3); f<<0,1,2, 0,2,3; eigen::sparsematrix<double> l; igl::cotmatrix(v,f,l); std::cout<<"hello, mesh: "<<std::endl<<l*v<<std::endl; return 0; } which indicates there no problem per tutorials. however, cannot tutorial 102 through: #include <igl/readoff.h> #include <igl/viewer/viewer.h> eigen::matrixxd v; eigen::matrixxi f; int main(int argc, char *argv[]) { // load mesh in off format igl::readoff("../shared/bunny.off", v, f); // plot mesh igl::viewer::viewer viewer; viewer.data.set_mesh(v, ...

php - How to sent uploaded image details(name,size, temp_name,error) for upload using JavaScript -

i submiting form using javascript. want store/move image folder using javascript. html code - <form id="exampleform" method="post" action="" enctype="multipart/form-data" > <input type="file" name="imagename" id="imagename" /> <input type="button" name="save_exit" id="save_exit" onclick="submitform('add_question_sql.php')" value="save &amp; exit" /> </form> javasript code- function submitform(action) { document.getelementbyid('exampleform').action = action; document.getelementbyid('exampleform').submit();// submiting form } so how sent image details (name, size, temp_name,error) action page move uploading process. try <form id="exampleform" method="post" enctype="multipart/form-data" > <input type="file" na...

textview - IOS: Reading RTF file with wrapping text -

i read rtf file code: nsurl *rtfstring = [[nsbundle mainbundle]urlforresource:@"privacy policy imaspanse" withextension:@"rtf"]; nserror *error; nsmutableattributedstring *stringwithrtfattributes = [[nsmutableattributedstring alloc]initwithfileurl:rtfstring options:@{nsdocumenttypedocumentattribute : nsrtftextdocumenttype} documentattributes:nil error:&error]; if (error) { nslog(@"error: %@", error.debugdescription); } else { self.textlabel.attributedtext = stringwithrtfattributes; } self.scrollview.contentsize = [stringwithrtfattributes size]; problem long line not wraps next line. how can achieve it? need text screen width , max height try way self.textlabel.attributedtext = stringwithrtfattributes; [self.textlabel setnumberoflines:0]; [self.textlabel sizetofit]; [self.textlabel setlinebreakmode:nslinebreakbywordwrapping];

Reading the output of windows batch file from c# -

i have requirement have check size of file using windows batch file , read output c# code batch-script @echo off set maximumbytesize=1000 setlocal enabledelayedexpansion /f %%a in ('dir /b d:\test_batch_files') ( set name=%%a set size=%%~za if !size! gtr !maximumbytesize! ( echo greater ) else ( echo smaller ) ) c# code output: process p = new process(); p.startinfo.useshellexecute = false; p.startinfo.redirectstandardoutput = true; p.startinfo.filename = "d:\\test_batch_files\\getfilesizeindirectory.bat"; //configurationmanager.appsettings["batchscriptpath"].tostring(); p.start(); streamreader mystreamreader = p.standardoutput; mystring = mystreamreader.readtoend(); p.waitforexit(); the output running batch should (running cmd): smaller smaller smaller greater smaller smaller smaller smaller smaller smal...

javascript - Check if select boxes are the same but skip the first item in select box -

i trying detect if select box same or not select box. however trying skip first item in list. so if of select boxes (bk1,bk2,bk3,bk4,bk5) same each other want field same, if first item in select box selected want ignore , not check if it's same. i seem working want can't work out how skip first item in list. so if: block1 = 113 block2 = 0 block3 = 0 block4 = 116 block5 = 117 should alert 'no fields same, safe move on' (since 0 first item in select box) so if: block1 = 113 block2 = 0 block3 = 115 block4 = 115 block5 = 117 should alert 'oh no, 1 of field same' since 115 same in list. <select id="block1""> <option value="0">item 0</option> <option value="111">item 1</option> <option value="112">item 2</option> <option value="113">item 3</option> <option value="114"...

windows 7 - Environment variable change made in a batch is not reflecting immediately -

this question has answer here: how retrieve value after using setx? 1 answer i trying set following environment variable , , invoking .exe file . particular takes value of variable , creates metadata files. but value set while running batch reflect if run second time . there way reflect environment variable change immediately? following sample setx -m user_home "d:\\user_home" start "" c:\\sample.exe restarting explorer.exe might enough. try taskkill /f /im explorer.exe , start again using explorer.exe after setting variable.

jquery - $.Ajax post array to Web Api 2 not working for me -

data model public class foo { public string id { get; set; } public string title { get; set; } } web api 2 controller [route("api/updatefoo")] public ihttpactionresult updatefoo(list<foo> foos) { } js // here need create foodata list of foo var foodata = []; foodata.push({ title: "title1" }); foodata.push({ title: "title2" }); $.ajax({ method: "post", url: "api/updatefoo", data: foodata }).done(function (result) { // }).fail(function(xhr) { alert(xhr.responsetext); }); what missing here? in fiddler looks i've sending foodata right not recieved in web api controller, being able enter the method breakpoint value in empty list create model contain list public class listoffoos { public list<foo> foos {get; set;} public listoffoos() { foos = new list<foo>(); } } then controller should this: [route("api/update...

Is there a quick way to manually rearrange methods in Android Studio? -

i have switched eclipse android studio, , miss being able rearrange methods in .java file dragging , dropping them in class structure window. there way or similar in android studio? (obviously can cut , paste in editor window, hoping there might more efficient way.) you can use move statement up/down shortcuts rearrange methods quickly. put caret on method name , press ctrl-shift-up/down swap either previous or next method.

.htaccess - htaccess redirect subfolders to domain -

i bought domain (e.g. mydomain.com) on hoster. because had experience webspace of hoster, took there. installed forwarding on hoster got domain. hoster of webspace got url access like: www42.mydomain.some-server.com. so forwarding mydomain.com www42.mydomain.some-server.com. when access mydomain.com tge forwarding works perfekt, see application running on webspace correct url. if click link, (e.g. signup) i'm redirected www42.mydomain.some-server.com/signup. want mydomain.con/signup. so need redirect of subfolders www42.mydomain.some-server.com mydomain.com. tested once redirection of requests mydomain.com ended in infinite loop :d how do that? for information: application build laravel 5.0 , there standard htaccess available. if want to, can post here.

Applying css to only Numbers in a jQuery -

var start_date = new date("july 7, 2015 07:00:00"); var interval = 20; var increment = 1; var start_value = 2824327; var count=2824327; console.log(count.tolocalestring('en-us')) window.onload = function() { var msinterval = interval * 1000; var = new date(); count = parseint((now - start_date) / msinterval) * increment + start_value; document.getelementbyid('counter').innerhtml = count.tolocalestring('en-us'); setinterval(function() { count += increment; document.getelementbyid('counter').innerhtml = count.tolocalestring('en-us'); }, msinterval); } i want apply bellow css numbers .number { font-family: verdana; color: white; background: black; } the jquery suppose add other jquery bellow $('p').html(function(i, v){ return v.replace(/(\d)/g, '<span class="number">$1</span>'); }); help me on how suppose achieve this. ...

javascript - ExtJS 5: Reserve space for msg target -

when have form in extjs 5 displays error markers beside form fields, positioning of other form fields changes time, depending on whether there validation markers or not. as validation marker appears, layout rearranged accommodate new element. from user point of view, evokes feeling of instability. is possible somehow reserve space validation markers up-front, such appear/disappear, without re-positioning other components within layout? use autofiterrors: false option on field. docs .

android - JSONStore initialization fails -

Image
i'm trying jsonstore working in mobilefirst 7 application on lenovo a7000-a. jsonstore throws error on initialization. on lg p880 works fine. here code of init: var collections = { configuration : { searchfields : { id : 'string' } }, tasklist : { searchfields : { id : 'string' } }, statistics : { searchfields : { subcategoryid : 'string' } }, issues : { searchfields : { id : 'string', internalid : 'string', tasklistid : 'string', subcategoryid : 'string', subtaskid : 'string' } }, subcategories : { searchfields : {} }, categories : { searchfields : {} }, resultqueue : { searchfields : { tasklistid: 'string' } } }; wl.jsonstore.init(collections) .then( function (result) { angular.element(document).ready(function() ...

javascript - Is Backbone's view 'events' property only for DOM events? -

i've got piece code in view: //dom events ----- ,events:{ 'click #language-switcher input[type="radio"]': function(e){ this.current_language = $(e.target).val(); } ,'click .create-gcontainer-button': function(){ this.collection.add(new group()); } } ,set_events:function(){ //model events ----- this.listento(this.collection,'add',function(group){ var group = new groupview({ model: group }); this.group_views[group.cid] = group; this.groups_container.append(group.el); eventtools.trigger("group_view:create",{ lang:this.current_language }); }); this.listento(this.collection,'destroy',function(model){ console.log('removing model:', model); }); //emitter events --- eventtools.on('group_view:clear',this.refresh_groups, this); }//set_events note: set_events gets called on initialization. well, don't defin...

symfony - Doctrine ManyToMany, find related and no related results -

i have entity called tournament users can register participate in. the relationship between 2 entities manytomany , need create view of symfony2 in list tournaments, or without registered users can join. this doctrinequerybuilder $em->createquerybuilder('d') ->select('d, i, u') ->leftjoin('d.item','i') ->leftjoin('d.users','u') ->where('d.active = 1') ->andwhere('d.state = 1') ->orderby('d.datestart', 'asc'); i need number of users have joined tournament. preamble there various way achieve want. can create sub-query count, simpler solution let doctrine handles you. the solution described below based on doctrine lazy/eager loading capability. when doctrine loads entity, populate it's associations, either lazily or eagerly (default lazy). solution assuming tournament entity maps users association manytomany relation. can create new meth...

php - Codeigniter Add new key and value to object(stdClass) inside foreach loop -

i trying add key , value array inside foreach loop. have following array. array (size=2) 0 => object(stdclass)[27] public 'id' => string '1' (length=1) public 'sectiontitle' => string 'personal information' (length=20) public 'field_format' => string 'vertical' (length=8) public 'status' => string '1' (length=1) and php code foreach ($query->result() $row) { $data[] = $row; } var_dump($data); return $data; i add key [fields] , value string it. try foreach ($query->result() $row) { $row->newkey = $newvalue; $data[] = $row; } var_dump($data); return $data;