Posts

Showing posts from September, 2010

objective c - Determine when UITableViewCell is deallocated -

i using core data in app along nsfetchedresultscontroller populate table. database has 40k+ entries table rather long. each table cell has thumbnail image loaded web using sdwebimage . works great if scroll slowly, if begin scroll fast within couple of seconds crash. nszombies isn't showing useful. i'm guessing has sdwebimage , loading web. way sdwebimage works loading image in background setting downloaded image after completes downloading (wordy). thought cells being deallocated uitableview , sdwebimage tries set image on deallocated cell. if can determine when uitableviewcell going deallocated can stop sdwebimage downloading process , fix issue. i've tried add - (void)dealloc { nslog(@"dealloc"); } to catch when cell going deallocated never anything. edit have -(void)dealloc method in subclass uitableviewcell. edit here where/how create cell - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpa

java - Jtable cellRenderer change background of row -

i have been tryng time , looking on internet find solution have failed. i'm trying change row background of jtable dynamically. have created arraylist keeps numbers of selected rows (adding them everytime user press alt+click on cell) , in own tablecellrenderer have added for(integer c: leftselectedcells){ if(c.equals(row)){comp.setforeground(color.red); } else { comp.setforeground(color.black);} } it working, few cells, or time after selected columns oryginal color, have checked, ints still in array thats not problem, idea might cause issue? as suggested in comments above, need provide custom renderer required columns. alternative, can override jtable.preparerenderer set background according list of affected rows. table row rendering @camickr explains approach. below example highlights rows clicked mouse + alt key. simplicity, list of highlighted rows kept client property. import java.awt.color; import java.awt.component; import java.awt.event.mouseadapter;

mips associative floating point -

okay testing have code .data # shows can use .word , directly encode value in hex # if choose num1: .word 0x3f800000 num2: .float 1234.567 num3: .float 45.67834 num4: .float 0.0004 result: .word 0 string: .asciiz "\n" .text main: la $t0, num1 lwc1 $f2, 4($t0) lwc1 $f4, 8($t0) lwc1 $f6, 12($t0) # print out values of summands li $v0, 2 mov.s $f12, $f2 syscall li $v0, 4 la $a0, string syscall li $v0, 2 mov.s $f12, $f4 syscall li $v0, 4 la $a0, string syscall li $v0, 4 la $a0, string syscall # actual addition add.s $f12, $f2, $f6 add.s $f12, $f12, $f4 # transfer value floating point reg integer reg swc1 $f12, 8($t0) lw $s0, 8($t0) # @ point, $f12 holds sum, , $s0 holds sum can # read in hexadecimal li $v0, 2 syscall li $v0, 4 la $a0, string syscall # jr crashes mars # jr $ra i have this add.s

ruby on rails - How to handle nested resources/routes correctly? -

i trying build rails app modded michael hartl's railstutorial . code located on github . i using following nested resources: resources :users resources :scaffolds end but getting following error: actionview::template::error (undefined method `scaffolds_path' #<# <class:0x007f87848019d0>:0x007f8782651948>): 4: 5: <div class="row"> 6: <div class="span6 offset3"> 7: <%= form_for(@scaffold) |f| %> 8: <%= render 'shared/error_messages', object: f.object %> 9: <%= f.text_field :name, placeholder: "scaffold name" %> 10: <%= f.text_area :description, placeholder: "description" %> app/views/scaffolds/new.html.erb:7:in `_app_views_scaffolds_new_html_erb___1119296061714080468_70109999031900' i puzzled why looking scaffolds_path , not user_scaffolds_path ? the @scaffold created in app/controller/scaffolds_controller.rb: def new @sc

error 404 on web.py subapps. How to handle urls? -

