In my app I want to save a copy of a certain file with a different name (which I get from user)
Do I really need to open the contents of the file and write it to another file?
What is the best way t..
I was working on a new Rails 4 app (on Ruby 2.0.0-p0) when I ran into some authenticity token problems.
While writing a controller that responds to json (using the respond_to class method), I got to ..
I am installing Python 2.7 on CentOS 5. I built and installed Python as follows
./configure --enable-shared --prefix=/usr/local
make
make install
When I try to run /usr/local/bin/python, I get this..
I have recently updated my system to record date/times as UTC as previously they were storing as local time.
I now need to convert all the local stored date/times to UTC. I was wondering if there is ..
I have a variable which has the directory path, along with the file name. I want to extract the filename alone from the Unix directory path and store it in a variable.
fspec="/exp/home1/abc.txt"
..
Is there a way to find out the MIME type (or is it called "Content-Type"?) of a file in a Linux bash script?
The reason I need it is because ImageShack appears to need it to upload a file, as for som..
The title pretty much says it all. What's the simplest/most elegant way that I can convert, in Java, a string from the format "THIS_IS_AN_EXAMPLE_STRING" to the format "ThisIsAnExampleString"? I figur..
Possible Duplicate:
Easiest way to find duplicate values in a javascript array
How do I check if an array has duplicate values?
If some elements in the array are the same, then return true..
The sysadmin for a project I'm on has decided that SSH is "too much trouble"; instead, he has set up Git to be accessible via an https:// URL (and username/password authentication). The server for thi..
I've spent hours searching the web for an answer to this question...
Here's what I currently have:
select *
from order_header oh
where tran_date = sysdate-1
..
I get this error, but I don't know how to fix it.
I'm using Visual Studio 2013. I made the solution name MyProjectTest
This is the structure of my test solution:
-function.h
#ifndef MY_FUNCTION_H
#de..
How do I detect when one of the arrow keys are pressed? I used this to find out:
function checkKey(e) {
var event = window.event ? window.event : e;
console.log(event.keyCode)
}
Though it w..
I'll be completing a website soon for my university (in fact, it's mostly finished now other than some mild tweaking) and I'd like to add a hidden thank-you to some bloggers who helped, and the stack ..
I have designed a simple layout.I have finished the design without animation, but now I want to add animations when textview click event and I don't know how to use it.
Did my xml design looks good or..
I have looked at the ability to use tabs in Vim (with :tabe, :tabnew, etc.) as a replacement for my current practice of having many files open in the same window in hidden buffers.
I would like every..
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 am trying to display a table with 4 columns, one of which is an image.
Below is the snapshot:-
I want to vertically align the text to the center position, but somehow the css doesn't seem to work.
..
I am confused about the method view() in the following code snippet.
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
..
I'm fairly new to Java and I'm using BlueJ. I keep getting this "Int cannot be dereferenced" error when trying to compile and I'm not sure what the problem is. The error is specifically happening in ..
I want to capture a single image from my webcam and save it to disk. I want to do this in Java or Python (preferably Java). I want something that will work on both 64-bit Win7 and 32-bit Linux.
EDI..
Is there any way to copy all lines from open file to clipboard in VI editor. I tried yG but it's not using clipboard to store those lines.
So is it possible?..
I have the following for loop, and when I use splice() to remove an item, I then get that 'seconds' is undefined. I could check if it's undefined, but I feel there's probably a more elegant way to do..
I don't fully understand the purpose of using Git or Github; I know it helps to keep track of your changes and it's helpful for people collaborating with other people, but I don't collaborate with any..
I tried to create this code to input an m by n matrix. I intended to input [[1,2,3],[4,5,6]] but the code yields [[4,5,6],[4,5,6]. Same things happen when I input other m by n matrix, the code yields ..
Ok, I see plenty of these errors around. I have tried everything I know to do and have yet to figure this out.
I am working on a development server running python 2.5 and Django 1.3. Django 1.3 was i..
I am fetching the current date & time using NOW() in mysql. I want to convert the date value into a varchar and concat it with another string. How do I do it?..
Suppose I have a n by 2 matrix and a function that takes a 2-vector as one of its arguments. I would like to apply the function to each row of the matrix and get a n-vector. How to do this in R?
For ..
To get a lot of information about a media file one can do
ffmpeg -i <filename>
where it will output a lot of lines, one in particular
Duration: 00:08:07.98, start: 0.000000, bitrate: 2080 kb..
I've got a PHP script that needs to invoke a shell script but doesn't care at all about the output. The shell script makes a number of SOAP calls and is slow to complete, so I don't want to slow down ..
I am developing a framework, where in I am a calling stored procedure with dynamically created parameters. I am building parameter collection at the runtime.
The problem occurs when I am passing a p..
I have a select list:
<select id="filter">
<option value="Open" selected="selected">Open</option>
<option value="Closed">Closed</option>
</select>
When I sel..
I'm trying to add a divider to a horizontal linear layout but am getting nowhere. The divider just doesn't show. I am a total newbie with Android.
This is my layout XML:
<RelativeLayout xmlns:and..
I have the following database table on a Postgres server:
id date Product Sales
1245 01/04/2013 Toys 1000
1245 01/04/2013 Toys 2000
1231 01/02/2013 Bicycle..
When you hover over a card in Trello and press Ctrl+C, the URL of this card is copied to the clipboard. How do they do this?
As far as I can tell, there is no Flash movie involved. I've got Flashbloc..
I am trying to use ELMAH to log errors in my ASP.NET MVC application, however when I use the [HandleError] attribute on my controllers ELMAH doesn't log any errors when they occur.
As I am guessing i..
I have a gulp rjs task that concatenates and uglifies all my custom .JS files (any non vendor libraries).
What i am trying to do, is exclude some files/directories from this task (controllers and dir..
I was given a MySQL database file that I need to restore as a database on my Windows Server 2008 machine.
I tried using MySQL Administrator, but I got the following error:
The selected file was g..
I want to be able to dynamically change what divs are show using radio button and jQuery - HTML:
<div id="myRadioGroup">
2 Cars<input type="radio" name="cars" checked="checked" value="..
Not sure what happened, but below is what the log is giving me when trying to access phpmyadmin, please help. Trying to debug a different problem and ran into this. Not really possible to revert back ..
basically an server instance is running at
somesite.com/production/folder/here?param=here&count=1
I want to point someite.com/demo to /production/folder/here so when user types somesite.com/pr..
I was under the assumption that if I disabled a div, all content got disabled too.
However, the content is grayed but I can still interact with it.
Is there a way to do that? (disable a div and get ..
Is there a way to use the jQuery UI Datepicker widget to select multiple dates?
All help is appreciated!
If its not posable to use the jquery UI datepicker then is there something similar that doe..
I would like to know how can I set a variable with another variable in jinja. I will explain, I have got a submenu and I would like show which link is active. I tried this:
{% set active_link = {{rec..
So I started writing tests for our Java-Spring-project.
What I use is JUnit and Mockito. It's said, that when I use the when()...thenReturn() option I can mock services, without simulating them or s..
Is it possible to instantiate an object at runtime if I only have the DLL name and the class name, without adding a reference to the assembly in the project? The class implements a interface, so once ..
I want to clear the file input in my form.
I know about setting the sources to the same method... But that method wont erase the selected file path.
Note: I would like to avoid having to reload the ..
Possible Duplicate:
Getting the ID of the element that fired an event using JQuery
I have many buttons with ID attribute.
<button id="some_id1"></button>
<button id="some_id..
I am trying to attach click event to anchor tags (coming from ajax) and block the default redirection. How can I do it in angular ?
<ul>
<li><a href="/abc"><p>abc</p&g..
I have radio buttons in HTML like this:
<td>
<input id="radio1" type="radio" name="correctAnswer" value="1">1</input>
<input id="radio2" type="radio" name="correctAnswer"..
rails generate migration AddRetweetsCountToTweet retweets_count:integer
Ok I use above line to create migration file that automatically generates code in the generated file to add a column to a mod..
What exactly is the difference between margin and padding in CSS? It really doesn't seem to serve much purpose. Could you give me an example of where the differences lie (and why it is important to kn..
I have a pod test-1495806908-xn5jn with 2 containers. I'd like to restart one of them called container-test. Is it possible to restart a single container within a pod and how? If not, how do I restart..
I recently moved to Python 3.5 and noticed the new matrix multiplication operator (@) sometimes behaves differently from the numpy dot operator. In example, for 3d arrays:
import numpy as np
a = np...
Is there any way to get milliseconds out of a timestamp in MySql or PostgreSql (or others just out of curiosity)?
SELECT CURRENT_TIMESTAMP
--> 2012-03-08 20:12:06.032572
Is there anything like t..
I am a beginning developer in Swift, and I am creating a basic app that includes a UITableView. I want to refresh a certain row of the table using:
self.tableView.reloadRowsAtIndexPaths(paths, withRo..
I'm trying to use event.stopPropagation() within a ReactJS component to stop a click event from bubbling up and triggering a click event that was attached with JQuery in legacy code, but it seems like..
I've searched other questions and, while this problem seems similar to a couple of others, nothing I've seen so far seems to address the issue that I'm having.
I have a div which contains a number of..
I got parameter and argument kind of mixed up and did not really pay attention to when to use one and when to use the other.
Can you please tell me? ..
I have this python script where I need to run gdal_retile.py,
but I get an exception on this line:
if Verbose:
print("Building internam Index for %d tile(s) ..." % len(inputTiles), end=' ..
I would like to quickly monitor some hosts using commands like ps,dstat etc using ansible-playbook. The ansible command itself perfectly does what I want, for instance I'd use:
ansible -m shell -a "p..
I already read it so many questions and answers about it but I can't still solve my problem...
I'm trying to create a function that deletes all the files with "xml" or "xsl" extension that has been c..
I am trying to play a video in android emulator
I have the video in my assets folder as well as the raw folder
But after doing some research still i cant play video in my emulator
i am working on and..
I'm trying to make a small program more robust and I need some help with that.
Scanner kb = new Scanner(System.in);
int num1;
int num2 = 0;
System.out.print("Enter number 1: ");
num1 = kb.nextInt();..
When written like this, it outputs text in blue:
printf "\e[1;34mThis is a blue text.\e[0m"
But I want to have format defined in printf:
printf '%-6s' "This is text"
Now I have tried several opt..
I was refactoring old code and encountered several IF conditions that were way too complex and long and I'm certain they can be simplified. My guess is that those conditions grew so much because of la..
I have an Email document which has a sent_at date field:
{
'sent_at': Date( 1336776254000 )
}
If this Email has not been sent, the sent_at field is either null, or non-existant.
I need to get th..
I am trying to select values from different table and inset it in to the temporary table.
I need a identity field in the temporary table. When I try to execute the following code it throws an error: ..
How to push a file from computer to an Android device having no SD Card in it. I tried:
C:\anand>adb push anand.jpg /data/local
3399 KB/s (111387 bytes in 0.032s)
C:\anand>adb push anand.jpg /d..
I am trying to load a csv file that has 14 columns like this:
StartDate, var1, var2, var3, ..., var14
when I issue this command:
systems <- read.table("http://getfile.pl?test.csv", header = TRU..
I want to create a default value for an attribute by defining it in ActiveRecord. By default everytime the record is created, I want to have a default value for attribute :status. I tried to do this:
..
I have a list of strings. Some of them are of the form 123-...456. The variable portion "..." may be:
the string "apple" followed by a hyphen, e.g. 123-apple-456
the string "banana" followed by a hy..
I want to concatenate Vue.js variable with image URL.
What I computed:
imgPreUrl : function() {
if (androidBuild) return "android_asset/www/";
else return "";
}
If I build for android:
&l..
I'm on a Mac. I have 7 columns in Sublime Text 3, each 300 lines each. If possible, I would like to select only the 4th column using a single keyboard shortcut.
Unsuitable options
ctrl + shift + u..
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..
How to split an array (which has 10 items) into 4 chunks, which contain a maximum of n items.
var a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'];
//a function splits it to four arrays.
consol..
I'm trying to get a screenshot of the phone screen as fast as possible.
Currently, I am doing:
adb shell screencap -p /sdcard/screencap.png && adb pull /sdcard/screencap.png
Howeve..
I want to parse date without timezone in JavaScript. I have tried:
new Date(Date.parse("2005-07-08T00:00:00+0000"));
Returns Fri Jul 08 2005 02:00:00 GMT+0200 (Central European Daylight Time)
new ..
I'm running Wordpress with: Nginx + PHP-FPM + APC + W3 Total Cache + PageSpeed.
After 3 days researching and configuring, I succeeded to make it work.
I configured PHP-FPM to run via 127.0.0.1:9000. ..
I am trying to build a simple custom CMS, but I'm getting an error:
Warning: mysqli_query() expects parameter 1 to be MySQLi, null given in
Why am I getting this error? All my code is already My..
I am working with Python3.2. I need to take a hex stream as an input and parse it at bit-level. So I used
bytes.fromhex(input_str)
to convert the string to actual bytes. Now how do I convert these ..
I am using the REPLACE function in oracle to replace values in my string like;
SELECT REPLACE('THE NEW VALUE IS #VAL1#','#VAL1#','55') from dual
So this is OK to replace one value, but what about ..
While calling a web service I get the following error:
The HTTP request is unauthorized with client authentication scheme 'NTLM'. The authentication header received from the server was 'NTLM'. The..
I am trying to learn Angular 2.
I would like to access to a child component from a parent component using the @ViewChild Annotation.
Here some lines of code:
In BodyContent.ts I have:
import {View..
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 know I can do git branch --all, and that shows me both local and remote branches, but it's not that useful in showing me the relationships between them.
How do I list branches in a way that shows w..
I have to make a Backup of the Program running from the file *.appref-ms
When i Opened the File GitHub.appref-ms using text editor i found
http://github-windows.s3.amazonaws.com/GitHub.application..
I'm having a bit of trouble getting a Python regex to work when matching against text that spans multiple lines. The example text is ('\n' is a newline)
some Varying TEXT\n
\n
DSJFKDAFJKDAFJDSAKFJADS..
I want to install and run Typescript (i.e. no global dependencies).
Here is my package.json file:
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
..
If we have a SELECT statement inside an IF EXISTS, does the execution stop as soon as it finds a record in the table? For example:
IF EXISTS(SELECT * FROM table1 WHERE Name='John' )
return 1
els..
I tried to insert values from one server to another server and I got the error:
Msg 7202, Level 11, State 2, Line 1 Could not find server
'SNRJDI\SLAMANAGEMENT' in sysservers. Execute sp_addlin..
Can anyone suggest how I embed a youtube channel into a webpage - I am getting conflicting information from various sites, ideally using the custom player if possible? thanks..
I'd been working on something, and decided it was completely screwed...after having committed some of it. So I tried the following sequence:
git reset --hard
git rebase origin
git fetch
git pull
git ..
When I am running my docker image on windows 10. I am getting this error:
standard_init_linux.go:190: exec user process caused "no such file or directory"
my docker file is:
FROM openjdk:8
EXPOSE..
I don't know how to use Maven at all. I've been developing for a couple years with Eclipse and haven't yet needed to know about it. However, now I'm looking at some docs that suggest I do the follow..
My date objects in JavaScript are always represented by UTC +2 because of where I am located. Hence like this
Mon Sep 28 10:00:00 UTC+0200 2009
Problem is doing a JSON.stringify converts the above ..
I am using dreamweaver to create a website and I thought of just using Photoshop to create backgrounds. I decided to do so only because in case I'd choose to change the button name easily by just edit..
I am trying to iterate through a string in order to remove the duplicates characters.
For example the String aabbccdef should become abcdef
and the String abcdabcd should become abcd
Here is what I ..
With react-router I can use the Link element to create links which are natively handled by react router.
I see internally it calls this.context.transitionTo(...).
I want to do a navigation. Not fro..
No clue how I can do this, since BS 4 doesn't support glyphicons. Do I set it up as a background or do I apply different positioning to a font-awesome icon?
This is my code so far:
_x000D_
_x000D_
..
I have a file called diff.txt. I Want to check whether it is empty.
I wrote a bash script something like below, but I couldn't get it work.
if [ -s diff.txt ]
then
touch empty.txt
rm f..
I do some form validation to ensure that the file a user uploaded is of the right type. But the upload is optional, so I want to skip the validation if he didn't upload anything and submitted the rest..
I am getting error:
"Lost connection to MySQL server at 'reading initial communication packet, system error: 0"
while I am going to connect my db.
If I am using localhost everything is working ..
I cleaned the whole project by deleting local directories like ~/.gradle, ~/.m2 ~./android and ~/workspace/project/.gradle and chosing File -> Invalidate Caches / Restart... in Android Studio.
Now ..
I'm working on a bootstrap site and after updating to bootstrap 2.2 from 2.0 everything worked except the popover.
The popovers still show up fine, but they don't show up on top of all other elements..
I want to get fling gesture detection working in my Android application.
What I have is a GridLayout that contains 9 ImageViews. The source can be found here: Romain Guys's Grid Layout.
That file I ..
How do I get out of nested for or loop in vb.net?
I tried using exit for but it jumped or breaked only one for loop only.
How can I make it for the following:
for each item in itemList
for eac..
I just want to hide rows in SSRS report having Zero Quantity..
There are following multiple Quantity Columns like Opening Stock , Gross Dispatched,Transfer Out, Qty Sold, Stock Adjustment and Closing ..
I'm trying to get my login form to only validate if only numbers were inputted. I can it to work if the input is only digits, but when i type any characters after a number, it will still validate etc...
I'm reading through some old code at work, and have noticed that there are several views with an order by 1 clause. What does this accomplish?
Example:
Create view v_payment_summary AS
SELECT A.PA..
I have got a script with some commands such as Write-Host "Server1". How can I export it to a file?
When I tried with script > export.txt it didn't work...
How do I install g++ for Fedora Linux? I have been searching the dnf command to install g++ but didn't find anything.
How do I install it?
I have already installed gcc..
I am manipulating a data frame using the reshape package. When using the melt function, it factorizes my value column, which is a problem because a subset of those values are integers that I want to b..
I can't figure out when this started to happen, but the result is - 127.0.0.1 is not working on any port from anywhere (for example, browser says Unable to connect). Here are the results of my researc..
I developed a Windows service using C#.NET to generate PDF report. To generate PDF file I am using a third party dll. The application is running in my Windows XP platform. When I deployed the service ..
document.getElementById("elementId").style.display="none"
is used in JavaScript to hide an element. But in jQuery,
$("#elementId").hide();
is used for the same purpose. Which way is more efficien..
After installing TeamViewer, I have changed the wampserver port to 8080, so the address is http://localhost:8080.
For the host file located at C:\WINDOWS\system32\drivers\etc\, I have also made the c..
I am using nginx on Rackspace cloud following a tutorial and having searched the net and so far can't get this sorted.
I want www.mysite.com to go to mysite.com as normal in .htaccess for SEO and oth..
I want to know if it is possible to use the pandas to_csv() function to add a dataframe to an existing csv file. The csv file has the same structure as the loaded data. ..
I get the following error when running a c program:
*** glibc detected *** ./a.out: double free or corruption (!prev): 0x080b8008 ***
I believe this is due to free() being called at the end of the ..
I'm using extending application class on Android to share my data across the entire app.
I can use getApplication() method from all my activities.
However, there are certain custom helper classes I ..
I want to develop a SDK that encapsules the OAuth 2.0 functions. I have checked the differences between OAuth 1.0 & 2.0, and I have some confusion on Authorization Header (1.0 and
2.0), OAuth 1...
Is it possible to change the default background color of a select list option on hover?
HTML:
<select id="select">
<option value="1">One</option>
<option value="2">Tw..
Is the following the most efficient in SQL to achieve its result:
SELECT *
FROM Customers
WHERE Customer_ID NOT IN (SELECT Cust_ID FROM SUBSCRIBERS)
Could some use of joins be better and achie..
I have a list which contains numbers and letters in string format.
mylist=['1','orange','2','3','4','apple']
I need to come up with a new list which only contains numbers:
mynewlist=['1','2','3','..
I searched and tried many ng-xxxx kind of options but couldn't find the one..
I just want to call some function in the controller when radio button is selected.
So it might be similar to following..(..
In LaTeX you can easily reference a section by using \label{} next to a section and then \ref{} to create the reference. However, the reference only includes the number of the section, or the page wit..
I have a .txt file with the following lines in it:
23;Pablo;SanJose
45;Rose;Makati
I have this program:
file = open("C:/Users/renato/Desktop/HTML Files/myfile2.txt")
def query(id):
for line i..
I want to extract the first (or last) n characters of a string. This would be the equivalent to Excel's LEFT() and RIGHT(). A small example:
# create a string
a <- paste('left', 'right', sep = '')..
According to the Node.js manual:
If you want the root of your module's export to be a function (such as
a constructor) or if you want to export a complete object in one
assignment instead of b..
I want to save my Edit to Database and I am using Entity FrameWork Code-First in ASP.NET MVC 3 / C# but I am getting errors. In my Event class, I have DateTime and TimeSpan datatypes but in my databas..
I tried to run simple sql command:
select * from site_adzone;
and I got this error
ERROR: permission denied for relation site_adzone
What could be the problem here?
I tried also to do select f..
I've been having a lot of trouble attaching the click event to a JQuery object before adding it to the DOM.
Basically I have this button that my function returns, then I append it to the DOM. What I ..
I need to download the source code of the project Spring data graph example into my box. It has public read-only access. Is there is an extremely fast way of downloading this code?
I have no idea of ..
How can I export a DataTable to Excel in C#? I am using Windows Forms. The DataTable is associated with a DataGridView control. I have to export records of DataTable to Excel...
In my experience, getting dates/times right when programming is always fraught with danger and difficulity.
Ruby and Rails have always eluded me on this one, if only due to the overwhelming number o..
I have a read large csv file into a data frame. Data in the csv file are from multiple web sites representing user information. For example here is the structure of the data frame.
user_id, number_of..
I have number like this in my html
<div class="number">950000</div>
and I want jQuery change it to
<div class="number">Rp. 950.000</div>
How can I do that in jQUery?..
I am currently practicing matplotlib. This is the first example I practice.
#!/usr/bin/python
import matplotlib.pyplot as plt
radius = [1.0, 2.0, 3.0, 4.0]
area = [3.14159, 12.56636, 28.27431, 50.2..
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..
I tried making a navigation between fragments. I've got the NewFragment.java with the new fragment working. My problem is:
How do I make this onClickListener run NewFragment.java correctly?
button...
I created a service and want to run this service always until my phone restarts or force closed. The service should run in background.
Sample code of created service and start services:
Start the s..
I have a pandas dataframe. I want to print the unique values of one of its columns in ascending order. This is how I am doing it:
import pandas as pd
df = pd.DataFrame({'A':[1,1,3,2,6,2,8]})
a = df['..
I'm trying to use Jsch to establish an SSH connection in Java. My code produces the following exception:
com.jcraft.jsch.JSchException: UnknownHostKey: mywebsite.com.
RSA key fingerprint is 22:fb:ee..
I'm looking to place a video in an HTML5 page that will begin playing on page-load, and once completed, loop back to the beginning without a break. The video should also NOT have any controls associat..
Given a table with a datetime column, how do I query for rows where the date matches the value I specify but ignores the time portion?
For example, select * from sales where salesDate = '11/11/2010'
..
In the example below I have a ListBox with dozens of font names in it.
I would have thought it would automatically have a vertical scrollbar on it so that you can select ANY font, not just the first ..
I have an existing database using PHP, MySQL and phpMyAdmin.
When users become a member on my website, I need the system to create a unique membership number for them using a five digit number. for e..
I have an AngularJS service that I want to initialize with some asynchronous data. Something like this:
myModule.service('MyService', function($http) {
var myData = null;
$http.get('data.jso..
I am working on a function to download an image from a web server, display it on the screen, and if the user wishes to keep the image, save it on the SD card in a certain folder. Is there an easy way ..
I have an unordered list:
<ul id="myList"></ul>
<div id="loadMore">Load more</div>
I wish to populate this list with list items from another HTML file:
<li>One</li..
I have a table of tags and want to get the highest count tags from the list.
Sample data looks like this
id (1) tag ('night')
id (2) tag ('awesome')
id (3) tag ('night')
using
SELECT COUNT(*), `T..
I've an UPDATE statement which can update more than million records. I want to update them in batches of 1000 or 10000. I tried with @@ROWCOUNT but I am unable to get desired result.
Just for testin..
I am trying to explain to a non-developer the difference between an API an SDK. I need to explain why a commercial fingerprint software vendor will likely not provide an SDK, although they may certain..
Seeing as how the three primary colors are cyan, magenta and yellow (CMY), why do monitors and almost all the GUI components out there use red, green and blue (RGB)? (If I'm not mistaken, printers use..
I am using jinja2, and I want to call a python function as a helper, using a similar syntax as if I were calling a macro. jinja2 seems intent on preventing me from making a function call, and insists ..
this question is not the same as Does the shell support sets?
i know lots of script language support list structure, such as python, python, ruby, and javascript, so what about linux shell?
does she..
I am using angular's $http.jsonp() request which is successfully returning json wrapped in a function:
var url = "http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callba..
Since the Android developers recommend to use the HttpURLConnection class, I was wondering if anyone can provide me with a good example on how to send a bitmap "file" (actually an in-memory stream) vi..
In my Java application, I want to run a batch file that calls "scons -Q implicit-deps-changed build\file_load_type export\file_load_type"
It seems that I can't even get my batch file to execute. I'm ..
When should I use an interface and when should I use a base class?
Should it always be an interface if I don't want to actually define a base implementation of the methods?
If I have a Dog and Cat ..
I'm attempting to add this code to a dynamically created div element
style = "width:330px;float:left;"
The code in which creates the dynamic div is
var nFilter = document.createElement('div');
n..
I could be wrong (just let me know and I'll delete the question) but it seems python won't respond to
for n in range(6,0):
print n
I tried using xrange and it didn't work either. How can I impl..
The question is as follows:
How can I get the server path to the web directory in Symfony2 from inside the controller (or from anywhere else for that reason)
What I've already found (also, by search..
I have followed these instructions below to upload a project.
Global setup:
Download and install Git
git config --global user.name "Your Name"
git config --global user.email [email protected]
..
I tried working with Apiary and made a universal template to send JSON to mock server and have this code:
package main
import (
"encoding/json"
"fmt"
"github.com/jmcvetta/napping"
"l..
Possible Duplicate:
Select values of checkbox group with jQuery
In HTML I have a set of checkboxes grouped together by a class. I want to get an array in jQuery containing all the checkboxe..
I have installed MySQL Community Edition 5.5 on my local machine and I want to allow remote connections so that I can connect from external source.
How can I do that?..
I'm trying to get the text from a text box.
I have 2 input text boxes that are not in a form, and I'm trying to retrieve the value and store it in a variable.
This code returns undefined in the a..
I've noticed that the Linux kernel code uses bool, but I thought that bool was a C++ type. Is bool a standard C extension (e.g., ISO C90) or a GCC extension?..
Can someone explain what the difference is between classification and clustering in data mining?
If you can, please give examples of both to understand the main idea...
I would like to join a js variable together with another to create another variable name... so it would be look like;
for (i=1;i<=2;i++){
var marker = new google.maps.Marker({
position:"myLatl..
I have a scenario. (Windows Forms, C#, .NET)
There is a main form which hosts some user control.
The user control does some heavy data operation, such that if I directly call the UserControl_Load me..
I am trying to save data across orientation changes. As demonstrated in the code below, I use onSaveInstanceState() and onRestoreInstanceState(). I try to get the saved value and I check if it is the ..
I'm using the following Javascript to restrict a text field on my website to only accept numerical input, and no other letters or characters. The problem is, it REALLY rejects all other key inputs, li..
I am trying to add a table with space between cell as the background colour of the cell is white and the background color of the table is blue, you can easily see that padding and margin are not worki..
In several Tasks, I reference jars in my home folder.
Is there a better way to get Environment Variables than
ENV = System.getenv()
HOME = ENV['HOME']
task copyToServer(dependsOn: 'jar', type: Copy..
Coming from a C and C++ background, I found judicious use of typedef to be incredibly helpful. Do you know of a way to achieve similar functionality in Java, whether that be a Java mechanism, pattern..