Posts

Showing posts from January, 2015

adt - How can I install a previous Android Support library (version 8) -

i have installed latest adt tools eclipse, i'm right @ v20.0. this release introduced new project wizard, , in 1 of last steps says requires android support library version 8. ok, in sdk manager tells me have android support library version 9 installed. how can working, there way install older android support library version 8? ok, posted question , did found workaround . it seems adt looking support libraries in wrong folder... folder libraries in is: (1) \extras\android\compatibility adt looks them in: (2) \extras\android\support have create folder (2) , copy files in folder (1) it.

parallel processing - Most efficient way to notify serving machine when served has completed task (all within a local network)? -

i have tentative plan write script that, given large task, parallel processes job across local network of linux machines. my question is, how can best notify computer serving parts of job child computers when child has completed chunk of job? first thought have each child write known file status updates, seemed inefficient. there better solution? ps: know question sparse on details. first time working lot of these concepts , involved. learning go, if there's relevant haven't included, please let me know , can try include it. try have @ gearman (http://gearman.org/). hope fit task mine. takes responsibility client-worker notifications. task have 2 pieces: the worker pick piece of job gearman, it's job , return result back. the client chunk whole job pieces , feed gearman, wait until done , "clue" results returned gearman. the gearman middle man serves queue of tasks.

jquery - javascript capitalization -

var font_name = $(".font").val(); i have in javascript code. in html have input form class .font . i want capitalize first letter of each word in .font , example if types in lucida sans it'll turn lucida sans . couldn't find jquery method guess have use actual javascript have no idea how. var font_first = font_name.substr(0,1); var font = font_first.touppercase() + font_name.substr(1, font_name.length - 1); i used capitalize first letter of whole font name said need capitalize first letter of each word. can not use css? .font { text-transform: capitalize; } in jquery: $(".font").css("text-transform","capitalize");

html - URL to open iOS app in App Store web page and iTunes app simultaneously -

what preferred url use open ios app in it's app store web page itunes app (when available on host device)? i've tried using itms:// protocol opens app details in itunes app , of no use when url navigated android or windows phone example. i believe want @ browser determine link use. if browser safari on ios device, give them itunes protocol link, otherwise, http://. i believe javascript allows read such information: take here: http://www.w3schools.com/js/js_browser.asp

Get sample URL for downloadable product in Magento -

i'm trying sample file url downloadable product in cross sell block on product page. the contents of crosssell.phtml <?php $_helper = $this->helper('catalog/output'); ?> <?php $_product = $this->getproduct(); ?> <?php if($_crosssellproducts = $_product->getcrosssellproducts()): ?> <div id="music-crosssell-modal" style="display:none;"> <div class="modal-inner"> <span id="music-crosssell-header">featured music</span> <ul id="music-crosssell-products-list"> <?php foreach ($_crosssellproducts $_item): ?> <?php $_item = mage::getmodel('catalog/product')->load($_item->getid()); ?> <li class="music-item paused" id="<?php echo urlencode($this->htmlescape($_item->getsongtitle())) ?>"> <span class="player">loading...</span> <span class="track-title"><?php echo $this->ht...

php - Getting node ancestors using Doctrine 1.2 and Symfony 1.4 -

i've little trouble while trying ancestors node; this schema.yml: constante: connection: doctrine tablename: constante actas: nestedset: hasmanyroots: true rootcolumnname: parent_id columns: id: type: integer(8) fixed: false unsigned: false primary: true autoincrement: true parent_id: type: integer(8) fixed: false unsigned: false primary: false notnull: true autoincrement: false lft: type: integer(8) fixed: false unsigned: false primary: false notnull: true autoincrement: false rgt: type: integer(8) fixed: false unsigned: false primary: false notnull: true autoincrement: false level: type: integer(8) fixed: false unsigned: false primary: false notnull: true autoincrement: false cod_interno: type: string(5) fixed: false unsigned: false primary: false notnull: false autoincrement: false nombre: type: string(64) fixed: false unsigned: false primary: false notnull: true autoincrement: false and how i'm trying ancestors node (which not root) $path = doctrine_core::gettable(...

Receive ByteArray in Actionscript 3 from Java Servlet -

i typing question solved problem , don't wanted toss (and encouraged http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/ ), , decided share problem-solution. the problem want retrieve bytes java application server, means, via servlet load in flash game replay feature. there questions trying solve other way problem, means, as3 server (php, java, etc): how send binary data as3 through java filesystem? , how can send bytearray (from flash) , form data php? , uploading bytearray via urlrequest , pushing bytearray post . didn't find i'm sharing (correct me if i'm wrong). well, said in question, encouraged stackoverflow answer , here is: the servlet doget method gives byte array: protected void doget(httpservletrequest req, httpservletresponse resp) throws servletexception, ioexception { mouseinput oneinput = getmouseinput(); //abstracted (i'm using google appengine) byte[] inputinbytes = oneinput.getinbytes(); outputstream o = res...

objective c - Setting keyboard type doesn't affect the keyboard. What's wrong? -

Image
changing keyboard type of uitextfield doesn't affect keys appear on ipad simulator. have no clue why it's not working. attributes keyboard this working correctly, there no iphone equivalent on ipad. see post: ipad numeric keyboard

java - Scala REPL only runs as root user, gives error when run as non-root -

i'm running 64-bit opensuse 12.1, today downloaded latest scala 2.9.2 official website, after unpacking tgz , go scala-2.9.2/bin directory, executed "scala" , got error message: [init] error: error while loading <root>, error in opening zip file failed initialize compiler: object scala not found. ** note of 2.8 scala not assume use of java classpath. ** old behavior pass -usejavacp scala, or if using settings ** object programatically, settings.usejavacp.value = true. i attempted run scala -usejavacp doesn't help. i've been using scala lot in many other distros , have never got error before. my opensuse installation has openjdk 6 installed. please suggest opinions, thank you! i have made following attempts solve problem: install oracle jdk 1.7 , run scala, confirmed scala repl reports running in hotspot jvm 1.7, same error occurs. installed sbt , run "console" sbt, same error occurs. strace , diff output between sudo scala , scala normal ...

c# - Single LINQ expression to tally up several columns in a DataSet -

i have dataset several rows , columns (as datasets tend have). need create tally row on bottom sums of each column. i'd single linq expression, simplify bunch of code. can total of single column so: var = (from m in month <some long expression> select m["bgco_minutes"] decimal?).sum(); however, want totals other columns well. don't want use multiple linq expressions because there's complicated where clause in there, , i'm doing several tally rows various expressions , want loop through set once. don't want manually loop through dataset myself , add totals since i'm creating many of these tally rows , think messier. what want anonymous type contains total of bgco_minutes , 800ib_minutes , tsdata_minutes . is there way this? you this: // run filters once , list<datarow> matching rows var list = (from m in month <some long expression> select m).tolist(); // build summary object var result = new { bgco_minutes = list.sum(m =...

ios - Preventing annoying HTML5 geolocation alerts inside UIWebView -

Image
whenever script requests geolocation using html5 's geolocation api, uiwebview asks permission use ios location services. this pretty annoying, specially when load static html files, keeps asking permission each file, if user granted permission app itself. is there way prevent it? i know on safari permission geolocation based on domain , agree on asking permission when request done different domain, shouldn't uiwebview have same geolocation permission app when loading static html or local files? am doing wrong? you can pass geolocation app javascript loaded webuiview. 'stringbyevaluatingjavascriptfromstring' in webuiview?

Replicate only documents where {'public':true} in MongoDB -

i have following network/mongodb setup: 1 primary mongodb database ( 10.0.0.1 , not accessible internet) - contains private info in collection a, , collection b, documents created trusted user. @ point in time, user can mark document in collection b 'public', changes property {'public':false} {'public':true} . 1 public mongodb database ( 10.0.0.2 , runs webserver accessible internet via reverse proxy) - not contain collection a, should contain documents marked 'public' collection b. machine serve public documents users outside network. how set mongodb when document in primary database ( 10.0.0.1 ) updated {'public':true} , gets replicated public mongodb database ( 10.0.0.2 )? other details: i'm using php driver the documents small, max 2kb the load on these servers never exceed 10 concurrent users eventual consistency ok, few minutes, i'd know options are. so, reiterate, here's use case: john vpns our private network...

Django: Haystack resets, won't find results, when syncing with Heroku -

Image
i uploaded first django project heroku and, far, it's working 1 exception. every time push updated version of project heroku... git push heroku master ...haystack no longer recognizes of items in database, resulting in empty search results. isn't migration; regular push of updated code. when new items added, these appear in search. when sync takes place, results turn empty. i'm using haystack woosh. i'm not sure how rectify or may causing this. if has experience or knowledge may help, welcomed. django: haystack resets, won't find results, when syncing heroku - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack exchange communities company blog tour start here quick overview of site center detailed answers questions might h...