Computing hints or ideas.
Just some thoughts or suggestions I have put together. Just a few. more coming. For more information see: http://www.instructables.com/id/Computing-hints-or-ideas

——————————————————————-

Soapbox:

On a website it was asked whether you should have local applications or just use the web for programs. My answer:

Nothing wrong with local applications, but they are harder for doing support such as for maintenance and updates. This is especially true if you have varying hardware platforms. (System admin for 10 years). With a web application, you have to make changes only once on a server (i.e. just one machine instead of many) There is nothing to keep someone from using a system as a private web server. Besides web based content is platform independent for the user of the web. http://www.instructables.com/id/Uses-fo … ate-cloud/

Now that the touchpads are getting equivalent screen footprints as regular pc’s, there is no need for special programming for them per se. Personally I love to take (open source code) from the web and and mold it to my needs (html5, javascript, and etc). (w3schools.com). I will either use the code locally or throw it on the server. Have browser, will compute.

Sourceforge.net and other sites all have a boatload of web server based programs, and in most cases you do not have to reinvent the wheel spending a lot of time building your own programs.

Also you can have multiple sites (aka virtual hosts) using one system just like the big guys do. Sites for more than one company or members of the family. (http://www.meetdageeks.com/2012/04/how- … dough.html)

Personally, I think the home or small business web server will be the next home appliance just like a refrigerator, washing machine, and or oven.

————————————-

Hunt the Wumpus.
There are several types of games, but lately adventure games seem to be coming back. The original adventures just required a keyboard. No fancy joysticks and or sound cards to deal with. What is really nice about them is that you can use the same source code more or less on a variety of systems. Sometimes that is known as code portability. People even want to put it on the Arduino (a micro-controller). If you do not have an Arduino, you can still play the original game on your desktop system.

You might even be able to put it on your router and play it remotely. You could even put it on a server to play while waiting for some event. Definitely for older or lower resource systems. Wumpus is probably one of the most popular of the original adventure games. Supposedly it was written in BASIC (Beginners all purpose instruction code) and then translated or ported to “C”. In fact some of the versions of the code,have the original BASIC code embedded in the comments of the “C” code. Good lesson in learning “C” for beginners.

For more information see: http://www.instructables.com/id/Simple-adventure-game/#step6

Enjoy.

—————————————————————–

Try this at your own risk. Will not be responsible for any issues for any reason. Get an expert to help if you are unsure!!

Basic circuit.

——————————————————-
C code to turn pins on and off parallelport light controller. of course the compiled code will called from a bash script.

/*
* Simple parallel port output control program for Linux
* Written and copyright by Tomi Engdahl 1998
* (e-mail: tomi.engdahl@hut.fi)
*
* The program output the data value to PC parallel port data pins
* (default lpt1 I/O address 0x378). The data values are given as the
* command line parameter to the program. The number can be
* in decimal (0..255) or hexadecimal format (0x00..0xFF).
*
*/

#include
#include
#include
#include <sys/io.h>

#define base 0x378 /* printer port base address */

main(int argc, char **argv)
{
int value;

if (argc!=2)
fprintf(stderr, "Error: Wrong number of arguments. This program needs one argument which is number between 0 and 255.\n"), exit(1);
if (sscanf(argv[1],"%i",&value)!=1)
fprintf(stderr, "Error: Parameter is not a number.\n"), exit(1);
if ((value255))
fprintf(stderr, "Error: Invalid numeric value. The parameter number must be between 0 and 255\n"), exit(1);
if (ioperm(base,1,1))
fprintf(stderr, "Error: Couldn't get the port at %x\n", base), exit(1);

outb((unsigned char)value, base);
}

————————————————————–
Turn on/off a random parallel port line

#Simple bash script
let nodf=255
declare -i X=$nodf
while true; do
NUM=$[ ( $RANDOM % $X ) + 1 ]
lptout $num
# timing loop here.
done

—————————————-

Have not made much time to work on special projects. One thing I need to start back on is robopet. There is nothing real super snazzy about this unit although it could be. mainly I will use it for carrying snacks back and forth from the kitchen during sporting events. There will be a second level not currently attached to hold the goodies. More information about the unit follows.

For more information see:   http://www.instructables.com/id/Pc-robot-in-progress/

——————————————-

Easy search.

You can save yourself some time by adding a small code snippet to your web pages to access a web search engine without having to go to a search engine. This is good for your self made home pages like the following:

Here is the code:

</pre>
<form action="http://www.google.com/search"><label for="q">Search:</label>
 <input id="q" type="text" name="q" /></form>
<pre> 

And it creates this super simple form. This might work a bit better:

</pre>
<form action="http://www.google.com/search" method="get" target="_top"><input type="text" name="q" value="" size="15" maxlength="255" />
<input type="submit" value="Google Search" /></form>
<pre> 

Have fun!

——————————————-
Noodles can be used with so many dishes.

Good day.

Advertisements