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
#ifndef __EMP_H_ | |
#define __EMP_H_ | |
/** | |
This class is for testing copy constructor of cpp | |
**/ | |
class Emp | |
{ | |
private: |
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> | |
/* | |
Copyright [2012] [Hoyoung Jung] | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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 <limits.h> | |
int main() | |
{ | |
char c = 'a'; | |
int i = -10; | |
long l = 500L; | |
unsigned long long ll= 20L; | |
printf("size of char is %d", sizeof(c)); |
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
/* heo-se.cpp : win32 console application | |
This program prints only one line. | |
Yes, that's all. | |
Main concept is from include/linux/list.c in linux kernel 2.6.xx. | |
Author: Hoyoung Jung, NHN NEXT | |
Date: 2012.02.01 | |
license: anyone can freely use and modify this code. | |
*/ | |
#include "stdafx.h" |
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; | |
using System.Security.Cryptography; | |
namespace NEXTCSharp | |
{ | |
class BaseballGame |
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 random | |
#input data and avoid redundent data | |
def input_from_user(question): | |
isRedundent=False | |
while True: | |
if isRedundent: | |
print "Numbers must be different." | |
isRedundent=False | |
raw = raw_input(question) |
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> | |
/**pointer.c | |
Should build by release mode. | |
*/ | |
{ | |
int num1; | |
int *ptr_l1; | |
int **ptr_l2; | |
printf("=================declared, but not initialize=================\n"); |
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
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <time.h> | |
struct bigdata | |
{ | |
int dataid; |
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
/*********************************** | |
Very simple sokoban implementation | |
by Hobytes | |
1993. 8 | |
(2013.10: some bug fix) | |
************************************/ | |
#include <conio.h> | |
#include <iostream> | |
#define KEY_ESC 27 |
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 Solution { | |
public int numTrees(int n) { | |
int c = 1; | |
for (int i = 2; i <= n; i++) | |
c = 2 * (2 * i - 1) * c / (i + 1); | |
return c; | |
} | |
} |
OlderNewer