Monday, April 28, 2014
Oracle Rownum selection using RANK BY AKA resetting ROWNum based on column(s) data change.
How to generate a row number that resets with a given column1 and column2.
So you can do a select:
RANK() OVER (PARTITION BY COLUMN1, COLUMN2 ORDER BY COLUMN1, COLUMN2 desc, COLUMN3)
from blah blah blah
where
get rid of any data you don't want.
So an example in Costpoint would be:
select
empl_id, ORG_ID,
RANK() OVER (PARTITION BY EMPL_ID, ORG_ID ORDER BY EMPL_ID, EFFECT_DT, ORG_ID) as rownumber,
a.*
from empl_lab_info a;
If you want to see when someone had salary info and history changes group by assigned org with a rownum attached
Thursday, January 2, 2014
Deltek Time and Expense Weblogic LDAP Config with SSL
This quick screen shot and description on how to setup Weblogic LDAP connection for DELTEK Time and Expense with SSL to a non-local AD server. If you have questions feel free to contact TBS-LLC.
What we are trying to setup:
- We are trying to connect to LDAPS:\\LDAP.GOOGLE.COM:636
- "LDAP" is the name of the LDAP principals account.
- All TE users accounts resides in a AD group called TEUSER under the LDAP.GOOGLE.COM domain.
- AD usernames are stored in a userPrincipleUserName account with @GOOGLE.COM at the end. i.e. XXXX@GOOGLE.com
- Enter:
- LDAP.GOOGLE.COM into Host
- 636 into Port
- Principle place the Distinguished name in the form of "CN=LDAP, OU=LDAP-Service,....."
- Principle Password into Credential
- Click SSL Enabled

