How can I run an .exe on a server, but show output and interact client-side? - executable

I want to run an .exe (Halo to be specific) on a server and then be able to view and interact with it through a browser, similar to a remote desktop. Is this even possible? I want to do this because we have nothing left to do in the last few days of school, and we wanted to play a Halo LAN, but are not allowed to install anything on the computer or run anything off of a flash drive, thus this was an idea we came up with.

Well, in principle it would be possible (though performance would probably be a problem), but in order to do this, you'd need at least some kind of viewer on the client. This in turn would need to be installed :-).
You could try to set up a VNC server, then use the TightVNC java viewer. That would work if the school's computers have Java set up. Still, I don't believe you'd get usable performance (VNC typically gives you 1 FPS at best).
Your best option is to either play browser games, or just do something else with your time. You might even try studying something interesting :-).

There is a way, and it's called CGI, but you won't be running Halo with it anytime soon.

Related

needed : Program for easily switching developer environment

This might be the wrong forum, but its filled with so many smart people so someone might know a solution.
One of my customers has given me several assignments that require a quite similar yet wery different development setup (different versions of class-libraries and such) and the problem is that each time I need to switch between the projects I need to do a lot of configuring to get the compilation to work and not include wrong versions of tools used.
If I dont get it right there might be a lot of cleanup afterwards.
It takes me at least an hour to switch projects. Often several.
Now I realize that the customer has an issue with a lot of branching in their setup and they are working on that, but thats a long process.
So.. My question is. Is there some tool that allows me to take "snapshots" of working project-environments and switch between them?
I'm working on windows.
There are many options. One of them is virtualization: running an entire operating system on top of your operating system. It will emulate a fake hard drive, fake network card, etc. This will run an entire desktop 'in a box'.
In the last years containerization is very popular: running a separate environment (file system, OS configuration) but leaving the heavy stuff to the host (in your case, Windows) such as networking, hardware, etc. This is geared towards running a single application (though this is flexible) 'in a box'.
In your case, since you need to encapsulate an entire development environment, it would seem to be best to go with a virtual machine.
A no-cost solution is Virtualbox. Paid alternatives such as VMWare may offer better usability, performance or features.
If your class libraries are in a specific location, you could containerize the compiler: you work on your PC, then build inside of a 'box' with its own environment. Docker is often used.
Depending on what language you are programming in, there may be a specific solution. Python has VirtualEnv, for example.

How to test a VB program which will run on a network

