Posts

java - Auto Login To a Site -

i'm trying create kind of script login , click on link on site. i've included login script main site , wondering if of tell me how enter username , password code way when load site, automatically loads. or if make script work click link amazing. <table width="100%" cellpadding="0" cellspacing="0" border="0" class="skin-customlogintable"> <tr> <td class="skin-customloginleftside"> </td> <td class="skin-customloginrightside"> <div class="skin-customloginwrapper"> <div class="skin-customlogininnerwrapper"> <table cellpadding="0" cellspacing="0" class="skin-customloginformtable"> <tr> <td><label>user name</label></td> <td><label>password</la...

objective c - how to make an object move by touching it in iOS -

i newbie in objective-c , trying make simple app in when touch object move randomly while , stops. need touch again move again , stop after while. i have searched touch method , tutorials, problem don't know how start. need function move object , 1 touch it, don't know how connect them , use them. here tutorial helped me lot view of functionality , function in opposite way of app. still can not start programming on own. http://xcodenoobies.blogspot.se/2010/11/under-construction.html any appreciated, regarding how program logic , how find right methods , how find type of variables need. step 1: put code in viewdidload method, in have created uiimageview , add view randomly [self.view settag:1]; for(int i=0;i<4;i++) { int x = arc4random()%300; int y = arc4random()%400; #warning set image here uiimageview *imgview = [[uiimageview alloc] initwithimage:[uiimage imagenamed:@"someimage.png"]]; [imgview setframe:cgrectmake(x, y, 2...

javascript - Why I can't detect Media Queries in IE9 using modernizr -

i searched support of css3 media queries in browsers, , ie9+ support it, http://caniuse.com/css-mediaqueries , when use modernizr detect it, turns out, ie7-ie9 not support it, ie10 support it. : generate custom modernizr js: http://modernizr.com/download/#-mq-teststyles-load html code: below code in html head, want detect if browser support min-width media query use, if support, add support.js, if not, include nosupport.js <script src="modernizr.custom.03829.js" type="text/javascript"></script> <script> modernizr.load({ test: modernizr.mq('(min-width: 0px)'), yep: 'support.js', nope: 'nosupport.js' }); </script> in support.js: alert("support"); in nonosupport.js: alert("not support"); result: ie7-ie9 alert "not support", in ie10, alert "support". think ie9 should alert "support", right? there wrong code? another weird th...

javascript - if last li then set click event on it -

this xslt file:- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="html" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="*" mode="item"> <li onclick="final()"> <xsl:value-of select="@value" /> <xsl:apply-templates select="current()[*]" /> </li> </xsl:template> <xsl:template match="*/*/*"> <ul> <xsl:apply-templates select="*[1] | node()[current()/ancestor::*[3]]" mode="item" /> </ul> </xsl:template> </xsl:stylesheet> this xml file:- <?xml-stylesheet type="text/xsl" href="a.xsl"?> <root> <child_1 entity_id = "1" value="game" parent_id="0"> <child_2 enti...

alertdialog - In Android multiple checkboxes, checkbox Remain checked that I have selected even when close my app -

i have 3 checkboxes in alertdialog. want when click on sencond checkbox remain checked until user desn't click on other checkbox per his/her convince. here code please provide sugestions. edit: means 1 checkbox remain clicked application closed user. my code: case sync_alert: alertdialog.builder alertbuilder = new alertdialog.builder(this); alertbuilder.setmessage("synchronization"); alertbuilder.setcancelable(false); layoutinflater buildinflater = this.getlayoutinflater(); view syncview= buildinflater.inflate(r.layout.sync_layout, null); alertbuilder.setview(syncview); defaultchkbox = (checkbox)syncview.findviewbyid(r.id.defaultchkbox); after15mint = (checkbox)syncview.findviewbyid(r.id.after15mint); afternmint = (checkbox)syncview.findviewbyid(r.id.afternmint); alarms = (alarmmanager) getapplicationcontext().getsystemservice(context.alarm_service); alertbuilder.setpo...

java - How to cancel call to oracle stored procedure? -

i have java application, searches records in oracle on click of search button. calls stored procedures search data in oracle tables. search output large , takes lot of time process, want implement cancel button operation can cancelled @ time. thought of implementing separate thread in java wont solve problem because stored procedure called. how can achieve this? you should create stored procedure contains kill command cancel running store procedure , call new sp cancel button. for killing running sp refer this: how terminate oracle procedures running

karma runner - Angularjs e2e testing past/future comparisons -

i'm trying figure out if there way simple future/past comparison ex. 1) check state of list getting list length 2) perform action if success increments list 3) compare current list length past. but concepts of futures seems in way. 1 think pretty normal use case. q: how go handling past/future comparisons in angularjs scenario? it's kind of longwinded, can define custom matchers understand futures. example: angular.scenario.matcher('tobegreaterthanfuture', function(future) { return +this.actual > +future.value; }); use like: listlengthbefore = repeater('.td').count(); // stuff. listlengthafter = repeater('.td').count(); expect(listlengthafter).tobegreaterthanfuture(listlengthbefore);

