Wikipedia:Reference desk/Archives/Computing/2012 May 8
Computing desk | ||
---|---|---|
< May 7 | << Apr | May | Jun >> | May 9 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
May 8
[edit]Looking for nice PHP IDE
[edit]Hi all,
I want to build my own website using JS, Ajax and JQ on the client side and PHP and SQL on the server side. I was looking for IDE that will allow me to work easily with these and espcially with PHP, Eclipse doesn't seem to be good enough and so I get to Cloud 9 IDE. However, my understanding now is that PHP files can't be run from cloud 9. Cloud 9 is my favorite now becuase it's on the web (meaning that there is no heavy download or need for plug ins) and it's easy to deploy with it. I also tried to work with PHP designer 8 (which fully supports PHP and HTML5) but the debugger seems no to work so well (instead of checking from one break point to another it goes from one code line to another). Any advise that would help in setting up nice IDE that fully supports (meaning, save files, open files, debug files, run them and etc) PHP, HTML5, JS and etc and allow easy deployment on remote server, and preferably web based IDE, is wellcomed.--Gilisa (talk) 10:12, 8 May 2012 (UTC)
- You can reduce some of the complexity of interacting with a remote server by having a local one for testing: XAMPP ¦ Reisio (talk) 18:18, 8 May 2012 (UTC)
- It really doesn't answer my question(s) and bring nothing new to me.--Gilisa (talk) 07:30, 9 May 2012 (UTC)
How do you prevent a cached page from jumping to a 404 error?
[edit]I found this link on a web site and saw a headline which, based on the URL, was a Google cache. I intended to scroll down, but all of a sudden the cached content on the page was replaced with the actual content from the web site.— Vchimpanzee · talk · contributions · 14:13, 8 May 2012 (UTC)
- I managed to stop the redirect (in Firefox) by hitting the Escape key as soon as the cached page appeared. There's a text-only version of the cached page here. Alternatively you could try disabling JavaScript, which is probably what's being used to force the redirect. AndrewWTaylor (talk) 18:12, 8 May 2012 (UTC)
- Thank you. I was on a Firefox computer just now but I saved what you linked to.— Vchimpanzee · talk · contributions · 19:01, 8 May 2012 (UTC)
Windows app to periodically click on a point ?
[edit]Is there a free Windows XP program which will click on a point every few seconds ? The important constraint is that I don't want it to click on the mouse pointer position (I already have XuMouse for that), I want to be able to specify the coords where it clicks. Every 5 seconds would be a good interval. StuRat (talk) 17:41, 8 May 2012 (UTC)
- Does it have to leave the mouse pointer where it was before? - Jarry1250 [Deliberation needed] 17:55, 8 May 2012 (UTC)
- Ideally, yes. StuRat (talk) 18:37, 8 May 2012 (UTC)
- I often use the AWT Robot. With about two lines of Java code, you can create a program to move the Windows mouse-cursor to an arbitrary X,Y coordinate and fire a mouse-event (a click, a double-click, or whatever). Let me know if you want some sample code. Nimur (talk) 18:11, 8 May 2012 (UTC)
- Here you go:
class Robot
{
public static void main(String args[]) throws Exception {
java.awt.Robot r = new java.awt.Robot();
r.mouseMove(100,100);
r.mousePress(0);
}
}
class Robot
{
public static void main(String args[]) throws Exception {
java.awt.Robot r = new java.awt.Robot();
final int delayInMilliseconds = 5000;
int x = Integer.parseInt(args[0]);
int y = Integer.parseInt(args[1]);
while(true) {
r.mouseMove(x,y);
r.mousePress(0);
Thread.sleep(delayInMilliseconds);
}
}
}
- Compile by running javac Robot.java and then run: java Robot 250 300 to click at x=250, y=300. Again, you can improve the robustness of this code.
- Of course, if you want to be platform-portable, use a mouse mask, instead of hard-coding "button 0"; and catch the possible exceptions, errors, and so forth. You can easily modify the program to run a scheduled click; or to configure the location of the click, and so on. And, believe it or not, you can even link this function into your FORTRAN program using Java Native Interface, as explained in this tutorial from the Stanford Department of Statistics. Nimur (talk) 18:32, 8 May 2012 (UTC)
- "javac" is not recognized as a valid command. StuRat (talk) 18:37, 8 May 2012 (UTC)
- JavaC is the Java Compiler. It is installed as part of the Java Development Kit. The easiest solution is to download the Oracle JDK 7. You can also use other Java compilers, like the free-software OpenJDK, but Oracle provides a one-button installation package for Windows that "just works," and is free to use for your purposes. Nimur (talk) 18:41, 8 May 2012 (UTC)
- I downloaded the Oracle jdk-7u4-windows-i586.exe file and installed it, and rebooted, but "javac" is still not recognized at the command prompt. Is there something else I need to do ? StuRat (talk) 20:20, 8 May 2012 (UTC)
- Did you make sure it added itself to the path? Nil Einne (talk) 22:32, 8 May 2012 (UTC)
- How do I do that ? I looked for it in the installed directories, but couldn't find a "javac.exe" or anything like that. StuRat (talk) 22:49, 8 May 2012 (UTC)
- I still can't get my PC to recognize the "javac" command. StuRat (talk) 01:11, 12 May 2012 (UTC)
Could use AutoHotkey. ¦ Reisio (talk) 18:24, 8 May 2012 (UTC)
- Or Sikuli [1]. Pretty much any general purpose (GUI intended) Macro (computer science) or Automation tools should be able to handle that in some fashion in fact, and as the sikuli case shows, even some specialised ones. Nil Einne (talk) 22:32, 8 May 2012 (UTC)
Android phone calls through PC over USB
[edit]I've read that when an Android phone is connected to a PC via Bluetooth, it's possible (on both Windows 7 Ultimate and Xubuntu, both of which I'm using) to answer calls by pressing a key and talk on the PC's headset. Is there any way to do that with a USB connection? I'm using a rooted Nexus One with Cyanogenmod 7, and have lots of USB ports but no Bluetooth dongle. NeonMerlin 21:53, 8 May 2012 (UTC)
- Yes there is, but I couldn't tell you by what process. There's quite a populous #android channel on irc.freenode.net that probably could help. While USB Bluetooth dongles can be comparatively pricey locally (but still a drop in the bucket compared to a smart phone / wireless plan), if you're willing to wait you can get them incredibly cheap online (at dealextreme for example). ¦ Reisio (talk) 22:56, 8 May 2012 (UTC)
- Supposedly, MyPhoneExplorer does that. - Akamad (talk) 23:06, 9 May 2012 (UTC)