apacheNewbie
-
Content Count
30 -
Joined
-
Last visited
Posts posted by apacheNewbie
-
-
You all must have been struck by the blue screen of death...specially the windows users....these may arise due to hardware as well as software problems....so...what could be the possible reasons of PC crashing...
Not enough memory
Overheating
Incompatible Driver
and .... Windows
Yes, windows can crash anytime without any reason
-
How to run a java file from another java file?
Java Helpdesk
Hi! I want to run a java file from another java file. I heard exec() method from Rumtime class. I wrote two files(Caller and Hello) for testing. Following codes:
Caller.Java
Import java.Io.*;
Public class Caller{
Public static void main(String args[]) throws Exception{
Runtime rt = Runtime.GetRuntime();
Process prcs = rt.Exec("java Hello");
Hello.Java
Import java.Lang.System;
Public class Hello{
Public static void main(String args[]){
System.Out.Println("Hello World.");
}
}
Although I compile and run successfully but I didn't get result I neeed (printing Hello World). Please help me! Thanks so much!
-question by thungphan
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);
-
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?
-
Home server ? i guess we can install the IIS server in our home PC and make the computer a server then we have the INETPUB directory in it in which we can upload what we want .
In that moreover we have the WWW root folder.
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
-
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
-
My first of impression of Byet Host is good. It offers big storage and bandwidth capacity.Hmm well trap176 is brilliant and its what I use. Until I need or can afford payed hosting but that'll be a while yet. I also fnd because you are required to post on the forums any problems you have a quickly sorted out!
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.
-
I think youtube uses flash player to play FLV.So instead of embedding it as an FLV its a SWF?
It is common to embed flash application in your web site for multimedia.
-
Anyone knows when can I get a book or some tutorial money about making own Content Management System. I appreciate if someone will know the tutorial how I can make Library CMS (Content Management System).
Thanks!
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.
-
i do wired.. i can connect to live fine, its just hard to connect to other players..
It just recently got stricter then it was before, it is frustrating.
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
-
So..
Do you believe in Astrology? Which Part of Astrology do you believe more ?
The Personality one Or The Future one ? and Why ?
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?
-
I wondering if it is possible to try and make a java script to get the computer username and log it?
Notice from jlhaslip:edit Topic title
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
-
HiI have some problem I able to connect remote pc once its connect my local user logoff but I want my pc to connect multiple pc can any one can solve my problem
Well, to connect to multiple PC, you can use switch or hub.
I am not sure if that your question though
-
while (str != null) {
System.Out.Println(str);
str = inputFile.ReadLine();
}
// str == null
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.
exampleString buffer; str = ""; buffer = inputFile.readLine(); while (buffer != null) { str += buffer; buffer = inputFile.readLine(); } System.out.println(str);
-
does anyone know of any good websites with free java tutorials for people without a lot of prior coding experience?i've read some tutorials, but every one i read starts making references to C and C++... well i don't know either of those so it gets really really confusing really really fast.
ive downloaded the sdk but that is it....
i know a pretty good amount of php and a tiny bit of perl but those are procedural languages so i dont know if they even helpe me at all with an OOP language like java.
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!
-
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.
-
how could you embed php script in image document type?less likely yes, but not impossible. There is a way to get php to execute within an image as some signatures you see do, the ones which display your IP, OS etc... the only way i know of doing this is to write the php code yourself and specify an image document type but im sure there is an exploit somewhere which will allow such images to be uploaded.
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.
-
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
-
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.
-
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?
-
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.
-
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
-
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.
-
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++.
-
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.
How To Display Images Of A Directory
in Programming
Posted · Edited by apacheNewbie (see edit history) · Report reply
I would use file name as check box identifier. So first, we will add checkbox in your code
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):
Hopefully it helps