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
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
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
/* | |
Pass ArrayList as Arugument | |
*/ | |
public static void findDuplicate(ArrayList<String> arrayList){ | |
//Define Hash Map to Store String Value and its repeatCount | |
Map<String,Integer> duplicate_counter=new HashMap<String, Integer>(); | |
/*For each String Value in the ArrayList Check Wather it is Available Already in Hash Map | |
if yes increment the value of a key in hash Map | |
else just add value as 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
@RequiresApi(api = Build.VERSION_CODES.N) | |
public void getDate(){ | |
final Calendar calendar=Calendar.getInstance(); | |
DatePickerDialog.OnDateSetListener dateSetListener=new DatePickerDialog.OnDateSetListener() { | |
@Override | |
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { | |
calendar.set(Calendar.YEAR,year); | |
calendar.set(Calendar.MONTH,month); |
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
edittext1.addTextChangedListener(new TextWatcher() { | |
@Override | |
public void beforeTextChanged(CharSequence s, int start, int count, int after) { | |
edittext2.setText(s); | |
} | |
@Override | |
public void onTextChanged(CharSequence s, int start, int before, int count) { | |
edittext2.setText(s); | |
} |
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.design.widget.TextInputLayout | |
android:id="@+id/text_input" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<EditText | |
android:id="@+id/edittext_input" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="Your Hint" |
Before we start writing our first UI test I want to describe our development process.
- First, we write a test for a UI or logic that does not yet exist.
- We expect to see build errors or failed tests.
- Then we create a UI element or write program logic.
- Finally, we run the test and make sure it passes.
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
function Stringtodate(inputDate) | |
{ | |
var splittedDate = inputDate.split("/"); | |
var date=new Date(); | |
date.setDate(splittedDate[0]); | |
date.setMonth(splittedDate[1]-1); //in js month range 0-11 | |
date.setFullYear(splittedDate[2]); | |
return date; | |
} |
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
function leapYear(year) | |
{ | |
return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0); | |
} |
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 option = $('option:selected', this).attr('mytag'); |