LuciferStar
Members-
Content Count
112 -
Joined
-
Last visited
Everything posted by LuciferStar
-
learn algorithm from clearn oo method from c++/java
-
I uploaded it onto my website. As it is a pure download, Xisto.com may delete my account. Please don't delete my account! I'll remove it in 7*24 hours. P.S. I forgot to attach the address: http://forums.xisto.com/no_longer_exists/ deleted IF you want it,mail me:singlestudio@hotmail.com
-
I've learned C for more than 5 years,and I found it's hard for me to learn C++,though I can understand it.CLASS is hard to me.the output of cout is variable,uncontrolable,I think.
-
go internet.javascript.com
-
I got it. This code is shared. I just paste this code for share. some websites did not support ftp,and their webftps are not good enough,every upload time,can only upload 5 / 10 files. But my code can upload as many as you like.
-
ASP is only supported by WIN32?
-
I think the best way to learn PHP,is just copy the examples in PHP manual,paste them into notepad. If you want to make your own script,then you may learn a bit programming language,such as c/c++.I learnt C first,and I spent 2 days to be familiar with PHP.
-
#include "stdio.h"[br]#include "process.h"[/br]int fun0(int x,int y){return (x+y);}[br]int fun1(int x,int y){return (x-y);}[/br]int fun2(int x,int y){return (x*y);}[br]int fun3(int x,int y){return (x/y);}[/br]int (*assign[4])(int x,int y);[br]void assign_function(void)[/br]{[br]assign[0]=fun0;[/br]assign[1]=fun1;[br]assign[2]=fun2;[/br]assign[3]=fun3;[br]}[/br]//const int data[4]={9,8,7,1};[br]int data[4]={9,8,7,1};[/br]const int fetch[24][4]={[br]{3,2,1,0},{0,3,2,1},{1,0,3,2},{2,1,0,3},[/br]{3,1,2,0},{0,3,1,2},{2,0,3,1},{1,2,0,3},[br]{3,0,1,2},{2,3,0,1},{1,2,3,0},{0,1,2,3},[/br]{3,2,0,1},{1,3,2,0},{0,1,3,2},{2,0,1,3},[br]{3,0,1,2},{1,3,0,2},{2,1,3,0},{0,2,1,3},[/br]{3,1,0,2},{2,3,1,0},{0,2,3,1},{1,0,2,3}};[br]int calculator[4];[/br]void result(int x,int y,int r,int n)[br]{[/br]int a[4],b[4];[br]char fomular[20],o[4]={'+','-','*','/'};[/br]for(int i=0;i<4;i++)[br]{[/br]a[i]=fetch[x][i];[br]b[i]=data[fetch[y][i]];//printf("a[%d]:%d b[%d]:%d o[%d]:%c o[a[%d]]:%c\n",i,a[i],i,b[i],i,o[i],i,o[a[i]]);[br]}[/br]if((a[0]==0||a[0]==1)&&(a[1]==2||a[1]==3))[/br] sprintf(fomular,"Method %d: (%d%c%d)%c%d%c%d=%d\n",n,b[0],o[a[0]],b[1],o[a[1]],b[2],o[a[2]],b[3],r);[br]else if((a[0]==2||a[0]==3)&&(a[3]!=2||a[3]!=3))[/br] sprintf(fomular,"Method %d: %d%c%d%c%d%c%d=%d\n",n,b[0],o[a[0]],b[1],o[a[1]],b[2],o[a[2]],b[3],r);[br]else sprintf(fomular,"Method %d: (%d%c%d%c%d)%c%d=%d\n",n,b[0],o[a[0]],b[1],o[a[1]],b[2],o[a[2]],b[3],r);[/br]//printf("\tResult:\n");[br]printf("\t%s",fomular);[/br][br]}[/br][br]void main(void)[/br]{ int r=24;[br] //int temp;[/br] int n=0;[br]assign_function();[/br]printf("\t\tAchieve 24 point\n\n\tBy Lucifer Star\n\tSingle Studio\n\t\tEMAIL:LetMeGetOne@hotmail.com\n\n");[br]printf("*****************************************\n");[/br]printf("\tPlease input 1st number:");[br]scanf("%d",&data[0]);[/br]printf("\tPlease input 2nd number:");[br]scanf("%d",&data[1]);[/br]printf("\tPlease input 3rd number:");[br]scanf("%d",&data[2]);[/br]printf("\tPlease input 4th number:");[br]scanf("%d",&data[3]);[/br]printf("\tWhat do you want to achieve(default:24):");[br]scanf("%d",&r);[/br]//scanf("%d",&temp);[br]//temp=getch();[/br]//if(temp!=0x0d) r=temp;[br][/br]printf("\n ***********************************\n");[br]if(data[0]==0||data[1]==0||data[2]==0||data[3]==0) {printf("The 4 numbers shouldn't be 0!");exit(0);}[/br]for(int ii=0;ii<24;ii++)[br]{[/br] for(int i=0;i<24;i++)[br] {[/br] int z=0;[br] for(int j=0;j<4;j++)[/br] {[br] calculator[j]=data[fetch[i][j]];[/br] }[br] for(int k=0;k<3;k++)[/br] {[br] if(k==0)[/br] {[br] if(calculator[0]%calculator[1]!=0&&fetch[ii][0]==3)[/br] {z=0;break;}[br] else z=assign[fetch[ii][k]](calculator[k],calculator[k+1]);[/br] }[br] else[/br] { if(fetch[ii][k]==3)[br] if(calculator[k+1]==0||z==0||(z%calculator[k+1])!=0)[/br] {z=0;break;}[br] z=assign[fetch[ii][k]](z,calculator[k+1]);[/br] }[br] }[/br] if(z==r)[br] { n++;result(ii,i,r,n); }[/br] }[br]}[/br]printf("\n******************************************\n");[br]if(n==0) printf("Sorry,it's unable to do so!");[/br]else printf("Thanks for using my software!");}
-
SURE! GO AHEAD! You should modify the data: such as mainboardcontent=new Array("8","abit","asus", "epox", "giga","intel","iwill","msi","others", 5,"intel", "via", "nvidia", "sis","others",4,"socket478","socket462(A)","socket370","other",3,"ddr","sdr","other",4,"soundblast","videocard","netcard","other"); datastructure: 1 subselection: selectiongtitle=new Array("1","hello","hola"); 2 subselections: selectiongtitle=new Array("1","hello","hola","2","ni hao","bonjour"); 3 subselections: selectiongtitle=new Array("1","hello","hola","2","ni hao","bonjour","3","cell1","cell2","cell3");
-
not only redirection:lol:
-
savefile.php <?php [/br]function upload($form)[br]{[/br] $filename=$_FILES[$form]['name'];[br] if($filename!=NULL)[/br] {[br] $l=strlen($filename);[/br] $rest = substr($filename,$l-3 ,$l );[br][/br] if($_POST['DIR']!=NULL) $filename=sprintf("%s/%s",$_POST['DIR'],$filename);[br] else $filename=sprintf("%s",$filename);[br][/br] if (is_uploaded_file($_FILES[$form]['tmp_name'])) [/br] { [br] if(move_uploaded_file($_FILES[$form]['tmp_name'], $filename)) [/br] {//echo $_FILES[$form]['tmp_name'];[br] echo "<p>uploaded file: ".$_FILES[$form]['name']." done.";[/br] echo "<p>link:<a href=\"".$filename."\"></a>";[br] }[/br] }[br] else[/br] {[br] echo "Possible file upload attack. Filename: " . $_FILES[$form]['name'];[/br] }[br] }[/br]}[br]$i=0;[/br]while($i<$_REQUEST['NUMBER'])[br]{[/br]$file=sprintf("userfile%d",$i);[br]upload($file);[/br]$i++;[br]}[/br]?>
-
upload.php <?php[br]/**********************************[/br]*[br]** file directory list[/br]*[br]**********************************/[/br]function listthem($add)[br]{[/br] $t=$add;[br] if ($handle = opendir($add))[/br] {[br] while (($file = readdir($handle))!=FALSE)[/br] {[br] $add.="/".$file;[br][/br] if (is_dir($add)==TRUE)[/br] { [br] if($file!="." && $file!=".." && is_dir($add)==TRUE)[/br] {[br] echo " <option value=\"".$add."\">".$add."</option>";[/br] listthem($add);[br] }[/br] }[br] $add=$t;[/br] }[br] closedir($handle); [/br] }[br]}[/br]function getdir($add)[br]{[/br]?>[br] <input type="hidden" name="MAX_FILE_SIZE" value="200000">[/br]upload limitations! less than 200KB。<p>[br]WHERE TO UPLOAD <select size="1" name="DIR"> [/br] <option value="">.</option>[br]<?php listthem($add);?>[/br]</select>[br]<?php[/br]}[br][/br]if($_POST['NAME']=="LuciferStar")//change your name for secu[br]{ //password is not required in this edition[/br] setcookie("TestCookies",md5($_POST['NAME']),time()+3600);[br][/br] $i=0;[br] echo " <form enctype=multipart/form-data action=savefile.php?NUMBER=".$_POST['NUMBER']." method=post>";[/br] ?>[br] <?php $add="."; getdir($add);?>[/br] <?php[br] while($i<$_POST['NUMBER'])[/br] {[br] $file=sprintf("userfile%d",$i);[/br] $i++;[br] echo "<p>File $i <input name=$file type=file> ";[/br] }[br] echo "<input type=submit value=upload>";[br]}[/br]else[br]{[/br]?>[/br]<form action="upload.php" method="post">[br]<p>USER <input name="NAME" type="text"></p>[/br]<p>PASS <input name="PASS" type="password"></p>[br]<p>NUMBER <input name="NUMBER" type="text"></p>[/br]<input type=submit>[br]</form>[/br]<?php[br]}[/br]?>[br]</p> [/br]</form>
-
to know average and sum I want to know the students score
LuciferStar replied to LuciferStar's topic in Programming
Usage:sum.php?NUM=100 to calculate the sum and average of 100 students' scores -
<?php[br]if($_REQUEST['NUM']!=0)[/br]{[br]?>[/br] <form method=post>[br]<?php[/br] for($i=0;$i<$_REQUEST['NUM'];$i++)[br] echo "field".($i+1)." <input type=text name="."field".($i+1)." value=".$_POST['field'.($i+1).'']."><BR>";[br]?>[/br] <INPUT TYPE=SUBMIT>[/br] </form>[br]<?PHP[/br] for($i=0;$i<$_REQUEST['NUM'];$i++)[br] $sum+=$_POST['field'.($i+1).''];[/br] echo "SUM:\t".$sum."<BR>"."AVERAGE:\t".$sum/$i;[br]}[/br]?>
-
i forgot the code lable.you should add ming functions to php.ini
-
<?php[br]if($_REQUEST['name']==NULL)[/br]{[br] header("Location:?name=Guest");[/br]}[br]else[/br]{[br]?>[/br]<html>[br] <head>[/br] <title>Welcome</title>[br] </head>[/br] <body bgcolor=black>[br] <?php[/br] echo "<font color=gray><b>Hello, ";[br] echo $_REQUEST['name']."</b><p>";[/br] ?><pre>[br]<?php[/br] for($i=0;$i<10;$i++)[br] {[/br] for($j=0;$j<10;$j++)[br] {[/br] echo ($i*$j)."\t";[br] }[/br] echo "\r\n\r\n";[br] }[/br]?><pre>[br] </body>[/br]</html>[br]<?php[/br]}[br]?>[/br]
-
none of them.I don't know how to make a flash.but I'd like to make flash via PHP.
-
The Best Browser In Your Opinion for WIN32/64 systems
LuciferStar replied to jacob's topic in Software
IE6 I've tried netscape and myie, but ie6 is good enough. -
uninstall all 3rd-party software installed in system volumn.remove all .hlp/.chm help files if you needn't.clear the system temp folder.
-
Which software is best? Adobe Photoshop or 3D MAX
LuciferStar replied to odomike's topic in Software
ps is best for panel designbut hard to learn -
antivirus:Rising 2004firewall:NetSky
-
easy to use and even the Installation
-
Sorry there's no comment. form.html <html><head><script language=javascript src="form.js"></script>[/br]</head>[br]<body onload=show(0)>[/br]</body></html> form.js [/br]mainboardcontent=new Array("8","abit","asus", "epox", "giga","intel","iwill","msi","others", 5,"intel", "via", "nvidia", "sis","others",4,"socket478","socket462(A)","socket370","other",3,"ddr","sdr","other",4,"soundblast","videocard","netcard","other");[br]harddcontent=new Array("6","maxtor","samsung", "hitach", "westerndata","seagate","others", 6,"40GB", "60GB", "80GB", "120GB", "160GB", "others",3,"5400rpm","7200rpm","other");[/br]cpucontent=new Array("4","Socket478","Socket462", "Socket370", "others", 6,"1M", "512KB", "256KB", "128KB", "64KB", "others",2,"111","222");[br]ramcontent=new Array("4","ddr","sdram", "rambus", "others", 4,"128M", "256KB", "512KB","others");[br][/br]selectdata=new Array("0","manual","1","1", "1","CPU","2","0", "2","MAINBOARD","5","0", "3","RAM","2","0", "4","HARDDRIVE","3","0");[br][/br][/br]function showdata(data,j)[br]{[/br] if(j==0)[br] {[/br] max=data[j*data[0]];[br] for(k=1;k<=max;k++)[/br] { [br] document.write("<option value=\""+data[k]+"\">"+data[k]+"</option>");[/br] }[br] }[/br] else[br] {[/br] old=++max;[br] max+=data[max];[/br] for(k=old+1;k<=max;k++)[br] { [br] document.write("<option value=\""+data[k]+"\">"+data[k]+"</option>");[/br] }[br] }[/br]}[/br]function add(i)[br]{[/br] for(var j=0;j<selectdata[i*4+2];j++)[br] {[br][/br] if(selectdata[i*4+3]=="0")[/br] {[br] document.write("<br><select name=\"select"+(j+1)+"\">");[br][/br] switch(i)[/br] {[br] case "1": showdata(cpucontent,j);break;[/br] case "2": showdata(mainboardcontent,j);break;[br] case "3": showdata(ramcontent,j);break;[/br] case "4": showdata(harddcontent,j);break;[br] default: document.write("<option value=\""+j+"\">"+j+"</option>");break;[/br] }[br] document.write("</select>");[/br] }[br] else if(selectdata[i*4+3]=="1")[/br] {[br] document.write("<br><input name=\"which"+j+"\"></input>");[/br] }[br] }[/br] document.write("<br><br><input type=submit></input>");[br]}[/br]function show(i)[br]{[/br] document.write("<html><head><script language=javascript src=form.js></script></head><body>");[br] document.write("<form name=\"form\" method=\"post\" action=\"\"><select name=\"which\" onchange='draw(this.options[this.selectedIndex].value);'>");[br][/br] for(var x=0;x<19;x+=4)[br] {[/br] if(selectdata[x]==i)[/br] document.write("<option selected value=\""+selectdata[x]+"\">"+selectdata[x+1]+"</option>");[br] else[/br] document.write("<option value=\""+selectdata[x]+"\">"+selectdata[x+1]+"</option>");[br] }[/br] document.write("</select><br>");[br] if(i!=0)[br] {[/br] add(i);[br] }[/br] document.write("</form></body></html>");[br]}[/br]function init()[br]{[/br] document.close();[br]}[/br]function draw(i)[br]{[/br] init();[/br] show(i);[br]}[/br]