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
package me.shreyasr.fbmp | |
import java.text.{DateFormat, DateFormatSymbols, SimpleDateFormat} | |
import java.util.{Date, Locale} | |
import net.ruippeixotog.scalascraper.browser.JsoupBrowser | |
import net.ruippeixotog.scalascraper.dsl.DSL.Extract._ | |
import net.ruippeixotog.scalascraper.dsl.DSL._ | |
object Parser { |
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 String capitalize(String str) { | |
String[] words = str.toLowerCase().split(" "); | |
for (int i = 0; i < words.length; i++) { | |
words[i] = Character.toUpperCase(words[i].charAt(0)) + words[i].substring(1); | |
} | |
return TextUtils.join(" ", words); | |
} |
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
EDU>> A=[62 32 45 0 49 33 44 21 0 47 49 26 24 15; 165 84 115 0 124 90 112 55 0 122 132 65 67 54] | |
EDU>> B=[-5 2; 1 1] | |
EDU>> A*B | |
EDU>> B*A | |
EDU>> A.dim | |
EDU>> size(A) | |
EDU>> A(1, 1) | |
EDU>> A(2, 14) = 45 | |
EDU>> B*A | |
EDU>> char(B*A+64) |
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.{File, FileInputStream, FilenameFilter} | |
import org.apache.poi.xwpf.extractor.XWPFWordExtractor | |
import org.apache.poi.xwpf.usermodel.XWPFDocument | |
object Main { | |
def main (args: Array[String]) { | |
println(getCountFromFolder("E:\\SchoolWork\\Running Start")) | |
} |
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
from __future__ import division | |
from scikits.audiolab import flacread | |
from numpy.fft import rfft, irfft | |
from numpy import argmax, sqrt, mean, diff, log | |
from matplotlib.mlab import find | |
from scipy.signal import blackmanharris, fftconvolve | |
from time import time | |
import sys | |
from parabolic import parabolic |
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 Timer { | |
private long startTime = 0; | |
public void start() { | |
startTime = System.currentTimeMillis(); | |
} | |
public long stop() { | |
return System.currentTimeMillis() - startTime; |
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 asciiPanel.AsciiPanel; | |
import game.screens.Screen; | |
import game.screens.StartScreen; | |
import java.awt.Color; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import javax.swing.JFrame; | |
public class Window extends JFrame implements KeyListener { | |
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
/** | |
* Invoked when the garbage collector has detected that this instance is no longer reachable. | |
* The default implementation does nothing, but this method can be overridden to free resources. | |
* | |
* <p>Note that objects that override {@code finalize} are significantly more expensive than | |
* objects that don't. Finalizers may be run a long time after the object is no longer | |
* reachable, depending on memory pressure, so it's a bad idea to rely on them for cleanup. | |
* Note also that finalizers are run on a single VM-wide finalizer thread, | |
* so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary | |
* for a class that has a native peer and needs to call a native method to destroy that peer. |
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
private boolean containsEmoji(String string) { | |
// if you're doing it frequently, move the pattern compile into a static / member variable instead | |
Pattern p = Pattern.compile("[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+"); | |
Matcher m = p.matcher(string); | |
return m.find(); | |
} |
NewerOlder