Monday, December 30, 2013 , a simple printer test page

Network is working, can't find that button that says print a test page.
I mean, i work in the IT business, i can, but what about other people ?. Moreover , does windows printer test page or the one in Mac or CUPS (the mac and linux printing system) really test your printer ? With all due respect,  NO.

Fed up as you're, I created a very simple and quick site which actually prints meaningful test pages.

Visit the page here :

Tuesday, December 10, 2013

Getting a list of .Lib files of a library to add to Visual studio C++ project configuration

If you want to add a library to your C++ project in Visual Studio , you have to do all of the three :
1- Add the library's include directories under  
Project Properties => C/C++ => General => Additional Include Directories
2- Add the library's Lib directories under
Linker => General => Additional Library Directories
3- The last step (the whole purpose of this post) is to list all the .Lib files that you're going to use specifically to Linker=>Input=>Additional Dependencies , and for this i suggest that you
  1. Go inside the directory containing the .lib files
  2. Right click in any empty area inside the folder while holding shift, this will bring the "Open command window here" option
  3. Run the command
    dir *.lib /B|clip 
Since you have a list of the .lib files at the clipboard, go to your project's property dialog , to input and "additional dependencies" drop down and paste your .lib list there . Enjoy

Friday, August 9, 2013

MK802+ as a home server (Part 3) : Installing a debian distro , a different apporach

Well , my last setup crashed , apparently the SD card from which i did the booting was poorly manufactured. I had error blocks everywhere at the start of the SD from which i booted my MK802+ . In this post i'll attempt to re-install a debian distro with no gnome (the graphical window manager)  just to try a different  method with a new SD card.

So , I downloaded the respective distro from here : and i followed the instructions for this tutorial, and these are the steps that worked for me:

Since i had to use a live linux (ubuntu) to prepare the SD card, I wanted to gain root access to be able to run the commands in the tutorial (bzip2, dd , etc.. ).

To gain root access on live linux, use the following command

sudo su

The rest of the steps are straight forward:

bzip2 -dc a10-debian-server-2gb*.bz2 /dev/devicefile

Replace /dev/devicefile by your device's file name , usually it's sda. Or it can be listed with mmc prefix.It is important that you select the correct drive otherwise you can format your main drive and loose your files

For the MK802+ , i used the file a10_mid_1gb_hwpack.tar.xz I got from
dd if=bootloader/sunxi-spl.bin of=/dev/devicefile bs=1024 seek=8
dd if=bootloader/u-boot.bin of=/dev/devicefile bs=1024 seek=32
I rebooted the device and then i could successfully log in to it using SSH via Putty
username: root  , password : passsword

Additional steps for installing the script.bin are further described from step 7 here (the source for this part of the post)

Installing an administrative interface:
Since i have a little bit of experience with Webmin . I think  a web UI will make my life easier (especially with SMB and Apache later-on). Its installation is well described here :
If you're using Wget to download the package.. If the installation of the dependencies complain about other dependencies , run the following command at the end.

apt-get -f install

It should give you something like
Webmin install complete. You can now login to https://debian:10000/

Of course you'll change debian with your server IP Address

Now , Webmin will work and here is a screenshot from my current system's webmin:

Backup , Backup , Backup:

Learning from my mistake , and before i go anywhere further , i will seek a backup solution. For now , an SD clone will do. However , later on , i will seek better ways of backup especially that i don't want to turn the server off. 
First , Shut the device off , use the   shutdown now   command . 
Second , power off the device and take the SD out and insert it in another PC to be backed up.

For the imaging I use the amazing tool DiskImage ( get it here)

Have you mooed today ?!!! 

Friday, July 5, 2013

Creating a true dynamic search in Microsoft Access

Hi there ,
logoSo I was working on an access database and I wanted to implement a search box that updates a subform dynamically as the user enters text. I searched online a lot and all i found was made using really ugly VBA code to set a search filter manually. I will show you how to do this using two VBA lines , a temp variable and a query. ENJOOYYY!!

Here is my form layout : 


Now , the steps

1st : Make a query that displays the search results

Nothing fancy here, i just make a query showing all results unfiltered , typically what you would have if the search box has nothing in it.

2nd : Handle the OnChange event of the search box

So i create an [event procedure] and in the OnChange event I do the following
Private Sub txtSearch_Change() 

TempVars!SearchText = txtSearch.Text 

DoCmd.Requery "sf_SearchResults" 

End Sub 

The Trick here : I depend on the tempvars which is an access structure that holds temporary variables.
The next thing is to requery the subform and this is what I do by calling the DoCmd.Requery function

image 3rd : Create a search criteria which depends on the temporary variable just set

  1. Add a new column.

  2. Open The Expression Editor : Right click and choose build

  3. Finally you just enter an expression that will do the filtering for you , for example:
InStr([Eng Stud Name],[TempVars]![SearchText])

and in the criteria


Ta daaa !! here is an animated gif of the search in action :


Saturday, June 1, 2013

MK802+ as a home server (Part 2)

Ok , If you were following from the earlier post  , I wanted to install a linux distro on my MK802+ . This is the starting point for this post

I --->  Installing a Linux distro on a MicroSD card

