This file contains hidden or 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
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |
This file contains hidden or 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 java.io.FileNotFoundException; | |
| import java.io.UnsupportedEncodingException; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.Formatter; | |
| import java.util.List; | |
| import java.util.Locale; | |
| import java.util.Scanner; | |
| import java.util.Stack; | |
| import java.util.regex.Matcher; |
This file contains hidden or 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 Secret { | |
| private String secretCode = "It's a secret"; | |
| private String getSecretCode(){ | |
| return secretCode; | |
| } | |
| } | |
This file contains hidden or 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
| /** | |
| * Connects to the database | |
| * | |
| * Connects to the database and some other | |
| * discription.... | |
| * @param $type some variable | |
| */ | |
| function connect($type = '') { | |
| //some code | |
| } |
This file contains hidden or 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 <sstream> | |
| #include <stdlib.h> | |
| #include <string> | |
| #include <map> | |
| int getIntVal(std::string strConvert) { | |
| int intReturn; |
This file contains hidden or 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
| Initial: | |
| x.x.x.x | |
| x.x.x | |
| x.x...x | |
| x.x.x | |
| x.x.x.x | |
| 1. | |
| xOx.x.x | |
| xOx.x |
This file contains hidden or 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 java.lang.instrument.Instrumentation; | |
| public class ObjectSizeFetcher { | |
| private static Instrumentation instrumentation; | |
| public static void premain(String args, Instrumentation inst) { | |
| instrumentation = inst; | |
| } | |
| public static long getObjectSize(Object o) { |
This file contains hidden or 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 java.io.BufferedReader; | |
| import java.io.DataInputStream; | |
| import java.io.IOException; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.io.FileWriter; | |
| import java.util.regex.Pattern; | |
| import java.util.regex.Matcher; |
This file contains hidden or 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
| class Command: | |
| def execute(self): | |
| raise NotImplementedError() | |
| class Accelerator(Command): | |
| def __init__(self, car): | |
| self.car = car | |
| def execute(self): |
This file contains hidden or 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
| class LazyCalc: | |
| def __init__(self): | |
| self.dict = {} | |
| def calc(self, n): | |
| if n not in self.dict: | |
| def recursion(n): | |
| if n <= 1: | |
| return 1 |
OlderNewer