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
#!/usr/bin/python | |
# -*- coding: windows-1251 -*- | |
r""" | |
:Authors: Dimitar A. Dimitrov | |
:Contact: dimiter[at]blue[dash]edge[dot]bg | |
:Copyright: This work is licensed under the X license. | |
For the full text of the license see http://www.opensource.org/licenses/xnet.php | |
:Version: 0.1 | |
:Date: 2004-08-22 |
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.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
public class IpOperator { | |
public static void main(String[] args) throws IOException { | |
int port = 80; |
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 org.python.util.PythonInterpreter; | |
import org.python.core.*; | |
public class PythonEmbeddedExample { | |
private static final String EOL = "\n"; | |
private static final PythonInterpreter INTERP = new PythonInterpreter(); | |
private static final String I = "\t"; | |
public static void main(String[] args) throws PyException { | |
exchangeObjects(); |
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.*; | |
/** | |
* Simple utility to convert from old Bulgarian DOS cyrillic to Windows 1251 text encoding. | |
* <pre> | |
* Usage: java Plus64 inputfile outputfile | |
* </pre> | |
* @author [email protected] | |
* @since Mar 3, 2003 1:15:33 AM | |
*/ |
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.util.Arrays; | |
import java.util.Random; | |
public class WrongSeatSimulation { | |
private static final int AVAILABLE = -1; | |
static boolean simulate(Random rnd, int numberOfSeats) { | |
int[] seats = new int[numberOfSeats]; | |
Arrays.fill(seats, AVAILABLE); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Dashboard</title> | |
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"> | |
<link rel='stylesheet' href='//fonts.googleapis.com/css?family=Open+Sans:300,600' type='text/css'> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css" > |
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.util.concurrent.DelayQueue | |
import java.util.concurrent.Delayed | |
import java.util.concurrent.TimeUnit | |
class SlidingWindowMap { | |
private periodMs | |
private available = new DelayQueue<DelayedKey<String>>() | |
SlidingWindowMap(Set<String> keys, int maxCount, long periodMs) { | |
this.periodMs = periodMs |
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
package org.junit.tests.running.methods; | |
import org.junit.Test; | |
import org.junit.runner.Description; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Parameterized; | |
import org.junit.runners.Parameterized.Parameters; | |
import java.util.ArrayList; |
NewerOlder