Posts

Showing posts from March, 2012

How to detect on C++ is windows 32 or 64 bit? -

how detect on c++ windows 32 or 64 bit? see lot of examples in .net need c++. iswow64process() dosen't works me, becouse "if process running under 32-bit windows, value set false. if process 64-bit application running under 64-bit windows, value set false" if have 32 bit proc under 32 bit os have false if have 64 bit proc under 64 bit os have false but dont care process bit need os bit the win32 api function detect information underlying system getnativesysteminfo . call function , read wprocessorarchitecture member of system_info struct function populates. although possible use iswow64process detect this. if call iswow64process , true returned, know running on 64 bit system. otherwise, false returned. , need test size of pointer, instance. 32 bit pointer indicates 32 bit system, , 64 bit pointer indicates 64 bit system. in fact, can information conditional supplied compiler, depending on compiler use, since size of pointer known @ compile time. ...

wpf - How to create a generic view model -

i have create generic viewmodel passing entity 1 many relationship. i'll explain: windows: <window x:class="invoice_example_brux.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:invoiceexamplebrux="clr-namespace:invoice_example_brux" title="mainwindow" height="350" width="525"> <window.datacontext> <invoiceexamplebrux:mainwindowviewmodel/> </window.datacontext> <grid> <textbox horizontalalignment="left" height="23" margin="174,78,0,0" textwrapping="wrap" text="{binding mymodel.name}" verticalalignment="top" width="120"/> <label content="id" horizontalalignment="left" margin="10,53,0,0" verticalalignment="top"/> <textbox horizontalalig...

ios - Check if user exists using CoreData before loading the first screen -

i have made ios 7 app using xcode5. app includes coredata. want check if user exists before first screen loading. first screen dependent on the user in database. if user exists, dashboard screen loaded. if user doesn't exist, login screen loaded. i check if user exists in viewdidappear method of loginview, guess not necessary load view first, because of of time don't need loginview.

javascript - Why jQuery toggle function changes the width of my div? -

i have button want use switching between 2 divs, hiding one, , showing another. first div shows alright, when switch happens, , second div shown, width minimized, , not same. <button id="flipgraphs">change</button> my divs following: <div class="graph hidden"><%= line_chart @weekly_graph %></div> <div class="graph"><%= line_chart @daily_graph %></div> this jquery code: <script> $(document).ready(function(){ $('#flipgraphs').click(function(){ $('.graph').toggle(); }); }); </script> how can eliminate problem, , make 2 graphs (divs) show normal width, , not affected toggle funcion? any highly appreciated. in css give fixed width. e.g: div.graph { width: 500px;} or inline style: <div class="graph hidden" style="width: 500px;"><%= line_chart @weekly_graph %></div> <div class=...

python - Issues with GAE allocate_ids and get_or_insert -

i'm trying combine allocate_ids() , get_or_insert() in python gae app using datastore. used id = mymodel.allocate_ids(1)[0] key = ndb.key('mymodel', id) m = mymodel.get_or_insert(key.id(), **{'text' : text}) but raises "typeerror: name must string; received 1l". according guido's answer on ndb & get_or_insert how use ? (alway raise exception) , have pass string get_or_insert, key.string() none. use m = mymodel.get_or_insert(str(key.id())) but creates new entity, e.g. key (mymodel, '1') instead of allocated (mymodel, 1). what's best way solve , combine both? -- update: edit correct mistake on get_or_insert discussed in first comment thread do not m = mymodel.get_or_insert(str(key.id())) creating complete different key, key create using numeric id. if want functionality of get_or_insert using numeric id need replicate code in _get_or_insert_async out str check, there explicit check name being str. o...

matlab function "m = size(X,dim)" equivalent in opencv -

i new matlab, can me find equivalent opencv method matlab method "m = size(x,dim)"". better if know does? online documents not helpful little knowledge. thanks update: what role of dim "m = size(x,dim)" , how works. image(x) size of 200 * 200 , if pass dim=1, m=1 in matlab , if pass dim =2 , 40. can pl explain. code: image = 'd:\proposals\others\test_some_title1.jpg' top=size(image,2) as code: image = 'd:\proposals\others\test_some_title1.jpg' top=size(image,2) image here not image. string containing file name (which happens image, size function doesn't know that). string indeed 40 characters long, hence result. read in image, use imread . also, image function in matlab. if make variable called image stop using function (this source of lot of matlab errors).

delphi - Store and View TIFF images without third party components -

