What I did: I have created a remote repository on Github and I am trying to clone the remote repository on my local machine. While cloning I am providing the clone URL & target folder.
But every ..
I'm writing a python application that will make heavy use of a graph data structure. Nothing horribly complex, but I'm thinking some sort of graph/graph-algorithms library would help me out. I've goog..
I use this
@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$"
regexp to validate the email
([\w\.\-]+) - this is for the first-level domain (many letters and numbers, also point and hyphen)
([\w\-]+) - th..
I read the Python 2 docs and noticed the id() function:
Return the “identity” of an object. This is an integer (or long integer) which is guaranteed to be unique and constant for this object d..
I have a Bill object, which has many Due objects. The Due object also belongs to a Person. I want a form that can create the Bill and its children Dues all in one page. I am trying to create a form us..
Possible Duplicate:
SELECT INTO using Oracle
I have one table in my oracle database. I want to create one table with another name, but containing same data. How to achieve this ?..
I am trying to convert a am/pm format time to a 24 hour format time
6:35 PM to 18:35
I tried this piece of code on playground but it doesnt seem to
work if I put the time alone
let dateAsString = ..
I have a table that contains, amongst other columns, a column of browser versions. And I simply want to know from the record-set, how many of each type of browser there are. So, I need to end up with ..
I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this:
"$ 2,500.00"
What's the best way to do this?..
When filling out a form's textarea, the default behavior when the enter key is hit is to move to the next line. How can I change the behavior of the form so it will submit upon user hitting enter even..
I have a repository with a file, Hello.java. When I compile it, an additional Hello.class file is generated.
I created an entry for Hello.class in a .gitignore file. However, the file still appears t..
How can I remove duplicate values from a multi-dimensional array in PHP?
Example array:
Array
(
[0] => Array
(
[0] => abc
[1] => def
)
[1] => Array
(..
When trying to run Android Studio on my computer, I get the following error:
The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a va..
What do I use in Visual Studio (C#) to perform the equivalent of Java's System.out.println( /*stuff*/ ) ?
Does the output from the command show in the Output window in the IDE?
I have a button on a ..
I have an ASP.Net MVC project and I want to implement bundling, but everything I can find on the internet directs me to open BundleConfig.cs in App_Start - however this file does not exist in my proje..
Can anyone tell me how to change the default listening port of Weblogic 10.3 to something different? I saw some posts on discussion boards which say that change it under ...//config/config.xml. Even I..
I was trying to run an angular project in windows 10. It is the same project that I am doing in Ubuntu. When I clone the repository and install all the node packages I encountered this error.
ERRO..
I use a FileUploader control in my application. I want to save a file to a specified folder. If this folder does not exist, I want to first create it, and then save my file to this folder. If the fol..
I'm using Git-1.9.0-preview20140217 for Windows. As I know, this release should fix the issue with too long filenames. But not for me.
Surely I'm doing something wrong: I did git config core.longpath..
I'm wondering if there is a command line utility for taking a GitHub flavored Markdown file and rendering it to HTML.
I'm using a GitHub wiki to create website content. I've cloned the repository on ..
I have some object.ID-s which I try to store in the user session as tuple. When I add first one it works but tuple looks like (u'2',) but when I try to add new one using mytuple = mytuple + new.id got..
I'm using Oracle SQL developer version 3.0.04. I attempted to use the function LISTAGG to group the data together..
CREATE TABLE FINAL_LOG AS
SELECT SESSION_DT, C_IP, CS_USER_AGENT,
lista..
I have been developing a small web application with CodeIgniter. After testing it out locally I went to put it on my web server to allow a couple other people test out some features. While navigating..
Here's an example of the query I'm trying to convert to LINQ:
SELECT *
FROM Users
WHERE Users.lastname LIKE '%fra%'
AND Users.Id IN (
SELECT UserId
FROM CompanyRolesToUsers
..
In Javascript how would i find prime numbers between 0 - 100? i have thought about it, and i am not sure how to find them. i thought about doing x % x but i found the obvious problem with that.
this i..
I used Xcode 6.1.1 to upload a new version of a prerelease app to iTunes Connect so I could distribute it to my external beta testers. I've done this with two versions of the same app previously and i..
I am using PostgreSQL for my Codeigniter website. I am using grocery crud for add, edit and delete operations. While doing an edit or add, I want to rename an uploaded file dynamically based on the id..
I'm trying to make a heatmap using ggplot2 using the geom_tiles function
here is my code below:
p<-ggplot(data,aes(Treatment,organisms))+geom_tile(aes(fill=S))+
scale_fill_gradient(low = "black"..
I'm trying to get the new TabLayout in the android design library working.
I'm following this post:
http://android-developers.blogspot.com/2015/05/android-design-support-library.html
and the docum..
I've got an ndarray in python with a dtype of float64. I'd like to convert the array to be an array of integers. How should I do this?
int() won't work, as it says it can't convert it to a scalar. Ch..
I have a map named valueMap as follows:
typedef std::map<std::string, std::string>MAP;
MAP valueMap;
...
// Entering data.
Then I am passing this map to a function by reference:
void functio..
I have a scatter plot graph with a bunch of random x, y coordinates. Currently the Y-Axis starts at 0 and goes up to the max value. I would like the Y-Axis to start at the max value and go up to 0.
p..
I need to change format of
this.TextBox3.Text = DateTime.Now.ToShortDateString();
so it returns (for example) 25.02.2012, but I need 02.25.2012
How can this be done?..
When I run the following SQL statement:
SELECT MAX(SUM(TIME))
FROM downloads
GROUP BY SSN
It returns the maximum sum value of downloads by a customer, however if I try to find the social security n..
I was wondering when I should use interfaces.
Lets think about the following:
public abstract class Vehicle {
abstract float getSpeed();
}
and :
public interface IVehicle {
float getSpeed();..
What are some good ways to do this? Is it even possible to do cleanly?
Ideally I'd like to use packet headers to decide which server should handle requests. However, if there is an easier/better way..
How can I check that JButton is pressed? I know that there is a method that its name is "isEnabled"
So I try to write a code to test.
this code have 2 Jbuttons which are "Add" Button and "Checkout"..
This is my HTML
<select name="countries" id="countries" MULTIPLE size="8">
<option value="UK">UK</option>
<option value="US">US</option>
<option value="Canad..
This is a past exam question and I was wondering what a primitive type and reference type are first off?
With an array I know the a reference type is where the array is composed of objects or variable..
I use echo and print_r much, and almost never use print.
I feel echo is a macro, and print_r is an alias of var_dump.
But that's not the standard way to explain the differences...
I have two ListBox1 and ListBox2. I have inserted items into a ListBox2 with the following code by selecting ListBox1 item:
da6 = New SqlDataAdapter("select distinct(component_type) from component wh..
I'm using a small piece of inline HTML code to change the background of a cell color in a table on mouse hover. I use this on specific table cells only, so not all cells need this to happen.
<td ..
I've been trying to find some way of removing the icon/logo from the action bar but the only thing I've found after an hour of searching SO, Android's documentation and Google is how to remove the tit..
In a WPF app, in MVP app, I have a combo box,for which I display the data fetched from Database. Before the items added to the Combo box, I want to display the default text such as
" -- Select Tea..
I wrote these two solutions for Project Euler Q14, in assembly and in C++. They implement identical brute force approach for testing the Collatz conjecture. The assembly solution was assembled with:
n..
I'm trying to install a platform but when I open Android Manager then I click Available Software then select the
https://dl-ssl.google.com/android/repository/repository.xml repository
I get this erro..
latley I spent much programming in Java. There you call the class you Inherited from with super(); (you all probably know that)
Now I have a class in C++ which has a default constructor which takes s..
I have a case where I must write inline CSS code, and I want to apply a hover style on an anchor.
How can I use a:hover in inline CSS inside the HTML style attribute?
E.g. you can't reliably use CSS..
I have been working with VB for a while now. Now I'm giving C++ a shot, i have came across strings, i cant seem to find a way to declare a string.
For example in VB:
Dim Something As String = "Some ..
I am beginning to look into the PowerShell model and snap-in development. The first thing I notice is to reference System.management.automation.dll. However in Visual Studio, the .NET tab does not hav..
When I perform "SELECT * FROM table" I got results like below:
1 item1 data1
2 item1 data2
3 item2 data3
4 item3 data4
As you can see, there are dup records from column2 (item1 are dupped). So how ..
I'm looking to style a modal dialog (using UI Dialog) with unique CSS that is separate from the traditional dialog, so in essence to have two jQuery dialogs that each look different.
I've styled one,..
I'm trying to loop through items of a checkbox list. If it's checked, I want to set a value. If not, I want to set another value. I was using the below, but it only gives me checked items:
foreach (D..
I am sure I read about this the other day but I can't seem to find it anywhere.
I have a fadeOut() event after which I remove the element, but jQuery is removing the element before it has the chance t..
I use Tomcat 7.0.43 with a websocket application. My app works fine in Tomcat 7.0.42 but with 43 I get the following output when I try to access my server on websockets:
Sep 16, 2013 3:08:34 AM org.a..
I've just installed python 3.6 which comes with pip
However, in Windows command prompt, when I do: 'pip install bs4' it returns 'SyntaxError: invalid syntax' under the install word.
Typing 'python' ..
I have two UITextFields (e.g. username and password) but I cannot get rid of the keyboard when pressing the return key on the keyboard. How can I do this? ..
I have been having problems installing VB6 on Windows 7. I realize it is a legacy IDE and my research on the net hasn't been that much of help. Every time I attempt to install VB6 on Windows 7, beside..
I need to implement a deep clone in one of my objects which has no superclass.
What is the best way to handle the checked CloneNotSupportedException thrown by the superclass (which is Object)?
A cow..
I'm trying to parse a bit.ly JSON response in javascript.
I get the JSON via XmlHttpRequest.
var req = new XMLHttpRequest;
req.overrideMimeType("application/json");
req.open('GET', BITLY_CREATE_..
I want a random selection of rows in PostgreSQL, I tried this:
select * from table where random() < 0.01;
But some other recommend this:
select * from table order by random() limit 1000;
I ha..
What's a simple and efficient way to shuffle a dataframe in pandas, by rows or by columns? I.e. how to write a function shuffle(df, n, axis=0) that takes a dataframe, a number of shuffles n, and an ax..
At this moment I have a table tblLocation with columns ID, Location, PartOfID.
The table is recursively connected to itself: PartOfID -> ID
My goal is to have a select output as followed:
> F..
arr is array of strings:
["hello", "world", "stack", "overflow", "hello", "again"]
What would be an easy and elegant way to check if arr has duplicates, and if so, return one of them (no matter whi..
I want to write a common error handler which will catch custom errors thrown on purpose at any instance of the code.
When I did throw new Error('sample') like in the following code
try {
throw n..
I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over anothe..
I am unable to connect to my MySQL in xampp I have this error:
MySQL said: Documentation
1045 - Access denied for user 'root'@'localhost' (using password: NO)
mysqli_real_connect(): (HY0..
Lets say I have the following code:
import collections
d = collections.OrderedDict()
d['foo'] = 'python'
d['bar'] = 'spam'
Is there a way I can access the items in a numbered manner, like:
d(0) #..
I have an image inside a span tag. But the problem is the image doesn't fit inside the span tag. Instead a part of the image goes out of the span tag.
<span style="padding-right:3px; padd..
I have installed Android Studio version 1.0.1. I have imported my projects from eclipse and it works fine.
Then I deleted a module and reimported it into my Android Studio project. The gradle build sa..
Question #1
I want to know when am I supposed to use:
Session.Abandon() // When I use this during tracing and after calling it- I find the session still has a value.
And when am I supposed to ..
I need to "concatenate to a string in a for loop". To explain, I have this list:
list = ['first', 'second', 'other']
And inside a for loop I need to end with this:
endstring = 'firstsecondother'
..
How can I check if a std::thread is still running (in a platform independent way)?
It lacks a timed_join() method and joinable() is not meant for that.
I thought of locking a mutex with a std::lock_g..
I'm trying to center the body element on my HTML page.
Basically, in the CSS I set the body element to be display: inline-block; so that it is only as wide as its contents. That works fine. However..
I'm setting an ad to my Android application using DoubleClick and can't manage to show the final ad, can someone help me?
When I test an ad by adding ".addTestDevice("xxx...")" I g..
I am trying to convert a date with individual parts such as 12, 1, 2007 into a datetime in SQL Server 2005. I have tried the following:
CAST(DATEPART(year, DATE)+'-'+ DATEPART(month, DATE) +'-'+ DATE..
I seem to be unable to use the ActiveRecord::Base.find option :order for more than one column at a time.
For example, I have a "Show" model with date and attending columns.
If I run the following c..
I have excel data in following format.
Date Amount
03-Jan-13 430.00
25-Jan-13 96.00
10-Jan-13 440.00
28-Feb-13 72.10
28-Feb-13 72.30
I need to sum the amount field only if the..
In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support Metamodel representation of entities.
Is anyone aware of a fully functional implementation of this A..
I have this AngularJS app. Everything works just fine.
Now I need to show different pop-ups when specific conditions become true, and I was wondering what would be the best way to proceed.
Currently..
I am making a code which converts the given amount into words, heres is what I have got after googling. But I think its a little lengthy code to achieve a simple task.
Two Regular Expressions and two ..
I can't seem to get MySQL data to persist if I run $ docker-compose down with the following .yml
version: '2'
services:
# other services
data:
container_name: flask_data
image: mysql:lat..
I want to have the JQuery Datepicker open when the user clicks on an image. There is no input field where the selected date appears afterwards; I'm just going to save the entered date to the server vi..
I'm trying to write a jQuery plugin that will provide additional functions/methods to the object that calls it. All the tutorials I read online (have been browsing for the past 2 hours) include, at th..
How do you generate all the permutations of a list in Python, independently of the type of elements in that list?
For example:
permutations([])
[]
permutations([1])
[1]
permutations([1, 2])
[1, 2]..
I did a git stash pop and ended up with merge conflicts. I removed the files from the file system and did a git checkout as shown below, but it thinks the files are still unmerged. I then tried replac..
Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?
As an example, suppose we have ranges denoted by DateTime variables StartDate1 to E..
I'm trying to use the FileUpload control in ASP.NET
Here's my current namespace setup:
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using S..
I'm using bootstrap version 3.0.1 to make a grid and when I add a border to the rows of the grid I can see that the rows that are together add up there borders, I get a thicker border.
This is my cod..
I tried using "ng destroy component foo" and it tells me "The destroy command is not supported by Angular-CLI"
How do we properly delete components with Angular CLI?..
I need a simple floating point rounding function, thus:
double round(double);
round(0.1) = 0
round(-0.1) = 0
round(-0.9) = -1
I can find ceil() and floor() in the math.h - but not round().
Is it..
I have this string:
mystring = 'Here is some text I wrote '
How can I substitute the double, triple (...) whitespace chracters with a single space, so that I get:
mystring = 'Here is s..
Using SQL Server 2005 how do I get the below statement or rather the output as i want it to be.
SELECT Id 'PatientId',
ISNULL(ParentId,'') 'ParentId'
FROM Patients
ParenId is a uniqueiden..
I'm using a library from CGAL which during the linking stage of my code compilation produces a lot of linking warnings of this form:
warning LNK4099: PDB 'vc80.pdb' was not found with 'gmp-vc80-mt-sg..
I have a column which is called studentID, but I have millions of records and somehow the application has input some arbitrary text in the column.
How do I search:
SELECT *
FROM STUDENTS
WHERE ST..
I was trying to create a table as follows,
create table table1(date1 datetime,date2 datetime);
First I tried inserting values as below,
insert into table1 values('21-02-2012 6:10:00 PM','01-01-200..
I have an Excel document (2007) with a chart (Clustered Column) that gets its Data Series from cells containing calculated values
The calculated values never change directly, but only as a result of ..
Possible Duplicate:
How do I create an .exe for a Java program?
I've just made a simple program with Eclipse and I want to compile it into an executable, but simply can't seem to find out h..
Is there a way to pass an entire form object on mock request when integration testing a spring mvc web app? All I can find is to pass each field separately as a param like this:
mockMvc.perform(post(..
I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important.
I saw this here (http://nettuts.com...):
function complexLoad(config, fileNames) {
for..
I made a website where if the user clicks, it plays a sound. To prevent the sound from overlapping, I had to add the code:
n.pause();
n.currentTime = 0;
n.play();
But that causes the error:
The pl..
I saw this today in some PHP code:
$items = $items ?: $this->_handle->result('next', $this->_result, $this);
I'm not familiar with the ?: operator being used here. It looks like a ternary ..
I have been getting a ClassNotFoundException with org.glassfish.jersey.servlet.ServletContainer but it peculiarly started last night when I tried to start/re-start my Tomcat server (v7) with Eclipse J..
I've seen a few of these questions asked but haven't spotted one that's helped!! I'm trying to select the first part of a postcode only, essentially ignoring anything after the space. the code i am us..
I have a function where I get a list of ids, and I need to return the a list matching a description that is associated with the id. E.g.:
public class CodeData
{
string CodeId {get; set;}
str..
I have an Excel Workbook that on Form Button click I need to save a copy of the workbook to the user's Desktop.
Originally everything was going to be on a shared Network folder, but now I have about ..
How do I comment out a block of tags in XML?
I.e. How can I comment out <staticText> and everything inside it, in the code below?
<detail>
<band height="20">
<static..
I have a file path as a string and trying to remove the last '/' from the end.
my_file_path = '/home/ro/A_Python_Scripts/flask-auto/myDirectory/scarlett Johanson/1448543562.17.jpg/'
I've been tryin..
I've always thought of the if not x is None version to be more clear, but Google's style guide and PEP-8 both use if x is not None. Is there any minor performance difference (I'm assuming not), and is..
I would like to scrape the content of this Google search result page using curl.
I've been trying setting different user agents, and setting other options but I just can't seem to get the content of t..
What is the easiest way to INSERT a row if it doesn't exist, in PL/SQL (oracle)?
I want something like:
IF NOT EXISTS (SELECT * FROM table WHERE name = 'jonny') THEN
INSERT INTO table VALUES ("jon..
Anyone know of a very fast way to replace the last occurrence of a string with another string in a string?
Note, the last occurrence of the string might not be the last characters in the string.
Examp..
I am trying to use robocopy but am unable to make it work because of spaces in the directory names.
I am trying to copy 3 directories: My Documents, My Music and My Pictures to 'C:\test-backup' but wa..
I am using ActiveState Python 3 on Windows and wanted to connect to my MySQL database.
I heard that mysqldb was the module to use.
I can't find mysqldb for Python 3.
Is there a repository available w..
A new problem has arisen for me as I tried to run my script on a different PHP Server.
ON my old server the following code appears to work fine - even when no s parameter is declared.
<?php
if..
I'm looking at some Python code which used the @ symbol, but I have no idea what it does. I also do not know what to search for as searching Python docs or Google does not return relevant results when..
Currently, if the person presses enter inside the text area, the form will submit.
Good, I want that.
But when they type shift + enter, I want the textarea to move to the next line: \n
How can I do..
I am building an order form with PHP and MySQL.
The PHP Form has an input box where the user types in a product code. In the event that the user does not know the product code, I want them to click o..
I know that from Django 1.7 I don't need to use South or any other migration system, so I am just using simple command python manage.py makemigrations
However, all I get is this error:
You are tryi..
I'm developing web application and I need to identify Microsoft Edge's browser separately from others, to apply unique styling. Is there a way to identify Edge by using CSS?
Just like,
<!--[if IE ..
I feel like I'm taking crazy pills here. Usually there's always a million library and samples floating around the web for any given task. I'm trying to implement authentication with a Google "Service ..
How do I iterate over a range of numbers in Bash when the range is given by a variable?
I know I can do this (called "sequence expression" in the Bash documentation):
for i in {1..5}; do echo $i; d..
I downloaded dateutil which comes with a setup.py file but it throws an error when I try to open it. What's the proper way to install this module?
This is the error:
error: no commands supplied
..
Does vue.js have a shorthand for document.getElementById('#id') like JQuery's $('#id')?
If so, where is the reference for this in the docs so I can locate other information?..
I installed Visual Studio 2012 and DevExpress 13.1. As Visual Studio started, it generated an error shown by this attached image,
The 'Microsoft.VisualStudio.Editor.Implementation.Editor..
I’m looking for the easiest, cleanest way to add X months to a JavaScript date.
I’d rather not handle the rolling over of the year or have to write my own function.
Is there something built in t..
With the following code:
import matplotlib
matplotlib.style.use('ggplot')
import matplotlib.pyplot as plt
import pandas as pd
df = pd.DataFrame({ 'celltype':["foo","bar","qux","woz"], 's1':[5,9,1,7]..
How to quickly re-enable scrolling on a website that has disabled scrolling with Javascript? window.scrollBy(0, 100) works fine just can't seem to figure out how to bind this to keys or mouse scroll...
I have the following code:
$project.PropertyGroup | Foreach-Object {
if($_.GetAttribute('Condition').Trim() -eq $propertyGroupConditionName.Trim()) {
$a = $project.RemoveChild($_);
..
I have the following code:
<video controls autoplay>
<source src="video/myVideo.mp4" type="video/mp4">
<source src="video/myVideo.webm" type="video/webm">
<source src="vid..
I am relatively new to PostgreSQL and I know how to pad a number with zeros to the left in SQL Server but I'm struggling to figure this out in PostgreSQL.
I have a number column where the maximum num..
I have a long ListView that the user can scroll around before returning to the previous screen. When the user opens this ListView again, I want the list to be scrolled to the same point that it was pr..
I apologize, but this is kind of a two part question.
I'm extremely new to SQL and am trying to develop a time clock application for the small office that I work in. I'm playing around with the SQL b..
I am using a separate style-sheet for printing. Is it possible to set right and left margin in the style-sheet which set the print margin (i.e. margin on paper).
Thanks. ..
I'm trying to read the following Xml document as fast as I can and let additional classes manage the reading of each sub block.
<ApplicationPool>
<Accounts>
<Account>
..
Pretty self-explanatory. The array is of an integral type, the contents are known and unchanging, and C++0x isn't allowed. It also needs to be declared as a pointer. I just can't seem to find a syn..
I want to compile my project with autoconf/automake. There are 2 conditions defined in my configure.ac
AM_CONDITIONAL(HAVE_CLIENT, test $enable-client -eq 1)
AM_CONDITIONAL(HAVE_SERVER, test $enable-..
In my field it's very common to square some numbers, operate them together, and take the square root of the result. This is done in pythagorean theorem, and the RMS calculation, for example.
In numpy..
I want to send the selected item value along with some attribute (stud_name) value. Is there any functionality in PHP to do so?
Here is the example one.
<form name="add">
Age:
..
I've been wondering what the best (i.e. cleanest/safest/most efficient) way of handling multiple constructors in Java is? Especially when in one or more constructors not all fields are specified:
pub..
Does Python have a function that I can use to escape special characters in a regular expression?
For example, I'm "stuck" :\ should become I\'m \"stuck\" :\\...
3 questions:
What is the difference between connection and read timeout for sockets?
What does connection timeout set to "infinity" mean? In what situation can it remain in an infinitive loop? and w..
I am currently using the below function to create text that will be displayed using Bootstrap’s tooltip plugin. How come multiline tooltips only work with <br> and not \n? I prefer that there ..
How to check if a registry value exists by C# code?
This is my code, I want to check if 'Start' exists.
public static bool checkMachineType()
{
RegistryKey winLogonKey = Registry.LocalMachine.Ope..
I have one ImageView and set a drawable on it. Now I need to get the ID of the drawable on click event of ImageView dynamically. How can I get it?
imgtopcolor = (ImageView) findViewById(R.id.topcolor..
Python 2.7.1
I am trying to use python regular expression to extract words inside of a pattern
I have some string that looks like this
someline abc
someother line
name my_user_name is valid
some mor..
I'm having the following error:
11/Ago/2011 14:04:48 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production..
I'm having trouble performing a cherry-pick. On my local machine, I'm currently on my "master" branch. I want to cherry-pick in a commit from another branch, named "zebra". The "zebra" branch is a rem..
jQuery('#carregar').click(function() {
var canvas = document.getElementById('canvas');
var image = document.getElementById('image');
var element = canvas.getContext("2d");
eleme..
Can anybody give a clear explanation of how variable assignment really works in Makefiles.
What is the difference between :
VARIABLE = value
VARIABLE ?= value
VARIABLE := value
VARIABLE += valu..
When I try to run my Tomcat I get a message:
Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server e..
I made this code
dir /B /S %RepToRead% > %FileName%
for /F "tokens=*" %%a in ('type %FileName%') do (
set z=%%a
echo %z%
echo %%a
)
echo %%a is working fine but echo %z% returns "ec..
I am new to both python and numpy.
I ran a code that I wrote and I am getting this message:
'index 0 is out of bounds for axis 0 with size 0'
Without the context, I just want to figure out what this m..
suppose i have many div's in my page but i want to print the content of specific div using jquery. i found there is a plugin for that.
jQuery Print Element
using this plugin we can easily print div ..
I want to know if my server is running Subversion 1.5.
How can I find that out?
Also would be nice to know my SVN client version number. svn help hasn't been helpful.
Note: I don't want my project'..
I'm getting this error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
even though I have managed to start mysql via command line in ubuntu
..
From another function, I have tuples like this ('falseName', 'realName', positionOfMistake), eg. ('Milter', 'Miller', 4).
I need to write a function that make a dictionary like this:
D={realName:{fal..
I have a string, let's say Hello world and I need to replace the char at index 3. How can I replace a char by specifying a index?
var str = "hello world";
I need something like
str.replaceAt(0,"h"..
How can I determine the IP address of a given request from within a controller? For example (in express):
app.post('/get/ip/address', function (req, res) {
// need access to IP address here
})
..
Is there any difference between JS events blur vs focusout?
I have two textboxes: pwd and confirm pwd. I want to check password match when user tabs out of the confirm pwd textbox, for example. In th..
Is it possible to append a single character to the end of array or string in java. Example:
private static void /*methodName*/ () {
String character = "a"
String otherStr..
I have floated images and inset boxes at the top of a container using float:right (or left) many times. Recently I hit a need to float a div at the bottom right corner of another div with the normal t..
So I'm pretty stumped on how to convert a string into an int using the try/except function. Does anyone know a simple function on how to do this? I feel like I'm still a little hazy on string and ints..
I have installed java in my CentOS release 5.5 machine using the command yum install java. But I am unable to compile a class using javac.
Do I need to install any other package?
I have tried to lo..
I have a large number of rows that I would like to copy, but I need to change one field.
I can select the rows that I want to copy:
select * from Table where Event_ID = "120"
Now I want to copy al..
I am trying to use homebrew as much as possible. What's the suggested way to install the following on OS X?
node.js
io.js
nvm
npm
and hopefully supports development for:
ionic
ngCordova
..