반응형

전체 글 1480

How can I determine the URL that a local Git repository was originally cloned from?

I pulled a project from GitHub a few days ago. I've since discovered that there are several forks on GitHub, and I neglected to note which one I took originally. How can I determine which of those forks I pulled? If you want only the remote URL, or if your are not connected to a network that can reach the remote repo: git config --get remote.origin.url If you require full output and you are on a..

Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.? function myJsFunc() { alert("myJsFunc"); } Run JavaScript Code or function myJsFunc() { alert("myJsFunc"); } Run JavaScript Code I use javascript:void(0). Three reasons. Encouraging the use of # amongst a te..

How to pass "Null" (a real surname!) to a SOAP web service in ActionScript 3

We have an employee whose surname is Null. Our employee lookup application is killed when that last name is used as the search term (which happens to be quite often now). The error received (thanks Fiddler!) is: soapenv:Server.userException coldfusion.xml.rpc.CFCInvocationException: [coldfusion.runtime.MissingArgumentException : The SEARCHSTRING parameter to the getFacultyNames function is requi..

Reset local repository branch to be just like remote repository HEAD

How do I reset my local branch to be just like the branch on the remote repository? I did: git reset --hard HEAD But when I run a git status, On branch master Changes to be committed: (use "git reset HEAD ..." to unstage) modified: java/com/mycompany/TestContacts.java modified: java/com/mycompany/TestParser.java Can you please tell me why I have these 'modified'? I haven't touched these files? I..

Why does Google prepend while(1); to their JSON responses?

Why does Google prepend while(1); to their (private) JSON responses? For example, here's a response while turning a calendar on and off in Google Calendar: while (1); [ ['u', [ ['smsSentFlag', 'false'], ['hideInvitations', 'false'], ['remindOnRespondedEventsOnly', 'true'], ['hideInvitations_remindOnRespondedEventsOnly', 'false_true'], ['Calendar ID stripped for privacy', 'false'], ['smsVerifiedF..

How do I read / convert an InputStream into a String in Java?

If you have a java.io.InputStream object, how should you process that object and produce a String? Suppose I have an InputStream that contains text data, and I want to convert it to a String, so for example I can write that to a log file. What is the easiest way to take the InputStream and convert it to a String? public String convertStreamToString(InputStream is) { // ??? } Summarize other answ..

반응형