- Make sure you USER BASE DN and USER FROM NAME FILTER are Correct
- USER BASE DN is the top level of the tree
- USER FROM NAME FILTER is where you establish what field you want to filter on)
- The group Doesn't really matter because T&E has the LDAPHelper Weblogic authenticator.
Java AES Encryption
Java AES Encryption (256 Bit):
- First, look at http://stackoverflow.com/questions/15554296/simple-java-aes-encrypt-decrypt-example to understand a simple AES Encrypt and Decrypt
- Second, look at Apache Commons's http://commons.apache.org/proper/commons-codec/ for the ability to translate the raw binary string into a Base64/HEX value.
- Third, look at http://stackoverflow.com/questions/18362137/encryption-with-aes-256-java to understand how encryption works with Base64 conversion for DB storage
- Next, look at http://stackoverflow.com/questions/992019/java-256-bit-aes-password-based-encryption for detailed AES256 encryption/decryption
- I used the code from "After reading through erickson's suggestions...". With 1 small comment:
// I don't think this should happen, but just in case.. if (tmp != null) fout.write (tmp);- This is used for muti-part encryption. So make sure you don't just delete it or comment it out.
- Finally, look at Java 6 or Java 7 to understand how to overwrite the default 128 limit. Please read the disclaimer. I don't want anyone getting in trouble for US government export control rules.
Wednesday, December 11, 2013
How to get Wing War for Sega Arcade Working with MAME
This was one of my favorite Arcade games back in the day(1994). After all these years I finally got Sega Arcade - Wing War working on MAME ver 0.136 (Directions below) and took a quick video of the action. Enjoy!
Youtube Link:
https://www.youtube.com/watch?v=jsW5_YrII-I
These are the instruction I used to get Wing War for Sega Arcade working on MAME.
What you need:
Steps:
Youtube Link:
https://www.youtube.com/watch?v=jsW5_YrII-I
These are the instruction I used to get Wing War for Sega Arcade working on MAME.
What you need:
- MAME ver. 0.136. You have to use MAME ver 0.136 and not the latest version....
- Wing War Rom
- Joystick
Steps:
- First download MAME ver. 0.136. http://www.mamedev.org/oldrel.html
- I grabbed "mame0136b.exe" under Binary (Windows)
- Run the "mame0136b.exe" and extracted the program to a folder on your desktop
- I placed it in a folder called "mame0136b"
- Download Wing War Rom. It should be a 12.7MB zip file
- I am not going to put a link here. You can google it.
- Place the newly download rom zip file into mame0136b\roms folder on your desktop
- Plug in your joystick and wait for the drivers to install properly.
- Go into the root direct of mame0136b and run mame.exe
- Once you selected the game and the rom starts, hit TAB and select "Input (this game)".
- I mapped the following:
- 1 Player Start - I mapped it to 1 on my keyboard
- Coin 1 - I mapped it to 5 on my keyboard
- P1 Button 1 - View 1
- P1 Button 2 - Outside rear view (I use this one so I mapped it to button 4 on my joystick)
- P1 Button 3 - View 3
- P1 Button 4 - View 4
- P1 Button 5 - Joystick Trigger(Button 1) to fire guns
- P1 Button 6 - Joystick Button 2 to fire missiles
- P1 Button 7 - Joystick Button 3 to user smoke and avoid enemy missiles
- AD Stick X Analog - Joystick X axis (left and right)
- AD Stick Y Analog - Joystick Y axis (up and down)
- P1 Paddle Analog - Joystick Z axis + (Throttle control)
- Third go back to the previous menu and select "Analog controllers". I made the following change:
- AD Stick X Digital Speed - 4
- AD Stick X AutoCenter Speed - 0
- AD Stick X Reverse - On
- AD Stick X Sensitivity - 100
- AD Stick Y Digital Speed - 4
- AD Stick Y AutoCenter Speed - 0
- AD Stick Y Reverse - Off
- AD Stick Y Sensitivity - 100
- P1 Pedal 1 Digital Speed - 16
- P1 Pedal 1 AutoCenter Speed - 0
- P1 Pedal 1 Reverse - Off
- P1 Pedal 1 Sensitivity - 100
- After that return to the game.
- Insert 2 coins(press 5 twice) and press player 1 start(press 1).
- Off you go and Enjoy the game,
Monday, December 9, 2013
SAML2/ADFS and Deltek Products....
If you want to use ADFS and SAML2 authentication for Deltek Products, save yourself the headache and just don't bother at this point(12/2013). But just in case you are working with SAML2/ADFS and needs a quick reminder of which one is the "Service Provider" vs the "Identity Provider", there is a good article from Salesforce.
Tuesday, November 19, 2013
Mac -> Local PC VMware -> Hosted Server via Windows RDP
Was on a Screen Sharing with a Co-worker. He is using a Mac to run a Local Windows 2008 VM just so that he can Remote Desktop into another Windows 2008 machines on our company network. Confused yes me too. :P
Tuesday, March 12, 2013
Oracle Regular Expressions for Parsing XML
Oracle Regular Expressions for Parsing XML
Sample SCHED_PARAM values:
1. Schedule Type='Weekly' StartDate='2013-03-11' FirstRunTime='08:00' RunEveryXWeeks='1' DaysOfWeek='32'
2. Schedule Type='MonthlyDayOfWeek' StartDate='2013-03-11' EndDate='2013-03-19' FirstRunTime='08:00' MonthlyNthOccurrence='0' MonthlyDayOfWeek='0' Months='4095'
R
Using the Regular Expression:
Expression 1:
select REGEXP_SUBSTR(REGEXP_SUBSTR(SCHED_PARAM, 'Type=''[[:alnum:]]*''', 1, 1, 'i'), '[^'']+', 1, 2) as Type from SYNCH_SCHED_DETAIL;
Returns:
1. Weekly
2. MonthlyDayOfWeek
Expression 2:
select REGEXP_SUBSTR(REGEXP_SUBSTR(SCHED_PARAM, 'StartDate=''([[:alnum:]]*\-*)*''', 1, 1, 'i'), '[^'']+', 1, 2) from SYNCH_SCHED_DETAIL;
Returns:
1. 2013-03-11
2. 2013-03-11
Expression 3:
select REGEXP_SUBSTR(REGEXP_SUBSTR(SCHED_PARAM, 'FirstRunTime=''([[:alnum:]]*\:*)*''', 1, 1, 'i'), '[^'']+', 1, 2) from SYNCH_SCHED_DETAIL;
Returns:
1. 08:00
2. 08:00
Expression 4:
select To_date(REGEXP_SUBSTR(REGEXP_SUBSTR(SCHED_PARAM, 'StartDate=''([[:alnum:]]*\-*)*''', 1, 1, 'i'), '[^'']+', 1, 2) || ' ' || REGEXP_SUBSTR(REGEXP_SUBSTR(SCHED_PARAM, 'FirstRunTime=''([[:alnum:]]*\:*)*''', 1, 1, 'i'), '[^'']+', 1, 2), 'YYYY-MM-DD HH24:MI') from SYNCH_SCHED_DETAIL;
Will return an oracle date value for the Start Date + First Run Time
I am sure there are better way to code the Reg Ex.
Please leave me comment below if you have a better way
Subscribe to:
Posts (Atom)






