Magento direct download link


<code>http://www.magentocommerce.com/downloads/assets/<version>/magento-<version><ext></code>

 

Where you need to replace:


  • <pre class="brush: php; title: ; notranslate" title=""><version></pre>
    : with the full version number string, that is e.g.

    <code>1.2.1

    or

     <code>1.4.2.0

  • <pre class="brush: php; title: ; notranslate" title=""><ext></pre>
    : with the format you want, so either

    <code>.zip

    ,

    <code>.tar
    .bz2

      or

    <code>.tar.gz

Create Virtual Printer for Windows and Mac

Recently , i came across a requirement to Create Virtual Printer for Windows and Mac.

So i am sharing my findings with you.

Best solution is to

  1. Create Virtual Printer in JAVA , so that it will work on both Windows and Mac.
  2. Use C++ to create Virtual printer , which non-hardware based printer.This will convert your word , test file in to PDF or any other file extensions. For windows i found good solution is ,
    http://code-industry.net/downloads.php
  3. For Mac,
    http://stackoverflow.com/questions/17691092/mac-showing-my-service-in-printers-listand
    https://developer.apple.com/library/mac/documentation/Printing/Conceptual/PDF_Workflow/pdfwf_concepts/pdfwf_concepts.html are useful links.
  4. Virtual Printer SDK for Windows 7, Windows 8, C++, C#, Delphi, VB.NET, VB. Royalty free
    http://www.colorpilot.com/emfprinterpilot.html

I hope this will helpful , enjoy.

 

 

OCR Tools

Recently , in some of the task , we need to do R&D on following

  1. Multiple scanned images to multipage PDF
  2. Multipage PDF to multiple images
  3. PDF to searchable PDF
  4. PDF to text
  5. Images to text
  6. File meta-tagging (add properties)

I have done much R&D on the same ,

we found that Linux has the capability to do all of the above.

LINUX OCR TOOLS

https://help.ubuntu.com/community/OCR

http://williamjturkel.net/2013/07/06/doing-ocr-using-command-line-tools-in-linux/

  1. GOCR

http://wiki.ubuntuusers.de/gocr

GOCR is a command line tool for text recognition, which since 2000 by Joerg Schulenburg {En} / {En}is developed. The program is to configure “trainable” and varied, good results are obtained especially for sans-serif fonts. This is purely a character recognition program that works talked-independent. With GOCR tcl also a graphical user interface, which is not quite up to date exists. By default, xsane GOCR as text recognition program, with OcrGui some of the options can be used in a graphical user interface. Many OCR frontends can GOCR use (eg: ocrodjvu , OCRFeeder , gscan2pdf ).

  1. EXIFTOOL

http://wiki.ubuntuusers.de/ExifTool


:/var/www/ocr_images$ <b>exiftool -v</b>

Syntax:  exiftool [OPTIONS] FILE

Consult the exiftool documentation for a full list of options.

exiftool -Title=prags -Author=prags -Subject=testsubject -Keywords=Suraj,navin,jigar,prags INPUTFILENAME.jpg
/var/www/ocr_images$ exiftool 1.gif

Out put


ExifTool Version Number         : 8.60

File Name                       : 1.gif

Directory                       : .

File Size                       : 12 kB

File Modification Date/Time     : 2014:02:26 18:40:37+05:30

File Permissions                : rwxrwxrwx

File Type                       : GIF

MIME Type                       : image/gif

GIF Version                     : 89a

Image Width                     : 640

Image Height                    : 480

Has Color Map                   : Yes

Color Resolution Depth          : 1

Bits Per Pixel                  : 1

Background Color                : 0

XMP Toolkit                     : Image::ExifTool 8.60

Subject                         : testsubject

Title                           : prags

Author                          : prags

Keywords                        : Suraj,navin,jigar,prags

Image Size                      : 640x480

 

Install:


sudo apt-get install libimage-exiftool-perl

  1. IMAGEMAGICK

http://wiki.ubuntuusers.de/ImageMagick

convert command

  1. PDFOCR
    http://wiki.ubuntuusers.de/pdfocr

V 0.1.4

pdfocr   is a program that allows, from scanned PDF to make templates searchable documents. The in Ruby wrote script engages the text recognitionby default on the OCR program tesseract-ocr , optional Cuneiform Linux , or OCRopus   , back and used for merging the original with the text recognitionhocr2pdffrom Exact Image . Also, come pdftk and pdfimages used.

-i, –input [FILE]               Specify input PDF file

-o, –output [FILE]              Specify output PDF file

-t, –tesseract                  Use tesseract as the OCR engine (default)

-c, –cuneiform                  Use cuneiform as the OCR engine

-p, –ocropus                    Use ocropus as the OCR engine

-l, –lang [LANG]                Specify language for the OCR software

-w, –workingdir [DIR]           Specify directory to store temp files in

-k, –keep                       Keep temporary files around

-h, –help                       Show this message

-v, –version                    Show version


$pdfocr -i 3_nonserach.pdf -o 3_searchable.pdf

  1. TESSERACT-OCR

http://wiki.ubuntuusers.de/tesseract-ocr

tesseract 3.02

tesseract-ocr {En} is a command line program for text recognition . Originally from Hewlett Packard developed as a commercial program 1984-1995, the code was released in 2005. The development is supported by Google as an open source solution for creation of e-books was needed. The program supports a number of Western European and Asian languages ??such as Vietnamese. tesseract-ocr is a pure character recognition program, it does not provide layout analysis, and are plain text, version 3.00 also HOCR from. The text recognition can be “trained”.

