- 方便代码的交流和维护。
- 不影响编码的效率,不与大众习惯冲突。
- 使代码更美观、阅读更方便。
- 使代码的逻辑更清晰、更易于理解。
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | |
</configSections> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |
</startup> | |
<log4net> | |
<appender name="UdpAppender" type="log4net.Appender.UdpAppender"> |
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
drop table if exists dim_date; | |
CREATE TABLE dim_date | |
( | |
date_key int NOT NULL, | |
full_date date NULL, | |
date_name char(11) NOT NULL, | |
date_name_us char(11) NOT NULL, | |
date_name_eu char(11) NOT NULL, | |
day_of_week tinyint NOT NULL, | |
day_name_of_week char(10) NOT NULL, |
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
#coding=utf-8 | |
import urllib,urllib2,re,os,json,gevent,traceback | |
from BeautifulSoup import BeautifulSoup | |
from gevent import monkey | |
monkey.patch_all() | |
rootUrl='http://music.baidu.com' | |
artistId=2825 #想批量下载并归类你喜欢的歌手的所有专辑?那就把这里替换成该歌手在百度音乐的Id吧,例如:http://music.baidu.com/artist/2825 |
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
#encoding: utf-8 | |
require 'net/http' | |
require 'open-uri' | |
require 'nokogiri' # 用于解析html的模块 | |
# sudo apt-get install libxslt-dev libxml2-dev | |
# sudo gem install nokogiri | |
require 'pathname' | |
class JanDanSpider |
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
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
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
USE DATABASE_NAME | |
DECLARE @SearchStr nvarchar(100) = 'SEARCH_TEXT' | |
DECLARE @Results TABLE (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) | |
SET NOCOUNT ON | |
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110) | |
SET @TableName = '' | |
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''') |
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
USE db | |
SET NOCOUNT ON | |
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(600),@TableRowCount int,@ColumnKey nvarchar(128),@DbName nvarchar(50); | |
SET @TableName = '' | |
WHILE @TableName IS NOT NULL | |
BEGIN | |
SET @ColumnName = ''; |
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
git clone --depth 1 https://github.com/CocoaPods/Specs |
OlderNewer