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
#Junk Files | |
*.DS_Store | |
[Tt]humbs.db | |
#Log Folder | |
[Ll]og | |
#Visual Studio Files | |
[Oo]bj | |
[Bb]in |
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 TableViewSource<TEntity> : UITableViewSource | |
{ | |
private IList<TEntity> _data; | |
public TableViewSource(IEnumerable<TEntity> data) { | |
this._data = data.ToList (); | |
} | |
public override int RowsInSection (UITableView tableview, int section) |
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
-- method 1 | |
SET NOCOUNT ON | |
DECLARE @SQL VARCHAR(255) | |
SET @SQL = 'DBCC UPDATEUSAGE (' + DB_NAME() + ')' | |
EXEC(@SQL) | |
CREATE TABLE #foo ( | |
tablename VARCHAR(255), | |
rc INT |
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; | |
Console.WriteLine(Environment.OSVersion); | |
// on windows output is like: | |
// Microsoft Windows NT 6.2.9200.0, windows build number included | |
// on linux output is like: | |
// Unix 3.8.0.19, linux kernel included. |
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
# enable on rooted device | |
su | |
setprop service.adb.tcp.port 5555 | |
stop adbd | |
start adbd | |
#disable on rooted device | |
setprop service.adb.tcp.port -1 | |
stop adbd | |
start adbd |
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 <stdio.h> | |
#include <stdlib.h> | |
void insertion_sort(int arr[], const int N); | |
void swap(int arr[], int i, int j); | |
void printArray(int array[]); | |
int main(int argc, char *argv[]) { | |
int array[] = { 10, 19, 13, 16, 20, 32, 27, 22, 15, 18, 21 }; | |
printArray(array); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Load ExtJS on demand</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="/ext-4/resources/css/ext-all.css" /> | |
<script type="text/javascript" src="/ext-4/ext-debug.js"></script> | |
</head> | |
<body> | |
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
REGEDIT4 | |
[HKEY_CURRENT_USER\Control Panel\Desktop] | |
"FontSmoothing"="2" | |
"FontSmoothingType"=dword:00000002 | |
"FontSmoothingGamma"=dword:00000578 | |
"FontSmoothingOrientation"=dword:00000001 |
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
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes] | |
"Arial"="WenQuanYi Micro Hei" | |
"Comic Sans MS"="WenQuanYi Micro Hei" | |
"Courier"="WenQuanYi Micro Hei Mono" | |
"Courier New"="WenQuanYi Micro Hei Mono" | |
"Fixedsys"="WenQuanYi Micro Hei" | |
"Helv"="WenQuanYi Micro Hei" | |
"Helvetica"="WenQuanYi Micro Hei" |
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
1. 生成keystore | |
注册在填写名子与姓氏时需要填写tomcat的主机ip地址 | |
keytool -genkey -v -alias tomcat -keyalg RSA -keystore tomcat.keystore -validity 365 | |
2. 准备生成 CA 的key | |
openssl genrsa -out myCA.key 2048 | |
3. 生成 CA | |
openssl req -x509 -new -key myCA.key -out myCA.cer -days 730 -subj /CN="Sencloudx Custom CA" | |
4. 准备从 CA 请求认证的请求文件 | |
keytool -certreq -alias tomcat -keystore tomcat.keystore -file server.csr | |
5. 从CA请求认证 |
OlderNewer