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
columns.Command( | |
command.Custom("Remove").Click("removeForm").Text("Approve") | |
command.Custom("Approve").Click("approveForm").Text("Approve"); | |
) | |
//removeForm and approveForm are JavaScript functions | |
<script type="text/javascript"> | |
function removeForm(e){ | |
e.preventDefault(); |
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
/** | |
* Author: Jane Ullah | |
* Purpose: Reversing a string provided by the user. | |
* Date: 12/18/2011 | |
*/ | |
import java.util.Scanner; | |
public class ReversingString { | |
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
//Author: Jane Ullah | |
//Date: 12/19/2011 | |
//Site: janetalkscode.com | |
long a1 = 0L, a2 = 1L; | |
long nextTerm = 0L; | |
long sumEvenTerms = 0L; | |
boolean fourMillionthReached = false; | |
while ( !fourMillionthReached ) { | |
if (nextTerm >= 4000000) { |
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
x = 0 | |
for i in range(0,1000): | |
if (i%3 == 0) or (i%5 == 0): | |
x += i; | |
print('total sum is: ' + str(x)); |
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
/** | |
* | |
* @author Jane Ullah | |
* @purpose Problem 3 - Project Euler | |
* @date 12/19/2011 | |
* | |
*/ | |
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
/** | |
* | |
* @author Jane Ullah | |
* @date 12/19/2011 | |
* @purpose Solving Problem 4 from ProjectEuler.net | |
* | |
*/ | |
public static void main(String[] args) { | |
/*if (isPalindrome(1222321)) { | |
System.out.println("Yes."); |
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
/** | |
* @author Jane Ullah | |
* @purpose Problem 6 - Project Euler | |
* @date 12/26/2011 | |
* @site http://janetalkscode.com | |
*/ | |
public class Problem6 { | |
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
/** | |
* @author Jane Ullah | |
* @purpose Problem 7 - Project Euler | |
* @date 12/27/2011 | |
* @site http://janetalkscode.com | |
*/ | |
public class Problem7 { | |
public static void main(String[] args) { | |
int primeNum = 0, index = 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
/** | |
* @author Jane Ullah | |
* @purpose Problem 8 - Project Euler | |
* @date 12/28/2011 | |
* @site http://janetalkscode.com | |
*/ | |
public class Problem8 { | |
public static void main(String[] args) { | |
String digits = "73167176531330624919225119674426574742355349194934" |
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 parseString(String digits) { | |
int product = 1; | |
//Strips out non-word characters | |
digits = digits.replaceAll("\\W",""); | |
for (int i = 0; i < digits.length(); i++){ | |
product *= Integer.parseInt(digits.substring(i,(i+1))); | |
} | |
return (digits.length() > 0) ? product:0; | |
/* |
OlderNewer