As the title reads, I'm trying to assign more memory to my container. I'm using an image from docker hub called "aallam/tomcat-mysql" in case that's relevant.
When I start it normally without any spe..
I'm running an AWS EC2 g2.2xlarge instance with Ubuntu 14.04 LTS.
I'd like to observe the GPU utilization while training my TensorFlow models.
I get an error trying to run 'nvidia-smi'.
ubuntu@ip-10-..
I'm trying to create a task with a function inside:
def doCopyMibArtefactsHere(projectName) {
step ([
$class: 'CopyArtifact',
projectName: $projectName,
filter: '**/**.mib..
I'm using create-react-app and prefer not to eject.
It's not clear where fonts imported via @font-face and loaded locally should go.
Namely, I'm loading
@font-face {
font-family: 'Myriad Pro Reg..
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..
I am trying to resize a logical volume on CentOS7 but am running into the following error:
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/c..
I am working on a business application using angularJS. One of my service method returning me a byte[] (inclding PDF file content) now i need to download this file as PDF to client machine using JavaS..
I want to make big script on my Debian 7.3 ( something like translated and much more new user friendly enviroment ). I have a problem. I want to use only some of the informations that commands give me..
I have googled and found many solutions but none work for me.
I am trying to clone from one machine by connecting to the remote server which is in the LAN network.
Running this command from another m..
I have downloaded and installed XAMPP 1.8.1 for Windows on Windows 7 Ultimate. I have set up XAMPP to run together with IIS as per these instructions
All good so far, my PHP sites run locally and eve..
In SVN I have at least two ways to create a branch:
svn cp /home/me/localcheckout/trunk /home/me/localcheckout/branches/newbranch
svn cp http://server/trunk http://server/branches/newbranch
The fir..
I know this should be very simple, but I've been really struggling with creating a UILabel programmatically and getting it to behave the way I would like.
All I want is to be able to create a label, ..
I just setup Android Studio on my PC, which is new launch to develop Android application.
My problem is that, when I try to run my small app in emulator, it take to much time to launch and after then..
I am running a Maven project which is also a dynamic web project. I have used all Spring libraries in Maven. I created web.xml, but when I start my Tomcat 7 server I am getting the following message:
..
When I tried to run
git push origin master --force
I just got
Counting objects: 2649, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1280/1280), done.
error: RPC failed;..
I am getting this error when I am trying push my files into heroku rep.
Ive set autocrlf = false already in gitconfig but this problem is still there.
i have also tried this solution here
but no gain..
I'm working in rails 3.2 and I receive an error when I try to push to heroku:
git push heroku master
Counting objects: 496, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (..
Why am I getting this error when my git repository url is correct?
jitendra@JITENDRA-PC /c/mySite (master)
$ git push beanstalk master
fatal: '[email protected]/gittest.git' does not appear ..
File "C:\Users\Administrator\Documents\Mibot\oops\blinkserv.py", line 82, in __init__
self.serv = socket(AF_INET,SOCK_STREAM)
TypeError: 'module' object is not callable
Why am I getting this err..
I cloned a git repo that I have hosted on github to my laptop. I was able to successfully push a couple of commits to github without problem. However, now I get the following error:
Compressing ob..
I have a certificate in der format, from it with this command I generate a public key:
openssl x509 -inform der -in ejbcacert.cer -noout -pubkey > pub1key.pub
Which results in this:
-----BEGIN ..
I have a system (Ubuntu) with many processes and one (or more) have a memory leak. Is there a good way to find the process that has the leak? Some of the process are JVMs, some are not. Some are home ..
I have a folder a/ and a remote folder A/.
I now run something like this on a Makefile:
get-music:
rsync -avzru server:/media/10001/music/ /media/Incoming/music/
put-music:
rsync -avzru /media/Inc..
When I use Response.Redirect(...) to redirect my form to a new page I get the error:
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
An exce..
Here is my simple User POCO class:
/// <summary>
/// The User class represents a Coderwall User.
/// </summary>
public class User
{
/// <summary>
/// A User's username. eg: ..
I would like to get the average for certain columns for each row.
I have this data:
w=c(5,6,7,8)
x=c(1,2,3,4)
y=c(1,2,3)
length(y)=4
z=data.frame(w,x,y)
Which returns:
w x y
1 5 1 1
2 6 2 2
..
I'm seeing an error appear in my debugger log:
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x191f0920 H:[MPKnockoutButton:0x17a876b0]-(34)-[MPDetailSlider:0x17a8bc50](LTR)&..
Is there a good way of differentiating between row and column vectors in python? So far I'm using numpy and scipy and what I see so far is that If I was to give one a vector, say
from numpy import *
..
Is there any way to achieve function overloading in C? I am looking at simple functions to be overloaded like
foo (int a)
foo (char b)
foo (float c , int d)
I think there is no straight forwa..
While doing the final exercise of the Tour of Go, I decided I needed a queue of (string, int) pairs. That's easy enough:
type job struct {
url string
depth int
}
queue := make(chan job)
queu..
I need to zip an entire directory using Node.js. I'm currently using node-zip and each time the process runs it generates an invalid ZIP file (as you can see from this Github issue).
Is there another..
What is the difference in Typescript between export and default export. In all the tutorials I see people exporting their classes and I cannot compile my code if I don't add the default keyword before..
I have two paragraphs. The two paragraphs are located in the same column. Now my question is I need to make the two paragraphs in two separate boxes, down each other. In other words, gap between two b..
What is JavaScript garbage collection? What's important for a web programmer to understand about JavaScript garbage collection, in order to write better code?..
I have a variable called filepath=/tmp/name.
To access the variable, I know that I can do this: $filepath
In my shell script I attempted to do something like this (the backticks are intended)
`tail..
Is this possible at all?
I tried adding this to the page but it didn't change a thing.
<meta http-equiv="X-UA-Compatible" content="IE=8">
UPDATE- I'm trying to do this because our site has so..
I'm running into an issue with my isomorphic JavaScript app using React and Express.
I am trying to make an HTTP request with axios.get when my component mounts
componentDidMount() {
const url =..
I cannot add my project to a server in Eclipse - why is that?
I installed all necessary tools (Web Dev, Java EE, Server Adapters, and Tomcat itself, everything)
I configured the runtime environments, ..
I need to write a script that will drop a PostgreSQL database. There may be a lot of connections to it, but the script should ignore that.
The standard DROP DATABASE db_name query doesn't work when t..
Typically the main use of the question mark is for the conditional, x ? "yes" : "no".
But I have seen another use for it but can't find an explanation of this use of the ? operator, for example.
pub..
I have a radiobutton list and on click on the radio button item I have to change the text of its label. But for some reason it's not working. Code is below:
<asp:Label ID="lblVessel" Text="Vessel:..
Exact duplicate of many posts:
What is unit testing?
What Makes a Good Unit Test?
New to Unit Testing
Unit Testing - definitions
Learning Unit Testing
How to properly mock and unit test
Unit Te..
I have a table in PostgreSQL where the schema looks like this:
CREATE TABLE "foo_table" (
"id" serial NOT NULL PRIMARY KEY,
"permalink" varchar(200) NOT NULL,
"text" varchar(512) NOT NULL..
What I am looking for is the equivalent of System.Windows.SystemParameters.WorkArea for the monitor that the window is currently on.
Clarification: The window in question is WPF, not WinForm...
I would like to insert an images within an element the XML file, what is the best way to do this? Would you please suggest some good way to include an images to xml file?..
Currently, I have put this in the body tag to disable text selections:
body {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
However, my inpu..
I need to do something like this using Boostrap. "Fluid" content on the page with two widgets inside it - first at top-right and second at left-bottom.
Widget1 is easy - I just needed class="pull-..
I'm running some administrative queries and compiling results from sp_spaceused in SQL Server 2008 to look at data/index space ratios of some tables in my database. Of course I am getting all sorts o..
I have a stored procedure that alters user data in a certain way. I pass it user_id and it does it's thing. I want to run a query on a table and then for each user_id I find run the stored procedure o..
I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here. However, when I try to connect in to a different DB using the same setup, I get:
Conn..
Is there a way to change the color of a button, or at least the color of the button label programmatically?
I can change the label itself with
document.getElementById("button").object.textElement.in..
I use Tomcat 7.0.43 with a websocket application. My app works fine in Tomcat 7.0.42 but with 43 I get the following output when I try to access my server on websockets:
Sep 16, 2013 3:08:34 AM org.a..
How can I do this:
public class Main extends ListActivity , ControlMenu
Also, I would like to know that is this approach is okay that I have made the menus in class which is ControlMenu and I am e..
I have a datetime that looks like this:
201210120956
ccyyMMDDhhmm
When I try this:
Dim convertedDate As Date = Date.Parse(DateString)
Return convertedDate
I get back this:
#10/12/2012#
I'm lo..
Is there a way to expand a Python tuple into a function - as actual parameters?
For example, here expand() does the magic:
some_tuple = (1, "foo", "bar")
def myfun(number, str1, str2):
return (..
I have a Notepad++ question.
How can I take the below words in Notepad++ (which is on different lines)
Apples
Apricots
Pear
Avocados
Bananas
And turn them into a paragraph with a comma at the end ..
unique_ptr<T> does not allow copy construction, instead it supports move semantics. Yet, I can return a unique_ptr<T> from a function and assign the returned value to a variable.
#include..
I would like to know the best way of loading a resource in Java:
this.getClass().getResource() (or getResourceAsStream()),
Thread.currentThread().getContextClassLoader().getResource(name),
System.cl..
I know Java doesn't have pointers, but I heard that Java programs can be created with pointers and that this can be done by the few who are experts in java. Is it true?..
I'm writing my first java client/server program which just establishes a connection with the server sends it a sentence and the server sends the sentence back all capitalized. This is actually an exam..
While trying to connect to SQL Server 2005 Standard Edition through SQL Server Management Studio 2005 I get the following error:
I put all my effort to solve this problem but there is no solution. On..
I am trying to write a YAML dictionary for internationalisation of a Rails project. I am a little confused though, as in some files I see strings in double-quotes and in some without. A few points to ..
Console says
[root@ip-172-31-18-2 mysql]# service mysqld start
Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with error code. See "systemctl statu..
Is there any way to add a Facebook Share Button to a static HTML page? I've implemented a simple web site with no server side, just a bunch of html pages and I was abble to add a Like button because i..
I know this is a dumb question but I seem to have totally forgotten how to do it.
I have a HTML table and I want to remove all borders around all the cells so that there is only one border around th..
In Xcode 3, the line number of the current cursor location was displayed. I don't see this in Xcode 4. Is there a setting that will turn it on? Or a keypress that will give it to me?..
My program operates like this:
exe -p param1 -i param2 -o param3
It crashed and generated a core dump file, core.pid.
I want to analyze the core dump file by
gdb ./exe -p param1 -i param2 -o para..
I'm adding ".jpg" files to my Excel sheet with the code below :
'Add picture to excel
xlApp.Cells(i, 20).Select
xlApp.ActiveSheet.Pictures.Insert(picPath).Select
'Calgulate new picture size
With xlAp..
How can I configure my (embedded) Tomcat Session Timeout in a Spring Boot Application?
public class SessionListener implements HttpSessionListener{
@Override
public void sessionCreated(HttpSessionEv..
I want to use jQuery to delete cookies; I have tried this:
$.cookie('name', '', { expires: -1 });
But when I refresh the page, the cookie is still there:
alert('name:' +$.cookie('name'));
Why?..
What do the icons in the Eclipse debugger mean?
What do the icon decorators in Eclipse mean?
What do the icons in Eclipse's Package Explorer mean?
What do the little letters on top of Eclipse icons m..
I'd like to comprehensively understand the run-time performance cost of a Docker container. I've found references to networking anecdotally being ~100µs slower.
I've also found references to the run..
I have written the following code and continually see pastespecial method of class has failed. I have tried to overcome this issue, but nothing seems to work. I am trying to copy an entire sheet from ..
I've got a question regard Chart.js.
I've drawn multiple piecharts using the documentation provided. I was wondering if on click of a certain slice of one of the charts, I can make an ajax call depe..
I'm running Mysql 5.5 on Ubuntu 12 LTS. How should I enable LOAD DATA LOCAL INFILE in my.cnf?
I've tried adding local-infile in my config at various places but I'm still getting the "The used comma..
Possible Duplicate:
Quitting an application - is that frowned upon?
I want to offer the user an option to exit the application as I need to delete some sensitive data, which is stored in th..
Hi I'm trying to use the function setTimeout() in javascript except it's not working. Thanks in advance to anyone who can help.
<!DOCTPYE html>
<html>
<head>
<script>
..
I currently use a .bat file that is utilized to invoke a java file. If I wanted to utilize the same functionality on Mac OS what format changes would I make? (unless the .bat equivalent on Mac OS is t..
I want to edit multiple lines in eclipse, but I can't find any short cut or Plugin. In Geany I just press ctrl+alt+up/down I can add / edit multiple lines.
Maybe this example can explain what I mean:..
I have created a simple program to insert values into the table [regist], but I keep getting the error
Incorrect syntax near ')'
on cmd.ExecuteNonQuery();:
private void button1_Click(object s..
How can I pass a Javascript Array via JQuery Post so that all its contents are accessible via the PHP $_POST array?
Please show an example of code that would do the trick.
Thanks!..
I am writing a quiz in html and I would like to insert a consistent blank vertical space between questions (like one would use vspace{3 cm} in LaTeX).
For example:
<html>
<body>
..
I have Java main class, in the class, I start a new thread, in the main, it waits until the thread dies. At some moment, I throw a runtime exception from the thread, but I can't catch the exception th..
I was experimenting on using Node version 6.2.1 with some of my code. Had plans to migrate most of the hyper-callback oriented codes to something that looks cleaner and maybe performs better.
I have ..
I'm new to programming. I have created a basic form inside views/register.blade.php like this
@section('content')
<h1>Registration Form</h1><hr>
<h3>Ple..
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..
It's a question I got this afternoon:
There a table contains ID, Name, and Salary of Employees, get names of the second-highest salary employees, in SQL Server
Here's my answer, I just wrote it in p..
I'm writing a bash script where I need to pass a string containing spaces to a function in my bash script.
For example:
#!/bin/bash
myFunction
{
echo $1
echo $2
echo $3
}
myFunction "f..
I've created several Lambda functions using the web based editor. So far so good. I'd now like to start extending those with modules (such as Q for promises). I can't figure out how to get the modules..
I am new to JavaScript and I'm getting an error as below.
Uncaught TypeError: time.indexOf is not a function
Gee, I really thought indexOf() really was a function. Here is a snippet of my code:..
I want to have 3 divs aligned inside a container div, something like this:
[[LEFT] [CENTER] [RIGHT]]
Container div is 100% wide (no set width), and center div should remain in center a..
My command keeps timing out, so I need to change the default command timeout value.
I've found myDb.Database.Connection.ConnectionTimeout, but it's readonly.
How can I set the command timeout in Ent..
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'm trying to style tootltips using
.tooltip-inner{}
But i'm having troubles cause i can't find how to style tooltip small arrow.
As shown on screenshot the arrow of the tooltip is black i want to..
What is the difference between variables $a and $b?
$a = (Get-Date).DayOfWeek
$b = Get-Date | Select-Object DayOfWeek
I tried to check
$a.GetType
$b.GetType
MemberType : Method
OverloadD..
I have a date "10/10/11(m-d-y)" and I want to add 5 days to it using a Python script. Please consider a general solution that works on the month ends also.
I am using following code:
import re
from ..
Possible Duplicate:
How to split a string in C++?
Best way to split a string in C++? The string can be assumed to be composed of words separated by ;
From our guide lines point of view C s..
How can I quickly quote/unquote words and change quoting (e.g. from ' to ") in Vim? I know about the surround.vim plugin, but I would like to use just Vim. ..
When running ng serve I get this warning about my global CLI version being greater than my local version. I don't notice any issues from this warning, but I was wondering if the two versions should be..
I'm currently developing a physics app that is supposed to show a list of formulas and even solve some of them (the only problem is the ListView)
This is my main layout
<LinearLayout xmlns:an..
I'm looking for the rules involving passing C++ templates functions as arguments.
This is supported by C++ as shown by an example here:
#include <iostream>
void add1(int &v)
{
v+=1;
}
..
I was wondering, is there a way I can reset all the checkboxes, textboxes, numerics and other controls back to the default values without writing code for every control individually? This is the code ..
I have a class with a private static final field that, unfortunately, I need to change it at run-time.
Using reflection I get this error: java.lang.IllegalAccessException: Can not set static final bo..
How can I convert the following Json Response to a C# object?
{ "err_code": "0", "org": "CGK", "des": "SIN", "flight_date": "20120719",
"schedule":
[
["W2-888","20120719","20120719","1200","1600"..
I found this old thread (from over a year ago), which explains how come R doesn't support a multi-line comments (like /* comment */ of PHP, for example).
I am wondering if this has been resolved in ..
I want to iterate through a dictionary in python by index number.
Example :
dict = {'apple':'red','mango':'green','orange':'orange'}
I want to iterate through the dictionary from first to last, s..
I have a table with 21638 unique* rows:
vocabulary <- read.table("http://socserv.socsci.mcmaster.ca/jfox/Books/Applied-Regression-2E/datasets/Vocabulary.txt", header=T)
This table has five colum..
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..
I was thinking: they say if you're calling destructor manually - you're doing something wrong. But is it always the case? Are there any counter-examples? Situations where it is neccessary to call it m..
I'm looking for a way of to do a cross-browser iphone-like badge in CSS3. I'd obviously like to use one div for this, but alternative solutions would be fine. The important factor is that it needs to ..
I know this is so easy (doh...) but I am looking for a way to run a method on tapping or clicking a TextView line of text in an Android App.
I keep thinking about button listeners and anonymous metho..
Possible Duplicate:
What are the differences between pointer variable and reference variable in C++?
Are there benefits of passing by pointer over passing by reference in C++?
In both cas..
I'm using Xcode 8.0 beta 4.
In previous version, UIViewController have method to set the status bar style
public func preferredStatusBarStyle() -> UIStatusBarStyle
However, I found it changed t..
I am writing my first flask application. I am dealing with file uploads, and basically what I want is to read the data/content of the uploaded file without saving it and then print it on the resulting..
I need to run all of my .html files as .php files and I don't have time to change all of the links before our presentation tomorrow. Is there any way to "hack" this with my Apache server?..
I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900.
If I set the vncserver to run ..
When trying to identify erroneous data (often needing manual review and removal), I'd like an easy way of seeing hidden characters, such as TAB, Space, Carriage return and Line feed.
Is there a built-..
I'm trying to select all the rows out of a database using entity framework for manipulation before they're sent to the form
var ptx = [modelname].[tablename]();
ptx.[tablename].Select(????)
what go..
As it said in the subject I've to create a feature for a web-based application that will allow users to send print directly without prompting any dialog boxe just make the print i.e click and print, s..
I am wondering how in javascript if i was given a number (say 10000) and then was given a percentage (say 35.8%)
how would I work out how much that is (eg 3580)..
Can someone explain a "tracking branch" as it applies to git?
Here's the definition from git-scm.com:
A 'tracking branch' in Git is a local
branch that is connected to a remote
branch. When y..
I'm having a hard time getting the height of lower screen resolution because my screen resolution is 1920x1080.
Does anyone know how to get height and width of the screen resolution?
I checked my wo..
I am rendering a list of posts. For each post I would like to render an anchor tag with the post id as part of the href string.
render: function(){
return (
<ul>
{
..
I have a database with two tables User and Country. I want to relationship where many user can belong to one county. I implement this using hibernate using the following model classes:
@Entity (name..
I have an LINK field in my table. Some rows have a link, some don't.
I'd like to select all rows where LINK is present. (length is greater than X characters).
How do I write this?..
When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent():
Use escape:
escape("% +&=");
OR
use encodeURI() / e..
I need to pass a file path name to a module. How do I build the file path from a directory name, base filename, and a file format string?
The directory may or may not exist at the time of call.
For..
In my web.config I would like to specify more than one domain for the access-control-allow-origin directive. I don't want to use *. I've tried this syntax:
<add name="Access-Control-Allow-Origin..
Here's an example. Let's say I want to have an image overlay like a lot of sites. So when you click a thumbnail, a black overlay appears over your whole window, and a larger version of the image is ..
I have come across this PHP code to check email address using SMTP without sending an email.
Has anyone tried anything similar or does it work for you? Can you tell if an email customer / user enters..
I am trying to add a feature to scroll up and down a div based on button click. I was able to do the scroll down part easily, but got stuck wit the scroll up part and one more concern was a scenario, ..
I want to display a tooltip when the mouse hovers over a link in my custom rich edit control. Consider the following text:
We all sleep at night .
In my case the word sleep is a link.
When the ..
I am going through an eg pgm to create a make file.
http://mrbook.org/tutorials/make/
My folder eg_make_creation contains the following files,
desktop:~/eg_make_creation$ ls
factorial.c functions...
I want to execute a Bash script present on the system from a PHP script. I have two scripts present on the system. One of them is a PHP script called client.php present at /var/www/html and the other ..
I have a piece of JavaScript code which creates (using D3.js) an svg element which contains a chart. I want to update the chart based on new data coming from a web service using AJAX, the problem is t..
Is there any way (with a attribute flag or something like that) to enable form fields that are disabled to submit data?
Or, if that's not possible, is there any way to block fields from editing with ..
I'm having trouble displaying a Base64 image inline.
Can someone point me in the right direction?
<!DOCTYPE html>
<html>
<head>
<title>Display Image</title>
<..
%s@{fileID: \(213[0-9]*\)@\='{fileID: '.(submatch(1)-1900)@
I am using this regex search and replace command in vim to subtract a constant from each matching id.
I can do the regex find in VSCode b..
There is an HTML file (whose contents I do not control) that has several input elements all with the same fixed id attribute of "search_query". The contents of the file can change, but I know that I a..
I'm getting the error:
parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xED 0x6E 0x2C 0x20
When trying to process an XML response using simplexml_load_string from a 3rd party so..
I've tried to add the Canonical Partner repository, but I still can't find the sun-java6-jdk package. What is the right way to install the Oracle Sun JDK instead of OpenJDK on Ubuntu 10.10 (Maverick M..
I use the following to search for strings in my stored procedures:
use DBname
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%xxx%'
Is it easy to amend the above so that i..
The Original SQL Statement is:
SELECT SA.[RequestStartDate] as 'Service Start Date',
SA.[RequestEndDate] as 'Service End Date',
FROM
(......)SA
WHERE......
The output date format is YYYY/..
I'm using windows 8.1 64 bit
my code
import pdb
from moviepy.editor import *
clip = VideoFileClip(".\\a.mp4")
clip.write_gif('.\\aasda.gif')
the exception is at write_gif method
Traceback (most ..
I have setup the angular code on my local machine. I need to know the version of the angular that I am using in the project. how can I easily find it in cmd prompt?..
I have added two jQuery UI Dropdown Autocomplete script. Now I want get both value onchange of second dropdown and want to store separately in variable. How it is possible?
Any ideas or suggestions? ..
I want to do something like ls -t but also have the files in subdirectories included. But the problem is that I don't want the output formated like ls -R does, which is like this:
[test]$ ls -Rt
b ..
I'm trying to get Appfuse + tomcat + jRebel working.
Appfuse by default uses Cargo to download tomcat (ver. 7.0.33) and deploy the application to it. I wish to use an already installed tomcat (ver. 7..
I never understood it from the contrived unmarshalling and verbing nouns ( an AddTwo class has an apply that adds two!) examples.
I understand that it's syntactic sugar, so (I deduced from context) i..
The problem with ssh authentication:
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network..
Mac OSX Lion 10.7.
In an effort to get around weird environment stuff (homebrew wasn't installing wget, and I had all sorts of weird blocks and errors), I uninstalled zschrc and homebrew and a bunch ..
Quite a "simple" problem here and not sure why it's being so complicated.
Have a 100% (width) sized div.
Have another div positioned in the middle of this div (sized 940px width)
Any ideas? :) ..
I have this function in my controller.
[HttpPost]
public ActionResult Edit(EmployeesViewModel viewModel)
{
Employee employee = GetEmployee(viewModel.EmployeeId);
TryUpdateModel(employee);
..
How do you say the following in Microsoft SQL Server 2005:
IF EXISTS (SELECT * FROM Table WHERE FieldValue='') THEN
SELECT TableID FROM Table WHERE FieldValue=''
ELSE
INSERT INTO TABLE(FieldVal..
I am using String Array declare as zoom z[]=new String[422];. But this array stores value from 0 to 32, so I got null pointer exception after looping value 32.
How to solve this problem in java?
Ho..
I have tried lots of times but still I am not able to understand the usage of custom attributes (I have already gone through lots of links).
Can anyone please explain to me a very basic example of a ..
Is it possible to disable future date from today?
Let say today is 23/10/2010, so 24/10/2010 onwards are disabled.
Sorry I am very new in jQuery and JavaScript...
Is it possible to limit a text length to "n" lines using CSS (or cut it when overflows vertically).
text-overflow: ellipsis; only works for 1 line text.
original text:
Ultrices natoque mus mat..
Below is a code snippet, where we retrieve a form value.
Before further processing check if the value is not null..
var val = document.FileList.hiddenInfo.value;
alert("val is " + val); // this prin..
Is there any way to set the selected item in a drop down box using the following 'type' code?
<select selected="<?php print($row[month]); ?>"><option value="Janurary">January</op..
How do you create a Bash script to activate a Python virtualenv?
I have a directory structure like:
.env
bin
activate
...other virtualenv files...
src
shell.sh
...my code..
How to split the name string in mysql ?
E.g.:
name
-----
Sachin ramesh tendulkar
Rahul dravid
Split the name like firstname,middlename,lastname:
firstname middlename lastname
--------- --..
In order to run one application, a batch file has to be kicked off (which does things like start Jetty, display live logs, etc). The application will work only if this batch file is running. I am henc..
I have a large data table.
There are 10 million records in this table.
What is the best way for this query
Delete LargeTable where readTime < dateadd(MONTH,-7,GETDATE())
..
I am working on a Java application that uses Spring and Hibernate and runs on a Websphere.
I have run into a problem, where I expect Spring to load a Dao into my object, but for some reason that does..
I am making a .bat file, and I would like it to write ASCII art into a text file.
I was able to find the command to append a new line to the file when echoing text, but when I read that text file, al..
I am writing a server, and I send each action of into a separate thread when the request is received. I do this because almost every request makes a database query. I am using a threadpool library to ..
So i'm writing a tiny little plugin for JQuery to remove spaces from a string. see here
(function($) {
$.stripSpaces = function(str) {
var reg = new RegExp("[ ]+","g");
return str..
How do I upgrade OpenSSL in CentOS 6.5?
I have used these commands, but nothings happens:
cd /usr/src
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar -zxf openssl-1.0.1g.tar.gz
cd o..
I have a button on a spreadsheet that, when pressed, should allow the user to open a file, then copy columns A-G of the spreadsheet "Data", then paste the data from those columns on the current sheet...
I've searched around for use of localStorage in PHP, as I need to get localStorage data as a $var, in PHP and do stuff in PHP with it. Is this possible?
P.S. If anybody knows any good HTML5 resources..
I have 2 matrices and I need to multiply them and then print the results of each cell. As soon as one cell is ready I need to print it, but for example I need to print the [0][0] cell before cell [2][..
So this is the simple code for the button to open a certain link
<button class="btn btn-success" onclick="location.href='http://google.com';"> Google</button>
but it ope..
Is there anyone who knows how to connect a picture with the cell that it is in at microsoft excel?
For example in the first column I put some brands of mobile phones and in the second one some pictur..
I am writing a script for customising a configuration file. I want to replace multiple instances of strings within this file, and I tried using PowerShell to do the job.
It works fine for a single re..
First of all: yes, I read all the other threads on this topic. And not only those from this site... (you see, I'm a little frustrated)
Most of them come with the advice to use android:id instead of j..
I have a simple text area in a form like this:
<textarea style="width:350px; height:80px;" cols="42" rows="5" name="sitelink">
<?php if($siteLink_val) echo $siteLink_val; ?>
</tex..
I want to parse the following string with moment.js 2014-02-27T10:00:00 and output
day month year (14 march 2014)
I have been reading the docs but without success
http://momentjs.com/docs/#/parsing/no..
I keep getting an error, if without else.
I tried else if as well
for (;;){
System.out.println("---> Your choice: ");
choice = input.nextInt();
if (choice==1)
..
So I currently have a jQuery dialog with two buttons: Save and Close. I create the dialog using the code below:
$dialogDiv.dialog({
autoOpen: false,
modal: true,
width: 600,
resizable..
I have a Table (multiple rows, multiple columns, see below ) that is longer than one page.
How can I tell LaTeX to continue on the next page.
Adding a \newpage didn't work
Manually 'ending' and 'r..
Here is a simplified example of my df:
ds = pd.DataFrame(np.abs(randn(3, 4)), index=[1,2,3], columns=['A','B','C','D'])
ds
A B C D
1 1.099679 0.042043 0.083903 0.410..
Why the following example shows the image in Firefox 4, but not in Chrome 10 and Internet Explorer 8?
HTML:
<div style="background-image: url('http://www.mypicx.com/uploadimg/1312875436_05012011_..
I am just learning XML and how to use XSL files.
In an XSL file I found the following term:
xsl:template match="/"
What does this stand for?
And what could I use instead of the /?
Could I write tab..
I'm compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this:
Windows-->preferences-->installed jres--> jdk1.7.xx path
But this is showing an error
[ERROR]..
There seem to be several ways to structure parent poms in a multiproject build and I wondering if anyone had any thoughts on what the advantages / drawbacks are in each way.
The simplest method of ha..
I have tried this code to add from textbox1.text and textbox2.text into textbox3.text
private void textBox1_TextChanged(object sender, EventArgs e)
{
if(!string.IsNullOrEmpty(textBox1.Tex..
So for example:
function(input){
var testVar = input;
string = ...
string.replace(/ReGeX + testVar + ReGeX/, "replacement")
}
But this is of course not working :)
Is there any way to do..
I recently started using Docker and never realized that I should use docker-compose down instead of ctrl-c or docker-compose stop to get rid of my experiments. I now have a large number of unneeded do..
I want to write a common error handler which will catch custom errors thrown on purpose at any instance of the code.
When I did throw new Error('sample') like in the following code
try {
throw n..
I have too many files in .m2 folder where maven stores downloaded dependencies. Is there a way to clean all old dependencies? For example, if there is a dependency with 3 different versions: 1, 2 and ..
How can I show HTML snippets on a webpage without needing to replace each < with < and > with >?
In other words, is there a tag for don't render HTML until you hit the closing tag..
I'm trying to parse some HTML using DOMDocument, but when I do, I suddenly lose my encoding (at least that is how it appears to me).
$profile = "<div><p>various japanese characters</p&..
In a MVC2 project I moved a file from App_code to Content folder and compiled it. Then move it back again to App_Code and then changed its Build Action to "Compile". Now I get this error and I don't k..
I have a trivial console application in .NET. It's just a test part of a larger application. I'd like to specify the "exit code" of my console application. How do I do this?..
I was going through some shell script tutorials and found the following sample program:
#!/bin/sh
clear
echo "HELLO WORLD"
Can anyone please tell me what the significance of the comment #!/bin/sh a..