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
import java.io.*; | |
import java.math.*; | |
public class euclid{ | |
public static void main(String[] args) throws IOException{ | |
String[] strar=new String[2]; | |
try{ | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
System.out.print("Input two numbers here:"); | |
String str = br.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
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import javax.swing.event.*; | |
import javax.swing.UIManager; | |
import javax.swing.JPanel; | |
import java.io.*; | |
import java.awt.Dimension; | |
import java.awt.BorderLayout; | |
import javax.swing.JFileChooser; |
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> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.14.1/build/cssreset/cssreset-min.css"> | |
<link rel="stylesheet" href="css/smoothness/jquery-ui-1.10.3.custom.css"> | |
<link rel="stylesheet" href="css/style.css"> | |
<script src="js/jquery-1.9.1.js"></script> | |
<script src="js/jquery-ui-1.10.3.custom.min.js"></script> | |
<title>TwitKJ - Rhizomizing your tweets!</title> |
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> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Parallax Manga Viewer</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<style> | |
/* General Rayouts */ | |
html{ | |
background: #fff; |
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> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Parallax Manga Viewer</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="mangaviewer.js"></script> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> |
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
def regRnd(n:Int):Number = { | |
val s = for{i <- 1 to n} yield Math.random() | |
s.reduce(_ + _).toDouble / n | |
} | |
//Box-Muller's Method | |
regRnd(12) |
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
// get most frequent Strings from the newest n values | |
def mostFrequent(l:List[String], n:Int): List[String] = { | |
val id = l.take(Math.min(list.length, i)).unzip._1.groupBy(identity) | |
val frq = id.maxBy(_._2.size)._2.size | |
id.filter(_._2.size == frq) | |
} |
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 fizzbuzz() { | |
for(var i=1; i<100; i++){ | |
var n = [i,"",""]; | |
if(i%3 == 0){ n[0]=""; n[1]="Fizz"; } | |
if(i%5 == 0){ n[0]=""; n[2]="Buzz"; } | |
console.log(n.join("")); | |
} | |
} |
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
func longer(a:String,b:String)->String { | |
if(countElements(b)>countElements(a)){ return b } | |
else{ return a } | |
} | |
var slist = ["asad","asdfgh","sadfbgnhj","sdfg","sdfxbcgbhmvgn","dfsghbjgknlm","ghfjgkcx"] | |
slist.reduce("", { longer($0, $1) }) // "sdfxbcgbhmvgn" |
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 url = location.href.split("/"); | |
var last = (url[url.length-1])? url[url.length-1] : "index"; | |
var fileName = last.split(".html")[0]; |
OlderNewer