Skip to content

Instantly share code, notes, and snippets.

View janoulle's full-sized avatar

Jane Ullah janoulle

View GitHub Profile
@janoulle
janoulle / custom_command_kendoui_mvc
Last active August 29, 2015 14:02
KendoUI Custom Command MVC
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();
@janoulle
janoulle / ReversingString.java
Created December 18, 2011 15:51
Reversing a String
/**
* 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) {
@janoulle
janoulle / Problem2.java
Created December 19, 2011 05:13
Problem 2 - Project Euler in Java by Jane Ullah
//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) {
@janoulle
janoulle / problem1.py
Created December 19, 2011 18:12
Problem 1 - Project Euler in Python by Jane Ullah
x = 0
for i in range(0,1000):
if (i%3 == 0) or (i%5 == 0):
x += i;
print('total sum is: ' + str(x));
@janoulle
janoulle / Problem3.java
Created December 20, 2011 00:31
Problem 3 - Project Euler in Java by Jane Ullah
/**
*
* @author Jane Ullah
* @purpose Problem 3 - Project Euler
* @date 12/19/2011
*
*/
public static void main(String[] args) {
@janoulle
janoulle / Problem4.java
Created December 20, 2011 02:06
Problem 4 - Project Euler in Java by Jane Ullah
/**
*
* @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.");
@janoulle
janoulle / Problem6.java
Created December 27, 2011 05:19
Problem 6 - Project Euler in Java by Jane Ullah
/**
* @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) {
@janoulle
janoulle / Problem7.java
Created December 27, 2011 07:27
Problem 7 - Project Euler in Java by Jane Ullah
/**
* @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;
@janoulle
janoulle / Problem8.java
Created December 28, 2011 05:13
Problem 8 - Project Euler in Java by Jane Ullah
/**
* @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"
@janoulle
janoulle / parseString.java
Created December 29, 2011 01:37
Multiplying Digits in a String
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;
/*