Examples

//LINUX  ==> MUTIPLE IMAGES TO MULTI PAGE PDF (Page of PDF will be depend on number of input images)

convert -adjoin p1.jpg p2.jpg -quality 100 1_merged.pdf

//LINUX ==> PDF to MULTIPLE IMAGES PER THE PAGE COUNT OF PDF (HIGH QUALITY)

convert -density 500 1_merged.pdf 1_split.jpg

linux covert

WordPress – redirecting the user for restricting the author archive pages

Below is the function for redirecting the user for restricting the author archive pages, please add to current_theme/functions.php, this will redirect to the home url.


function author_archive_redirect() {

if( is_author() ) {

wp_redirect( home_url(), 301 );

exit;

}

}

add_action( 'template_redirect', 'author_archive_redirect' );

Special Thanks : Supriya Surve

Dumping MySQL Stored Procedures, Functions and Triggers

MySQL 5 has introduced some new interesting features, like stored procedures and triggers. I will show in this small post how we can backup and restore these components using mysqldump.

mysqldump will backup by default all the triggers but NOT the stored procedures/functions. There are 2 mysqldump parameters that control this behavior:

  • –routines – FALSE by default
  • –triggers – TRUE by default

This means that if you want to include in an existing backup script also the triggers and stored procedures you only need to add the –routines command line parameter:


mysqldump <other mysqldump options> --routines outputfile.sql

Let’s assume we want to backup ONLY the stored procedures and triggers and not the mysql tables and data (this can be useful to import these in another db/server that has already the data but not the stored procedures and/or triggers), then we should run something like:


mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt <database> > outputfile.sql

 

MySQL Split String Function

Split delimited strings

The following example function takes 3 parameters, performs an operation using an SQL function, and returns the result.

Function

CREATE FUNCTION SPLIT_STR(
  x VARCHAR(255),
  delim VARCHAR(12),
  pos INT
)
RETURNS VARCHAR(255)
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos),
       LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1),
       delim, '');

Usage

SELECT SPLIT_STR(string, delimiter, position)

Example

SELECT SPLIT_STR('a|bb|ccc|dd', '|', 3) as third;

+-------+
| third |
+-------+
| ccc   |
+-------+

Thanks to : http://blog.fedecarg.com/?s=mysql+function

Javascript / Jquery Session Logout Timer Clock for Ideal user, which will reset again on mousemove or keyboard action

It took me a little long to get this , which i wanted.

This is made up of simple Jquery and CSS.

I have mixed up few things which i got from internet and after modifications and merging , i got what i want.

Hope This might help you.

 

working example : http://pragneshkaria.com/miscellaneous/jquery_session_idealtime_timer/

 

and code is below

 

 


<html>
<head>
<script type="text/javascript" src="jquery.min.js"></script>
<style type="text/css">
br { clear: both; }
.cntSeparator {
font-size: 54px;
margin: 10px 7px;
color: #000;
}
.desc { margin: 7px 3px; }
.desc div {
float: left;
font-family: Arial;
width: 70px;
margin-right: 65px;
font-size: 13px;
font-weight: bold;
color: #000;
}
#expireDiv {
width: 90%;
text-align: center;
background-color: #63AFD0;
padding: 10px;
margin: 0;
border: 1px solid #024A68;
color: #024A68;
font-weight: bold;
font-size: 125%;
box-shadow: -1px -1px 5px 1px #5E8C9E inset;
-moz-box-shadow: -1px -1px 5px 1px #5E8C9E inset;
-webkit-box-shadow: -1px -1px 5px 1px #5E8C9E inset;
display:none;
cursor: pointer;
}
.pk{
color: green;
}
.pk1{
color: red;
}
h3{
color: #024A68;
}
</style>
<script type="text/javascript">
var total_session_time = 5; // after this interval of time if user is ideal then clock timer will start in seconds
var clock_timer = 5; //seconds
var clock_time_start = total_session_time+clock_timer+1;
document.write("<h3>Demo of Session Logout Timer Clock for Ideal user, which will reset again on mousemove or keyboard action</h3><p class='pk'>After <span class='pk1'>"+total_session_time+" Seconds </span>, Session Clock will appear , which will remain for <span class='pk1'>"+clock_timer+" Seconds</span> and if user unable to perform any mousemove , keyboard action it will redirected to logout</p>");
var idleTime = 0;

$(document).ready(function () {
//Increment the idle time counter every minute.
var idleInterval = setInterval("timerIncrement()", 1000); // 1 minute
//Zero the idle timer on mouse movement.
$(this).mousemove(function (e) {
idleTime = 0;
$('#expireDiv').slideUp();
});
$(this).keypress(function (e) {
idleTime = 0;
$('#expireDiv').slideUp();

});
});//document ready

function timerIncrement() {
idleTime = idleTime + 1;
console.log(idleTime);
if (idleTime > total_session_time) {
count= clock_time_start - idleTime;
console.log(count);
$('#expireDiv').slideDown();
$('#currentSeconds').html(count);
if (count <= 0)
{
window.location = 'logout.php'
return;
}
}
}

</script>

</head>
<body>
<div>
<div id="expireDiv">
Your session is about to expire. You will be logged out in <span id="currentSeconds"></span> seconds.
If you want to continue, please move mouse or type something.
</div>
</div>

</body>
</html>

&nbsp;

1 2 3 25