how can store tiff image in oracle db blob field? same image need display in ui querying db again after time. i see codes higher versions of delphi. need delphi 6 without using third party dlls , components delphi 6 not come libraries can save , load tiff images. since have ruled out use of third party libraries need write tiff image loading , saving yourself.

python - Flask migration error -

i've got application build on flask , wanted create new migration today. when run $python manage.py db upgrade i got message raise util.commanderror('only single head supported. ' alembic.util.commanderror: single head supported. script directory has multiple heads (due branching), must resolved manually editing revision files form linear sequence. run alembic branches see divergence(s). so run command $alembic branches no config file 'alembic.ini' found, or file has no '[alembic]' section any clue on about? the error messages coming alembic, use command form alembic <command> , integrating flask coming flask-migrate, need use form python manage.py db branches . to resolve multiple branches, make 1 of branches point down other branch upgrade graph straight line. see alembic's docs on branches: http://alembic.readthedocs.org/en/latest/branches.html

linux - Java: Proper way to resize SWT shell to maintain aspect ratio -

i did see other threads here on task. recommended answer pretty implemented, see code below. code works okay on windows (head shaking bit), on centos of time application locks. assume application goes infinite loop or something. my thought add java equivalent of c#.net application.doevents(), not find how , other threads here on consider improper solution , time should spent implement proper solution. the problem on windows when resize application, see brief outline / flash of application in desired size user wants , final size maintains aspect ratio. prefer clean no jitter. need support centos (linux), hence question here. here code fragment. public class appmain { public shell shell; public display display; public controllistener oshellcontrollistener; public boolean isresizing = false; protected void createcontents(display display) { shell = new shell(swt.shell_trim); shell.setminimumsize(new point(660, 690)); oshellcontr...

javascript - Understanding underscore bind -

function checkbalance() { return this.balance; } function person(name, balance) { this.name = name; this.balance = balance; } var me = new person('tim', 1000); _.bind(checkbalance, person); console.log(checkbalance()); //undefined i know case checkbalance should on prototype of person object, i'm failing understand why bind method isn't working here. i've tried both person , me context _.bind bind checkbalance, keep getting undefined. what's going on here i'm getting undefined? bind(func, obj) returns new function identical func except this inside of function refer obj . you're binding this in checkbalance function person function, when seems mean bind this me . try this: var f = _.bind(checkbalance, me); console.log(f()); //1000 or, reassigning same function: checkbalance = _.bind(checkbalance, me); console.log(checkbalance()); //1000

c# - Windows Phone - Binding TextBox or other control to CommandParameter of Button -

i'm making first steps using commands (by implementing icommand interface) in windows phone applications. i've run problem can't seem figure out. i'm binding control, in case it's textbox, commandparameter property of button : <button x:name="btn_search" style="{staticresource buttonnopressedstyle}" borderthickness="0" ccontrols:tilteffect.istiltenabled="true" grid.column="1" height="85" margin="0,0,0,-2" commandparameter="{binding elementname=tb_search}" command="{binding searchtermcommand}"> <button.background> <imagebrush imagesource="/assets/images/searchbtn.png" /> </button.background> </button> when application starts , viewmodel instantiated, canexecute method gets fired twice in row. public override bool canexecute(object param...

Selenium WebDriver Java - Clicking on element by label not working on certain labels -

i trying click on element label. here code using: driver.findelement(by.xpath("id(//label[text() = 'label text here']/@for)")).click(); it works (select all) & hayward cant find los angeles, san fran, or san jose. update: for guess may best option until see better. allow user pass full string , function in method grab last word of string , insert contains xpath. public void substringlocationtest(string location) { string par = location.substring(location.lastindexof(" ") + 1); driver.findelement(by.xpath("//label[contains(text(), '" + par + "')]")).click(); } here html code: <div id="reportviewer1_ctl04_ctl03_divdropdown" onclick="event.cancelbubble=true;" onactivate="event.cancelbubble=true;" style="border: 1px solid rgb(169, 169, 169); font-family: verdana; font-size: 8pt; overflow: auto; background-color: window; display: inline; position: absolute; z-inde...

javascript - Why is the a form fade function not allowing validation? -

