Posts

Showing posts from August, 2013

c++ cli - How do I concatenate a dot to a string? -

i'm trying concatenate dot ( "." ) in visual c++ windows form application. code is: string ^a; a=string::concat(values->text,"."); valores->text= a; but if text has 3 , changes .3 instead of 3. . changing to: a=string::concat(".", values-> text) doesn't fix it. a += "."; ( that's there it! )

c++ - Infix to Postfix conversion brackets error -

i've written code converts infix expression postfix expression. there 2 functions checking expression, 1 checking expression without brackets , other checking , converting expression brackets. the function converts non-bracket expression works fine 1 converts brackets giving error. when enter , expression (a+b)*(c-d) , correctly converts a+b , pushed * stack. somehow, program not recognize starting bracket of (c-d) bracket , continues converting normal (for without bracket). have no idea why not recognizing bracket, small problem ruining whole output. can tell me why not recognize ( in (c-d) opening bracket? here's code: class stack { . . . void push(char value) //push value onto top of stack { if(isfull()==true) //only possible when stack not full cout<<endl<<"sorry! stack full, no more entries allowed!"<<endl; else //add value top of stack stack not empty { top++; array[top

java - Generating Rest API documentation using swagger or any other tool -

i looking way document rest apis. server tomcat/spring server , rest apis implemented using jenkins. swagger seems pretty cool solution can't figure out how can use code. looking best way create json swagger-ui can read - how should that? also, happy check other solutions documenting rest apis in such environment. i haven't tried swagger may try enunciate . can generate documentation of jax-rs endpoints part of javadoc phase. examples of generated documentation available on enunciate page update project has been moved http://enunciate.webcohesion.com/ , java 8 supported upcoming version 2.0.

objective c - Accessing descriptors in array of arrays -

i have mutable array containing arrays use in table view controller. arrays contain title , other information. want arrays in master array sorted alphabetically in terms of title contain. have assigned titles keys: nsstring *title = @"objecttitle"; nsdictionary *dict = [nsdictionary dictionarywithobjectsandkeys:_storedtitle.text, title, nil]; nsarray *newarray = @[@"login", dict, _storedusername.text, _storedpassword.text]; i store newarray in masterarray , try sort array thus: //sort array alphabetically nssortdescriptor *titledescriptor = [[nssortdescriptor alloc] initwithkey:@"objecttitle" ascending:yes]; nsarray *sortdescriptors = @[titledescriptor]; nsarray *sortedarray = [_masterarray sortedarrayusingdescriptors:sortdescriptors]; _masterarray = sortedarray.copy; this not working, have not specified index titledescriptor stored. how do this? when accessing title @ given index (index) in master array done follows:

javascript - how to remove or change the popup automatic message -

i display popup ask confirmation of delete record, popup displays "system message" "the page @ address mywebsite show:" follows message "are sure ....". i want display message 'are sure ?'not message 'the page @ address mywebsite show:' above message. how can please ? thank in advance. <a href="php/delete.php5?" onclick="return confirm('are sure ?');"><img src="images/cancel16x16.png"></a> the title javascript confirm() unfortunately unchangeable (see question: changing default title of confirm() in javascript? ) , that's same changing of style & looks too. to allow use common scripts such callbacks, change of text or event changes etc. on javascript confirm() s. these better left helpers such jquery ui dialog (there many others too) uses <div> s mimic confirm() behaviour , provide much, more control web developer. <script> $(function(

mysql - After I Join with same table twice then how to call value with same column name in WHERE clause? -

i'll start example: *table1* id phonenumber1 phonenumber2 *table2* phonenumber someotherfield select * table1 t1 inner join table2 t2 on t2.phonenumber = t1.phonenumber1 inner join table2 t3 on t3.phonenumber = t1.phonenumber2 -- here question how call same column have same name? -- want clause below: someotherfield(from first table2) = someotherfield(from second table2) the example below question, asking different things: what's best way join on same table twice? where t2.someotherfield = t1.someotherfield

CSS Styles accidentally removes my scrollbar in wordpress -

i'm having trouble css styles in wordpress. chrome removing scrollbar, while in ie page fixed , doesn't scroll @ all. i've disabled admin bar because seemed causing trouble, still can't see scrollbar. here's page http://www.kareemkwong.me/ thanks help! as using modernizer, adds class video html tag automatically. state browser supports video tag. in custom stylesheet, however, have custom video class overflow: hiddden; . consequently, whole page set overflow: hidden . you can either remove overflow: hidden in custom video class if not needed rename custom video class , change html accordingly add class videos handle overflow in css: .video.nooverflow { overflow: hidden; } . in html: add nooverflow class element has video class ( class="video nooverflow" ).

MySQL not launching on XAMPP -

i can't mysql launch via xampp, fine last time opened few months back; updated errors after have followed my.cnf recovery: 2013-10-06 19:29:23 7920 [note] plugin 'federated' disabled. 2013-10-06 19:29:23 15fc innodb: warning: using innodb_additional_mem_pool_size deprecated. option may removed in future releases, option innodb_use_sys_malloc , innodb's internal memory allocator. 2013-10-06 19:29:23 7920 [note] innodb: innodb memory heap disabled 2013-10-06 19:29:23 7920 [note] innodb: mutexes , rw_locks use windows interlocked functions 2013-10-06 19:29:23 7920 [note] innodb: compressed tables use zlib 1.2.3 2013-10-06 19:29:23 7920 [note] innodb: not using cpu crc32 instructions 2013-10-06 19:29:23 7920 [note] innodb: initializing buffer pool, size = 16.0m 2013-10-06 19:29:23 7920 [note] innodb: completed initialization of buffer pool 2013-10-06 19:29:23 7920 [note] innodb: highest supported file format barracuda. 2013-10-06 19:29:23 7920 [note] innodb: log seq

flash - The TLF (Text Layout Framework) is deprecated, what to do now? -

"the text layout framework deprecated , functionality unavailable flash professional cc. if fla file containing tlf text, saved older version of flash professional, opened flash pro cc, tlf converted classic text. more information, see article." okay. and what?? need use arabic(hebrew...) fonts, stuck flash cs6 ever?? i used trick , works 1- copy 2 (.swc) files flash cs6 or cs5 (support tlf text) textlayout.swc tlfruntime.swc 2- paste them into( adobe flash cc \common\configuration\actionscript 3.0\libs) 3- restart flash 4- use tlftextfield method import fl.text.tlftextfield; var txt:tlftextfield = new tlftextfield ; txt.text = "النص العربي"; addchild(txt); 5- make sure embed font library .

html - When i rotate an element along x axis size increases? -

when rotate cube left right or vice-verse, fits size of container. when rotate top button doesn't fits. html : - <div class="scene"> <div class="cube"> <div class="cube-face cube-face-front"><img src="http://imageshack.us/a/img833/6500/dp5e.jpg" alt="images"> </div> <div class="cube-face cube-face-back"> <img src="http://imageshack.us/a/img545/9813/58zj.jpg" alt="images"> </div> <div class="cube-face cube-face-left"> <img src="http://imageshack.us/a/img818/5776/8ik6.jpg" alt="images"> </div> <div class="cube-face cube-face-right"> <img src="http://imageshack.us/a/img18/6017/rue6.jpg" alt="images"> </div> <div class="cube-face c

winapi - c++ win32 textarea with line numbers? -

i'm writing notepad program using ms visual c++ 2010 express win32. have basic design it, able show line numbers next textarea, see in text editors (i.e notepad++, sublime, etc.). code have textarea is: hedit = createwindowex( ws_ex_clientedge, "edit", "", ws_child | ws_visible | ws_vscroll | ws_hscroll | es_multiline | es_autovscroll | es_autohscroll, 0, 0, 100, 100, hwnd, ( hmenu )idc_main_edit, getmodulehandle( null ), null ); if( hedit == null ) messagebox( hwnd, "could not create edit box.", "error", mb_ok | mb_iconerror ); hfdefault = createfont( 0, 0, 0, 0, fw_normal, false, false, 0, ansi_charset, out_default_precis, clip_default_precis, default_quality, default_pitch, text( "consolas" ) ); sendmessage( hedit, wm_setfont, ( wparam )hfdefault, makelparam( false, 0 ) ); the "edit" control not have built in support line numbers (or else) in margin. cr

ios - Making HTTP Requests API Calls -

i have following code in ios sdk building: + (void) makerequesttoendpoint:(nsstring *) endpoint values:(nsmutabledictionary *) params oncompletion:(sdkcompletionblock) responsehandler { [params setobject: key forkey: @"key"]; nsstring * urlstring = [self createapiurlfromendpoint: endpoint]; nsurl * url = [nsurl urlwithstring: urlstring]; nsmutableurlrequest *request = [[nsmutableurlrequest alloc] initwithurl: url]; request.httpmethod = @"post"; [request setvalue:@"application/json" forhttpheaderfield:@"accept"]; [request setvalue:@"charset" forhttpheaderfield:@"utf-8"]; [request setvalue:@"application/json" forhttpheaderfield:@"content-type"]; request.httpbody = [[params urlencodedstring] datausingencoding:nsutf8stringencoding]; [nsurlconnection sendasynchronousrequest:request queue:[nsoperationqueue mainqueue]

Importing big tecplot block files in python as fast as possible -

i want import in python ascii file ( tecplot, software cfd post processing). rules files (at least, need import): the file divided in several section each section has 2 lines header like: variables = "x" "y" "z" "ro" "rovx" "rovy" "rovz" "roe" "m" "p" "pi" "tsta" "tgen" zone t="window(s) : e_w_block0002_all", i=29, j=17, k=25, f=block each section has set of variable given first line. when section ends, new section starts 2 similar lines. for each variable there i*j*k values. each variable continous block of values. there fixed number of values per row (6). when variable ends, next 1 starts in new line. variables "ijk ordered data".the i-index varies fastest; j-index next fastest; k-index slowest. i-index should inner loop, k-index shoould outer loop, , j-index loop in between. here example of data: variables

json - no root element name resteasy response -

i having trouble returning list of objects root name of object specified. i've tried several different things. sure doing incredibly stupid always, , appreciate help. here object @xmlrootelement @jsonrootname(value = "bixasset") @jsonignoreproperties({"hibernatelazyinitializer", "handler"}) @produces("application/json") @indexed public class bixasset implements java.io.serializable { @id private uuid id; private client client; private string name; private string asseturl; private character active; private integer width; private integer height; private string thumbnailurl; private date createddate; private string filetype; private string category; public bixasset() { } public bixasset(uuid id) { this.id = id; } public bixasset(uuid id, client client, string name, string asseturl,character active, integer width, integer height, string thumbnailurl

html - Difference between "./images/pic.png" and "images/pic.png"? -

this question has answer here: what dot mean in url path? 2 answers what difference between src=“/images/logo.gif” , src=“images/logo.gif”? 3 answers hello stumbled upon think has formality. have used refer files this: <img src="images/cute_cat.png" /> however saw people using instead: <img src="./images/cute_cat.png" /> my question if there's logical explanation or if it's formality thing use , don't. ./ means same directory. ../ means parent directory. / means first directory of domain. in case, mean same thing.

shell - Running distributed jobs using bash -

this question has answer here: running jobs through ssh (linux/osx) 3 answers i have access few machines run on (machine0, machine, etc.). have access executable , series of input files, there way use bash run jobs through ssh don't have ssh in every machine , run each 1 individually? cheers, jack set passwordless authentication on host machine , let bash script call binaries/scripts through ssh ( ssh user@remote <command> ).

android - Editext (Dialog) Value is empty? -

i try use edittext in dialog . use sample developer.android.com ( http://developer.android.com/guide/topics/ui/dialogs.html ). want value of edittext when press positive button . code public dialog oncreatedialog() { alertdialog.builder builder = new alertdialog.builder(main_list.this); // layout inflater final layoutinflater inflater = main_list.this.getlayoutinflater(); builder.setview(inflater.inflate(r.layout.serie_add, null)) // add action buttons .setpositivebutton(r.string.search, new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int id) { view promptsview = inflater.inflate(r.layout.serie_add, null); final edittext userinput = (edittext) promptsview .findviewbyid(r.id.series); intent intent = new intent(); intent.setclass(main_list.this, add_s

jekyll - CSS Files showing up with type text/plain -

i attempting serve static blog (powered jekyll) on ubuntu server css not apply , keep getting issue: "resource interpreted stylesheet transferred mime type text/plain". in source code, however, explicitly list these files "text/css". ideas on how solve this? this nginx issue. needed place include /etc/nginx/mime.types; in "location /" block.

C++ program get terminated -

i need know why program terminated when ever compile it. cant understand reasons behind termination. please tell me problem solutions. thanks. #include<iostream.h> class citizen{ private: char* name; char* nationality; public: citizen(){ name = "no name given"; nationality = "no nationality given\n"; } citizen(char* name, char* nationality){ this->name = name; this->nationality = nationality; } void display(){ cout << "name: " << name << endl; cout << "nationality: " << nationality << endl; } ~citizen(){ if(name){ cout << endl << "\ngoing delete: "<< name << endl; delete []name; } if(nationality){

html - How to use conditional comments correctly? -

can write css ie bugs in 1 conditional load? <!--[if lt ie 9]> <link href="ie.css" rel="stylesheet" type="text/css" /> <![endif]--> if make 1 conditional comment lt ie 9, can write css ie7 , ie8 inside or need make 2 different stylesheets? if want use different stylesheet each version of ie, need make different conditional each one; linking unique stylesheet. lt stands 'less than', alternatively, there lte , 'less or equal'. <!--[if ie 7]> <link href="ie7.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if ie 8]> <link href="ie8.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if ie 9]> <link href="ie9.css" rel="stylesheet" type="text/css" /> <![endif]--> alternatively, if want use same stylesheet all versions of ie less

ruby - verify_active_connections! is deprecated in rails 4, what should we do to handle that functionality? -

i've been following post setup puma foreman: https://www.digitalocean.com/community/articles/how-to-set-up-zero-downtime-rails-deploys-using-puma-and-foreman the puma script says verify_active_connections! after connecting it's not available in rails 4. commenting out method call make script run i'm not sure if leak resources or not. the documentation can see in regards issue is: https://github.com/socialcast/resque-ensure-connected/issues/3 but there's no conclusive answer on do. think options either omit , rails handle under hood or each block runs verify on each one. have real answer on do? thanks. it appears in rails 4 removed in commit: https://github.com/rails/rails/commit/9d1f1b1 it seems should looking at: activerecord::base.clear_active_connections! here's github issues threads discuss it: https://github.com/resque/resque/issues/1098 https://github.com/socialcast/resque-ensure-connected/issues/3

Bluetooth communication between Android and Arduino using Processing -

i trying make two-way bluetooth communication between android , arduino using processing android. have success transferring data android arduino serial.begin(9600). , have success transferring data arduino android using softwareserial in arduino program , bluetooth.begin(9600) in place of serial.begin(9600). however, when trying transfer data android arduino using bluetooth.x commands, not work. here arduino code: if (bluetooth.available()) // wait until character received { char val = (char)bluetooth.read(); //serial.println(val); switch(val) // perform action depending on command { case 'w'://turn light on when 'w' received on(); break; case 'q'://turn light off when 'q' received off(); break; //default://otherwise remain in previous state //idle(); break; } } the on() , off() functions switch on , off led on arduino. mentioned, works when i'm using se

PHP and MySQL Display by date and time -

i looking way display upcoming events date out displaying past events. mysql table: id | title | date | time 1 title1 2013-10-5 12:00 2 title2 2013-10-10 12:00 3 title3 2013-10-25 01:00 4 title4 2013-10-31 11:30 i display so: title2 2013-10-10 title3 2013-10-24 title4 2013-10-31 without displaying events have passed. any appreciated! thank you. without changing current structure, use curdate() , curtime() select id, title, date, time titles date >= curdate() , time >= curtime() read on mysql date , time functions

java - Reversed method does nothing to stack -

this method supposed return copy of current stack items reversed. public linkedstack<e> reversed() { linkedstack<e> that= new linkedstack<e>(); if(this.isempty()==true){ return this; } else{ while(this.isempty())//changed this.isempty()==true { node<e> snode=this.top; that.push(snode.getdata()); this.pop(); snode=snode.getlink(); /* that.push(pop()); works */ } return that; } } update ok 1 of answers seems bring me closer solution. works stack created in method. problem i'm having linking stack can return copy of this stack. i'm using linked stack. why not while(!isempty()) { revertstack.push(pop()); } at same time @ original loop particularly first line see may causing problems

list - Returning a copy of an object stack in java -

i have stack method that's supposed return reversed * copy * of this object. need this object link that object. thanks. update to clarify, that stack object that's created pushes items popped this object. want this object reference that object after this object gets empty. want return reversed copy of this object . clear? public linkedstack<e> reversed() { linkedstack<e> that= new linkedstack<e>(); if(this.isempty()){ return this; } else{ while(top!=null) { that.push(pop()); } } return this; } full class import java.util.nosuchelementexception; //import java.util.stack; public class linkedstack<e>{ @suppresswarnings("hiding") public class node<e>{ private e info; private node<e> link; public node(e info,node<e>link){ this.info=info; this.link=link; }//n

javascript - Background image disappears when changing its background-position? -

okay have list of links, so <ul> <li>item1</li> <li>item2</li> <li>item3</li> </ul> and have 340x40 (340 length) image want appear below list item hover on list items. tried this li:hover { background: url(../images/lihover.png); } when this, image appears right on top of list item, not below it. tried adding background-position: 0px 5px; repeat: no-repeat; this gave problem. if image appeared after hovering on item in imaginary container 340x40. , when told move 5px down using background-position, it's if image move down except container image in did not move down. can see image if inside imaginary container, , imaginary container down not move down 5px, image does, 5px of image disappears. removed repeat: no-repeat; and version of image starts appear when move image 5px down using background-position in css. can see bottom 5px of new image , top 335px of old image. why happening , how fix it?

python - pygtk window moves when resized -

setup: os: ubuntu precise (12.04) amd64 python: 2.7.3 gtk: 2.24.0 windowmanager: metacity , fvwm2 both exhibit same behavior i have small pygtk app contains (among other widgets) treeview. window has resizable=false treeview expanded/collapsed, window automatically resizes fit content. works fine. the problem when window resizes, stays centered on was. want top-left corner of window stay in same spot when window resizes. i've found calling parse_geometry() +x+y position induce desired behavior. that's not option. in typical case, want window open mouse is, not in fixed location. i suspect need set gtk.gdk.hint_user_pos, best can tell, pygtk's version of set_geometry_hints() doesn't allow me pass gdkwindowhints c , perl interfaces do. how can make window's top-left corner stay still contents cause window change size? update: since parse_geometry() sets bit me, before gtk.main(), call gobject.timeout_add(500, self.fix_window) the call

c++ - boost spirit on_error not triggered -

^ no not. part of problem, if review code right now, pointed out question/answer shows ... , errors still not triggered. i have boost spirit parser string literal. works. start handle errors when fail. copied on_error handle 1-1 mini xml example , compiles, never triggered (no errors outputted). this parser: #define boost_spirit_use_phoenix_v3 #define boost_spirit_debug #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/phoenix.hpp> #include <boost/spirit/home/support/iterators/line_pos_iterator.hpp> #include <boost/spirit/include/phoenix_fusion.hpp> #include <boost/spirit/include/phoenix_stl.hpp> #include <boost/fusion/include/adapt_struct.hpp> namespace qi = boost::spirit::qi; struct my_handler_f { template <typename...> struct result { typedef void type; }; template <typename... t> void operator()(t&&...) const { std::cout << "\nmy_handler_f() invoked " <&

Ruby on Rails: Devise Gem Admin customization -

how can run code link or button in haml: current_user.update_attribute :admin, true i trying make there section of site make 1 admin. part of making admin accounts in devise wiki have. probably easiest thing create checkbox on edit user form, corresponds admin boolean model field. then, when update action saves user record, update attribute virtue of field being included in form: -form_for @user |f| %p = f.label :admin %br = f.check_box :admin naturally, need restrict access update user form in manner, admins can see it. separate issue, however. hope helps!

ios7 - CMMotionActivityManager - Receiving motion activity updates while app is suspended or in background -

i've been testing new motion activity manager apis ( cmmotionactivitymanager ). want create app can receive , process motion updates startactivityupdatestoqueue while app not running in foreground. correctly receive motion updates (stationary, walking, running, automotive, unknown) while app in foreground goes background (and gets suspended), motion updates cease received app. cmmotionactivitymanager class reference : "this method initiates tracking of motion data asynchronously. upon calling method, motion activity manager executes handler block on specified queue, reporting current motion in effect device. after that, motion activity manager executes handler block when motion data changes. handler block executed on best effort basis , updates not delivered while app suspended. if updates arrived while app suspended, last update delivered app when resumes execution. of updates occurred while app suspended, use queryactivitystartingfromdate:todate:toqueue:withhandler:

haskell - Writing a custom map function -

now there might in haskell libraries want. i'm enough of noob not know better , i'm trying write custom map function using tools know. type signature needs be mymap :: (monad m) => (a -> b) -> [m a] -> [m b] where mymap f as returns list after applying f each of value in each monad in as . my first attempt was mymap f = map (\x x >>= f) however, has type signature of mymap :: (monad m) => (a -> m b) -> [m a] -> [m b] this close need, can scream. need tips of how continue here. hope easy library function, i'm willing write own short function instead. related question: mapping function on 2 input lists if turn (a -> b) function in m -> m b use map itself. so, need this? hoogle quite sort of thing. doing search (a -> b) -> (m -> m b) gives these results: http://www.haskell.org/hoogle/?hoogle=%28a+-%3e+b%29+-%3e+%28m+a+-%3e+m+b%29 near top fmap (which use functor ) , liftm (which use mona

windows - Basic Math Operations with ImageMagick & CMD -

i want crop picture multiple times. postion need start cropping depends on equations: startx = %x * 1024 starty = %y * 1024 i`m unable implment in command line. got: for /l %y in (0,1,5) /l %x in (0,1,5) convert fireball.png -crop 2048x2048+(%x*1024)+(%y*1024)% fireball_(%x,%y).png i'm using windows 7 cmd. i fixed syntax can't vouch algorithm. % after ) may typo if needs there in cmd needs doubled (as shown) equal 1 %. note cmd math integer , tops out @ 2^31 - 1 for /l %%y in (0,1,5) ( /l %%x in (0,1,5) ( convert fireball.png -crop 2048x2048+^(%%x*1024^)+^(%%y*1024^)%% fireball_^(%%x,%%y^).png ) )

iphone - iOS - UITableView delegate not being set? -

Image
the uitableview object have in storyboard theoretically should have delegate set, not. dragged uitableview object storyboard header , added iboutlet property , synthesized it. however, checked , only data source method being called . seems wrong way i'm implementing main delegate protocol. can see in images below, seem doing standardly? delegate not being set still! thoughts? i think reason solution not working because using tableview inside of uiviewcontroller instead of uitableviewcontroller. had same issue while back. here did. create iboutlet header file , synthesize in implementation file (i believe have completed step). go storyboard. control + click on table view , drag connector view controller (the yellow circle white box). select datasource . repeat step again , instead of selecting datasource select delegate . in menu on right-hand side should able see outlets if set correctly. should fix delegate problems. see screenshot example below:

regex - .htaccess - url rewrite that drops extension and passes argument -

i'm looking series of .htaccess statements convert following urls http://mysite.com/product http://mysite.com/product.php http://mysite.com/product/55 http://mysite.com/product.php?id=55 http://mysite.com/category/38 http://mysite.com/category.php?id=38 http://mysite.com/resources/car/19 http://mysite.com/resources/car.php?id=19 http://mysite.com/resources/car/19?color=red&year=2013 http://mysite.com/resources/car.php?id=19&color=red&year=2013 in other words, when rendering php files in website, want drop .php extension. if url ends number, want pass id query string parameter. want pass conventional query string parameters php file color , year . i'm not sure how construct such .htaccess file. additional notes i'm using hte following, fails take consideration urls trail number, , passing along id rewritecond %{request_filename} !-d rewritecond %{request_filename}\.php -f rewritecond %{query_string} (.*) rewr

artificial intelligence - How to create a smart chat-bot? -

i know it's still open problem don't expect see complete answers here. want find approaches solve next problem: i have model (assume is's bot's memory), , different words associated different objects in model. speaking bot executing sql-queries db. language hard formalizable protocol. , can't write million lines of code implement real language. believe it's absolutely possible implement self-learning mechanism. how can implemented? possible implement learning "from scratch" or "from few basic words"? want hear ideas. actually, english strict language , it's 1 of easiest languages experimenting ai. many other languages allow change order of words (for example). , in cases changed order can change whole meaning or add intonation. don't have ideas how teach bot these things. the first step , in taking game next level, ... ...to have clear view of prior art! (and pardon me say, question doesn't suggest have such e

actionscript 3 - Using Flash Builder to connect to a VPN on Android -

i have written program links site have written work have connect vpn. wondering if there way of creating button connect directly chosen vpn connection. any ideas? access android's vpn service isn't available flash builder / action script.

wordpress - Javascript bookmarklet link works one 1 WP site but not the other -

i created post on wordpress site , share several javascript bookmarklets. 2 of them perform google custom search once enter word dialog box. here code 1 of them: <a href='javascript:q = "" +(window.getselection ? window.getselection() : document.getselection ? document.getselection() : document.selection.createrange().text); if (!q) q = prompt("find royalty free wikimedia, enter keyword box below", ""); if (q!=null) window.open("http://www.google.com/images?q= " +"\"i+grant+anyone+the+right+to+use+this+work+for+any+purpose%2c+without+any+conditions%2c+unless+such+conditions+are+required+by+law\" + " + escape(q).replace(/ /g, ""+"")) ; void 0' ; <font color="#000000">wikimedia images</font></a> now reason on test site worked fine, when publishing on personal blog doesn't work. test blog , personal blog on different hosts , running different t

ios - Filter in CoreData? -

i wrote method below -(nsarray*)getclubdetaileddeals:(nsstring *)clubid{ nserror *error; nsmanagedobjectcontext *context = [self managedobjectcontext]; nsfetchrequest * fetchrequest = [[nsfetchrequest alloc] init]; nsentitydescription *entity = [nsentitydescription entityforname:@"clubdetailsdeals" inmanagedobjectcontext:context]; [fetchrequest setentity:entity]; nsarray *fetchedarray1 = [[context executefetchrequest:fetchrequest error:&error] mutablecopy]; clubdetailsdealsdao *obb = [fetchedarray1 objectatindex:0]; nslog(@"my id %@ , count %d", obb.dealname, [fetchedarray1 count]); nslog(@"deal %@", clubid); nspredicate *predicate = [nspredicate predicatewithformat:@"(%k contains %@)", @"clubid", clubid]; //nspredicate *predicate = [nspredicate predicatewithformat:@"dealid contains[cd] %@", dealid]; [fetchrequ

javascript - Why simple factorial algorithms in JS are much faster than in Python or R? -

Image
why javascript being more faster in computation? i've been making tests 4 simple factorial algorithms: recursion, tail recursion, while loop , for loop. i've made tests in r, python, , javascript. i measured time took each algorithm compute 150 factorial, 5000 times. r used system.time(replicate()) . python used time.clock() , resource module, , timeit module. javascript used console.time() , date().getmilliseconds() , , date().gettime() , running script using node via terminal. this never intended compare running times between languages, see form (recursive, tail recursive, loop, or while loop) faster languages i'm learning. performance of javascript algorithms caught attention, though. you can see 4 different factorial algorithms , measurement implementations here: r factorial algorithms , performance. python factorial algorithms , performance. javascript factorial algorithms , performance. on following examples, f stands for loop, w stands while

html - What's the best approach to turn this design into code? -

i've been making portfolio, , didn't limit myself easier code.. so... ended (that's homepage every other page ready in photoshop) http://postimg.org/image/z0w6wb4zb/ so best approach turn html/css? should slice zones, or each layer separately (as in clouds, tree, island.. etc).. told use semantic html i'm not sure understand means here. , do buttons? image maps? wouldn't bad idea? do think design worth trouble anyway? i can't post comment, best can answer, here goes: mr. lister right, image maps way go. but, 1 more item think worth noting, seo value, particularly home/portfolio/contact me/and anchors. 1 potential solution use image-maps... feature detection see if browser allows css rotate functionality. your html <section class="homepage-navigation"> <a class="contact-me nav-link" href="/contact">contact me</a> ... </section> your css be .home-navigation{position:relative