Jump to content
xisto Community

apacheNewbie

Members
  • Content Count

    30
  • Joined

  • Last visited

Everything posted by apacheNewbie

  1. I would use file name as check box identifier. So first, we will add checkbox in your code <?php$path = "./";$dir_handle = @opendir($path) or die("Unable to open folder");while (false !== ($file = readdir($dir_handle))) {if($file == "index.php")continue;if($file == ".")continue;if($file == "..")continue;echo "<input type=CHECKBOX name=$file>";echo "<img src='$file' alt='$file'><br />";}closedir($dir_handle);?> That is, now you have images with check box beside them. In order to delete the chosen images, you need to capture which checkbox is selected. This is the example of how to know which check box is checked (assuming, you are using POST method to submit the form using delete button): <?php$path = "./";$dir_handle = @opendir($path) or die("Unable to open folder");//We list the name of the files again, since the name of the checkbox is the same with the name of the filewhile (false !== ($file = readdir($dir_handle))) {if($file == "index.php")continue;if($file == ".")continue;if($file == "..")continue;if(isset($_POST[$file])){ $checkbox = $_POST[$file]; if($checkbox == on) { //checkbox is selected //Delete the file if(!unlink($file)) die("Failed to delete file"); }}?> Hopefully it helps
  2. Not enough memory Overheating Incompatible Driver and .... Windows Yes, windows can crash anytime without any reason
  3. The Runtime.exec methods create a native process and return an instance of a subclass of Process that can be used to control the process and obtain information about it.So if you want to get the output ("Hello World"), you need to use Process.getInputStream() method. The method will return an InputStream, which you can use to generate output in your monitor. This is the example of how to print the InputStream: InputStream is = process.getInputStream();BufferedReader is = new BufferedReader(new InputStreamReader(is)); String line; while ((line = is.readLine()) != null) System.out.println(line);
  4. At last, a free SDK for mobile phone.The programming language is java, so it is object oriented and run on a virtual machine.It has nice integration with Eclipse IDE.I hope android can compete with other mobile SDK like symbian, and windows mobile.Anybody download the SDK and trying to make an mobile application with it?What do you think about android?
  5. I think home server is more than just a web server. It can be use for file sharing, email monitoring, or web proxy. It is very nice to use in dormitory
  6. If you don't want to use id, you need to know the sequence number of the form in the display.First, you need to access the form object.With id, you can access the form object by using: document.getElementById('$rs['id'])otherwise, you can access it using: document.forms[<form number>] Because I don't know the sequence number of your form, I will use form id instead. I will use id 'form1' for simplicity. <script type="text/javascript">function news_modify(type){ if(type=='edit'){ document.getElementById('form1').do.value='edit' } else if(type=='delete'){ document.getElementById('form1').do.value='delete2' } document.getElementById('form1').submit();}<form method='post' action='manage.php?manage=news&id='form1'><input type='hidden' name='do' value='' /><button type='submit' onclick="news_modify('edit');">Edit</button> <button type='submit' onclick="news_modify('delete');">Delete</button></form></script> Hope it helps
  7. My first of impression of Byet Host is good. It offers big storage and bandwidth capacity. Its cPanel is nice. Byet Host does not install complete add on for PHP though. That's mean many classes in certain framework (e.g. Zend Framework) will not work. That's why I move to Xisto However, I do not know about its speed. I only use it to test my PHP application.
  8. I think youtube uses flash player to play FLV. It is common to embed flash application in your web site for multimedia.
  9. If you are good at reading source code, try to download Drupal Content Management System, and read their code Drupal is module based, so you can read only the module that interests you. In my opinion, it is better if you develop your CMS library from existing one, instead of creating from scratch. It is too time consuming.
  10. If you can connect to live, then it is possible that your friends who have problem in their connection. May be they forget to open port and do the portforwarding
  11. I still can believe the personality based on astrology. It is kind of strange if astrology is used for predicting the future. Do all humans only have 12 kind of paths in their life?
  12. With VBScript you can use WScript.Network object. The user must activate its ActiveX controls. With normal javascript, I am sure it is not possible, otherwise, it could become a security issue
  13. Well, to connect to multiple PC, you can use switch or hub. I am not sure if that your question though
  14. After this while loop, your str is null Therefore the next line " for(int I = 0; I <str.Length(); I++)" throws exception. May be you need to add another variable as buffer before adding the line to str variable. example String buffer; str = ""; buffer = inputFile.readLine(); while (buffer != null) { str += buffer; buffer = inputFile.readLine(); } System.out.println(str);
  15. I find that this book "Essentials of the Java Programming Language" is good for learning java. You can read it online or download the book from this site: http://www.oracle.com/technetwork/java/index.html Have fun!
  16. In my opinions, game companies are using another way to gather ideas.They, of course, have their own team that taking care about this idea matter, but when they need ideas from outside, they will put something like contest. Gather all ideas from the contestant and the best one will get the prize.
  17. how could you embed php script in image document type? Anyway, There is no problem by using image hosting service like image shack. The problems come only when you make a web site which allow the visitors to upload their data to the server. So this means you need to be careful when you make a image hosting service like image shack, but you don't need to worry when you use it. There is no security problem there.
  18. JSP is usually used for big enterprise application and PHP for smaller onesBut I think newest version PHP has major upgrade which make it able to make enterprise application equal to those built using JSP.And, I feel that JSP is overcomplex, so I choose PHP
  19. What is the best framework to make enterprise application using Java (J2EE)?Currently I am learning Spring and it is quite good eventhough it is very complicated in my opinion.Maybe someone can share which framework that you useWhat are its advantages and disadvantages?I seek a J2EE framework that supports JMS and offer quick development process.
  20. Actually, what is the "copyright" means? Is it only about the use and distribution of the operating system, or it includes the design and architecture of the operating system itself.If apple cannot sue microsoft over this thing, that means everyone can make the similar operating system without being sued. Or there is some point that I have missed?
  21. Could you explain more about realbasic? for example, what is the main advantage of realBasic compared to another programming language (it is new programming language, right?)It is really my first time to hear this name.
  22. You can try this one: var beginText = textarea.value.substr(0, textarea.selectionStart);var endText = textarea.value.substr(textarea.selectionEnd);var cursorPos = textarea.selectionStart;textarea.value = beginText + beginCode + endCode + endText;//Change beginCode and endCode with the symbol that you want//Example beginText + [X] + [/X] + endText//to put the cursor in the middleif (textarea.setSelectionRange){ textarea.setSelectionRange(cursorPos + beginCode.length, cursorPos + beginCode.length); textarea.focus();} Does not work on all browser. But I think it works on mozilla and IE
  23. javascript is not really dangerous. I think it depends on the browser that you use. IE supports many javascript functions. While it is good to have additional function in javascript, it can be dangerous for the user when hacker finds a way to do malicious thing.Just choose your browser wisely.
  24. You can seach it by using your favourite search engine.It is also good if you buy/borrow some books as I find it more understandable.I recommend reading "Learning C++ in 21 days". In a month or so, you will understand the concept behind C++.
  25. I do not think that software developer will die only because of piracy.First, the software that a software developer made is not necessarily general product like microsoft windows or adobe photoshop. They can make specialized software for a company and there, they will get money.Second, for general product, It is true that we find the piracy product all over internet. Those who is only depend on their product would die soon. But I find that software developer usually makes advantage by offering customer service. The pirate software would not get this one.Third, Big company usually does not want to involve in piracy problem. So if your software is good enough that they want to use it, they will pay for it.Fourth, Open software company has shown you how to survive without getting money from your software. As your software developer you can get money from training, service, seminar, advertising, etc.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.