This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setupTabBar | |
{ | |
// Assign tab bar item with titles | |
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController; | |
UITabBar *tabBar = tabBarController.tabBar; | |
UITabBarItem *tabBarItem1 = tabBar.items[0]; | |
UITabBarItem *tabBarItem2 = tabBar.items[1]; | |
UITabBarItem *tabBarItem3 = tabBar.items[2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new | |
Intent(getApplicationContext(),SecondActivity.class); | |
intent.putExtra("myKey",AnyValue); | |
startActivity(intent); | |
Now you can get the passed values by... | |
Bundle extras = intent.getExtras(); | |
String tmp = extras.getString("myKey"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://flags.redpixart.com/list/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface FirstViewController : UIViewController <UICollectionViewDataSource, UICollectionViewDelegate>{ | |
CGSize cellSize; | |
} | |
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"destination_addresses" : [ | |
"Mid Valley Megamall, 75, Lingkaran Syed Putra, Mid Valley City, 58000 Kuala Lumpur, Wilayah Persekutuan Kuala Lumpur, Malaysia" | |
], | |
"origin_addresses" : [ "Unnamed Road, 26700 Muadzam Shah, Pahang, Malaysia" ], | |
"rows" : [ | |
{ | |
"elements" : [ | |
{ | |
"distance" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove the slug from published post permalinks. Only affect our custom post type, though. | |
*/ | |
function gp_remove_cpt_slug( $post_link, $post, $leavename ) { | |
if ( 'race' != $post->post_type || 'publish' != $post->post_status ) { | |
return $post_link; | |
} | |
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
isPresenting = true | |
return self | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Class Component": { | |
"prefix": "irp", | |
"body": [ | |
"import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'", | |
"import React from 'react'", | |
"", | |
"const ${1:$TM_FILENAME_BASE} = () => {", | |
" return (", | |
" <IonPage>", |