View Cin.cs
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
namespace Nakov.IO | |
{ | |
using System; | |
using System.Text; | |
using System.Globalization; | |
/// <summary> | |
/// Console input helper for C# and .NET. Allows simplified reading of numbers and string | |
/// tokens from the console in a way similar to "cin" in C++ and java.util.Scanner in Java. | |
/// </summary> |
View MergeSortExample.cs
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; | |
public class MergeSortExample | |
{ | |
public static void Main(string[] args) | |
{ | |
int[] array = { 5, 9, 2, 3, 6, -7 }; | |
Console.WriteLine("Unsorted: [{0}]", string.Join(", ", array)); | |
var sortedArr = MergeSort(array, 0, array.Length - 1); |
View agency.css
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 "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"; | |
.site-header, .site-footer, main section { | |
border: 1px solid blue; | |
margin: 10px; | |
} | |
.industries article { | |
width: 300px; | |
border: 1px solid green; |
View agency.css
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 "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"; | |
@import url('https://fonts.googleapis.com/css?family=Montserrat'); | |
body { | |
font-family: Montserrat, sans-serif; | |
font-size: 14px; | |
margin: 0; | |
} |
View agency.css
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 "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"; | |
@import url('https://fonts.googleapis.com/css?family=Montserrat'); | |
* { | |
word-wrap: break-word; | |
} | |
body, section, header, footer { | |
margin: 0; |
View RageQuit.cs
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; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
class RageQuit | |
{ | |
static void Main() |
View Files.cs
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; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
class Files | |
{ | |
static void Main() | |
{ | |
var n = int.Parse(Console.ReadLine()); |
View CommandInterpreter.cs
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; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
class CommandInterpreter | |
{ | |
static void Main() |
View InsecureRandomGenerator.sol
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
// Insecure random generator for Solidity. Can be manipulated by the miners | |
contract InsecureRandomGenerator { | |
bytes32 public randseed; | |
function pseudoRandom(uint start, uint end) returns (uint) { | |
bytes32 prevBlockHash = block.blockhash(block.number-1); | |
randseed = keccak256(randseed, prevBlockHash, block.timestamp, | |
block.coinbase, block.difficulty, block.number); | |
uint range = end - start + 1; |
View Cert.sol
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
pragma solidity ^0.4.18; | |
contract Cert { | |
mapping (string => bool) private certificateHashes; | |
address contractOwner = msg.sender; | |
function add(string hash) public { | |
require (msg.sender == contractOwner); | |
certificateHashes[hash] = true; | |
} |
OlderNewer