Install the Rails gem if you haven't done so before
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
,;lskdla;dlka;lsd,adasd |
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 static void findStudent(int key, int[] studentList) { | |
int N = studentList.length; | |
for(int i = 0; i < N; i++) { | |
if(studentList[i] == key) { | |
System.out.println("Key has been found"); | |
} else System.out.println(" Key was not found "); | |
} | |
} |
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 static void findStudent(int key, int[] studentList) { | |
final long startTime = System.nanoTime(); | |
int N = studentList.length; | |
for(int i = 0; i < N; i++) { | |
if(studentList[i] == key) { | |
System.out.println("Key has been found"); | |
} else System.out.println(" Key was not found "); | |
} | |
final long endTime = System.nanoTime(); |
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 static int binarySearch(int key, int[] largeList) { | |
int lo = 0; | |
int hi = largeList.length - 1; | |
while(lo <= hi) { | |
int mid = (lo + hi) / 2; | |
if(key < largeList[mid]) hi = mid - 1; | |
else if (key > largeList[mid]) lo = mid + 1; | |
else return mid; | |
} | |
return -1; |
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
android { | |
defaultConfig { | |
vectorDrawables.useSupportLibrary = true | |
} | |
} |
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 numpy as np | |
import pandas as pd | |
# Create a dictionary that we used to create our pandas DataFrame | |
fake_dataset = {'Price':[1000,2109, np.nan], 'Size':[55,np.nan, 75], 'N of Rooms':[3, 2, 5]} | |
pd = pd.DataFrame(fake_dataset) | |
pd.dropna() | |
pd.dropna(axis=1) |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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 UserProfileViewModel: ViewModel { | |
var userProfileData: MutableLiveData<User>? = null | |
} |
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
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_user_profile) | |
mViewModel = ViewModelProviders.of(this).get(UserProfileViewModel.class); | |
// Other setup code below... | |
} |
OlderNewer