Example of how to use stdout and stdin from other programs in golang
Requires go
go run parentprocess.go
-- ######################################################### | |
-- Author: www.sqlbook.com | |
-- Copyright: (c) www.sqlbook.com. You are free to use and redistribute | |
-- this script as long as this comments section with the | |
-- author and copyright details are not altered. | |
-- Purpose: For a specified user defined table (or all user defined | |
-- tables) in the database this script generates 4 Stored | |
-- Procedure definitions with different Procedure name | |
-- suffixes: | |
-- 1) List all records in the table (suffix of _GetAll) |
# Mina Deploy | |
# =========== | |
# | |
# Adapted from Creative deploy stack in Manabalss v4, Mar.2015, updated to support staging on Jun.2015 | |
# On first deploy do: mina setup --verbose | |
# Then do : mina deploy[initialize] --trace | |
# | |
# Usage examples: | |
# mina deploy[soft,seed,compile] to=staging # deploy task with all options | a simple `mina deploy` will deploy to production | |
# mina rake[db:seed] # for multi-argument tasks # mina 'rake[payments:refund[arg1\,arg2]]' |
/* new clearfix */ | |
/* http://perishablepress.com/press/2009/12/06/new-clearfix-hack/ */ | |
.clearfix:after { | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; | |
height: 0; | |
} |
#author newdongyuwei@gmail.com | |
require 'rubygems' | |
require 'fsevents' | |
require 'net/ssh' | |
require 'net/scp' | |
require 'ruby-growl' | |
host = "10.210.74.63" | |
username = "my name" | |
password = "my password" |
#!/bin/bash | |
# -------------------------------------------------------------------- | |
# [init] Create run dir, env file if they don't exist, then source env | |
# -------------------------------------------------------------------- | |
init() { | |
MINIO_CONTAINER_NAME=$1 | |
MINIO_RUN_DIR=/data1/run/${MINIO_CONTAINER_NAME} | |
MINIO_DATA=${MINIO_RUN_DIR}/data | |
MINIO_CERTS=${MINIO_RUN_DIR}/certs | |
# create run dir for container instance |
public class SnowflakeIdGenerator | |
{ | |
public const byte DefaultMachineIdBits = 6; | |
public const byte DefaultSequenceBits = 12; | |
private readonly long _machineId = 0; | |
private readonly byte _machineIdBits = 0; | |
private readonly byte _sequenceBits = 0; | |
private readonly long _maxSequence = 0; | |
private readonly Stopwatch _stopwatch = Stopwatch.StartNew(); | |
private readonly object _lockObject = new object(); |
// =============================================================================== | |
// Microsoft Data Access Application Block for .NET | |
// http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp | |
// | |
// cs | |
// | |
// This file contains the implementations of the SqlHelper and SqlHelperParameterCache | |
// classes. | |
// | |
// For more information see the Data Access Application Block Implementation Overview. |
using System; | |
using System.Collections; | |
using System.Data; | |
using MySql.Data.MySqlClient; | |
using System.Linq; | |
using System.Xml; | |
namespace OBALog.Data | |
{ | |
[System.Diagnostics.DebuggerStepThrough] |
// U2A('博时货'); | |
// return '\u234A\u3BaD\u42EA\u1BC3' | |
var U2A = function(s){ | |
var r = s.replace(/&#(\d+);/ig,'\\u{$1}'); | |
var A = r.match(/\d+/ig); | |
for(var i = 0;i<A.length;i++){ | |
r = r.replace('\\u{'+A[i].toString()+'}',String.fromCharCode(A[i])); |