I get the following result when I run a load test. Can any one help me to read the report?
the number of thread = '500 '
ramp up period = '1'
Sample = '500'
Avg = '20917'
min ..
I am doing a relatively simple piece of analysis which I have put into a function, on all the files in a particular folder. I was wondering whether anyone had any tips to help me automate the process..
I want to do something like this:
List<Animal> animals = new ArrayList<Animal>();
for( Class c: list_of_all_classes_available_to_my_app() )
if (c is Animal)
animals.add( new c()..
In RESTful style programming, we should use HTTP methods as our building blocks. I'm a little confused though which methods match up to the classic CRUD methods. GET/Read and DELETE/Delete are obvious..
For example i have a file:
$ cat file
i am the first example.
i am the second line.
i do a question about a file.
and i need:
example, line, file
i intent with "awk" but the problem is that t..
Question
Hello All,
I've had some confusion for quite some time with essentially flooring a DateTime SQL type using T-SQL. Essentially, I want to take a DateTime value of say 2008-12-1 14:30:12 and..
def shuffle(self, x, random=None, int=int):
"""x, random=random.random -> shuffle list x in place; return None.
Optional arg random is a 0-argument function returning a random
float in..
I have 4 file inputs that I want them trigger upload proccess when their value is changed.
I mean when you select a picture and click open on select image dialog, the script to upload the picture be t..
I'm trying to connect with PostgreSQL database through Laravel in order to do a php artisan migrate but doesn't seem to be directed since it's reading the database name of MySQL.
Here are the comman..
I am coming from c# where this was easy, and possible.
I have this code:
public abstract class clsAbstractTable {
public abstract String TAG;
public abstract void init();
}
but Eclipse t..
I'm currently using the following code to right-trim all the std::strings in my programs:
std::string s;
s.erase(s.find_last_not_of(" \n\r\t")+1);
It works fine, but I wonder if there are some end-..
Is there any difference in terms of performance between these two versions of the same query?
--Version 1
SELECT p.Name, s.OrderQty
FROM Product p
INNER JOIN SalesOrderDetail s on p.ProductID = s.Pro..
I've got a WCF Service running on my local IIS server. I've added it as a service reference to a C# Website Project and it adds fine and generates the proxy classes automatically.
However, when I try..
I want to connect to db on EC2 from my local machine, I am not able to do and have tried everything-
I am using this command to connect to EC2:
mysql -uUSERNAME -hEC2_IP -pPASSWORD
This error is g..
I have some fragments in my activity
[1], [2], [3], [4], [5], [6]
And on Back Button Press I must to return from [2] to [1] if current active fragment is [2], or do nothing otherwise.
What is the ..
I have custom designed EditText
search_page.xml
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:p..
I know Ctrl+Shift+Backspace is used to go to the location of the last edit.
But I want to jump to whichever location I was most recently at, not necessarily one where I edited anything.
For example,..
I want to check the first two digits of a number in Python. Something like this:
for i in range(1000):
if(first two digits of i == 15):
print("15")
elif(first two digits of i == 16)..
I have a program that uses XML formatted rules to create executable code for run-time. I have to define some actions and logical constructs using my own dialect. I have OR, AND, and NOT constructs and..
I have a html form that is basically vertical but i really have no idea how to make two text fields on the same line. For example the following form below i want the First and Last name on the same li..
I'm trying to figure out the best way to get the largest value in a Spark dataframe column.
Consider the following example:
df = spark.createDataFrame([(1., 4.), (2., 5.), (3., 6.)], ["A", "B"])
df...
I'm using ViewPager in my app and define it in the main Activity. Inside onCreate method I load some number of pages from SharedPreferences and then pass it to PagerAdapter:
@Override
public int getC..
I am creating a AWS Lambda python deployment package. I am using one external dependency requests . I installed the external dependency using the AWS documentation http://docs.aws.amazon.com/lambda/la..
How to flip any background image using CSS? Is it possible?
currenty I'm using this arrow image in a background-image of li in css
On :visited I need to flip this arrow horizontally. I can do this..
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 configure log4net in my asp.net core 2.0 application as mentioned in this article LINK
program.cs
public static void Main(string[] args)
{
var logRepository = LogManager.GetRepository(Assembl..
I've installed ffmpeg using yum under Redhat, and I'm having difficulty figuring out where (what path) it installed the package to. Is there an easy way of determining this without resorting to findin..
How would i get my cursor to change to this loading icon when a function is called and how would i change it back to a normal cursor in javascript/jquery..
I want to break a while loop of the format below which has an if statement. If that if statement is true, the while loop also must break. Any help would be appreciated.
while(something.hasnext()) {
..
Where are MIN and MAX defined in C, if at all?
What is the best way to implement these, as generically and type safely as possible? (Compiler extensions/builtins for mainstream compilers preferred.)..
I have a table with total no of 1000 records in it.It has the following structure:
EMP_ID EMP_NAME PHONE_NO ARR_DATE
1 A 545454 2012/03/12
I want to calculate no of records for ever..
I need to close the tab which displays my webpage, by the click of a button. But firefox does not allow to close the window by javascript as long as it is not opened by javascript.
If I set the value ..
I want to sort a data.frame by multiple columns. For example, with the data.frame below I would like to sort by column z (descending) then by column b (ascending):
dd <- data.frame(b = factor(c("..
My application currently consumes quite a lot of memory because it is running physics simulations. The issue is that consistently, at the 51st simulation, Java will throw an error usually because of a..
I would like to populate a combobox with the following:
Visible item / Item Value
English / En
Italian / It
Spainish / Sp
etc....
Any help please?
Also it is possible that after populating th..
In my meanderings around the world wide interweb, and now especially the angular.io style docs, I find many references to @HostBinding and @HostListener. It seems they are quite fundamental, but unfor..
We are dealing with an application that needs to handle global time data from different time zones and daylight savings time settings. The idea is to store everything in UTC format internally and only..
There are a lot of useful new things in Java 8. E.g., I can iterate with a stream over a list of objects and then sum the values from a specific field of the Object's instances. E.g.
public class ACl..
I've just upgraded to xcode 4.0 and I can no longer deploy to iPhone, I get a Apple Mach-O Linker Error, it still works for the simulator though.
Ld /Users/yveswheeler/Library/Developer/Xcode/Der..
I'm trying to push my project via the https protocol on bitbucket using sourcetree.
But I can't connect to bitbucket with my login and password (which work on the website), I have a fatal error : "Aut..
Is it possible to change the default background color of the select list option on hover?
HTML:
<select id="select">
<option value="1">One</option>
<option value="2">..
I'm working within the traditional Maven Java project structure inside IntelliJ, e.g.
main/java/com/x/y
test/java/com/x/y
When I create a class called Foo in main/java/com/x/y using IntelliJ I woul..
I'm running Ruby on Windows though I don't know if that should make a difference. All I want to do is get the current working directory's absolute path. Is this possible from irb? Apparently from a..
I have a string that is HTML encoded:
'''<img class="size-medium wp-image-113"\
style="margin-left: 15px;" title="su1"\
src="h..
I'm trying to use Gulp to:
Take 3 specific javascript files, concatenate them, then save the result to a file (concat.js)
Take this concatenated file and uglify/minify it, then save the result to an..
I am trying to understand how Nginx's try_files directive works. Nginx is running on my server and serving up the default page located at /usr/share/nginx/html/index.html.
However, I have a simple HT..
I'd like to modify the path to my application, but doing so breaks it because the service still points to the old location.
By going to Administrative Tools > Services you can open a properties d..
Expressjs framework has a sendfile() method. How can I do that without using a whole framework. I am using node-native-zip to create an archive and I want to send that to the user...
I have a large database in which I want to do a part string search. The user will enter characters: JoeBloggs.
For arguments sake if I had a name Joe 23 Blo Ggs 4 in the database. I want to remove ev..
I came across a strange Codecademy exercise that required a function that would take a string as input and return it in reverse order. The only problem was you could not use the reversed method or the..
I'm creating my first framework in Objective-C that wraps the facebook SDK in a more intuitive way. There are several points in my framework where I'd like to reference the AppDelegate, but there is n..
I'm trying to understand async await in the simplest form. I want to create a very simple method that adds two numbers for the sake of this example, granted, it's no processing time at all, it's just..
I'm a bit confused about how/why so many python developers use if not in their conditional statements.
for example, lets say we had a function,
def foo(bar = None):
if not bar:
bar = 2..
I have a data set represented by a Java 8 stream:
Stream<T> stream = ...;
I can see how to filter it to get a random subset - for example
Random r = new Random();
PrimitiveIterator.OfInt coi..
Is there any kind of API that can allow me to manipulate a file download dialog in Firefox?
(I want to access the one that appears when user does something, not initiate one myself).
What I want to d..
I am developing a country state cascading dropdown list... I returned json result based on countryId but I don't know how to populate/fill it in a new dropdown listbox...
Here is what I am using,
fu..
For my more significant selects, the search box in Select2 is wonderful. However, in one instance, I have a simple selection of 4 hard-coded choices. In this case, the search box is superfluous and lo..
Question:
How to use ssh & scp from the Windows command prompt?
I remember I installed a program in the past that let me do this but can't remember now what it was.
Note:
I do not want to use p..
To get the currently logged in user in MVC5, all we had to do was:
using Microsoft.AspNet.Identity;
[Authorize]
public IHttpActionResult DoSomething() {
string currentUserId = User.Identity.GetUs..
I'm just beginning to get into C++ and I want to pick up some good habits. If I have just allocated an array of type int with the new operator, how can I initialise them all to 0 without looping throu..
When I do this:
std::vector<int> hello;
Everything works great. However, when I make it a vector of references instead:
std::vector<int &> hello;
I get horrible errors like
..
I'm following the Django tutorial https://docs.djangoproject.com/es/1.10/intro/tutorial01/
I've created a "mysite" dummy project (my very first one) and try to test it without altering it.
django-a..
I have this statement:
Assume the bit value of byte x is 00101011. what is the result of x>>2?
How can I program it and can someone explain me what is doing?..
When do we use AtomicReference?
Is it needed to create objects in all multithreaded programs?
Provide a simple example where AtomicReference should be used...
I have created a foreign key (in SQL Server) by:
alter table company add CountryID varchar(3);
alter table company add constraint Company_CountryID_FK foreign key(CountryID)
references Country;
I ..
I am just starting to use RabbitMQ and AMQP in general.
I have a queue of messages
I have multiple consumers, which I would like to do different things with the same message.
Most of the RabbitMQ..
How can I call following Class method or function?
Let say I have this params get from url:
$var = filter($_GET['params']);
Class:
class Functions{
public function filter($data){
$da..
The application I am developing is a game. What I want to do is have JPanels that appear in the JFrame, like a text or message window, and then disappear when they are no longer used. I have designe..
I am a web developer and usually use PHP, JavaScript or MySQL.
I have heard lot about Python. But I have no idea where it is used and why it is used.
Just like PHP, ASP, ColdFusion, .NET are used to..
I noticed that when using SimpleXMLElement on a document that contains those CDATA tags, the content is always NULL. How do I fix this?
Also, sorry for spamming about XML here. I have been trying to ..
I have a web application that use Hibernate to make CRUD operations over a database. I got an error saying that the table is not mapped. See the Java files:
Error message:
org.springframework.orm.hi..
I am developing a Ping application for Android 2.2.
I try my code and it works, but only in local IPs, that's my problem I want to do ping to external servers too.
Here is my code:
private OnClic..
I have tried to add styles dependency in angular.json package but showing that the module not found. adding two of the bootstrap files.
here is the screenshot of both the files
the angular.json..
I used oracle dictionary views to find out column differences if any between two schema's. While syncing data type discrepancies I found that both NUMBER and INTEGER data types stored in all_tab_colum..
When I clone something from Github, it creates a folder with the same name as the app on my computer. Is there a way to change the name?
For example, doing this clone creates a long "sign-in-with..
I have been used Ctrl+Shift+F to correct indentation but I heard there is another shortcut to do that: Ctrl+I
According a reference found in google,
Ctrl+Shift+F is Reformat
and
Ctrl+I is Correct ind..
I have been searching for days to convert a fairly simple JSON string to an object type in Swift but with no avail.
Here is the code for web service call:
func GetAllBusiness() {
Alamofire..
I'm trying to extract a substring from a file with JavaScript Regex. Here is a slice from the file :
DATE:20091201T220000
SUMMARY:Dad's birthday
the field I want to extract is "Summary". Here is th..
When trying to show a div element with jQuery, i got this error:
[23:50:35.971] TypeError: p.easing[this.easing] is not a function @ file:///D:/html5%20puzzle/jquery.js:2
The relevant function is t..
How can I check whether a string is not null and not empty?
public void doStuff(String str)
{
if (str != null && str != "**here I want to check the 'str' is empty or not**")
{
..
I am using java with WebDriver.I have to switch between two frames. I have recorded the test case in selenium IDE and in that I got the values as selectFrame relative=top select Frame=middle Frame
Bu..
I installed Python Anaconda on Mac (OS Mavericks). I wanted to revert to the default version of Python on my Mac. What's the best way to do this? Should I delete the ~/anaconda directory? Any other ch..
By using java reflection, we can easily know if an object is an array. What's the easiest way to tell if an object is a collection(Set,List,Map,Vector...)?..
My understanding is that the main difference between the two methods is that in "write-through" method data is written to the main memory through the cache immediately, while in "write-back" data is w..
I'm trying to add a vCard from a web link to the user's contact list on Android 2.2. When I direct the user to .vcf file, all I get is text output in the mobile browser. I have confirmed that the fi..
I'm having a real problem with JavaScript scope in IE 9.
This is inside the body of my document (yes, I realize script should go in the head for proper HTML, but I've never had it break a script befo..
I would like to read standard input from the command line, but my attempts have ended with the program exiting before I'm prompted for input. I'm looking for the equivalent of Console.ReadLine() in C#..
I have an integer column "Month"
I would like to get 2 digit number for month.
This is what I have tried: DATEPART(mm, @Date)
It returns one digit for months January to September
I am using SQL Serv..
What's the reason why Java doesn't allow us to do
private T[] elements = new T[initialCapacity];
I could understand .NET didn't allow us to do that, as in .NET you have value types that at run-time..
I have a 404.php file in my site's main directory and I was using header('Location: 404.php'); for a while until someone said that you should use header('HTTP/1.0 404 Not Found'); instead. So I replac..
I have just installed IE9 beta and on a specific site I created (HTML5) IE9 jumps to compatibility mode unless I manually tell it not to. I have tried removing several parts of the website but no chan..
I am trying to handle browser back button event but i could not find any solution.
I want to ask user if he clicks on browser back button using "confirm box" if he chooses ok i have to allow back bu..
I want to know what the current day of the week is (Monday, Tuesday...) in the user's local language. For example, "Lundi" "Mardi" etc... if the user is French.
I have read this post, it but it only..
I am trying to run a Java application, but getting this error:
java.lang.ClassNotFoundException:
After the colon comes the location of the class that is missing. However, I know that that location..
I'm trying to use the jquery validate plugin to validate a form and submit the contents with an ajax request.
This code is in the head of my document.
$(document).ready(function() {
$('#contact..
I'm trying find software to view the .img files.But its not expected.
.img file its not all images, it contains some values too.So i would like to view the .img file.Please advise any software like th..
Is there any shorter way to look for multiple matches:
SELECT *
from table
WHERE column LIKE "AAA%"
OR column LIKE "BBB%"
OR column LIKE "CCC%"
This questions applies to PostgreSQL 9..
I have two activities: main activity and child activity.
When I press a button in the main activity, the child activity is launched.
Now I want to send some data back to the main screen. I used the ..
Is the function I wrote below enough to preload images in most, if not all, browsers commonly used today?
function preloadImage(url)
{
var img=new Image();
img.src=url;
}
I have an array of..
Is there an easy way with Python f-strings to fix the number of digits after the decimal point? (Specifically f-strings, not other string formatting options like .format or %)
For example, let's say ..
Can someone help me I'm searching for css/html code example:
I have a webpage with 3 buttons(top, middle, bottom) each specified to 1 div section on my page, lets say my first div section is in the m..
I have a form like the one below which is posted to contacts.php, and the user can dynamically add more with jquery.
<input type="text" name="name[]" />
<input type="text" name="email[]" /&g..
There's a lot of talk about data structures, but I can't find a simple list of data structures and their practical use out there. I'm trying to study for an interview and I think this would help me o..
I'm having problems getting my rsync syntax right and I'm wondering if my scenario can actually be handled with rsync. First, I've confirmed that rsync is working just fine between my local host and m..
I just downloaded Docker Toolbox for Windows 10 64bit today. I'm going through the tutorial. I'm receving the following error when trying to build an image using a Dockerfile.
Steps:
Launched Doc..
How can I make an equality assertion between lists in a JUnit test case? Equality should be between the content of the list.
For example:
List<String> numbers = Arrays.asList("one", "two", "th..
I have a list of words in a dictionary with the value = the repetition of the keyword but I only want a list of distinct words so I wanted to count the number of keywords. Is there a way to count the ..
I want to save a file to the internal storage by getting the text inputted from EditText. Then I want the same file to return the inputted text in String form and save it to another String which is to..
I have no idea why this doesn't work
#include <iostream>
#include <pthread.h>
using namespace std;
void *print_message(){
cout << "Threading\n";
}
int main() {
pthread..
I'm trying to disable these radio buttons when a the loadActive link is clicked but for some reason it only disables the first in the order and then skips the rest.
<form id="chatTickets" method="..
I was wondering if it was possible to split a file into equal parts (edit: = all equal except for the last), without breaking the line? Using the split command in Unix, lines may be broken in half. Is..
In my documentation web pages, I often need to provide links to locations, files and applications (.xbap) stored on the intranet.
In IE, this works fine with URLs formatted like this:
<a href="f..
Possible Duplicate:
List of lists changes reflected across sublists unexpectedly
I intend to initialize a list of list with length of n.
x = [[]] * n
However, this somehow links the lists together..
I am trying to add a today`s date to column A in sheet2 each time my macro paste my selection of sheet1 in column B of the new row of the sheet2.
My script work to add the new row and paste my selec..
I was wondering if using:
System.getProperty("user.dir");
to get the absolute path of a folder is the best way to go about it? I am looking to pass my application onto other computers and I need a ..
I have a requirement to validate an email address entered when a user comes out from the textbox.
I have googled for this but I got form validation JScript; I don't want form validation. I want textb..
I am developing an entertainment app in android. I want to play background music, and I want to use service for that. App have 3 activities and music must be played across all activities. Also, when a..
I am new to JSON.In my asp.net application i want to parse the json string.So, i have used Newtonsoft.Json package for reading and writing json data.Now, i can able to parse the simple json data.But n..
I have a list called pairs.
pairs = [("a", 1), ("b", 2), ("c", 3)]
And I can access elements as:
for x in pairs:
print x
which gives output like:
('a', 1) ('b', 2) ('c', 3)
But I want to ..
As of the moment, I am running a Windows 8.1 PC that does not have the storage or the RAM for a IDE like Android Studio or Eclipse. I want to download the Android SDK tools, without the IDE. How can t..
I'm trying to display a grayscale image using matplotlib.pyplot.imshow(). My problem is that the grayscale image is displayed as a colormap. I need the grayscale because I want to draw on top of the..
I've got an array
var assoc_pagine = new Array();
assoc_pagine["home"]=0;
assoc_pagine["about"]=1;
assoc_pagine["work"]=2;
I tried
if (assoc_pagine[var] != "undefined") {
bu..
I would like my Bash script to print an error message if the required argument count is not met.
I tried the following code:
#!/bin/bash
echo Script name: $0
echo $# arguments
if [$# -ne 1];
t..
I have been adding logs to the console to check the status of different variables without using the Firefox debugger.
However, in many places in which I add a console.log in my main.js file, I recei..
I am getting this error from Angular 2
core.umd.js:5995 EXCEPTION: Uncaught (in promise): Error: Error in app/model_exposure_currencies/model_exposure_currencies.component.html:57:18
caused by: If ng..
Previously in Guzzle 5.3:
$response = $client->get('http://httpbin.org/get');
$array = $response->json(); // Yoohoo
var_dump($array[0]['origin']);
I could easily get a PHP array from a JSON r..
How do I uninstall a Windows Service when there is no executable for it left on the system? I can not run installutil -u since there is not executable left on the system. I can still see an entry for ..
I'm currently developing an application using a MySQL database.
The database-structure is still in flux and changes while development progresses (I change my local copy, leaving the one on the test-s..
In jQuery, is it possible to invoke a callback or trigger an event after an invocation of .each() (or any other type of iterative callback) has completed.
For example, I would like this "fade and rem..
After having installed libpng into my computer, I've included it into my project using #include <png.h> on a Windows 7 SP1 plateform and using Visual Studio Ultimate 2013.
But at build time, I'..
I want to create a multiple selection dropbox list. Actually I have to select more than one option using a dropdown menu. When I simply do this as shown bellow:
<select>
<option><inpu..
I generated a web-service client using JBoss utils (JAX-WS compatible)
using Eclipse 'web service client from a wsdl'.
So, the only thing I provided was a url to a web-service WSDL.
Now, the web ser..
I want to stop execution for 2 seconds. So is this, but now follows a code block:
<html>
<head>
<title> HW 10.12 </title>
<script type="text/javascript">
..
I am debugging a problem with a HTTP 301 Permanent Redirect. After a quick test, it seems that Safari clears its cache of 301s when it is restarted, but Firefox does not.
When do IE, Chrome, Firefox ..
I want to make some TextBoxes on my form uneditable, but I want the text to be clear (black not gray) and that's why I do not want to use
myTextBox.Enabled = false;
Somehow I want it to be disable..
How do you auto-resize a large image so that it will fit into a smaller width div container whilst maintaining its width:height ratio?
Example: stackoverflow.com - when an image is inserted onto th..
I am behind a firewall which uses autoproxy configuration script. I am able to browse the internet when I enable the autoproxy url in most browsers I use (IE 7, IE 8, FF, Chrome). For your reference t..
What is the best way to combine both hashes into %hash1? I always know that %hash2 and %hash1 always have unique keys. I would also prefer a single line of code if possible.
$hash1{'1'} = 'red';
..
I want to create a Sub that basically allows me to target an Excel table with a specific name and then insert a new row at the bottom and add data to that row at the same time. Then exit the sub. And ..
Is there a way to update values in an object?
{
_id: 1,
name: 'John Smith',
items: [{
id: 1,
name: 'item 1',
value: 'one'
},{
id: 2,
name: 'item 2',
value: 'two'..
How can I get the Cartesian product (every possible combination of values) from a group of lists?
Input:
somelists = [
[1, 2, 3],
['a', 'b'],
[4, 5]
]
Desired output:
[(1, 'a', 4), (1, ..
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..
I'm stuck with this concept of 'Functions that return functions'. I'm referring the book 'Object Oriented Javascript' by Stoyan Stefanov.
Snippet One:
_x000D_
_x000D_
function a() {_x000D_
..
I have a vector<data> info where data is defined as:
struct data{
string word;
int number;
};
I need to sort info by the length of the word strings. Is there a quick and simple way to..
I can get height in jQuery with
$(item).outerHeight(true);
but how do I with JS?
I can get the height of the li with
document.getElementById(item).offsetHeight
but i will always get "" when I..
I am using EGit on Eclipse v4.3 (Kepler). I want to commit and push my changes. I do a pull first and one file is conflicting. After manually resolving the conflict (local and remote are the same..
I need to increment a date value by one day in JavaScript.
For example, I have a date value 2010-09-11 and I need to store the date of the next day in a JavaScript variable.
How can I increment a da..
I'm wondering if there is a way to print out all accessible variables in CMake. I'm not interested in the CMake variables - as in the --help-variables option. I'm talking about my variables that I def..
I'm getting the following error when trying to install an android platform on a Cordova project. I've been following this guide: https://cordova.apache.org/docs/en/latest/guide/cli/
Error occurs when..
I would like to print a python dictionary to a file using PrettyPrinter (for human readability) but have the dictionary be sorted by key in the output file to further improve readability. So:
mydict ..
I am using HTML5 input element with type=time. The problem is it shows time with 12 hours but I want it to show it in 24 hours a day. How can I make it to 24 hours?
Here is my input field:
_x000D_
_x0..
I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.
I'm curious to know about the actual difference between the following 2 child classes..
I am trying to create a webpage which is made up of a header and bellow the header a list of items. I want the list of items to be vertically scrollable. I also would like the webpage to take up the e..
I've the following sample html, there is a DIV which has 100% width. It contains some elements. While performing windows re-sizing, the inner elements may be re-positioned, and the dimension of the di..
We are implementing a REST API with Spring (4.1.1.). For certain HTTP requests, we would like to return a head with no body as a response. However, using ResponseEntity<Void> doesn't seem to wor..
I have no experience with any image processing/editing tools. I am doing a project which requires me to convert the images(small icon) with background colour(red/blue/white) to transparent for the web..
I have tried to puzzle out an answer to this question for many months while learning pandas. I use SAS for my day-to-day work and it is great for it's out-of-core support. However, SAS is horrible a..
I'm getting this exception when I try to run this program. It's one of the Microsoft examples. I've added the sqljdbc4.jar to the classpath in netbeans for both compile and Run, via the project proper..
I need to add in a For Loop characters to an empty string. I know that you can use the function concat in Javascript to do concats with strings
var first_name = "peter";
var last_name = "jones";
v..
This code doesn't work:
var number = $(this).find('.number').text();
var current = 600;
if (current > number){
// do something
}
HTML:
<div class="number">400</div>
Seems the..
What actually goes into the high level and low level design documents? (I specifically wish to know which diagrams are drawn in both the documents).
I've gone through a lot of resources but I'm a lit..
Is it possible to query for a specific date ?
I found in the mongo Cookbook that we can do it for a range Querying for a Date Range
Like that :
db.posts.find({"created_on": {"$gte": start, "$lt": en..
grep -A1 'blah' logfile
Thanks to this command for every line that has 'blah' in it, I get the output of the line that contains 'blah' and the next line that follows in the logfile. It might be a si..
I have a database schema named: nyummy and a table named cimory:
create table nyummy.cimory (
id numeric(10,0) not null,
name character varying(60) not null,
city character varying(50) not null..
Suppose I created a table table in a Rails app. Some time later, I add a column running:
rails generate migration AddUser_idColumnToTable user_id:string.
Then I realize I need to add user_id as an..
I'm trying to get the difference between two datetimes and return it as a datetime. I've found examples using diff but I can't seem to get it right.
$timein = date("Y-m-d H:i:s");
$timeout = date("Y-..
I've recently started using c# moving over from Java. I can't seem to find how to get a list item by index. In java to get the first item of the list it would be:
list1.get(0);
What is the equivale..
How can I add external library into a project built by Qt Creator RC1 (version 0.9.2)? For example, the win32 function EnumProcesses() requires Psapi.lib to be added in the project to build...
Should be pretty basic, but I can't get it to work. I have this code to iterate over a mysqli query:
while($row = mysqli_fetch_array($result)) {
$posts[] = $row['post_id'].$row['post_title'].$row..
How can I trigger some action with right click after disabling the browser context menu ?
I tried this . . .
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
$(..
I can't open or run my .jar file.
I just installed java, but I tried to open the .jar with other programs first, so the double-click defaults to something else and I can't change it back.
java -jar ..
I was wondering if there was some kind of J tool in the java swing library that opens up a file browser window and allows a user to choose a file. Then the ouput of the file would be the absolute path..