Skip to main content

Posts

Showing posts from September, 2013

XLSM: A macro function for excel-sheet to find the Value of a selected Key

Type the text below in the excel-sheet formula bar =Trouver(ResultSheet!A1, SourceSheet!A1, SourceSheet!A20, SourceSheet!B1) Macro: 'Name: Trouver (Find) 'Creator: Abhishek Kumar 'On: 16 May 2011 'For: Vijay Kumar Mittal 'Email: akbittu@gmail.com Public Function Trouver(searchKey, fromKeyRef, toKeyRef, getValFrom) Dim rCell As Range, foundVal As String For Each rCell In Range(fromKeyRef, toKeyRef) If (searchKey = rCell.Value) Then foundVal = Sheets(getValFrom.Parent.Name).Cells(rCell.Row, getValFrom.Column) End If Next rCell Trouver = foundVal End Function

To reduce pics size without reducing it's quality

Download the Google's Picasa from this link [ http://dl.google.com/picasa/picasa39-setup.exe ] Follow these steps: Install Picasa on your system and follow the instruction while installation After installing, let it search for all the photos on your system When searching completes then look for your desired pics in Picasa  Select the pics that you want in reduced size Then press Cntrl+Shift+S or alternately File → Export Picture to folder ... Set the saving location etc in the opened popup Choose 'Resize to' option in the 'Image size' section Click on Export button to get the selected pics in reduced size Look for the reduced size pics in the folder where you set the saving location You are done!

To extract pics from video using any media player

Few years back a non-technical person asked me how to get an image out of the video. So I suggested him to follow these steps: Run the video in full screen mode.  Pause it at required scene.  Press the [prt sc] button on your keyboard that stands for 'Print Screen'. In case you don't find it then look for the button lable variances, like [prt scrn], [prnt scr], etc.  Then open MS-Paint from the Start → Accessories →   Press Cntrl+V to paste the taken screen-shot. Re-adjust or customize if necessary.  Save the pic wherever you want at your system's disk. Try to save it in *.png format. It's quality is better than *.jpg.  You are done! Later on I thought why not to put it on my blog. Who knows it may help somebody else.  Now see the beauty of Internet; few years later somebody out of blue (actually anonymous ) left a comment on my blog that we can get do this more easily by following these steps: Run the video on VLC player. Pause it at required s

JS: The complete code example of Crypto.js (DES)

For one of the project I was trying to use crypto.js but I found that the Quick-start Guide have some deficiency in terms of library usage. So I am writing it here as a useful note for memory recap. <script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/tripledes.js"></script> <script> var encrypted = CryptoJS.DES.encrypt("The secret message", "secret_key"); var e_msg = encrypted.toString(); console.log(e_msg); var decrypted = CryptoJS.DES.decrypt(e_msg, "secret_key"); var d_msg = decrypted.toString(CryptoJS.enc.Utf8); console.log(d_msg); </script>