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
using System; | |
using System.Collections.Generic; | |
namespace SharpDelegateSwitch | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Dictionary<int, Action> vars = new Dictionary<int, Action>(); |
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
func call(resp *http.Response) func() { | |
return func() { | |
if resp != nil { | |
resp.Body.Close() | |
} | |
} | |
} | |
func(url string) { | |
resp, err := http.Get(url) |
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
img { | |
display: none!important; | |
} | |
/* | |
*::before{ | |
content: ""!important; | |
} | |
*::after{ | |
content: ""!important; | |
} |
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
using System; | |
using System.Windows; | |
using System.Windows.Media; | |
using System.Windows.Media.Imaging; | |
private ImageMatrix create_matrix(string file_name) | |
{ | |
Uri imageUri = new Uri(file_name, UriKind.Relative); | |
BitmapImage imageBitmap = new BitmapImage(imageUri); |
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
var inventoryGlobal = inventory; | |
var itemToOffer |
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
#include <stdlib.h> | |
#include <stdio.h> | |
static int isNegative(float arg){ | |
char *p = (char*) malloc(20); | |
sprintf(p,"%f",arg); | |
return p[0] == '-'; | |
} | |
int main(){ |
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
var element = document.getElementById("im"); | |
var currentPosition = element.offsetTop; //Получаем текущее положение блока, который будет выплывать | |
smoothAnimation = requestAnimationFrame(function anim(time) { | |
currentPosition++; | |
element.style.top = currentPosition +"px"; | |
smoothAnimation = requestAnimationFrame(anim); // The animation would not stop after 1.5 sec if delete smoothAnimation in this line because the fucntion reference changes every time it's called | |
}); | |
setTimeout(function(){ |
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
int a = 0; | |
while((a=5) != 0 && 5 > 4){ | |
System.out.println("Hello! It's a loop."); | |
} |
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 int lerp(float start, float target, float duration, float timeSinceStart){ | |
float value = start; | |
if(timeSinceStart>=0.0f && timeSinceStart < duration){ | |
float range = target - start; | |
float percent =timeSinceStart / duration; | |
value = start + range * percent; | |
} | |
else if(timeSinceStart>=duration) | |
value = target; | |
return Math.round(value); |
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
#include <stdio.h> | |
#include <assert.h> | |
#define MAXSIZ 10 | |
typedef struct { | |
int data[MAXSIZ]; | |
int top; | |
} queue_t; | |
NewerOlder