Git is an open-source distributed version control system (DVCS). Use this tag for questions related to Git usage and workflows. Do not use this tag for general programming questions that happen to involve a Git repository.
I'm getting following error, whn trying first Github push:
[rejected] master -> master (non-fast forward)
error: failed to push some refs to '[email protected]:me/me.git'
To prevent you from losing h..
I am trying to add a file to my repository on BitBucket and I am having trouble.
I am using GIT and this is what I type in
$ cd lis4368/assignments
$ git remote
$ git remote -v
$ git remote rm orig..
I have 2 git local repositories both pointing to the same remote repository.
In one git repository, if I do git format-patch 1, how can I apply that patch to the other repository?..
I had a repository that had some bad commits on it (D, E and F for this example).
A-B-C-D-E-F master and origin/master
I've modified the local repository specifically with a git reset --hard. I..
How do I install Git in my PATH when using the GitHub client for Windows?
I'm running into errors because apparently Git is not installed in PATH. For example, using Atom, trying to install the Linte..
How can I view any local commits I've made, that haven't yet been pushed to the remote repository? Occasionally, git status will print out that my branch is X commits ahead of origin/master, but not a..
The scenario:
I make some changes in a single file locally and run git add, git commit and git push
The file is pushed to the remote origin master repository
I have another local repository that is ..
I've been using Git on Windows (msysgit) to track changes for some design work I've been doing.
Today I've been working on a different PC (with remote repo brian) and I'm now trying to merge the edit..
I'd like to push and pull all the branches by default, including the newly created ones.
Is there a setting that I can define for it?
Otherwise, when I add a new branch, locally and I want to pull i..
I have had a hard disk failure which resulted in some files of a Git repository getting damaged. When running git fsck --full I get the following output:
error: .git/objects/pack/pack-6863e0a0e4b4ded..
I'm starting out using Git + GitHub.
In our distributed team, each member is creating their own branch for each issue/requirement they are allocated.
git branch Issue#1 <-- create this branch
..
When I try to merge my branch with a remote branch:
git merge feature/remote_branch
I got this message:
E325: ATTENTION
Found a swap file by the name ".git/.MERGE_MSG.swp"
owned by: xxxx..
How to trigger a build remotely from Jenkins?
How to configure Git post commit hook?
My requirement is whenever changes are made in the Git repository for a particular project it will automatically s..
Is it possible to "refresh" a git repository after updating the gitignore file?
I just added more ignorations(?) to my gitignore and would like to remove stuff already in the repo matching the new fi..
My project struture
ProjectA
-FrameworkA (submodule)
--Twig (submodule of FrameworkA)
How I can update submodules recursively? I already tried some git commands (on ProjectA root)
git submodule fo..
Quite often, Git and Rails looks like magic... such as in the first chapter of Rails 3 Tutorial book, it talks about Git:
git remote add origin [email protected]:peter/first_app.git
git push origin mast..
What are people's experiences with any of the Git modules for Python? (I know of GitPython, PyGit, and Dulwich - feel free to mention others if you know of them.)
I am writing a program which will h..
I'm having trouble cloning a repo on git. I've been trying for to days and have tried quite a few solutions (in most the problem was slightly different but seemed to apply) but nothing has done anythi..
I'm working with a repository with a very large number of files that takes hours to checkout. I'm looking into the possibility of whether Git would work well with this kind of repository now that it s..
I create a new branch in Git:
git branch my_branch
Push it:
git push origin my_branch
Now say someone made some changes on the server and I want to pull from origin/my_branch. I do:
git pull
..
I followed basic Git tutorial and added README file, which worked. Then I copied my project files to the same folder and tried to add them to repository by running
git add --all
git ci 'test' (my ali..
I have an old branch, which I would like to delete. However, before doing so, I want to check that all commits made to this branch were at some point merged into some other branch. Thus, I'd like to s..
I'm trying to change my command promt in terminal. I keep getting the error:
-bash: __git_ps1: command not found
I've tried it just by typing it into the terminal as is: __git_ps1. I've also tried i..
I'm not sure why I'm unable to checkout a branch that I had worked on earlier. See the commands below (note: co is an alias for checkout):
ramon@ramon-desktop:~/source/unstilted$ git branch -a
* deve..
I'm new to git and I'm trying to understand the difference between a squash and a rebase. As I understand it you perform a squash when doing a rebase...
If someone deleted a remote branch because the work is over and I don't know, I won't do a git fetch --prune and eventually I will push back the deleted branch.
Is there a viable solution for forcing..
I want to change the Git default remote branch destination so I could just
git push
Instead of:
git push upstream
Currently this is set to the origin remote and I want to set it to a different r..
Possible Duplicate:
Rolling back local and remote git repository by 1 commit
How can I remove the last commit from a remote GIT repository such as I don't see it any more in the log?
If fo..
I have a jenkins job that clones the repository from github, then runs the powershell script that increments the version number in the file. I'm now trying to publish that update file back to the orig..
I created a local branch for testing Solaris and Sun Studio. I then pushed the branch upstream. After committing a change and attempting to push the changes:
$ git commit blake2.cpp -m "Add workaroun..
Is it possible to remove all files in a repository and update it with only the files I have in my local machine? The reason is that, there are certain files that is not necessary in my github and so I..
I just upgraded to Git 1.8.0.1 for Windows, from my previous version 1.7.9.mysysgit.0. I downloaded the new version from the Git site and installed through the normal Git installer EXE.
That said, wh..
I was trying to edit an old commit message as explained here.
The thing is that now, when I try to run rebase -i HEAD~5 it says interactive rebase already started.
So then I try: git rebase --conti..
When I specify an ancestor commit object in Git, I'm confused between HEAD^ and HEAD~.
Both have a "numbered" version like HEAD^3 and HEAD~2.
They seem very similar or the same to me, but are there ..
When I run:
git status
I see this:
rebase in progress; onto 9c168a5
You are currently rebasing branch 'master' on '9c168a5'.
(all conflicts fixed: run "git rebase --continue")
nothing to commit,..
I started using git sometime back and do not fully understand the intricacies. My basic question here is to find out the difference between a git pull and git pull --rebase , since adding the --rebase..
Just installed git on Windows. I set the GIT_DIR variable to be c:\git\ and verified that this environment variable is maintained by cygwin (i.e. echo $GIT_DIR is what it should be). I went to the fo..
How do I copy all files in a directory from another branch? I can list all of the files in that directory by doing
git ls-tree master:dirname
I can then copy all of the files individually by doing..
I'm a little confused with composer.lock used in an application with a repository.
I saw many people saying that we should not .gitignore composer.lock from the repository.
If I update my libraries ..
I've only just started to use GIT and think its wonderful, however I'm a little confused over what the merge command does.
Let us say we have a working project in the branch "A".
I go home and make ..
The process of setting up a GitHub account works just fine but it doesn't work when I try pushing my repository to GitHub. The error message it shows is as follows:
ssh: Could not resolve hostname gi..
Once upon a time, there was a file in my project that I would now like to be able to get.
The problem is: I have no idea of when have I deleted it and on which path it was.
How can I locate the comm..
When I type git diff, I want to view the output with my visual diff tool of choice (SourceGear "diffmerge" on Windows). How do I configure git to do this?..
I followed these instructions to the letter, including the part about password caching. It seems like the instructions are wrong, because every time I git push origin master I get this error:
git: 'c..
I would like to know how to delete a commit.
By delete, I mean it is as if I didn't make that commit, and when I do a push in the future, my changes will not push to the remote branch.
I read git he..
Is there a way to resolve conflict for all files using checkout --ours and --theirs? I know that you can do it for individual files but couldn't find a way to do it for all...
I have created a branch for testing in my local repo (test-branch) which I pushed to Github.
If I go to my Github account and select this test-branch it shows the info:
This branch is 1 commit ahead..
I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.
I have done a git log ..
I have to use a git server without proper certificates, but I don't want to have to do
env GIT_SSL_NO_VERIFY=true git command
every single time I do a git operation. But I would also like to leave ..
In other words, I have a repo up on Github called st3_packages (https://github.com/pitosalas/st3_packages). I want to do a git clone and have it create a directory on my local computer called "Pack..
Today I was looking through the logs for a project and realized that I fat fingered a tag name some time ago. Is there some way to rename the tag? Google hasn't turned up anything useful.
I realize I..
I was working with a friend on a project, and he edited a bunch of files that shouldn't have been edited. Somehow I merged his work into mine, either when I pulled it, or when I tried to just pick the..
I followed the basic getting started instructions for Node.js on Heroku here:
https://devcenter.heroku.com/categories/nodejs
These instruction don't tell you to create a .gitignore node_modules, and t..
I am having some difficulty understanding how to use tags versus branches in git.
I just moved the current version of our code from cvs to git, and now I'm going to be working on a subset of that cod..
I had some uncommitted changes in my development branch and I stashed them using git stash, but there were some changes which were very important among those stashed ones. Is there any way to get back..
I'd read that when renaming files in git, you should commit any changes, perform your rename and then stage your renamed file. Git will recognise the file from the contents, rather than seeing it as a..
I'd like to grab a single branch (not all of them) of a remote repository and create a local tracking branch that can track further updates to that remote branch. The other branches in the remote rep..
I've been using Git now for a couple of months on a project with one other developer. I have several years of experience with SVN, so I guess I bring a lot of baggage to the relationship.
I have hear..
I'm the owner of an organization on github and just created a repo and tried pushing but I'm running into an issue where it's asking me for my username even though I can SSH just fine:
$ ssh -T git@g..
I have data directory in project's root. It has images directory and some files. Here is example:
data
+-- images
¦ +-- image1.jpg
¦ +-- image2.jpg
¦ +-- image3.jpg
+-- results.csv
+-- r.tx..
I have an account on bitbucket.org that I created by signing up with my Google account. Now everytime I log in I just click "Log in with Google" and that's fine.
How can I access my repos from git co..
When I try to push to a shared git remote, I get the following error:
insufficient permission for adding an object to repository database
Then I read about a fix here: Fix This worked for the next p..
I am building an android app with the facebook api and I need to import the facebook android sdk. When I want to import this file from github it throws the .."can not list the available branches..'can..
I am getting this error when I am trying push my files into heroku rep.
Ive set autocrlf = false already in gitconfig but this problem is still there.
i have also tried this solution here
but no gain..
What command can I use to print out the commit id of HEAD?
This is what I'm doing by hand:
$ cat .git/HEAD
ref: refs/heads/v3.3
$ cat .git/refs/heads/v3.3
6050732e725c68b83c35c873ff8808dff1c406e1
..
I've tried both
git update-index --assume-unchanged config/myconfig
and
editing .git/info/exclude and adding config/myconfig
however when I do git pull I always get:
Updating 0156abc..1cfd6a..
I have a local branch of a project ("configUpdate") that I've forked from somebody else's project and I've done a load of changes on it and would like to merge the changes they've made in to my local ..
I'm merging in a remote branch that may have a lot of conflicts. How can I tell if it will have conflicts or not?
I don't see anything like a --dry-run on git-merge. ..
At the moment git is doing my head in, I cannot come up with the best solution for the following.
There are two branches, one called master and one called mobiledevicesupport. I want to keep mobilede..
I have completely fubar'd my local branch, and would like to start over. The version on the server is correct.
I don't want to start over, I would like to use my local history to fix my huge screwup..
With Subversion I could use TortoiseSVN to view the history/log of a file.
How can I do this with Git?
Just looking for history record for a particular file, and then the ability to compare the dif..
I am getting the following when running git status
Your branch is ahead of 'origin/master' by 3 commits.
I have read on some other post the way to fix this is run git pull --rebase but what exactly..
I am using a Mac for the first time and need to run Terminal as an admin. I have installed NodeJs and Git and want to download Phone Gap/Corova but when I try to install Cordova, it comes back with an..
As some reason, I only have one repository to use.
But I have multiple projects including java projects, php scripts and Android apps projects.
Now my problem is, I have to put them to different su..
I have created a git repository to mirror a live site (which is a non-bare git repository):
git clone --mirror ssh://[email protected]/path/to/repo
Now, to keep this mirror clone updated with all ch..
I think it should work to copy the directory to be renamed to a new directory with desired name, and delete the old directory, and git add, git commit and push everything. But is this the best way?..
I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository.
How can I..
See also:
How can I see which Git branches are tracking which remote / upstream branch?
How can I find out which remote branch a local branch is tracking?
Do I need to parse git config outp..
I am using Git. I did a pull from a remote repo and got an error message:
Please enter a commit message to explain why this merge is necessary,
especially if it merges an updated upstream into a..
How do I force an overwrite of local files on a git pull?
The scenario is the following:
A team member is modifying the templates for a website we are working on
They are adding some images to the ..
Let's say I created a new branch my_experiment from master and made several commits to my_experiment. If I do a git log when on my_experiment, I see the commits made to this branch, but also the comm..
I would like to undo my git pull on account of unwanted commits on the remote origin, but I don't know to which revision I have to reset back to.
How can I just go back to the state before I did the ..
Is there a command I can invoke which will count the lines changed by a specific author in a Git repository? I know that there must be ways to count the number of commits as Github does this for their..
Recently in a project with multiple people, a commit was made as seen in the image below. Marked in red you can see a commit with the description/comment of 'Merge?'.
This commit added numerous files..
I need to exclude a folder (name uploads) from tracking. I tried to run
git rm -r --cached wordpress/wp-content/uploads
and after that I added the path to .gitignore
/wordpress/wp-content/uploads
..
I have changed a few files name by de-capitalize the first letter, as in Name.jpg to name.jpg. Git does not recognize this changes and I had to delete the files and upload them again. Is there a way ..
I am trying to move several commits from one project to the second, similar one, using git.
So I created a patch, containing 5 commits:
git format-patch 4af51 --stdout > changes.patch
Then mo..
How do I get Git to use a proxy server?
I need to check out code from a Git server, but it shows "Request timed out" every time. How do I get around this?
Alternatively, how can I set a proxy serve..
Is there a possibility to revert a committed file in Git? I've pushed a commit to GitHub and then I realized that there's a file which I didn't want to be pushed (I haven't finished the changes)...
Is it possible to deploy a website using git push? I have a hunch it has something to do with using git hooks to perform a git reset --hard on the server side, but how would I go about accomplishing t..
I'm afraid I couldn't find anything quite like this particular scenario.
I have a git repository with a lot of history: 500+ branches, 500+ tags, going back to mid-2007. It contains ~19,500 commits. ..
I have made 3 git commits, but have not been pushed.
How can I amend the older one (ddc6859af44) and (47175e84c) which is not the most recent one?
$git log
commit f4074f289b8a49250b15a4f25ca4b4601745..
Say I have a file in my git repository called foo.
Suppose it has been deleted with rm (not git rm). Then git status will show:
Changes not staged for commit:
deleted: foo
How do I stage this i..
I'm trying to apply background-color when a user mouse hover the element whose class name is "reMode_hover".
But I do not want to change color if the element also has "reMode_selected"
Note: I can ..
The following command generates a file which contains both public and private key:
openssl genrsa -des3 -out privkey.pem 2048
Source: here
With OpenSSL, the private key contains the public key inf..
The W3 docs have a nested list example prefixed by DEPRECATED EXAMPLE:, but they never corrected it with a non-deprecated example, nor explained exactly what is wrong with the example.
So which of th..
I am using EGit on Eclipse v4.3 (Kepler). I want to commit and push my changes. I do a pull first and one file is conflicting. After manually resolving the conflict (local and remote are the same..
I would like to parse a string such as p1=6&p2=7&p3=8 into a NameValueCollection.
What is the most elegant way of doing this when you don't have access to the Page.Request object?..
I need to do the following (I'm a beginner in programming so please excuse me for my ignorance): I have to ask the user for three different pieces of information on three different text boxes on a for..
I'm using the following code to make a call in Android but it is giving me security exception please help.
posted_by = "111-333-222-4";
String uri = "tel:" + posted_by.trim() ;
Intent intent = ne..
I have an existing project, which has react@15 and all it's dependencies according to that. But now I have to upgrade to react@16 along with it's dependencies. Now, the problem is - there are a lot of..
I have the following markup:
<li id="CN2787">
<img class="fav_star" src="images/fav.png">
<span>Text, text and more text</span>
</li>
I want it so that if the text..
I'd like to replace each value in a hash with value.some_method.
For example, for given a simple hash:
{"a" => "b", "c" => "d"}`
every value should be .upcased, so it looks like:
{"a" =>..
How can I group the radio buttons in Windows Form application (a lot like ASP.NET's radiobuttonlist!)?
So I can switch between each case chosen from the options...
I'm having a hard time understand how to simulate a mouse click using JQuery. Can someone please inform me as to what i'm doing wrong.
HTML:
<a id="bar" href="http://stackoverflow.com" target="_b..
I use Jupyter notebook in a browser for Python programming, I have installed Anaconda (Python 3.5). But I'm quite sure that Jupyter in running my python commands with the native python interpreter and..
I have not enabled Hyper V or hardware acceleration and don't want to either.
Is there any way that I can start android emulator for Intel x86 Atom Without hardware acceleration on Windows 8
I have..
I'm having trouble finding my log files.
I'm using Java Logging - java.util.logging - in Eclipse 3.7.1 on Windows XP. The relevant lines of my logging.properties file are:
handlers= java.util.loggi..
I just tried to send a Maven-based project to another computer and HORROR,
red markers everywhere!!
However, mvn clean install is building just fine.
Quickly, I noticed that Lombok is not generating..
The app Snapchat, on the App Store, is an app that lets you share pictures with a self-destruct on them. You can only view the pics for X seconds. If you attempt to take a screenshot while the picture..
Somehow, in the Node class below, the wordList and adjacencyList variable is shared between all instances of Node.
>>> class Node:
... def __init__(self, wordList = [], adjacencyList = [..
I want to rewrite the "cp" command of Linux. So this program will work like #./a.out originalfile copiedfile. I can open the file, create new file but can't write the new file. Nothing is written. Wha..
i am trying to find total pages in building a pager on a website (so i want the result to be an integer. i get a list of records and i want to split into 10 per page (the page count)
when i do this:..
Say I have:
type User = {
...
}
I want to create a new user but set it to be an empty object:
const user: User = {}; // This fails saying property XX is missing
const user: User = {} as any; // Th..
I would like to convert this one line of code to C# code within a void: param1:Function=null I am aware that in the void, it would be like "thing here" param1, but I dont know what "thing here" wou..
I have something like /Date(1370001284000+0200)/ as timestamp. I guess it is a unix date, isn't it? How can I convert this to a date like this: 31.05.2013 13:54:44
I tried THIS converter for 13700012..
I referred lot many links but still I am not able to get any point from that I can start my development. I want to measure my image height, width and distance using camera. I found this app . I want t..
I have implemented some JavaScript on my site but I keep getting the following error messages:
Uncaught ReferenceError: jQuery is not defined
and
Uncaught SyntaxError: Unexpected token &l..
When I press the 'refresh' button on my browser, it seems that $_POST variable is preserved across the refresh.
If I want to delete the contents of $_POST what should I do? Using unset for the fields..
I am new to OOP. My idea was to implement the following class:
class name(object, name):
def __init__(self, name):
print name
Then the idea was to create two instances of that class:
p..
How do I change the content of the cell containing the 'c' letter in the HTML sample using jQuery?
<table id="table_header">
<tr>
<td>a</td>
<td>b</td>
&l..
I have following iframe in my site:
<iframe src="<<URL>>" height="800" width="800" sandbox="allow-same-origin allow-scripts allow-forms" scrolling="no" style="overflow: hidden"><..
I have been trying to understand @POST in RESTful web service using Jersey. I have gone through http://www.vogella.com/articles/REST/article.html for the same and was able to get some information abou..
I have a string representing a unix timestamp (i.e. "1284101485") in Python, and I'd like to convert it to a readable date. When I use time.strftime, I get a TypeError:
>>>import ti..
XMLHttpRequest cannot load http://localhost:8080/api/test. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.
I read about cross domain ajax requests, and understand the un..
I am currently developing a wp8.1 application C#, i have managed to perform a POST method in json to my api by creating a json object (bm) from textbox.texts.
here is my code below. How do i take the ..
Can anyone provide the script for rebuilding and re-indexing the fragmented index when 'avg_fragmentation_in_percent' exceeds certain limits (better if cursor is not used)?..
I am trying to uninstall mysql from my ubuntu 12.04 completely. But not able to.
I tried a lot of commands. But nothing is working. Can anyone help out here!
sudo apt-get remove mysql-server mysql-c..
I am running a program and want to see what its return code is (since it returns different codes based on different errors).
I know in Bash I can do this by running
echo $?
What do I do when us..
Below is the VBA code. Sheet2 contains all of the values in general format. After running the code, values in column 'C' of Sheet3 contain exponential values for numbers which are 13 or more digits...
I’m getting an ".addEventListener is not a function" error. I am stuck on this:
var comment = document.getElementsByClassName("button");
function showComment() {
var place = document.getElementBy..
i'm running mongo 1.8.2 and trying to see how to cleanly shut it down on Mac.
on our ubuntu servers i can shutdown mongo cleanly from the mongo shell with:
> use admin
> db.shutdownServer()
..
I have the following column (column A) named project (rows column is just displaying the row number):
rows project
1 14
2 15
3 16
4 17
5 18
6 19
7 ProjTem..
How do I repeat the last command? The usual keys: Up, Ctrl+Up, Alt-p don't work. They produce nonsensical characters.
(ve)[kakarukeys@localhost ve]$ python
Python 2.6.6 (r266:84292, Nov 15 2010, 21:4..
I have a process that is already running for a long time and don't want to end it.
How do I put it under nohup (that is, how do I cause it to continue running even if I close the terminal?)..
Is there a way to make CardView only have corner radius at the top?
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schem..
I'm creating HTML with a loop that has a column for Action. That column
is a Hyperlink that when the user clicks calls a JavaScript
function and passes the parameters...
example:
<a href="#" OnCl..
I am getting the following error on execution of a multi-threading program
java.lang.OutOfMemoryError: Java heap space
The above error occured in one of the threads.
Upto my knowledge, Heap space..
I am trying to access connectionStrings from the config file. The code is ASP.NET + C#. I have added System.Configuration to reference and also mentioned with using. But still it wouldn't accept the a..
I am using this Where Condition in One Of my query with MySql Database.My Problem is that i have one displaytime column in my table but that table column shows the data in UTC Time.and i want to con..
referencing the play-services via gradle stopped working for me - boiled it down - even the sample I used as a reference in the first place stopped working:
https://plus.google.com/+AndroidDevelopers..
We're currently working on a new project with regular updates that's being used daily by one of our clients. This project is being developed using angular 2 and we're facing cache issues, that is our ..
I am pretty new to Tomcat and Docker - so I am probably missing a Tomcat fundamental somewhere in this question.
What I am trying to do is build a Docker container that runs a SpringBoot Restful web ..
In C#, I am trying to print an image using PrintDocument class with the below code. The image is of size 1200 px width and 1800 px height. I am trying to print this image in a 4*6 paper using a small ..
How can I get the max (or min) value in a vector in C++?
I have seen a few solutions for this on Google but none of them made sense to me :(
Can someone explain in an easy straightforward noob way ..
The following code outputs the content of the index.html (it just contains the text hello world) to the browser. However, when I replace readFile() with readFileSync(), the request times out.
What am ..
In .NET I can provide both \r or \n string literals, but there is a way to insert
something like "new line" special character like Environment.NewLine static property?..
I'm using docker registry v1 and I'm interested in migrating to the newer version, v2. But I need some way to get a list of images present on registry; for example with registry v1 I can execute a GET..
I have a difficult time using pip to install almost anything. I'm new to coding, so I thought maybe this is something I've been doing wrong and have opted out to easy_install to get most of what I nee..
I am doing some scripts in python. I create a string that I save in a file. This string got lot of data, coming from the arborescence and filenames of a directory.
According to convmv, all my arboresc..
I want to show a video on my website. I have created a .mp4 file and using the HTML5 video tag to add it to the html.
The problem is that it is not being displayed in chrome. I would also like to kn..
I am trying to implement a "Digit Recognition OCR" in OpenCV-Python (cv2). It is just for learning purposes. I would like to learn both KNearest and SVM features in OpenCV.
I have 100 samples (i.e. ..
I am new to python and couldn't find the answer to this. Referring to the code at the end of the message, can I know what does the part "for item, total in totals.items()" in the line below mean?
ran..
I'm trying to change the editor color schemes in IntelliJ Idea 13.1.3 community edition to a darker theme. I downloaded a theme from a website [Editor's note: the website has since been replaced with ..
I've seen other posts asking the same question with answers that all refer to a giant button that says "Unpublish" on it, which is no longer there (at least as of 2016).
How do you really un..
I'm using JUnit-dep 4.10 and Hamcrest 1.3.RC2.
I've created a custom matcher that looks like the following:
public static class MyMatcher extends TypeSafeMatcher<String> {
@Override
pr..
Hi there I'm trying to position text to the bottom of the <div>. Neither vertical-align:text-bottom; or vertical-align:bottom;
The trouble is below it is my navigation buttons and if I push it ..
How do I SVN Update my project using the command line?
Then I will manage to call these command lines from C#.
I'm a .NET developer, and I'm using TortoiseSVN...
I need to pass a file path name to a module. How do I build the file path from a directory name, base filename, and a file format string?
The directory may or may not exist at the time of call.
For..
I have a table 'users' with 'login' column defined as:
[login] VARCHAR(50) UNIQUE NOT NULL
Now I want to remove this unique constraint/index using SQL script. I found its name UQ_users_7D78A4E7 in ..
I have a table in the MySQL database that is set up with DATETIME. I need to SELECT in this table only by DATE and excluding the time.
How do I SELECT in this table by only date and bypassing the time..
So I am working on something that wasn't well thought out in the build from the backend team. That leaves me with a document full of divs.
What I am doing is rolling back from the element I need to ..
I'm creating graphs in pgf/tikz. When I use these in my document they are scaled, several are in minipage/subfig like environments. When this happens the font sizes are scaled with the graphics making..
ISO 8601 and RFC 3339 seem to be two formats that are common the web. Should I use one over the other? Is one just an extension? Do I really need to care that bad?..
According to this article Google Chrome 15 has a fullscreen JavaScript API.
I have tried to make it work but failed. I have also searched for official documentation in vain.
What does the fullscreen..
I have setup the angular code on my local machine. I need to know the version of the angular that I am using in the project. how can I easily find it in cmd prompt?..
In python code, how to efficiently save a certain page in a pdf as a jpeg file? (Use case: I've a python flask web server where pdf-s will be uploaded and jpeg-s corresponding to each page is stores.)..
I have jenkins.war and I started it from command prompt in Windows as:
java -jar jenkins.war
It was started well and easily browsed as http://localhost:8080
I want to start on 9090 port. How can I..
My XML looks like this and the filename is web.config
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="configFile" value="IIS.config"/>
<add key="..
I would like to create a simple HTTP server in Android for serving some content to a client.
Any advice on how to build the server or use any existing library? ..
I have tried everything. I cannot get this centered on the screen. I am using ie 9 but it does the same in chrome. It just sits on the left of the webpage. Thank you for any help.
<style type=..
I believe my dataframe is okay and my code is okay. In fact, I have eliminated parts of the dataframe and most of the graphing code to make things as basic as possible. But still, I get:
Error in ...
I've had a look through existing questions, but I haven't really come across anything which works for me.
I'm currently running a site with a Secure SSL certificate. It can be accessed at https://www..
I need to write a macro that searches a specified column and counts all the cells that contain a specified string, such as "19/12/11" or "Green" then associate this number with a variable,
Does anyon..
I'm trying to create Google App Engine environment in my Mac OS X Mountain Lion. Downloaded the Googleapplauncher.dmg file. While I tried to unzip the file it shows "the following disk images couldn't..
I'm trying to get MySQL installed to the latest version due to some installation going wrong somewhere along the line. I run the command gem install mysql and I receive the following:
Building na..
Chrome browser by default is blocking mixed content. How do I adjust my settings/configuration to allow mixed content without making any adjustments on the UI every time?
I have found two solutions b..
We want to cache bust on production deploys, but not waste a bunch of time off the bat figuring out a system for doing so. My thought was to apply a param to the end of css and js files with the curr..
Can you break out of an if statement or is it going to cause crashes? I'm starting to acquaint myself with C, but this seems controversial. The first image is from a book on C
("Head First C") and the..
I would like to know how to check if an array is empty or null in jQuery. I tried array.length === 0 but it didn't work. It did not throw any error either.
This is the code:
var album_text = new Arr..
I'm using object-fit: cover; in my CSS for images on a specific page, because they need to stick on the same height. It works great in most browsers.
But when scaling my browser in IE or Edge, the i..
I've followed the GitHub instructions for setting up my account, and I'm able to clone, but I'm unable to push remotely.
When I do a "git push" I get the 403 error. It has the correct URL. I tried a ..
I have 2 fields: 1 input, 1 select box.
Is it possible to make the browser disable one of the fields when the user uses the other?
For example, if the user is entering data into the input, the selec..
I have a table in a SQL Server 2008 database. This table has a nvarchar(256) column called 'Name'. Unfortunately, the values in this field have extra spaces included. For instance the name 'Bill' is a..
I have URL like this:
http://localhost/PMApp/temp.htm?ProjectID=462
What I need to do is to get the details after the ? sign (query string) - that is ProjectID=462. How can I get that using JavaScr..
I am using $_SERVER['HTTP_REFERER']; to get the referer Url. It works as expected until the user clicks another page and the referer changes to the last page.
How do I store the original referring Ur..
I have a array of int which I have to sort by descending.
Since I did not find any method to sort the array in descending order.Currently I am sorting the array in descending order as below
int[] a..
I want to execute another program within C code.
For example, I want to execute a command
./foo 1 2 3
foo is the program which exists in the same folder, and 1 2 3 are arguments.
foo program create..
I'm trying to parse a webpage using Java with URLConnection. I try to set up the user-agent like this:
java.net.URLConnection c = url.openConnection();
c.setRequestProperty("User-Agent", "Mozilla/5.0..
I have a C++ program:
test.cpp
#include<iostream>
int main()
{
char t = 'f';
char *t1;
char **t2;
cout<<t; //this causes an error, cout was not declared in this scope..
I want to run code after my spring-boot app starts to monitor a directory for changes.
I have tried running a new thread but the @Autowired services have not been set at that point.
I have been ab..
My Case: localStorage with key + value that should be deleted when browser is closed and not single tab.
Please see my code if its proper and what can be improved:
//create localStorage key + value ..
I'm trying to read an entire line from the console (including whitespace), then process it. Using bufio.ReadString, the newline character is read together with the input, so I came up with the followi..
I want to do a case sensitive search in my SQL query. But by default, SQL Server does not consider the case of the strings.
Any idea on how to do a case sensitive search in SQL query?..
I'm trying to use nopCommerce(Which is written in .NET Core) but when I want to run the project I face 52 Errors telling me Run a nuget package restore
Assets file ~\obj\project.assets.json' not ..
How do you split a window/view in Eclipse IDE? I want to edit code while viewing the different code in the same file.
If there is a trick to open the same file twice, this might do, but I would rathe..
In Android can we store an object of a class in shared preference and retrieve the object later?
If it is possible how to do it? If it is not possible what are the other possibilities of doing it?
..
I am trying to add a condition for a hyperlink that I have in my page.
Instead of just using a particular link like: <a href="help/Tutorial.html">Tutorial</a> I want to display different..
I want if the input 'Contract type' is empty, the button 'Save' is not clickable
Save button:
<div class="col-md-4">
<cic-textbox [control]="formGroup.get('contractType')"></..
I created a video recording application with library dialog. The library dialog displays the list of recorded videos where each item consists of icon, video title, tags and location information the fo..
stupid issue with Github going on right now. I have a decent amount of changes (~120MB in size), when I attempt to push, this is what happens:
error: RPC failed; result=22, HTTP code = 413
fatal: The..
How can I make Java print "Hello"?
When I type System.out.print("Hello"); the output will be Hello. What I am looking for is "Hello" with the quotes("")...
I want to clear all input and textarea fields in a form. It works like the following when using an input button with the reset class:
$(".reset").bind("click", function() {
$("input[type=text], tex..
I'm playing around with Qt, and I want to create a simple pause between two commands. However it won't seem to let me use Sleep(int mili);, and I can't find any obvious wait functions.
I am basically..
How do I print the environment variable just being set?
NAME=sam echo "$NAME" # empty
You can see here using eval it works. Is this the way?
NAME=sam eval 'echo $NAME' # => sam
..
I am writing a program in Java that takes a custom XML file and parses it. I'm using the XML file for storage. I am getting the following error in Eclipse.
[Fatal Error] :1:1: Content is not allowed ..
I need to output 4 different floats to two decimal places.
This is what I have:
print '%.2f' % var1,'kg =','%.2f' % var2,'lb =','%.2f' % var3,'gal =','%.2f' % var4,'l'
Which is very unclean, and l..
When I try to use a print statement in Python, it gives me this error:
>>> print "Hello, World!"
File "<stdin>", line 1
print "Hello, World!"
^
SyntaxErro..
Hey so I'm making a factoring program and I'm wondering if anyone can give me any ideas on an efficient way to find what two numbers multiple to a specified number, and also add to a specified number...
I need to resort, in memory, a DataTable based on a column and direction that are coming from a GridView. The function needs to look like this:
public static DataTable resort(DataTable dt, string col..
I have two divs side by side. I'd like the height of them to be the same, and stay the same if one of them resizes. I can't figure this one out though. Ideas?
To clarify my confusing question, I'd li..
I'm in the process of moving my files onto another computer, and one thing I would like to do is to transfer the data in my MySQL database. I want to dump the databases into .sql files, but also have ..
I'm relatively new to Python and it's libraries and I was wondering how I might create a string array with a preset size. It's easy in java but I was wondering how I might do this in python.
So far ..
This program only returns the client machine name in localhost only
echo gethostbyaddr($_SERVER['REMOTE_ADDR']);
If it is run from an online server, then computer name is not shown and some other in..
Following is my code and I want to understand that why #firstDiv is being pushed downward by all browsers. I really want to understand the inner workings of the fact that why its being pushed downward..
I have a sub that calls on ActiveWorkbook.RefreshAll to bring new data in from an XML source, and then performs multiple modifications to it. The problem is that not enough time is given for the Refre..
I want to change .class file's method. I installed JD Eclipse Decompiler and opened the .class file. I added some codes and save .class file. But, .class file is not changing.
I don't know how to us..
Typically, I've seen people use the class literal like this:
Class<Foo> cls = Foo.class;
But what if the type is generic, e.g. List? This works fine, but has a warning since List should be pa..
I know of osTicket, are there any other more compelling help ticket systems?
My company wants to use one and I am researching them now.
I forgot to mention, I will need to install it on our servers....
How can I check which version of NumPy I'm using?
(FYI this question has been edited because both the question and answer are not platform specific.)..
How do I allow any device, e.g., iPhone, to connect over a WLAN to my Mac's localhost server?
On my Mac, I'm running a "Hello World" HTTP Node.js server that serves a page, which Safari opens success..
As per the title of this question, what are the practical differences between AWS EFS, EBS and S3?
My understanding of each:
S3 is a storage facility accessible any where
EBS is a device you can mo..
What I'm trying to do seems very simple, but after a few days of searching I can't quite figure it out.
I have an application that allows the user to select multiple(up to 5) images. I'm using an Im..
What's the exact difference between Unicode and ASCII?
ASCII has a total of 128 characters (256 in the extended set).
Is there any size specification for Unicode characters?..
In our product we ship some linux binaries that dynamically link to system libraries like "libpam". On some customer systems we get the following error on stderr when the program runs:
./authpam: /l..
I have a Python function which takes several arguments. Some of these arguments could be omitted in some scenarios.
def some_function (self, a, b, c, d = None, e = None, f = None, g = None, h = None)..
I need to perform some operations on scope and the template. It seems that I can do that in either the link function or the controller function (since both have access to the scope).
When is it the c..
I want to send an "ajax download request" when I click on a button, so I tried in this way:
javascript:
var xhr = new XMLHttpRequest();
xhr.open("GET", "download.php");
xhr.send();
download.php:
..
Reasons for java.sql.SQLException: Closed Connection from Oracle??
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
..
I want a batch program, which will check if the process notepad.exe exists.
if notepad.exe exists, it will end the process,
else the batch program will close itself.
Here is what I've done:
@echo..
I forked someone's repository on GitHub and would like to update my version with commits and updates made in the original repository. These were made after I forked my copy.
How can I pull in the cha..
What is the bare minimum and Angular4's native way to slide in and slide out a container element?
e.g.
<div ngIf="show">
<!-- Content -->
</div>
Slide In Content (from top to..
I have a <div> element which contains text and I want to align the contents of this <div> vertically center.
Here is my <div> style:
_x000D_
_x000D_
#box {
height: 170px;
width: ..
Hi
I've got the following query but it doesn't seem to work.
$q = $this->em->createQueryBuilder()
->update('models\User', 'u')
->set('u.username', $username)
->set('u.email..
I'm trying to get a the key-value back after an INSERT-statement.
Example:
I've got a table with the attributes name and id. id is a generated value.
INSERT INTO table (name) VALUES('bob');
N..
I’m trying to modify a table to make its primary key column AUTO_INCREMENT after the fact. I have tried the following SQL, but got a syntax error notification.
ALTER TABLE document
ALTER COLUMN do..
suppose I've a 3 options in a drop down box say red , blue, others.
If a user select option as an others then below a text box should be visible to wrtie his own favourite color.
I can populat..
So I do not know much about MongoDB. I have RoboMongo using which I connect to a MongoDB. What I need to do is this - there is a collection in that MongoDB. I want to export the data from that collect..
I'm using jQuery to make an AJAX request. I want to perform different actions whether or not the HTTP status code is a 400 error or a 500 error. How can I achieve this?
$.ajax({
type: 'POST', ..
I'm trying to write a code that lets me find the first few multiples of a number. This is one of my attempts:
def printMultiples(n, m):
for m in (n,m):
print(n, end = ' ')
I figured out that, b..
"The output should look like this (it is a good idea to echo back the input): You entered 500,000 seconds, which is 5 days, 18 hours, 53 minutes and 20 seconds. (5 days 18:53:20 hours)
So can you guy..
I understand this is an easy question but for some reason this just isn't working for me. I have a function that is triggered everytime a drop down menu is changed. Here is the relevant code that is..
I’m trying to make a html5 form that contains one email input, one check box input, and one submit input.
I'm trying to use the pattern attribute for the email input but I don't know what to place i..
I have a directory with about 2000 files. How can I select a random sample of N files through using either a bash script or a list of piped commands?..
I am building an application and would like to automatically post to craigslist with a click of a button. Is there any way to do this?
I have an account and will pay for each post...
I use Anaconda 1.7, 32 bit. I downloaded the correct version of the netCDF4 installer from here.
I attempted to copy the HKEY_LOCAL_MACHINE\SOFTWARE\Python folder into HKEY_LOCAL_MACHINE\SOFTWARE\Wow..
I upgraded my Windows 10 to the last update yesterday and now, when I launch vagrant up command, I get this error :
==> default: Booting VM...
==> default: Waiting for machine to boot. This ma..
Is there any shortcut in Visual studio 2010 to find classes/interfaces?
I was using Resharper few years back to do that. Here now, I don't have the Resharper and looking something similar in Visual s..
Based on this code below I use for regular mysql, how could I convert it to use mysqli?
Is it as simple as changing mysql_query($sql); to mysqli_query($sql);?
<?PHP
//in my header file that is i..
I'm Windows 7 64-bit user and I got Android Studio problem after I update the latest version of Android Studio and SDK components..
The following SDK components were not installed: sys-img-x86-addon-..
With the two classes below, I've tried connect to a MySQL database. However, I always get this error:
Wed Dec 09 22:46:52 CET 2015 WARN: Establishing SSL connection without server's identity verific..
This might be a really trivial question, but I've been writing Java programs at my school and I just found out that I can create websites with Java as well.
How can I do that? Any good books/tutori..
A new feature in C# / .NET 4.0 is that you can change your enumerable in a foreach without getting the exception. See Paul Jackson's blog entry An Interesting Side-Effect of Concurrency: Removing Item..
The <blink> tag was never an official standard, and is now completely abandoned by all browsers.
Is there a standards compliant way of making text blink?..
I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I..
The command $ make all gives errors such as rm: cannot remove '.lambda': No such file or directory so it stops. I want it to ignore the rm-not-found-errors. How can I force-make?
Makefile
all:
..
I'm using gplot to produce a heatmap showing log2-fold changes of a treatment groups versus paired controls. With the following code:
heatmap.2(as.matrix(SeqCountTable), col=redgreen(75),
..
I am developing on Eclipse on Windows and Code gets deployed on Unix. I am fetching the system property values using System.getProperty("key") ... How do I pass this in Eclipse so that I do not have t..
Let's say my web service is located at http://localhost:8080/foo/mywebservice and my WSDL is at http://localhost:8080/foo/mywebservice?wsdl.
Is http://localhost:8080/foo/mywebservice an endpoint, i.e..
I'm still wrapping my head around this library, but I'm out of time so I'll just skip to the spoiler section and ask. With a given, arbitrary millisecond time value (like the kind you'd gave from .ge..
I have the following PS script written:
Get-ADUser -Filter * -SearchBase 'OU=Users & Computers, DC=aaaaaaa, DC=com' -Properties DisplayName | Export-CSV "ADUsers.csv"
From what I can tell it s..
How can I validate an input of type="number" to only be valid if the value is numeric or null using only Reactive Forms (no directives)?
Only numbers [0-9] and . are allowed, no "e" or any other chara..
I have a large data table.
There are 10 million records in this table.
What is the best way for this query
Delete LargeTable where readTime < dateadd(MONTH,-7,GETDATE())
..
I have a series of textboxes on a form. When the user inserts numbers into these textboxes, calculations are made and <asp:Label> controls are updated via JavaScript to reflect these calculatio..
I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question, and so in the same spirit, I am asking this qu..