1. 创建Repository
git init
2. Commit文件
git add .
git commit –m “init Import”
3. 查看状态
git status
4.增加本地Repo到服务器
git remote add origin https://github.com/.....git
5Commit 到服务器
git push origin master
6. 从gitHub复制Repository
git clone git://…git
7. 从服务器更新:
git pull origin master
当一个Repo在GitHub上创建完毕后会有简要提示:
touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/DavidGuoliang/DoubanAnalytics.git git push -u origin master
git remote add origin https://github.com/DavidGuoliang/DoubanAnalytics.git git push -u origin master
GitHub有提供Windows下的UI图形界面.
Links: http://gitref.org/creating/
Requirement: Get all connections from dtsx packages using C#.
Solution:
Using Microsoft.SqlServer.Dts.Runtime to load the package, and then get all connections.
In case you are totally new to .Net/C#, you may need this screen capture:
In the pop-up window, click “Browse” tab, and select: C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Microsoft.SQLServer.ManagedDTS.dll
About the dll path:
ref 2: http://stackoverflow.com/questions/4920591/havent-got-microsoft-sqlserver-manageddts-dll-but
import: using Microsoft.SqlServer.Dts.Runtime
public void testDts() { string pkgLocation; Package pkg; Application app; DTSExecResult pkgResults; pkgLocation = @"C:\Users\x\Documents\Visual Studio 2008\Projects\Integration Services Project1\Integration Services Project1\" + @"Package.dtsx"; app = new Application(); pkg = app.LoadPackage(pkgLocation, null); Connections conns = pkg.Connections; foreach (ConnectionManager cm in conns) { Console.WriteLine("Name = " + cm.Name + ", HostType = " + cm.HostType + "; ConnectionString=" + cm.ConnectionString); } }
API: http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.package.connections(v=sql.100).aspx
Output:
Name = Flat File Connection Manager, HostType = ConnectionManager; ConnectionString=C:\Users\x\Desktop\ssisTest.txt
Name = x_instan, HostType = ConnectionManager; ConnectionString=Data Source=x-PC\x_INSTAN;Integrated Security=SSPI;Connect Timeout=30;
After I created a new Class using:
grails> create-domain-class User
I want to to generate the controller:
grails>generate-all User
I got these error:
| No domain class found for name User. Please try again and enter a valid domain class name
| Error Error running generate-all (Use –stacktrace to see the full trace)
| Error Error running script generate-all User: org.codehaus.groovy.grails.cli.ScriptExitException (
Use –stacktrace to see the full trace)
grails> –stacktrace
| Error Error running script –stacktrace: Cannot invoke method findAll() on null object (NOTE: Stac
k trace has been filtered. Use –verbose to see entire trace.)
java.lang.NullPointerException: Cannot invoke method findAll() on null object
at RunApp$_run_closure8_closure13.doCall(RunApp:229)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.ja
va:1231)
at RunApp$_run_closure8_closure13.doCall(RunApp)
at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.ja
va:1231)
| Error Error running script –stacktrace: Cannot invoke method findAll() on null object
The solution is use the class full name:
generate-all helloworld.User
helloworld is my application name. and the User class package is “hellowolrd”.
Many thanks for: generate-all No domain class found for.. error in grails
1. Download Grails, unzip.
2. Add the bin path into PATH
3. run: grails –version, if you not set JAVA_HOME yet, there will be some info about this.
now, you are ready to create the application:
1. Run: grails create-app helloworld there’ll be some mesg about the application path.
Note: can not use this command in “Interactive Mode”
2. cd helloworld
3. Create controller: grails> create-controller hello, get some info after success:
| Created file grails-app/controllers/helloworld/HelloController.groovy
| Created file grails-app/views/hello
| Created file test/unit/helloworld/HelloControllerTests.groovy
4. Modify the controller:
package helloworld class HelloController { def index() { render "Hello World!!" } }
5. Ok, everything is ready, now, just run the application: grails> run-app
Negative to the page, the console will be there, click the application link: “Hello world!!”
使用Proper函数只能做到每个单词的首字母大写, 该单词的其余字母会变小写。
但如果有时只需要将首字母大写,剩余字符保持不变, 此种情况下可使用公式操作:
= UPPER(LEFT(A2))&RIGHT(A2,LEN(A2)-1)
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.