actionscript 3 - FLASH/AS3: Getting error on removing child. Parameter child must be non-null -

i'm trying remove movieclip says parameter child must non-null. this script: to make in stage, use: function sayam (e:mouseevent):void{ nilai = 8; if(nilai == temp) { var ssayam:ayam_mc = new ayam_mc stage.addchild(ssayam); ssayam.x = 350.0; ssayam.y = 330.0; ssayam.width = 170.0; ssayam.height = 170.0; ssayam.instancename = "ayam"; arnam.push("ayam"); trace("arnam" +arnam); trace(ssayam.instancename); jual = jual + 4000; temp = val[len-(len-len2)] len2 = len2 + 1; } else { money = money - 4000; } } so, made 8 functions make 8 movieclips display in stage , push them array. array "arnam". and remove code: function deleteburger() { for(var i:number=arnam.length; >= 0; i--){ removechild(arnam[i]); arnam.splice(i,1); } } i've traced array , is...

c# - Entity Framework IDENTITY_INSERT ON doesn't work -

i have code supposed insert record identity insert on using (mct_db_archiveentities ent = new mct_db_archiveentities()) { ent.executestorecommand("set identity_insert [clicks] on"); ent.clicks.attach(ck); ent.clicks.context.objectstatemanager.changeobjectstate(ck, system.data.entitystate.added); ent.savechanges(); } i error. cannot insert explicit value identity column in table 'clicks' when identity_insert set off. it not supposed work. works if identity insert turned on on same connection real insert. in case 2 different connections can used. make work have maintain own db connection , pass objectcontext's constructor.

msvcrt - Why does this CMake project not set the appropriate MSVC runtime? -

Image
i'm trying understand why libmysql cmake project configured /md , /mdd flags not generate appropriate visual studio 10 project files. appropriate cmake_ macros have been configured, shown: yet generated projects still showing unexpected runtime library settings: is cmake gui reason unreliable, or possible option overriding crt settings? i found cmake project libmysql has os-specific cmake file windows forces static runtimes used when generating visual studio solution: 75 # force static runtime libraries 83 foreach(flag 84 cmake_c_flags_release cmake_c_flags_relwithdebinfo 85 cmake_c_flags_debug cmake_c_flags_debug_init 86 cmake_cxx_flags_release cmake_cxx_flags_relwithdebinfo 87 cmake_cxx_flags_debug cmake_cxx_flags_debug_init) 88 string(replace "/md" "/mt" "${flag}" "${${flag}}") 89 set("${flag}" "${${flag}} /ehsc") 98 endforeach()

ios - How to call Magento API Login Method in Iphone -

can body tell how call login method of megnto api in iphone have done in andriod using xmlrpc library // ... string sessionid = ""; //hashmap<string , string> params = new hashmap</string><string , string>(); //params.put("apiuser", "developer"); //params.put("apikey", "magento123"); xmlrpcclient client = new xmlrpcclient("http://some-site.com/index.php/api/xmlrpc/"); try { /* sessionid = (string)client.callex("login", new object[]{params}); cause debug/my_xmlrpcexception_msg(196): xmlrpc fault: calling parameters not match signature 1 */ sessionid = (string)client.call("login", "developer", "magento123"); log.d("my_xmlrpc_success_session_id", sessionid); } catch (xmlrpcexception e) { log.d("my_xmlrpcexception_msg", e.getmessage()); } i newbie iphone how can in iphone plz body can tell , library or...

AngularJS: Deleting from scope without hardociding -

i have array of items bound <li> elements in <ul> angularjs. want able click "remove item" next each of them , have item removed. this answer on stackoverflow allows that, because name of array elements being deleted hardcoded not usable across lists. you can see example here on jsfiddle set up , if try clicking "remove" next game, student removed, not game. passing this button gives me access angular $scope @ point, don't know how cleanly remove item parent array. i have button defined ng-click="remove('games',this)" , have function this: $scope.remove = function (arrayname, scope) { scope.$parent[arrayname].splice(scope.$index,1); } ( like jsfiddle ) naming parent array while i'm inside seems way break functionality when edit code in year. any ideas? i did not why trying pass this .. never need deal this in angular. ( , think 1 of strengths! ). here fiddle solves problem in different way. ...

javascript - How to get a textarea element in jquery when the name is in a variable -

i trying populate multiple text areas single select button . application cant use else (esp id's) textareas dynamically created , named in order tx1 , tx2 ... txn. my code .... var count = 13; for(var i=1;i<count;i++ ) { var txtname = 'tx' + i; var txt1 = $('textarea[name=txtname]'); var seltxt1 = $(this).find("option:selected").attr('text'); ..... ..... but var txt1 = $('textarea[name=txtname]'); not work !!! how provide dynamically created name of txtaarea var txt1 . like - $("textarea[name="+txtname+"]");