last time wrote answer fast , efficient, here go again. i got these 3 files, 2 .py , html. thing reason error 404. it's url handing issue. here code # encoding: utf-8 import web import os import gettext import signup import verify_email urls = ( "/", 'index', "/sign-up", signup.app_signup, "/verify_email", verify_email.app_verify_email ) # internacionalización: current_directory = os.path.abspath(os.path.dirname(__file__)) locales_directory = current_directory + '/i18n' gettext.install('messages', locales_directory, unicode = true) gettext.translation('messages', locales_directory, languages = ['es']).install(true) web.config.debug = false app = web.application(urls, locals()) session = web.session.session(app, web.session.diskstore('sessions')) db = web.database(dbn='postgres', user='zoosalud', pw='pbf8zcxd4gzumhrxd8asjfhn', db='zo

iphone - Can't update an NSMutableDictionary value from within a for-in loop? -

i'm having weird issue updating nsmutabledictionary value. i'm running for-in loop, retrieved fine, , math fine. the problem lies when try update dictionary setvalue: forkey: method. for(nsstring *key in self.planetdictionary){ if(![key isequaltostring:planet]){ * * * //do math , stuff, create nsnumber: nsnumber *update = [nsnumber numberwithfloat:updatedprobability]; //problem code, exc_bad_access here: [self.planetdictionary setvalue:update forkey:key]; } } i exc_bad_access crashes. can confirm else fine, single line try update value. what's going on? thanks you're not allowed mutate object you're fast enumerating. crash every time. work around, can make copy first: nsdictionary *dictionary = [self.planetdictionary copy]; (nsstring *key in dictionary) { if (![key isequaltostring:planet]) { nsnumber *update = [nsnumber numberw

android - How to put an image in an ImageView from the Activity not the XML file? -

what trying put multiple images without out of memory problem i'm using method putimage() , trying put image in imageview activity not xml file here xml code <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" android:alwaysdrawnwithcache="false"> <imageview android:id="@+id/imageview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignparenttop="true" /> </relativelayout> and here activity public class recipebanana extends activity { imageview v; button button; context localcontext = null; public static drawable getassetimage(context context, string filename) throws ioexception { assetmanager assets

sql server 2008 - Joining sql statement in store procedure -

i trying join these 2 statements in stored procedure. how 1 table, can use groupby column. select tablea.name, tableb.occupation, 'group1' [groupby] tablea, tableb tablea.id = 1 select tablea.name, tableb.occupation, 'group2' [groupby] tablea, tableb tableb.id = 10 my result should this name occupation groupby david doctor group1 john pilot group1 dwayne wrestler group2 axel rockstar group2 update table id name occupation 1 david doctor 1 john pilot 2 mike clerk table b id name occupation 3 wayne writer 4 shane publisher 10 dwayne wrestler 10 axel rockstar it seems can use union all result: select tablea.name, tablea.occupation, 'group1' [groupby] tablea tablea.id = 1 union select tableb.name, tableb.occupation, 'group2' [groupby] tableb tableb.id = 10 see sql fiddle demo . union all return rows between 2 queri

php - Jcrop have problems with large size images -

translated google i'm running achieve upload form in php , jquery , fine except 1 thing think nonsense still can not figure out. let me explain: in practice when run upload of image, printed screen temporary preview go there cut liking 's image , save thumbnail. preview however, if insert jpg high resolution me see life-size, large page. code follows: index.php <?php function uploadimagefile() { // note: gd library required function if ($_server['request_method'] == 'post') { $iwidth = $iheight = 100; // desired image result dimensions $ijpgquality = 90; if ($_files) { // if no errors , size less 250kb if (! $_files['image_file']['error'] && $_files['image_file']['size'] < 55555250 * 1024) { if (is_uploaded_file($_files['image_file']['tmp_name'])) { // new unique filename $stempfilename = 'cache/' . md5(time()

javascript - Trying to use Optimist API help() to print usage() -

i'm new optimist , i've done bit of googling , try outs, still can't find elegant way add --help option. i see help() option on documentation. expect following work: var argv = require('optimist') .usage('some usage') .alias('l', 'local') .describe('l', 'uses local repo') .help() .argv so on shell if typed ./myscript --help show usage. know can inspect argv for -h or --help option , console(argv.usage) print usage, trying use api instead of hacking it. is valid question? help. bitoiu when want able display usage, want keep pointer object returned require(). because object returned .argv plain object, there no way access help() or showhelp() functions. below contrived example think point in right direction you're trying do. var optimist = require('optimist') .usage('$0: example on how use optimist') .describe('h', 'display usage') .describ

segmentation fault - Why does Lazarus give a 'SigSegV' error? (HydraDM, HydraDM64) -

i created empty lazarus project , tried compile test settings of compiler on windows 7 pc. though fresh installation without specific settings, debugger gave me 'external error: sigsegv', when closed binary in lazarus environment. after thrown assembly screen. this error occured, when using lazarus. launching application under windows did not produce errors or lingering applications. after research on internet, found out, processes 'hydradm.exe' , 'hydradm64.exe' responsible error. after killing both processes, program ran fine in lazarus.

git commit - How to remove history of deleted git subtree folder? -

i added git repository using git-subtree. problem did hard reset before repository added git-subtree. commit history still in repository it's disconnected master. any idea how remove it? tried git rm --cached no luck. to remove right away commits unreachable, case of subtree commits, can use following commands: git reflog expire --all --expire-unreachable=0 git repack -a -d git prune git gc not collect unreachable commits, since these (in default configuration) need first expire , not packed other reachable commits. happens on own after while, or can force commands above. also take consideration reference subtree commits prevent them being collected, includes braches, tags, , reflog references. make sure have not dangling references these commits. here more detailed question on how dispose unreachable commits: garbage collect commits in git

osx - Core Data: "-add<RelationshipKey>Object:" not called -

let's presume have entity bikerider relationship property called helmets . i have array controller bound app's managed object context, entity set bikerider . there's tableview lists bike riders. then, have second array controller, bound app's managed object context, entity set helmet . additionally, it's bound bikeriderarraycontroller.selection . there's second tableview lists helmets selected bike rider. i have 2 buttons adding , removing helmets. setup works apparently flawlessly. except, of course 1 small thing: looks -addhelmetsobject: , -removehelmetsobject: , -addhelmets: , -removehelmets: never called. means code setting observation of each helmet's color property never gets called. what missing? isn't overriding addhelmets: et al (with proper willchangevalueforkey: et al notifications) right way notified of additions? do have to [self observevalueforkey:@"helmets". . .] , [oldvalue minusset:newvalue] , vice ver

visual c++ - Access Violation exception when calling mingw dll from msvc -

so having trouble adding c++ dll compiled in mingw msvc project. have fixed issue linking people seem have, when call function in dll have added "access violation reading location 0x00000014" error, breaks on operator new method in new.cpp (in visual studio 2010). have read there differences apart memory management, , wondering if might source of troubles. the specfic dll i'm trying build , run cvblobs, available here - https://code.google.com/p/cvblob/ , reason unknown me many times faster when compiled mingw. i'm pretty new these things, wondering if might happing mingw dll calling msvc new() method? make sense? have looked on mingw site, while has been useful getting me point, doesn't seem address problem. please let me know if theres else me provide. edit: have included specific problematic code, visual studio compiled code, in hope might lend bit of clarity. //grey greyscale image, thresh image thresholded cvthreshold(grey,thresh,0,255,cv

deployment - How to deploy a portable C++ application? -

i have written portable c++ application using qt libraries. means cannot use mt flag compiling without risking memory issues. this leaves me 2 options: 1) deploy portable application installer. 2) package c++ dependencies within same folder or use private assemblies. both 1 , 2 defeat idea of portable software, thinking of third option: 3) use iexpress drop c++ dependencies before launching application. on exit, delete c++ dependencies. unfortunately, option 3 has received flak stackoverflow members. dislike option 2 leaves me option 1. can see option 1 doable if use portable installer. is there such thing portable installer? essentially, want installer check see if needed dependencies installed before running application (just regular installer would) , if are, continue running application. otherwise, give message box user download providing link url. aware can write own installer can in c++ wondering if there installers offer specific functionality. http://

