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 askAccount = ask("What's the online account details that you want to know?You can select Facebook or Twiiter", { | |
choices: "facebook, twitter, github", | |
timeout: 20.0, | |
attempts: 3, | |
onBadChoice: function(askAccount) { | |
say("I'm sorry, I didn't understand that. You can select facebook or twitter."); | |
}, | |
onChoice: function(askAccount) { | |
if(askAccount.value == "facebook"){ | |
say("Your username is [email protected]"); |
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
/** | |
* Sample for Object Oriented Programming Concepts | |
* | |
* Encapsulation | |
* | |
* @author Reyes, Omar Matthew B. | |
* @version 2013/09/07 | |
*/ | |
public class EncapsulationSample{ |
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
/** Java BufferedReader **/ | |
import java.io.*; | |
// initialize class | |
{ | |
public static void main(String [] args)throws IOException{ | |
BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in)); | |
String inputString = buffer.readLine(); | |
int inputInt = Integer.parseInt(buffer.readLine()); |
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
Color colorA = new Color(0xFF0096); // Use the hex number syntax | |
Color bColor = Color.decode("0xFF0096"); // or with the use of decode | |
object.setColor(Color.white); | |
setBackground(Color.white); | |
/** Alternatively using hex color codes to expand the color library **/ | |
object.setColor(new Color(0xFF0096)); | |
object.setColor(Color.decode("0xFF0096")); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<head> | |
<title>Seatwork</title> | |
<script type="text/javascript"> | |
function valForm(){ | |
if(document.myForm.firstName.value==""){ | |
if(document.myForm.firstName.value==""){ | |
document.getElementById("fName").innerHTML = "this is required"; | |
} |
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
$ git config --global user.name <Name Here> | |
$ git config --global user.email <Email Address> | |
// Set-up name and email address to be used | |
$ git init | |
// Initialize git on current dir/folder | |
$ git add <file> | |
// You can add files one-by-one or all of them with asterisk (*) | |
// Include the file extension of the files |
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 InfosLegalesActivity extends BaseDrawerNormalActivity { | |
private FragmentTabHost mTabHost; | |
private static TextView txtTitleInfosLegales; | |
@Override | |
protected int getLayoutContentId() { | |
return R.layout.layout_infoslegales; | |
} | |
@Override |
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
/** | |
* Sort a 2d array | |
* | |
* @author Omatt | |
* @version 2015/02/22 | |
*/ | |
public class Sort{ | |
private static final int maxRow = 5, maxCol = 5; | |
private static String cube[][] = new String[maxRow][maxCol]; | |
public static void main(String[] args){ |
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
/** | |
* Returns a Bitmap object with a circle crop effect. | |
* This can be used in an ImageView and it must use | |
* "centerCrop" on its scaleType to achieve desired output. | |
* <p> | |
* Reference: {@link} http://stackoverflow.com/a/14051472/2497859 | |
* | |
* @param bitmap The bitmap that we're going to "circle crop" | |
* @return Bitmap with a circle crop overlay | |
* @see android.graphics.Bitmap |
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
https://www.google.com.ph/search?q=android+setNavigationMode+deprecated | |
// ActionBar.setNavigationMode is deprecated | |
https://developer.android.com/training/material/lists-cards.html | |
http://www.binpress.com/tutorial/android-l-recyclerview-and-cardview-tutorial/156 | |
// RecyclerView and CardView | |
http://javatechig.com/android/listview-with-section-header-in-android | |
// ListView with section header |
OlderNewer