Posts

where are device screenshots visible in Xcode6? -

where are device screenshots visible in Xcode6? - for xcode 6, older xcode 4 & 5 organizer menu item has been split both organizer , devices set of menu choices. under devices menu item, you'll see list of various devices xcode knows about, in add-on simulators , things that. and cleaner looking interface lists device information, installed apps each of devices, etc. here's question: there 2 bigger buttons on new devices page. 1 "view device logs" , other "take screenshot". if 1 presses "take screenshot" button take screenshot of what's on connected device, there's no obvious way view screenshot. does know how view screenshots taken xcode 6 devices menu? hard believe that's oversight on dev tool team's part. six minutes after asking question figured out answer. there's tooltip pops when hovering on "take screenshot" button. the screenshots saved straight desktop , you'll see the...

android - Shared Preferences not persistent after app restart -

android - Shared Preferences not persistent after app restart - i found answers here , tried solutions, still shared prefs not persistent. here's code: public static void setactivated(boolean activated) { sharedpreferences sp = utils.getcontext().getsharedpreferences( user_prefs, context.mode_private); sharedpreferences.editor editor = sp.edit(); editor.putboolean(asd, activated); editor.commit(); } public static boolean isactivated() { sharedpreferences sp = utils.getcontext().getsharedpreferences(user_prefs, context.mode_private); homecoming sp.getboolean(asd, true); } i've tried also: editor.clear(); editor.put .. editor.commit(); i've tried with editor.apply(); i tried both .apply() , .commit() , no luck. another thought seek using different mode files: ...getsharedpreferences(user_prefs, context.mode_multi_process); the problem values saved not persistent. if close app , re-open values wrong. ...

asp.net mvc - Sharing session between MVC controller and WebApi controller -

asp.net mvc - Sharing session between MVC controller and WebApi controller - i have web service has mvc controller , wepapi 2 controller. the job of mvc controller render , homecoming html partial view. different mvc application makes phone call , embeds resulting html own page. the partial view contains controls create calls webapi controller temporarily store data. purpose enabled session in webapi controller using code in global.asax.cs : protected void application_postauthorizerequest() { httpcontext.current.setsessionstatebehavior( system.web.sessionstate.sessionstatebehavior.required); } when calling application makes phone call mvc controller, passes model it. model contains initial info controls on partial view need display. same kind of info controls create/update/delete using webapi controller. want set info model session controls in partial view able read/update/delete data. my question this: there way give mvc controller access wepapi...

jQuery: If character limit is "x" do "this"? -

jQuery: If character limit is "x" do "this"? - i'm trying set class on div there's text inside, add together class if there's character count of 60. so like, "if character count = 60 {" , i'll add together class. possible? can utilize jquery filter() : $(selector).filter(function(){ homecoming $(this).text().length >= 60; }).addclass('someclass'); filter() cut down elements defined in selector subset ( or none) match conditions returned callback demo jquery

swing - Conway's Game of Life Visualizing Java -

swing - Conway's Game of Life Visualizing Java - i'm trying write conway's game of life in java eclipse. algorithm works have problem in visualizing. can draw little little rectangles live in array did not work @ animations. here code. how can visual ? thanks. public class conwaysgameoflife extends jpanel { private int[][] grid; private static final random rnd = new random(); public conwaysgameoflife(int width, int height) { this.grid = new int[width][height]; setupgrid(); } private void setupgrid() { (int[] row : grid) { (int j = 0; j < row.length; j++) { if (rnd.nextdouble() < 0.92) continue; row[j] = rnd.nextint(2); } } } public void updategrid() { (int = 0; < grid.length; i++) { (int j = 0; j < grid[i].length; j++) { countanddecidedeadoralive(i, j); } }...

objective c - failed to find PDF header: `%PDF' not found - works fine in iOS simulator but not on iphone -

objective c - failed to find PDF header: `%PDF' not found - works fine in iOS simulator but not on iphone - this code works fine in ios simulator , displays pdf file, error when run same code on iphone "failed find pdf header: `%pdf' not found" nsstring *urladress= [nsstring stringwithformat: @"http://foodinspections.ocgov.com/foodinspections/inspectionarchives/%@.pdf", self.inspectionresult.serialnumber]; nslog(@"url= %@", urladress); nsdata *pdfdata = [[nsdata alloc] initwithcontentsofurl:[nsurl urlwithstring:urladress]]; [self.webview loaddata:pdfdata mimetype:@"application/pdf" textencodingname:@"utf-8" baseurl:nil]; objective-c uiwebview

java - what is this dropdown looking layout called? -

java - what is this dropdown looking layout called? - ithere cool layout feature in quizup app when click button shows menu under button , pushes else down, here mean: this: http://m.imgur.com/p5iqs5c to this: http://m.imgur.com/ws931xs i'm wondering called in terms of java/android can , larn how implement it. this called expandablelistview feature in android . see link start android expandable list view tutorial java android xml android-layout android-activity