我是一个Git新手.我最近将一个Rails项目从Subversion移到了Git.我按照这里的教程:http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/
我也在使用unfuddle.com来存储我的代码.我在火车上下班时使用Mac笔记本电脑进行更改,然后在使用以下命令进行网络连接时将它们推到一起:
git push unfuddle master
Run Code Online (Sandbox Code Playgroud)
我使用Capistrano进行部署,并使用master分支从unfuddle存储库中提取代码.
最近,当我在笔记本电脑上运行"git status"时,我注意到以下消息:
# On branch master
# Your branch is ahead of 'origin/master' by 11 commits.
#
nothing to commit (working directory clean)
Run Code Online (Sandbox Code Playgroud)
我很困惑为什么.我以为我的笔记本电脑是原产地...但不知道我最初是从Subversion拉出来还是推送到Unfuddle,这是导致消息显示的原因.我怎么能够:
我的mac正在运行Git版本1.6.0.1.
当我git remote show origin按照dbr的建议运行时,我得到以下内容:
~/Projects/GeekFor/geekfor 10:47 AM $ git remote show origin
fatal: '/Users/brian/Projects/GeekFor/gf/.git': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
当我git remote -v按照Aristotle Pagaltzis的建议跑步时,我得到以下信息:
~/Projects/GeekFor/geekfor 10:33 AM $ git …Run Code Online (Sandbox Code Playgroud) 我正在尝试获取我的C#2.0应用程序之外的窗口的可执行文件的名称.我的应用程序当前使用来自"user32.dll"的GetForegroundWindow()调用获取窗口句柄(hWnd).
从我能够做的挖掘,我想我想使用GetModuleFileNameEx()函数(来自PSAPI)来获取名称,但GetModuleFileNameEx()需要一个Process的句柄,而不是一个Window.
是否可以从窗口句柄获取进程句柄?(我是否需要先获取窗口的线程句柄?)
编辑了第一句话,使我更清楚我正在尝试做什么.
UPDATE!这是我发现为我工作的C#代码.唯一需要注意的是偶尔它返回一个文件/路径,其中驱动器盘符是"?" 而不是实际的驱动器号(如"C"). - 还没弄明白为什么呢.
[DllImport("user32.dll")]
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
[DllImport("kernel32.dll")]
static extern IntPtr OpenProcess(UInt32 dwDesiredAccess, Int32 bInheritHandle, UInt32 dwProcessId);
[DllImport("psapi.dll")]
static extern uint GetModuleFileNameEx(IntPtr hProcess, IntPtr hModule, [Out] StringBuilder lpBaseName, [In] [MarshalAs(UnmanagedType.U4)] int nSize);
[DllImport("kernel32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool CloseHandle(IntPtr hObject);
private string GetWindowModuleFileName(IntPtr hWnd)
{
uint processId = 0;
const int nChars = 1024;
StringBuilder filename = new StringBuilder(nChars);
GetWindowThreadProcessId(hWnd, out processId);
IntPtr hProcess = OpenProcess(1040, 0, …Run Code Online (Sandbox Code Playgroud) 我的NHibernate配置设置为显示所有交互的sql.因此,我的一些较大的集成测试表现不佳(特别是在生成测试报告时).
有没有办法在运行时关闭ShowSql - 然后以编程方式重新启动它.
在Java中查找文本文件中单词总数的最佳方法是什么?我认为Perl是最好的找到这样的东西.如果这是真的那么从Java中调用Perl函数将是最好的?在这样的条件下你会做什么?有更好的想法吗?
我有一个ASP.NET MVC项目,我有一个接受GET,POST和DELETE请求的动作.每种类型的请求都通过我的控制器Action方法上的属性进行过滤.
[ActionName(Constants.AdministrationGraphDashboardAction),
AcceptVerbs(HttpVerbs.Post)]
public ActionResult GraphAdd([ModelBinder(typeof (GraphDescriptorBinder))] GraphDescriptor details);
[ActionName(Constants.AdministrationGraphDashboardAction),
AcceptVerbs(HttpVerbs.Delete)]
public ActionResult GraphDelete([ModelBinder(typeof (RdfUriBinder))] RdfUri graphUri)
Run Code Online (Sandbox Code Playgroud)
我的GraphAdd方法运作得很好.我想弄清楚的是我如何创建一个HTML <form />或<a />(链接),它将导致浏览器执行HTTP删除请求并触发我的GraphDelete方法.
如果有办法做到这一点,有人可以发布一些示例HTML,如果可用,我应该使用MVC HtmlHelper方法吗?
如何定义IEnumerable<T>返回的扩展方法IEnumerable<T>?目标是使扩展方法适用于所有人IEnumerable,IEnumerable<T>其中T可以是匿名类型.
我看到这个有一天(滚动一路下来,看到一些巧妙的东西):
http://www.mono-project.com/docs/tools+libraries/tools/repl/
并且想知道Python是否存在类似的东西.
那么,是否有一个很好的Python GUI shell可以做像C#shell那样的东西?
编辑:以下是文章截图的链接,显示了我感兴趣的内容.
我感兴趣的事物类型的一个例子:
http://www.mono-project.com/archived/images/7/75/GSharpPlot.png
他们能够添加钩子来生成像元素一样的GUI元素,甚至可以做愚蠢的事情:
http://www.mono-project.com/archived/images/b/bf/GSharpRenderHandler.png
我不认为这是可能的任何我尝试过的控制台shell(常规python shell,ipython).
编辑:我不是在寻找IDE.如果你看一下这个链接,你就会知道我想要什么.
我需要做些什么才能避免Firefox插件中的"手动安装"以及在下载插件时我必须去哪里或我必须做什么来避免(作者未验证)消息.理想情况下,我想自动启动插件的安装,如果我需要以某种方式签署插件,以表明它没有做任何恶意的事情,我也想这样做.
谢谢!
c# ×4
.net ×1
asp.net-mvc ×1
file ×1
firefox ×1
git ×1
git-push ×1
git-remote ×1
html ×1
hwnd ×1
java ×1
nhibernate ×1
perl ×1
plugins ×1
python ×1
shell ×1
signing ×1
winapi ×1
word-count ×1
xpi ×1