<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>W3Exchange : Script Forums</title>
<link>http://www.w3exchange.com</link>
<description> W3Exchange</description>
<language>en</language>
<docs>http://backend.userland.com/rss</docs>
<item>
<title>How to upload and resize images in PHP in Script Forums : PHP</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7954#7954</link>
<guid isPermaLink="false">7954@http://www.w3exchange.com</guid>
<description>Topic: How to upload and resize images in PHP

Message: Hi,One of the most common practises in PHP coding with GD is to create a thumbnail image of an uploaded file. In this tutorial we will examine an image upload form, look at PHP's file upload system, and use an uploaded image to create a small thumbnail image.Please note this requires you to use the GD2 library. You can normall allow it by changing your php.ini by removing the ; in front of extension=php_gd2.dll.PHP's built in system for uploading files allows us to create an HTML form that uses the &#34;file&#34; element. This is a type of HTML input tag that tells a user's web browser to display a file selection dialogue, and to include any selected file with the data sent along with a form.
Code::&#60;form action="index.php" method="POST" enctype="multipart/form-data"&#62; 
    &#60;input type="hidden" name="MAX_FILE_SIZE" value="200000"&#62;"; 
    &#60;input type="file" name="imagefile"&#62; 
    &#60;input type="submit" name="upload" value="Upload Image"&#62; 
&#60;/form&#62;
Thanks,Fuad.
</description>
<pubDate>Mon, 26 May 2008 02:52:23 -0700</pubDate>
</item>
<item>
<title>Sending email using PHP Com functions in Script Forums : PHP</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7942#7942</link>
<guid isPermaLink="false">7942@http://www.w3exchange.com</guid>
<description>Topic: Sending email using PHP Com functions

Message: Hi,COM is a technology which allows the reuse of code written in any language (by any language) using a standard calling convention and hiding behind APIs the implementation details such as what machine the Component is stored on and the executable which houses it. It can be thought of as a super Remote Procedure Call (RPC) mechanism with some basic object roots.The ScriptOpen you favorite text editor and put the following lines:
Code::&#60;?PHP

$objApp = new COM("Outlook.Application");

$myItem = $objApp-&#62;CreateItem(olMailItem);

$a=$myItem-&#62;Recipients-&#62;Add("admin@example.org");

$myItem-&#62;Subject="This is a test";

$myItem-&#62;Body="This is a Body Section now.....!";

$myItem-&#62;Display();

$myItem-&#62;Send();

?&#62;
Thanks,Fuad
</description>
<pubDate>Sat, 24 May 2008 03:16:20 -0700</pubDate>
</item>
<item>
<title>Create a Cookie in ASP in Script Forums : ASP</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7924#7924</link>
<guid isPermaLink="false">7924@http://www.w3exchange.com</guid>
<description>Topic: Create a Cookie in ASP

Message: Hi,A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values.The &#34;Response.Cookies&#34; command is used to create cookies.Note: The Response.Cookies command must appear BEFORE the html tag. In the example below, we will create a cookie named &#34;firstname&#34; and assign the value &#34;Alex&#34; to it:
Code::&#60;%
Response.Cookies("firstname")="Alex"
%&#62;
It is also possible to assign properties to a cookie, like setting a date when the cookie should expire: 
Code::&#60;%
Response.Cookies("firstname")="Alex" 
Response.Cookies("firstname").Expires=#June 10,2008#
%&#62;
Thanks
</description>
<pubDate>Thu, 22 May 2008 02:43:57 -0700</pubDate>
</item>
<item>
<title>PHP code and HTML code in Script Forums : PHP</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7878#7878</link>
<guid isPermaLink="false">7878@http://www.w3exchange.com</guid>
<description>Topic: PHP code and HTML code

