Friday 17 February 2017

i18N report xls

i18N report.. obviously the name say the meaning.. but the task is simple, the header in the report will be in english, but that should come from database.

* Initially thought of hitting db and taking a query and have 3 classes, 1 with list<reportvalue>, reportHeaderObject putting this object into another object say ReportObj. This !dea suggested by my Tech Lead, thanks. very good suggestion. while implementing another !dea hit in mind.

* Instead of creating new classes, set the value directly into the model, when we creating a variable. Think, you didn't got my point. let me clarify..

we have a cron/scheduler which will run every 15/30 mins, hit the database and update the properties file, that file we are using for i18N translation. My !dea is, instead of hitting to the db again, take the value directly from this properties file. googled..




ResourceBundle rb = ResourceBundle.getBundle("test.bundletest.mybundle");
String value = rb.getString(key);
with this, half of my task was over.. 

the second half is, how to set this object in the UI ?

saw the code, implemented by my colleague(obviously, on leave, enjoying weekend). Njoy Ramesh :D

PURE JAVASCRIPT (O _ O), however understandble.. 

changed in some places, get my object, set that as column header, BiNgOoo



Wednesday 8 February 2017

thanks BaLaJ!

Today, Unknowingly deleted a column values, by noon, a colleague send mail to all, not to delete any values, without his knowledge like that




issue, got serious.. 

luckily found a query in http://stackoverflow.com/questions/19853150/rollback-a-committed-transaction
and thinking of how to implement it..
Explained the scenario to Balaji, with in minutes he put the query. Thats why, we call him Geekbot :D

ill say what i understand..

i took this oracle query..

select * from table as of timestamp timestamp '2017-02-08 17:30:00' order by id

1. Balaji, looked at it..
2. He copied, all the data,
3. pasted it in excel
4. kept only necessary columns
5. in excel he wrote query
 =CONCATENATE("UPDATE table SET TYPE='",C1,"' WHERE ID=",A1,";")
6. he press enter, update query came for all the entries..

Done. Big issue resolved in minutes, Thanks Geekbot. :D