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
var horizontalLines = (function() { | |
var playing = false; | |
var callback = _.identity; | |
var distance = min_dimension * 0.5; | |
var line = two.makeLine(-width, center.y - center.y * .25, 0, center.y - center.y * .25); | |
var line2 = two.makeLine(width, center.y + center.y * .25, 2*width, center.y + center.y * .25); |
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
def find_it (numbers): | |
biggest, smaller = None, None | |
for x in numbers: | |
if x >= biggest: | |
biggest, smaller = x, biggest | |
elif biggest > x > smaller: | |
smaller = x | |
return smaller | |
print smaller |
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
public void run() { | |
try { | |
String response = HttpRequest.post("http://ec2-52-38-4-62.us-west-2.compute.amazonaws.com/") | |
.contentType("application/json") | |
.accept("application/json") | |
.send("{\"hello\":\"" + concatStringsWSep(allTweets, " ") + "\"}") | |
.body(); | |
final JSONObject what = new JSONObject(response); | |
url_done = what.getString("img"); | |
runOnUiThread(new Runnable() { |
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
public void run() { | |
try { | |
String response = HttpRequest.post("http://ec2-52-38-4-62.us-west-2.compute.amazonaws.com/") | |
.contentType("application/json") | |
.accept("application/json") | |
.send("{\"hello\":\"" + concatStringsWSep(allTweets, " ") + "\"}") | |
.body(); | |
final JSONObject what = new JSONObject(response); | |
url_done = what.getString("img"); | |
runOnUiThread(new Runnable() { |
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
void flapOptimization() | |
{ | |
vector<unsigned int> vertexCount(g.halfmesh.totalVerts); | |
vector<HE_Face*> faceTracker(g.halfmesh.totalVerts); | |
map<unsigned int, HE_Face*> flaps; | |
for(unsigned int i = 0; i < g.halfmesh.totalFaces; i++) | |
{ | |
for(unsigned int j = 0; j < 3; j++) |
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
vec3 Raytracer::getLighting(vec3 point, vec3 norm, vec3 origin, Lighting* lighting) | |
{ | |
vec3 intensity(0, 0, 0); | |
auto ka = lighting->ka; | |
auto intensityAmbient = lighting->ia; | |
intensity = ka * intensityAmbient; |
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
if (depth < 6) | |
{ | |
auto V = -r.dir; | |
auto R = 2 * dot(V, norm) * norm - V; | |
R.make_unit_vector(); | |
auto ray = Ray(point + 0.001 * norm, R); | |
if (surface->gamma_e != 0) { | |
auto recurredLight = trace(ray, ++depth); | |
light = light + inter.first->gamma_e * recurredLight; |
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
> [*New to Dota 2? Start here.*](http://goo.gl/IwmCv#heading#intro) | |
[Read Before Posting: Subreddit FAQ](http://goo.gl/COUhZ#trade#button) | |
[Subreddit Rules](http://www.reddit.com/r/DotA2/wiki/rules#rules#button) | |
[Message the Moderators](https://goo.gl/VTTJy7#mods#button) | |
>>[](#separator) |
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
#[derive(Copy, Clone, Debug)] | |
pub struct Vector2<T> { | |
pub x: T, | |
pub y: T, | |
} | |
impl<T: Copy + Num + Signed> Vector2<T> { | |
pub fn new(x: T, y: T) -> Vector2<T> where T: Float { | |
assert!(!x.is_nan() && !y.is_nan()); |
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
public static string GetCurrentPathOfProjectWindow() | |
{ | |
Type projectWindowUtilType = typeof(ProjectWindowUtil); | |
MethodInfo getActiveFolderPath = projectWindowUtilType.GetMethod("GetActiveFolderPath", BindingFlags.Static | BindingFlags.NonPublic); | |
object obj = getActiveFolderPath.Invoke(null, new object[0]); | |
return obj.ToString(); | |
} |
OlderNewer