Emacs insert series

In Excel you can easily fill in a column with a list of values.
Some times also in Emacs you my need to write down a bunch of similar code.
The dotimes function with the “elsp eval”
M-x : (Esc + : on windooze)
will solve your trouble easily.
Try out this code on scratch buffer:

(dotimes (i 15) (insert (format "Guys born on %04d will be %02d years old on 2017 \n"  (+ 1970 i) (- 2017 (+ 1970 i)) )))

and live happy

Also, in a regexp replace you can use the ‘ \, ‘ syntax to push an elisp expression:
For instance enter \,(1+ #1), where , indicates that an elisp form to substitute follows, 1+ is an increment function, and #1 is the first captured match text, interpreted as a number.

Example of camel case transformer:

M-x replace-regexp
Replace regexp: \(\w\)\(\w+\)Value(
Replace regexp with: get\,(upcase \1)\2(

Italian Accent Oracle fix

In Italian language we have accent words like àèéìòù

They are quite important because for instance “is” is spelled

è

whereas “and” is spelled

e

Accent are bad guys even today: if you copy them from MS-Word inside an Oracle sql script you can end up with different UTF-8 values.
Also the accent are likely to be destroyed if you past them in your html page without using the correct html entity (i.e. è )

Sometimes you need to export the data inserted with accent: an Oracle Virtual column can be an elegant solution….if you have at least Oracle 11g.

 

Also a magic update can fix some nasty problems….here the solution:

 

ALTER TABLE TEST_TABLE ADD( NAME_NORMALIZED generated
always
AS
( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE( REPLACE(
ACCENT_COLUMN,
'à','a'''),'è','e'''),'é','e'''),'ì','i'''),'ò','o'''),'ù','u''') ));

Arduino Real Time OS Evolution (flash news)

A new version of an Arduino Realtime OS is on the go:

I have used with profit and fun NilRTOS, and I strongly suggest to you this new variant.

A preemptive multi tasking RTOS in a 2KB 1-MIPS, 8 bit microcontroller remember be the ugly time when a MS-Windows 3.x with 1 MB of RAM was an inferior operative system no-preemptive at all, but with nice software like Excel and Access

Org Mode parser 0.1.3 is out!

Beauty (OrgMode Parser 0.1.3) is here to stay!
OrgMode parser is a small nodeJS library to parse Emacs OrgMode files (more info at this link).

This version features:

  • Fixed empty header issue
  • Code Cleanup
  • Migration from jade to pug2 (new name of jade)
  • Added optional logging framework (winston)

Also I’d like to thank all the people contributed: I have a list now.

 

 

 

Oracle SQL Developer Keep Alive plugin

On some environment, on some customers, Oracle connections are drop after some idle time (i.e. 2 minutes).

I have found a small plugin for Sql Developer to solve this issue: it is very handy and logs its usage. Code is also very clean