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 click | |
from random import shuffle | |
blocks = ['1', '2', '3', '4', '5', '6', '7', '8', '-'] | |
def init_puzzle(): | |
shuffle(blocks) | |
flat_puzzle = blocks | |
puzzle = [[0 for j in range(3)] for i in range(3)] | |
for i in range(3): |
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 Note = React.createClass({ | |
getInitialState: function () { | |
return { | |
editing: false, | |
text: this.props.children | |
} | |
}, | |
edit: function () { | |
this.setState({ |
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
@coroutine | |
def receive_messages(): | |
try: | |
while not QUIT: | |
msg = (yield) | |
if getattr(msg, 'sender', None) == None: | |
# print("\n\n\nERROR 1\n\n") | |
continue | |
if getattr(msg.sender, 'type', None) == None: |
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 class Boss extends Employee{ | |
public Boss(String firstName, String lastName, int salary) { | |
super(firstName,lastName); | |
setSalary(salary); | |
} | |
@Override | |
protected void work() { |
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 "Node.h" | |
#include<iostream> | |
using namespace std; | |
Node::Node(int elem){ | |
data = elem; | |
isDataSet = true; | |
next = nullptr; | |
} | |
Node::Node(void){ |
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
//Algorithm and implemention by Masoud Bonabi | |
import java.util.Stack; | |
public class Main { | |
static Stack[] pipes; | |
final static int N = 3; | |
public static void solve(final int srcPipe,final int destPipe,final int solveFor){ |
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> | |
using namespace std; | |
long long binaryOf(int a){ | |
return a?binaryOf(a/2)*10 + a%2:0; | |
} | |
int main(){ | |
int a; | |
cin>>a; |
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 once | |
template<class T> | |
class MyStack | |
{ | |
private: | |
T * array; | |
int maxSize; | |
public: | |
int front; |
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
package q3; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
public class Main { | |
public static void main(String[] args) { |
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
package q2; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
public class Main { | |
public static void main(String[] args) { | |
int a = 0; | |
try { |