Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
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
angular.module('my.cordova.plugins', ['ionic']) | |
// for media plugin : http://plugins.cordova.io/#/package/org.apache.cordova.media | |
.factory('MediaSrv', function($q, $ionicPlatform, $window){ | |
var service = { | |
loadMedia: loadMedia, | |
getStatusMessage: getStatusMessage, | |
getErrorMessage: getErrorMessage | |
}; |
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
#!/usr/bin/env node | |
/* jshint esversion: 6 */ | |
// ref: https://developer.android.com/training/basics/supporting-devices/languages.html | |
// Save hook under `project-root/hooks/after_compile/` | |
// | |
// Don't forget to install xml2js using npm | |
// `$ npm install xml2js` |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var path = require('path'); | |
var jshint = require('jshint').JSHINT; | |
var async = require('async'); | |
var recursiveFolderSearch = true; | |
var foldersToProcess = [ | |
'js' |
This file has been truncated, but you can view the full file.
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
/* | |
** INSTCAT.SQL | |
** Installs catalog stored procedures on the Microsoft SQL Server. | |
** Copyright Microsoft, Inc. 1994 - 2000 | |
** All Rights Reserved. | |
** | |
** Owners: | |
** | |
** <owner current="true" primary="true">iliak</owner> | |
*/ |
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 | |
setlocal EnableDelayedExpansion | |
set/p key=確定要執行此更名工具?(y/n): | |
if /i "%key%"=="n" goto END | |
set i=0 | |
rem 依序重新命名 | |
for %%a in (投影片?.jpg) do ( | |
set /a i+=1 |
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
# ----------------------------------------------------------------- | |
# Specifies intentionally untracked files to ignore when using Git | |
# http://git-scm.com/docs/gitignore | |
# | |
# This file is tailored for a general web project | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/poychang/128d62787f1bf5a60fcdafcb5d223b70/raw/.gitignore | |
# to download this file | |
# |
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
#!/usr/bin/env node | |
/*jshint latedef:nofunc, node:true*/ | |
// Modules | |
var fs = require('fs'); | |
var path = require('path'); | |
var cwd = process.cwd(); | |
var dependencyPath = path.join(cwd, 'node_modules', 'cordova-uglify', 'node_modules'); | |
// cordova-uglify module dependencies |
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
GitHub 多人协作开发 三种方式: | |
一、Fork 方式 网上介绍比较多的方式(比较大型的开源项目,比如cocos2d-x) | |
开发者 fork 自己生成一个独立的分支,跟主分支完全独立,pull代码后,项目维护者可根据代码质量决定是否merge代码 | |
此方式网上方法比较多,这里不详细描述 | |
有两种常用的方法在GitHub上建立团队合作: | |
二、组织 – 组织的所有者可以针对不同的代码仓库建立不同访问权限的团队。 | |
Accounts Settings => Organizations =>Create new Organizations 新建一个组织 然后添加项目成员,根据提示设置完毕即可。 | |
新建一个Repository 新建完毕后 进入Repository的Settings =>Collaborators 在Teams下面点击刚创建的组织 比如eveloper-51/owners |
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 lang="en"> | |
<head> | |
<title>Chrome Console Tricks!</title> | |
</head> | |
<body> | |
<p onclick="makeGreen()">BREAK DOWN</p> | |
<script> |
OlderNewer