Posts

Showing posts from January, 2012

php - Login issue in chrome browser -

i facing strange issue. have developed application in codeigniter. works fine on local system , on demo server. when move script live server issue arises. the issue : i can login application firefox, internet explorer, safari browser. when try login using chrome, session destroyed after login , redirected login page. i cleared browser catche, still issue exist. url : http://www.hcpdev.com/demo/user/login user : ed_zielinski@clientdemo.com password : 12345 i face same issue . replace system/libraries/session.php file file , problem solved. libraries/session.php just replace session.php file file. honestly don't know changes in file make workable. problem solved

java - Getting null pointer exception while loading -

i getting nullpointer exception when load class offline_day. have tried solve problem unable @ root cause why nullpointer exception occurring. i have edited code after useful advice. still getting npeeception. class this: offline_day.java:- public class offline_day extends dialogfragment implements ondatechangedlistener, ontimechangedlistener { public final static int date_picker = 1; public final static int time_picker = 2; public final static int date_time_picker = 3; private datepicker datepicker; private timepicker timepicker1; private timepicker timepicker2; private calendar mcalendar; private activity activity; private int dialogtype; private view mview; @override public view oncreateview(layoutinflater inflater, viewgroup container,bundle savedinstancestate) { //activity activity; view mview = inflater.inflate(r.layout.offline_day, container, false); mcalendar = calendar.getinstance(); datepicker = (date

mysql - select from two tables and group by a common column date in both tables -

guys looked solution not problem grateful if have 3 tables term1 , term2 , term3 have identical columns adm , date , amountneeded , amountpaid , date format yyyy-mm-dd need retrieve total amountpaid 3 tables , group year the result should be year total 2012 323000 2013 423000 try this select tyear,sum(total) ( select datepart(yyyy,date) tyear ,sum(amountpaid) total term1 group datepart(yyyy,date) union select datepart(yyyy,date) tyear ,sum(amountpaid) total term2 group datepart(yyyy,date) union select datepart(yyyy,date) tyear ,sum(amountpaid) total term1 group datepart(yyyy,date) )a group tyear

c++ - MFC SetTitle() causing weird debug assertion -

whenever call settitle() in mfc application, debug assertion failed. haven't set assert anything; in truth i'm not sure how explain what's going on. i 3 debug assertions loop round continuously dozen times before application continues. if keep clicking "ignore" after 20 clicks boxes go away , applciation continues running normal. the first 2 assertions thrown wincore.cpp lines 952 , 954. area of code is: else if (m_hwnd == hwnd_notopmost) assert(this == &cwnd::wndnotopmost); else { // should normal window assert(::iswindow(m_hwnd)); // should in permanent or temporary handle map chandlemap* pmap = afxmaphwnd(); assert(pmap != null); cobject* p=null; if(pmap) { assert( (p = pmap->lookuppermanent(m_hwnd)) != null || (p = pmap->lookuptemporary(m_hwnd)) != null); } assert((cwnd*)p == this); // must the third assertion thrown dbgrptt.c, line 85. offending code snippet is: _c

expect script regex not working -

this script failing work expected: #!/usr/bin/expect set timeout 2 set server [lindex $argv 0] set user [lindex $argv 1] set password [lindex $argv 2] set mac [lindex $argv 3] set interface "po1" spawn ssh $user@$server expect "password:" send -- "$password\n" expect "*>" send "show mac address-table address $mac\n" # 100 1cc1.de65.441c dynamic ip,ipx,assigned,other port-channel43 expect -re { (\d+) *($mac) *(dynamic|static) *(.*) *(.*)} { set interface $expect_out(5,string) expect "*>" send "show interface $interface status\n" } send "exit\n" interact after issuing show mac command above, output contains 1 line looks 1 commented below it. following expect -re block never hit, making time out , send exit command. sample output: spawn ssh user@host password: ================= host login banner ================= host>show mac address-table address 1

bootstrap-table x-editable plugin, can't set type to select -

i'm using bootstrap-table x-editable plugin, working except unable change type of input on x-editable popup. i've tried setting data-type="select" , type: 'select' shows type text this fiddle shows issue, table should using select type not, link outside of table same options work. <table id="table-hover" data-toggle="table" data-show-toggle="true" data-show-columns="true" data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/"> <thead> <tr> <!-- field doesn't show select input --> <th data-field="name" data-editable="true" data-type="select">name</th> <th data-field="stargazers_count">stars</th> <th data-field="forks_count">forks</th> <th data-field="description">descrip

out of memory - OutOfMemoryError: Java heap space MultipartRequest -

i have problem multipartrequest, when try upload file. error is: outofmemoryerror: java heap space. think error in while cicle, don't know what's wrong. thanks. this code: inputstream = part.getinputstream(); bytearrayoutputstream buffer = new bytearrayoutputstream(); int nread; byte[] data = new byte[16384]; while ((nread = is.read(data, 0, data.length)) != -1) { buffer.write(data, 0, nread); } buffer.flush(); byte[] out = buffer.tobytearray(); 10-jun-2015 15:39:45.146 severe [http-nio-8080-exec-307] org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [tw] created threadlocal key of type [com.sun.xml.ws.api.client.serviceinterceptorfactory$1] (value [com.sun.xml.ws.api.client.serviceinterceptorfactory$1@5901535e]) , value of type [java.util.hashset] (value [[]]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak. 10-jun-2015 15:39:45.146 severe

jquery - Text on a menu becomes invisible -

Image
i'm trying add menu found on tutorial site. reason, despite no errors in console, can't see menu. of blue blur menu suppoused have in corner of page, words , bars themselvs not appear - looks this: after changing z index comments suggested, following menu, looks weird- nothing tutorial. my code: <html> <head> <meta charset='utf-8'> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script> (function($) { $.fn.menumaker = function(options) { var cssmenu = $(this), settings = $.extend({ title: "menu", format: "dropdown", breakpoint: 768, sticky: false

java TreeSet: comparing and equality -

i'd have list of object sorted property 'sort_1'. when want remove i'd use property 'id'. following code represents problem. package javaapplication1; import java.util.treeset; public class myobj implements comparable<myobj> { public long sort_1; public long id; public myobj(long sort, long id) { this.sort_1=sort; this.id=id; } @override public int compareto(myobj other) { int ret = long.compare(sort_1, other.sort_1); return ret; } public string tostring() { return id+":"+sort_1; } public static void main(string[] args) { treeset<myobj> lst=new treeset<myobj>(); myobj o1 = new myobj(99,1); myobj o2 = new myobj(11,9); lst.add(o1); lst.add(o2); system.out.println(lst); myobj o3 = new myobj(1234, 1); //remove myobje id 1

How to save value in ComboBox after refreshing the Rally Dashboard -

so question pertains combobox value custom app created. i've got app on rally dashboard, noticed other in-house rally apps, if choose particular combobox value filter on , refresh page, last used filter still applied data. is there way can mimic behavior custom app? follows default behavior in selecting first value possible. (note: know can use 'value' property set default value know how make saves/responds user selects on page reload). any appreciated! all best, masterme2 as long you're using sdk 2.0 totally supported. check out guide here on maintaining state: https://help.rallydev.com/apps/2.0/doc/#!/guide/state basically need configure combobox stateful. here example making combobox of defect priorities stateful: this.add({ xtype: 'rallyfieldvaluecombobox', model: 'defect', field: 'priority', stateful: true, stateid: this.getcontext().getscopedstateid('priority') }); the relevant prop

c# - How to concatenate string with line breaks, all to be printed in a single label? -

i'm trying concatenate string when send web form, become text in single label. for reason, of different types of line breaks try aren't working. i've tried adding \n (including \r\n ) @ each intended break location, <br /> . \n , doesn't print \n on screen, ignores it, , <br /> , prints <br /> screen want line breaks. i read use environment.newline , if that's solution problem, i'm not sure how concatenate onto end of string. please let me know of other ideas or solutions may have! edit: found answer - converting string raw html have tried &lt;br/&gt; ? if don't escape '<' , '>' renderer doesn't know they're not plain text.

python - Qt platform plugin 'windows' - py2exe -

i know there many posts problem (i've read them all). still have problem exe, still cannot opened. i've tried put qwindows.dll (i tried 3 different qwindows.dll) in folder dist exe doesn't change anyhting. i've tried libegl.dll , nothing. any suggestions ? there way avoid having problem ? i've had issue aswell, after lot of digging found following solution: copy following file next main .exe: libegl.dll copy following file in folder "platforms" next main .exe: qwindows.dll putting qwindows.dll in subfolder important part think, hope helps

javascript - twemoji not converting the strings -

i'm trying use twemoji ( https://github.com/twitter/twemoji ) convert unicode emoji characters. i have simple page: <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title></title> <script src="https://twemoji.maxcdn.com/twemoji.min.js"></script> </head> <body> <span> cool string \ud83c\udf88\ud83c\ud83c\udf88\ud83c\ud83c\udf88\ud83c</span> </body> </html> according documentation when run twemoji.parse(document.body) it should run through page , replace unicode characters tags. not happening if take string , put directly function so twemoji.parse("what cool string \ud83c\udf88\ud83c\ud83c\udf88\ud83c\ud83c\udf88\ud83c"); and run in console in chrome indeed show converted string. what cool string &l

javascript - Second append doesn't work on jquery -

i have form , need append field many times required. if button click add field clicked div should appended. after first append (onload), div responses correctly second 1 on, not getting similar response div . here jsfiddle if click on test button , alert first div on adding div (by clicking click add field button) , button (test) doesn't work anymore second div onwards. i tried clone() unable solve one. may not using correctly. to replicate issue please follow steps:: click on click add field button add div click on test button on second div onwards please take , suggest. in advance. you have use delegation $(document).on('click','.test',function(){ var count = 1; $.fn.addclients = function(add){ var mydiv = ''; mydiv = '<div class="dataadd"><fieldset><legend>test: '+add+'</legend><b>test name :</b> <input type="text" id="ct

Open but not restart app via a Custom URL scheme on Android -

i register url scheme android app , configure file following shows, however, restart app every time way. how make open app , not restart it? thanks. <intent-filter> <data android:scheme="myapp"/> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.browsable" /> </intent-filter> try set android:launchmode="singleinstance" parameter activity calling.

javascript - Saving an html object to firebase -

i'm working in ember.js project has image cropping mechanic. returns me default canvas object , data necessary redraw cropped image. but when try save canvas object firebase saves [htmlobject canvas] or that, when try record , display canvas displays instead of actual canvas object. how can save canvas object firebase use later actual canvas. you have serialize , deserialize image: function serialize(canvas) { return canvas.todataurl(); } function deserialize(data, canvas) { var img = new image(); img.onload = function() { canvas.width = img.width; canvas.height = img.height; canvas.getcontext("2d").drawimage(img, 0, 0); }; img.src = data; } based on this answer . update 1 the canvas.todataurl() method able compress data jpeg compression. using 95% quality drastically decrease filesize photos, compared png. use this: canvas.todataurl({ format: 'jpeg', quality: 0.9 }); based on thi

javascript - Convert a 0-1 value to a hex colour? -

i'm creating app visualises stars using nasa api. colour of star comes 0 1 value, 0 being pure blue, , 1 being pure red. need set way convert 0-1 values in javascript sliding hex (or rgb) scale, progressing this: 0: blue (9aafff) .165: blue white (cad8ff) .33: white (f7f7ff) .495: yellow white (fcffd4) .66: yellow (fff3a1) .825: orange (ffa350) 1: red (fb6252) is possible? don't have idea how begin approach this. cheers! the best work in color space rgb one. example hsl . example: var stones = [ // data {v:0, hex:'#9aafff'}, {v:.165, hex:'#cad8ff'}, {v:.33, hex:'#f7f7ff'}, {v:.495, hex:'#fcffd4'}, {v:.66, hex:'#fff3a1'}, {v:.825, hex:'#ffa350'}, {v:1, hex:'#fb6252'}, ] stones.foreach(function(s){ s.rgb = hextorgb(s.hex); s.hsl = rgbtohsl.apply(0, s.rgb); }); function valuetorgbcolor(val){ (var i=1; i<stones.length; i++) { if (val<=stones[i].v) { var k = (val-stones[

javascript - How to check if a variable is an ES6 class declaration? -

i exporting following es6 class 1 module: export class thingy { hello() { console.log("a"); } world() { console.log("b"); } } and importing module: import {thingy} "thingy"; if (isclass(thingy)) { // something... } how can check whether variable class? not class instance , class declaration ? in other words, how implement isclass function in example above? in es6, there no "class" when code running, have constructor function, or object. do if (typeof thingy === 'function'){ // it's function, can't instance. } else { // other constructor } as long know fact either instance or constructor.

Android WebView accessibility in Lollipop -

i'm having trouble getting talkback work web view (testing nexus 9 on android 5.1). read talkback support added web views around release of android jellybean checking preference titled "enhance web accessibility." can't life of me find preference in system settings. focusing on web view in our application reads "webview" , provides no other options. was talkback support web views removed in kitkat? if not, missing here? am using mobile accessibility plugin read customized talkback my app work fine android 4.4.4 . using aria-hidden=true stop default talkback of mobile accessibility. attribute lollipop doesn't focus event , not reading your question little unclear. can guarantee 1 thing, has nothing "enhanced web accessibility" option. experimental accessibility setting in android 4.1 - 4.2 , has since been deprecated. why cannot find setting. "enhanced web accessibility" did add visual elements users spot t

json - Wordpress Restful Api without html tags -

i have json api plugin installed on wordpress installation, when output restful api , there <p> tags , other html in there example, in app will: a line <p>hello world</p> not hello world (without html tags) does know why , how can fixed? you can try removing filter wpautop content on site. -- assuming "hello world" part of content, , don't mind removing <p> tags everywhere content served. remove_filter ('the_content', 'wpautop'); here more documentation on wpautop https://codex.wordpress.org/function_reference/wpautop

jquery - How do I encode HTML characters within Javascript functions? -

to javascript experts question might basics. i'm using jquery , working on tooltip created jquery.flot. the following part of javascript function within html file , need have tooltip div rendered correctly: $('<div id="tooltip">' + contents + '</div>').css( { because div not shown used firebug reason , line of code above shows special characters < , > encoded html entities < , > can see here: $('&lt;div id="tooltip"&gt;' + contents + '&lt;/div&gt;').css( { i searching several online sources solution , tried things .replace(/lt;/g,'<') or .html().text() , took me more 3 hours nothing helpful. i works fine on localhost. full source code: <script language="javascript" type="text/javascript" src="../javascript/flot/jquery.js"></script> <script language="javascript" type="text/javascript" src="../

Adding same google map search to my site -

i have google map few markers on it. when user clicks get directions button, i'd search box same functionality google map's. when users type address/postcode in it, "directions" button , if clicked on calculate , draw distance between address typed in , closest marker it. i've had @ api, page https://developers.google.com/maps/documentation/javascript/places couldn't find matches google search box , functionalities. know if above doable? you can use places search box far implementing similar google maps. however, you've said, rather places, can away input box, unless need places data. if need directions, you'll want incorporate directions api . input box origin , nearest marker destination, can calculate directions.

c# - Global exception handler in Web API not getting called -

similar question asked here issue concerning 404 error. i have added elmah global handler described here . if raise error in code elmah catches fine, if have sql error ef via controller example, not caught - exception message returned in json 500 error. according article there few cases exception can't caught case doesn't seem 1 of them. can please explain why global error handler in webapi won't catch sql exception? here's handler: public class unhandledexceptionfilter : exceptionfilterattribute { public override void onexception(httpactionexecutedcontext context) { elmah.errorlog.getdefault(httpcontext.current).log(new elmah.error(context.exception)); } } and here's it's registered in webapiconfig.cs public static void register(httpconfiguration config) { ---- config.filters.add(new unhandledexceptionfilter()); }

c# - Deferred type inference for inherited class method -

what i'm trying do, without success, method on base class that, using reflection, update properties defined inherited classes. so, starting specific method this /** fill item xml node */ public tblitem fromxml (xmlnode itemnode) { foreach (xmlnode itemfield in itemnode) { type mytype = this.gettype (); propertyinfo mypropinfo = mytype.getproperty (itemfield.name); if (mypropinfo != null) { mypropinfo.setvalue (this, convert.changetype (itemfield.innertext, mypropinfo.propertytype), null); } else { throw new missingfieldexception (string.format ("[fieldname]wrong fieldname: {0}", itemfield.name)); } } return this; } i need defined in base class called i.e. tblbase , containing no properties @ all, , being used seamlessly in derived classes, i.e. tblderived1: tblbase etc. in there different properties defined each of them, i'm here asking: there way or dream of dirty mind?

ios - How to make a Reminder notification? -

how make reminder notification? for example, have reminder application , want notification on event time (like iphone calendar notification). follow tutorial , learn how send push notifications. in case think need send local notifications, still quite complicated. need certificates provision sending push notifications. https://parse.com/tutorials/ios-push-notifications good luck!

css - I want to merge two cells together in the proposed html layout -

i'm using this layout , can see there section 8 pictures on bottom of page - each of them hyperlink bigger image. works pretty neat, esp. when resize page smaller size, 4 cells becomes 2 , looks like this . want change little, 2 first pictures merged together, layout like this , , when user resizes it, show him proper layout like this . far html code specific part of page looks this: <section class="screenshots" id="screenshots"> <div class="container-fluid"> <div class="row"> <ul class="grid"> <li> <figure> <img src="img/02-screenshot.jpg" alt="screenshot 01"> <figcaption> <div class="caption-content"> <a href=&

c# - WinForms firing Enter event twice -

i've got following: private void fooform_enter( object sender, eventargs e ) { foobar() } private void foobar() { console.out.writeline( "foo" ); /* stuff */ othercontrol.focus(); } the problem i'm experiencing here see text in console twice, though put focus on fooform once. however, if comment out othercontrol.focus() line, foobar called once. (no, othercontrol not same object fooform.) what causes , can make sure foobar called once? according msdn documentation : do not attempt set focus within enter, gotfocus, leave, lostfocus, validating, or validated event handlers. doing can cause application or operating system stop responding. you appear doing that.

How to send to a specific email using Javascript forms? -

i want have can fill out kind of form (below) , when click "send" send specific email have inputted. meaning, declaring information filled out in "email" field variable , somehow have "mailto:" link send email address. hope makes sense. i'm not entirely sure how explain it. it seems relatively simple, i'm not having luck (javascript not strongest language). <!doctype html> <html> <body> <h2>send e-mail someone@example.com:</h2> <form action="mailto:someone@example.com" method="post" enctype="text/plain"> name:<br> <input type="text" name="name" value="your name"><br> e-mail:<br> <input type="text" name="mail" value="your email"><br> comment:<br> <input type="text" name="comment" value="your comment" size="50"><br><br&g

javascript - How to set value in input text with choices -

i have element: <input type="text" title="test" choices="aucune|0| testa|1| testb|2|" /> i'd select value id 2, how can achive this? solution: i found solution on post: when have more 20 items in input select changes input text linked hidden selected value http://geekswithblogs.net/soyouknow/archive/2011/04/06/setting-sharepoint-drop-down-lists-w-jquery---20-items.aspx use select <select> <option value="0">aucune</option> <option value="1">testa</option> <option value="2" selected>testb</option> </select>

ios - How to update UIWindow based on changes to another UIWindow? -

the situation arises when iphone/ipad connected external display . in normal situation, entire device's screen gets mirrored external display. but, need screen on external display display content different in device, specific view/page. i have uiimageview inside uiscrollview, , related buttons (next, previous, etc) part of specific view controller of app. want external device display content in uiscrollview (that is, buttons not shown). this, seems have create instance of uiwindow external display screen. but, how can make uiwindow (and it's content) in external display respond correspondingly changes made main uiwindow (the 1 displayed in iphone/ipad). is, changes zooming in , zooming out. you can somthing this: - (void)checkforexistingscreenandinitializeifpresent { if ([[uiscreen screens] count] > 1) { // screen object represents external display. uiscreen *secondscreen = [[uiscreen screens] objectatindex:1]; // screen&#

c - EEPROM data to TeraTerminal -

i attempting read data external eeprom using atmega324p. issue coming loop. cannot past reading 4 pages (4 x 64b) of eeprom data. if increase loop counter 4 5 stuck in infinite loop of uart0 transmits. here code have currently: // create array store logged off eeprom data , use //in sending bytes teraterm. location 0-15 hold first assertlog uchar aucteratermmsgbuf[ext_eeprom_page_length]; //length 64b void teratermoutputmsg(void) { //configure uart0 want purposes teratermconfiguart0(); //define starting address read from. each time button pushed //we begin reading beginning of memory array (aka full dump of eeprom stored data) uint16 eepromreadaddress = 0x0000; //loop thru whole eeprom 1 page of data @ time , send it. //cant past 4 pages though.... todo fix for(uint16 uspagessent = 0; uspagessent < 4; uspagessent++) { //get 1 page of log specified address in eeprom , store //array of type uchar , length of 1 page (64b). teratermgetassertlog(

matlab - Use derivative of function directly as an anonymous function -

i ask, if possible create anonymous function directly return value after using diff function? without copy text console , add manually anonymous function. eg. xy @(x)=diff(x^2,x); and using afterwards as: xy(3) , on. you can use symfun symbolic function: syms x f(x) = x^2; % equivalent to: f = symfun(x^2,x); df = diff(f,x) % since f symfun, df df(3) which returns df(x) = 2*x ans = 6

java - Username and password validation from database to jsp view page -

if username , password retrieved database incorrect show error on jsp page instead of re-directing page. right showing message validation servlet if username , passwords invalid. how show message on front end using javascript or anyother tool jsp view? below login form: <form id="loginform" class="form-horizontal" name="myform" method="post" action="validateloginservlet2.do" onsubmit="return validatelogin()"> <input type="text" class="form-control" name="uname" placeholder="username"> <input id="login-password" type="password" class="form-control" name="pwd" placeholder="password"> <input type="submit" value="login" href="#" class="btn btn-success" /> </form> and validate login servlet: protected void dop

symfony - Symfony2 global variable holding registration form -

i create , make available in twig user registration form follows: public function registeraction() { $registration = new registration(); $form = $this->createform(new registrationtype(), $registration, array( 'action' => $this->generateurl('account_create'), )); return $this->render( 'rezialrezialbundle:account:register.html.twig', array('form' => $form->createview()) ); } this works fine. however, want registration form available through html button persists along several pages on website (typical register button on site's topbar). the issue here, requires me duplicate above code creating form remaining controllers of application! is there way make registration form available through sort of global variable? yes, need embed controller . example, if have somepage.html.twig , in page, this: {{ render(controller("acmebundle:controllername:register")) }} pa

c - Query, if a heap is executable -

let's have heap handle heapcreate , or other heap-related function. i find out if given handle has heap_create_enable_execute flag set it. currently see no api, this, since relevant function, heapqueryinformation different. obviously, using visual c. is such thing possible?

Can Chrome extension content script access all tabs? -

basically, want opened tabs of browser window, within tab, more specifically, in content script . i tried chrome.tabs.query , works in background script , doesn't work in content script . so questions are: is there way such work? maybe api wasn't aware of? or, can dispatch event content script , capture event in background script , , vice versa? or, impossible? according https://developer.chrome.com/extensions/content_scripts , content script cannot access chrome.* apis, except few allowed ones chrome.tabs not among them exchanging messages parent script possible, though, might way it. see https://developer.chrome.com/extensions/messaging

python - Succeeds in building rodeo 0.4.3 but fails to run with ubuntu 15.04 -

i have build rodeo data oriented ide python: $ sudo pip install rodeo -u directory '/home/jeanpat/.cache/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. directory '/home/jeanpat/.cache/pip/http' or parent directory not owned current user , cache has been disabled. please check permissions , owner of directory. if executing pip sudo, may want sudo's -h flag. requirement up-to-date: rodeo in /usr/local/lib/python2.7/dist-packages requirement up-to-date: mistune in /usr/local/lib/python2.7/dist-packages (from rodeo) requirement up-to-date: ipython>=3.0.0 in /usr/local/lib/python2.7/dist-packages (from rodeo) requirement up-to-date: docopt in /usr/local/lib/python2.7/dist-packages (from rodeo) requirement up-to-date: pyzmq>=13 in /usr/local/lib/python2.7/dist-packages (from rodeo) requirement up-to-date: flask>=0.10.1 in /usr/

how to handle two different types in an Array in Swift for a UITableView -

we thinking of migrating app obj-c swift. 1 issue have uitableview in our obj-c code has objects either of type header or of type item . basically, resolves type has @ cellforrowatindexpath. swift arrays (to best of knowledge) can handle single type. given this, how handle 2 different types used in uitableview? wrapper object dataobj have nillable instance of each work? here approach uses protocol unite 2 classes: protocol tableitem { } class header: tableitem { // header stuff } class item: tableitem { // item stuff } // array can store objects implement tableitem let arr: [tableitem] = [header(), item()] item in arr { if item header { println("it header") } else if item item { println("it item") } } the advantage of on [anyobject] or nsmutablearray classes implement tableitem allowed in array, gain type safety.

react native - DeviceEventEmitter stops emitting events to application when screen locked -

i'm capturing location information native module , attempting send via deviceeventemitter application: [self.bridge.eventdispatcher senddeviceeventwithname:@"locationupdated" body:locationevent]; this works great when screen on. however, when screen locked, react native stops pushing these events application. push them, after screen unlocked. suboptimal - there way have react native keep pushing them when screen locked such app can continually process them? i wonder if related " [timer] react events not fired if device locked , screen turned off "? depend on how deviceeventemitter implemented internally seem starting point , jaygarcia gives few more hints in comment thread he's seeing same problem are. news last comment on issue indicates getting fixed pretty soon.