tag:blogger.com,1999:blog-39459606712617110072024-02-07T16:21:28.497+08:00Programmer's JournalSharing experience as a programmer, computer enthusiast and a team lead.
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.comBlogger232125tag:blogger.com,1999:blog-3945960671261711007.post-75405285432465552692016-04-16T17:02:00.002+08:002016-04-16T17:07:12.065+08:00Script to get your Windows KeyI found the following article on how to obtain the Windows Key without installing any third party software. This is useful but may not be necessary to reinstall your windows should you want perform a fresh Windows install; especially for those who did a Windows 10 upgrade.
The script is as follow:
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Strovekhttp://www.blogger.com/profile/13905093167036022419noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-60386250901677968612015-08-24T19:00:00.000+08:002015-08-24T19:00:07.094+08:00Java Web Tier Framework ComparisonI found this old reference in my collection, not sure how much of this is still valid but thought of posting it here so it will not get loss.
<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
FrameworkDescriptionProsConsReference InfoLicensing
GWTGoogle Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications easy for Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-31525253673537403112015-07-31T19:07:00.001+08:002015-07-31T19:07:11.827+08:00Forward Mails Based on Search CriteriaHave you ever wanted to forward all mails that matching a search expression? That option is not available through the Gmail interface but it is relatively easy to do that with a script.
An example of the script is as follow:
function forwardMail() { var threads = GmailApp.search("before:2009/07/01 after:2009/06/30"); // second search string. for (var i in threads) { &Strovekhttp://www.blogger.com/profile/13905093167036022419noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-35303321270836396102015-07-15T20:45:00.000+08:002015-07-15T20:51:28.452+08:00Using MailApp.SendMailI thought that you could only MailApp.SendMail api in Google Script with standard parameter for example:
MailApp.sendEmail(recipient, subject,body)
However, I just realize that you just need to use braces to use other advance parameters. For example to add cc, you can do the following.
function sendTestMail()
{
var toList = "strovek@gmail.com";
&Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-41027730141861517032014-10-02T19:00:00.000+08:002014-10-02T19:00:06.654+08:00Useful Windows commandsReceived the following list of commands from a friend that can be run off from the Run Command Prompt:Program Run Command...Accessibility Controls = access.cplAccessibility Wizard = accwizAdd Hardware Wizard = hdwwiz.cplAdd/Remove Programs = appwiz.cplAdministrative Tools = control admintoolsAdobe Acrobat ( if installed ) = acrobatAdobe Distiller ( if installed ) = acrodistAdobe ImageReady ( if Strovekhttp://www.blogger.com/profile/13905093167036022419noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-2652059637549495322014-07-08T19:34:00.000+08:002014-07-08T19:34:00.365+08:00Turning on Wifi for Windows using Command lineThe configuration on my notebook in the office automatically disables my wifi when I connect to our network by cable. On several occasions, the wifi dos not turn back on after I remove my PC from the docking station. I was also unable to find anything in the control panel on Windows 7 to help me do this, luckily, I found the solution from this article. The solution is shown below. An alternative Strovekhttp://www.blogger.com/profile/13905093167036022419noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-32526904493587579182013-10-16T20:00:00.000+08:002013-10-16T20:00:09.292+08:00Limiting GApp search to a folderFound this trick in a discussion on the topic. This is a feature lacking in the new search operator.
Click on folder so you are only viewing within the folder you want to search
The URL in your browser location bar will change to something like:https://drive.google.com/?ui=4&authuser=0#folders/0B6AzksONG.....
Copy the text from the URL which comes after "folders/"
Insert that text instead Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com1tag:blogger.com,1999:blog-3945960671261711007.post-73275614944667972152012-12-27T22:14:00.001+08:002012-12-28T11:26:36.740+08:00Java Script to Produce Proper Capitalization
The code is as follow:
/*
* Title Caps
*
* Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008
* Original by John Gruber - http://daringfireball.net/ - 10 May 2008
* License: http://www.opensource.org/licenses/mit-license.php
*/
(function(){
var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)";
var punct = "([!\"#$%&'()*+,./:;<=>?@[\\\\Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-57625875862419488552012-11-30T07:00:00.000+08:002012-12-28T11:27:06.779+08:00JDBC Connection String to Use LDAP
If LDAP allows anonymous.
String ldapHost = "ldap-server:389";
String context = ",dc=nl,dc=abnamro,dc=com";
String serviceName = "mts-a-de-grid";
String user = "aldo";
String pass = "aldo";
String url = "jdbc:oracle:thin:@ldap://" + ldapHost + "/" + instance + ldap_context;
OracleDataSource o = new OracleDataSource();
o.setUser(user);
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-58674755570199815032012-10-19T18:30:00.000+08:002012-10-19T18:30:03.113+08:00sudo: /etc/sudoers is mode 0640, should be 0440If you encounter the following error, it is likely because you ran the su command while your current folder is /etc and the sudo is in the same folder.
Reference:
http://askubuntu.com/questions/189818/how-to-repair-sudo-etc-sudoers-is-mode-0640-should-be-0440Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-80394124395747979062012-10-17T19:00:00.000+08:002012-10-17T19:00:09.164+08:00Retrieving JDBC version informationThe following is how you can retrieve the jdbc version:
import oracle.jdbc.OracleConnection;
import oracle.jdbc.pool.OracleDataSource;
import java.sql.SQLException;
import java.sql.DatabaseMetaData;
import java.util.Properties;
public class JDBCVersionInfo {
public static void main(String[] args) {
try {
&Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-57376014814666613542012-10-13T07:00:00.000+08:002012-10-13T07:00:03.948+08:00Allowing your netbook to go beyond 1024x600One of the issues for many netbooks is the max resolution allowed is 1024x600. Unfortunately, that prevents you from seeing and accessing part of the screen in many applications.
The solution is as follow:
1) Run regedit2) Search and modify all values "Display1_DownScalingSupported" from "0" to "1"3) Restart the system4) Enjoy with the two new resolutions 1024x768 i 1152x864 Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-36606752147771567122012-10-12T11:52:00.002+08:002012-10-12T11:52:47.648+08:00Solution to Windows 7 unable to connect to Windows ServiceI encountered the following error after connecting to my DSL modem which failed to connect to internet. I had a disruption of service from my service provider.
After the windows started up, everything was working but the task bar was all white. I am using Windows 7 Starter edition.
The solution is as follow:
Click on Start button.
Type Cmd in the Start Search text box.&Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-84889805394493254002012-10-03T18:00:00.000+08:002012-10-03T18:00:13.980+08:00Show Intel Proset Wifi Connection Utility icon on the Task BarThis will allow you to make the Intel ProSet Icon visible on your Task Tray.
Click on the Windows
Start button -> Intel PROSet Wireless -> Wifi Connection Utility
In the Wifi Connection Utility, select
Tools -> Application Settings
Select show icon on the Task Bar.
With the icon on the task tray, it will be much easier to select the profile you want to use to Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-24584542629748650902012-10-01T18:00:00.000+08:002012-10-01T18:00:16.559+08:00JBoss Admin tutorialThe tutorial for JBoss administration can be found here.
One good info from the site is the JBoss Architecture, the following is the architecture for JBoss 5.
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-47596688852064832842012-09-28T09:18:00.001+08:002012-09-28T09:18:51.990+08:00Locating your phone if it is under Google Device PolicyIf your company is using Google for Business and you have Google Device Policy App installed and enabled on your Android Phone.
There is a page that will help you locate your phone.
The url is:
https://www.google.com/apps/mydevices/b/0?pli=1
Note, however, that this is possible only if you phone has recently connected to internet (wifi) and has GPS enabled
There are also some options like Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-18481533875887068472012-09-26T20:42:00.000+08:002012-09-26T20:57:19.021+08:00Taking a screenshot on your un-rooted Android PhoneHTC Desire HD
I found this by accident. This works with HTC Desire HD. I then did a search and found that the trick has been there all this while (since the 3.5 upgrade) I read that it is a feature in HTC Sense 3.5 and higher, not sure if similar function is available for non HTC phones.
Press the standby/on button and the home button at the same time.
Key thing to remember is Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-57571058449937877992012-09-11T18:00:00.000+08:002012-09-11T18:00:00.379+08:00Blog on design by 37 signalI came across this site while reading some emails on copywriting. This blog is by a company called 37 signals.
The site is found here.
Some of the articles are as follow:
Clarity over brevity in variable and method names
Good Enough
Nagios Monitoring Performance
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-33166300435445317382012-09-01T09:30:00.000+08:002012-09-01T09:30:00.316+08:00Control output from PL/SQLUsually when I write a PL/SQL script and schedule it, there are certain things I want to generate and record into a log file. I usually do that using a pipe command. Assuming my program is in a file called comp.sql, I would then execute:
sqlplus scott/tiger@orcl comp.sql >> comp.log
Within the comp.sql, I will start with the following commands:
SET TIMING ONSET Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-31370594615559436642012-08-31T18:00:00.000+08:002012-08-31T18:00:09.385+08:00Executing dynamic code in PL/SQLThis is a sample of how to execute a dynamic code to create a partition:
PROCEDURE cre_part_tab (ptable IN VARCHAR2, ptag IN VARCHAR2, plim IN VARCHAR2) IS /********************************************************* * Procedure to facilitate creating of new Partitions&Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-85035474234417144312012-08-30T15:02:00.000+08:002012-08-30T15:02:45.319+08:00Using a procedure within a Oracle TriggerThis is a sample how you can declare a procedure in the Declare section of the PL/SQL block. This will reduce the number of redundant code in your program.
In the sample below, I want to log changes to value of fields within an employee master database. I will make the assumption that the tables are already there.
Create Or Replace Trigger trEmp_AttribUpdBefore Update Of Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-14077563854332804232012-08-29T08:27:00.003+08:002012-08-29T08:27:56.653+08:00SQL command to find the location of the trace file in Oracle
select u_dump.value || '/' || instance.value || '_ora_' || v$process.spid || nvl2(v$process.traceid, '_' || v$process.traceid, null ) || '.trc'"Trace File"from V$PARAMETER u_dump cross join V$PARAMETER instance cross join V$PROCESS join V$SESSION on v$process.addr = V$SESSION.paddr where u_dump.name = 'user_dump_dest' and instance.name = 'Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-29666564393143841942012-08-01T18:00:00.000+08:002012-08-01T18:00:04.278+08:00Postgres Memory Architecture vs Oracle Memory Architecture
The following is the memory architecture for Postgres 9.0. The image is obtained from another blog which has the full explanation.
Oracle Memory Architecture is as follow. The information is obtained from the Oracle document.
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-88603973513476094142012-07-24T18:00:00.000+08:002012-07-25T15:03:58.743+08:00SQL JoinsComing from an Oracle environment, I have a problem remember the joins. This document will help me remember. In the sample below, the SQL query with the word join is ANSI SQL compliant and works also with other databases like postgres, MySQL, SQLServer etc.
Sample Data
I will use two tables for the examples.
SampTab1 - data is as follow:
NAME
ROLE
John
Mascot
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0tag:blogger.com,1999:blog-3945960671261711007.post-85292594261735271912012-07-18T17:49:00.001+08:002012-07-18T17:49:40.450+08:00Sendmail vs Mailxsendmail has the 'intelligence' to figure out how to send the mail to a recipient not on the local machine - provided the machine has access/can route to the network where recipient is located. In order for mailx to do this, you need to use /etc/aliases ( /etc/mail/aliases )
Reference
https://forums.oracle.com/forums/thread.jspa?messageID=8258664
Strovekhttp://www.blogger.com/profile/10241249259045455763noreply@blogger.com0