Monday, December 28, 2015

html a3 landscape print

http://www.w3schools.com/css/css3_borders.asp

http://stackoverflow.com/questions/12371822/how-can-i-print-an-image-in-a-web-page-fitting-the-paper-size-a3-a4-a5-etc/

<html>
<head>
<style type="text/css" media="print">
   @page Section1
    {size:11 8.5in;
    margin:.5in 13.6pt 0in 13.6pt;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:4;
   border-radius: 25px;
    border: 2px solid #73AD21;
    padding: 20px;
    width: 11in;
    height: 8.5in;

}
div.Section1
    {page:Section1;

   border-radius: 25px;
    border: 2px solid #73AD21;
    padding: 20px;
    width: 11in;
    height: 8.5in;

}
</style>
</head>
<body>

<div class="Section1"> put  text / images / other stuff  </div>

</body>
</html>

REACT JS GIT and TOP LEVEL API

REACT JS

LAKI WEB SERVERI

Friday, December 25, 2015

Da li je ovo moguće ?

Дефинитивни победник - најједноставније рачунарство у облаку - облак који је само ваш, на вашем компјутеру, а доступан свима на мрежи

https://www.turnkeylinux.org

https://www.turnkeylinux.org/download?file=turnkey-lamp-14.0-jessie-amd64.ova

OVA fajl otvorite sa VMWARE PLAYER-OM koji je sastavni deo VMWARE WORKSTATION-a

Instalacija je ovde:

http://www.vmware.com/products/workstation/workstation-evaluation

TREBA VAM JOŠ PUTTY.EXE za kasnije i to je sve.

Ukoliko ste sve pravilno pokrenuli treba da se pojavi IP adresa koju ukoliko unesete na bilo koji kompjuter dobijate web sučelje za administraciju.

Naravno, prethodno pri instalaciji se podrazumeva da ste odredili administratorsku lozinku linuxa na root, kao i lozinku za MySQL.

Kako koristite PUTTY.EXE ? - pa jednostavno odaberete SSH opciju i logujete se na linux shell, unesete korisnika root i password koji ste ranije pri instalaciji turnkey-a odredili.

Уместо VMWARE-a, можете користити Microsoft Azure за хостиг ове ваше TURNKEY LINUX виртуелне машине.



Ова команда ће Вам осигурати да се искључи компјутер после радног времена Ваших заборавних радника

C:\>

cmd

edit c:\driver.bat

shutdown -s

Alt+F+S
Alt+F+X

C:\>

at 15:40 /every:M,TW,Th,F,S,Su c:\driver.bat


Ова команда ће Вам осигурати да се искључи компјутер после радног времена Ваших заборавних радника !




AT the great

To Run Task Scheduler from the Command Line

  1. Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and then click Command Prompt .
  2. At the command prompt, type Taskschd.msc .
The Schtasks.exe command line tool enables a user to complete many of the same operations that they can complete using the Task Scheduler MMC snap-in. This tool enables a user to create, delete, query, change, run, and end scheduled tasks on a local or remote computer. This tool is located in the %SYSTEMROOT%\System32 folder. Type Schtasks.exe /? from a command prompt window to view the help for the tool.


>>>-------------OR-------------->



At

Schedules commands and programs to run on a computer at a specified time and date. You can use at only when the Schedule service is running. Used without parameters, at lists scheduled commands.

Syntax

