How can I get request URL in JSP which is forwarded by Servlet?
If I run following code in JSP,
System.out.println("servlet path= " + request.getServletPath());
System.out.println("request URL= " + ..
I wish to get the file extension of an image I am uploading, but I just get an array back.
$userfile_name = $_FILES['image']['name'];
$userfile_extn = explode(".", strtolower($_FILES['image']['name'..
I'm currently looking at other search methods rather than having a huge SQL query.
I saw elasticsearch recently and played with whoosh (a Python implementation of a search engine).
Can you give reaso..
How do I find if a variable is undefined?
I currently have:
var page_name = $("#pageToEdit :selected").text();
var table_name = $("#pageToEdit :selected").val();
var optionResult = $("#pageToEditOpt..
I'm looking for the best approach for string find and replace in Java.
This is a sentence: "My name is Milan, people know me as Milan Vasic".
I want to replace the string Milan with Milan Vasic, bu..
Are there any known how-tos or best practices for web service REST API versioning?
I have noticed that AWS does versioning by the URL of the endpoint. Is this the only way or are there other ways to ..
For some reason, when I try compiling a program, the compiler says permission denied and Id returned 1 exit status. Could anyone tell me what that means? Thank you
#include <stdio.h> ..
I have a cloned project from a master branch from remote repository remote_repo. I create a new branch and I commit to that branch. Other programmers pushed to remote_repo to the master branch.
I need..
I want to execute EXEC master..xp_cmdshell @bcpquery
But I am getting the following error:
SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this compon..
Somehow during the upgrade to VS2012 and .NET 4.5, I've managed to get NuGet confused. There are packages that appear in the package manager (and the packages folder) that I cannot delete (I believe ..
I have a little problem with ListView. How do I clear a ListView content, knowing that it has a custom adapter?
edit -
the custom adapter class extends BaseAdapter, it looks like this:
import androi..
Okay, so we can now submit video previews of our apps on the App Store. According to Apple we should do so with an iOS8 device and OSX 10.10. The problem is you have to have all the different devices ..
I am using a Mac for the first time and need to run Terminal as an admin. I have installed NodeJs and Git and want to download Phone Gap/Corova but when I try to install Cordova, it comes back with an..
Hi All,
I have 2 questions regarding a ListView in Android:
How can I get the color of the listview's focused row ?
I tried to use the ListView.getSelector() method, which according to its document..
How do I remove from a map while iterating it? like:
std::map<K, V> map;
for(auto i : map)
if(needs_removing(i))
// remove it from the map
If I use map.erase it will invalidate th..
Using C++, and hopefully the standard library, I want to sort a sequence of samples in ascending order, but I also want to remember the original indexes of the new samples.
For example, I have a set, ..
I'm running the following command:
get-childitem C:\temp\ -exclude *.svn-base,".svn" -recurse | foreach ($_) {remove-item $_.fullname}
Which prompts me very frequently like this:
Confirm
The item ..
This does not work and I need it badly
$('some+multi+word+string').replace('+', ' ' );
always gets
some multi+word+string
it's always replacing for the first instance only, but I need it to work..
I have a WebView in my application in which some site is opened (always the same, it is my own page). The site has some JS code that loads some images from the remote host.
I want to intercept request..
I have a JavaScript webapp where the user needs to grab the background to move the whole screen around. So I want the cursor to change when they're hovering over the background. The -moz-grab and -m..
I'm getting the following errors:
ISO C++ forbids declaration of ttTreeInsert with no type
ISO C++ forbids declaration of ttTreeDelete with no type
ISO C++ forbids declaration of ttTreePrint with no ..
Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.
$customer['address'] = '123 fake st';
$customer[..
I'd like to know if it's possible to generate a SELECT COUNT(*) FROM TABLE statement in SQLAlchemy without explicitly asking for it with execute().
If I use:
session.query(table).count()
then it gen..
I'm trying to connect to an oracle database with SQL Developer.
I've installed the .Net oracle drivers and placed the tnsnames.ora file at
C:\Oracle\product\11.1.0\client_1\Network\Admin
I'm using ..
I'm working on an iPad-based web app, and need to prevent overscrolling so that it seems less like a web page. I'm currently using this to freeze the viewport and disable overscroll:
document.body.ad..
This isn't as simple as just doing a parametrized build. I've already got a specific build process that will build and deploy whenever any of these branches are pushed to GitHub:
So if I've just pu..
I'm trying to make an array of structs where each struct represents a celestial body.
I don't have that much experience with structs, which is why I decided to try to use them instead of a whole bunc..
There are several possibilities to do an endless loop, here are a few I would choose:
for(;;) {}
while(1) {} / while(true) {}
do {} while(1) / do {} while(true)
Is there a certain form which one s..
I am trying to convert content of a file stored in a sql column to a pdf.
I use the following piece of code:
byte[] bytes;
BinaryFormatter bf = new BinaryFormatter();
MemoryStream ms = new MemoryStr..
I think that I fully understand this, but I just want to make sure since I keep seeing people say to never ever test against True, False, or None.
They suggest that routines should raise an error rat..
I need to convert JSON object string to a JavaScript array.
This my JSON object:
{"2013-01-21":1,"2013-01-22":7}
And I want to have:
var data = new google.visualization.DataTable();
data.addColum..
I have a custom error page set up for my application:
<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx"
/>
In Global.asax, Application_Error(), the following code works to ..
I am making an app in Android Studio, now trying to debug it through adb. When I click on the word Android and the logo on the bottom bar, logcat comes up and recognizes my device. Then I see this:
..
Let's say I have a list of People which I need to sort by Age first and then by Name.
Coming from a C#-background, I can easily achieve this in said language by using LINQ:
var list=new List<Per..
I am on a school computer, so I can't install anything.
I am trying to create C code which can be run in Python. It seems all the articles I am finding on it require you to use
#include <Python...
Within my master branch, I did a git merge some-other-branch locally, but never pushed the changes to origin master. I didn't mean to merge, so I'd like to undo it. When doing a git status after my me..
My assignment in my Java course is to make 3 triangles. One left aligned, one right aligned, and one centered. I have to make a menu for what type of triangle and then input how many rows is wanted. T..
Continuing from Stack Overflow question Java program to get the current date without timestamp:
What is the most efficient way to get a Date object without the time? Is there any other way than these..
PHP 7, which will come out in November this year will introduce the Spaceship (<=>) operator. What is it and how does it work?
This question already has an answer in our general reference question..
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..
Are there any compelling performance reasons to choose static linking over dynamic linking or vice versa in certain situations? I've heard or read the following, but I don't know enough on the subject..
I have created trip server. It works fine and we are able to make POST request by Insomnia but when we make POST request by axios on our front-end, it sends an error:
has been blocked by CORS policy:..
I have two repositories, and I need to copy whole of one onto the other empty one which has different access levels from the first one. The copy and the mother repository should not be linked together..
I have some concerns using async actions in ASP.NET MVC. When does it improve performance of my apps, and when does it not?
Is it good to use async action everywhere in ASP.NET MVC?
Regarding awaita..
I am trying to dockerize a PHP application. In the dockerfile, I download the archive, extract it, etc.
Everything works fine. However, if a new version gets released and I update the dockerfile, I ha..
I have created a git repository to mirror a live site (which is a non-bare git repository):
git clone --mirror ssh://[email protected]/path/to/repo
Now, to keep this mirror clone updated with all ch..
I'm using jQuery DataTables and I would like to know if there's possible to disable automatic sorting on the first column of the table?
My code looks like this:
/* Default class modification..
I'm using Maven 3.0.3 on Mac 10.6.6. I have a JAR project and when I run the command "mvn clean install:install", I'm getting the error,
[ERROR] Failed to execute goal org.apache.maven.plugins:mave..
I'm writing a simple server for Node.js and I'm using my own class called User which looks like:
function User(socket) {
this.socket = socket;
this.nickname = null;
/* ... just the typic..
I created an application with spring + hibernate, but I always get this error. This is my first application with hibernate, I read some guides but I can not solve this problem. Where am I doing wrong?..
I have a Java bean. Now, I want to be sure that the field should be unique.
I am using the following code:
@UniqueConstraint(columnNames={"username"})
public String username;
But I'm getting some ..
I have an instance of nginx running which serves several websites. The first is a status message on the server's IP address. The second is an admin console on admin.domain.com. These work great. Now I..
When I use the for loop in Playground, everything worked fine, until I changed the first parameter of for loop to be the highest value. (iterated in descending order)
Is this a bug? Did any one else ..
I'm new to java (& to OOP too) and I'm trying to understand about the class ArrayList
but I don't understand how to use the get(). I tried searching in net, but couldn't find anything helpful...
Ok, after seeing this post by PJ Hyett, I have decided to skip to the end and go with Git.
So what I need is a beginner's practical guide to Git. "Beginner" being defined as someone who knows how to..
How does
@Scripts.Render("~/bundles/jquery")
differ from just referencing the script from html like this
<script src="~/bundles/jquery.js" type="text/javascript"></script>
Are the..
How do you change the text value of a button in jQuery? Currently, my button has 'Add' as its text value, and upon being clicked I want it to change to 'Save'. I have tried this method below, but so f..
Given this XML, what XPath returns all elements whose prop attribute contains Foo (the first three nodes):
<bla>
<a prop="Foo1"/>
<a prop="Foo2"/>
<a prop="3Foo"/>
<a p..
I have a python script parse.py, which in the script open a file, say file1, and then do something maybe print out the total number of characters.
filename = 'file1'
f = open(filename, 'r')
content ..
The noexcept keyword can be appropriately applied to many function signatures, but I am unsure as to when I should consider using it in practice. Based on what I have read so far, the last-minute addi..
I'm just learning c++ (first day looking at it since I took a 1 week summer camp years ago)
I was converting a program I'm working on in Java to C++:
#ifndef ADD_H
#define ADD_H
#define _USE_MATH_DE..
I'm running Filezilla Server 0.9.45 beta to manage my server remotely.
After setting it up, I tested connecting to it using the IP 127.0.0.1, and it worked successfully. However, to connect to the ser..
This function below doesn’t work like I want it to; being a JS novice I can’t figure out why.
I need it to wait 5 seconds before checking whether the newState is -1.
Currently, it doesn’t wait..
How do you use the CSS content property to add HTML entities?
Using something like this just prints to the screen instead of the non-breaking space:
.breadcrumbs a:before {
content: '..
I have web application in Asp.Net MVC4 and I want to use cookie for user's login and logout. So my actions as follows:
Login Action
[HttpPost]
public ActionResult Login(string username, stri..
This is quite a simple question:
I just need to open a file (this filename is galfit.feedme). I can view the file with view galfit.feedme when I'm in the directory, but I do not know how to edit thi..
Possible Duplicate:
Starting iPhone app development in Linux?
Is there a way to use Ubuntu Linux for developing iPhone applications destined to be listed on Apples app store ?..
I'm setting a date-time textfield value via a calendar widget. Obviously, the calendar widget does something like this :
document.getElementById('datetimetext').value = date_value;
What I want is :..
I was using an UICollectionView in Swift but I get when I try to change the text of the cell's label.
func collectionView(collectionView: UICollectionView!, numberOfItemsInSection section: Int)..
I want to train a deep network starting with the following layer:
model = Sequential()
model.add(Conv2D(32, 3, 3, input_shape=(32, 32, 3)))
using
history = model.fit_generator(get_training_data()..
I am working on Angular app. I tried to use ng-if and switch inside ng-repeat but didn't succeed. I have data like:
**[{"_id":"52fb84fac6b93c152d8b4569",
"post_id":"52fb84fac6b93c152d8b4567..
Possible Duplicate: How to access java-classes in the default-package?
I am using Eclipse 3.5 and I have created a project with some package structure along with the default package. I have one..
So if I understand z-index correctly, it would be perfect in this situation:
I want to place the bottom image (the tag/card) below the div above it. So you can't see the sharp edges. How do I do t..
I have a class which is basically a copy of another class.
public class A {
int a;
String b;
}
public class CopyA {
int a;
String b;
}
What I am doing is putting values from class A into C..
Can anyone tell me how can I call for indexes in a nested list?
Generally I just write:
for i in range (list)
but what if I have a list with nested lists as below:
Nlist = [[2,2,2],[3,3,3],[4,4,..
I have a bunch of records with dates formatted as a string such as '04/17/2009'
I want to convert them to a mysql datetime field
I plan to use a foreach loop to read the old date value and insert th..
I am following this guide (https://developers.google.com/protocol-buffers/docs/pythontutorial) and using the exact sample of addressbook.proto.
Post the content of compiler generated addressbook_pb2...
I'm trying to create a horizontal 100% stacked bar graph using HTML and CSS. I'd like to create the bars using DIVs with background colors and percentage widths depending on the values I want to graph..
This question is not for the discussion of whether or not the singleton design pattern is desirable, is an anti-pattern, or for any religious wars, but to discuss how this pattern is best implemented ..
I send String-messages to Kafka V. 0.8 with the Java Producer API.
If the message size is about 15 MB I get a MessageSizeTooLargeException.
I have tried to set message.max.bytesto 40 MB, but I still ..
I’m getting an ".addEventListener is not a function" error. I am stuck on this:
var comment = document.getElementsByClassName("button");
function showComment() {
var place = document.getElementBy..
I am creating XML file in Python and there's a field on my XML that I put the contents of a text file. I do it by
f = open ('myText.txt',"r")
data = f.read()
f.close()
root = ET.Element("add")
doc =..
While installing tig, HomeBrew is displaying the following issues while installing a dependency:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into..
I am trying to find out how to set the max value and min value of html5 type input by javascript or jquery.
<input type="number" max="???" min="???" step="0.5"/>
Would someone please guide..
While configuring git I ran these two commands:
git config --global user.name "My Name"
git config --global user.email "[email protected]"
However, I doubt whether I made a typo or not. So, is t..
It seems that many projects slowly come upon a need to do matrix math, and fall into the trap of first building some vector classes and slowly adding in functionality until they get caught building a ..
I want to grant access to a user to a specific database with read and write access. The user is already available in the domain but not in the DB.
So, how can I give them that access with creating a ..
Running Postgres 7.4 (Yeah we are in the midst of upgrading)
I need to store from 1 to 100 selected items into one field in a database. 98% of the time it's just going to be 1 item entered, and 2% of..
I want to use StreamWriter to write a file to the temp folder.
It might be a different path on each PC, so I tried using %temp%\SaveFile.txt but it didn't work.
How can I save to the temp folder, us..
I'm trying to execute a command shell in Jenkins, I'm working on Windows 7. In the console output I have this:
Building in workspace C:\Program Files (x86)\Jenkins\workspace\test
[test] $ sh -xe C:\W..
Is there a css-only solution to scale an image into a bounding box (keeping aspect-ratio)? This works if the image is bigger than the container:
img {
max-width: 100%;
max-height: 100%;
}
Examp..
I'm getting deeper into generics and now have a situation I need help with. I get a compile error on the 'Derived' class below as shown in the subject title. I see many other posts similar to this one..
I am trying to allow some particular domain to access my site via iframe
Header set X-Frame-Options ALLOW-FROM https://www.that-site.com
I know this could be done by add the line above to the conf..
In my program I want to draw a simple score line graph. I have a text file and on each line is an integer score, which I read in and want to pass as argument to my graph class. I'm having some trouble..
I was told I can add the -XX:+HeapDumpOnOutOfMemoryError parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application. I w..
SOLVED:
My solution: I delete dataSource() method from DatabaseConfig.java. Then, the application was started successfully :)
I've just updated my Spring Boot project from 1.5.x to 2.0.0. Before the ..
In code-behind I set Session with some data.
Session["usedData"] = "sample data";
And the question is how can I get the Session value(in my example; "sample data") in javascript and set Session["us..
Is there an alternative to update_attributes that does not save the record?
So I could do something like:
@car = Car.new(:make => 'GMC')
#other processing
@car.update_attributes(:model => 'Sie..
I am trying to create mutliple objects of a type of class I made. I then want to transfer these values into the array list. How can I create objects using a while loop that have different names. For e..
Difference between inner and outer join. i am using two table and want to fetch data from both table so which type join we should use owning of that we can solve our problem ..
I'm looking for an efficient way to check variables of a Python function. For example, I'd like to check arguments type and value. Is there a module for this? Or should I use something like decorators..
I'm writing a stored procedure that needs to have a lot of conditioning in it. With the general knowledge from C#.NET coding that exceptions can hurt performance, I've always avoided using them in PL..
I would like to convert this one line of code to C# code within a void: param1:Function=null I am aware that in the void, it would be like "thing here" param1, but I dont know what "thing here" wou..
What is the easy way to concatenate two byte arrays?
Say,
byte a[];
byte b[];
How do I concatenate two byte arrays and store it in another byte array?..
I downloaded Android Studio and attempted to launch the program.
This is running on Windows 7 64-bit with Java 1.7. During the installation my Java 1.7 is detected, and the rest of the installation g..
I am looking for a hibernate criteria to get following:
Dokument.class
is mapped to Role
roleId
Role.class
has a ContactPerson
contactId
Contact.class
FirstName
LastName
I want to search for First..
I've got the URI like this:
https://google.com.ua/oauth/authorize?client_id=SS&response_type=code&scope=N_FULL&access_type=offline&redirect_uri=http://localhost/Callback
I need a coll..
I have an object of the type IEnumerable<KeyValuePair<T,U>> keyValueList, I am using
var getResult= keyValueList.SingleOrDefault();
if(getResult==/*default */)
{
}
else
{
}
How..
How to host a Node.Js application in a shared hosting
I want to host a node.js application in shared hosting. Does anyone have any reference or documentation to refer to?..
I need to create a new local user account, and then add them to the local Administrators group. Can this be done in PowerShell?
EDIT:
# Create new local Admin user for script purposes
$Computer = [..
Here's a question that I don't quite understand:
The command, system("pause"); is taught to new programmers as a way to pause a program and wait for a keyboard input to continue. However, it seems to..
I would like to modify an MSI installer (created through WiX) to delete an entire directory on uninstall.
I understand the RemoveFile and RemoveFolder options in WiX, but these are not robust enough ..
I made a data.frame in R that is not very big, but it takes quite some time to build. I would to save it as a file, which I can than again open in R?..
I know about joins in SQL Server.
For example. There are two tables Table1, Table2.
Their table structures are the following.
create table Table1 (id int, Name varchar (10))
create table Table2 (..
I have one activity which is the main activity used throughout the app and it has a number of variables. I have two other activities which I would like to be able to use the data from the first activi..
i am getting the following error while loading my index page in FF3.0. Sorry, i am unable to paste the script here as it is 2030 lines of code.
element.dispatchEvent is not a function
On expansi..
I have two dates let´s say 14.01.2013 and 26.03.2014.
I would like to get the difference between those two dates in terms of weeks(?), months(in the example 14), quarters(4) and years(1).
Do you kn..
I am calling some HTTPS web service which the following Client:
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import ja..
There are a few questions on the topic but none of them seem to cover my case, thus I'm creating a new one.
I have JSON like the following:
{"foo":{ "bar": "1", "baz": "2" }, "more": "text"}
Is th..
I am working on an Angular project. I'm struggling with refresh action in a component.
I would like to refresh the router's components on button click.
I have refresh button when I click on it the co..
I can't get my Spring-boot project to serve static content.
I've placed a folder named static under src/main/resources. Inside it I have a folder named images. When I package the app and run it, it c..
I want to set the favicon for a fairly large number of pages. But, instead of using the HTML <head> tag <link rel="shortcut icon" href="favicon.ico">, I'd like to set it in the CSS file. I..
I have a dictionary in C# like
Dictionary<Person, int>
and I want to sort that dictionary in place with respect to keys (a field in class Person). How can I do it? Every available help on the..
Whats the difference between multitasking, multiprogramming & multiprocessing
This comes regularly for my university OS exams and I can't find a good answer.
I know quite a bit about multitasking..
I have code like this (JSFiddle)
<li v-for="(itemObjKey, catalog) in catalogs">this index : {{itemObjKey}}</li>
Output:
this index: 0
this index: 1
My question is:
How can I get va..
Here's what I have going:
import 'whatwg-fetch';
function fetchVehicle(id) {
return dispatch => {
return dispatch({
type: 'FETCH_VEHICLE',
payload: fetch(`http..
As soon as I move my Laravel App from MySQL to pSQL. I kept getting this error.
The Response content must be a string or object implementing __toString(), "boolean" given.
I have an API that su..
I'm trying to get data from an array and using map function to render content. Look at
**{this.lapsList()}**
and the associated
**lapsList()**
function to understand what I'm trying to do. T..
I was looking at the new features for Visual Studio 2015 and Shared Project came up a lot but I don't understand how it is different to using a Class Library or a Portable Class Library. Can anyone ex..
I am using jspdf to convert an image into a PDF.
I have converted the image into a URI using base64encode. But the problem is that there are no errors or warnings shown in the console.
A PDF is gen..
I have 2 <div>s with ids A and B. div A has a fixed width, which is taken as a sidebar.
The layout looks like diagram below:
The styling is like below:
html, body {
margin: 0;
padding: ..
How to remove a blank page that gets added automatically after \part{} or \chapter{} in a book document class?
I need to add some short text describing the \part. Adding some text after the part comm..
Suppose I have this code:
var myArray = new Object();
myArray["firstname"] = "Bob";
myArray["lastname"] = "Smith";
myArray["age"] = 25;
Now if I want..
This is my first time with node.js. I get it to display the index.html, but it doesn't display the images on the site or anything else, it ONLY shows the basic html stuff. Here's how I set it up.
Ther..
Which is the best implementation(in terms of speed and memory usage) for iterating through a Perl array? Is there any better way? (@Array need not be retained).
Implementation 1
foreach (@Array)
{
..
I read somewhere below line.
Java volatile keyword doesn't means atomic, its common misconception
that after declaring volatile, ++ operation will be atomic, to make
the operation atomic you s..
When using the example code from the jQuery documentation for the keypress event handler, I'm unable to capture the Delete key. The snippet below is going to log 0 when the Delete key is pressed in Fi..
I have a solution in VS 2008 with 2 projects in it. One is a DLL written in C++ and the other is a simple C++ console application created from a blank project. I would like know how to call the functi..
I'm trying to set iptable rules, and I got following error message when I use iptable :
iptables v1.4.14: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps ..
I want to create a function that will accept any old string (will usually be a single word) and from that somehow generate a hexadecimal value between #000000 and #FFFFFF, so I can use it as a colour ..
I have a Struts2 action in the server side for file downloading.
<action name="download" class="com.xxx.DownAction">
<result name="success" type="stream">
<param name="cont..
Json value may consist of a string value. eg.:
postgres=# SELECT to_json('Some "text"'::TEXT);
to_json
-----------------
"Some \"text\""
How can I extract that string as a postgres text value..
I am trying to dynamically render components based on their type.
For example:
var type = "Example";
var ComponentName = type + "Component";
return <ComponentName />;
// Returns <ex..
I don't seem to understand how Integer.MAX_VALUE and Integer.MIN_VALUE help in finding the min and max value in an array.
I understand how this method (pseudocode below) works when finding the min an..
I have already created an SQLite database. I want to use this database file with my Android project. I want to bundle this database with my application.
Instead of creating a new database, how can t..
After I did brew update and brew upgrade, my postgres got some problem. I tried to uninstall postgres and install again, but it didn't work as well.
This is the error message.(I also got this error ..
Hello I'm looking to write a batch file to check to see if there are any files of any type inside a given folder.
So far I've tried the following
if EXIST FOLDERNAME\\*.* ( echo Files Exist ) ELSE (..
I trying to get my link to open in a new tab (it must be in razor format):
<a href="@Url.Action("RunReport", "Performance", new { reportView = Model.ReportView.ToString() }, new { target = "_b..
I have a non-empty directory (eg /etc/something) with files that cannot be renamed, moved, or deleted.
I want to check this directory into git in place.
I want to be able to push the state of this re..
I'm trying to make a font in a div responsive to the browser window. So far, it has worked perfectly, but the parent div has a max-width of 525px. Resizing the browser further will not make the font s..
I have a table with the following columns in a MySQL database
[id, url]
And the urls are like:
http://domain1.com/images/img1.jpg
I want to update all the urls to another domain
http://doma..
I have a data file with this format:
Weight Industry Type
251,787 Kellogg h
253,9601 Kellogg a
256,0758 Kellogg h
....
I read the data and try to draw an histogram with this comma..
I am writing a utility which accepts either a filename, or reads from stdin.
I would like to know the most robust / fastest way of checking to see if stdin exists (data is being piped to the program)..
I save some data in session on my verify controller then I extract this session data into user_activity model and insert session data into activity table. My problem is only username data saved in ses..
I would like to add a moving average calculation to my exchange time series.
Original data from Quandl
Exchange = Quandl.get("BUNDESBANK/BBEX3_D_SEK_USD_CA_AC_000",
authtoken="..
I would like to write a CSS selector rule that selects all elements that don't have a certain class. For example, given the following HTML:
<html class="printable">
<body class="printabl..
I read a JSON object from a remote REST server. This JSON object has all the properties of a typescript class (by design). How do I cast that received JSON object to a type var?
I don't want to popul..
I want to try out PyCharm for sage mathematics development. Normally I run eclipse to do sage development, but now I want to try it with PyCharm.
To launch eclipse with sage environment variables, i..
I am using below HTML tag:
<input type="time" />
In Chrome, Its showing PM/AM format, can we restrict to display 24 format always.
I dont want to use HTML5 tag ..
I've been looking around and the closest answer is : How to generate a random alpha-numeric string?
I want to follow this workflow according to this CrackStation tutorial:
To Store a Password
Genera..
I want to have a vertical menu with a specific height.
Each child must fill the height of the parent and have middle-aligned text.
The number of children is random, so I have to work with dynamic va..
I would like to know how to remove additional spaces when I print something.
Like when I do:
print 'Value is "', value, '"'
The output will be:
Value is " 42 "
But I want:
Value is "42"
Is t..
I've written a formula within an Excel Cell, in Office 2010, and I expect the cell to show its value, but it still shows the formula. How do I get the cell to show the value rather than the formula?..
var array_of_functions = [
first_function('a string'),
second_function('a string'),
third_function('a string'),
forth_function('a string')
]
array_of_functions[0];
That does not wor..
I am using Jake's ViewPageIndicator and want to display Images like a swipe gallery.
Any refernce link where i can get started. I have implemented the basic viewpager and now want to implement image v..
I would like to put a line "All Rights Reserved..." at the bottom of the page.
I tried to use absolute positioning, but this does not work as expected when the window resized to smaller height.
How c..
What is the iOS 6.0 user agent string?
Previous user-agent strings:
iOS 5.1 - What is the iOS 5.1 user agent string?
iOS 5.0 - What is the iOS 5.0 user agent string?
iOS 4.0 - What is the iPhone ..
I have a formula in C2, say =A2+B2. Whenever C2 changes value (actual value, not formula) I want to have the present date and time updated in D2.
I have tried a lot of VBA codes and tricks and none o..
How can I programatically get the path to MSBuild from a machine where my .exe is running?
I can get the .NET version from the Environment but is there a way of getting the correct folder for a .NET ..
In R I can create the desired output by doing:
data = c(rep(1.5, 7), rep(2.5, 2), rep(3.5, 8),
rep(4.5, 3), rep(5.5, 1), rep(6.5, 8))
plot(density(data, bw=0.5))
In python (with matplot..
I've seen the documentation of the Angular select directive here: http://docs.angularjs.org/api/ng.directive:select.
I can't figure how to set the default value. This is confusing:
select as lab..