Sunday, 30 December 2018

How to include local library in Maven based Java EE project

Edit pom.xml and include

<configuration>
                 <packagingIncludes>WEB-INF/lib/*.jar</packagingIncludes>

Wednesday, 24 October 2018

What to do when Maven dependency downloads are canceled in process and error comes next time

find ~/.m2  -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;


For windows:
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i

Wednesday, 18 July 2018

Increasing Heap Size with Netbeans

Edit netbeans.conf in Netbeans installation directory, etc subdirectory and set netbeans_default_options. An example is given below

netbeans_default_options="-J-client -J-Xss2m -J-Xms1024m -J-Xmx2048m -J-XX:PermSize=2048m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-
Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true"

Thursday, 9 November 2017

Exporting/Importing to/from CSV in Postgres using the command line

Export \copy (query) to  'path\file.csv' delimiter as '$', NULL as E' ';

\copy does not require superuser privileges. copy does.

Import
\copy <table_name> from 'path\to\csv' delimiter as '$';






Friday, 20 May 2016

Exporting to CSV

EXPORT TO result.csv OF DEL MODIFIED BY NOCHARDEL STRIPLZEROS SELECT col1, col2, coln FROM testtable;

Thursday, 7 April 2016

Connecting to Oracle 11G from VB 6

The steps are the same as to connect to Oracle 10G, except for one matter - we have to set the current schema before running any queries through - ALTER SESSION SET CURRENT_SCHEMA=<SCHEMA_NAME>

Tuesday, 5 January 2016