Message: PHP code is not technically executed inside an HTML document. PHP is a programming language, HTML is a markup language, and the two should not cross.To accurately implement a site using php, you shouldn't need to have an HTML or HTM file! Your files should be PHP (unless you need others such as CSS and JAVASCRIPT etc).&#160; Each php file should begin with a php tag, and end with a php closing tag. Only one of each. I see many websites which just open php tags, run the code, echo the html and close the php tags - many do this multiple times in one document, which is horrendus programming and indicates the user does not know what's going on.To accurately answer your query - you should have a php file with functions for generating html code. You can then make a function which generates a header (including doctype, &#60;html&#62;, &#60;head&#62; etc), and functions such as tag (to do &#60;p&#62;Hello!&#60;/p&#62;), starttag (to do &#60;p&#62;), endtag (&#60;/p&#62;) and for singletons (&#60;br/&#62;).This will eliminate the need for a html or htm file, is complete valid php, and actually saves the preprocessor dealing with the markup language, then passing it to a browser to display on the page. Instead, it deals with the functions, and the markup language is only analysed by the browser. The correct way to program. This also guarantees your html tags are always correct :)
</description>
<pubDate>Sat, 17 May 2008 13:10:22 -0700</pubDate>
</item>
<item>
<title>The very simply way to make a image slider by Javascript in Script Forums : JavaScript</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7866#7866</link>
<guid isPermaLink="false">7866@http://www.w3exchange.com</guid>
<description>Topic: The very simply way to make a image slider by Javascript

Message: Hi all!I found that is difficult to search a simple javascript code about scrolling image slide. You can find them on Internet but they often are long and complex or hidden from us to prevent edit. I just found a simple way to resolve this. I hope it will help your editting easier to make it yours!We need 2 div tag to make a slide. ChildDiv&#160; to store image array and ParentDiv to contain Child Div.Note:Image Array's Structure: [&#38;lt;Image's Link&#38;gt;, &#38;lt;Image's Width&#38;gt;, &#38;lt;URL to Go&#38;gt;]Functions:&#160; &#160; &#160;DoSlide(), Make Slide to run.&#160; &#160; &#160;setmouse(param), set Slide play and pause when pointer over or out on images;&#160; &#160; &#160;Dr_ImgArr(); Print image array to HTML;&#160; &#160; &#160;getE(), getElementById();&#160; &#160; &#160;DivWidth: Width of ParentDiv;&#160; &#160; &#160;MoreImage: Num Of Image on a begin of Image Array, insert into the last of ChildDiv to continue the Slide;....If you have anymore comment, please reply here so that I can make it more perfect,thank for all.Demo: http://boy.us.com/Code/slide.phpStyle
Code::&#60;style&#62;
#ParentDiv
{
    margin: auto;
    width: 600px;
    overflow: hidden;
}

#ChildDiv
{
    width: 6000px; 
    position:relative;
    cursor:pointer;
}
#ParentDiv img
{
float: left;
padding: 3px;
margin: 0px;
}
&#60;/style&#62;
Javascript
Code::&#60;script&#62;
//Array Of Image, [URL, width of Image, LinkTo]
var t;
var StepTime=10;
var StepPixel=1;
var ImgPadding=3;
var ParentDivLen=600;
var Img= 
[
["./images/slide/3_116.jpg", 104, "../gal/?gal=3&Type=image&ID=116"], 
["./images/slide/4_250.jpg", 103, "../gal/?gal=4&Type=image&ID=250"], 
["./images/slide/1_157.jpg", 107, "../gal/?gal=1&Type=image&ID=157"], 
["./images/slide/2_120.jpg", 124, "../gal/?gal=2&Type=image&ID=120"], 
["./images/slide/4_229.jpg", 116, "../gal/?gal=4&Type=image&ID=229"], 
["./images/slide/3_173.jpg", 113, "../gal/?gal=3&Type=image&ID=173"], 
["./images/slide/2_192.jpg", 110, "../gal/?gal=2&Type=image&ID=192"], 
["./images/slide/4_111.jpg", 104, "../gal/?gal=4&Type=image&ID=111"], 
["./images/slide/5_244.jpg", 106, "../gal/?gal=5&Type=image&ID=244"], 
["./images/slide/5_279.jpg", 109, "../gal/?gal=5&Type=image&ID=279"], 
["./images/slide/5_233.jpg", 102, "../gal/?gal=5&Type=image&ID=233"], 
["./images/slide/5_256.jpg", 106, "../gal/?gal=5&Type=image&ID=256"], 
["./images/slide/5_248.jpg", 111, "../gal/?gal=5&Type=image&ID=248"], 
["./images/slide/3_143.jpg", 99, "../gal/?gal=3&Type=image&ID=143"], 
["./images/slide/1_225.jpg", 103, "../gal/?gal=1&Type=image&ID=225"], 
["./images/slide/4_103.jpg", 109, "../gal/?gal=4&Type=image&ID=103"], 
["./images/slide/4_145.jpg", 118, "../gal/?gal=4&Type=image&ID=145"], 
["./images/slide/5_263.jpg", 100, "../gal/?gal=5&Type=image&ID=263"], 
["./images/slide/2_115.jpg", 102, "../gal/?gal=2&Type=image&ID=115"], 
["./images/slide/4_140.jpg", 122, "../gal/?gal=4&Type=image&ID=140"], 
["./images/slide/1_214.jpg", 112, "../gal/?gal=1&Type=image&ID=214"], 
["./images/slide/3_142.jpg", 102, "../gal/?gal=3&Type=image&ID=142"], 
["./images/slide/5_297.jpg", 99, "../gal/?gal=5&Type=image&ID=297"], 
["./images/slide/4_168.jpg", 101, "../gal/?gal=4&Type=image&ID=168"], 
["./images/slide/5_277.jpg", 111, "../gal/?gal=5&Type=image&ID=277"], 
["./images/slide/5_296.jpg", 103, "../gal/?gal=5&Type=image&ID=296"], 
["./images/slide/4_169.jpg", 109, "../gal/?gal=4&Type=image&ID=169"], 
["./images/slide/4_244.jpg", 110, "../gal/?gal=4&Type=image&ID=244"], 
["./images/slide/5_285.jpg", 112, "../gal/?gal=5&Type=image&ID=285"], 
["./images/slide/3_100.jpg", 111, "../gal/?gal=3&Type=image&ID=100"], 
["./images/slide/1_103.jpg", 111, "../gal/?gal=1&Type=image&ID=103"], 
["./images/slide/1_119.jpg", 104, "../gal/?gal=1&Type=image&ID=119"], 
["./images/slide/5_253.jpg", 107, "../gal/?gal=5&Type=image&ID=253"], 
["./images/slide/4_183.jpg", 105, "../gal/?gal=4&Type=image&ID=183"], 
["./images/slide/4_171.jpg", 111, "../gal/?gal=4&Type=image&ID=171"], 
["./images/slide/2_147.jpg", 126, "../gal/?gal=2&Type=image&ID=147"], 
["./images/slide/3_115.jpg", 116, "../gal/?gal=3&Type=image&ID=115"], 
["./images/slide/5_310.jpg", 113, "../gal/?gal=5&Type=image&ID=310"], 
["./images/slide/4_185.jpg", 109, "../gal/?gal=4&Type=image&ID=185"], 
["./images/slide/3_159.jpg", 108, "../gal/?gal=3&Type=image&ID=159"], 
["./images/slide/2_154.jpg", 125, "../gal/?gal=2&Type=image&ID=154"], 
["./images/slide/5_314.jpg", 107, "../gal/?gal=5&Type=image&ID=314"], 
["./images/slide/2_106.jpg", 100, "../gal/?gal=2&Type=image&ID=106"], 
["./images/slide/4_123.jpg", 103, "../gal/?gal=4&Type=image&ID=123"], 
];
var Pos=0;
var Len=Img.length;

var DivWidth=0;
var MoreImage=0; 

function goURL(URLS)
{
    document.location.href=URLS;
}
for(i=0;i&#60;Len;i++)
{
    DivWidth+=Img[i][1] + ImgPadding*2;
    if(MoreImage==0 && DivWidth&#62;ParentDivLen)MoreImage=i;
}
function getE(id)
{
    return document.getElementById(id);
}

function Dr_Img(IMG)
{
    return '&#60;img src="'+ IMG[0] + '" onclick="goURL(\'' + IMG[2] + '\')"&#62;';
}

function Dr_ImgArr()
{
    var str='';
    for(i=0;i&#60;Len;i++) str += Dr_Img(Img[i]);
    for(i=0;i&#60;MoreImage;i++)str += Dr_Img(Img[i]);
    document.write(str);
}

function DoSlide()
{
    if(Pos==0)Pos=-1;
    divtg=getE('ChildDiv');
    Pos-=StepPixel;
    if(Pos&#60;-DivWidth)Pos=0;
    divtg.style.left=Pos +'px';
    t=setTimeout('DoSlide()',StepTime);
    
}

function SlideStop()
{
    clearTimeout(t);
}
function setmouse(id)
{
    if(id==1)
    {
        DoSlide();
    }
    else
    {
        SlideStop();
    }
}
&#60;/script&#62;
HTML Body
Code::&#60;div id="ParentDiv"&#62;
    &#60;div id="ChildDiv" onmouseout="setmouse(1);" onmouseover="setmouse(2);"&#62;

        &#60;script&#62;
            Dr_ImgArr();
        &#60;/script&#62;
    &#60;/div&#62;
&#60;/div&#62;
</description>
<pubDate>Fri, 16 May 2008 14:18:38 -0700</pubDate>
</item>
<item>
<title>Convert FLV to AVI-DIVX in Script Forums : Flash</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7860#7860</link>
<guid isPermaLink="false">7860@http://www.w3exchange.com</guid>
<description>Topic: Convert FLV to AVI-DIVX

Message: I used the SUPER(C)  flv to video converter too. i am satisfy with it, easy to use. I GET it also from flvsoft. :)
</description>
<pubDate>Thu, 15 May 2008 22:29:36 -0700</pubDate>
</item>
<item>
<title>File attachment with asp in Script Forums : ASP</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7853#7853</link>
<guid isPermaLink="false">7853@http://www.w3exchange.com</guid>
<description>Topic: File attachment with asp

Message: Obviously you need to upload the file and save it first. Use any upload component to do that and then use the saved file path to attach to the email.
</description>
<pubDate>Thu, 15 May 2008 02:45:07 -0700</pubDate>
</item>
<item>
<title>Convert FLV to AVI-DIVX in Script Forums : Flash</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7852#7852</link>
<guid isPermaLink="false">7852@http://www.w3exchange.com</guid>
<description>Topic: Convert FLV to AVI-DIVX

Message: For converting flv to avi, mpeg, wmv,etc., I use SUPER(C)  FLV to Video ConverterThis software can easily convert these files. I use it for a long time and I haven't any problem with it.There is a free trial version without time limit.You can search &#34;flvsoft&#34; on google.com for more info.
</description>
<pubDate>Wed, 14 May 2008 23:48:44 -0700</pubDate>
</item>
<item>
<title>Thread Synchronization In Java in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7849#7849</link>
<guid isPermaLink="false">7849@http://www.w3exchange.com</guid>
<description>Topic: Thread Synchronization In Java

Message: Hi,Threads commonly share the same memory space area, that’s why they can share the resources. Threads commonly communicate by sharing access to fields and the objects reference fields refer to. This communication type is extremely efficient, but makes two kinds of problems: thread interference and memory consistency errors. By the synchronization tool we can avoid this problem.Synchronized methods are useful in those situations where methods can manipulate the state of an object in ways that can corrupt the state if executed concurrently. Stack implementations usually define the two operations push and pop of elements as synchronized, that’s why pushing and popping are mutually exclusive operations. For Example if several threads were sharing a stack, if one thread is popping the element on the stack then another thread would not be able to pushing the element on the stack.The following program demonstrates the synchronized method:
Code::public class SynThread{
    public static void main(String args[]){
        Share s=new Share();
        MyThread m1=new MyThread(s,"Thread1");
        MyThread m2=new MyThread(s,"Thread2");
        MyThread m3=new MyThread(s,"Thread3");
    }
}
class MyThread extends Thread{
    Share s;
    MyThread(Share s,String str){
        super(str);
        this.s=s;
        start();
    }
    public void run(){
        s.doword(Thread.currentThread().getName());
    }
}
class Share{
    public synchronized void doword(String str){
        for(int i=0;i&#60;5;i++){
        System.out.println("Started   :"+str);
        try{
            Thread.sleep(100);
        }catch(Exception e){}
        }
    }
}
ThanksFuad
</description>
<pubDate>Wed, 14 May 2008 03:05:30 -0700</pubDate>
</item>
<item>
<title>Benefits of Ajax in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7823#7823</link>
<guid isPermaLink="false">7823@http://www.w3exchange.com</guid>
<description>Topic: Benefits of Ajax

Message: Ajax is new very promising technology, which has become extremely popular these days. Here are the benefits of using Ajax:* Ajax can be used for creating rich, web-based applications that look and works like a desktop application.* Ajax is easy to learn. Ajax is based on JavaScript and existing technologies like XML, CSS, DHTML. etc. So, its very easy to learn Ajax.* Ajax can be used to develop web applications that can update the page data continuously without refreshing the whole page.
</description>
<pubDate>Sat, 10 May 2008 03:42:14 -0700</pubDate>
</item>
<item>
<title>Multitasking &#38; Multithreading in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7799#7799</link>
<guid isPermaLink="false">7799@http://www.w3exchange.com</guid>
<description>Topic: Multitasking &#38; Multithreading

Message: Multitasking allow to execute more than one tasks at the same time, a task being a program. In multitasking only one CPU is involved but it can switches from one program to another program so quickly that's why it gives the appearance of executing all of the programs at the same time. Multitasking allow processes (i.e. programs) to run concurrently on the program. For Example running the spreadsheet program and you are working with word processor also.Multitasking is running heavyweight processes by a single OS.Multithreading is running multiple lightweight processes in a single process/ task or program. For Example, When you used a word processor you performs a many different tasks such as printing, formatting text, spell checking and so on. Multithreaded software treats each process as a separate program.Some advantages of multithreading over multitasking are:&#160; &#160; * Threads share the same address space.&#160; &#160; * Context switching between threads is usually less expensive than between processes.&#160; &#160; * Cost of communication between threads is relatively low.
</description>
<pubDate>Tue, 06 May 2008 23:57:48 -0700</pubDate>
</item>
<item>
<title>Java Thread Creation in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7774#7774</link>
<guid isPermaLink="false">7774@http://www.w3exchange.com</guid>
<description>Topic: Java Thread Creation

Message: Hi,For creating a thread a class have to extend the Thread Class. For creating a thread by this procedure you have to follow these steps:Extend the java.lang.Thread Class.Thanks
</description>
<pubDate>Sat, 03 May 2008 01:54:15 -0700</pubDate>
</item>
<item>
<title>CSS drop down menu in Script Forums : HTML</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7243#7243</link>
<guid isPermaLink="false">7243@http://www.w3exchange.com</guid>
<description>Topic: CSS drop down menu

Message: I want to create a site with a header, a vertical drop down menu to the left, and some content.When clicking on a link in the menu, I can't refresh the entire page. This would reset the status of the drop down menu.So I will have to do one of the following:1) Have to use some modern alternative to frames.2) Let each page have its own static menu.Any ideas?
</description>
<pubDate>Thu, 20 Mar 2008 00:34:36 -0700</pubDate>
</item>
<item>
<title>CSS thumbnail in Script Forums : HTML</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7207#7207</link>
<guid isPermaLink="false">7207@http://www.w3exchange.com</guid>
<description>Topic: CSS thumbnail

Message: Hi, I'm trying to create a thumbnail index page. Ordinarily I would have used tables to create the look I want, but I'm trying to learn CSS as a better way of styling.I would like to position the thumbnails in the centre of the page 6 across and about 8 rows of them with some spacing in between. Could someone help me with the css code to do this.ThanksFuad
</description>
<pubDate>Sat, 15 Mar 2008 22:48:52 -0700</pubDate>
</item>
<item>
<title>Remove whitespace from text file in Script Forums : C/C++</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7039#7039</link>
<guid isPermaLink="false">7039@http://www.w3exchange.com</guid>
<description>Topic: Remove whitespace from text file

Message: Hello all,I am working on sessional program of compiler design that takes input from a file, removes extra white spaces and outputs the edited text to another file.So far my program deletes 1 whitespace whether the whitespace should be deleted or not. I have read about peek() and putback(). I am pretty sure I need to implement these two functions but quite frankly I am not sure how to go about doing this. Any help is appreciated. Thank you.
</description>
<pubDate>Wed, 27 Feb 2008 04:30:10 -0800</pubDate>
</item>
</channel>
</rss>
