#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#!/bin/bash
#同步网络时间
echo “同步网络时间中…”
apt-get install -y ntpdate
ntpdate -u cn.pool.ntp.org
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
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(); |
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
@echo off | |
color 0a | |
title windows7系统垃圾清理--- | |
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★ | |
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★ | |
echo.★☆ ☆★ | |
echo.★☆ ☆★ | |
echo.★☆ 清理系统垃圾文件,请稍等...... ☆★ | |
echo ★☆ ☆★ | |
echo.★☆ ☆★ |
[.NET: Int32] = [Oracle:NUMBER(2)..NUMBER(9)*]
[.NET: Int64] = [Oracle:NUMBER(10)..NUMBER(18)*]
[.NET: Double] = [Oracle:NUMBER(x, 0)..NUMBER(x, 15)*]
[.NET: Double] = [Oracle: FLOAT]
[.NET: Decimal] = [Oracle:NUMBER]
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
/* | |
ref: https://stackoverflow.com/questions/11595217/convert-bigint-unsigned-to-int#11595484 | |
*/ | |
/* | |
CREATE FUNCTION long2int (n BIGINT) RETURNS INT(11) RETURN n; | |
*/ | |
SET @a:= CAST('111' AS SIGNED ); |
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
// =============================================================================== | |
// 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. |
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
using System; | |
using System.Collections; | |
using System.Data; | |
using MySql.Data.MySqlClient; | |
using System.Linq; | |
using System.Xml; | |
namespace OBALog.Data | |
{ | |
[System.Diagnostics.DebuggerStepThrough] |
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
// 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])); |