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
#!/user/bin/env python | |
import os | |
from time import sleep | |
import subprocess | |
import memcache | |
mclient = memcache.Client(['127.0.0.1:11211'], debug=0) | |
try: |
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
#!/user/bin/env python | |
import os | |
from time import sleep | |
import subprocess | |
import memcache | |
mclient = memcache.Client(['127.0.0.1:11211'], debug=0) | |
user = mclient.get("user") |
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 com.levent.experimental.sleep; | |
/* | |
* Because that the consistency of the precision of Thread.sleep method | |
* is not guaranteed, a container method (delayNSeconds) is tested if | |
* the duration reached with the Thread.sleep method or not. | |
* | |
* On this simple dummy code, Thread.sleep method is compared with the | |
* container method for countTest times. | |
* |
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 com.levent.experimental.sleep; | |
/* | |
* Because that the consistency of the precision of Thread.sleep method | |
* is not guaranteed, a container method (delayNSeconds) is tested if | |
* the duration reached with the Thread.sleep method or not. | |
* | |
* On this simple dummy code, Thread.sleep method is compared with the | |
* container method for countTest times. | |
* |
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; | |
int main() | |
{ | |
int x; | |
cout << "Enter a number" << endl; | |
cin >> x; |
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; | |
int main() | |
{ | |
int x; | |
cout << "Enter a number" << endl; | |
cin >> x; | |
bool prime = true; |
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
// Demonstraction on the wikipedia article sample code, actual source; | |
// https://en.wikipedia.org/wiki/Generics_in_Java#Problems_with_type_erasure | |
package com.levent.typeerasure; | |
import java.util.ArrayList; | |
public class GenericInstanceTest { | |
public static void main(String[] args) { | |
ArrayList<Integer> li = new ArrayList<Integer>(); |
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 <string> | |
using namespace std; | |
class Employee | |
{ | |
private: | |
friend class EmployeeList; | |
string name; | |
int age; |
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
// Const.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
using namespace std; | |
class Person | |
{ | |
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> | |
int main() | |
{ | |
/* a simple integer */ | |
int i = 1234; | |
/* a pointer to an integer */ | |
int * p = 0; | |
p = &i; |
OlderNewer