is code correct? want 'submit' validate field (to make sure value has been entered) , if correct (there value) fade , display. currently, form fades when no value entered? feel i'm missing simple here! <!doctype html> <html> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8' /> <meta http-equiv='x-ua-compatible' content='ie=edge,chrome=1' /> <link rel='stylesheet' type='text/css' href='styles.css' /> <meta charset="utf-8"--> <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> <script> function validateform() { var x=document.forms["myform"]["fname"].value; if (x==null || x=="") { alert("first name must...

c# - The underlying connection was closed - webAPI ,WCF -

i have rest service calling wcf service. method in wcf service returns data expected. here json format of c#object. [ { "$id": "1", "children": [], "id": 1, "name": "1", "owner": { "userid": 1, "username": "testuser", "firstname": null, "lastname": null }, "parent": null, "permissions": [], "type": 0 } ] when there complex object wcf service throwing error "the underlying connection closed: connection closed unexpectedly" [ { "$id": "1", "children": [ { "$id": "2", ...

symfony - Symfony2 - Image uploaded only displays when being called in the Twig file -

i have problem displaying uploaded image web/images when using following line below while inside of blog text or using data fixture. i've tested manually calling in code display image inside of twig file want use in fixture/entering in blog text customize size/alignment of images each post. can show me what's preventing image displaying? cheers! this refuses display image while in fixture or inside blog text: (shows outline of proper sizing , alignment of image inside blog text not image itself) <img class="alignleft" src="{{ asset(['images/', news.image]|join) }}" alt="" width="290" height="275" /> using web link image works fine when in fixture or when entering blog text: <img class="alignleft" src="http://www.example.com/example.jpg" alt="" width="290" height="275" /> using autoescape false display blog text: {% autoescape false %} ...

javascript - how to edit the text of row in jQuery +JQM -

this question has answer here: binding click event of row jquery 1 answer i creating demo in make row in button click .i want edit it's text when click generated row "it generate row inside container".can give option change text of row while clicking edit button .it thing open pop when press done save text on same id ? http://jsfiddle.net/k7zj4/2/ function createtestcase(testcasename,iscreatedfromscript,jsonobject) { var id; if (typeof ($("#testcasecontainer li:last").attr('id')) == 'undefined') { id = "tc_1"; } else { id = $("#testcasecontainer li:last").attr('id'); var index = id.indexof("_"); var count = id.substring(index + 1, id.length); count = parseint(count); id = id.substring(0, index) + "_" + parseint(coun...

sql - Query has no destination for result data, although it should -

here simplified version of function have: create or replace function my_funct(user_id integer) returns integer $body$ declare my_var integer; begin //.................... if not exists (select * table1) return 0; end if; my_var := (select count(*) table2 inner join .............. ); return (select field1 table3) - my_var; end; $body$ language plpgsql volatile cost 100; alter function my_funct(integer) owner postgres; but call play framework, error: [psqlexception: error: query has no destination result data hint: if want discard results of select, use perform instead. where: pl/pgsql function my_funct(integer) @ sql statement] update: ------------------------------------------------ if not exists (select * table1) select try_to_update_table1(user_id); -- cause. updates table1 end if; if not exists (select * table1) return 0; end if; ------------------------------------------------ the code display should wo...

javascript - How to prevent div's height enlarging with fiddle now) -

asked question yesterday. fiddle works fine problem empty space after image. how can prevent it? js: var indentionfix=0; var topindentioninfo=-730; var leftindentioninfo=100; var data="3|name1 a,4|name2 a,1|name3 a,2|name4 a,5|name5 a,6|name6 a,8|name7 a,555|name8 a"; var tickets=data.split(","); var ticketsamount=math.ceil(tickets.length/4); var ticketscount=0; for(var i=0;i<ticketsamount;i++){ $("body").append("<div id='wrapperdiv_"+i+"' class='wrapperdiv'><img src='http://s30.postimg.org/d4fb4w9ox/for_print.jpg' /></div>"); topindentioninfo=-730; indentionfix=0; for(var j=0;j<4;j++){ if(ticketscount<tickets.length){ var infodiv=$("#wrapperdiv_"+i).append("<div id='infodiv_"+ticketscount+"''></div>"); $("#wrapperdiv_"+i).css({"min-height":...

jquery - Javascript dynamic IF regex condition without eval? -

i'm adding multi-group checkbox filtering (multiple unordered lists of checkboxes) web app , i'm stuck trying around using eval (or maybe shouldn't worry in case?). basically, data called 1 ajax call, i'm storing in array of objects , i'm doing live filtering without making additional ajax calls. when checkboxes checked i'm using .match() , i'm creating regular expression string values in array (k category object property, such category1): filterargs.push("(data['" + k + "'].join(', ').match(/" + filters[k].join('') + ".+/))"); the filters array set in loop above , looks (v actual string value - category name): filters[k][z] = '(?=.*\\b' + v[z] + '\\b)'; then i'm joining filterargs: return filterargs.join(' && '); filterargs passed if statement condition eval this: if(eval(filter_setup())){ so, if if statement true, correct object main data array inc...

android - How do I pull the string name array from this json object? -

{"categories":[{"id":"1","name":"asdf"}]} its json string. want value of name key .. how can in android ? pleass help blockquote here json parsing exception handling , null checks : //get json string first response , convert json object jsonobject object; try { object = new jsonobject("yourjsonstring"); } catch (jsonexception e) { e.printstacktrace(); object = null; } jsonarray jsonarray; if (object != null) { object categoryobject = null; try { categoryobject = object.get("categories"); } catch (jsonexception e) { e.printstacktrace(); categoryobject = null; } if (categoryobject != null) { if (categoryobject instanceof jsonarray) { //if categoriew array having more 1 items jsonarray = (jsonarray) categoryobject; } ...

java - InflateException Binary XML file at line #7: Error inflating class fragment -

i've been doing research of problem no solution has yet work me. i've added empty constructors in fragment classes , tried different imports of fragments, nothing seems work. hope guys can me! my activity: package com.example.com.example.android.rssfeed; import android.app.activity; import android.os.bundle; public class rssfeedactivity extends activity implements mylistfragment.onitemselectedlistener { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_rssfeed); } public void onrssitemselected(string link) { detailfragment fragment = (detailfragment) getfragmentmanager().findfragmentbyid(r.id.detailfragment); if (fragment != null && fragment.isinlayout()) { fragment.settext(link); }//end if }//end method onrssitemselected }//end class my fragment: package com.example.com.example.android.rssfeed; import android.app.activity; import android.os.b...

uitableview - UItableViewCell not dequeing properly ios -

Image
using uitableview , found cells not dequeuing properly. here code have written.i have read that, have override prepareforreuse , how use method, not getting. please me out. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; cell= [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell==nil) { cell=[[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier]; } textlabel = (uilabel*)[cell viewwithtag:11]; textlabel.font=[uifont fontwithname:@"myunderwood" size:16]; textlabel.text = [_tablelabelarray objectatindex:indexpath.row]; return cell; } here image of uitableview getting when scroll tableview i not sure if fix issue, code uses local uicell * variable, uses self.tablelabelarray rather accessing property ivar directly , uses textlabel property rather searchin...

java - Generating Custom Color Palette for Julia set -

Image
i need algorithm or method generate color palette color julia set images. when using escape time algorithm generate image example come following image: however need way generate custom color palette on the wikipedia page : how achieve image similar that? also, color smoothing algorithm should used julia set? here code snippet clarification: int max_iter = 256; complexnumber constant = new complexnumber(creal,cimag); float saturation = 1f; for(int x=0; x<width; x++) { for(int y=0; y<height; y++) { complexnumber oldz = new complexnumber(); complexnumber newz = new complexnumber(2.0*(x-width/2)/(width/2), 1.33*(y-height/2)/(height/2) ); int i; for(i=0;i<max_iter; i++) { oldz = newz; newz = newz.square(); newz.add(constant); if(newz.mod() > 2) break; } float brightness = ...

c++ - Nested enum and nested class have different behavior -

consider these 2 examples: struct x { class e { static const int z = 16 }; static const int b = x::z; // x has no member z }; struct y { enum e { z = 16 }; static const int b = y::z; // ok }; is there section of standard explains behavior? yes, there such sections in c++ standard. the first 1 is 9.9 nested type names 1 type names obey same scope rules other names. in particular, type names defined within class definition cannot used outside class without qualification . it more precisely cite following quote 2 name of class member shall used follows: — in scope of class (as described above) or class derived (clause 10) class, — after . operator applied expression of type of class (5.2.5) or class derived class, — after -> operator applied pointer object of class (5.2.5) or class derived class, — after :: scope resolution operator (5.1) applied name of class or class derived class. and second 1 is 11.7 nes...

javascript - D3: pie labels with "horizontal ending"-lines without overlapping -

i david buezas pie chart lines, especially horizontal lines , improve readability: http://bl.ocks.org/dbuezas/9306799 . labels overlap there, lines potentially too. stumbled upon http://blog.safaribooksonline.com/2014/03/11/solving-d3-label-placement-constraint-relaxing/ (contains lot of fiddles, sorry, not enough reputation posting link), explains how avoid overlapping. tried adapt example label lines "horizontal ending", replacing <line> <polyline> , failed. it appears <line> have different output <polyline> , because copied attributes, it's drawn differently (pretty sure didn't mess up) i don't how lines sliced text in bueza's example. thought workaround by: replacing <line> <polyline> copy attributes <line> <polyine> 's points attributes add attribute draws straight, horizontal line <polyline> doing last x-value + 30 then adapt text somehow transform apart fact lot less elegan...

3d - Fitting rectangle among 4 spheres -

Image
i wondering have idea how solve following task: 4 poles given in space each different height. base convex quad. each pole there rope connected object. coordinates in 3d poles defined. knowing position of object makes straight forward find rope lengths. task solving reverse problem - knowing lengths of 4 ropes find position in 3d space. there 2 versions - easy , hard one. easy 1 when 4 ropes connected single point - problem can solved finding intersection of 4 spheres centers @ top of poles , radii 4 lengths of ropes. how gps works - intersection of 2 spheres circle. intersection of circle 3rd sphere gives me 2 points in result. use 4th sphere control 1 find of 2 lies inside working space. the hard 1 when poles connected each different point form quad. given trying solve general quad tried rectangle sizes (d1, d2) plane should parallel floor(blue region below - xz plane) sides parallel x , z axes. simplifies task lot. knowing position(center) of rectangle makes again straigh...

ruby on rails - Params hash element sent from form is nil in the controller -

i have table called part columns "mp3_link", "caption", "translation", "position", , "lesson_id". "position" refers order of part instance in list of part instances. i created edit view part model, above attributes can changed. includes "position" attribute: <div class="control-group"> <%= f.label :position, class: 'control-label' %> <div class="controls"> <%= f.text_field :position %> </div> </div> the problem in update controller, code part_params[:position] gives me nil. i used "debug params" see content of hash. "position" element has value (in case '4'): mp3_link: https://w.soundcloud.com caption: 不借認這多把樣去利是 translation: non eaque natus aliquid @ rerum sequi quibusdam necessitatibus doloribus position: '4' commit: save action: update controller: parts id: '5' so "position" v...

javascript - Uncaught TypeError: Cannot read property 'top' of undefined -

i have following code , it's returning "uncaught typeerror: cannot read property 'top' of undefined" error in console , can't figure out why? code doing i'd do, i'd not return errors. can point me in right direction? var sig = false; $(window).on('scroll', function () { var sigtop = $('.svgwrap').offset().top - 500; var wintop = $(window).scrolltop(); if (sigtop < wintop && !sig) { sig = true; animatesignature(); } }) .svgwrap might not exist when first scroll event fires; include script @ end of page, wrap in $(document).ready , or check .svgwrap s. var sig = false; $(window).on('scroll', function () { var svgwrap = $('.svgwrap'); if (!svgwrap.length) { return; } var sigtop = svgwrap.offset().top - 500; var wintop = $(window).scrolltop(); if (sigtop < wintop && !sig) { sig = true; animatesignature(...

php - Why Yii CDbcriteria filtering results before any actions? -

i changed code in model: $criteria->compare('ring',$this->ring,true); to this: $criteria->compare('ring',date('y-m-d', strtotime($this->ring)),true); and load manage page empty filters see 1 record , if 'ring' of record 01.01.1970 i understand happens because strtotime($this->ring) return zero. why sends when field empty, , why didn`t happen before. it`s works not preaty if ($this->ring!=0){ $criteria->compare('ring',date('y-m-d', strtotime($this->ring)),true); } strtotime() returns false if input not date, since null not date return false , date() converts timestamp date, due php's weakly typed design false returned strotime() converted 0 , passed timestamp of 0 date() start of utc on 01.01.1970 passed compare() now cdbcriteria::compare function not modify existing search condition if value null see http://www.yiiframework.com/doc/api/1.1/cdbcriteria#compare-detail ...

c - Combining two strings by removing duplicate substrings -

i have 2 strings combine, removing duplicate substrings. note every 2 consecutive numbers constitute substring. consider string str1 , str2: str1 = "#100#123#100#678" str2 = "#100#678#100#56" i produce combined string as: combostr = "#100#123#100#678#100#56" (i.e. removed duplicate #100#678) what's easiest way this? there way can achieve using regular expressions? i don't think regular expressions way solve problem. regexes might useful in finding #123 tokens, problem needs backtrack on own string in way regex's references not desiged for. i don't think there easy way (as in 3 lines of code) solve this. i assume strings follow pattern (#\d+)* , pair created @ seam when joining 2 strings not trated special, i.e. resulting pair might considered duplicate. means can separate concatenation pair removal. convert string list of integers, operate on these lists , join them back. that's work, makes actual code strip...

VIM , how to show the count of occurrence the current match pattern under cursor? -

how show count of occurrence current match pattern under cursor ? example: aa bb aab searching aa, cursor here, show 2. aa bb and how insert number 2 after line . "aab" -> "aab 2" here function , mapping job (add these lines end of .vimrc; needs @ least vim 7.4 , nocompatible set before it): nnoremap x :call count( '<c-r>=expand( '<cword>' )<cr>' )<cr> function! count( word ) redir => cnt silent exe '%s/' . a:word . '//n' redir end silent exe 's/.*/& ' . matchstr( cnt, '\d\+' ) . '/' endfunction if pressing x on word ( bordered withespace characters ), count function add count of same words in file end of actual line. to add ordinal number, change count nthcount in mapping , add these lines .vimrc: function! nthcount( word ) redir => nth silent exe '0,.s/' . a:word . '//n' redir => cnt silent exe ...

how to implement a authentication with spring boot security? -

i using spring boot. want post username , password params login, , if login success return token. after, use token judge login status. here security configure code. don't konw write login authentication logic code. securityconfig.java @configuration @enablewebsecurity public class securityconfig extends websecurityconfigureradapter { @override protected void configure(httpsecurity http) throws exception { http.authorizerequests() .anyrequest() .fullyauthenticated() .and() .formlogin() .loginpage("/user/unlogin") .permitall(); } @override public void configure(websecurity web) throws exception { web.ignoring().antmatchers("/user/login") .antmatchers("/user/logout") .antmatchers("/user/register"); } } ========================== thank ! there...

javascript - traversing dom elements for right jquery selector -

given following html snippet, cant seem access input elements under div class="input-group" <form action="login.html#register" method="post" id="form-register" class="form-horizontal display-none"> <div class="form-group"> <div class="col-xs-6"> <div class="input-group"> <span class="input-group-addon"><i class="gi gi-user"></i></span> <input type="text" id="register-firstname" name="register-firstname" class="form-control input-lg" placeholder="firstname"> </div> </div> <div class="col-xs-6"> <input type="text" id="register-lastname" name="register-lastname" class="form-control input-lg...

ios - Create plus button as push at runtime -

in tableviewcontroller want create plus push button @ "run time" in viewdidload of tableviewcontroller trigger view. i tried follows: - (void)viewdidload { [super viewdidload]; // // create button in navigation // self.vc_addtodoitem = [[grf_vc_add_to_do_item alloc] init]; [self.navigationcontroller pushviewcontroller:self.vc_addtodoitem animated:no]; uibarbuttonitem *bt_plus = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemadd target:self.vc_addtodoitem action:@selector(add:)]; self.navigationitem.rightbarbuttonitem = bt_plus; } the result table view not displayed. instead view displayed link table view. if press link, table view displayed. if press plus button crash. what problem? update: i added add method in grf_vc_add_to_do_item. crash gone. method add called. don't know in method show view, therefore method empty @ moment. if press "+" button, nothing happens. call n...

android - How to connect a Galaxy S4 to Debian 3.2.0-4 for development? -

i embarking on android application development first time running initial roadblock: getting device connected , recognized debian os. matter of fact, debian doesn't recognize device when connect via usb (probably driver issue). have been searching morning , every guide find ubuntu 12.10, in jan. 2013 , ends commentary how unstable method is! try describe problem articulately possible. forgive me if miss information or unclear. computer: lenovo t410, i7, 4 gb ram os: debian 3.2.0-4-amd64 #1 smp debian 3.2.57-3 x86_64 gnu/linux, using xfce samsung galaxy s4: kernel version: 3.4.0 hardware: i545.07 android version: 4.4.2 java installed directly oracle. eclipse kepler service release 2 everything should newest version of may 15, 2014 (i re-imaged whole machine!) what happens? when plug usb cable laptop, debian detects "verizon mobile," , thunar lists such mounted device in left pane of file explorer. stays 30 seconds disappears if don't touch (i can click on ,...