Skip to content

Instantly share code, notes, and snippets.

View shybovycha's full-sized avatar

Artem Shubovych shybovycha

View GitHub Profile
public java.lang.String concatenationWithExtraVar();
Code:
0: new #8 // class java/lang/StringBuilder
3: dup
4: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V
7: aload_0
8: getfield #3 // Field a1:Ljava/lang/String;
11: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
14: aload_0
15: getfield #5 // Field a2:Ljava/lang/String;
Compiled from "Chaining.java"
public class Chaining {
public Chaining();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: aload_0
5: ldc #2 // String 111111111111111111111111
7: putfield #3 // Field a1:Ljava/lang/String;
10: aload_0
#include <stdio.h>
#include <math.h>
#include <SFML/Window.hpp>
#define Persistence 1.f / 8.f
#define Number_Of_Octaves 7
inline float interpolate(float a, float b, float x)
{
float ft = x * 3.1415927;
class Mines
attr_accessor :field
attr_accessor :dimension
def initialize
build_field(rand(10) + 1, rand(10))
end
def build_field(dimension, number_of_mines)
@field = []
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def lev(s1, s2, l1 = None, l2 = None):
if l1 == None:
l1 = len(s1)
if l2 == None:
l2 = len(s2)
import strutils, threadpool
let a: array[10, int] = [1,2,3,4,5,5,6,4,3,2]
proc f(x:int) =
let s = intToStr(x)
echo s
proc main =
parallel:
import threadpool
# Array needs explicit size to work, probably related to issue #2287
const a: array[0..5, int] = [1,2,3,4,5,6]
proc f(n) = echo "Hello ", n
proc main =
parallel:
for i in countup(0, a.high-1, 2):
@shybovycha
shybovycha / Postings-editor.markdown
Last active August 29, 2015 14:10
Postings editor
@shybovycha
shybovycha / main.cpp
Created September 24, 2013 18:32
Inline assembly in MSVC
#include <stdio.h>
extern "C" int __stdcall my_proc(int, int);
int main(void)
{
int a = 1, b = 0, c = 2;
// calculate b = c^2 - a
__asm
@shybovycha
shybovycha / README.md
Last active December 20, 2015 23:09 — forked from killercup/README.md

You have your Rails Apps with specific Gemsets in RVM.

The following commands creates a wrapped unicorn_rails bin. Be sure to replace the variables and that you have unicorn in your bundle.

> rvmsudo rvm wrapper [RUBY VERSION]@[GEMSET] [GEMSET] unicorn_rails

Now you have a /usr/local/rvm/bin/[GEMSET]_unicorn_rails I will refer to [GEMSET]_unicorn_rails as [WRAPPED_NAME]