What are the Xms and Xmx parameters when starting JVMs? [duplicate]

What are the Xms and Xmx parameters when starting JVMs? [duplicate]

This question already has an answer here: How is the default Java heap size determined? 7 answers Please explain the use of Xms and Xmx parameters in J

The application may be doing too much work on its main thread

The application may be doing too much work on its main thread

I am new to Android SDK/API environment. It's the first I am trying to draw a plot/chart. I tried running different kinds of sample codes the emulator using 3 different free libraries, nothing is showing in the layout screen. The logcat is

Are PDO prepared statements sufficient to prevent SQL injection?

Are PDO prepared statements sufficient to prevent SQL injection?

Let's say I have code like this:$dbh = new PDO("blahblah");$stmt = $dbh->prepare('SELECT * FROM users where username = :username');$stmt->execute( array(':username' => $_REQUEST['username']) );The PDO documentation says: The parameters to

Is an array name a pointer?

Is an array name a pointer?

Is an array's name a pointer in C?If not, what is the difference between an array's name and a pointer variable? 1:An array is an array and a pointer is a pointer, but in most cases array names are converted to pointers. A term often use

Implementing the command pattern

Implementing the command pattern

I am in the design process of an application, and I would like to use the command pattern for undo/redo purposes. I did some research into the command pattern but the only thing I don't get is: Should a command have the undo and redo method

what is the difference between view and activity in android development?

what is the difference between view and activity in android development?

When do I need to create a new activity and when do I need to change the view?My app needs to do:screen #1two big buttons(sort of menu)screen #2list of items - depend on the selection on prev screenscreen #3another list - depend on the sele

How to generate VS proj with both 32-bit and 64-bit configurations using CMake

How to generate VS proj with both 32-bit and 64-bit configurations using CMake

Does any one know how to generate a VS proj/soln file with both 32-bit and 64-bit configurations using CMake. 1:You can't. With CMake you can generate separate solution files for 32-bit and 64-bit depending on the Visual Studio generator

Pyramid: Custom 404 page returns as “200 OK”

Pyramid: Custom 404 page returns as “200 OK”

I have a custom 404 view defined in my Pyramid app:@view_config(context=HTTPNotFound, renderer='404.pt')def not_found(self, request): return {}It works fine, except that the HTTP status code sent with the content is 200 OK, which is not

Add the installation prefix of “Qt5Widgets” to CMAKE_PREFIX_PATH

Add the installation prefix of “Qt5Widgets” to CMAKE_PREFIX_PATH

I don't know a lot about cmake, I'm trying to build a client using cmake and Qt. Getting the following error: CMake Error at alethzero/CMakeLists.txt:26 (find_package): By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this p

response.writeHead and response.end in NodeJs

response.writeHead and response.end in NodeJs

var https = require('https');var fs = require('fs');var options = { key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')};https.createServer(options, function (req, res) {

How to combine OnClickListener and OnTouchListener for an ImageButton

How to combine OnClickListener and OnTouchListener for an ImageButton

I need to do something when the user clicks the ImageButton I've tried to create a static class that implements both OnClickListener and OnTouchListenerstatic class ClickListenerForScrolling implements OnClickListener, OnTouchListener that

CSS property value from class name

CSS property value from class name

It is possible to pass parameters for CSS in class name? For example:.mrg-t-X { margin-top: Xpx;}TestIn this example X should be 10. 1:No it isn't. The closest we have to this is the attr() function, but that only works within the cont

Combined line & bar geoms: How to generate proper legend?

Combined line & bar geoms: How to generate proper legend?

The legend for d2 looks fine; for d1, I would like to show just the hoizontal line against a white/transparent backgounnd.df = data.frame( Date = c("2012-11-30", "2012-12-03", "2012-12-04"), d1 = c(9, 5, 11), d2 = c(4, 6, 3))ggplot(df, a

How to go about protecting files from unauthorized downloads

How to go about protecting files from unauthorized downloads

I am creating a membership site using PHP and a MySQL database, I have the means for users to log in using their username and password. All pretty standard stuff.I even got the system in place to allow registered users to download sample vi

How to read app.config from a custom location, i.e. from a database in .NET

How to read app.config from a custom location, i.e. from a database in .NET

I am trying to override the ApplyConfiguration method in my custom ServiceHost to read the configuration from a database instead of app.config. Ideally I would want to be able to do something like this:Configuration config = GetConfigFromMy

uEye camera with python on Windows

uEye camera with python on Windows

I need to get a uEye camera working with python on Windows in order to take pictures and operate on the live stream.Since uEye cameras are widely spread industrial cameras I would have thought that there is a standard solution to this; howe

pandas - multi index plotting

pandas - multi index plotting

I have some data where I've manipulated the dataframe using the following code:import pandas as pdimport numpy as npdata = pd.DataFrame([[0,0,0,3,6,5,6,1],[1,1,1,3,4,5,2,0],[2,1,0,3,6,5,6,1],[3,0,0,2,9,4,2,1],[4,0,1,3,4,8,1,1],[5,1,1,3,3,5,

How to insert a new key and value in multidimensional array?

How to insert a new key and value in multidimensional array?

Following is the output of my multidimensional array $csmap_dataArray( [0] => Array ( [cs_map_id] => 84 [cs_subject_id] => 1 ) [1] => Array ( [cs_map_id] => 85 [cs_subje

Bootstrap: Aligning two buttons on the same row

Bootstrap: Aligning two buttons on the same row

Basically what I'm attempting to do it to get two buttons on the opposite side of the website but on the same row. Here's what it looks like: And here's the code for what I have:

AngularJS: Call a particular function before any partial page controllers

AngularJS: Call a particular function before any partial page controllers

I want to call a particular function: GetSession() at the beginning of my application load. This function makes a $http call and get a session token: GlobalSessionToken from the server. This session token is then used in other controllers l

syslog_r for Linux?

syslog_r for Linux?

Folks, I can't find the re-entrant version of syslog() for Linux...is there one? And if no, what do you? The obvious answer is to move logging facility into separate thread and serialise access to syslog... 1:According to the POSIX speci

Combining elements of list of lists by index

Combining elements of list of lists by index

Consider the following list of lists:lst = list(list(c(1,2), c(3,4)),list(c(5,6), c(7,8)),list(c(9,10), c(11,12)))The list lst contains three lists, each list containing two vectors as elements. I would like to combine the elements of the u

Accessing “Public” methods from “Private” methods in javascript class

Accessing “Public” methods from “Private” methods in javascript class

Is there a way to call "public" javascript functions from "private" ones within a class?Check out the class below:function Class(){ this.publicMethod = function() { alert("hello"); } privateMethod = function() {

Is it possible to use the logical call context within a unit test in VS 2010?

Is it possible to use the logical call context within a unit test in VS 2010?

Is it possible to make this test not throw an exception? It appears that adding any non-GACed class into the logical call context causes an exception to be thrown in line 2 of the test. Test 'TestProject1.UnitTest1.TestMethod1' failed: T

Open a second winform asynchronously but still behave as a child to the parent form?

Open a second winform asynchronously but still behave as a child to the parent form?

I am creating an application and I would like to implement a progress window that appears when a lengthy process is taking place.I've created a standard windows form project to which I've created my app using the default form. I've also cre