- 下载并安装 XCode ;
- 访问 Homebrew 主页, 按照提示安装 Homebrew ;
This file contains hidden or 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
| /* A Java program to evaluate a given expression where tokens are separated | |
| by space. | |
| Test Cases: | |
| "10 + 2 * 6" ---> 22 | |
| "100 * 2 + 12" ---> 212 | |
| "100 * ( 2 + 12 )" ---> 1400 | |
| "100 * ( 2 + 12 ) / 14" ---> 100 | |
| */ | |
| import java.util.Stack; |
This file contains hidden or 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
| launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist | |
| sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist | |
| sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz | |
| sudo pkgutil --forget org.macosforge.xquartz.pkg | |
| # Log out and log in |
This file contains hidden or 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
| create user 'mysql'@'127.0.0.1' IDENTIFIED BY 'mysql123'; | |
| GRANT ALL PRIVILEGES ON *.* TO 'mysql'@'127.0.0.1' IDENTIFIED BY 'mysql123' WITH GRANT OPTION; |
This file contains hidden or 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
| CREATE DATABASE `AspNetIdentity` /*!40100 DEFAULT CHARACTER SET utf8 */; | |
| CREATE TABLE `AspNetRole` ( | |
| `Id` varchar(128) NOT NULL, | |
| `Name` varchar(255) DEFAULT NULL, | |
| PRIMARY KEY (`Id`), | |
| UNIQUE KEY `Name_UNIQUE` (`Name`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| CREATE TABLE `AspNetUser` ( |
This file contains hidden or 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
| gem: --no-ri --no-rdoc --user-install |
This file contains hidden or 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
| SELECT | |
| sc.name +'.'+ ta.name TableName, | |
| SUM(pa.rows) RowCnt | |
| FROM sys.tables ta | |
| INNER JOIN sys.partitions pa ON pa.OBJECT_ID = ta.OBJECT_ID | |
| INNER JOIN sys.schemas sc ON ta.schema_id = sc.schema_id | |
| WHERE ta.is_ms_shipped = 0 AND pa.index_id IN (1,0) | |
| GROUP BY sc.name,ta.name | |
| ORDER BY SUM(pa.rows) DESC |
This file contains hidden or 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
| SELECT [Name] | |
| ,[Subject] | |
| ,[Score] | |
| ,LAG(Score, 1, 0) Over (Partition By Name Order By Subject) As [LagValue] | |
| ,LEAD(Score, 1, 0) Over (Partition By Name Order By Subject) As [LeadValue] | |
| ,FIRST_VALUE(Score) Over (Partition By Name Order By Subject) As [FirstValue] | |
| ,LAST_VALUE(Score) Over (Partition By Name Order By Subject) As [LastValue] | |
| FROM [Test].[dbo].[Score] |
This file contains hidden or 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
| <html ng-app="app"> | |
| <head lang="en"> | |
| <meta charset="UTF-8"> | |
| <title>AngularJS DEMO</title> | |
| </head> | |
| < body ng-controller="DemoController"> | |
| <h1>{{greeting}}</h1> | |
| <script type="text/javascript" src="scripts/lib/require/require.js" |
This file contains hidden or 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
| requirejs.config({ | |
| baseUrl: 'scripts', | |
| paths: { | |
| 'angular': 'lib/angular/angular', | |
| 'angular-animate': 'lib/angular/angular-animate', | |
| 'angular-aria': 'lib/angular/angular-aria', | |
| 'angular-cookies': 'lib/angular/angular-cookies', | |
| 'angular-messages': 'lib/angular/angular-messages', | |
| 'angular-mocks': 'lib/angular/angular-mocks', | |
| 'angular-resource': 'lib/angular/angular-resource', |