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
/*** Wes's Java Cheat Sheet Version 1 ***/ | |
/*** Last Updated 2010-09-11 ***/ | |
/*** Location online http://gist.github.com/576436 ***/ | |
/* | |
* Hopefully this is a big help for you. I know I could have used something like this. | |
* This should sum up everything you do in java for at least the first few weeks of it. | |
* It may not be perfect, but can always add to it or add to it yourself at the link above. | |
* | |
* Things that will come afterwards I would need to add to this would be like how to use |
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
/*** Wes's Java Cheat Sheet Version 1 ***/ | |
/*** Last Updated 2010-09-11 ***/ | |
/*** Location online https://gist.github.com/d19a097f3e50580f2bb1 ***/ | |
/* | |
* Hopefully this is a big help for you. I know I could have used something like this. | |
* This should sum up everything you do in java for at least the first few weeks of it. | |
* It may not be perfect, but can always add to it or add to it yourself at the link above. | |
* | |
* Things that will come afterwards I would need to add to this would be like how to use |
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
int n = 0; | |
for (String s: array) { | |
if (s.length > 2 && mapping.containsKey(s)) n++; | |
} | |
String[] bigEnough = new String[n]; | |
n = 0; | |
for (String s: array) { |
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
class MyClass (val id: Int, val name: String) {} | |
class MyClass () { | |
var id: Int = 0 | |
var name: String = "" | |
def MyClass(id: Int, name: String) { | |
this.name = name | |
this.id = id | |
} |
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 com.cc.json2csv | |
import android.app.Activity | |
import android.os.Bundle | |
import play.api.libs.json._ | |
import android.widget.TextView | |
import android.util.Log | |
import scala.async.Async.{async, await} | |
import scala.concurrent.{Await, Future, ExecutionContext, future} | |
import scala.concurrent.duration._ |
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
/* | |
Copyright (c) 2013 Wes Lanning, http://codingcreation.com | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
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
class Greeter { | |
element: HTMLElement; | |
span: HTMLElement; | |
timerToken: number; | |
constructor(element: HTMLElement) { | |
this.element = element; | |
this.element.innerHTML += "The time is: "; | |
this.span = document.createElement('span'); | |
this.element.appendChild(this.span); |
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
:: Guides and examples can be found at: | |
:: http://forums.guru3d.com/showthread.php?t=356046 | |
:: Script needs to be set as a system startup batch file (with event schedular, not the "startup directory") with the highest priority and system privilages to work correctly. | |
:: Init the ramdrive (12GB) in physical memory and format it as ntfs | |
imdisk -a -s 12G -m R: -p "/fs:ntfs /q /y" -o awe | |
:: add a page file starting with 96MB and expands to 1536M | |
swapadd R:\pagefile.sys 96M 1536M |
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 models; | |
import java.util.*; | |
import javax.persistence.*; | |
import play.db.ebean.*; | |
import play.data.format.Formats.*; | |
import play.data.format.Formatters.*; | |
import play.data.validation.Constraints.*; |
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 helpers; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* @author Wes Lanning | |
* @version 2013-08-01 | |
*/ | |
public class FakeLambda |
OlderNewer