Posts

Showing posts from July, 2011

Java: Eclipse: Cannot Find Main Class -

i had project compiling , running fine. had exported build.xml file without issue. however, today, clicked project --> clean... , , project no longer run. raises error: error: not find or load main class com.bar.foo there way can undo this? the answer no, cannot "undo" this. can fix building project, making sure project/class exists , contains public static void main(string ... args) method.

javascript - SetInterval/SetTimeout halted after sleep -

the refresh cycle of script either interval or timeout firing arbitrarily after coming sleep. how fix this? consider debug app using $.ajaxsetup - need discover error code , implement routine re-gain session! $.ajaxsetup({ error: function(e, x, settings, exception) { console.warn(e, 'e'); console.warn(x, 'x'); console.warn(settings, 'settings'); console.warn(exception, 'exception'); } });

jquery - Cross fading images javascript -

i have 1 image: clown%20fish onmouseover have show image: image.jpeg that on image: energy.jpeg (show webkit-transition: opacity 1s ease-in-out property) i got first code form here : http://css3.bradshawenterprises.com/cfimg/#comments dose not works... this live demo: http://liveweave.com/6egbyh here code: <!doctype html> <html> <head> <style> #cfnormal { position:relative; height:281px; width:450px; margin:0 auto; } #cf { position:relative; height:10px; width:450px; margin:0 auto; } #cf img { position:absolute; left:0; width:450px; -webkit-transition: opacity 1s ease-in-out; -moz-transition: opacity 1s ease-in-out; -o-transition: opacity 1s ease-in-out; transition: opacity 1s ease-in-out; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> function change(x) { var element =

python - Login credentials not working with Gmail SMTP -

Image
i attempting send email in python, through gmail. here code: import smtplib fromaddr = '......................' toaddrs = '......................' msg = 'spam email test' username = '.......' password = '.......' server = smtplib.smtp('smtp.gmail.com', 587) server.ehlo() server.starttls() server.login(username, password) server.sendmail(fromaddr, toaddrs, msg) server.quit() i error: traceback (most recent call last): file "email_send.py", line 18, in <module> server.login(username, password) file "c:\.....\python\lib\smtplib.py", line 633 , in login raise smtpauthenticationerror(code, resp) smtplib.smtpauthenticationerror: (535, b'5.7.8 username , password not accepte d. learn more at\n5.7.8 http://support.google.com/mail/bin/answer.py?answer=1425 7\n5.7.8 {badcredentials} s10sm9426107qam.7 - gsmtp') this seems problem login. login details correct, except 1 thing

ajax - JavaScript call stack -

i'm new web development , have been reading on ajax can update map live new data. i'm reading ibm article on comet. provide implementation apache tomcat. article : http://www.ibm.com/developerworks/web/library/wa-cometjava/#resources the javascript code provide follows.. <script type="text/javascript"> function go(){ var url = "http://localhost:8484/weatherserver/weather" var request = new xmlhttprequest(); request.open("get", url, true); request.setrequestheader("content-type","application/x-javascript;"); request.onreadystatechange = function() { if (request.readystate == 4) { if (request.status == 200){ if (request.responsetext) { document.getelementbyid("forecasts").innerhtml = request.responsetext;

java - Object type reference variable assigned to a primitive -

in java, int primitive type , integer object. integer x = 4; this line of code produces no errors, though think technically should if there no special case it. it's object type reference variable being assigned primitive type, not make sense. why not produce error? this called auto-boxing . the compiler automatically box primitives when used objects.

android - Google + Sign In: Activity won't start -

