list all installed packages on android using adb
adb shell pm list packages

Product Placement
2025 on Tumblr: Trends That Defined the Year
Today's Document
cherry valley forever

Andulka
Three Goblin Art
Sade Olutola

if i look back, i am lost
tumblr dot com

Kiana Khansmith
hello vonnie
Mike Driver
Claire Keane
YOU ARE THE REASON
No title available
he wasn't even looking at me and he found me

pixel skylines
d e v o n
Not today Justin
Cosmic Funnies

seen from Ukraine

seen from Malaysia

seen from Indonesia

seen from Brazil
seen from Argentina
seen from United States
seen from United States
seen from United States
seen from United States

seen from United Kingdom

seen from Malaysia
seen from United States
seen from United States
seen from Maldives

seen from United States
seen from United Kingdom
seen from United States
seen from United States
seen from Russia
seen from United States
@guptanotes-blog
list all installed packages on android using adb
adb shell pm list packages
Free IT e-Book site
http://it-ebooks-search.info/
Create password encrypted zip files on mac
zip -er pathToZIPFile pathToFolder
Suggestion:
Go to folder to compress and use above command. Otherwise, unwanted folders will be part of zip file.
http://www.maclife.com/article/columns/terminal_101_creating_encrypted_zip_files
Disable automatic rounding button in iOS webview/safari
input { -webkit-appearance: none; border-radius: 5px; }
http://stackoverflow.com/questions/2918707/turn-off-iphone-safari-input-element-rounding
Disable UIWebview auto correction
$("input[type='text'], textarea").attr('spellcheck','false');
$("input[type='text'], textarea").attr('autocorrect','off');
$("input[type='text'], textarea").attr('autocapitalization','off');
http://stackoverflow.com/questions/4000820/iphone-uiwebview-can-auto-complete-be-turned-off-on-a-input-text-field
http://stackoverflow.com/questions/3416867/how-can-i-disable-the-spell-checker-on-text-inputs-on-the-iphone
http://stackoverflow.com/questions/9208931/spellcheck-disable-with-css-not-html
Print webview console.log to XCode console
//Javascript starts here
console = new Object();
console.log = function(log) {
var iframe = document.createElement("IFRAME");
iframe.setAttribute("src", "ios-log:#iOS#" + log);
document.documentElement.appendChild(iframe);
iframe.parentNode.removeChild(iframe);
iframe = null;
}
console.debug = console.log;
console.info = console.log;
console.warn = console.log;
console.error = console.log;
//Javascript ends here
//objC starts here
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSString *requestString = [[[request URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
//NSLog(requestString);
if ([requestString hasPrefix:@"ios-log:"]) {
NSString* logString = [[requestString componentsSeparatedByString:@":#iOS#"] objectAtIndex:1];
NSLog(@"Custom console: %@", logString);
return NO;
}
return YES;
}
//objC ends here
null vs nil vs [NSNULL null]
NSMutableArray *controllers = [[NSMutableArray alloc] init]; for (unsigned i = 0; i < kNumberOfPages; i++) { [controllers addObject:[NSNull null]]; }
Directly from Apple: "The NSNull class defines a singleton object you use to represent null values in situations where nil is prohibited as a value (typically in a collection object such as an array or a dictionary)."
NSNull defines a singleton object, which means that there's only ever a single instance of NSNull (which you create using [NSNull null]), but it can be used in as many places as you wish.
Technically null and nil are same thing but differ only in style:
Objective-C style says nil is what to use for the id type (and pointers to objects).
C style says that NULL is what you use for void *.
C++ style typically says that you should just use 0.
nil should only be used in place of an id, what we Java and C++ programmers would think of as a pointer to an object. Use NULL for non-object pointers.
Look at the declaration of this method:
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
Context is a void * (ie a C-style pointer), so you'd definitely use NULL (which is sometimes declared as (void *)0) rather than nil (which is of type id).
http://stackoverflow.com/questions/557582/null-vs-nil-in-objective-c
http://stackoverflow.com/questions/836601/whats-the-difference-between-nsnull-null-and-nil
Remove gradient background from UIWebView
[self.webView setBackgroundColor:[UIColor clearColor]]; for(UIView* subview in [self.webView1 subviews]){ if([subview respondsToSelector:@selector(setBackgroundColor:)]){ [subview setBackgroundColor:[UIColor clearColor]]; } for(UIView* imageView in [subview subviews]){ if([imageView isKindOfClass:[UIImageView class]]){ imageView.hidden = YES; } } }
http://stackoverflow.com/questions/655225/uiwebview-underside
add 10 seonds to a javascript date object timeObject
var t = new Date(); t.setSeconds(t.getSeconds() + 10);
http://stackoverflow.com/questions/7687884/add-10-seonds-to-a-javascript-date-object-timeobject
How can I load a local HTML file into the UIWebView?
[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
http://stackoverflow.com/questions/4645414/how-can-i-load-a-local-html-file-into-the-uiwebview
When i am trying to run the javascript i am finding some warnings,how to overcome that
Are you adding those .js files to www? or Plugins? If www - Open your project in finder , project --> www --> add all .js files. Now open your project in xcode and check www, it should expand with all .js files.
If Plugins --When you add the JavaScript file, Xcode detects that the file is a source code file, assumes you want to compile it and automatically adds it to the Compile Sources build phase.
To stop Xcode trying to compile it and make it copy the file instead, expand your target in the Groups and Files list, remove the JavaScript file from the Compile Sources build phase and add it to the Copy Bundle Resources build phase.
http://stackoverflow.com/questions/7201300/when-i-am-trying-to-run-the-javascript-i-am-finding-some-warnings-how-to-overcom
uiWebview call javascript function syntax
// Substitute your Objective-C values into the string NSString *javaScript = [NSString stringWithFormat:@"setVars('%@', '%@')", var1, var2, nil]; // Make the UIWebView method call NSString *response = [webViewA stringByEvaluatingJavaScriptFromString:javaScript];
http://stackoverflow.com/questions/11921656/uiwebview-call-javascript-function-syntax
Changing button shades..
//resizableImageWithCapInsets:UIEdgeInsetsMake
[[UIActivityIndicatorView appearance] setColor:[UIColor redColor]];
UIImage *navBarImage = [UIImage imageNamed:@"navbar"]; navBarImage = [navBarImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 20.0, 0, 20.0)]; UIImage *navBarLandscapeImage = [UIImage imageNamed:@"navbar-landscape"]; navBarLandscapeImage = [navBarLandscapeImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 20.0, 0, 20.0)];
http://useyourloaf.com/blog/2012/08/24/using-appearance-proxy-to-style-apps.html
Passing parameters to callback method
function tryMe (param1, param2) { alert (param1 + " and " + param2); } function callbackTester (callback) { callback(); } callbackTester(tryMe.bind(null, "hello", "goodbye"));
http://stackoverflow.com/questions/3458553/javascript-passing-parameters-to-a-callback-function
GIT XCode conflicts and merge
git mergetool git commit http://stackoverflow.com/questions/10568405/failed-xcode-git-merge-is-stuck
Xcode Debugger: view value of variable
po variableName print variableName
Don't forget to typecast resulted objects to access their property values.
http://stackoverflow.com/questions/4735156/xcode-debugger-view-value-of-variable
jQuery how to find an element based on a data-attribute value?
$("ul").find("[data-slide='" + current + "']");
http://stackoverflow.com/questions/4191386/jquery-how-to-find-an-element-based-on-a-data-attribute-value
http://api.jquery.com/attribute-equals-selector/