Using Javascript alert in the middle of PHP code

Alternative 1:
The good thing about alternative 1 is that you can use the actual php variables directly in Javascript code
[code lang="php"]
<?php
$counter = 123;
//PHP Code
print '<script type="text/javascript">'; //Php writing javascript code ...
print 'alert("' . $counter . ' files were coppied")'; //Php writing javascript code ...
print '</script>'; //Php writing javascript code ...
//PHP Code Continues
?>
[/code]

Alternative 2:
[code lang="php"]
<?php
$counter = 0;
// php code
if( $counter = 0 ) )
{
?>
<script >
alert('Problem occured during uploading ...')
</script>
<?php
}
//Some more php code
?>
[/code]

Fakepath issue, actually is not an issue

Some browsers have a security feature which prevents HTML/javascript/PHP from knowing your file’s local full path. This is necessarily not bad for a developer as you still could upload the files. Looking at it as a client, you wouldn’t want the server to know about your local machine’s file system.

If you really want to see the path, you could simply go to Internet Explorer, Tools, Internet Option, Security, Custom, find the “Include local directory path When uploading files to a server” (it is quite a ways down) and click on “Enable” .

VMWare Server Machines, huge potentials, zero cost

VMWare Server / Player / Workstation is a very powerful tool allowing one to install several virtual operating systems on one computer. This is not all you get, as you have the ability to run all these OS’es simultanously without need to do anything with your real physical computer. On the other hand this allows to separate different tasks on different machines and prevent software incompatibilities and cross-platform issues.

VMWare Player / Workstation: Good for those users who only need another OS on their computer (Windows on a Mac or Linux or viceversa). It’s much simpler to setup and the workstation is a payed version which allows you to exactly determine sharing the resources on your computer (hard-disk, RAM, Processor). While Player only shares these on fair basis.
VMWare Server: As the name says it out, it suits best for servers (e.g. I used this feature to have a Linux OS on a Windows Server 2008 for logging of a process on a Motoman robot).

Ubuntu Linux on Windows Server 2008 as a VMWare machine

Ubuntu Linux on Windows Server 2008 as a VMWare machine

Continue reading

Notepad++ Plugin for ABB RAPID

If you cant think of programming without Notepad++ and you would like to write your ABB RAPID codes in Notepad++, then you are in the right page. Thanks to the chinese website whose link also follows (as source), I have found an XML file (plugin) that would add the ABB RAPID syntax highlighting to Notepad++. Download the XML file from the download link and follow the instruction with screenshots down here.

XML file download link.

View - User Defined Dialogue

View – User Defined Dialogue

User Defined Dialogue - Import - Select XML file

User Defined Dialogue – Import – Select XML file

Notepad++ with ABB RAPID highlighting

Notepad++ with ABB RAPID highlighting

Source : http://www.brucebot.com/2010/07/rapid-for-notepad/