i using com.actionbarsherlock.app.sherlockactivity in project. when try start activity need google+ sign in error occurs. getting error on actual device, not emulator. think doing wrong? error 05-12 15:58:12.487: e/androidruntime(24310): fatal exception: main 05-12 15:58:12.487: e/androidruntime(24310): java.lang.runtimeexception: unable start activity componentinfo{com.google.android.gms/com.google.android.gms.plus.activity.accountsignupactivity}: java.lang.securityexception: must started via startactivityforresult 05-12 15:58:12.487: e/androidruntime(24310): @ android.app.activitythread.performlaunchactivity(activitythread.java:2180) 05-12 15:58:12.487: e/androidruntime(24310): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2230) 05-12 15:58:12.487: e/androidruntime(24310): @ android.app.activitythread.access$600(activitythread.java:141) 05-12 15:58:12.487: e/androidruntime(24310): @ android.app.activitythread$h.handlemessage(activitythre

javascript - How to replace text when the string exactly matches the search -

i using following code remove words chat text: for(var =0; <db.banned_words.length ;i++){ cleaned_msg = cleaned_msg.replace(new regexp(db.banned_words[i], 'g'), ''); } the problem if cleaned_msg has 1 of banned words, not remove cleaned_msg. ex; cleaned_msg = 'duck' ; if duck 1 of banned words, then, after replace, cleaned_msg should '', 'duck'. if cleaned_message has other spaces or characters, works fine. ex; duckie returns 'ie'; ' duck' returns ' '. your approach should working issue lies somewhere else. may suggest different approach? var banned_words = ['duck', 'cool', 'test'], banned_words_rx = new regexp('\\b(' + banned_words.join('|') + ')\\b', 'gi'); 'this duck cool, cool used test thing'.replace(banned_words_rx, '');

mysql - How to improve this nested select statment -

how improve nested select statement because think has bad performance because see take long time execute , gets server load high select user_tagtag, user_lastcontentid, (select count( content_id ) contents contents.content_id > user_lastcontentid , contents.content_id in ( select contenttag_contentid contents_vs_tags contenttag_tagtag = user_tagtag ) ) tag_newnews_no users_interests_tags user_userid = 1 order user_tagsorder asc users_interests_tags table structure is: +--------------------+--------------+------+-----+---------+-------+ | field | type | null | key | default | | +--------------------+--------------+------+-----+---------+-------+ | user_userid | bigint(20) | no | pri | null | | | user_tagtag | varchar(255) | no | pri | null | | | user_lastcontentid | bigint(20) | yes | mul | null | | +--------------------+--------------+------+-----+

linker - Linking failure with a MonoTouch native library binding -

i creating native library binding wikitude sdk . the monotouch app fails linking : undefined symbols architecture armv7: "std::__1::basic_string, std::__1::allocator >::find_last_of(char const*, unsigned long, unsigned long) const", referenced from: wtunzip::unzipfileto(char const*, bool)in wikitudesdk.a(wtunzip.o) ... my linkwith: [assembly: linkwith ("wikitudesdk.a", linktarget.armv7, frameworks = "corevideo security systemconfiguration coremedia avfoundation cfnetwork corelocation coremotion mediaplayer opengles quartzcore coregraphics", forceload = true, linkerflags = "-lsqlite3.0 -objc", iscxx = true)] i have admit new monotouch/ios world, trying head out of water. what should app link? i figured needed add libc++ in linkwith. new linkwith looks this: [assembly: linkwith ("wikitudesdk.a", linktarget.armv7, frameworks = "corevideo security systemconfiguration coremedia avfoundati

java - ClassNotFoundException even though the class is properly defined (I think) -

there similar question posted here answer seems have never been found. have tried clean , still getting classnotfoundexception . so happening, in linked question, call add function in arraylist<player> , proceeds tell me cannot find player class, though there , have imported correctly (since can make use of other class in path. try , post code think necessary. au.thewebeditor.scoreboard.apps.accessmysql.java package au.thewebeditor.scoreboard.apps; import java.sql.*; import au.thewebeditor.scoreboard.defs.*; public class accessmysql { private static connection connection = null; private static statement statement = null; private static preparedstatement preparedstatement = null; private static resultset resultset = null; public static void readdata() throws sqlexception, classnotfoundexception { try { class.forname("com.mysql.jdbc.driver"); connection = drivermanager.getconnection("jdbc:mysql://ho

python - Why does the use of *args and **kwargs throw an error in wxpython? -

running code results in error import wx class myframe(wx.frame): def __init__(self, *args, **kwargs): wx.frame.__init__(self, args, kwargs) self.show() app = wx.app() frame = myframe(none) app.mainloop() traceback (most recent call last): file "testing.py", line 10, in <module> frame = myframe(none) file "testing.py", line 6, in __init__ wx.frame.__init__(self, args, kwargs) file "c:\python27\lib\site-packages\wx-2.9.4-msw\wx\_windows.py", line 580, in __init__ _windows_.frame_swiginit(self,_windows_.new_frame(*args, **kwargs)) typeerror: in method 'new_frame', expected argument 1 of type 'wxwindow *' is possible use *args , **kwargs positional , named arguments in wxpython? wx.frame.__init__(self, *args, **kwargs) it works fine ... btu need pass them correctly

objective c - Change Orientation in iOS 5.0 -

i creating 1 project in viewcontroller. have image view, labels , scrollview . when change orientation aligning in bad way? is there way align correctly? scrollview not working. set delegate view in storyboard.my controll frame are(landscape mode). book_cover_image.frame=cgrectmake(50,20,250,300); label_book_name.frame=cgrectmake(350,20,500,50); label_book_author.frame=cgrectmake(350,76 , 500, 50); label_book_price.frame=cgrectmake(350,135, 500, 50); image_price_rupees.frame=cgrectmake(100, 330, 22, 16); [buy_button setframe:cgrectmake(13, 380, 119, 32)]; [preview_button setframe:cgrectmake(150, 380, 113, 32)]; recommendedbooksview.frame=cgrectmake(0,400,1024,368); _thumbnaillistview.frame=cgrectmake(15, 50, 950,350); you might consider using autoresizingmask property of uiview automatically resize , reposition views during rotation. http://www.techpaa.com/2012/05/understanding-uiview-autoresizing.html if autoresizingmask cannot

tomcat - Default servlet getRequestDispatcher of a static page -

@webservlet("/") public class rootservlet extends httpservlet { private static final long serialversionuid = 1l; protected void processrequest(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { string pathinfo = request.getservletpath(); switch(pathinfo) { case "/": this.handlehomepage(request, response); break; default: request.getrequestdispatcher(pathinfo).forward(request, response); } } i'm trying use default servlet catch context root url. when it's root url, handled handlehomepage method. if not, forwarded corresponding file. e.g. css, html, images file. cause never-ending exception occur. getrequestdispatcher allow forwarding static page? you better create filter : @webfilter(filtername = "rootfilter", urlpatterns = { "/*" }, d

c - Blocking sockets v/s non-blocking sockets in multi-threaded single server multiple client application -

i had been working on server client aplication server going service(sendto + receivefrom)'x' number of clients @ time. purpose, have created 'x' number of threads on server side each thread dadicated 1 single client. inside each thread there specific socket client. thinking make these sockets non-blocking think using blocking socket inside each thread better idea. blocking socket continuously waits receive data , whenever there need send anything, sendto() called. using blocking socket in such situation approach or should use non-blocking sockets? waiting help!!! i thinking make these sockets non-blocking think using blocking socket inside each thread better idea. blocking socket continuously waits receive data , whenever there need send anything, sendto() called. using blocking socket in such situation approach or should use non-blocking sockets? i agree. unless expecting hundreds of thousands of connections, don't see reason go beyond threads ,

can we access the columns of a table as array in sql? -

is there way access columns of table array in sql? eg: table1 name abc def ghi jkl can access name[0]? short answer no. long answer depend on database , not plain sql.

Default button fired instead of focused button in asp.net -

aspx page contains panel having default button called btnfilter . panel having button btnreset . when focus inside panel & press enter fires btnfilter click event ok. first put focus on reset button & press enter fires btnfilter click event instead of firing btnreset click event. is there solution this?

ruby on rails - Read Gmail XOAUTH mails without marking it read -

i'm trying read email gmail using gmail-xoauth gem. want read email , leave unread status. first, tried reading header. works. imap = net::imap.new('imap.gmail.com', 993, usessl = true, certs = nil, verify = false) imap.authenticate('xoauth2', email, access_token) imap.select('inbox') imap.search(["since", since]).each |message_id| msg = imap.fetch(message_id,'rfc822.header')[0].attr['rfc822.header'] mail = mail.read_from_string msg puts mail.subject end now, want read body/text of email without marking read. based on documentation need use store method. documentation mentions: store(set, attr, flags) sends store command alter data associated messages in mailbox, in particular flags. set parameter number or array of numbers or range object. each number message sequence number. attr name of data item store: ‘flags’ means replace message’s flag list provided one; ‘+flags’ means add provided flags;

javascript - How to select text by tag name in element? -

i need select title in div wrapped h2 , this.getelementsbytagname('h2') current div in h2 - returns current h2 element, when trying innerhtml or innertext return null. doing wrong? it returns current h2 element, when trying innerhtml or innertext return null. doing wrong? getelementsbytagname returns nodelist , not element. list doesn't have innerhtml , each of elements does, e.g.: var list = this.getelementsbytagname('h2'); if (list[0]) { title = list[0].innerhtml; } or if you're sure exist: title = this.getelementsbytagname('h2')[0].innerhtml; ...but throw exception if there no h2's found.

Display text on google map in android -

i displaying location on google map passing latitude longitude values. intent intent = new intent(intent.action_view); intent.setdata(uri.parse("geo:0,0?q=" + (" "+dbllatitude+", "+dbllongitude+" "))); try { startactivity(intent); } catch (exception e) { e.printstacktrace(); } setcontentview(r.layout.map_locate); } its working fine me. want show text on above located point. idea how pass text dynamically passing lat, long values? to show label on google maps application have add in brackets after coordinates. see answer: https://stackoverflow.com/a/7405992/2183804

css - IE Cross Browser Button Issue -

http://www.pcdconsultancy.co.uk/ im debugging in ie website, , trying establish causing button float outside wrapper the code sidebar : <div class="homepagesidebar"> <ul> <li> <div class="mctitlelatestnews"> <div class="exclamationmark"></div>latest news </div> <div class="latestpostsbox"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('homepage-sidebar') ) :?><?php endif; ?> <?php $the_query = new wp_query( 'showposts=2' ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <i class="sidebarbluetext"><?php the_date('js f y'); ?></i> <?php the_content(__('(more…)')); ?> &l

kernel - The equivalent of path_lookup() of linux 2.6 in linux 3.7 -

i reading "understanding linux kernel" 3rd edition, d.bovet & m.cesati. in chapter virtual file systems, refer function "path_lookup()" lookup given path. book based on linux-2.6. viewing files in linux-3.7.6 , can't find function (using cscope tool). idea what's equivalent function in version of linux? on current kernel versions can achieve same using vfs_path_lookup() ( http://lxr.linux.no/linux+ */fs/namei.c#l2051).

jquery - Select a parent's child using index -

:nth-child() - selector used select each element nth child of parent. are there ways select parent's child using index value? want , set each child's properties individually. structure of code is: for (var i=0;i<length;i++) { //create selector choose first child using `index` value //change each child's properties } i hope me out. in advance. you can use $.each() simple example ( jsfiddle ): html: <table> <tr id="test"> <td>a</td> <td>b</td> <td>c</td> <td>d</td> <td>e</td> </tr> <table> jquery: $.each($("#test").children(), function(index, data){ alert(index); });

objective c - The [UIDevice uniqueIdentifier] become private in iOS 6.0 -

apple doesn't allowed add application app store used [uidevice uniqueidentifier] because property become private in ios sdk 6.0 what alternatives? you can use/create "your own" udid: +(nsstring *)getuuid { cfuuidref newuniqueid = cfuuidcreate(kcfallocatordefault); nsstring * uuidstring = (__bridge_transfer nsstring*)cfuuidcreatestring(kcfallocatordefault, newuniqueid); cfrelease(newuniqueid); return uuidstring; } you should keep in mind method produce different id on every call should persist how, not identical alternative udid, uses better that.

asp.net - Error 403 on SECOND postback of the same form (and various other situations) -

we migrated our application (iis server + db server) aws , modified network architecture little bit. entry point of system astaro firewall (we use aws ami) host ssl certificate of web server. related firewall has been done vendor , have read-only privileges. we getting 403 errors in few situations explain one, may related. we got form query database , return report in html format (this report have checkbox updates). first time form submitted, report back. if wanna post form again, updated new data, crash, returning error 403 . noted doesn't crash when first results returned low number of rows (or none). looking @ details of posts in developer tools, seems difference between working , 403 error reply size of data posted. second post always bigger because contains data of first report (as page have other option checkbox rows). also, looking @ iis logs don't see traces of post crash. nothing @ all. this problem happen in production. in dev environment it'

How to group sencha touch 2 radio fields -

Image
this sencha touch 2 code: ext.define("10.view.main", { extend: 'ext.form.panel', requires: ['ext.form.fieldset'], config: { title: 'main', scrollable: 'both', editable: false, items: [{ xtype: 'fieldset', items: [{ xtype: 'radiofield', name: 'color', value: 'red', label: 'red', checked: true }, { xtype: 'radiofield', name: 'color', value: 'blue', label: 'blue' }] }] } }); here preview of code. this: i want group radio fields given below. how can it? at following link can find example. hope works you. http://sureshdotariya.blogspot.be/2013/05/how-to-group-radio-buttons-in-form.html greets

c# - Populate a datagridview from database on selection of an item in combobox -

i have combobox having requisition number. when select 1 of requisition item r001 in combobox information should populated in datagrid below. have used stroed procedure this. dont know how bind datagrid view control info. code: private void cmbreqno_selectedindexchanged(object sender, eventargs e) { cmd.connection = con; if (con.state != connectionstate.open) { con.open(); } txtcc.text = ""; int selection = convert.toint16(((keyvaluepair<string, string>)(cmbreqno.selecteditem)).key); if (selection.tostring() != "") { cmd.connection = con; cmd.commandtype = commandtype.storedprocedure; cmd.commandtext = "itemname"; cmd.parameters.addwithvalue("@req_no", selection); dsitemname.clear(); adp = new sqldataadapter(cmd); adp.fill(dsitemname); txtcc.text = dsitemna

sql - Error converting data type varchar to datetime using GETDATE() -

i realise quite common problem banded around forums, @ loss i've done wrong here. i have 'current' table like: id(uniqueidentifier) name(nvarchar max) filename(nvarchar max) fileversion(smallint) currentversiondate(datetime) the currentversiondate entered using getdate() function within sqlserver. when user hit's 'create file' on website, details of table transferred 'history' table. use stored procedure select * details 'current' , save each value variable (i'm using vb.net in visual studio project). i'll show date variable problem. i'm saving 'date' variable: dim ddate date ddate = dr("currentversiondate") then send these variables stored procedure enter 'history' table: execute sp_inserthistory '" & id & "','" & strname& "','" & strfile & "','" & intversion & "','" & ddate

c# flowlayout overlapping of listbox and button -

i'm having this: class mypanel : flowlayoutpanel { public mypanel() { this.backcolor = color.red; this.flowdirection = system.windows.forms.flowdirection.lefttoright; listbox = new listbox(); editbutton = new button(); //editbutton.click += editbutton_click; this.controls.add(listbox); this.controls.add(editbutton); } } and i'm adding form dynamically. problem listbox overlapping button. if try add there 2 buttons instead of list working supposed - buttons organized in 1 line left right. want reach button next list. can advice me? thanks try code: class mypanel : flowlayoutpanel { public mypanel() { this.backcolor = color.red; this.flowdirection = system.windows.forms.flowdirection.lefttoright; listbox = new listbox(); this.wrapcontents = false; // use control not wrapped editbutton = new button(); this.controls.add(listb

How to split the array of string in jquery -

how split array of string in jquery. e.g.: var input='a,b,c,d,e,f,g' //i want split in in array. //check condition if input of elements > 3. //then need remove elements in array. show array ex: output= 'a,b,c' as new jquery please suggest me jquery functions implement this. var output = 'a,b,c,d,e,f,g'.split(',').slice(0, 3).join(); http://jsfiddle.net/5xasn/

objective c - Check supported architectures of iOS app -

how can check supported archs of apps (ex. myapp.app)? this folder product after building xcode. i use command: "file myapp.app/myapp" , shows: mach-o executable arm what this? i want know architectures supports (armv6, armv7, armv7s or i386). you can use lipo -info myapp.app/myapp see architecures supported.

windows batch file doesn't work -

i have batch file , doesn't work. funny thing commands work while running inside of cmd window. the non-working - faulty line batch file: /f %%i in ('dir /b c:\users\jacek2\desktop\usb\test\1\depesza*') ( move /y c:\users\jacek2\desktop\usb\test\1\"%%i" c:\users\jacek2\desktop\usb\test\1\depesza.cvs && start /wait e:\easyphp-12.0\mysql\bin\mysqlimport.exe --columns=typ_raportu,kod_stacji --user=root --password= --host=127.0.0.1 --fields-enclosed-by="\"" --fields-terminated-by="," --fields-escaped-by="" test c:\users\jacek2\desktop\usb\test\1\depesza.csv) from cmd window: c:\>for /f %i in ('dir /b c:\users\jacek2\desktop\usb\test\1\depesza*') move /y c:\users\jacek2\desktop\usb\test\1\"%i" c:\users\jacek2\desktop\usb\test\1\de pesza.cvs && start /wait e:\easyphp-12.0\mysql\bin\mysqlimport.exe --columns=typ _raportu,kod_stacji --user=root --password= --host=127.0.0.1 --fields

Jquery Spinner doesn't work on Chrome -

i have implemented jquery spinner works fine on firefox doesnt work on chrome. have created 2 functions called start spinner , stopspinner here code function startspinner(){ $(document).ready(function() { console.log('spinner should getting shown now'); $('#spinner').show(); }); } function stopspinner(){ $(document).ready(function() { console.log('spinner should getting shown now'); $('#spinner').hide(); }); } css class .spinner { position: fixed; top: 50%; left: 50%; margin-left: -50px; /* half width of spinner gif */ margin-top: -50px; /* half height of spinner gif */ text-align:center; z-index:1234; overflow: auto; width: 100px; /* width of spinner gif */ height: 102px; /*hight of spinner gif +2px fix ie8 issue */ } html <div id="spinner" class="spinner"> <img id="img-spinner" src="images/spinner.gif" alt="loading" /> </div> so

enthought - Customize syntax highlightin in canopy -

i installed enthought canopy in freshly (clean) installed mac os x mountain lion. far, seems run stable , fast. problem want customize syntax highlighting of both editor , console. there no preferences allow find quite strange because embedded editor editra, highly customizable editor. want to: editor. using editra before, can place old style file (.ess) syntax highlighting such overwrite default one? interactive window. how dissable syntax highlighting interactive window? tried magic function "%colors nocolor" makes nothing. saw there monochrome theme editor, want dark brackground no syntax highlighting. thanks. glad you're finding canopy useful. neither of these options supported @ time. canopy designed easy-to-learn environment, relatively few configuration options, scientists, engineers, , analysts, rather professional developers have editor of choice. add features when there strong demand and/or use-case it. fwiw, canopy not embed editra, thou

GDB is killing my inferior process -

gdb killing inferior. inferior long-running (20-30 minutes) benchmark. gdb , inferior both running under uid. runs fine while signal handler called siginfo_t instance si_signo = 11, si_errno = 0 , si_code = 0; _sifields._kill.si_pid = ( gdb-pid ), _sifields._kill.si_uid = ( my-uid ). i read gdb decided send kill signal inferior process. under circumstances gdb this? this not sigsegv (even though si_signo suggest is) since si_code 0 , si_pid , si_uid set). inferior multi-threaded c++ application custom signal handler handle gpfs when application hits memory barrier set protect ranges of memory. when run under gdb set handle sigsegv noprint to ensure gdb passes sigsegv signals relating memory barrier on application handling. part seems working fine -- sigsegv nonzero si_code in siginfo_t struct handled (after verifying faulting address in siginfo->_sifields.si_addr within protected range of memory). but sigsegv 0 si_code indicates inferior being killed, far can tell, , _

How to embed python variable on html -

need embedding python variables in html. cant find way of working without framework django or webpy. you can use django template language independently of framework. read "the django template language: python programmers" , section on "standalone mode" , instructions on how use template system.

algorithm - Artificial Intelligence for card battle based game -

i want make game card battle based game. in cards have specific attributes can increase player's hp/attack/defense or attack enemy reduce hp/attack/defense i trying make ai game. ai has predict card select on basis of current situations ai's hp/attack/defense , enemy's hp/attack/defense. since ai cannot see enemy's card hence cannot predict future moves. i searched few techniques of ai minmax think minmax not suitable since ai cannot predict future moves. i searching technique flexible can add large variety of cards later. can please suggest technique such game. this isn't actionscript 3 topic per se think it's rather interesting. first i'd suggest picking yu-gi-oh's stardust accelerator world championship 2009 nintendo ds or comparable game. the game has advanced computer ai system not deals expected advantage or disadvantage in terms of hit points card advantage , combos. if you're taking on challenge this, definately recom

javascript - Jquery stopping spaces in inputs -

i have following page , cannot find out why form not allow spaces in fields. i have reduced jquery issue if remove line 20 jquery include can input spaces. any advice should appreciated. http://www.tacticalsalestraining.co.uk/offer-may-2013.php the problem gallerific.js file have included on page. this intercepting keydown events - search 32 (which character code space) in js file , can see key events intercepting. executing "preventdefault" means event not propagate input fields. disable plugin, or why intercepting form entry on site. edit actually, set option false plugin: enablekeyboardnavigation: false,

Github - remove issues entered in error -

dozens of issues have been entered project on github have no place there. einstein ran script , created these nonsensical issues through api. nothing linked these issues. surely there someway can delete them, can't seem find in docs. there no way delete issues. can do, indicate spam attack, create new label. can use api edit each issue closed , labeled spam label. @ see label displayed along side issue , it's best can hope for. if you're more comfortable specific language, check library written in make life easier too.

php - Including *any* query string in my site URL causes a 404 -

first apologize if has been asked; used search & advanced search , hours' worth of googlefu, no avail. the issue i'm having time try , use query in url causes 404. 127.0.0.1/login.php throws error saying required query (&asdfasdf=?) doesn't exist, otherwise works fine... http://puu.sh/2siyc.png 127.0.0.1/login.php&asdfasdf=5 causes 404... http://puu.sh/2sixf.png what i've tried: through extensive searching, lot of results turned query names "aren't allowed" if they're used cms in question. isn't using cms, , if there's funky in php back-end claims query names, doubt they're called "asdfasdf" mine. any ideas? my code: <?php include('header.php') ?> <!-- primary content --> <div class="row"> <div class="span12" style="border: 1px solid #000;"> <div class="row"> <div class="span12"> <?ph

directx - Multi-Texturing - Interpolation between two layers of an 3D texture -

Image
i'm trying achieve terrain texturing using 3d texture consists of several layers of material , make smooth blending between materials. maybe illustration explain better: just imagine each color cool terrain texture, grass, stone, etc. want them blended, current approach textures between requested besides textures want appear (it seems logical because, i've read, 3d texture treated three-dimensional array instead of texture pillars). current (and foolish, obviously) approach simple pie ('current' result rendered using point interpolation, desired result hand-painted): vertexes: vertex 1: position = vector3.zero, uvw = vector3.zero vertex 2: position = vector3(0, 1, 0), uvw = vector3(0, 1, 0.75f) vertex 3: position = vector3(0, 0, 1), uvw = vector3(1, 0, 1) can see, first vertex of triangle uses first material (the red one), second vertex uses third material (the blue one) , third vertex uses last fourth material (the yellow one). this how it'

java - Get time of NTP-Server from Android App -

dear android developers, i'm trying implement sntpclient class in application didn't work. class: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/net/sntpclient.java in code have following lines: public void onclickbtn(view v) { sntpclient client = new sntpclient(); if (client.requesttime("pool.ntp.org", 10)) { long = client.getntptime() + systemclock.elapsedrealtime() - client.getntptimereference(); toast.maketext(this, "offset: " + now, toast.length_long).show(); } } i don't know meaning of network timeout in case. it great, when has idea or tip me. thanks in advance! you should put in asynctask : class getntpasynctask extends asynctask<string, void, boolean> { @override protected boolean doinbackground(string... params) { private sntpclient sntpclient = new sntpclient(); return sntpclient.requesttim

javascript - Why is jquery beforeunload showing a message even when returning null in Internet Explorer -

this code cause internet explorer show 'are sure want leave?' message every time, when dirtymessage null. doing wrong? $(window).bind('beforeunload', function() { var dirty = diduserupdatesomething(); if (dirty) { return "you lose changes."; } return null; }); apparently returning null problem. works in other browsers except old ie. solution not return (undefined): $(window).bind('beforeunload', function() { var dirty = diduserupdatesomething(); if (dirty) { return "you lose changes."; } // notice in case of no dirty message not return anything. // having 'return null;' make ie show popup 'null'. });

asp.net mvc 4 - Storing user authentication in Session -

when user logs site: session["user"] = new user(name); to see if visitor page logged in: if(session["user"] != null) { //session["user"].name logged in! } is secure? client have way of modifying session variables? please see answer here . the short answer is: forms authentication more secure.

android - How to manage same java code in different package with git? -

i'd versioning of android code. i pushed code (only res , src directories) , want pull in other package. how can manage that, given code in git repository has it's source in src/com/some/package/ , want clone , source in src/some/other/package/ ? i'm aware of this question , can't see answer helps. what can alternative directly managing git, separate common code own android library project. able add library other 2 projects, giving access same code base. this have end 3 projects, , 3 repositories. 2 of each separate projects, , 1 of each library project. one thing aware of, however, if there specific code 1 project inside of library, affect other project. of handled subclassing , overriding methods/properties needed. way around this, suggested jul, have branches each project. a nice benefit of doing way if make bug fix in library found while working on 1 project, you'll able in other practically free.

css - Device div screens overlapping, how do I fix? -

how change keyboard functions onscreen joystick? building html5 game , im lost how add joystick. below code needs help. thank in advance :) function init() { canvas = document.getelementbyid('canvas'); ctx = canvas.getcontext('2d'); enemy = new image(); enemy.src = '8bit_enemy.png'; ship = new image(); ship.src = 'ship.png'; starfield = new image(); starfield.src = 'starfield.jpg'; document.addeventlistener('keydown', keydown, false); document.addeventlistener('keyup', keyup, false); canvas.addeventlistener('click', gamestart, false); gameloop(); } function gamestart() { gamestarted = true; canvas.removeeventlistener('click', gamestart, false); } //the main function of game, calls other functions needed make game run function gameloop() { clearcanvas(); drawstarfield() if (alive && gamestarted && lives > 0) { hittest(); shipcollision();

git - How to push on the production server only folder prepared for production? -

i have project under git version control. file structure following: .git build server models controllers views site css js img .gitignore in 'server' , 'site' folders resides source code unprepared production. use grunt preparing js css production (concat , min) put prepared files production in 'build' folder, after grunt this: build server models controllers views site css // min js // min img // sprites after 'git commit' , 'git push' remote production server. build folder git push source code ('server' , 'site' folders outside build folder) .that correct because git versioned files under application folder. need exclude pushing these folders pushing server. how can that. thanks! i thing have branch release. let's have branch production it's own .gitignore file push need. the way did this mkdir project cd project git init vi .gitigore type , save

How to refresh jqGrid search dialog with postData filters -

i'm working jqgrid, , far working great. i'm working on allowing users able save searches can retrieve them later and/or apply them different grids. saving proving easy part. can grid filter based on specified postdata filters, search dialog not refreshing filter criteria. here's little test have: $("#grid").jqgrid('navgrid','#pager', {edit: false, add: false, del: false, refresh: false, searchtext: 'search'}, {}, {}, {}, { multiplesearch: true, closeaftersearch: true, closeonescape: true, searchonenter: true, find: "search", aftershowsearch: function () { ...// code create save search buttons goes here $("#fbox_" + gridid + "_save").bind('click', function() { var filters = {"groupop":"and","rules":[{"field":"id","op":"eq","data":"2&q

vb.net - Crystal Report issues with multiple SQL tables -

i have make report sums value of 2 different tables, , i'm using cr on vb, have 2 fields named value 2 different tables, table products , table services , need sum values , show them on report. used select , tried writing down formula "formula" function on cr can't figure out how it. that's insert select product, value tbproduct union select description product, value tbservice thanks in advance create stored procedure on sql side , set cr using stored procedure data source. (i don't remember quite how know i've done in past.) can offer way of optimizing queries use cr , not depending on cr's sql generator.

iphone - How can I transform a UIView from being parallel to the ground to being perpendicular? -

i want transform view plane parallel ground plane perpendicular ground. any ideas? to rotate view in 3d, need modify transform property of view's layer. it sounds want rotate view around x axis. , guess want perspective, edge closer viewer appears larger , edge farther viewer appears smaller. we'll write helper function makes transform. start identity transform: static catransform3d transformwithangle(cgfloat angle) { catransform3d transform = catransform3didentity; then set m34 component of transform based on distance viewer view: transform.m34 = -1.0f / 300.0f; if use number larger 300 , perspective weaker. if use number smaller 300 , perspective stronger. next, add rotation: transform = catransform3drotate(transform, angle, 1, 0, 0); then return transform: return transform; } let's want apply view named self.riseview . want rotation around bottom edge of view, set layer's anchor point bottom edge: - (void)v

linux - awk save modifications in place -

i learning awk , know if there option write changes file, similar sed use -i option save modifications file. i understand use redirection write changes. there option in awk that? in latest gnu awk (since 4.1.0 released ), has option of "inplace" file editing : [...] "inplace" extension, built using new facility, can used simulate gnu " sed -i " feature. [...] example usage: $ gawk -i inplace '{ gsub(/foo/, "bar") }; { print }' file1 file2 file3 to keep backup: $ gawk -i inplace -v inplace_suffix=.bak '{ gsub(/foo/, "bar") } > { print }' file1 file2 file3