I am following the instructions given here to create a Git repository. All went well until the last line:
$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
..
I have been using git for a while now, but I have never had to set up a new remote repo myself and I have been curious on doing so. I have been reading tutorials and I am confused on how to get "git p..
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 think I'm on the right track to understand the basic concepts of git.
I've already set up and cloned a remote repository. I also created a server side empty repository, and linked my local reposito..
I have a repo (origin) on a USB key that I cloned on my hard drive (local). I moved "origin" to a NAS and successfully tested cloning it from here.
I would like to know if I can change the URI of "or..
I have my project on GitHub at some location, [email protected]:myname/oldrep.git.
Now I want to push all my code to a new repository at some other location, [email protected]:newname/newrep.git.
I used t..
I am very new to Git; I only recently created a GitHub account.
I've just tried to push my very first repository (a sample project), but I'm getting the following error:
No such remote 'origin'
I ..
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 for..
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..
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've got a project hosted on GitHub which somebody has forked. On their fork, they've created a new branch "foo" and made some changes. How do I pull their "foo" into a new branch also named "foo" in..
Why am I getting this error when my git repository url is correct?
jitendra@JITENDRA-PC /c/mySite (master)
$ git push beanstalk master
fatal: '[email protected]/gittest.git' does not appear ..
I want to be able to do the following:
Create a local branch based on some other (remote or local) branch (via git branch or git checkout -b)
Push the local branch
to the remote repository (publish)..
From the man page:
Deletes all stale tracking branches under <name>.
These stale branches have already been removed from the remote repository
referenced by <name>, but are still locally..
I'm trying to make a local repo act as a remote with the name bak for another local repo on my PC, using the following:
git remote add /home/sas/dev/apps/smx/repo/bak/ontologybackend/.git bak
which..
I'm a Git newbie. I recently moved a Rails project from Subversion to Git. I followed the tutorial here: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-..
How do I set a Git remote's HEAD reference to point to something besides "master"?
My project has a policy not to use a "master" branch (all branches are to have meaningful names). Furthermore, the c..
I am working with a team and we want to use Git (Not with GitHub, we have a private remote machine). We were using SVN until now.
We have a remote machine that works like an SVN repository.
Now, we wa..
I have tried to follow the solutions suggested in this post but it didnt work and I am still getting: src refspec master does not match any.
Here is what I did:
Followed this solution
// adding th..
I want to delete a branch both locally and remotely.
Failed Attempts to Delete a Remote Branch
$ git branch -d remotes/origin/bugfix
error: branch 'remotes/origin/bugfix' not found.
$ git branch -d o..
I just did git init to initialize my folder as git repo and then added a remote repository using git remote add origin url. Now I want to remove this git remote add origin and add a new repository git..
I uninstalled django on my machine using pip uninstall Django. It says successfully uninstalled whereas when I see django version in python shell, it still gives the older version I installed.
To rem..
I'd like to change the color of a standard Android button slightly in order to better match a client's branding.
The best way I've found to do this so far is to change the Button's drawable to the dr..
I have a postgres database with multiple schemas. When I connect to the database from a shell with psql and I run \dt it uses the default connection schema which is public. Is there a flag I can speci..
When I tried to relate an attribute with another one which has an M to M relation I received this error:
get() returned more than one topic -- it returned 2!
Can you guys tell me what that means..
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 class which is basically a copy of another class.
public class A {
int a;
String b;
}
public class CopyA {
int a;
String b;
}
What I am doing is putting values from class A into C..
I need to return all members of multiple security groups using PowerShell. Handily, all of the groups start with the same letters.
I can return a list of all the relevant security groups using the fo..
Here is the field declaration in a form:
max_number = forms.ChoiceField(widget = forms.Select(),
choices = ([('1','1'), ('2','2'),('3','3'), ]), initial='3', required = True,)
I would like to..
I read this: How do I check if a Sql server string is null or empty but it not helped me in this situation.
The piece of code from my stored procedure:
IF (@item1 IS NOT NULL) OR (LEN(@item1) > 0..
I could be able to let the web application sends automatic emails using Windows Task Scheduler. Now I want to send HTML-Formatted email using the following method that I wrote for sending emails.
My ..
Is it possible to sort the entries of a es6 map object?
var map = new Map();
map.set('2-1', foo);
map.set('0-1', bar);
results in:
map.entries = {
0: {"2-1", foo },
1: {"0-1", bar }
}
Is..
I have a use case where I occasionally want to copy a single file from my host machine to the Vagrant guest.
I don't want to do so via traditional provisioners (Puppet / Chef) because this is often a..
Possible Duplicate:
Manually drawing a gradient in iPhone apps?
My application needs to display text in either a UIView or UILabel but the back ground must be a gradient as opposed to a tru..
I am building a web API. I found whenever I use Chrome to POST, GET to my API, there is always an OPTIONS request sent before the real request, which is quite annoying. Currently I get the server to i..
Is there a straight forward CSS way to make the border of an element semi-transparent with something like this?
border-opacity: 0.7;
If not, does anyone have an idea how I could do so without using..
So I'm trying to learn how to pass arrays through a function, so that I can get around PHP's inability to return multiple values. Haven't been able to get anything to work so far, but here is my best ..
I am getting issue while sending email.
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;..
Here is my component in Angular 4:
@Component( {
selector: 'input-extra-field',
template: `
<div class="form-group" [formGroup]="formGroup" >
<switch [att..
I am trying to start up a BroadcastReceiver within a Service. What I am trying to do is have a background running service going that collects incoming text messages, and logs incoming phone calls. I f..
I have run gitlabhq rails server on virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and starts rails server exec..
So, i've been trying to save a jupyter notebook as PDF but i just can't figure out how to do this. The first thing i try is from the file menu just download as PDF, but doing that results in:
nbconve..
I've got an Nonetype value x, it's generally a number, but could be None. I want to divide it by a number, but Python raises:
TypeError: int() argument must be a string or a number, not 'NoneType'
..
As per Understanding the node.js event loop, node.js supports a single thread model. That means if I make multiple requests to a node.js server, it won't spawn a new thread for each request but will e..
I have searched this question, and found an answer in MySQL but this is one of those incidents where the statement fails to cross over into Oracle.
Can I use wildcards in "IN" MySQL stateme..
Guys I'm currently using the POI 3.9 library to work with excel files. I know of the getLastRowNum() function, which returns a number of rows in an Excel file.
The only problem is getLastRowNum() ret..
I am not perfect in Javascript.. I want to show total sum of values entered in qty input boxes in next input box named total without refreshing page. Can anyone will help me to figure it out..?
Here ..
If I don't make a mistake, Safari currently need MP4 (H.264/AAC) video encoded for the HTML5 <video> element.
So I tried to convert a video to this format with ffmpeg. However when I enter the ..
Is it possible to send a variable number of arguments to a JavaScript function, from an array?
var arr = ['a','b','c']
var func = function()
{
// debug
alert(arguments.length);
//
..
I've got a table with a column, lets call it table_column that is currently null for all rows of the table. I'd like to insert the value "test" into that column for all rows. Can someone give me the..
I have an upload files scenario in my project. When I'm trying to upload the large files it's giving me an OutOfMemory error. That error is related to Java heap size.
How can you increase the heap ..
In SQL we have NOT LIKE %string%
I need to do this in PHP.
if ($string NOT LIKE %word%) { do something }
I think that can be done with strpos()
But can’t figure out how…
I need exactly that ..
How do I check if all checkboxes with class="abc" are selected?
I need to check it every time one of them is checked or unchecked. Do I do it on click or change?..
I found a lot of Regex email validation in SO but I did not find any that will accept an empty string. Is this possible through Regex only? Accepting either empty string or email only? I want to hav..
I want to work with promises but I have a callback API in a format like:
1. DOM load or other one time event:
window.onload; // set to callback
...
window.onload = function() {
};
2. Plain callba..
I have written a javascript function that uses setInterval to manipulate a string every tenth of a second for a certain number of iterations.
function timer() {
var section = document.getElementB..
I have a field that is VARCHAR(6) I am trying to insert it into another table of type bigint it is giving me an error
(Error Converting from data type varchar to bigint
here is what i am doing
CON..
I am getting an array arr passed to my Django template. I want to access individual elements of the array in the array (e.g. arr[0], arr[1]) etc. instead of looping through the whole array.
Is there ..
Hi I am trying to get "a" tag as a submit button. I found a code somewhere in the web. But it didn't work.
<a href="#" onclick="this.form.submit()">Submit</a>
Is there any code for to ..
Program: So I made a program that take two numbers, N and L. N is the size of a 2D array and L is a number from 3 - 16. The program builds the array and starts at the center and works its way out in a..
I have a quick question. I have an integer array in java that needs its length to vary throughout the class. Specifically, I need it to increase by one in certain situations. I tried it like this.
..
I'm trying to open a new command window in a BAT file:
start %windir%\system32\cmd.exe
After it opens, I'd like to execute a BAT command in the new window:
echo "test in new window"
How can I do..
I am trying to send an email via GMail's SMTP server from a PHP page, but I get this error:
authentication failure [SMTP: SMTP server does no support authentication (code: 250, response: mx.google..
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?
SELECT * FROM Tags
WHERE Name IN ('ruby','rails','scruffy','rubyonrails')
ORDER BY Count DES..
I know there is a way for writing a Java if statement in short form.
if (city.getName() != null) {
name = city.getName();
} else {
name="N/A";
}
Does anyone know how to write the short form..
I want to be able to figure out what port a particular program is using. Are there any programs available online or that come with windows that will tell me which processes are using which ports on m..
I've gone through the steps detailed in How do you use https / SSL on localhost? but this sets up a self-signed cert for my machine name, and when browsing it via https://localhost I receive the IE wa..
I make new branch from master with:
git checkout -b testbranch
I make 20 commits into it.
Now I want to squash those 20 commits. I do that with:
git rebase -i HEAD~20
What about if I don't kno..
I have the following
data.AppendFormat("{0},",dataToAppend);
The problem with this is that I am using it in a loop and there will be a trialling comma. What is the best way to remove the trailing ..
I thought this would be simple, but I can't seem to use AUTO_INCREMENT in my db2 database. I did some searching and people seem to be using "Generated by Default", but this doesn't work for me.
I..
I am beginning to learn Angular2. I've been following the Heroes Tutorial provided at angular.io.
All was working fine until, being annoyed by the clutter of HTML using the template, I used template ..
I am trying to install wampserver on a win7-32bit. The installation goes smoothly but the icon doesn't turn green. It stays orange saying "Server online". I've trying different solutions nothing worke..
I am creating an Entity (Room Persistence Library) class Food, where I want to make foodId as autoincrement.
@Entity
class Food(var foodName: String, var foodDesc: String, var protein: Double, var car..
http://en.wikipedia.org/wiki/Upsert
Insert Update stored proc on SQL Server
Is there some clever way to do this in SQLite that I have not thought of?
Basically I want to update three out of four co..
I am trying to put the relative path to one of my images in my assets folder in an image src tag in my Angular2 app. I set a variable in my component to 'fullImagePath' and used that in my template. I..
I have some SQL thats getting run and it is taking to long to return the results / parse / display, etc. in a asp.net c# application.
I have SQL Server Management Studio 2008 R2 installed to connect ..
How can I simulate the functionality of background-size:cover on an html element like <video> or <img>?
I'd like it to work like
background-size: cover;
background-position: center cente..
I need to verify if a list is a subset of another - a boolean return is all I seek.
Is testing equality on the smaller list after an intersection the fastest way to do this? Performance is of utmost..
I'm relatively new to android development. I'm developing an android application where I'm sending requests to the web server and parsing JSON objects. Frequently I'm getting java.net.SocketTimeoutExc..
I'm unsure of how to name Dockerfiles. Many on GitHub use Dockerfile without a file extension. Do I give them a name and extension; if so what? Or do I just call them Dockerfile?..
Why I can't do something like this? mkdir folder/subfolder/ in order to achive this I have to do:
mkdir folder
cd folder
mkdir subfolder
Is there a better way to do it?..
I just uninstalled my older versions of Ruby, removed all of my gems
(including Rails), and installed Ruby 2.0. In other words, a totally clean re-install. Upon starting IRB, I received this message:
..
I'm very new to programming and I have some doubts.
I have a AsyncTask which is I call as RunInBackGround.
and I start this process like:
new RunInBackGround().execute();
But I wish to wait unt..
Is there a straightforward way of finding the index of the last occurrence of a string using SQL? I am using SQL Server 2000 right now. I basically need the functionality that the .NET System.String..
I have a large Oracle table, which contains 542512 rows. It has three columns and when I try to create an index for it with the following command:
CREATE INDEX FTS_INDEX ON FILTERED_TEKLI_IIS_TABLO..
I need to do a .bat for DOS that do the following:
set ROOT = c:\programas\
set SRC_ROOT = (I want to put the ROOT Here)System\Source
so after defining ROOT I want to have SRC_ROOT = c:\programas\S..
I've very recently migrated to Py 3.5.
This code was working properly in Python 2.7:
with open(fname, 'rb') as f:
lines = [x.strip() for x in f.readlines()]
for line in lines:
tmp = line.str..
After cloning from remote git repository (at bettercodes)
I made some changes, commited
and tried to push:
git push origin master
Errors with:
error: cannot lock existing info/refs
fatal: g..
I have seen many Android answers that suggest calling the garbage collector in some situations.
Is it a good practice to request the garbage collector in Android before doing a memory-hungry operatio..
How to split the string "Thequickbrownfoxjumps" to substrings of equal size in Java.
Eg. "Thequickbrownfoxjumps" of 4 equal size should give the output.
["Theq","uick","brow","nfox","jump","s"]
Sim..
I have been using try..catch blocks in my PHP code, but I'm not sure if I've been using them correctly.
For example, some of my code looks like:
try {
$tableAresults = $dbHandler->doSometh..
Possible Duplicate:
SELECT INTO using Oracle
I have came across SQL SELECT INTO statement for creating new table and also dumping old table records into new table in single SQL statement as..
I am creating a website.
I have written the HTML part and now I am writing the stylesheet. But there is always some space above my header. How can I remove it?
My HTML and CSS code is given below.
..
I want to get value for selected cell in datagrid , please anyone tell how to do this. i used SelectedCell changed event , how can i do that?
dataGrid1.CurrentCell
..
When we convert or cast date in sql, see below sql code
SELECT CONVERT(VARCHAR(10), GETDATE(), 110) AS [MM-DD-YYYY]
it works fine, I just want to know the meaning of 110 in above code. what it doe..
How do I force my Database to go Offline, without regard to what or who is already using it?
I tried:
ALTER DATABASE database-name SET OFFLINE;
But it's still hanging after 7 min.
I want this bec..
I am trying to set the ListView textColor to black, since I am using a white background.
Here is my MailActivity
public class MailActivity extends ListActivity {
String[] listItems = { "Compose..
I want to retrieve information like the city, state, and country of a visitor from their IP address, so that I can customize my web page according to their location. Is there a good and reliable way t..
I'm running this target in Ant.
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${b..
I need to develop an application using Google Maps in Android to locate my current location and need to find nearest location.
(For example: Nearby police station from my current location.)
It shoul..
Doesn't fit on the slide by default, doesn't even print by any other means.
Here's the .Rmd: Edit: it seems you have to use plot() in every chunk. Second plot now prints.
# Plot should show at high..
i have vlc (program to reproduce videos)
if i type in a shell:
/home/vlc "/home/my movies/the movie i want to see.mkv"
it opens up an reproduces the movie.
however, when I run the following program..
I want to compare the value of an NSString to the string "Wrong". Here is my code:
NSString *wrongTxt = [[NSString alloc] initWithFormat:@"Wrong"];
if( [statusString isEqualToString:wrongTxt] ){
..
I'm using Twitter Bootstrap modal window functionality. When someone clicks submit on my form, I want to show the modal window upon clicking the "submit button" in the form.
<form id="myform" clas..
I know how to "transform" a simple Java List from Y -> Z, i.e.:
List<String> x;
List<Integer> y = x.stream()
.map(s -> Integer.parseInt(s))
.collect(Collectors.toList()..
Is it at all possible to update object's properties with setState?
Something like:
this.state = {
jasper: { name: 'jasper', age: 28 },
}
I have tried:
this.setState({jasper.name: 'someOtherNa..
I am getting this issue when I type localhost:8000/admin/.
`TemplateSyntaxError: Could not parse the remainder: ':password_change' from 'admin:password_change'. The syntax of 'url' changed in Djan..
I've been asked to update some Excel 2003 macros, but the VBA projects are password protected, and it seems there's a lack of documentation... no-one knows the passwords.
Is there a way of removing o..
When I compile the Python code below, I get
IndentationError: unindent does not match any outer indentation level
import sys
def Factorial(n): # Return factorial
result = 1
for i in ..
I have a Rails application and I'm using jQuery to query my search view in the background. There are fields q (search term), start_date, end_date and internal. The internal field is a checkbox and I'm..
I have this in my web.xml document. I am trying to have a welcome list so I dont need to type the path for the home page anymore. But everytime a clicked the application in my tomcat page it displays ..
I've got a simple query running against SQL Server 2005
SELECT *
FROM Table
WHERE Col = 'someval'
The first time I execute the query can take > 15 secs. Subsequent executes are back in < 1 ..
How do you identify whether a grammar is LL(1), LR(0), or SLR(1)?
Can anyone please explain it using this example, or any other example?
X ? Yz | a
Y ? bZ | e
Z ? e
..
Does anyone know how to solve this?
I tried many things, but none of them worked.
And when I click more details I get this:
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
atsun.sec..
I have markup that uses inline styles, but I don't have access to change this markup. How do I override inline styles in a document using only CSS? I don't want to use jQuery or JavaScript.
HTML:
&l..
When cding into one of my directories called openfire the following error is returned:
bash: cd: openfire: Permission denied
Is there any way around this?..
I have the following Python list (can also be a tuple):
myList = ['foo', 'bar', 'baz', 'quux']
I can say
>>> myList[0:3]
['foo', 'bar', 'baz']
>>> myList[::2]
['foo', 'baz']
>..
I am not sure where you edit the code for my question so I put both (sorry if that confuses anyone)
In the top right hand corner there are two text boxes, but I'm not sure how to make them bigger in ..
is there a way to achieve this effect in a cross-browser compatible way without having to prepare separated images?
Basically the frame on which text lays has a white overlay of 50% opacity.. I would..
What's the best tool that you use to monitor Web Service, SOAP, WCF, etc. traffic that's coming and going on the wire? I have seen some tools that made with Java but they seem to be a little crappy. W..
I have seen many tutorials on how to compress a single file in c#. But I need to be able to create a normal *.zip file out of more than just one file. Is there anything in .NET that can do this? What ..
I have an array:
array( 4 => 'apple', 7 => 'orange', 13 => 'plum' )
I would like to get the first element of this array. Expected result: string apple
One requirement: it cannot be don..
I am a beginner in OpenCV. I want to do some image processing on the frames of a video which is being uploaded to my server. I just want to read the available frames and write them in a directory. The..
I'm preparing a database creation script in Node.js and Mongoose.
How can I check if the database already exists, and if so, drop (delete) it using Mongoose?
I could not find a way to drop it with Mo..
I am working on web application using React and bootstrap. When it comes to applying button onClick, it takes me hard time to let my page being redirect to another. if after a href , I cannot go the..
I'd like to construct the following SQL using Doctrine's query builder:
select c.*
from customer c
join phone p
on p.customer_id = c.id
and p.phone = :phone
where c.username = :username
First I tri..
For the following sample:
def fuctionName(int, bool):
if int in range(...):
if bool == True:
return False
else:
return True
Is there any way to skip the ..
I am trying to relearn C++ after taking an intro course a few years ago and I’m having some basic problems. My current problem occurs when trying to use a friend function. Here is my code in 2 files..
I want to programmatically edit file content using windows command line (cmd.exe). In *nix there is sed for this tasks. Is there any useful native equivalent in windows?..
I’ve been working on this the whole day but don’t come up with a solution. I have 3 columns in one row in a container.
1: right content – pull-right
2: navigation – pull-left
3: main conten..
I have an HTML string from a Ajax loaded source. I would like to get some attributes from an object (image) in this string, before I put the HTML into the document.
I've got something like:
$.ajax(..
I'm trying to stop application on Android 2.3.7 device. But in this version of Android I can't use "force-stop" command. Do you know any other ways to close application on non rooted device?..
In my endless quest in over-complicating simple stuff, I am researching the most 'Pythonic' way to provide global configuration variables inside the typical 'config.py' found in Python egg packages.
..
I have a dataframe with unique row names and unique column names. I want to convert the rows into columns and column into rows.
For example, this code:
starting_df <- data.frame(row.names= c(LETT..
I'm trying to create a mixin for placeholders in sass.
This is the mixin I've created.
@mixin placeholder ($css) {
::-webkit-input-placeholder {$css}
:-moz-placeholder {$css}
::-moz..
E.g
sqlContext = SQLContext(sc)
sample=sqlContext.sql("select Name ,age ,city from user")
sample.show()
The above statement print entire table on terminal but i want to access each row in that tab..
What are the good ways of finding the sum of all the elements in a std::vector?
Suppose I have a vector std::vector<int> vector with a few elements in it. Now I want to find the sum of all the ..
I have a data service that looks like this:
@Injectable()
export class DataService {
baseUrl = 'http://localhost'
constructor(
private httpClient: HttpClient) {
}
get(url,..
During writes to Redis ( SET foo bar ) I am getting the following error:
MISCONF Redis is configured to save RDB snapshots, but is currently
not able to persist on disk. Commands that may modify..
From what I understand, Git doesn't really need to track file rename/move/copy operations, so what's the real purpose
of git mv? The man page isn't specially descriptive...
Is it obsolete? Is it an in..
I want to show a map in on of my activity.
In google map V1 we use -
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="match_parent"
androi..
Error reports from most language kernels running in IPython/Jupyter Notebooks indicate the line on which the error occurred; but (at least by default) no line numbers are indicated in Notebooks.
Is i..
I'm trying to configure a project using CMake, but it fails to find Boost libraries even though they are in the specified folder. I have specified Boost_INCLUDE_DIR, Boost_LIBRARYDIR and BOOST_ROOT , ..
I'm trying to construct a simple login page for my Flutter app. I've successfully built the TextFields and log in/Sign in buttons. I want to add a horizontal ListView. When I run the code my elemen..
I have some JSON that looks like this
[
{
"MobileSiteContent": {
"Culture": "en_au",
"Key": [
"NameOfKey1"
]
}
},
{
"PageContent": {
"Culture": "en_a..
I need to convert a .cer file to a .jks file.
I saw a few questions about it, but haven't seen a solution to what I need.
I don't need it in order to add it to my local certificates, but as a file to..
I'm currently trying to set all borders for my spreadsheet, also formatting such as autosize.
My code below is working, for sheet 1. All other sheets inside the spreadsheet are completely untouched. ..
I would like an efficient utility to generate unique sequences of bytes. UUID is a good candidate but UUID.randomUUID().toString() generates stuff like 44e128a5-ac7a-4c9a-be4c-224b6bf81b20 which is go..
here's a quick question:
How do you make a window pop up for your error handling in php?
Is javascript the only way to do this or is there a way to do this in PHP?
i have a PHP-file, and one of the ..
I'm trying to transcode a bunch of files from US-ASCII to UTF-8.
For that, I'm using iconv:
iconv -f US-ASCII -t UTF-8 file.php > file-utf8.php
My original files are US-ASCII encoded, which mak..
I have this symfony code where it retrieves all the categories related to a blog section on my project:
$category = $catrep->createQueryBuilder('cc')
->Where('cc.contenttype = :type')
-..
I have one Android Device running Jelly Bean OS.
Is there any way to detect the process is running or not using ADB command if i know the package name?..
I am creating a GUI that builds information about a person. I want the user to select their birth month using a drop down bar, with the months configured earlier as a list format.
from tkinter impor..
Say you have a form that has values loaded from database. How do you initialize ng-model?
Example:
<input name="card[description]" ng-model="card.description" value="Visa-4242">
In my contr..
I have var ar = [1, 2, 3, 4, 5] and want some function getSubarray(array, fromIndex, toIndex), that result of call getSubarray(ar, 1, 3) is new array [2, 3, 4]...
How to access elements by row, col in OpenCV 2.0's new "Mat" class? The documentation is linked below, but I have not been able to make any sense of it.
http://opencv.willowgarage.com/documentation/c..
I am new to Maven, I have a Java based web project with maven configured in my MyEclipse.
Now if I modified any java files then do I need to do Run as -> Mvn install or Mvn package?..
Running Linux, Apache, PHP 5.3 with FastCGI Handler.
Is it possible to find out the script that is being executed for a linux process? I've been searching on google and haven't been able to find anyt..
I have a column name Address which consists of some address which has '%' in between as:
Address
--------------------
Aman Ja%lan%
Stree% Ro%ad
etc., etc.
How I can write the LIKE operator to find..
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 ..
So is this the only way to render raw html with reactjs?
// http://facebook.github.io/react/docs/tutorial.html
// tutorial7.js
var converter = new Showdown.converter();
var Comment = React.createClas..
I want to begin writing queries in MySQL.
show grants shows:
+--------------------------------------+
| Grants for @localhost |
+--------------------------------------+
| GRANT USAGE ..
I have a large Maven project with many modules and many pom.xml files. The project has changed and I suspect the pom's contain some unnecessary dependencies. Is there is a command which removes any un..
I have a dataframe with values like
A B
1 4
2 6
3 9
I need to add a new column by adding values from column A and B, like
A B C
1 4 5
2 6 8
3 9 12
I believe this can be done using lambda functi..
Is there any way to integrate mailchimp simple (one email input) with AJAX, so there is no page refresh and no redirection to default mailchimp page.
This solution doesn't work jQuery Ajax POST not w..
I want to access values provided in application.properties, e.g.:
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
logging.file=${HOME}/application.log
userBucket.path..
Is BindingResult useful to bind just exceptions with view, or something else?
what is the exact use of BindingResult?
Or is it useful in binding model attribute with view...
I thought this would be easy to achieve, but so far I haven't found solutions for comment/uncomment shortcut on both Java class editor and jsf faceted webapp XHTML file editor :
to quickly comment/u..
I'm new to git and learning from a PDF.
I just executed a command $ git commit and it opens a new editor. But I'm trying to close that new commit editor. How to do this? I'm using git on windows...
I am trying to read a csv file into a dataframe. I know what the schema of my dataframe should be since I know my csv file. Also I am using spark csv package to read the file. I trying to specify the ..
Please have a look at my batch file.
echo off
start "c:\program files\php\php.exe D:\mydocs\mp\index.php param1 param2"
but it isn't working. Any ideas how do I get it working?..
I am using VS2005 C#.
I have a .aspx login page and I would like to implement a background image to it. Below is my current page screenshot:
Below is my background code:
<div align="center..
I'm running Eclipse SDK 3.4.0 on Mac OS X 10.5.6.
Every time I try to install something new through "software updates", the message "The software items you selected may not be valid with your current..
How to know in Firefox whether refresh button is clicked or browser back button is clicked... for both events onbeforeunload() method is a callback. For IE I am handling like this:
function Callback..
How can I replace double quotes with a backslash and double quotes in Python?
>>> s = 'my string with "double quotes" blablabla'
>>> s.replace('"', '\\"')
'my string with \\"doubl..
I'm using this code to let the user enter in names while the program stores them in an array until they enter an empty string (they must press enter after each name):
people = []
info = 'a' # must fi..
Using suggested method:
This is the result: A link in the button,
Code in between comment lines
I was wondering if there is a way to wrap a Link element from 'react-router' in an HTML button tag usin..
I have a php site running in cloud server.When ever i add new files css, js or images the browser is loading the same old js, css and image files stored in cache.
My site has a doctype and meta tag a..
So when I do a code of blocks inside a try{}, and I try to return a value, it tells me
no return values
import org.w3c.dom.ranges.RangeException;
public class Pg257E5
{
public static void ma..
I once used Lodash _.pluck...I loved pluck...
Realizing Lodash no longer supports pluck (as of Lodash 4.x), I'm struggling to remember what to use instead...
I went to the docs, hit cmd-f, typed 'pl..
I want to open mis file, copy all the data and write into a text file.
My mis file.
File name – 1.mis
M3;3395;44;0;1;;20090404;094144;8193;3;0;;;;
M3;3397;155;0;2;;20090404;105941;8193;3;0;;;;
M3..
I am searching for a regular expression for allowing alphanumeric characters, -, _ or spaces in JavaScript/jQuery. I tried Googling but wasn't able to find that.
Can anyone help me out with this?
Th..
I've tried a veriety of jQuery plugins recently and I keep getting this error …
(source: shaunbellis.co.uk)
… regardless of what plugin I try to use.
I've checked the links to the JS files w..
For regex what is the syntax for search until but not including? Kinda like:
Haystack:
The quick red fox jumped over the lazy brown dog
Expression:
.*?quick -> and then everything until it hits t..
Is there any method in Java or any open source library for escaping (not quoting) a special character (meta-character), in order to use it as a regular expression?
This would be very handy in dynamic..
edit 2
If you stumble across this, check both answers as I'd now use pluck for this
I have a fairly large custom dataset that I'd like to return to be echoe'd out as json. One part is:
l=Location.fin..
I know that attributes are extremely useful. There are some predefined ones such as [Browsable(false)] which allows you to hide properties in the properties tab. Here is a good question explaining att..
Is there a way to align text when printing using std::cout? I'm using tabs, but when the words are too big they won't be aligned anymore.
Sales Report for September 15, 2010
Artist Title Price G..
I have a draggable object (div), and some droppable ones (table TD's). I want the user to drag my draggable object to one of those droppable TD's.
I enable draggable and droppable this way:
$(".drag..
I notice that modern C and C++ code seems to use size_t instead of int/unsigned int pretty much everywhere - from parameters for C string functions to the STL. I am curious as to the reason for this ..
I got a native library that needs to be added to java.library.path. With JVM argument -Djava.library.path=path... I can set the path as I want.
My problem is that my other library (pentaho reporting)..