Posts

ios - Data is persistent in one table view, but not when switching between other view controllers -

i'm looking implement contacts list app. have add contact working , actively uses nscoding writing disk contacts. update between list of contacts , new contact view, doesn't when switch view. do need prepareforsegue when coming non-contact views in way prepares data? or need create set<contacts> in first view , pass references through when going between views. of updates data when unwindsegue add contact view controller. i need more context (code) sure solve case. but had similar issues in past 1 simple reason: i put refresh code in viewdidload() . called when viewcontroller loaded (first time appears), not every time switch (doesn't reload it). you should put code in viewdidappear() , or viewwillappear() if want executed each time "switch" view. here code: viewdidappear(){ code code code refreshes view contacts } here should be: viewdidload() { code code } viewdidappear() { code refreshes view contacts } code want ex...

tsql - Create Tree Query From Numeric Mapping Table in SQL -

i have exported table accounting software below. accountid accountname --------- ----------- 11 acc11 12 acc12 13 acc13 11/11 acc11/11 11/12 acc11/12 11/111 acc11/111 11/11/001 acc11/11/001 11/11/002 acc11/11/002 12/111 acc12/111 12/112 acc12/112 then want convert tree query in ms-sql server 2008 use treelist datasource in win aaplication. expected sql query result: accountid accountname id parentid level haschild --------- ----------- --- --------- ------ -------- 11 acc11 1 null 1 1 12 acc12 2 null 1 1 13 acc13 3 null 1 0 11/11 acc11/11 4 1 2 1 11/12 acc11/12 5 1 2 0 11/111 acc11/111 6 1 2 0 11/11/001 acc11/11/001 7 4 ...

Why can't I filter out an element by its id using jQuery? -

try in browser's javascript console: $('<p><span id="wow">foobar</span></p>').filter('#wow') what [] . why that? isn't supposed filter out span who's id isn't "wow"? .filter() filters set of matched elements. element in set of elements <p> tag, doesn't match selector. you want use .find() instead: > $('<p><span id="wow">foobar</span></p>').find('#wow') [<span id=​"wow">​foobar​</span>​]

ms access - SQL: Remove top 4 records from table -

i have table called temptable imported excel sheet. however, how can make use of vba code remove top 4 records unnecessary data. know "select top 4 * temptable" select job. how do delete? appreciated. try delete (select top 4 * temptable) just in case make sure backup before delete

Why default specifier is not allowed to specify for any class member in Java? -

the default access specifier of java class member " default ". mean when no specifier has specified before member of class, java takes default implicitly. have ever tried put default specifier explicitly before method or variable in class. try once , see. class demo{ default string name; // valid??? } i wanted know reason behind it? default keyword has nothing access modifiers. in access modifier's context, absence of specific access modifier called default. default keyword's actual usage - the default keyword can optionally used in switch statement label block of statements executed if no case matches specified value; see switch. the default keyword can used declare default values in java annotation. from java 8 onwards, default keyword used specify method in interface provides default implementation of optional method.

android studio app, press home button while application is working -

i developed android studio app. however, when pressed home button while playing app phone.(not android emulator) then start app again, shows splash activity first shows 1 error. like unfortunately, app stopped. what want is, when pressed home button , start app again, then should start activity pressed home button. don't show splash thing again. as understood, have problems activity lifecycle. think this link you.

chunking - Why does PHP chunk_split() default to a chunk length of 76? -

can explain why 76 characters default, , why might useful in practice? because rfc 2045 semantics specify encoded lines must not longer 76 characters, not counting trailing crlf. addendum: [warning: highly pedantic presentation follows] there several different mechanisms "content-transfer-encoding" , 2 of main methods (for discussion) "quoted-printable" , "base64". quoted-printable encoding intended represent data correspond printable characters in us-ascii character set. base64 content-transfer-encoding designed represent arbitrary sequences of data in form need not humanly readable. both encodings transform input arbitrary domain material safe carry on restricted transports . "restricted transports" means transport can handle 7-bit data, i.e. acoustic modems , analog lines. in other words, it's designed reliable in crappy conditions. because quoted-printable expected line-oriented , because rfc 2045 dates 1996 seem...