Skip to content

Instantly share code, notes, and snippets.

View soltys's full-sized avatar

Paweł Sołtysiak soltys

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Net;
namespace ConsoleApp20
{
class Program
{
static void Main(string[] args)
{
@soltys
soltys / gist:687ec46ee6995beed4bc89a0bcb6c34b
Last active January 9, 2018 16:42
git_how_to_mess_up_merge
@echo off
rem script for Windows
git init
echo George Washington >> us_presidents.txt
echo John Adams >> us_presidents.txt
echo Thomas Jefferson >> us_presidents.txt
git add .
alert()
[Fact]
public void CheckIfAllClassesInNamespaceHavePropertiesWithVirtualKeyword()
{
var assembly = Assembly.GetAssembly(typeof(User));
var @namespace = typeof(User).Namespace;
var typesInNamespace = GetTypesInNamespace(assembly, @namespace);
foreach (var type in typesInNamespace)
{
var properties = type.GetProperties();
[Fact]
public void CheckIfAllClassesInNamespaceHavePropertiesWithVirtualKeyword()
{
var assembly = Assembly.GetAssembly(typeof(User));
var @namespace = typeof(User).Namespace;
var typesInNamespace = GetTypesInNamespace(assembly, @namespace);
foreach (var type in typesInNamespace)
{
var properties = type.GetProperties();
#include <stdio.h>
#include <stdlib.h>
typedef struct node_tag{
int x;
struct node_tag* next;
}node;
node* addNode(node* list, int x){
list->next = (node*) malloc(sizeof(node));
list->next->next = NULL;
#pragma scop
for ( i = 0; i < m; i++ )
{
for ( j = 0; j < n; j++ )
{
x = ( ( double ) ( j - 1 ) * x_max
+ ( double ) ( m - j ) * x_min )
/ ( double ) ( m - 1 );
y = ( ( double ) ( i - 1 ) * y_max
unsigned char a,b; //char'y są 8 bitowe (patrz treść zadania)
unsigned short int wynik = 0; // short int 16 bitowy (patrz treść zadania)
a=12; //Ustawiamy dwie wartości które chcemy przemnożyć
b=8;
//Rozpoczynamy wstawkę assemblerową
_asm
{
mov dx,0 //kolejne sumy a &lt;&lt; coś będziemy przechowywać w dx (patrz wzór)
mov bl, b //kopiujemy do bl wartość zmiennejb
mov cl, 0x00 //cl będzie przechowywać wykładnik potęgi 2 (patrz wzór)
var o = {};
var animals = ["cat", "dog", "fan"];
for(var i=0; i < 3; i++){
var animalName = animals[i];
var funName = animalName + "Fun";
o[funName] = function(){
return animalName;
};
clc
clear all
close all
axis([0,800,0,600,0,300])
line([55,509],[0,0],[0,0],'color','b')
line([509,509],[0,26],[0,0],'color','b')
line([509,610],[26,26],[0,0],'color','b')
line([610,610],[26,13],[0,0],'color','b')
line([610,735],[13,13],[0,0],'color','b')