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<iostream> | |
#include<vector> | |
#include<string> | |
using namespace std; | |
struct node | |
{ | |
node * left; | |
node * right; |
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<iostream> | |
#include<cstdlib> | |
using namespace std; | |
struct Box { | |
int side[3], cap=0; | |
}; | |
int sortnum(int tmp[]) |
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
a = undefined | |
b = 13 # this could be anything you input | |
if b < 5 | |
a = 1 | |
else if b >= 5 and b < 15 | |
a = 2 | |
else # which is b >= 15 |
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 a = {}; | |
if (a === {}) | |
alert("yo"); | |
else | |
alert("nooooo"); |
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
### | |
# input: "20150806XXXXXXXX" | |
# output "20150802" | |
### | |
getSunday = (date) -> | |
if typeof(date) isnt "string" | |
date = date.toString() | |
if date.length isnt 8 |
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 <stdlib.h> | |
#include <math.h> | |
int main() | |
{ | |
bool first = true; | |
for (int times = 5 ; times > 0 ; times--) { | |
int data_num = 0, a = 0,b = 0; | |
int numArray[100]; |
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 NUnit.Framework; | |
using System; | |
namespace FizzBuzz { | |
[TestFixture] | |
public class FBTest { | |
[Test] | |
public void NormalNumber() { | |
Assert.That(MainClass.Decide(1), Is.EqualTo("1")); | |
Assert.That(MainClass.Decide(2), Is.EqualTo("2")); |
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
library IEEE; | |
use IEEE.STD_LOGIC_1164.all; | |
entity MAX_gate is | |
port( | |
A,B,C : in std_logic_vector(3 downto 0); | |
A_max,B_max,C_max : out Bit | |
); | |
end MAX_gate; |
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 <ctype.h> | |
#include <algorithm> | |
#include <vector> | |
class Alpha | |
{ | |
public: | |
char c; | |
int value; |
OlderNewer