Skip to main content

Posts

Showing posts from 2013

Exhaustive list of all relevant UTF-8 characters / HTML entities for Tick & Cross symbols

Here's the exhaustive list of all relevant UTF-8 characters / HTML entities related to this topic: Symbol Hex Dec Description ☐ &#x2610 ☐ ballot box ☑ &#x2611 ☑ ballot box with check ☒ &#x2612 ☒ ballot box with x ✓ &#x2713 ✓ check mark, equivalent to ✓ and ✓ in most browsers ✔ &#x2714 ✔ heavy check mark ✗ &#x2717 ✗ ballot x ✘ &#x2718 ✘ heavy ballot x You don't actually need to use HTML entities -- as long as your HTML document's encoding is declared properly as UTF-8, you can simply copy/paste these symbols in the file/server-side script/JavaScript/whatever.

JS: Get base URL with level-back feature

At many times we need to extract the root of a multi-level path URL. So here is the code to do that. /* @author Abhishek Kumar @usage getBaseUrl(n); where n = number of ../ @example For URL → http://localhost/workshop/showcase/shell/data/AKI/app/index.html Result of getBaseUrl() → http://localhost/workshop/showcase/shell/data/AKI/app/ getBaseUrl(3) → http://localhost/workshop/showcase/shell/ */ function getBaseUrl(levelback) { var basePath = window.location.pathname; basePath = basePath.substring(0, basePath.lastIndexOf('/')); var list = basePath.split('/'); for (var i = 0; i < levelback && list.length > 0; i++) { list.pop(); } return window.location.protocol + '//' + window.location.host + list.join('/') + '/'; }

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>

Flash player doesn't render the flex code even after successful compilation

Let me tell you a scenario, where I was using Flash Develop for compiling flex project. I've came back to this editor after long time. Meanwhile there are many new releases happened. In fact Adobe Flex 4.5 is now upgraded as Apache Flex 4.9. It seems a big difference. So after setting up everything, it was time to check the basic 'Hello World' program. And ... it compiles successfully but I see nothing on screen of flash player (debugger) even after it compiles without any error. I thought what the hell they guys changed in the meantime. Tried many tips and tricks but of no use. Suddenly I noticed the flash player version in the Project → Properties → Output → Platform section. Why is it set to flash player version 10.5? It should be set to latest by default. Anyways, I just changed it to the 11.7 and Yuppie.. it renders fine now. Hence if you are using the version of flex sdk that came after the version of flash player you are using then you can face similar

Standard List Of Language Code

Here, is a list of language code, that is being frequently used: AFRIKAANS: "af", ALBANIAN: "sq", AMHARIC: "am", ARABIC: "ar", ARMENIAN: "hy", AZERBAIJANI: "az", BASQUE: "eu", BELARUSIAN: "be", BENGALI: "bn", BIHARI: "bh", BULGARIAN: "bg", BURMESE: "my", BRETON: "br", CATALAN: "ca", CHEROKEE: "chr", CHINESE: "zh", CHINESE_SIMPLIFIED: "zh-CN", CHINESE_TRADITIONAL: "zh-TW", CORSICAN: "co", CROATIAN: "hr", CZECH: "cs", DANISH: "da", DHIVEHI: "dv", DUTCH: "nl", ENGLISH: "en", ESPERANTO: "eo", ESTONIAN: "et", FAROESE: "fo", FILIPINO: "tl", FINNISH: "fi", FRENCH: "fr", FRISIAN: "fy", GALICIAN: "gl", GEORGIAN: "ka", GERMAN:

How to Increase Import Size Limit in phpMyAdmin?

If you are reading this blog then probably you are facing the same issue that I had faced, i.e., how to import the sql-dump-file in the mysql where size of the sql-dump-file exceeds the maximum file size limit of phpMyAdmin. I was having a sql-dump-file (got from client) that I need to import on my local database in mysql. The file size was 186 MB while the maximum size limit of phpMyAdmin was 8 MB. A BiG PrObLeM! Then I searched on Google and found that, there are few tricks available to achieve this. Most of them are related to modifying the php.ini file as given below: Increase the upload_max_filesize limit. Increase the post_max_size limit. Increase the memory_limit limit. Though you can not go beyond 128M. I tried it all. Unfortunately none of them worked for me. But fortunately, I had the full access of my server. So I did it via command-prompt. It is so simple and smooth, if you put all the paths correctly. Let's see the process to solve our problem. Step