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 SC{ | |
static class N{ | |
@Retained N1 n1; | |
@Retained N2 n2; | |
} | |
static class O{ | |
@Retained O1 o1; | |
@Retained O2 o2; | |
} |
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
### Android ### | |
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the Dalvik VM | |
*.dex | |
# Java class files | |
*.class |
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
git config --global core.autocrlf input | |
Because of https://help.github.com/articles/dealing-with-line-endings#global-settings-for-line-endings |
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
// copyright ersin ertan 2014+ | |
// Visualization | |
// |$|*,_|*,_,_,_|*,_,_,_,_,_,_,_|*,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_| ... etc. | |
// $ = entire data struct lock bit | |
// * = sectional lock bit | |
// Functions | |
// isArrayAccessible = array[0]; or array[2^(0 - 1)]; |
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 the source image's dimensions | |
BitmapFactory.Options options = new BitmapFactory.Options(); | |
options.inJustDecodeBounds = true; // this does not download the actual image, just downloads headers. | |
BitmapFactory.decodeFile(IMAGE_FILE_URL, options); | |
int srcWidth = options.outWidth; // actual width of the image. | |
int srcHeight = options.outHeight; // actual height of the image. | |
// Only scale if the source is big enough. This code is just trying to fit a image into a certain width. | |
if(desiredWidth > srcWidth) |
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 jcsp.lang.*; | |
public class SendEvenIntsProcess implements CSProcess | |
{ | |
private ChannelOutput out; | |
public SendEvenIntsProcess(ChannelOutput out) | |
{ | |
this.out = out; | |
} |
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 jcsp.lang.*; | |
public class IntegrateInt implements CSProcess | |
{ | |
private final ChannelInputInt in; | |
private final ChannelOutputInt out; | |
public IntegrateInt (ChannelInputInt in, ChannelOutputInt out) | |
{ | |
this.in = in; |
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
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/gist-embed/2.0/gist-embed.min.js" type="text/javascript"></script> | |
</head> | |
<code data-gist-id="id of the gist"></code> |
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 jcsp.lang.*; | |
public class DriverProgram{ | |
public static void main(String[] args) { | |
One2OneChannel chan = new One2OneChannel(); | |
new Parallel(new CSProcess[]{ | |
new SendEvenIntsProcess (chan), | |
new ReadEvenIntsProcess (chan) | |
} | |
).run (); | |
} |
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 abstract class ClassLoader { | |
public Class loadClass(String name); | |
protected Class defineClass(byte[] b); | |
public URL getResource(String name); | |
public Enumeration getResources(String name); | |
public ClassLoader getParent() |
OlderNewer