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
<div id="word" class="typewriter"> | |
<h1>For Nhat Hong - The One I Love!</h1> | |
</div> |
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
<div id="word">Nova</div> |
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
public with sharing class NewCaseListController { | |
public List<Case> getNewCases() { | |
List<Case> results = Database.query( | |
'SELECT Id, CaseNumber, Origin, Status, Account.Name ' + | |
'FROM Case ' + | |
'LIMIT 10' | |
); | |
return results; | |
} | |
} |
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
<apex:page controller="NewCaseListController"> | |
<apex:pageblock> | |
<apex:repeat value="{!NewCases}" var="Case"> | |
<apex:outputLink value="/{!Case.Id}"> | |
<li> | |
<apex:outputText value="{!Case.CaseNumber}"/> | |
</li> | |
</apex:outputLink> | |
</apex:repeat> |
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
public class ContactAndLeadSearch { | |
public static List<List<SObject>> searchContactsAndLeads(String pname){ | |
//Search in all fields for any contact or lead that matches the string as part of either the first or last name | |
List<List<SObject>> searchList = [FIND :pname IN ALL FIELDS | |
RETURNING Lead(Name), Contact(FirstName,LastName)]; | |
System.debug('Found the following:' + searchList); | |
//Get Lead list | |
Lead[] searchLeads = (Lead[])searchList[0]; | |
//Get Contact list |
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
package unit_4; | |
//import java.util.Scanner; | |
public class Array { | |
public static void main(String[] args){ | |
int[] check= {1, 2, 3 ,4, 5, 6, 7, 8, 9, 10, | |
11, 12, 13, 14 ,15, 16, 17, | |
18, 19, 20,21 ,22,23,24, 25, | |
26, 27, 28, 29, 30,31, 32,44, | |
45, 46 ,47 ,48 ,49, 50,51 ,52, |
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
package intro; | |
import userlib.TextIO; | |
public class DeckOfCards { | |
public static void main(String[] args) { | |
int[]deck = new int[52]; | |
String[] suits = {"Spades", "Hearts", "Diamons", "Clubs"}; | |
String[] ranks = {"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}; | |
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
package intro; | |
import java.util.Scanner; | |
public class Palindrome { | |
public static void main(String[] args) { | |
Scanner ip= new Scanner(System.in); | |
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
package intro; | |
import java.util.Scanner; | |
public class AmbiguousOverloading { | |
public static void main(String[] args) { | |
Scanner ip= new Scanner(System.in); | |
int years; | |
System.out.println("Enter year to check is leaf year or not!"); | |
years = ip.nextInt(); | |
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
package intro; | |
import userlib.TextIO; | |
public class LinearEquation { | |
public static void main(String[] args){ | |
double x,y; | |
double a,b,c,d,e,f; | |
double d0, dx, dy; | |
TextIO.putln("We going to solve a linear Equation with form:"); |
NewerOlder