Posts

Showing posts from September, 2011

meteor - How to find cordova app screen showing after starting activity with webintent? -

i using cordova webintent plugin in order launch location settings screen. how know app returned after window.plugins.webintent.startactivity({action:'android.settings.location_source_settings'}, function(){console.log("gps settings screen showing now"); waitforgps();}, function(){console.log("unable show gps settings screen")}); and waiting recursive function function waitforgps(){ checkgps.check(function(){ //gps enabled! ondeviceok(); }, function(){ //gps disabled! waitforgps(); }); } usual cordova events pause , resume not fire when activity launched or closed. there alternative handle scenario as, if user not enables gps app struck in infinite loop.

php - how to do codeigniter subquery -

how can kind of process in codeignitor <ul> <?php $quer1 = "select id table1"; //conside query examle foreach ($quer1 $value1) { ?> <li> <?php echo $value1['id']; ?> <ul> <?php $quer2 = "select name table2 id = $value1['id']"; foreach ($quer2 $value2) { ?> <li><?php echo $value2['name']; ?></li> <?php } ?> </ul> </li> <?php } ?> </ul> this method ok when doing normal php, because can query , data view, how can controller view $this->db->select('id'); $this->db->from('mytable'); $row = $this->db->get()->row(); echo $row['id']; $this->db->get_where('tab

ember.js - Ember's volatile and templates -

i have property mood part of interface component. behind scenes have computed property called _mood : const { computed, typeof } = ember; _mood: computed('mood','a','b','c' function() { let mood = this.get('mood'); if (typeof(mood) === 'function') { mood = mood(this); } return !mood || mood === 'default' ? '' : `mood-${mood}`; }).volatile(), i have situation volatile() hangs of of ember's computed object resolves non dom unit tests reason not triggering template update dom under circumstance. should, @ least, update if of properties being watched change (in case ['mood','a', 'b', 'c'] ) change. because volatile (aka, doesn't cache results) new results show in template if template knew re-render component reason doesn't. if remove volatile() tag works fine static/scalar values if mood function result cached , therefore works once (not working solution pr

how to get phone contacts in windows phone app 8.0 without using silverlight template -

i new windows developement. want contacts phone, getting contacts phone when using silverlight template. want without using sliverlight template need contacts phone. tried alot,but failed contacts phone without using silverlight template. please 1 me how cotacts phone without using silver light template.i using blankapp(windows phone) template in visual studio 2013 thank in advance. please @ how access contact data windows phone 8 , selecting user contacts windows phone store app . first link refering silverlight app, second 1 - windows runtime

javascript - How to prevent/unbind previous $watch in angularjs -

i using $watch in dynamic way on every call creating $watch while want unbind previous $watch . $scope.pagination =function(){ $scope.$watch('currentpage + numperpage', function (newvalue,oldvalue) { $scope.contestlist = response; //getting response form $http } } i have multiple tabs. when tab clicked, pagination function gets called: $scope.toggletab = function(){ $scope.pagination(); } so creating multiple $watch , every time click on tab creates one. before adding new watch need check if watcher exists or not. if it's there call watcher() remove watcher $scope.$$watchers array. , register watch. ensure watch has been created once. var paginationwatch; $scope.pagination = function() { if (paginationwatch) //check watch exists paginationwatch(); //this line destruct watch if there paginationwatch = $scope.$watch('currentpage + numperpage', function(newvalue, oldvalue) { //getting response fo

c++ - Specify a charset without intepreting ranges -

i'm quite puzzled parsing strings when have define in rule minus , minus character , not range of characters between 2 endpoints. for example, when write rule percent encode string of characters write *(bk::char_("a-za-z0-9-_.~") | '%' << bk::right_align(2, 0)[bk::upper[bk::hex]]); which means "letters, capital letters, digits, minus sign, underscore, dot , tilde", third minus sign create range between 9 , underscore or something, have put minus @ end bk::char_("a-za-z0-9_.~-") . it solves current problem 1 when input dynamic, user input, , minus sign means minus character? how prevent spirit assign special meaning of possible characters? edit001: resort more concrete example @sehe answer void spirit_direct(std::vector<std::string>& result, const std::string& input, char const* delimiter) { result.clear(); using namespace bsq; if(!parse(input.begin(), input.end(), raw[*(char_ - char_(delimiter))

Android Rss Webview Error -

i trying pass link webview in rss reader, once click on headline, error in webview; pass link. error message: https://www.dropbox.com/s/5p8knqtzkitftst/ailgtkw6hmtwz_o-m6q8ycgehkrayzgf3qnoa8ryscvg.jpg?dl=0

Find property as TObject in Delphi 7 -

i have 2 type of classes in delphi 7 : tphone = class(tpersistent) private fnumber: string; published property number: string read fnumber write fnumber; end; tperson = class(tpersistent) private ffirstname: string; fphone: tphone; public constructor create; published property firstname: string40 read ffirstname write ffirstname; property phone: tphone read fphone write fphone; end; how can find phone property in tperson it's name , return tobject ? maybe this: function findpropbyname(aobject: tobject; apropname: string): tobject; note phone subclass , no primitive type thanks this way instance: uses typinfo; var phone: tphone; person: tperson; begin ... if propistype(person, 'phone', tkclass) phone := getobjectprop(person, 'phone') tphone; ... end;

html - CSS overflow hidden and absolute position -

Image
consider following simple menu markup (automatically generated, , not have control on it): .menu { width: 500px; height: 20px; list-style: none; padding: 0; margin: 0; /* overflow: hidden ... problem */ } li { float: left; position: relative; margin-right: 30px; } ul li .submenu { position: absolute; left: 0; display: none; padding: 0; margin: 0; list-style: none; width: 100px; } ul li:hover .submenu { display: block; } <ul class="menu"> <li>lorem ipsum</li> <li>submenu <ul class="submenu"> <li>sub item 1</li> <li>sub item 2</li> </ul> </li> <li>consectetur</li> <li>adipiscing elit</li> <li>aliquam elit nisi</li> <li>pharetra quis</li> <li>nulla eget</li> </ul> in above code, menu has fixed width, has more items

c++ - Extract Point Cloud from a pcl::people::PersonCluster<PointT> -

i doing project university , need extract point cloud of people work it. made ros node adapting code of tutorial ground based rgdb people detection , , want publish in topic point cloud of first detected cluster. but not able extract point cloud, definition of class defined here person_cluster.h . , there public member: typedef pcl::pointcloud<pointt> pointcloud; so convert in sensor_msgs::pointcloud2 do: pcl_conversions::frompcl(clusters.at(0).pointcloud,person_msg); where person_msg pointcloud2 message, clusters vector of pcl::people::personcluster<pointt> , , want publish first point cloud because assume there 1 person in scene. the compiler gives me error: error: invalid use of ‘pcl::people::personcluster::pointcloud’ pcl_conversions::frompcl(clusters.at(0).pointcloud,person_msg); i don't have lot of knowledge c++ , not able overcome error. googling error seems appears when don't "define" class, doubt in pcl library

Ruby array of arrays find by inner array value -

i have array of arrays, looks this: a = [['1','1500','somename','somesurname'], ['2','1500','somename2','somesurname2'], ['3','1500','somename3','somesurname3'], ['4','1501','somename','somesurname'], ...] i can sub-array of array rows containing '1500' value .each function , simple if , if a.length large, it's taking time! how can rows a a[1] value, without iterating on a ? enumerable# find_all looking for: a.find_all { |el| el[1] == '1500' } # a.select same

Unable to create directory in wp-content/uploads in Wordpress -

i not able upload images media section. error message: "unable create directory wp-content/uploads/2015/05. parent directory writable server?" i tried changing permissions, gave full access 777 both uploads, , wp-content directory didn't help. i tried changing owners apache : apache /wordpress/wp-content, hasn't helped either. upload_path set wp-content/uploads in option-media.php. still not working. tried defining upload path define(uploads, 'wp-content/uploads'); no help. (server: centos) someone, please help!!! -thanks in advance. chown -r www-data:www-data /var/www

c# - How to bind data to linkbutton without interfering with other boundfields? -

Image
there few gridviews in page. first gridview editable, second not. first gridview has column has hyperlink (linkbutton). second table should loaded based on click event of above hyper link. expecting hyperlink behave button. can done? in order try, not sure start. added hyperlink first gridview column. set navigationurl doubtful me. there handful of events in hyperlink control. none of seems need. tutorial valuable. update: gird markup code <div id="schedule"> <asp:gridview id="gvschedule" runat="server" autogeneratecolumns="false" cssclass="grid" datakeynames="employee id, woy, location" showheader="false" rowstyle-cssclass="rowstyle" onrowdatabound="gvschedule_rowdatabound"> <columns> <asp:boundfield headertext="staff" datafield="e_name" sortexpression="e_name"

linux - order of 2>&1 when redirecting std error to file -

i'm seeing different formats redirecting std output file : a. command 1&2>output.txt b. command >output.txt 2>&1 c. command 2>&1>output.txt d. command &>output.txt is there difference between these? if 2>&1 placed @ end (b) , how redirect stderr of first command ? yes. order matters. > may bring idea of pointing , pointers/references , word "redirect", fd redirections more assignments. is, if exec 2>&1 1>output.txt it "assign" current "value" (the actual file opened file descriptor) of file descriptor 1 file descriptor 2 , open output.txt , assign file descriptor 1 . what won't point &2 (read & "file descriptor") &1 . won't make accessing &2 query &1 . file descriptor ever associated actual file, never file descriptor. 2>&1 associates file opened under &1 &2 . doesn't redirect &2 &1 in sense wr

GitLab-CI PHPunit Composer laravel -

i new gitlab-ci , docker, stuck getting runner run phpunit builds. following instructions here: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md however, container per instructions doesn't contain tools need. question is, configuration when registering multi-runner have runner supports phpunit, composer can test laravel builds. follow instructions register gitlab-ci-multi-runner docker executor. in .gitlab-ci.yml give appropriate image contains bare minimum requirements. else can install through command line in before_script . i'm posting sample working config you: image: tetraweb/php services: - mysql variables: mysql_database: effiocms_db mysql_user: effio_user mysql_password: testpassword with_xdebug: "1" before_script: # enable necessary php extensions - docker-php-ext-enable zip && docker-php-ext-enable mbstring && docker-php-ext-enable gd &&

android - Protractor Test fail with Appium regarding "Sign in to Chrome" page is displayed -

Image
i have problem running protractor tests on real android device. shows "sign in chrome.." (see screenshot) page , test fail due that. there possibility avoid screen?

php - Deploy web Based Application in Ubuntu -

i downloaded responsive template implemented in html & css, want deploy web based application changes in ubuntu 14.04 lamp installation. copied whole folder /var/www/html/project_name and when browse browser localhost/project_name/index.php its not working , show blank page. i new ubuntu, if 1 know solution of problem please me. thank you.. p.s : using ubuntu 14.04 lts

edismax - Solr Extended DisMax doesn't add the scores of phrase queries any more -

i upgraded solr 4.4.0 5.1.0 , noticed different behaviour extended dismax query parser when phrase query matches in several fields. with 4.4.0 , if phrase query matches in field1 , in field2, sum of both boost used boost score of document. with 5.1.0 , maximum value of matches in different fields gets used boost score of document. is there way influence behaviour?

google apps script - Try Catch don't work properly -

i,m triyng create folder if doesn't exist , i'm using try/catch few days ago has stopped working. code. lot. try { var folders = alumnospath.getfolders(); while (folders.hasnext()) { var folderp = folders.next(); var folderalumno = folderp.getname(); if (folderalumno == alumno2) { var folderid = folderp.getid(); var folder = driveapp.getfolderbyid(folderid);}}} catch (e){ var foldere = driveapp.getfolderbyid(alumnospathid).createfolder(alumno2).getid(); var folder = alumnospath.getfolderbyid(foldere);} catch (e){ var foldere = driveapp.getfolderbyid(alumnospathid).createfolder(alumno2).getid(); var folder = alumnospath.getfolderbyid(foldere);} folder.createfile(pdf); the error (translate spanish): typeerror: can't call method "createfile" undefined. the trouble script stops in catch(e) , no executes this. unless alumno2 variable of string type, line: if (folderalumno == alumno2) { will never evaluate true, , therefore not file , fold

ios - Map annotation swapping from displaying image to default pin randomly -

when map tested through simulator notice annotations display default pin instead of customized image. when go apps home menu , enter mapview again same thing happens different annotations. this code present 4 annotations out of 20 have uses same code. -(void)viewdidload { [super viewdidload]; _locationmanager = [[cllocationmanager alloc] init]; [mapview setdelegate:self]; [mapview setmaptype:mkmaptypestandard]; [mapview setzoomenabled:yes]; [mapview setscrollenabled:yes]; mkcoordinateregion test1 = { {0.0, 0.0} , {0.0, 0.0} }; test1.center.latitude = 55.705609; test1.center.longitude = 13.195707; [mapview setregion:test1 animated:yes]; testmap *ann2 = [[testmap alloc] init]; ann2.title = @"test1"; ann2.subtitle = @"klicka här för mer info"; ann2.coordinate = test1.center; ann2.name = @"test1"; [mapview addannotation:ann2]; mkcoordinateregion test2 = { {0.0, 0.0} , {0.0, 0.0} }; //ändra ner test2.center.latitude = 55.710113; test2.center.longit

python - Obtain a list containing string elements excluding elements prefixed with any other element from initial list -

i have trouble filtering list of strings. found similar question here not need. the input list is: l = ['ab', 'xc', 'abb', 'abed', 'sdfdg', 'abfdsdg', 'xccc'] and expected result ['ab', 'xc', 'sdfdg'] the order of items in result not important the filter function must fast because size of list big my current solution is l = ['ab', 'xc', 'abb', 'abed', 'sdfdg', 'abfdsdg', 'xccc'] in range(0, len(l) - 1): j in range(i + 1, len(l)): if l[j].startswith(l[i]): l[j] = l[i] else: if l[i].startswith(l[j]): l[i] = l[j] print list(set(l)) edit after multiple tests big input data, list 1500000 strings, best solution is: def filter(l): if l==[]: return [] l2=[] l2.append(l[0]) llen = len(l) k=0 itter = 0 while k<llen: addkelem =

tkinter - How to call back methods in python? -

i making project in whenever stop stopwatch, updates time listbox. can updated in self.m listbox . cannot updated topscoreslistbox . in printfunctionstop function, call stop method in class. not know how call topscoresstop in main function. the stop method , topscoresstop method same thing. different thing 1 in class , 1 in main function. so how call method topscoresstop in main function in printfunctionstop knows? class stopwatch(frame): def stop(self): """ stop stopwatch, ignore if stopped. """ tempo = self._elapsedtime - self.lapmod2 if self._running: self.after_cancel(self._timer) self._elapsedtime = time.time() - self._start self._settime(self._elapsedtime) self._running = 0 if len(self.laps) == 3: return self.laps.append(self._setlaptime(tempo)) self.m.insert(end, (st

gem - Manipulate webpage and have it send back results using ruby -

so here is: i use ruby user input, easy way..say request 2 inputs: input1 = gets.chomp input2 = gets.chomp now send information say, search engine takes these 2 options separately , search. how can this? api/gems helpful me in case? i know can take these 2 inputs , insert them url not simple because according inputs url structure not constant..(i wouldn't want use way though..) been long time since lat programmed in ruby, know how access webpages , things that, want manipulate , receive back. ideas? if talking front-end of site without api access or sophisticated js logic, use mechanize gem allows like: require 'rubygems' require 'mechanize' agent = mechanize.new page = agent.get('http://google.com/') form = page.forms.first form['field_name_1'] = input1 form['field_name_2'] = input2 page = agent.submit(form, form.buttons.first) puts page → check out official documentation more examples if going use third p

string - suffix notation in gnuplot kilo mega mili micro nano pico -

i know how use suffix notation in gnuplot axis : set ytics format "%.1s%c" howver not taken account in sprintf ... gnuplot> pr sprintf("%s", 2e+3) f_sprintf: attempt print numeric value string format so made own function : suffixnotation(x)=sprintf("%g%s",\ (x>=1e+9&&x<1e+12 ) ? x*1e-9 :\ (x>=1e+6&&x<1e+9 ) ? x*1e-6 :\ (x>=1e+3&&x<1e+6 ) ? x*1e-3 :\ (x>=1e-3&&x<1 ) ? x*1e+3 :\ (x>=1e-6&&x<1e-3 ) ? x*1e+6 :\ (x>=1e-9&&x<1e-6 ) ? x*1e+9 :\ (x>=1e-12&&x<1e-9) ? x*1e+12 : x\ ,\ (x>=1e+6&&x<1e+12 ) ? "g" :\ (x>=1e+6&&x<1e+9 ) ? "m" :\ (x>=1e+3&&x<1e+6 ) ? "k" :\ (x>=1e-3&&x<1 ) ? "u" :\ (x>=1e-6&&x<1e-3 ) ? "n" :\ (x>=1e-9&&x<1e-6 ) ? "p" :\ (x>=1e-12&&x<1e-9) ? "f" : &q

c# - How to execute asp.net button click event from JavaScript? -

i have 1 file upload control in aspx page , need upload file without clicking on button. user selects file fileupload control, file needs uploaded server. i have call codebehind method javascript, tried using $("#btnupload").click() , __dopostback('btnbulkupload', 'onclick'); result nothing. can suggest me solution? yes, got solution... had set button's visible property false that's reason not working. changed visible="false" visible="true" , it's working fine.

How to read a key value after decoding json in erlang -

here short query in erlang parsed json using ccode = jiffy:decode(<<"{\"foo\": \"bar\"}">>). it returns {[{<<"foo">>,<<"bar">>}]} now target value of 'foo' , should return 'bar' any appreciated. you can extract list of attributes of json object using pattern matching , find value key in resulting list: {attrs} = jiffy:decode(<<"{\"foo\": \"bar\"}">>), foovalue = proplists:get_value(<<"foo">>, attrs).

Simperium iOS: Issues with data retention when switching accounts or signing in to existing account -

in 1 of simperium powered apps, i'm trying implement clean experience users when signing out sync account, signing in sync account existing data, switching accounts etc. what want achieve following (suggestions welcome, if doesn't make sense): when signing out of sync account, don't want delete locally, user can continue using data (which important because syncing premium feature , user might cancel it). when creating new sync account (which doesn't contain data), want retain local data , sync new account (which makes sense if starts using app without sync , activates sync later). however, when signing in existing sync account existing data, need prevent merging hell between local , remote data (imagine switching accounts!). think overwriting local data remote data makes sense here. simperium not seem directly support approach, rather offers delete data upon sign out. while trying bend simperium needs, i'm facing 2 issues/questions: what preferred

android - FileNotFoundException for drawable in drawable-xhdpi-v4 -

we got crash log google play , seems drawable in drawable-xhdpi-v4 not found. however, didn't have drawable-xhdpi-v4 folder , have edit_bg.9.png in res/drawable-xhdpi/. found post after searching, seems not helpful , no accepted answers there. thanks advice. caused by: android.content.res.resources$notfoundexception: file res/drawable-xhdpi-v4/edit_bg.9.png drawable resource id #0x7f0200bb @ android.content.res.resources.loaddrawable(resources.java:2172) @ android.content.res.typedarray.getdrawable(typedarray.java:602) @ android.view.view.<init>(view.java:3589) @ android.widget.textview.<init>(textview.java:642) @ android.widget.edittext.<init>(edittext.java:60) @ android.widget.edittext.<init>(edittext.java:56) ... 29 more caused by: java.io.filenotfoundexception: res/drawable-xhdpi-v4/edit_bg.9.png @ android.content.res.assetmanager.opennonassetnative(native method) @ android.content.res.assetmanager.opennonasset(assetmanager.java:421) @ android.c

c# - The type cannot be used as type parameter 'T' in the generic type or method 'BaseController<T>'. There is no implicit reference -

Image
i'm trying create generic simplify codes (it's web api project), @ somehow it's ended becoming more complicated expected. i'm trying implement this: to simplify whole real code, i've written: public interface idatabasetable { } public class receiptindex: idatabasetable { } public interface ibackend<t> t: idatabasetable { } public class receipts : ibackend<receiptindex> { } public class generic<t> : synctwowayxi, ibackend<t> t:idatabasetable { } public class basecontroller<t> : apicontroller t: ibackend<idatabasetable>, new () { } all of line above created separately in own file. when try create controller inherit basecontroller public class receiptsbasecontroller : basecontroller<receipts> i error said the type 'receipts' cannot used type parameter 't' in generic type or method 'basecontroller'. there no implicit reference conversion 'receipts' 'ibackend

jquery - Bootstrap apply true full screen -

my html <div class="container-fluid"> <div class="row"> <div class="col-md-3"> <div class="left-top"><a>aanmelden</a></div> <div class="left-bottom"><a>inloggen</a></div> </div> <div class="col-md-6"> <img src="http://placehold.it/350x310" alt="" class="welcome-image"/> </div> <div class="col-md-3"> <div class="right-top"></div> <div class="right-bottom"></div> </div> </div> </div> <script> $(document).ready(function () { $('[class^=left], [class^=right]').on('click', function () { $(this).addclass('fullscreen'); }); }); </script> whenev

c# - FileStream returns Length = 0 -

i'm trying read local file , upload on ftp server. when read image file, ok, when read doc or docx file, filestream returns length = 0. here code: checked other files, appears works fine images , returns 0 other file if (!ftpclient.fileexists(filename)) { try { ftpclient.validatecertificate += (control, e) => { e.accept = true; }; const int buffer_size = 64 * 1024; // 64kb buffer byte[] buffer = new byte[buffer_size]; using (stream readstream = new filestream(tempfilepath, filemode.open, fileaccess.read)) using (stream writestream = ftpclient.openwrite(filename)) { while (readstream.position < readstream.length) { buffer.initialize(); int bytesread = readstream.read(buffer, 0, buffer_size); writestream.write(buffer, 0, bytesread); } readstream.flush(); readstream.close(); writestream.flush();

Stash out of memory -

i set max-memory 2 gigabytes in setenv.bat file still runs out of memory @ 800mb of java allocated memory. is normal? running on windows server 2012. it's not normal. stash pretty memory. might want raise support ticket at: https://support.atlassian.com/ they'll ask create heap dump can see might causes problems.

javascript - Jquery on click event is not working on dynamically added Custom tags -

this question has answer here: event binding on dynamically created elements? 18 answers jquery on click event not working on dynamically added custom tags my code $("[addtoship='yes']").on('click', function() { alert('ship added') }); href <a href="#" addtoship='yes' myval="10235"> add more ship </a> i trying using .on still it's not working $(document/commonparentselector).on('click', "[addtoship='yes']", function () { alert('ship added') });

javascript - How to interact with an element that is hidden using Selenium Webdriver? -

element properties:- <textarea id="txtsuffixtitle" class="form-control" tabindex="3" rows="2" placeholder="suffix title" name="txtsuffixtitle" maxlength="50" cols="20" style="display: none; visibility: hidden;">suffix title </textarea> selenium code:- driver.findelement(by.id("txtsuffixtitle")).clear(); driver.findelement(by.id("txtsuffixtitle")).sendkeys("mr."); error:- element must not hidden, disabled or read-only i found below solution in 1 of post. able interact element breaking ui. webelement elem = driver.findelement(by.id("txtsuffixtitle")); string js = "arguments[0].style.display='inline'; arguments[0].style.visibility='visible';"; ((javascriptexecutor) driver).executescript(js, elem); could please suggest ? can type manually due style property i.e. style="display: none; visibility:

movilizer - How to filter masterdata using more than 6 criterias -

assuming have masterdata pool containing customer data. want filter masterdata entities using querymasterdata. masterdata entity - definition - has 6 filter attributes, 3 string based , 3 numeric, can used filtering performance because values indexed. what if want filter customers in pool using more 6 criterias of type string? for instance: first name last name city country state street occupation i aware of criterias should rather predefined values in productive scenario usability reasons. let's assume 7 filter criterias treated strings. how model / structure masterdata make sure criterias operating on indexed values of masterdata, when there 3 string filters available in 1 masterdata entity? if use more 3 string filters, may split masterdata several pools. can create separate pools person details , location details or group them according preference. then, may link data between pools making use of numeric filters foreign keys. kind regards, ana

object - Android Parse.com android allow to get data from table but not for update -

package symca.gescoe.com.sampleparseapp.payment_task; import android.app.alertdialog; import android.app.dialog; import android.app.progressdialog; import android.content.context; import android.content.dialoginterface; import android.graphics.color; import android.graphics.porterduff; import android.os.bundle; import android.text.inputtype; import android.util.log; import android.view.gravity; import android.view.layoutinflater; import android.view.menu; import symca.gescoe.com.sampleparseapp.r; import android.app.activity; import android.view.view; import android.view.view.onclicklistener; import android.view.windowmanager; import android.widget.button; import android.widget.edittext; import android.widget.imageview; import android.widget.linearlayout; import android.widget.relativelayout; import android.widget.textview; import android.widget.toast; import com.parse.findcallback; import com.parse.getcallback; import com.parse.parseacl; import com.parse.parseexception; import

c# - Error: An unhandled exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll -

Image
i trying capture frames video stream , trying use aforge library purpose. when try call of api's of library project gives me above error. my research shows due using 32 bit windows dll on x64 or vice-versa.but have not been able find out aforge library package 64 bit windows. using x64 windows7. links or suggestions can me resolve error appreciated. i thank every 1 contruibution..following steps solved issue... this link worked created new solution added existing projects place appropriate config file near exe, , fill with: <?xml version="1.0"?> <configuration> <startup uselegacyv2runtimeactivationpolicy="true"> <supportedruntime version="v4.0" sku=".netframework,version=v4.0"/> </startup> </configuration> might well..

networking - Getting IP address of Android when connected to Cellular Network -

is there simple way ip address of phone when connected internet through mobile data network. getting wifi ip address using following simple technique. wifimanager wm = (wifimanager) getsystemservice(wifi_service); string ip = formatter.formatipaddress(wm.getconnectioninfo().getipaddress()); is there way similar above ip address of mobile data network. i have used following code returns mac addresses ,ip addresses of both wifi , cellular network interested in cellular ip address. string ipaddress = null; try { (enumeration<networkinterface> en = networkinterface.getnetworkinterfaces(); en.hasmoreelements();) { networkinterface intf = en.nextelement(); (enumeration<inetaddress> enumipaddr = intf.getinetaddresses(); enumipaddr.hasmoreelements();) { inetaddress inetaddress = enumipaddr.nextelement(); if

python - How to get scrapy results orderly? -

help me scrapy. code resulting output doesn't print corrected way. i tried inside loop not give correct result, anyway if found missing in there.. please tel me code: import scrapy class yelpscrapy(scrapy.spider): name = 'yelp' start_urls = ["http://www.yelp.com/search?find_desc=pet+grooming+services&find_loc=starnberg%2c+bayern",] def print_link(self, link): return link def parse(self, response): website = scrapy.selector(response) items = [] obj in website.xpath("//div[@class='main-attributes']"): item = yelpitem() # getting name item['name'] = obj.xpath("//div[@class='media-story']//h3//a/text()").extract() # getting addresss item['address'] = obj.xpath("//div[@class='secondary-attributes']//address").extract() items.append(item) return items

SAS array dimension error -

data t1; m = 4; array a1{m} _temporary_ (2, 3*1); array a2{m} _temporary_(4*.); run; error: many variables defined dimension(s) specified array tables. error 22-322: syntax error, expecting 1 of following: integer constant, *. error 202-322: option or parameter not recognized , ignored. why can't define dimension of array other variables? you cannot define dimension that, rather can use macro achieve same below %let m = 4; data t1; array a1{&m.} _temporary_ (2, 3*1); array a2{&m.} _temporary_(4*.); run;

css - How to set Outer width in jquery -

i have faced miss alignment issue in table , found reason outer width value wrong . if possible set outer width value 0. one more information must use outer width property alignment . if setting outer width instead of width . have faced on issue . have used outer width td. thanks i dont quite understand mean setting outerwidth 0. outer width width + paddings( or + margins if using outerwidth( true ) ) just set elements padding , margin 0.

class - How to space first_name + last_name C++ -

my question how can use spaces between first_name , last_name after instruct user input name. using code blocks , i'm kinda confused. in dev c++ can do cout<<first_name<<" "<<last_name; now doing practicing c++ using variables in class. here code. #include<iostream> #include<string> using namespace std; class danielclass { public: int setnamefunction(string first_name, string last_name) { cout<<"enter first name here: "; cin>>first_name; cout<<"enter last name here: "; cin>>last_name; name = first_name + last_name; } string getnamefunction() { return name; } private: string name; }; int main() { danielclass nameobject; nameobject.setnamefunction("", ""); cout<<nameobject.getnamefunction(); cout<<&

ios - Why compareDate from NSCalendar seems to need to set an UTC timeZone to work properly? -

i create 2 dates following: let date1 = stringtodate("2015-02-12 12:29:29")! let date2 = stringtodate("2015-02-11 19:18:49")! func stringtodate(var datestring: string) -> nsdate? { let dateformatter = nsdateformatter() dateformatter.dateformat = "yyyy-mm-dd hh:mm:ss" dateformatter.timezone = nstimezone(name: "utc") return dateformatter.datefromstring(datestring) } as can see, 2 date different , not on same day. to test if 2 dates on same day, use following method: func issamedaythan(date1: nsdate, date2: nsdate) -> bool { let calendar = nscalendar.currentcalendar() calendar.timezone = nstimezone(abbreviation: "gmt+10")! return calendar.comparedate(date1, todate: date2, tounitgranularity: .daycalendarunit) == .orderedsame } there don't precise timezone in calendar. local timezone of device set gmt+10. in case, issamedaythan(date1, date2) -> true if change timezone inferior or e