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

In DB2 listing all the tables in a schema

Type db2cmd, connect to a database and type - db2 list tables for schema <name>

Creating a database in DB2

To create a database in DB2 you open a DB2 Command Line Processor using the command db2cmd, and enter the command - db2 create database <name> automatic storage yes