arrays - C: Roguelike map is screwy -

i'm making roguelike game in c, , can't character move in way want to. made 2d char array character on @ point (x, y), drew array, , changed x , y values , redrew array upon input of direction in go (kind of zork graphics). isn't working out how planned. code explain more can: /* game.h (header file globals) */ #define game_h char character = '@'; //char monster = '&'; int x = 2; int y = 2; /* beginning floor (will not implemented, testing movement) */ char floor[10][6] = { /* 219 = filled block, 32 = space */ 219, 219, 219, 219, 219, 219, 219, 219, 219, '\n', 219, 32, 32, 32, 32, 32, 32, 32, 219, '\n', 219, 32, 32, 32, 32, 32, 32, 32, 219, '\n', 219, 32, 32, 32, 32, 32, 32, 32, 219, '\n', 219, 219, 219, 219, 219, 219, 219, 219, 219, '\n'}; /* game.c (main file) */ #include <stdio.h> #include "game.h" int main(void){

ios - How Do we recall PickView's didSelectRow after choosing a segment? -

i have used segmented control user choose between 2 type of results after select row in pickerview. however, when choose row in pickerview shows result of selected segment, select segment doesn't until reselect row again. here code: - (void)pickerview:(uipickerview *)thepickerview didselectrow:(nsinteger)row incomponent:(nsinteger)component { i=row; switch (i) { case 0: case 1 if(_segment.selectedsegmentindex == 1){ [self fquarter]; [self tquarter]; [self ten]; [self twenty]; [self fourty]; [self fifty]; nslog(@"audio 10 mins"); } if(_segment.selectedsegmentindex == 0){ [self sfquarter]; [self stquarter]; [self sten]; [self stwenty]; [self sfourty]; [self sfifty]; nslog(@"visual 10 mins"); } and it's every case, did miss? i think need call method has [self fquarter

spring - Hibernate Mysql mapping relationship -

i'm not sure if possible in spring 3 framework using hibernate , mysql appreciate help. have 2 classes - employee , examiner. examiner employee , employee examiner. @ same time each examiner can examine 1 or more employees , employee can have 1 examiner. basically want know if possible show inheritance between employee , examiner, , @ same time map unidirectional 1 many examiner employee? what have far - examiner table inheritance constraint: create table `examiner` ( `employee_id` varchar(255) not null, `employee_name` varchar(255) not null, primary key (`enployee_id`), foreign key (`employee_id`) references `employee` (`employee_id`)): the employee table: create table `employee` ( `employee_id` varchar(255) not null, `employee_name` varchar(255) default null, primary key (`employee_id`)): i thinking of join table showing 1 many behaviour getting compsite key table not possible have primarykeyjoin column. i appreciate in pulling have been stumped days.

Change variable type mysql with existing data -

hi i've got variable 'text' within mysql database gathers status update. believe variable has limit of 200? is set? if variable suitable both quick 150 character updates long 1500 word article if user wanted elaborate? how change within phpmyadmin desired new variable if data present within present form? http://dev.mysql.com/doc/refman/5.6/en/string-type-overview.html varchar a variable-length string. m represents maximum column length in characters. range of m 0 65,535. text a text column maximum length of 65,535 (216 – 1) characters. i thinking both varchar(1500) , text(1500) ok you. how change within phpmyadmin desired new variable if data present within present form? to change data type of column, use sql, work in tools. alter table `tablename` change `colname` varchar( 1500 );

android - Cant get Geopoints to add to google map due to; Couldn't get connection factory client -

i getting error while try plot multiple geopoint locations onto google map. reading latitude , longitude mysql database through php , json. have looked @ main examples, such couldn't connection factory client , couldn't connection factory client - fighting google maps , android mapactivity : couldn't connection factory client . i can confirm not invalid api key have generated 2 different keys , returned same error. not api level problem either, tried run application on api level 17 , on level 8 , still no joy. when run code displays map no problem , gets exception toast message of "error displaying contents" here mapview.java code: import java.util.arraylist; import java.util.list; import org.apache.http.httpentity; import org.apache.http.httpresponse; import org.apache.http.namevaluepair; import org.apache.http.client.httpclient; import org.apache.http.client.entity.urlencodedformentity; import org.apache.http.client.methods.httppost; import org.apache.h

.net - CQRS Matching Events and Commands -

i'm getting started cqrs , i'm finding event class definitions match command definitions 1 1. aside obvious code repetition, i'm trying figure out i'm doing wrong. there cases events don't match commands....but not many. take simple cud scenario: command classes: createpost updatepost deletepost event classes: createdpost updatedpost deletedpost any advice on this? i'm using event store, if makes difference. thanks. you wouldn't use cqrs crud scenarios. there way simpler tools , patterns create crudy applications. cqrs brings many advantages behavior-rich scenarios, verbs not create, read, update, delete , rather resemble real behavior. promoteemployee or blacklistvendor . once start modelling behavior-rich domain, there might still many corelating commands/events - isn't bad thing -, find commands , resulting events can different both in size (data contained) , in numbers.

Facebook App without owner -

suddenly couldn't find facebook app in developer apps section, used 'app access token' app roles through facebook graph api surprise app has no owner, think got 'app access token' , removed admins app, problem [my facebook app has no owner]. ideas ? facebook applications api this graph api bug, because ' must specify @ least 1 developer has administrator permission. ' error dialog pop if delete last admin(you) on https://developers.facebook.com/apps/app_id/roles . report bug on https://developers.facebook.com/bugs , , ask them how contact recover apps.

jQuery Ajax not passing variable -

i'm trying pass data via ajax function can unset $_session value , not working. jquery part works , "removes" <div> page properly. however, ajax in background not working. added javascript alert testing , not fire. jquery code: //this function "removes" individual order item in basket $("#basketitemswrap").on("click", "li img.delete", function(event) { var productidvalsplitter = (this.id).split("_"); var productidval = productidvalsplitter[1]; $("#notificationsloader").show(); $.ajax({ type: "post", url: "includes/ajax/functions.php", data: { productid: productidval, action: "deletefrombasket"}, success: function(theresponse) { $("#order_" + productidval).hide("slow", function() { $(this).remove(); calc(); });

php - How do I rewrite all variables in $_REQUEST? -

i wondering if there quick way loop through $_request , change submitted variables running them through function. for example, given $_request['a'] value stuff , $_request['b'] value more stuff . want rewrite entire $_request[] array such value of $_request['a'] became myfunction('stuff') , value of $_request['b'] became myfunction('more stuff') . not know name of of each of elements passed $_request. you can use array_walk function , pass array. example be: <?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function test_alter(&$item1, $key, $prefix) { $item1 = "$prefix: $item1"; } function test_print($item2, $key) { echo "$key. $item2<br />\n"; } echo "before ...:\n"; array_walk($fruits, 'test_print'); array_walk($fruits

jax ws - Creating JAX-WS Web Service with POJO business objects project -

i have service writing use pojo's kind of act go between stateless session bean , java bean webservice in addition jpa project. however, whenever attempt generate jax-ws service via wizard, error tells me business objects aren't in build path of new webservices project. wouldn't be, because haven't built project yet. question how can wizard put pojo's in build path don't exception?

c++ - Linking zlib in Visual Studio 2012 -

i have c++ program compiled , ran fine on linux trying compile on windows machine in visual studio. main problem i'm facing following error message: error lnk2019: unresolved external symbol _gzread referenced in function i have downloaded zlib library , attempted link project, apparently unsuccessfully. i'd appreciate clear instructions on how link project. less assume in instructions, better, i'm relatively new visual studio. found solution. though i'm working on 64-bit machine, vs compiling in 32-bit mode. used 32-bit version of zlibwapi instead of 64-bit version , worked.

Simple regex help in coldfusion -

i have string wish remove characters based on underscores in string. instance. i wish change 2_master bedroom_cfm to master bedroom or 2734923ie_bedroom 2_cfm to bedroom 2 any recomendations on how coldfusion? coldfusion has gettoken() function, makes manipulating string delimiter (virtually delimiter) easy. assuming each string you're looking parse 2 sets of strings output master bedroom <cfset string1 = '2_master bedroom_cfm'> <cfset firstword = listfirst(string1,' ')> <cfset firstword = gettoken(firstword,2,'_')> <cfset secondword = listlast(string1,' ')> <cfset secondword = gettoken(secondword,1,'_')> <cfoutput> #firstword# #secondword# </cfoutput> could simplify down just <cfset string1 = '2_master bedroom_cfm'> <cfoutput> #gettoken(listfirst(string1,' '),2,'_')# #gettoken(listlast(string1,' '),1,'_')#

How to make my mysql queries for showing friends feeds? -

here table structure.(fun_friends) id user_id,friend_id,status,createdat,updatedat 1 1 2 1 123456 125461 2 1 3 1 454545 448788 3 2 4 1 565659 898889 4 1 5 1 877878 878788 here table structure of user_uploads id user_id parent_id category_id title slug tags description video_type source video_link video_thumb 1 2 1 2 fun fun ['4','5'] coolvid 1 ytu link thumb i need show latest upload of friends can tell me how can join tables together? tried with select * fun_friends (user_id= '".$_session['user_row_id']."' , `status` =1) or (friend_id= '".$_session['user_row_id']."' , `status` =1) and showing friends of logged-in user how using union friends user , wrapping inside subquery later join on other tabel, select usr.* user

linux - How can I sort a directory by creation date in BASH? -

i'm trying create simple script list 16 recent folders created in directory on nas machine way display recent movies added collection. the script using @ moment is: #!/bin/bash rm -f /volume1/new-movies/* ifs=$'\x0a' fresh=$(ls -1ct /volume1/movies | head -16) folder in $fresh file=$(find "/volume1/movies/$folder" -maxdepth 1 -type f) movie=$(basename "$file") ln -s "$file" "/volume1/new-movies/$movie" done ls -1 /volume1/new-movies which ok (the movies folder ever contain folders). problem sorted file/folders modification time rather creation time. the filesystem ext4 , should support birth time have had no luck accessing it. scott@pandora scripts $ stat /volume1/movies/example/ file: '/volume1/movies/example/' size: 4096 blocks: 8 io block: 4096 directory device: 902h/2306d inode: 373800961 links: 2 access: (0755/drwxr-xr-x) uid: ( 1028/ scott) gid: ( 100/

Android game location on screen size -

right game using direct x , y values. realized s3 scaling images double size along other size inconsistencies between devices. read around , learned bit android dpi , scaling , stuff. i'm wondering whats correct way locations , stuff takes account different screen sizes. i'm thinking can done setting target dimension , scaling positional values according ratio of target dimension actual screen size. i read somewhere can draw onto buffer , display buffer stretched screensize, method android's auto resizing affect drawn bitmaps? thanks the idea use aspect ratio, android auto resizing benefit. every android screen has own aspect ratio, game should use aspect ratio , fill blackborder ever there need fill space on screen. use appropriate root layout fitting attributes. android resizes drawables automatically dont fit. if keep 1 set of drawables, resizing work android increases , uses bitmap's internally resize. more bitmaps more memory utilization, more

c++ - Create GUI with "Select file" dialog in cpp, OpenCV -

is there way enable user select file manually using gui in cpp console application opencv? i've made research found no solution such trivial task far... thanks in advance, jp for this, have add available gui library , handle gui part keeping image processing part opnecv. ( example, can try qt )

Adobe Update framework for Flex Mobile does not work on desktop. Gives Error 1009 -

following output on console: [swf] autoupdate.swf - 3,204,024 bytes after decompression private function onerror(event:errorevent):void [errorevent type="error" bubbles=false cancelable=false eventphase=2 text="unhandled exception typeerror: error #1009: cannot access property or method of null object reference." errorid=1009] my code in application create event (s:viewnavigatorapplication) protected function viewnavigatorapplication1_creationcompletehandler(event:flexevent):void { setapplicationversion(); appupdater.delay = 1; appupdater.isdownloadprogressvisible = true; appupdater.isdownloadupdatevisible = true appupdater.isinstallupdatevisible = true; appupdater.isfileupdatevisible = true; appupdater.updateurl = "http://localhost/updater/update.xml"; appupdater.ischeckforupdatevisible = false; // sajjad false appupdater.addeventlistener(updateevent.initialized, onupdate); appupdater.addeve

php - how to display data in format using javascript extract from mysql? -

this render data in view when extract database when "exception" comes want show in new line. want display them in proper manner. the requirements of chapter apply following: (1) new buildings or portions thereof used health care occupancies (see 1.4.1) (2) additions made to, or used as, health care occupancy (see 4.6.6 , 18.1.1.4) exception: requirement of 18.1.1.1.1 shall not apply additions classified occupancies other health care separated health care occupancy in accordance 18.1.2.1(2) , conform requirements specific occupancy in accordance chapters 12 through 17 , chapters 20 through 42, appropriate.(3) alterations, modernizations, or renovations of existing health care occupancies (see 4.6.7 , 18.1.1.4) (4) existing buildings or portions thereof upon change of occupancy health care occupancy (see 4.6.11) exception*: facilities authority having jurisdiction has determined equivalent safety has been provided in accordance section 1.5. i want display in following

CSS selector is not finding element in selenium grid -

i trying find submit element. html structure below. <div> <span class="combutton"><a href="javascript:void(0);">submit</a></span> </div> <div> <span class="combutton"><a href="#cancel">cancel</a></span> </div> in browser using firebug tried $('div .combutton')[0].click() which clicks on submit perfectly. using selenium driver element not found. please tell me how using driver.findelement(by.css("cssselectorstring")) what did in firebug shouldn't have effect since it's clicking on span , not a inside it. this should work, unless omitted parts of markup otherwise prevent it: driver.findelement(by.cssselector("div:first-child .combutton a")).click();

Android In-app Currency -

i have started working on android project , wondering if there pre-exsiting way of implementing in app currency e.g coins or diamonds because wanted allow user use features of app depending on amount or value of the currency user has.such enabling or disabling buttons.from have learned far use new database , store data value in file there i'm not sure have come here asked because have searched internet , have had no luck in finding way , in advanced. you can try library , guys did great work there.

vb.net - Code to track the no of data already entered -

i have form want enter sr. nos machines.it have combo box have choose invoice no saved in table along corresponding qty of machines. when entering machine details should me "enter sr no. x'th/y'th machine y total qty saved in db , x no. of sr no. have saved+1 " it should allow me save no. where.. mean in variable if pause work in between , after word if continue should me "enter detail x'th/y'th" not "1'st/y'th" i using code: private sub get_qty() dim qtysql string = "select * invoice1 chalan_no='" & cmbchal_no.text & "'" cnnoledb.open() dim cmd oledb.oledbcommand = new oledb.oledbcommand(qtysql, cnnoledb) dim dr oledb.oledbdatareader = cmd.executereader if dr.read = true qnty = dr("qty") end if cnnoledb.close() end sub private sub srno_enter() dim nosql string = "select count(sr_no) vendor_machine group by(chalan_no) having

javascript - where to keep the database in a phonegap application -

i new phone gap domain.i have done small application in android.i thought of implementing in phone gap , see how works? i have used static database in android project.i want use same phone gap project? my big doubt keep database , how access them? for example..in android create db methods...and store want in array list? , access them when want? example instance name = db.arraylistname(id); column name = instance name.get(0).get("column name"); other doubt images.what resolution images(hdpi/mdpi/ldpi/xhdpi) should use in www/img/ folder? which language better use in phone gap jquery or java script? i have used jquery + jquery mobile, , they've worked charmingly. jquery mobile has documentation using phonegap, can found @ http://view.jquerymobile.com/1.3.0/docs/faq/how-configure-phonegap-cordova.php . i've used ajax access external databases, can't offer advice on local storage, question on has marked answer looks worked them: best database

android - How we get the text of a texview to be justified dynamically -

in application, have textview many lines beside of product, need data proper appearance.is possible have justified alignment dynamically? android not supports full justification but check answer of link , link .

c# - How to scroll a usercontrol popup when focused virtual keyboard -

in windows 8 application, need collect user details. using user control inside popup. in simulator, when open virtual keyboard popup doesn't scrolling. how scroll popup when open virtual keyboard. http://tinypic.com/view.php?pic=begdh4&s=6 thanks in advance. the blog post handling virtual keyboard should answer question. can use margins, rendertransform, canvas.top, or other layout mechanism push popup wherever want it.

c# - Using Response.Write and Response.Redirect at the same time -

below asp.net mvc code, public void index() { response.write("hey"); response.redirect("https://www.google.com"); } or public void index() { response.redirect("https://www.google.com"); response.write("hey"); } here, redirecting working not write(). why redirect being given preference? mean why 302 , why not 200 in http response. note: not addressing real time scenario. have curiosity know reason or underlying behavior. respose.write working when execute redirect server sends response headers: http/1.1 302 object moved server: microsoft-iis/5.0 location: somewhere/newlocation.aspx the browser initiates request (assuming supports redirects) somewhere/newlocation.aspx loading contents in browser. anyway, if response stream buffered ("hey") overwriting response response.redirect.

c# - DataView sort method - which sorting algorithm is used? -

i using vs2012, .net framework 4.5. need know sorting algorithm used in dataview.sort? my code: var table = new datatable(); table.columns.add("word"); table.defaultview.sort = "word";//after row, defaultdataview sorted so sorting algorithm used here? the sort method in dataview implements quicksort algorithm . chooses arbitrary midpoint, places values lower midpoint's left , higher values right. applies recursively left , right sections. recurse down sections cannot divided smaller sections (i.e., when section consists of single array member), @ point sort has completed. using big-o notation, can algorithm executes in o(n log n) time, efficient can expect sorting algorithm. long each iteration of sort divides set of indices 2 equal parts, dealing logarithm of base 2 prove have instrument system.data code , check run-time performance testing tool. update: you take @ reflector utility , follow post...its explained here dataview sor

webserver - why g-wan loops on loading handler scripts and csp script each day at midnight? -

i have strange behavior on g-wan server: each day @ midnight g-wan loops on loading scripts. see in gwan.log: [tue apr 09 00:00:00 2013 gmt] memory footprint: 1.47 mib. [tue apr 09 00:00:00 2013 gmt] host /var/www/gwan/0.0.0.0_8082/#0.0.0.0 [tue apr 09 00:00:00 2013 gmt] log files enabled [tue apr 09 00:00:00 2013 gmt] loaded main.c 39.13 kib md5:15795d7c-42184ef2-c8075784-a3aa84aa [tue apr 09 00:00:00 2013 gmt] loaded process_kv.c 44.44 kib md5:349b8978-bbebb4eb-120c6f1a-7d06f98e [tue apr 09 00:00:00 2013 gmt] loaded connection handler main.c 18.71 kib md5:f624bc05-f51507c3-61b20c9c-ecfe9e19 [tue apr 09 00:00:00 2013 gmt] host /var/www/gwan/0.0.0.0_8083/#0.0.0.0 [tue apr 09 00:00:00 2013 gmt] log files enabled [tue apr 09 00:00:00 2013 gmt] loaded main.c 39.13 kib md5:15795d7c-42184ef2-c8075784-a3aa84aa [tue apr 09 00:00:00 2013 gmt] loaded process_kv.c 44.44 kib md5:349b8978-bbebb