SET IDENTITY_INSERT sometableWithIdentity ON
資料insert完後要再執行OFF
參考網址:
SQL SERVER – Enable Identity Insert – Import Expert Wizard
SET IDENTITY_INSERT sometableWithIdentity ON
//設定中文語系, 取自http://blog.e-happy.com.tw/?p=5011 $.datepicker.regional['zh-TW'] = { dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], dayNamesMin: ["日", "一", "二", "三", "四", "五", "六"], monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], prevText: "上月", nextText: "次月", weekHeader: "週" }; //將預設語系設定為中文 $.datepicker.setDefaults($.datepicker.regional["zh-TW"]);
<script src="datepicker-zh-TW.js"></script> <script src="jquery-ui.js"></script>
<Connector protocol="HTTP/1.1" port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keystoreFile="{路徑}/ngss_cer/key.jks" keyAlias="xxx" keystorePass="xxxxxx" truststoreFile="{路徑}/key.jks" truststorePass="docsntnu" URIEncoding="UTF-8" />
<Connector protocol="HTTP/1.1" port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" clientAuth="false" sslProtocol="TLS" ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA" keystoreFile="{路徑}/ngss_cer/key.jks" keyAlias="xxx" keystorePass="xxxxxx" truststoreFile="{路徑}/key.jks" truststorePass="docsntnu" URIEncoding="UTF-8" />
$sudo apachectl configtest AH00526: Syntax error on line 144 of /private/etc/apache2/extra/httpd-ssl.conf: SSLCertificateFile: file '/private/etc/apache2/server.crt' does not exist or is empty
$brew install mcrypt php55-mcrypt
==> Installing php55-mcrypt from homebrew/homebrew-php Error: You must `brew link freetype' before php55-mcrypt can be installed
$brew link --overwrite freetype回應如下
Linking /usr/local/Cellar/freetype/2.5.5... 8 symlinks created
$brew install php55-mcrypt
==> Installing php55-mcrypt from homebrew/homebrew-php ==> Installing php55-mcrypt dependency: autoconf ......以下省略
Route::get('lava', function () { return 'Hello World'; });
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /~alvin/lara #新增這行
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
$cd /tmp (先換到tmp目錄) $curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php All settings correct for using Composer Downloading... Composer successfully installed to: /private/tmp/composer.phar Use it: php composer.phar
$mv composer.phar /usr/local/bin/composer $composer回應如下
______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.0-dev (bd2d7eba05dc6a51dbbad780b6f0eb505accba75) 2015-07-31 08:06:09 ......以下省略
$ composer self-update
Updating to version a67eaf04c7eee3d10d7c64f3eef47995ec150ffe. Downloading: 100% Use composer self-update --rollback to return to version 523aef76d0fa29c18bf42264e88fc9b58acf825c
enableMouseOver(); mouseEnabled = true;
var stage = new createjs.Stage("text"); stage.mouseEnabled = true; stage.enableMouseOver(); var circle = new createjs.Shape(); circles.on("mouseover", function (evt) { var target = evt.target; //do something... }); stage.addChild(circles); stage.update();
/*Facebook UI的對話框整個 */ .fb_dialog{
z-Index: 99999 !important;
}
/*控制對話框寬高使用底下這個*/ .FB_UI_Dialog { width: 320px !important; }
(function(console){ console.save = function(data, filename){ if(!data) { console.error('Console.save: No data') return; } if(!filename) filename = 'console.json' if(typeof data === "object"){ data = JSON.stringify(data, undefined, 4) } var blob = new Blob([data], {type: 'text/json'}), e = document.createEvent('MouseEvents'), a = document.createElement('a') a.download = filename a.href = window.URL.createObjectURL(blob) a.dataset.downloadurl = ['text/json', a.download, a.href].join(':') e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null) a.dispatchEvent(e) } })(console);
function strip_all($string){ $string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string ); $string = strip_tags($string); return $string; }
function_exists
is because within the context of a plugin activation, the function does already exist. This is due to the way WordPress activates plugins in a sandbox, which is necessary to enable it to recover from fatal errors in the activated plugin. Technically, once the plugin is activated the function_exists
check would not be necessary, but you'd never be able to activate that plugin via conventional means without it. – Milo Sep 24 '12 at 15:57if( !function_exists() ): function wp_notify_postauthor() { //執行內容 } endif;
$('#target').change(function(){ //執行想要的程式 });
$('#targetA').change({target: 'A'},demo); $('#targetB').change({target: 'B'},demo); function demo(event){ alert(event.data.target); }
henplus> select * into database_name.new_table from old_table; affected 47186 rows (547 msec) //成功
sp_spaceused old_table;
affected 1 rows (50 msec)
henplus>set-session-property auto-commit on;
cd 你的目錄 find . -type d -name '.svn' <--先確認檔案 find . -type d -name '.svn' | while read f;do rm -rf "$f"; done <-- 全部強制刪除
資訊: Deploying web application directory TEST log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. 2015/5/23 下午 03:19:43 org.apache.catalina.core.StandardContext start 嚴重的: Error listenerStart 2015/5/23 下午 03:19:43 org.apache.catalina.core.StandardContext start 嚴重的: Context [/TEST] startup failed due to previous errors
henplus> alter table test add specs char(2) null;
FAILURE: The 'ALTER TABLE' command is not allowed within a multi-statement transaction in the 'db' database.
henplus>set-session-property auto-commit on;
henplus>set-session-property -----------------+----------------+-----------------------------------------------+ Name | Value | Description | -----------------+----------------+-----------------------------------------------+ auto-commit | on | Switches auto commit | isolation-level | read-committed | sets the transaction isolation level | read-only | off | Switches on read only mode for optimizations. | -----------------+----------------+-----------------------------------------------+
henplus> alter table test add specs char(2) null;
ok. (13 msec)
henplus> sp_rename 'test.specs', 'test.specs2';
affected 1 rows (119 msec)
henplus> alter table test add primary key (id);
cocos new 專案名稱 -p com.你的名稱 -l cpp -d 目錄路徑
$('#object').bind('propertychange change', function (e) { //實際要執行的code $(this).blur(); });
看起來簡單的解釋是:要載入其他用Objective-C寫的靜態library,要設定這個flag。而這個flag也有造成執行檔肥大的問題。The -ObjC Linker Flag
Passing the -ObjC option to the linker causes it to load all members of static libraries that implement any Objective-C class or category. This will pickup any category method implementations. But it can make the resulting executable larger, and may pickup unnecessary objects. For this reason it is not on by default.
var timezone = jstz.determine(); function get_user_timezone(target) { if( target != null && target.length != 0 ) target.val(encodeURI(timezone.name())); return timezone.name(); }
<input id="refreshed" name="refreshed" type="hidden" value="no" /> <script> onload = function () { var e = $('#refreshed'); if (e.val() == 'yes') { e.val('no'); location.reload(); } }; function set_reload() { $('#refreshed').val('yes'); } </script>