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
string applicationFolderPath = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "mydb.db"); | |
if (!Directory.Exists(applicationFolderPath)) | |
Directory.CreateDirectory(applicationFolderPath); | |
var platform = new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid(); | |
string databaseFileName = Path.Combine(applicationFolderPath, "mydb.db"); | |
var coreData = new CoreDataProvider(databaseFileName, platform); |
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
string applicationFolderPath = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "mydb.db"); | |
if (!Directory.Exists (applicationFolderPath)) | |
Directory.CreateDirectory(applicationFolderPath); | |
var platform = new SQLite.Net.Platform.XamarinIOS.SQLitePlatformIOS(); | |
string databaseFileName = Path.Combine(applicationFolderPath, "mydb.db"); | |
var coreData = new CoreDataProvider(databaseFileName, platform); |
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 class AddCustomerInterfacing : Java.Lang.Object, Java.Lang.IRunnable | |
{ | |
private Context context; | |
private Activity _activity; | |
public const int RQS_PICK_CONTACT = 1; | |
public AddCustomerInterfacing(Context context, Activity activity) | |
{ | |
this.context = context; | |
_activity = activity; |
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
var car = function() { | |
this.wheel = true; | |
this.seats = true; | |
} | |
var ferrarri = function() { | |
this.carType = "fast car"; | |
} | |
// inherits |
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
// define our simple function with this.salary abd this tax. | |
function getSalary(name, deduction) { | |
var takeHomeAmount = this.salary - (this.tax + deduction); | |
console.log(name + " gets a monthly salary of :" + takeHomeAmount) | |
} | |
// next we are going create object with matching properties and bind to getSalary() method | |
// note that our object matches properties with function defined above. |
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
// In the getSalary example, we bind an object and provide 1st argument = "jessica" | |
var jessica_partial_calculation = getSalary.bind(jessica, "jessica"); // here we bind and provide the first "argument". | |
// after some processing ..... | |
// now we will provide the next argument // | |
jessica_partial_calculation(100); // output : jessica gets a monthly salary of :2800 |
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
var myControl = { | |
get getControlName() | |
{ | |
return "weird control"; | |
} | |
} | |
myControl.getControlName // returns "weird control" executed without () |
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.support.v4.view.ViewPager | |
android:id="@+id/container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> |
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 class SectionsPagerAdapter extends FragmentPagerAdapter { | |
public SectionsPagerAdapter(FragmentManager fm) { | |
super(fm); | |
} | |
@Override | |
public Fragment getItem(int position) { | |
// getItem is called to instantiate the fragment for the given page. | |
// Return a PlaceholderFragment (defined as a static inner class below). |
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 class PlaceholderFragment extends Fragment { | |
/** | |
* The fragment argument representing the section number for this | |
* fragment. | |
*/ | |
private static final String ARG_SECTION_NUMBER = "section_number"; | |
/** | |
* Returns a new instance of this fragment for the given section | |
* number. |