Improved overall PostgreSQL performance

What's the best way to increase the speed of a query in PostgreSQL that's performing a MAX(id) aggregation? I have a modest number of records associated with an id, which I can COUNT() in a second e.g. select count(id) as cnt from mytable where ref_i

Centering Dialog using JOptionPane.showMessageDialog

I've always been using code similar to the following to display dialogs: JOptionPane.showMessageDialog(JOptionPane.getFrameForComponent(this), - yada However, I'm now thinking that this is "more correct": JOptionPane.showMessageDialog(getRootPan

How to prevent automatic logon after you create a user

I add accounts-password and accounts-base packages in Meteor When I create user like this: Accounts.createUser({username: username, password : password}, function(err){ if (err) { // Inform the user that account creation failed console.log("Register

How to stop data overwriting

I am trying to save in my iOS app some data. I use the following code : NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [docume

C ++ delete an object

I am not experienced in handling of the memory in a C++ program, so I would like a piece of advice in that case: I want to create a new Object in a function in a class which is essential till the end of the program. As far as I am concerned, if I use

NUMPY Operations: Memory Efficiency: PYTHON

I have a memory constraint of 4GB RAM. I need to have 2.5 GB of data in RAM in order to perform further things import numpy a = numpy.random.rand(1000000,100)## This needs to be in memory b= numpy.random.rand(1,100) c= a-b #this need to be in code in

Definition of the ONE asp.net request?

How do you define ONE asp.net application? Does it have to be built under one solution or does it have to be deployed under one application under IIS? Can multiple web projects be deployed under one IIS application (so that they have access to each o

jqGrid - Browse the lines using the up / down arrow keys?

Is it possible to navigate between rows using the Up and Down arrow keys? For example, if the first row in the grid is selected and the user presses 'down', I would like the grid to unselect that row and select the next row down in the grid. There is

C-reference call when sending pointers

Look At these three simple codes 1. void call_by_reference(int *y) { (*y) = 20; printf("Inside call_by_reference y = %d after adding 10.\n", *y); } int main() { int *b=(int *)malloc(sizeof(int)); //*b = 10; call_by_reference(b); printf("b =

SQL Server 2008 R2 stuck in single user mode

Having executed a DB deploy (from a VS SQL Server database project) on a local database, which failed, the database has been left in a state where it has single user mode left on (the deploy runs as single user mode). When I connect to it from SSMS a

How to deploy an existing SSIS package in sql server 2012?

I am working on SSIS Package .I added one more data flow task to existing ssis package.After complition of adding new task i rebuilded the Package it was suceed with out any errors . Do i need to deploy it to Development server?Background The 2012 SS

PHP MYSQL JQuery Long Polling - Does not work as expected

My long polling implementation isn't working. Been having a very difficult time understanding where to look toward debugging said code. Key Points No Errors Long polling working randomly (only responds to some changes in MySQL with no distinct patter

Problem Accessing the Database in Windows 7 MS Visual Studio

I developed a small application which accesses a MS access database on my computer using VB.net. I developed the program on windows xp 32 bit. At the moment I am using windows 7 64 bit and the program simply will not run. I get a null reference excep

Get a private key from a .pem RSP file

This question already has an answer here: Decrypting an OpenSSL PEM Encoded RSA private key with Java? 1 answer Given this .pem file (generated with openssl and encrypted with a password): -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-In

Add an empty line between the string group

I know this is probably one of dumbest questions ever but my brain seems off. I have this method which makes a string out of vCard: public static String process(String vCard) { ArrayList<ArrayList<String>> vCardData = parseData(vCard); if (vCa

Excel external data in a table

I am working on an excel spreadsheet that takes data from a CSV file (produced automatically by an external system). I have used: Data->Get External Data->From Text And it works perfect ! However i am not able to format the imported data as a table

How to set implicit UITextView contentSize? (Swift 3 / xCode8)

I have a need to set the contentSize of a non-scrolling UITextView exactly to it's superview's frame. I need to do this for the purpose of getting the range of characters that fit, and while I know there's better methods for doing this, or even bette

Disable deletion but enable moved cells in UITableView

I'm aware of the two methods - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return indexPath.section == 0; } - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { retu

How do you develop a plugin for IE?

I have tried with the help of many sites which is available in the Google search. However, I didn't get any solution for IE. I want to build a plugin-in from scratch. I have the experience in Firefox plugin development but not in IE.There's an open s