All problems (regardless of currency) with making change from a given amount of currency into a specific number of coins and bills of varying denominations.
I found a piece of code that I was writing for interview prep few months ago.
According to the comment I had, it was trying to solve this problem:
Given some dollar value in cents (e.g. 200 = 2 d..
I have a page with several bootstrap progress bars. Setting their values initially works fine. Though I would like the progress bars to animate/transition to their specific states when a user opens th..
Now that the Android Design Support Library is out, does anyone knows how to implement expanded Fab menu with it, like the fab on Inbox App?
Should look like this:
..
I am trying to display a "leaderboard" table based on JSON data.
I have read a lot about the JSON format and overcome some initial obstacles, but my Javascript knowledge is very limited and I need he..
I am trying to create and save a file to the root directory of my site, but I don't know where its creating the file as I cannot see any. And, I need the file to be overwritten every time, if possible..
I have to calculate some floating point variables and my colleague suggest me to use BigDecimal instead of double since it will be more precise. But I want to know what it is and how to make most out ..
I want to merge two branches that have been separated for a while and wanted to know which files have been modified.
Came across this link: http://linux.yyz.us/git-howto.html which was quite useful.
..
When you google for this exception: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty, multiple results appear. However there is no definitive solution, on..
A 64-bit double can represent integer +/- 253 exactly.
Given this fact, I choose to use a double type as a single type for all my types, since my largest integer is an unsigned 32-bit number.
But now ..
I am using SSH to clone a git repo to my web server, but every time I get this error
$git clone [email protected]:aleccunningham/marjoram.git
Cloning into marjoram...
Host key verification failed.
I h..
First -- I do not believe this is a duplicate issue. I've searched for same or similar problems on SO extensively, and due to the nature of troubleshooting before asking, I believe this problem is uni..
I am new with spring integration and working in spring integration http module for my project requirement. I am sending request from outbound gateway as a http client.
I am trying to initiate a requ..
Is there a method similar to equals() that expresses "not equal to"?
An example of what I am trying to accomplish is below:
if (secondaryPassword.equals(initialPassword))
{
JOptionPane.showMess..
I have heard of HTTP keep-alive but for now I want to open a socket connection with a remote server.
Now will this socket connection remain open forever or is there a timeout limit associated with it ..
This is from the book Assembly Language Step By Step, Jeff Duntemann:
Here’s the quick tour: A bit is a single binary digit, 0 or 1. A byte
is 8 bits side by side. A word is 2 bytes side by si..
I have a UITableView where the selectionStyle is set to UITableViewCellSelectionStyleNone because I don't want any visible change when a cell is tapped, but when it is in editing mode I do want the th..
I really haven't found normal example of PHP file where MySQL transactions are being used. Can you show me simple example of that?
And one more question. I've already done a lot of programming and d..
Is there an easy way to run a MySQL query from the Linux command line and output the results in CSV format?
Here's what I'm doing now:
mysql -u uid -ppwd -D dbname << EOQ | sed -e 's/ ..
I am running Ubuntu 13.10, and I'm pretty new to Linux. I tried:
$ sudo apt-get install chkconfig
Package chkconfig is not available, but is referred to by another package.
This may mean that..
I have an url passing parameters use json_encode each values like follow:
$json = array
(
'countryId' => $_GET['CountryId'],
'productId' => $_GET['ProductId'],
'status' => $_G..
How do I verify the existence of an object in JavaScript?
The following works:
if (!null)
alert("GOT HERE");
But this throws an Error:
if (!maybeObject)
alert("GOT HERE");
The Error:
..
I am using scikit-learn for classification of text documents(22000) to 100 classes. I use scikit-learn's confusion matrix method for computing the confusion matrix.
model1 = LogisticRegression()
mode..
I have a simple python script, that has some functions that run in a loop (I'm taking sensor readings).
while True:
print "Doing a function"
If the keyboard is pressed I'd like to print "key pr..
I have got a price field to display which sometimes can be either 100 or 100.99 or 100.9, What I want is to display the price in 2 decimal places only if the decimals are entered for that price , for ..
I've encountered this apparently common problem and have been unable to resolve it.
If I call my WCF web service with a relatively small number of items in an array parameter (I've tested up to 50), ..
How do I write a simple--bare minimum needed for it to work--test application that illustrates how to use IPC/Named Pipes?
For example, how would one write a console application where Program 1 says ..
I wonder what is the difference between the following two code snippets:
<label>Input here : </label>
<input type='text' name='theinput' id='theinput'/>
and
<label for='theinput'..
In the tutorial there is an example for finding prime numbers:
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print(n, 'equals', x, '*', ..
I was reading the documentation for the Redux library and it has this example:
In addition to reading the state, container components can dispatch actions. In a similar fashion, you can define a f..
I am having a real hard time finding a way to start, stop, and restart a thread in Java.
Specifically, I have a class Task (currently implements Runnable) in a file Task.java. My main application nee..
I have a StringBuilder object,
StringBuilder result = new StringBuilder();
result.append(someChar);
Now I want to append a newline character to the StringBuilder. How can I do it?
result.append("/..
I added the following section in project.json.
"commands": {
"run": "run server.urls=http://localhost:8082",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --serv..
I'm just starting to use NLTK and I don't quite understand how to get a list of words from text. If I use nltk.word_tokenize(), I get a list of words and punctuation. I need only the words instead. Ho..
I'm using AngularUI's routing and I'd like to do a ng-class="{active: current.state}" but I'm unsure how to exactly detect the current state in a directive like this...
How do I wrap long lines in Python without sacrificing indentation?
For example:
def fun():
print '{0} Here is a really long sentence with {1}'.format(3, 5)
Suppose this goes over the 79 cha..
Sometimes I get Oracle connection problems because I can't figure out which tnsnames.ora file my database client is using.
What's the best way to figure this out? ++happy for various platform soluti..
I need to create a Set with initial values.
Set<String> h = new HashSet<String>();
h.add("a");
h.add("b");
Is there a way to do this in one line of code? For instance, it's useful for a..
In Django model QuerySets, I see that there is a __gt and __lt for comparative values, but is there a __ne or != (not equals)? I want to filter out using a not equals. For example, for
Model:
bool..
I would like to read a text file in R, line by line, using a for loop and with the length of the file. The problem is that it only prints character(0). This is the code:
fileName="up_down.txt"
con=fi..
When trying to stop or restart a docker container I'm getting the following error message:
$ docker restart 5ba0a86f36ea
Error response from daemon: Cannot restart container 5ba0a86f36ea: [2] Contain..
Is there a printf width specifier which can be applied to a floating point specifier that would automatically format the output to the necessary number of significant digits such that when scanning th..
I'm trying to use Jenkins (Global) environment variables in my xcopy script.
${WORKSPACE} doesn't work
"${WORKSPACE}" doesn't work
'${WORKSPACE}' doesn't work
..
I have docker host and inside I have one container.
The docker host is binding the port on IPv6 interface only, not on IPv4.
This is the output
tcp 0 0 0.0.0.0:22 0.0.0.0:*..
I want to replace word "blue" to "red" in all text files named as 1_classification.dat, 2_classification.dat and so on. I want to edit the same file so I tried this code but it does not work. Where am..
So I'm trying trying to use a function defined in another C (file1.c) file in my file (file2.c). I'm including the header of file1 (file1.h) in order to do this.
However, I keep getting the following..
I have written a c++ program , I want to know how to calculate the time taken for execution so I won't exceed the time limit.
#include<iostream>
using namespace std;
int main ()
{
int st[..
I'm trying to use the below code to calculate the average of a set of values that a user enters and display it in a jTextArea but it does not work properly. Say, a user enters 7, 4, and 5, the program..
I have an Asp.Net MVC 5 website with EntityFramework codefirst approach in a shared hosting plan. It uses the open source WebbsitePanel for control panel and its SQL Server panel is somewhat limited. ..
I have two dataframes with the following column names:
frame_1:
event_id, date, time, county_ID
frame_2:
countyid, state
I would like to get a dataframe with the following columns by joining (left..
In R, mean() and median() are standard functions which do what you'd expect. mode() tells you the internal storage mode of the object, not the value that occurs the most in its argument. But is there..
I'm looking for a list of all locales and their short codes for a PHP application I am writing. Is there much variation in this data between platforms?
Also, if I am developing an international appli..
I can't seem to login to my tutorial database development environment:
Ayman$ mysql -u blog -p blog_development
Enter password:
ERROR 1049 (42000): Unknown database 'blog_development'
I can login..
I try to set background color programmatically but when I set every one of my colors, the background being black but with any color background being white like the application theme.
View someView = ..
I am having trouble with angularjs directives finding child DOM elements with the injected angular element.
For example I have a directive like so:
myApp.directive('test', function () {
return {..
Is there a way to connect between the values under HKEY_USERS to the actual username?
I saw some similar questions, but most (if not all) talks about C# code, and my need is in VBScript...
I would like to check to see if I have an Internet connection on iOS using the Cocoa Touch libraries or on macOS using the Cocoa libraries.
I came up with a way to do this using an NSURL. The way I d..
How do I "dynamically" edit JavaScript code in the Chrome debugger? It's not for me, so I don't have access to the source file. I want to edit code and see what effects they have on the page, in this ..
In the case of following string to be parsed.
ford mustang,10,blue~~?bugatti veyron,13,black
I want to replace the ~~? with a carriage return
Replacing with \n just adds the string "\n"
How can t..
I need help in trying to execute an executable from my C# application.
Suppose the path is cPath, the EXE is HHTCtrlp.exe and the parameter that has to be passed is cParams.
How would I go about this..
Suppose I have two Python dictionaries - dictA and dictB. I need to find out if there are any keys which are present in dictB but not in dictA. What is the fastest way to go about it?
Should I conver..
I have two DIVs that I need to position exactly on top of each other. However, when I do that, the formatting gets all screwed up because the containing DIV acts like there is no height. I think this ..
I am creating a program that will download a .jar (java) file from a web server, by reading the URL that is specified in the .jad file of the same game/application. I'm using Python 3.2.1
I've manage..
On our internal network, we use a self-signed CA certificate. This has worked fine for years, in both Safari and our iOS product, all the way through iOS 10. We simply install the CA certificate on an..
Given following array:
var arr = [undefined, undefined, 2, 5, undefined, undefined];
I'd like to get the count of elements which are defined (i.e.: those which are not undefined). Other than loopi..
Looking to pass a list of User IDs to return a list names. I have a plan to handle the outputed names (with a COALESCE something or other) but trying to find the best way to pass in the list of user I..
I've got safe/sanitized HTML saved in a DB table.
How can I have this HTML content written out in a Razor view?
It always escapes characters like < and ampersands to &...
My code that I tried is as follows:
var dataO = new Object();
dataO.numberId = 1;
dataO.companyId = 531;
$.ajax({
type: "POST",
url: "TelephoneNumbers.aspx/DeleteNumber",
data: "{numberId:1,compa..
For i = 1 To 20
'' select the cell in question
Cells.Find(...).Select
'' get the cell address
CellAddr = Selection.Address(False, False, xlR1C1)
Next
The above is my code for searchin..
I coded a php page that displays information from a mysql database neatly into tables. I would like to hide empty table rows with an onLoad event handler.
Here is a sample table with code that hides ..
I have a user class that has 16 attributes, things such as firstname, lastname, dob, username, password etc... These are all stored in a MySQL database and when I want to retrieve users I use a Result..
From what I've read in the past, you're encouraged not to change the priority of your Windows applications programmatically, and if you do, you should never change them to 'Realtime'.
What does the 'R..
I was trying to check whether the port is opened or not using powershell like follows.
(new-object Net.Sockets.TcpClient).Connect("10.45.23.109", 443)
This method works , but the output is not user..
In Swing you can simply use setDefaultCloseOperation() to shut down the entire application when the window is closed.
However in JavaFX I can't find an equivalent. I have multiple windows open and I ..
I have a phone number(string), e.g. "+123-456-7890", that I want to turn into a list that looks like: [+, 1, 2, 3, -, ...., 0].
Why? So I can go iterate through the list and remove all the symbols, ..
I need to do auto-correlation of a set of numbers, which as I understand it is just the correlation of the set with itself.
I've tried it using numpy's correlate function, but I don't believe the re..
There is a certain PHP function for redirecting after some time. I saw it somewhere but can't remember. It's like the gmail redirection after logging in. Please, could anyone remind me?..
Possible Duplicate:
How can I format numbers as money in JavaScript?
I have a form with some simple JavaScript to perform an instant calculation. My problem is that I'm struggling to format..
I currently have a CSV file which, when opened in Excel, has a total of 5 columns. Only columns A and C are of any significance to me and the data in the remaining columns is irrelevant.
Starting on ..
I have a string
string a = "abc,xyz,wer";
Now, I need a part of this string like
string b = "abc";
I need everything before the first comma.How shall I get it?..
First, as this leads to my question, I'll start by noting that I've worked with XML a fair bit in PowerShell, and like how I can read data from XML files, quickly, into arrays of custom objects. For e..
I've read the documentation on WideCharToMultiByte, but I'm stuck on this parameter:
lpMultiByteStr
[out] Pointer to a buffer that receives the converted string.
I'm not quite sure how to properly ..
How do I create a HTML table from a PHP array? A table with heading as 'title', 'price', and 'number'.
$shop = array(
array("rose", 1.25, 15),
array("daisy", 0.75, 25),
array("orchid",..
When I attempt to run "mvn generate-sources" this is my output :
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J:..
I'm trying to create an array of structs. Is the code below valid? I keep getting an expected primary-expression before '{' token error.
int main() {
int pause;
struct Customer {
int uid;
..
Consider:
>>> r"what"ever"
SyntaxError: invalid syntax
>>> r"what\"ever"
'what\\"ever'
So how do we get the quote, but not the slash?
And please don't suggest r'what"ever', becau..
I use SqlDataReader.GetValue method to read values from DB:
Log.WriteLine("Value of CompanyName column:" + thisReader.GetValue(1));
As parameter GetValue get index of column.
How could I specify C..
Here is a gross oversimplification of an intense setup I am working with. table_1 and table_2 both have auto-increment surrogate primary keys as the ID. info is a table that contains information about..
I am using Python 2.7 and trying to get PyBrain to work.
But I get this error even though scipy is installed -
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
..
I’m trying to prevent the browser from using the :hover effect of the CSS, via JavaScript.
I have set the a and a:hover styles in my CSS, because I want a hover effect, if JS isn’t available. But..
I have a project with git, and I just want to clone or pull a specific directory, like myproject/javascript just like subversion does.
make some changes, commit and push back again.
It's possible?..
The div inside another div picture and code below. Because there will be text and images of the parent div. And red div will be the last element of the parent div.
<div style="width: 200px; heig..
Is there a nicer way of converting a number to its alphabetic equivalent than this?
private String getCharForNumber(int i) {
char[] alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
if (..
Is it possible to draw only a table with matplotlib? If I uncomment the line
plt.bar(index, data[row], bar_width, bottom=y_offset, color=colors[row])
of this example code, the plot is still visibl..
How can we disable Chrome's autofill feature on certain <input>s to prevent them from being automatically populated when the page loads?
At the same time I need to keep autocomplete enabled, s..
I'm trying to read in a string representation of a Tuple from a file, and add the tuple to a list. Here's the relevant code.
raw_data = userfile.read().split('\n')
for a in raw_data :
print a
..
public class PricePublicModel
{
public PricePublicModel() { }
public int PriceGroupID { get; set; }
public double Size { get; set; }
public double Size2 { get; set; }
public int[]..
I have a div with a width of 250px. When the innertext is wider than that i want it to break down. The div is float: left and now has an overflow. I want the scrollbar to go away by using word-wrappin..
I can't seem to figure out the Chrome debugging tool.
I have chrome version 21.0.1180.60 m.
Steps I took:
I pressed ctrl-shift-i to bring up the console.
Clicked on Sources then select the relevan..
I'm trying to create an overlay that overlays a page with a spinner in the middle. What's the simplest way to accomplish this? I only need to worry about IE 8 and above...
I have 2 tables. tbl_names and tbl_section which has both the id field in them. How do I go about selecting the id field, because I always get this error:
1052: Column 'id' in field list is ambiguous..
I want to write the body of a request with XML content-type but I don't know how with HttpClient Object ( http://hc.apache.org/httpclient-3.x/apidocs/index.html )
DefaultHttpClient httpClient = new D..
I have the following data frame in R:
> str(df)
'data.frame': 545227 obs. of 15 variables:
$ ykod : int 93 93 93 93 93 93 93 93 93 93 ...
$ yad : Factor w/ 42 levels "BAKUGAN","BARBIE",..: ..
How can you have a hidden field with simple form?
The following code:
= simple_form_for @movie do |f|
= f.hidden :title, "some value"
= f.button :submit
results in this error:
undefined metho..
How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:
<input id="first" value="1/1/2000"/>
<input id="second" value="1/1/2001"/>
&..
If i have a string is there a built in function to sort the characters or would I have to write my own?
for example:
string word = "dabc";
I would want to change it so that:
string sortedWord = "..
I have a php page that echos out rows from a database. I want to call it via jquery/ajax every 30 seconds. But I also want to be able to call the page at any time so that if I add a record via the for..
I have created Windows Application. In this, I have multiple tables in dataset, now I want to bind that to a single DataGridView. Can anybody help me?..
I have a file called tester.py, located on /project.
/project has a subdirectory called lib, with a file called BoxTime.py:
/project/tester.py
/project/lib/BoxTime.py
I want to import BoxTime from..
I would like to prevent further processing on an object if it is null.
In the following code I check if the object is null by either:
if (!data.Equals(null))
and
if (data != null)
However, I re..
I am trying to add a width to a div, but I seem to be running into a problem because it has no content.
Here is the CSS and HTML I have so far, but it is not working:
CSS
body{
margin:0 auto;
width:10..
I'm trying to specify a query in my model
$this->db
->select('*')
->from('library')
->where('library.rating >=', $form['slider'])
->where('library.vo..
I have a string column COL1 when I am doing this
SELECT TO_CHAR(TO_DATE(COL1,'dd-mon-yy'), 'mm/dd/yyyy')
FROM TABLE1
The data in COL1 is in dd-mon-yy, eg: 27-11-89 and 89 is 1989 but the select ret..
What's the best tool for viewing and editing a merge in Git? I'd like to get a 3-way merge view, with "mine", "theirs" and "ancestor" in separate panels, and a fourth "output" panel.
Also, instructio..
I have exported database from Oracle SQL developer tool into .sql file. Now I want to run this file which is of size 500+ MB.
I read about running scripts here, but I didn't understand the way. Is th..
Does anyone know how to change the dimensions of each page on an Acrobat document.
Also how can I see the dimensions of each page seperately??
For example I have a 3 pages document. The first 2 pages..
I have a small application that gives the current location: longitude and latitude.
Now I have to browse to google maps with the longitude and latitude.
Please suggest how I can do this...
I need to change the contents of dropdown B based on the selection in dropdown A using javascript. There are no db queries involved--I know beforehand what the contents of B should be given the choic..
I often need to kill a process during programming.
The way I do it now is:
[~]$ ps aux | grep 'python csp_build.py'
user 5124 1.0 0.3 214588 13852 pts/4 Sl+ 11:19 0:00 python csp_build.py..
I am using MVC and I am still new with MVC. Can anyone tell me if you can fill a drop down list with data on selection of another drop down list.
I want to use Jquery to avoid postbacks and therefore..
I'm building a small CMS in Laravel and I tried to show the content (which is stored in the DB). It is showing the HTML tags instead of executing them. Its like there is an auto html_entity_decode for..
Trying to create a macro which can be used for print debug messages when DEBUG is defined, like the following pseudo code:
#define DEBUG 1
#define debug_print(args ...) if (DEBUG) fprintf(stderr, arg..
I am new to phonegap. I have prepared one sample application. My application has 2 pages, the first page has one button, when clicked the second page will open. It is working fine using the following
..
I am generating some table as follow:
\begin{tabular}[l]{|l|l|l|}
\hline
Input & Output& Action return \\
\hline
\hline
DNF & simulation & jsp\\
\hline
\end{tabular}
How can can I..
I have declared a long string in string.xml of an application.
Declared like this
<string name="terms">PLEASE READ THESE TERMS OF USE CAREFULLY BY ACCESSING THIS .................</string..
Tried to run my existing app on iOS9 but getting failure while using AFURLSessionManager.
__block NSURLSessionDataTask *task = [self.sessionManager dataTaskWithRequest:request completionHandler:^(NSU..
I have ActionBarActivity with NavigationDrawer and use support_v7 Toolbar as ActionBar. In one of my fragments toolbar has custom view. In other fragments Toolbar should show title.
How get Toolbar i..
With all the hype it seems really hard to find reliable information on when to use this. So I pose the following questions, and I'm sorry if these are really dumb questions in advance:
Should I use ..
On my website I use reset.css. It adds exactly this to list styles:
ol, ul {
list-style: none outside none;
}
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote,..
I'd like to use Aptana Studio for Rails development under Windows. I currently have different dev tools & ide's up and running (like git/ruby/jdk) and I'd like to install Aptana Studio as well but..
I'm building a web application that will is going to manipulate (pad, mix, merge etc) sound files and I've found that sox does exactly what I want. Sox is a linux command line program and I'm feeling ..
I'm working on a dockerfile.
I just realised that I've been using FROM with indexed images all along.
So I wonder:
How can I use one of my local (custom) images as my base (FROM) image without push..
I've started programming today and have this issue with Python. It's pretty dumb but I can't figure out how to do it. When I use the print command, it prints whatever I want and then goes to a differe..
I am new in AngularJs, ng-click is not working as expected. I searched on the internet , Follow the tutorial , (that was working) - but this is not working!!!
My Code:
<div class="row" ng:repeat..
I was converting my projects from VS2010 to VS2012.But I am getting an _MSC_VER linker error in certain projects. After a long surfing through google I found out that the issue is due to linking of a ..
I am new to Qt, and I am trying to create a simple GUI Application that displays an image once a button has been clicked on.
I can read the image in a QImage object, but is there any simple way to ca..
I'm new to Python, so this is probably a simple scoping question. The following code in a Python file (module) is confusing me slightly:
if __name__ == '__main__':
x = 1
print x
In other langu..
I have a string. I want to generate all permutations from that string, by changing the order of characters in it. For example, say:
x='stack'
what I want is a list like this,
l=['stack','satck','s..
Considering that every command is run in its own shell, what is the best way to run a multi-line bash command in a makefile? For example, like this:
for i in `find`
do
all="$all $i"
done..
I want to remove constraints from my table. My query is:
ALTER TABLE `tbl_magazine_issue`
DROP CONSTRAINT `FK_tbl_magazine_issue_mst_users`
But I got an error:
#1064 - You have an error in you..
I currently figure out the similar is both using internet protocol (HTTP) to exchange data between consumer and provider.
The difference is:
SOAP is a XML-based message protocol, while REST is an ..
A curious thing happens in Java when you use an abstract class to implement an interface: some of the interface's methods can be completely missing (i.e. neither an abstract declaration or an actual i..
I am using R and need to select rows with aged (age of death) less than or equal to laclen (lactation length). I am trying to create a new data frame to only include rows/ids whereby the value of colu..
I'm not too sure how to go about getting the external IP address of the machine as a computer outside of a network would see it.
My following IPAddress class only gets the local IP address of the mac..
Possible Duplicate:
How do I do variable variables in Python?
I have a variable with a string assigned to it and I want to define a new variable based on that string.
foo = "bar"
foo = "s..
I want to write a program for a school java project to parse some CSV I do not know. I do know the datatype of each column - although I do not know the delimiter.
The problem I do not even marginally..
I switched to master after developing on a branch for a long time. The log shows:
Your branch is behind 'origin/master' by 167 commits, and can be fast-forwarded.
I tried:
git checkout HEAD
I..
I want users on the site to be able to download files whose paths are obscured so they cannot be directly downloaded.
For instance, I'd like the URL to be something like this: http://example.com/down..
I want to know if a class can inherit from a class and an interface.
The example code below doesn't work but I think it conveys what I want to do.
The reason that I want to do this is because at my c..
I would like to compile my Java program in Eclipse but not to run it. I can't understand how to do it.
How can I compile a Java program to .class files in Eclipse without running it?..
I was calculating eigenvectors and eigenvalues of a matrix in NumPy and just wanted to check the results via assert(). This would throw a ValueError that I don't quite understand, since printing those..
I use .htaccess to route all of my traffic to a single index.php file. The code below to directs traffic, but for some reason it doesn't work with the back button. I don't know what to do to get the b..
If I want to store the username and password to be used inside an Android application, what is the best way to do it? Is it through the preferences screen (but what if the user misses this?), or pop u..
Is there a way to search, from a string, a line containing another string and retrieve the entire line?
For example:
string =
qwertyuiop
asdfghjkl
zxcvbnm
token qwerty
asdfghj..
I am trying to write an integration test where our test launches an embedded HTTPS server using Simple. I created a self-signed certificate using keytool and am able to access the server using a brows..
I have this thing I m trying to do. I have a main picture of a map and within that map there are regions. These regions have hot spots on them so you can click them and it will replace the whole map w..
Is there a simple sleep function in Visual Basic that doens't involve thread.
Something similiar like there exists in:
C: sleep(1);
We also tried this code:
Declare Sub Sleep Lib "kernel32" (ByVal..
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 have two branches:
local branch (the one which I work with)
remote branch (public, only well-tested commits go there)
Recently I seriously messed up my local branch.
How would I replace the loc..
I want to develop and debug Nexus 5 with ADT (based on Eclipse) in Windows 7 x64.
As I connect Nexus 5, it appears in Windows in Explorer, so I can transfer files to/from Nexus. Next step I enable U..
What is the correct way to make text italic? I have seen the following four approaches:
<i>Italic Text</i>
<em>Italic Text</em>
<span class="italic">Italic Text</sp..
My app supports 3 (soon 4) languages. Since several locales are quite similar I'd like to give the user the option to change locale in my application, for instance an Italian person might prefer Spani..
im working on node.js(express) with ejs and im not able to include a .css file to it.i tried the same thing seperately as a html-css duo and it worked fine...how can i include the same in my .ejs fil..
I want to convert String to a Double data type. I do not know if I should use parseDouble or valueOf.
What is the difference between these two methods?..
I want my app to start Service when the button is clicked and the Service should run in background to show a notification at a particular time of day. I have the following code to do this. But it show..
I am able to read Excel file via FileReader but it outputs text as well as weird characters with it. I need to read xls file row-wise, read data in every column and convert it to JSON.
How to read x..
I am trying to find what the easiest way to keep form values after post. I am really trying to have to keep from learning ajax right this second for the one form, Plus I am not sure how hard it would ..
I'm outside gdb's target executable and I don't even have a stack that corresponds to that target. I want to single-step anyway, so that I can verify what's going on in my assembly code, because I'm ..
I am attempting to automate moving files from a folder to a new folder automatically every night using a bash script run from AppleScript on a schedule. I am attempting to write a bash script on Mac O..
I am using the jQuery DataTables plugin to sort the table fields. My question is: how do I disable sorting for a particular column? I have tried with the following code, but it did not work:
"aoColum..
I'm embedding pdf files using something like this:
<div class="graph-outline">
<object style="width:100%;" data="path/to/file.pdf?#zoom=85&scrollbar=0&toolbar=0&navpanes=0" t..
I have a dictionary that has the format of
dictionary = {0: {object}, 1:{object}, 2:{object}}
How can I iterate through this dictionary by doing something like
for((key,value) in dictionary){..
I have a char[] that contains a value such as "0x1800785" but the function I want to give the value to requires an int, how can I convert this to an int? I have searched around but cannot find an answ..
I know that PHP is compiled to byte code before it is run on the server, and then that byte code can be cached so that the whole script doesn't have to be re-interpreted with every web access.
But ca..
I get this error in Netbeans:
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/
How is this caused and how can I solve it?..
I have the following request handler for saving autos. I have verified that this works when I use e.g. cURL. Now I want to unit test the method with Spring MVC Test. I have tried to use the fileUpload..
I've got a div that contains some content that's being added and removed dynamically, so its height is changing often. I also have a div that is absolutely positioned directly underneath with javascri..
Possible Duplicate:
c# why cant a nullable int be assigned null as a value
Im trying to convert my reader[3] object which is datetime to be null if there is no lastPostDate for a Forum but ..
I'm looking to see if there is a better approach to the query below. What I'm trying to do is create a summary report, compiling stats by date.
SELECT CAST(Detail.ReceiptDate AS DATE) AS 'DATE'
, S..
I have a class
class foo {
public:
foo();
foo( int );
private:
static const string s;
};
Where is the best place to initialize the string s in the source file?..
I am having trouble with the following piece of code:
if verb == "stoke":
if items["furnace"] >= 1:
print("going to stoke the furnace")
if items["coal"] >=..