We have requirements to produce Payment Requests through Oracle E-Business suite custom interface, where the users are allowed to select different currencies based on the payment.
Different currencies means different precisions, US $ 2, Indian Rupees 2, while Kuwait, Bahrain have 3 precisions to maintain…
So the amounts displayed on reports needed to be formatted properly and we were doing some hardcoded formatting like
Now we have more currencies to deal with, hence came up with following simple function, which accepts the amount, precisions as inputs and returns a VARCHAR2 string as formatted number!
[code language=”sql” gutter=”false”]
CREATE OR REPLACE FUNCTION xx_format_number (P_AMOUNT IN NUMBER,
P_DEC_PREC IN NUMBER)
frm_1 VARCHAR2 (30) := ‘fm999999999990.’;
new_num VARCHAR2 (30);
SELECT TO_CHAR (P_AMOUNT,
RPAD (frm_1, 15 + P_DEC_PREC, ‘90000000000000000’))
You can check the function like following
[code language=”sql” gutter=”false”]
SET SERVEROUTPUT ON;
l_new_num VARCHAR2 (30);
l_new_num := xx_format_number(.009,3);
Check it out, and let us know whether it worked for you!
Download & install the below from git, which is easier and cleaner for less tech savvy users.
Updated on 12th October 2016
The below hack is applicable to Windows 10 also, however, after the RedStone update, the registry hack entry “might” get removed and if you still prefer to right click and lock the drive without restarting, you will have to import the registry once again.
Start registry editor (double click to merge is NOT anymore supported), from the “File menu” Select import and point to the lock-bde.reg or whatever name you have given to the registry file that was manually created.
End of update //12/October/2016
The major difference between Windows 8.x Professional and Windows 7 Professional? Well you have free Bitlocker encryption for your 8.x Windows box(professional onwards), while the same is limited to Ultimate and Enterprise editions for Windows 7
Enabling Bitlocker on a drive is pretty easy, right click and go on.
Obviously we will not recommend you to bitlock your root drive. If you do, you are on your own :)
Now we have a problem, to unlock you must enter a password or other bitlocker supported authentication methods, which is fine. The concern is the unlocked drive remains unlocked for any user logs into the same computer until a restart.
For me this is a clear concern. I have some stuff which is not appropriate for my 7 years old daughter, or for a friend who just wants to “check his emails” during a visit.
After loads of searches, I found some nice leads which helped me to re-lock a drive by right clicking the bitlocker enabled drive in the explorer window.
Below listed were the actual links, which helped me to achieve the objective on my Windows 8.1 boxes (Office laptop & Home PC)
spreadbytes solution had one problem, I am using the boxes without UAC, thus while the .vbs script fires, nothing happens and the drive remains unlocked
Technet thread had the exact requirement addressed & all I needed to do was, alter the scripts a bit here and there to achieve my target
Open notepad or notepad++ and copy the below text and save it as lock-bde.reg
Windows Registry Editor Version 5.00
"AppliesTo"="(System.Volume.BitLockerProtection:=1 OR System.Volume.BitLockerProtection:=3 OR System.Volume.BitLockerProtection:=5)"
The hex values mentioned over here creates an entry like following
Once the value created, you can change the text as you desire to suite your situation (for Example, my development machine was not reading the PATH information properly, hence I was forced to add C:\Windows\system32 in front of the command
Open notepad or notepad++ and copy the following text into it. Then save as “manage-bde-lock.vbs”, and copy to c:\windows\system32
Args = ""
Last = Wscript.Arguments.Count - 1
For i = 0 To Last
Args = Args & " " & Wscript.Arguments.Item(i)
Args = Replace(Args,"\","")
CreateObject("Shell.Application").ShellExecute "manage-bde.exe", "-lock -forcedismount " & Args, "", "runas", 1
That’s it. You should get “Relock Driver…” context menu by right clicking on the bitlocker enabled driver from now onwards