I am a self-taught programmer and have only delved into new areas of programming as the need arises. I have never done any network programming, everything I have written has been for a single computer. I have written a program for an old board game and it runs great. But, now I want to try to write it to run for multiple players across a local network. I have an idea of what has happen in terms of constantly checking a specified folder/file for changes. But... how do you test this without actually building/compiling the program and installing it on another computer every time you make any changes? I have tried to search various forms of what I have as the title here, but all that comes up is about testing network connections, or socket programming (would this be easier/needed) or systemfilewatcher (which may be an option too if it will run on Windows 7 and 10... but, I find nothing about testing programs to actually access the network and simulating 2 copies of the program running. Any suggestions, links, etc. would be greatly appreciated.
I think you will be disappointed in the performance of a file-based network game unless reaction or refresh time is of little consequence for your "board" game. You may also need to work out potential concurrency issues (ie, someone updating a file you've just read). If you have any desire to do other games in the future you should be using sockets (most likely UDP unless you have a good reason not to) to create a client server system.
As to your question, yes, you should be able to test it. You just need to run both a compiled exe and the source in VS debug mode, accessing the same folder on your drive. If you go with the socket-based option, you would use your PC's loopback address 127.0.0.1 (sometimes known as localhost), but the 2 different parts will need to communicate on different ports.

Api to turn on your computer

I'm Making a small on-line clock (both for fun and to learn a bit more of php and javascript) started it because i actualy need an alarm clock and this would be easier than buying one (don't ask)
Now i wanted to know one thing, i know it's impossible to turn on/off you're computer from a browser, but a friend asked me if i could do him a small addon/program that would fetch the alarm time he added there, and would turn his computer on so it would let if wake up
I know turning on must be pretty much impossible, but turning on from sleep/hibernate maybe?
Anyone knows any api to do this? Windows or mac, or cross platform.
Just for curiosity the alarm clock is here http://www.my-clock.net
Edit:
On the wiki page, wake-on-lan says it requires to turn the bios power to the network-board, is there any way arround this? Or are todays computers already ready for this kind of protocol?
There could be two solutions:
Use Wake-on-LAN as was suggested. But you must have another machine up on that LAN, it doesn't work over the Internet itself. So it goes like You -> [Internet] -> Waker -> Your friend.
You can set his RTC wakeup alarm over the Internet while his machine is still up and running. Then his computer will wake at the specified time.
Both would work even if the computer is completely powered-off.
Once a OS goes in hibernate/sleep the only way to bring it up is through some kind of kernel level hardware driver event. for example pressing power button or opening the lid of the system etc.
IMO it would be bit complex to model the functionality within an application, as application is dependent on OS level services, that are not available in sleep/hibernate mode.
I don't know a lot about how it works, but it sounds like you need Wake-on-LAN
Wake on LAN (WOL, sometimes WoL) is an Ethernet computer networking standard that allows a computer to be turned on or woken up remotely by a network message.
Your best bet may be Wake-on-LAN
As people have pointed out, Wake-On-Lan is one possibility. But there's another one that might suit your need. Most BIOS'es today already provide an option to turn your computer on at a given time. If your goal is simply to turn your computer into an alarm clock, this should do the trick.

Hardware Simulation

I'm working on a software project intended for recuperating old specific hardware, mostly for non-for-profit organizations and poor schools.
I need a way to simulate old hardware so I can test the application before shipping it out.
How can I do this?
I'm not sure exactly what the question is asking for. I think you are asking for a way to emulate certain HW?
If that is the case, I've used QEMU in the past, and it has worked great. QEMU is an open source machine emulator and virtualizer.
Use virtual machines? Prepare the images reflecting (more or less) the state of the target machines (speed, hardware, etc). And use them for testing the deployment?
You might want to check out Emulator Zone, and emulator is a good google search term you might not have tried.
Well. If the old hardware is communicating via RS232, then write a class that wraps the RS232 commands and make the class inject the messages the old hardwares would respond. In your program, work against that class instead of real rs232-port and just change instance to real rs232 before shipping.
I have done this succesfully in a project and it worked out really good and its not that complicated that you can think.

How do you automate some routine actions for improving productivity? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Every morning, after logging into your machine, you do a variety of routine stuffs.
The list can include stuffs like opening/checking your email clients, rss readers, launching visual studio, running some business apps, typing some replies, getting latest version from Source Control, compiling, connecting to a different domain etc. To a big extend, we can automate using scripting solutions like AutoIt, nightly jobs etc.
I would love to hear from you geeks out there for the list of stuffs you found doing repeatedly and how you solved it by automating it. Any cool tips?
I use Linux. I have a bunch of scripts that do anything I want. Typically I write a script whenever a "block" of work can be reused in the future. For example, simple refactorings, deployments, etc...
Over time I started to combine these blocks, hence getting ever more efficient.
Regarding the "load stuff at startup", under Linux that comes out of the box (you can "save your current session" when you log out or turn off the computer).
On windows, my suggestion is to use programs that can be automated via command line.
A favorite way is to leave the computer on at night or better, if it's a laptop, put it to sleep. Running a web browsing virtual machine in VMware or similar works also, you can set the VM start along with the machine and save its state on shutdown, so your web pages and email client stay open. This works for development also if you're doing scripting or something similar where the performance hit of the VM on large compiles won't negate the benefits.
SlickRun is very handy for this, just a few keys to navigate to anything common and a very small footprint. With input variables and file path recognition all part of it I can quick remote desktop to any machine, search anything, pull up whatever's needed.
On OS X, I have an Applescript that I run at the beginning of the day. It sets an away message on IM, hides or quits programs that would distract me, gets new mail, and so forth. I also plug in my USB backup disk, so when I'm going home, another script ejects it and quits some programs. When the script is done, so am I.
I invoke these scripts with key combos using Quicksilver.
If you don't have a Mac, by the way, Quicksilver and Applescript are probably the #1 and #2 reasons to switch. Between the two of them, you can tell your computer to do practically anything you want in very short order.
Use a good app launcher such as Quicksilver or Launchy to cut down on the time it takes to perform simple tasks. They're usually not scriptable, but they do let you do each step faster.
Writing shell scripts (Applescript, Bash, PowerShell, etc..) is a great way to automate most mundane tasks, assuming your apps are scriptable, as well as pick up a new language. As you venture further into this practice, you'll find yourself more and more annoyed at the apps you use that aren't scriptable, to the point where it starts to affect your choice of apps ;-)
Also, consider a cron job, Windows scheduled task, or similar OS X analog to automatically run certain tasks at certain times of day/week/month/year. You can use this for anything from the "workday morning" scripts mentioned previously, to reminding you of your wife's birthday and anniversary every year. There's some more info here for *NIX systems, or here for Windows boxes.
Happy automation!
I have a hard time wrapping my head around Applescript, but since Apple runs BASH scripts just fine, I just use those instead. I've got a development server on my mac, so I've got a script that I can run to create a new site directory, create a new virtual host in apache, add a new domain to my /etc/hosts file, etc.
It's especially cool to integrate Bash (or probably applescript, although I don't know how) with Growl. That way, you can put a nice message up on the screen, complete with a png icon. This is more useful for things that your scripts do during the day though.
I do most of my programming work on a development server at work, so in the evening I simply detach my screen session and re-attach it in the morning, so it takes just a few seconds until I'm exactly where I left the day before.
I have some macros defined in mutt to clean up my inbox (archive commit mails etc.), I have a script that mounts some directories on the development server on my notebook via sshfs (works without interaction using public keys), and after that all I have to do is start up a browser and get a coffee. :)