Having been acquainted to Ubuntu and Debian , I was inclined to a Wheezy Debian distro compiled for MK802 and  published here . This is the distro that I'll be using for this setup.

  1. Download the zip for 1080p version packaged for MK802ii , it worked for me without modifying the bootloader 
  2. Extract the zip file , you should have an IMG file which contains an image of the pre-installed debian distro.
  3. Download Win 32 Disk Imager  to restore (install the image) the IMG file on the microSD from a windows machine. All you need is to browse to the image file and select the drive. If you're working on a mac machine you can use SuperDuper! , and if you're working from a linux machine , you can use partimage. 
  4. Install the microSD in your device and connect it to your machine.
By following the steps above, you should be able to view the Debian desktop once you connect it to your HDMI screen ( or VGA using an adapter ,see the earlier post ).

II ---->  Connecting peripherals to the MK802+ 

Although the system is ready for running now, I found earlier that my MK802+ gets very hot after one hour of operation. Knowing how hot it is in Egypt , I had to consider a cooling mechanism . I put together a USB fan (see here) for use with this system . Because MK802+ has only one USB host port and i would like to later connect multiple devices to it, I bought a powered USB hub.

The reason I suggest that you buy a powered hub , is that you don't want to rely on the power coming from the MK802 device itself and also to be able to later connect peripherals (flash disks , external hard disks , USB Ethernet cards or printers).. A powered hub usually comes with an external adapter that provides power, I've seen a lot of people who couldn't move their mouses because they used bus-powered hubs with their devices.

III ---> Network and Internet

In order to put the server on the internet , we have to connect it to the internet. I chose to connect the device to Ethernet using a USB to Ethernet adapter (like the one in the pic). The next logical step, once the device gets an IP, is to add the mac address tp the IP Address reservation table of my router . This will give the same ip address each time the device is started, and will allow me to add rules for port forwarding , etc..

The current system now looks like the following :

At last , once you're done with the setup , you can use TightVNC to connect to the device and disconnect the physical screen once and for all.. I don't mind sharing a snapshot of my MK802+ server here. The default user and password are both set to : debian.


Thursday, May 2, 2013

Making of a USB fan

So,  I wanted a fan to cool my mk802+ , because it gets so hot after one hour of operation. Instead of buying a readymade fan, dad suggested that we make one ourselves. So,I went on YouTube and found that this was possible. So first step is to get:
  1. A cpu or a case fan
  2. An old USB cable
  3. A tool to cut and peel wires with
  4. Black insulating  tape for
First, cut the USB cable,  and peel it,  you should have 4 wires; 2 for power and 2 for data.

We'll be focusing on the power ones (usually the red and the black ones), same thing for the cpu fan.

We depend on the fact that both the USBs and the Fans run on 5.5 V
Same thing for the fan , we peel the wires and make them ready for welding with the USB ones.

Finally, after some trials and errors to which wires will work,  we weld everything together and here is a working USB fan.

This is another one i made at work 

Tuesday, April 9, 2013

All the files in a USB drive turned into EXE files

That's a panic , right ? . So , i got this flash drive with all the files inside of it shown as windows executables, when i showed all the system and the hidden files, I found that all the original files were hidden, and the shortcuts on the flash were only targeted to run the virus.

As I expected , the USB drive was virused . To cure it , i did the following :
1- Scanned it with AVG , to remove the virus.
2- Opened the CMD as an administrator.
3- Entered the following command :

attrib -S -H /S /D

-S : Removes the system attributes.
-H : Removes the Hidden attributes
/S : Works on sub-folders and files.
/D : Works on the directories' attributes as well.

That's it .. Good Luck

Sunday, March 31, 2013

MK802+ as a home server (Part 1)

So , I live in Egypt , no plans to upgrade my internet speed , and i have a huge list of downloads that i need done overnight. I don't want to leave my main desktop computer running all day with its loud fans and all. So ,the only solution I propose is having a home server. Ok , long story short, i bought an MK802+ (1GB model) MicroPC and i am planning to run it as a server for managing my downloads for now , and may be later help me with more techie issues like e.g. GIT server , DNS tunneling , etc.. I don't know how it will behave if it works 24/7 but i will try it anyway.

1st challenge : Get it to work with my old VGA monitor :
I knew that Mk802 has only an HDMI C (mini) output , so i bought this converter from amazon. At the time of writing, i didn't find any similar converters inEgypt, I asked most computer malls and most computer shops , including Radio Shack, they just don't have it. Anyway , you can always get stuff shipped to Egypt from amazon using edfa3ly , or may be by getting to know Americans :P .Anyway , it worked perfectly with my VGA monito. 

Ok , so by also buying an HDMI C to A converter from RadioShack , i had this setup here ---------------------------------------------------->>>>
1- The Micro PC
2- A USB mouse connected to the USB host port
3- To the top : an HDMI C to A , and then the HDMI to VGA adapter
4- A USB cable connecting it to a USB port of a computer just to get power to boot the device

Note : The MK802 comes with a power adapter , so you either power it using the USB 2.0 mini cable or the adapter to power the MicroPc.

2nd Challenge : Choose a suitable linux distro and install in on a new MicroSD
Since I am already waiting for my SD card to Ship (I could have bought it from any mall , but i am just too lazy) . I am now looking up different websites to get a linux distro that will fit my future needs without a lot of headache .. Once I get that i will flash it to the SD and boot from it, hopefully.

Good luck to me , i guess.