at [\\ComputerName] [{[ID] [/delete]|/delete [/yes]}]
at [[\\ComputerNamehours:minutes [/interactive] [{/every:date[,...]|/next:date[,...]}] command]


Parameters

\\ComputerName Specifies a remote computer. If you omit this parameter, at schedules the commands and programs on the local computer.
ID Specifies the identification number assigned to a scheduled command.
/delete Cancels a scheduled command. If you omit ID, all of the scheduled commands on the computer are canceled.
/yes Answers yes to all queries from the system when you delete scheduled events.
hours:minutes Specifies the time when you want to run the command. Time is expressed as hours:minutes in 24-hour notation (that is, 00:00 [midnight] through 23:59).
/interactive Allows command to interact with the desktop of the user who is logged on at the time command runs.
/every: Runs command on every specified day or days of the week or month (for example, every Thursday, or the third day of every month).
date Specifies the date when you want to run the command. You can specify one or more days of the week (that is, type M,T,W,Th,F,S,Su) or one or more days of the month (that is, type 1 through 31). Separate multiple date entries with commas. If you omit dateat uses the current day of the month.
/next: Runs command on the next occurrence of the day (for example, next Thursday).
command Specifies the Windows command, program (that is, .exe or .com file), or batch program (that is, .bat or .cmd file) that you want to run. When the command requires a path as an argument, use the absolute path (that is, the entire path beginning with the drive letter). If the command is on a remote computer, specify Universal Naming Convention (UNC) notation for the server and share name, rather than a remote drive letter.
/? Displays help at the command prompt.


Remarks

Schtasks is a more powerful superset command-line scheduling tool and includes all the functionality found in the at command-line utility. Use schtasks instead of at for all command-line scheduling tasks. For more information about schtasks, see Related Topics.
Using at 
To use at, you must be a member of the local Administrators group.
Loading Cmd.exe
At does not automatically load Cmd.exe, the command interpreter, before running commands. If you are not running an executable (.exe) file, you must explicitly load Cmd.exe at the beginning of the command as follows:
cmd /c dir > c:\test.out
Viewing scheduled commands
When you use at without command-line options, scheduled tasks appear in a table formatted similar to the following:
Status  ID   Day       Time        Command Line
OK      1    Each F    4:30 PM     net send group leads status due
OK      2    Each M    12:00 AM    chkstor > check.file
OK      3    Each F    11:59 PM    backup2.bat 
Including identification number (ID)
When you include identification number (ID) with at at a command prompt, information for a single entry appears in a format similar to the following:
Task ID:      1

Status:       OK

Schedule:     Each  F

Time of Day:  4:30 PM

Command:      net send group leads status due
After you schedule a command with at, especially a command that has command-line options, check that the command syntax is correct by typing at without command-line options. If the information in the Command Line column is incorrect, delete the command and retype it. If it is still incorrect, retype the command with fewer command-line options.
Viewing results
Commands scheduled with at run as background processes. Output is not displayed on the computer screen. To redirect output to a file, use the redirection symbol (>). If you redirect output to a file, you need to use the escape symbol (^) before the redirection symbol, whether you are using at at the command line or in a batch file. For example, to redirect output to Output.text, type:
at 14:45 c:\test.bat ^>c:\output.txt
The current directory for the executing command is the systemroot folder.
Changing system time
If you change the system time at a computer after you schedule a command to run with at, synchronize the at scheduler with the revised system time by typing at without command-line options.
Storing commands
Scheduled commands are stored in the registry. As a result, you do not lose scheduled tasks if you restart the Schedule service.
Connecting to network drives
Do not use a redirected drive for scheduled jobs that access the network. The Schedule service might not be able to access the redirected drive, or the redirected drive might not be present if a different user is logged on at the time the scheduled task runs. Instead, use UNC paths for scheduled jobs. For example:
at 1:00pm my_backup \\server\share
Do not use the following syntax, where x: is a connection made by the user:
at 1:00pm my_backup x:
If you schedule an at command that uses a drive letter to connect to a shared directory, include an at command to disconnect the drive when you are finished using the drive. If the drive is not disconnected, the assigned drive letter is not available at the command prompt.


Examples

To display a list of commands scheduled on the Marketing server, type:
at \\marketing 
To learn more about a command with the identification number 3 on the Corp server, type:
at \\corp 3 
To schedule a net share command to run on the Corp server at 8:00 A.M. and redirect the listing to the Maintenance server, in the Reports shared directory, and the Corp.txt file, type:
at \\corp 08:00 cmd /c "net share reports=d:\marketing\reports >> \\maintenance\reports\corp.txt" 
To back up the hard drive of the Marketing server to a tape drive at midnight every five days, create a batch program called Archive.cmd, which contains the backup commands, and then schedule the batch program to run, type:
at \\marketing 00:00 /every:5,10,15,20,25,30 archive 
To cancel all commands scheduled on the current server, clear the at schedule information as follows:
at /delete 
To run a command that is not an executable (that is, .exe) file, precede the command with cmd /c to load Cmd.exe as follows:
cmd /c dir > c:\test.out 


Formatting legend

FormatMeaning
Italic
Information that the user must supply
Bold
Elements that the user must type exactly as shown
Ellipsis (...)
Parameter that can be repeated several times in a command line
Between brackets ([])
Optional items
Between braces ({}); choices separated by pipe (|). Example: {even|odd}
Set of choices from which the user must choose only one
Courier font
Code or program output

at

Tuesday, December 15, 2015

Izvuci JPG iz PDF-a, evo sta mi treba danas

div table primer 3

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
    .Table
    {
        display: table;
border-collapse: separate;
border-spacing: 2px;
    }

    .Title
    {
        display: table-caption;
        text-align: center;
        font-weight: bold;
        font-size: larger;
    }

    .Heading
    {
        display: table-row;
        font-weight: bold;
        text-align: center;
    }

    .Row
    {
        display: table-row;
    }

    .Cell
    {
        display: table-cell;
        border: 1px silver solid;
        //border-width: thin;
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 5px;
        padding-bottom: 5px;
background-color: WhiteSmoke;

    }

.Cell:hover {background-color:lavender;}
    
    .Cellh
    {
        display: table-cell;
        border: 1px silver solid;
        //border-width: thin;
        //padding-left: 1px;
        //padding-right: 1px;
        //padding-top: 1px;
        //padding-bottom: 1px;
background-color: aliceblue;
        -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;

    }
    
     .Cellh a {background-color:aliceblue; display: block;text-decoration: none;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;}
     .Cellh a:hover {background-color:lightskyblue; display: block;text-decoration: none;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;}


</style>
</head>
<body>


<center>
<div class="Table">
    <div class="Title">
        <p>This is a Table</p>
    </div>
    <div class="Heading">
        <div class="Cellh">
            <a href=#sort1>Heading 1</a>
        </div>
        <div class="Cellh">
            <a href=#sort2>Heading 2</a>
        </div>
        <div class="Cellh">
            <a href=#sort3>Heading 3</a>
        </div>
    </div>
    <div class="Row">
        <div class="Cell">
            <p>Row 1 Column 1</p>
        </div>
        <div class="Cell">
            <p>Row 1 Column 2</p>
        </div>
        <div class="Cell">
            <p>Row 1 Column 3</p>
        </div>
    </div>
    <div class="Row">
        <div class="Cell">
            <p>Row 2 Column 1</p>
        </div>
        <div class="Cell">
            <p>Row 2 Column 2</p>
        </div>
        <div class="Cell">
            <p>Row 2 Column 3</p>
        </div>
    </div>
</div>
</center>

</body>
</html>

div table good sample

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
    .Table
    {
        display: table;
border-collapse: separate;
border-spacing: 2px;
    }

    .Title
    {
        display: table-caption;
        text-align: center;
        font-weight: bold;
        font-size: larger;
    }

    .Heading
    {
        display: table-row;
        font-weight: bold;
        text-align: center;
    }

    .Row
    {
        display: table-row;
    }

    .Cell
    {
        display: table-cell;
        border: solid;
        border-width: thin;
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 5px;
        padding-bottom: 5px;
background-color: WhiteSmoke;

    }

.Cell:hover {background-color:lavender;}
    
    .Cellh
    {
        display: table-cell;
        border: solid;
        border-width: thin;
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 5px;
        padding-bottom: 5px;
background-color: aliceblue;
        -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;

    }
    
     .Cellh a {background-color:aliceblue; display: block;text-decoration: none;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;}
     .Cellh a:hover {background-color:lightskyblue; display: block;text-decoration: none;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;}


</style>
</head>
<body>


<center>
<div class="Table">
    <div class="Title">
        <p>This is a Table</p>
    </div>
    <div class="Heading">
        <div class="Cellh">
            <a href=#sort1>Heading 1</a>
        </div>
        <div class="Cellh">
            <a href=#sort2>Heading 2</a>
        </div>
        <div class="Cellh">
            <a href=#sort3>Heading 3</a>
        </div>
    </div>
    <div class="Row">
        <div class="Cell">
            <p>Row 1 Column 1</p>
        </div>
        <div class="Cell">
            <p>Row 1 Column 2</p>
        </div>
        <div class="Cell">
            <p>Row 1 Column 3</p>
        </div>
    </div>
    <div class="Row">
        <div class="Cell">
            <p>Row 2 Column 1</p>
        </div>
        <div class="Cell">
            <p>Row 2 Column 2</p>
        </div>
        <div class="Cell">
            <p>Row 2 Column 3</p>
        </div>
    </div>
</div>
</center>

</body>
</html>

usefull email creator for php

<!--
/*
Logovanje i unos:

dacaj.php ----+ daca.php ----+ glavni.php ----+ glavniupload.php  


login.php ----+ dalje.php ----+ glavnix.php ----+ glavniuploadx.php



Pregled i izmena:


         = 

er10.php = ----+ glavnie.php ----+ glavniuploade.php
         =
 
er1000.php = ----+ glavniex.php ----+ glavniuploadex.php


         

 
Pretraga:

nadji.htm ----+ cms_search.php  



LIPUS = Loging - Insert - ( Preview - Update ) - Search

-->
<?php
//---------------------Send e-mail with attachments (simple version):

// Define some variables

$to = 'test@logikdev.com'
$subject = 'Test email';
// Create a boundary string. It must be unique so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));

// Define the headers

$headers = "From: noreply@logikdev.com\r\n";
// Add boundary string and mime type specification
$headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\"";

// Read the attachment file contents into a string, encode it with MIME base64, and split it into smaller chunks

$attachment = chunk_split(base64_encode(file_get_contents('attachment.zip')));

// Define the body of the message

$message = "
--PHP-mixed-$random_hash
Content-Type: text/plain; charset='iso-8859-1'

This is a test email message sent with PHP.


--PHP-mixed-$random_hash

Content-Type: application/zip; name=attachment.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment

$attachment

--PHP-mixed-$random_hash--";

// Send the email

if (@mail($to, $subject, $message, $headers)) {
echo "The mail has been sent.";
} else {
echo "The mail has NOT been sent!";
}


?>





<?php


//----------------------------------


//----------------------------------Send simple e-mail




//define the receiver of the email

$to = 'youraddress@example.com';
//define the subject of the email
$subject = 'Test email'; 
//define the message to be sent. Each line should be separated with \n
$message = "Hello World!\n\nThis is my first mail."; 
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
echo $mail_sent ? "Mail sent" : "Mail failed";
?>



<?php



//----------------------------------


//----------------------------------Send HTML e-mail


//define the receiver of the email

$to = 'youraddress@example.com';
//define the subject of the email
$subject = 'Test HTML email'; 
//create a boundary string. It must be unique 
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time())); 
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com";
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\""; 
//define the body of the message.
ob_start(); //Turn on output buffering
?>
--PHP-alt-<?php echo $random_hash; ?>  
Content-Type: text/plain; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit

Hello World!!! 

This is simple text email message. 

--PHP-alt-<?php echo $random_hash; ?>  

Content-Type: text/html; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit

<h2>Hello World!</h2>

<p>This is something with <b>HTML</b> formatting.</p> 

--PHP-alt-<?php echo $random_hash; ?>--

<?
//copy current buffer contents into $message variable and delete current output buffer
$message = ob_get_clean();
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
echo $mail_sent ? "Mail sent" : "Mail failed";
?>



<?php 



//----------------------------------


//----------------------------------Sending Email with Attachment



//define the receiver of the email 

$to = 'youraddress@example.com'; 
//define the subject of the email 
$subject = 'Test email with attachment'; 
//create a boundary string. It must be unique 
//so we use the MD5 algorithm to generate a random hash 
$random_hash = md5(date('r', time())); 
//define the headers we want passed. Note that they are separated with \r\n 
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com"; 
//add boundary string and mime type specification 
$headers .= "\r\nContent-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\""; 
//read the atachment file contents into a string,
//encode it with MIME base64,
//and split it into smaller chunks
$attachment = chunk_split(base64_encode(file_get_contents('attachment.zip'))); 
//define the body of the message. 
ob_start(); //Turn on output buffering 
?> 

<!--

--PHP-mixed-<?php echo $random_hash; ?>  
Content-Type: multipart/alternative; boundary="PHP-alt-<?php echo $random_hash; ?>" 

--PHP-alt-<?php echo $random_hash; ?>  

Content-Type: text/plain; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit

Hello World!!! 

This is simple text email message. 

--PHP-alt-<?php echo $random_hash; ?>  

Content-Type: text/html; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit

<h2>Hello World!</h2> 

<p>This is something with <b>HTML</b> formatting.</p> 

--PHP-alt-<?php echo $random_hash; ?>-- 


--PHP-mixed-<?php echo $random_hash; ?>  

Content-Type: application/zip; name="attachment.zip"  
Content-Transfer-Encoding: base64  
Content-Disposition: attachment  


<?php echo $attachment; ?> 

--PHP-mixed-<?php echo $random_hash; ?>-- 


-->




<?php 

//copy current buffer contents into $message variable and delete current output buffer 
$message = ob_get_clean(); 
//send the email 
$mail_sent = @mail( $to, $subject, $message, $headers ); 
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" 
echo $mail_sent ? "Mail sent" : "Mail failed"; 
?>



<!--


$email_header .= "Disposition-Notification-To: $from\n"; 

$email_header .= "X-Confirm-Reading-To: $from\n"; 

-->


alternative php environment