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
### PowerShell script to install a minimal Workstation with Chocolatey | |
# https://chocolatey.org | |
## To Run This Script: | |
# 1. Download this PowerShell script | |
# * Right-click <> ("View Raw") and "Save As" to %USERPROFILE% (/Users/<username>) | |
# * If Cocolatey is not already installed, see | |
# "Uncomment to install Chocolatey" | |
# * If you would like to also install Anaconda | |
# (Python, IPython, lots of great libraries) |
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 javafx.application.Application; | |
import javafx.geometry.Orientation; | |
import javafx.scene.*; | |
import javafx.scene.control.*; | |
import javafx.scene.layout.*; | |
import javafx.stage.*; | |
public class SimpleDocking extends Application { | |
public void start(final Stage stage) throws Exception { | |
final SplitPane rootPane = new SplitPane(); |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>group</groupId> | |
<artifactId>dummy</artifactId> | |
<name>Dummy Project</name> | |
<version>1.0.12</version> | |
<packaging>pom</packaging> | |
<scm> | |
<connection>scm:git:https://......</connection> | |
<tag>HEAD</tag> |
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 Main { | |
public static void main(String... args) throws Exception { | |
ApplicationContext ctx = new ClassPathXmlApplicationContext("context.xml"); | |
// simple service | |
TempConverter converter = ctx.getBean("gw1", TempConverter.class); | |
System.out.println(converter.fahrenheitToCelcius(68.0f)); | |
// web service | |
converter = ctx.getBean("gw2", TempConverter.class); | |
System.out.println(converter.fahrenheitToCelcius(68.0f)); |
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
unit uImageLoader; | |
interface | |
uses SysUtils, Classes, System.Generics.Collections, | |
FMX.Types, FMX.Objects, FMX.Controls, AsyncTask, AsyncTask.HTTP; | |
type | |
TLoadQueueItem = record | |
ImageURL: String; |
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
# coding: utf-8 | |
import logging | |
import os, sys, json | |
from PyQt4 import QtGui | |
from PyQt4.QtCore import QTimer | |
import imaplib, StringIO, rfc822 | |
from email.Header import decode_header | |
_config = json.load(open('config.json')) # server, user, pasw | |
locals().update(_config) |
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
//Anonymous procedure approach by Lars Fosdal | |
type | |
TArg<T> = reference to procedure(const Arg: T); | |
procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; CallBack: TArg<PAnsiChar>); | |
const | |
CReadBuffer = 2400; | |
var | |
saSecurity: TSecurityAttributes; | |
hRead: THandle; |
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.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Iterator; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
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
# PowerShell Drag & Drop sample | |
# Usage: | |
# powershell -sta -file dragdrop.ps1 | |
# (-sta flag is required) | |
# | |
Function DragDropSample() { | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$form = New-Object Windows.Forms.Form | |
$form.text = "Drag&Drop sample" | |
$listBox = New-Object Windows.Forms.ListBox |
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
# http://code.activestate.com/recipes/576534-dump-oracle-db-schema-to-text/ | |
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
__version__ = '$Id: schema_ora.py 928 2012-01-12 19:09:34Z tt $' | |
# export Oracle schema to text | |
# usable to compare databases that should be the same | |
# |