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 <strings.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <netdb.h> | |
#include <syslog.h> | |
#include <libgen.h> | |
#include <arpa/inet.h> | |
#include <sys/time.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
private int getDigit (int num) | |
{ | |
Double d = Math.floor(Math.log10(num)); | |
int i = d.intValue() + 1; | |
return i; | |
} |
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
private getNumberAtDigit(int value, int digit) | |
{ | |
return (number / (int) Math.pow(10, at - 1)) % 10; | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<project name="MyProject" default="jar" basedir="."> | |
<property name="src" value="src"/> | |
<property name="build" value="build"/> | |
<property name="dist" value="dist"/> | |
<target name="init"> | |
<mkdir dir="${build}"/> | |
<mkdir dir="${dist}"/> |
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
# pkg install developer_opensolaris_X | |
Creating Plan | |
pkg install: The following pattern(s) did not match any allowable packages. Try | |
using a different matching pattern, or refreshing publisher information: | |
developer_opensolaris_X | |
# pkg install developer/opensolaris/X | |
Creating Plan / |
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 javax.swing.SwingUtilities | |
import scala.swing.Button | |
import scala.swing.MainFrame | |
import scala.swing.SimpleSwingApplication | |
import scala.actors._ | |
import scala.actors.Actor._ | |
object Main extends SimpleSwingApplication { | |
implicit def functionToRunable[T](x: => T) : Runnable = new Runnable() { def run = 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
/** | |
* Sample code which listens to Enter key event on TextField | |
*/ | |
package myscala | |
import scala.swing.BorderPanel | |
import scala.swing.Label | |
import scala.swing.MainFrame | |
import scala.swing.SimpleSwingApplication | |
import scala.swing.TextField |