This file contains hidden or 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
body { | |
margin-top: 40px; /* This margin just makes the text easier to read. You can remove it if you want since it can mess with your other styles. */ | |
} | |
body::before { | |
content: "XS"; | |
color: red; | |
font-size: 2rem; | |
font-weight: bold; | |
position: fixed; |
This file contains hidden or 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
// | |
// main.m | |
// Algorithm | |
// | |
// Created by Rohan Patel on 11/10/17. | |
// Copyright © 2017 Rohan Patel. All rights reserved. | |
// | |
/* | |
Note: I found two mistakes in the proposed solution during the interview: |
This file contains hidden or 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 <Foundation/Foundation.h> | |
#import<AddressBook/AddressBook.h> | |
@interface Singleton : NSObject | |
{ | |
//int myInt; | |
} | |
@property (nonatomic) ABRecordRef personGlobal; //Global Addressbook Person Object. | |
@property (nonatomic) int myInt; |
This file contains hidden or 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 java.util.ArrayList; | |
import java.util.Scanner; | |
public class Quad { | |
public static void main(String args[]) | |
{ | |
ArrayList resultArray= new ArrayList(); | |
ArrayList elementArray= new ArrayList(); | |
This file contains hidden or 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)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
InvProductDetailViewController *idvc = [[InvProductDetailViewController alloc] initWithNibName:@"InvProductDetailViewController" bundle:nil]; | |
[self.navigationController pushViewController:idvc animated:YES]; | |
[idvc release]; //Zombie shows issue here. Commenting this line solved the issue but generated memory leak. | |
} |
This file contains hidden or 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
//---------------------------------------ViewController.h--------------------------------------- | |
@protocol LeftViewControllerProtocol <NSObject> | |
-(void)updateTable; | |
@end | |
@interface ViewController : UIViewController <CLLocationManagerDelegate,ViewControllerDelegate> |
This file contains hidden or 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)findCurrentLocation | |
{ | |
if(nil==self.locationManager) | |
{ | |
self.locationManager= [[[CLLocationManager alloc]init]autorelease]; | |
} | |
locationManager.delegate=self; |
This file contains hidden or 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 "SingletonClass.h" | |
#import "ViewController.h" | |
@implementation SingletonClass | |
@synthesize locationManager; | |
@synthesize startLocation,stopLocation; | |
@synthesize testStr; | |
//static SingletonClass *sharedManager = nil; |
This file contains hidden or 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
searchBar.delegate = self; | |
searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 200.0, 44.0)]; | |
searchBar.placeholder = @"Search Files"; | |
searchBar.userInteractionEnabled=YES; | |
//searchBar.tintColor=[UIColor clearColor]; | |
//Mark : For Loop for Searchbar Color change | |
for (UIView *view in self.searchBar.subviews) |
This file contains hidden or 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)viewDidLoad { | |
[super viewDidLoad]; | |
self.title = @"Literature"; | |
if (searchText.length > 0) { | |
[searchBar setShowsCancelButton:YES]; | |
searchBar.text = searchText; | |
[self searchLiteraturesWithName:searchText]; | |
} | |
[self.navigationController.navigationBar setTintColor:[UIColor primaryBarColor]]; |
NewerOlder