Friday, March 22, 2013

Weird/unnatural behavior in chicken.

My neighbors have 3 chickens as pets (with possible intention of organic eggs also), 2 of them are male broilers, and one of them is a female of, what I suspect to be, Rhode Island Red; as a result the female is larger than the males; and I suspect the breed diversity to be one of the reasons why they won't mate, as a result no eggs. :(

Regardless, since they were alone from the rest of the world, the roosters didn't learn how to crow naturally, they did it wrong, they didn't even sound chicken; I think I made them learn how to crow

I used my phone to make the roosters crow. That way they responded cause of rivalry, and finally learned how to crow and they're pretty loud now.

One of the 2 males till date (now adults) has not learn't yet how to crow properly, as a result he sounds weird.

So the rooters LEARN how to crow it doesn't appear to come naturally.

But unfortunately, what they also learned is that they should crow at night; and that's cause I'd set the ringtone to rooster crowing in one of my phones and I used to keep near the window. 

At night someone used to call me; I don't know who till date, but I was notified about this by my neighbors who complained that the roosters are troubled cause of it; as a result, I moved the location of the phone and changed the ring tone.

What the neighbors didn't tell me was that, their chicken learned to cow at night. Yes -- they'ld randomly start crowing at like 2200, 2300, 0100, 0300.... anytime and for no valid reason!

Another strange behavior was that, a few months ago, the chicken started crowing.

And although slow, it's getting better till date.

People say that it's cause the hen is lacking mates, i.e. they do this when there're no males in the group, and so trying to take over the leadership; this seems to be related to the fact that the roosters were not able to fertilize the hen. Maybe the hen thought the roosters where hens too.

Fastest cabinet/computer/CPU fan.

I know about the Deltas; but this one is faster; you got it right, it's homemade.

All you'll need are propellers, which're commonly used on RC planes and a brushed DC motor.

About the blades:since you're probably not a RC enthusiast, you need to know that the 'pitch' is basically a measure of how much air the blade will more for a specific size and RPM.

i.e. if a blade has pitch 4, and other has pitch 6, and both of them run at the same RPM and have the same size, the blade with pitch 6 will draw more air and also load the motor more.

For the motor - I use a toy helicopter motor.

The result -- No fan in the market comes even close to the kind of airflow this one gives; at start, I should warn you, the thrust will be so much that you wont be prepared for it and the fan may just slip off your hands.
On top of that, it's cheap.

Ensure to glue the bade to the rotor after the final setup, cause in my case, it just flew off!

Monday, January 21, 2013

Dell 2030M review.

Last time I reviewed Philips 192EL2 and gave moderate feedback; but after looking at this Dell monitor, I think I forgot to praise it's color and brightness.

This 'Windows 7 compatible' monitor comes in the same price range as any other budget monitor, so does the Philips 192EL2, but it's colors are completely washed off. They simply feel unatural and faded out regardless of the settings but appear to be too bright on some pictures. Point is, after looking at it's performance, you'll conclude something's wrong. It comes nowhere close to the CRT or the 192EL2 and looking at their price difference, this's not even good for general computing, it falls wayyy behind multimedia applications.

The brightness is reasonable, but the 192EL2 is about 5 times as bright.

So instead of recommending this 'Windows 7 compatible' monitor, I'd recommend a VGA and DVI compatible Philips 20 inch monitor.

Tuesday, January 15, 2013

AVFS howto/guide/tutorial.


This's a virtual FS to browse through archives. It can even browse through block devices (like cd/dvd drives, PD etc...) if you've written whole archives on them directly. It also supports network protocols like ftp, http etc..

Things work around avfsd with no root privileges required, just ensure you're in the fuse group (i.e. if that group exists in your OS).

Avfs is going to mount the root dir to a place where you point to –

avfsd archive

Will mount the root (or root like) FS to directory archive.

In archive/ browse to the archive location (or 'cd' to it), and then open it by placing a # after it's name, e.g. –

cd archive/home/user/backup_drive/backup.tar.xz#

This's going to cd into the archive.

If you use just #, avfs will rely on the extension of the archive to detect the type of archive, thus the # is actually a shorthand. The full path to open the archive also includes the type of archive, it's specified by placing certain text (depending on the archive type) after the # –

cd archive/home/user/backup_drive/backup.tar.xz#uz

Where uz means a xz archive and uses gzip for it's decompression. But cause it's tar.xz, you'll see a tar archive inside it, to also browse into the tar archive –

cd archive/home/user/backup_drive/backup.tar.xz#uz#utar

You have to use these with block devices if you burnt the archive to them directly –

cd archive/dev/sr0#utar

i.e. the tar archive has been burnt directly to the optical media.

This's going to make avfs assume the file is first compressed with uz, then utar. Similarly –

cd /home/user/backup_drive/backup#urar#utar

Supported archives and such keywords (as of the current time) –

#deb debian packages

#ftplist ?

#hp48 ?

#lslR directory tree listings

#mailfs ?

#patchfs browse patch files

#rpm rpm packages

#rpms List of installed rpms

#trpm Useful inside #rpms

#ucpio cpio archives

#ulha lha archives

#uzoo zoo archives

#a first floppy drive alias for #floppy:a

#avfsstat meta information builtin

#bz2 bzip2 uses bzip2

#dav webdav builtin

#dav_ctl control dav sessions

#floppy floppy uses mtools (mdir, mcopy, ...)

#ftp ftp builtin

#ftp_ctl control ftp sessions

#gz gzip uses gzip

#iso9660 CD/DVD filesystem no need to use mount -t iso9660!

#local local filesysem only for internal use

#rsh rsh/rcp only works if rsh needs no password

#ssh ssh/scp only works if ssh needs no password

#uar un-ar builtin

#ubz2 bunzip2 builtin

#ubzip2 bunzip2 uses bzip2

#ucftp ftp builtin (write support, no file cache)

#ucftp_ctl control ftp sessions

#ugz gunzip builtin (1)

#ugzip gunzip uses gzip

#urar unrar builtin list + uses rar to extract

#utar untar builtin

#uxz unxz/unlzma builtin

#uxze unxz/unlzma uses xz

#uz uncompress uses gzip

#uzip unzip builtin

#volatile 'memory fs' mainly for testing

#u7z p7zip 7z archives

These are built in type (or there by default).

Avfsd relies on programs (e.g. 7z, tar, xz, gzip, unrar etc...) and scripts to open up archives; the script tells avfsd how to operate the command (arguments etc...) to open up the archives.

This means you can extend the supported the archive type; the script in question is placed at /usr/lib64/avfs/extfs on Gentoo. May differ for other distros.

You can get a lot of such scripts on the net; but as know know, you're at risk 'downloading' them directly, it may be malware.

Depending on the archive type, programs's efficient etc... it may take a long time for a programs to read the file, or seek to the file (this's an issue in case of lzma1/2 compression); or it may take less time, it depends on the archive format.

To open ftp –


By cding to the mount mount of avfs FS.

-->

Friday, January 11, 2013

Burning raw files/filesystems/archives/tar to disk/DVD/CD. Burning encrypted disks

What I mean here is that the disk will not contain any traditional disk FS like iso*, UDF etc.. but will contain a raw file at block level; the file that we'll be writing to the disk may be any file, like a tar archive with various compressions or squashfs image etc...

This can be done by cdrecord/wodim by simply placing the file instead of an iso image, or passing the file over stdout, e.g. -- 

cat test.squashfs | cdrecord speed=0  tsize=4617089843 driveropts=burnfree -

Here you've to set the tsize of the size of the squashfs image (in bytes), or alternatively you may simply specify the file as a command line argument -- 

cdrecord speed=0  tsize=4617089843 driveropts=burnfree test.squashfs

stdin is really useful for tar archives where you can directly stream the data while making the archive; here set the tsize to the size of the medium; in case the data is less than the specified tsize, it'll be padded with spaces; tar has no problems with this, but zip does, so don't burn zip archives.

To extract/mount -- 
unsquashfs /dev/sr0

mount /dev/sr0 ...

Speaking of mounting, udisk appears to recognize the squashfs volume on the DVD/CD and it works perfectly integrated with all DE... like with iso*/UDF filesystems.

For tar -- 

tar -xf /dev/sr0

It may give a warning that extra 0s toward the end has been ignored... which's perfectly fine.

The perfect FS or archive for the purpose -- 

squashfs – Its's detected perfectly by all DE; tsize can be easily figured out (writing the size of the FS image in bytes after figuring out it's size using ls, or using the input file at the squashfs image) but for the same reason you can't stream it to stdout, you've to make an intermediate large file. Also when burning, set the block size to largest possible, 1MB, cause without that seeking problems will occur, reducing read speeds and wearing out the drive. If you want compression with the FS you write to the disk, squashfs is the only option.


tar – Without various compressions (plane tar), can be streamed to stdout but you've to specify a large tsize (maximum of the disk maybe, a bit larger than the possible size of the archive); the extra 0s to the end don't matter, tar filters that out. On the downside, it can't be mounted natively as FS (not natively means you're using avfs, which I've discussed in the next post). If you use xz compression, the seek times to review a file will be too slow, cause lzma requires you to go through all the files which're placed previous to the file you wanna open, making it slow + it's single threaded. I've not tried gzip and bzip though.


Neither fuse-zip nor archivemount mounts the block device as archive. Only avfs works.

Using the same method, you can create a loop device (losetup) mapped to a encrypted block device via cryptsetup. Then you can write to this block device using mksquashfs (the file to be specified will be the block device -- mksquashfs works well this way). After you're done, remove the dm-crypt mapping, and optionally remove the loop device (or run sync); then burn the file (on which you created the loop device) to disk.

To read, cryptsetup on the DVD drive's block device and mount the resulting mapped block device.

Tuesday, December 25, 2012

Wizard of ID fetch script.

First argument -- from date, format yyyymm, second argument, to date format -- yyyymm
Third argument -- no. of parallel fetches
e.g. --
./fetch_id 200801 2001301 4


#! /bin/bash
# Fetch wizard of ID script.
# fetching pattern --
# wget -H -e robots=off -p http://www.johnhartstudios.com/wizardofid/2012/12/
# wget -H -e robots=off -p http://www.johnhartstudios.com/wizardofid/2012/11/
# wget -H -e robots=off -p http://www.johnhartstudios.com/wizardofid/2012/10/
# wget -H -e robots=off -p http://www.johnhartstudios.com/wizardofid/2011/10/
# DO NOT run any other wget instance
# First argument -- from date, format yyyymm, second argument, to date format -- same
# Third argument -- no. of parallel fetches
declare -i year_start=${1:0:4}
declare -i month_start=${1:4:2}
declare -i year_end=${2:0:4}
declare -i month_end=${2:4:2}
# vars For internal use
# Can be removed -- *_start serves the same purpose
declare -i cur_year=$year_start
declare -i cur_month=$month_start
# no. of threads to be run
declare -i t=$3
# no. of fetch instances currently running
declare -i threads
chk_arg () {
#  Checks the argument lightly
 if [[ $year_start == "" || $year_end == "" || $month_end == "" || $month_start == "" || $t == "" || $month_start -gt 12 || $month_start -lt 1 || $month_end -gt 12 || $month_end -lt 1 || $year_start -lt 2007 || $year_end -lt 2007 ]]
 then
  echo "Wrong date start or date end arguments or missing arguments"
  exit
 fi
 if [[ $(pgrep wget | wc --lines) -ne 0 ]]
 then
  echo "Wget running in background, pid $(pgrep wget) first quit that"
 fi
}
fetch () {
#  reads variable cur_year and cur_month and fetch the corresponding page. Add additional 0s to cur_month if it's < 10
 echo "In progress, year $cur_year and month $cur_month"
 if [[ $cur_month -lt 10 ]]
 then
  wget -H -e robots=off -p http://www.johnhartstudios.com/wizardofid/$cur_year/0$cur_month/ &> /tmp/$cur_year$cur_month.log
 else
  wget -H -e robots=off -p http://www.johnhartstudios.com/wizardofid/$cur_year/$cur_month/ &> /tmp/$cur_year$cur_month.log
 fi
}
manage () {
#  Manages calls to fetch()
 while [[ $cur_year -le $year_end ]]
 do
  #  If cur_year == year_end, tally the months to see if cur_month > month_end, if so, exit
  if [[ $cur_year == $year_end ]]
  then
   if [[ $cur_month -gt $month_end ]]
   then
    echo "Wget is probably still running in background. Check running processes and wait till all wget instances finish"
    exit
   fi
  fi
  threads=$(pgrep wget | wc --lines)
  if [[ $threads -lt $t ]]
  then
   fetch &
 #   increment cur_year and/or cur_month
   if [[ $cur_month -lt 12 ]]
   then
    cur_month=cur_month+1
   else
    cur_month=1
    cur_year=cur_year+1
   fi
  else
   sleep 1
  fi
 done
}
chk_arg
manage

Monday, November 19, 2012

Extracting 3d images from 2d (or simple) video.

These images cant be extracted from any part of the video.

You have to search for parts in which the camera is moved from left to right on static (not moving) objects.

If you've found such a scene, note the time from which it starts.

Now you've to extract frames starting from this part of the video, do this using mplayer (for e.g.) -- 

mplayer -vo jpeg -frames 200 -ss 00:00:33 '/home/de/media_writeit!/media/test media/html5_Video_VP8.webm'

In the above e.g. frames are extracted from the 33rd second, and 200 frames are extracted from this time. How many frames to extract depends on the FPS of the video and/or how fast the camera moves.

This command will populate the directory you're in with 200 jpg images.

An idea of exactly how many frames are required and the next steps to make the image can be read in my previous post "Creating 3d anaglyph images".

A sample created from RE trailer -- 

 

Creating 3d anaglyph images.

As you know, for a 3d picture, you have to take 2 images both of which will represent the views of both your eyes. But that doesn't mean you take 1 image via the viewfinder of your left eye, and the other via the viewfinder of your right eye. The result will have too much difference in them.
Instead take multiple pictures, starting from the left eye point of view (the 'master' or first picture from which a 3d picture will be made), and then slowly moving the camera towards the right taking successive snapshots. Notice the motion should be very slow. The slower the motion and the more number of snapshots in between, better are the chances of you getting the perfect picture.


Now you have to assemble the picture using a program called 'plascolin', you may also use gimp for the purpose.


Open the left image first in plascolin, then it's automatically going to open the next image in the same folder in alphabetic order and combine them so as to form the 3d image.


Now for the perfect picture.


You've taken multiple images, if the difference between the selected left and right image is too much, viewing the picture will be a headache, if it's too less, the 3d effect wont be much. Ideally, ½ inch difference between the left and right images will be the best, but still it's not guaranteed to be the best; from here our quest begins for the perfect 3d image.


So in the list of images, first make multiple folders; in these folders you'll pair 2 images, the first one being the left most image in all cases; i.e. in all these folders, there will be a symlink (or copy) to the first image.
Now you have to select the second image, start off by symlinking the rightmost image to the first folder. Make a 3d image off these 2 images, if you find that you're getting headaches (if you're not, you've found the perfect picture), move the 4th or 5th rightmost image to the second folder, check the results, if you find there're no headaches, move the 3rd or 4th rightmost image to another folder, but if you do have headaches with the 4th or 5th image also, proceed to the 7th or 8th image. Preview both to see what's best and continue doing the same until you find your perfect image.
 

I hope you understand what I mean. You've to find the image which 'just' wont give you the headaches, that'll give you the best 3d effect.

Now for a sample -- 

http://img266.imageshack.us/img266/3456/scooby3d.jpg

This's my 13 year old dog. Notice the hair, they really look nice.

Thursday, November 15, 2012

Philips SHP2000 review.

These 32 Ohms headphones are cheep yet, it's quality is fabulous.

If you ain't deaf (i.e. wont hear so load so as to damage your ears), these head phones are pretty good! A very good replacement for in ear earphones.

The base, mids and highs are all good, and you won't have to do much with the equalizer to get that solid base.

It looks good too, but 1 drawback -- cause of high impedance, it's not designed to be used without an amplifier. i.e. it wont be working with the inbuild sound card of your laptop/desktop; with a good dedicated sound card, it may work. All this cause these can handle 500mW of power.

Also note -- the noise isolation is not good.

It's comfortable to wear, but gets a bit hot on prolonged usage.

Friday, October 12, 2012

nanozip, compressionratings.com fraud

This propitiatory program called nanozip has internal ties with http://compressionratings.com which posts false and ambiguous compression result which falsely shows nanozip as the best compression algorithm.

They'll use the best compression method of nanozip and worst compression method of 7z and zpaq, as a result, they've the liberty to put any compression program anywhere in the list.

In reality, nanozip's good compression methods are single threaded, and that too they're no better than multithreaded 7z and zpaq compression methods.

Wednesday, August 29, 2012

Software patents -- are they evil?

Software patents are commonly misused by companies to kill competition; practically there're just 2 companies (apparently protected by the US government) which does so, and following it's tactics, all other companies also do it to remain in competition. In the mean time there's major harm to one community – the Opensource.

Unlike software patents, patents not relating to manipulation of information are never misused, cause they can't be misused.

Definition of software patents -


In abstract form, I define software patents as “method of manipulating/generating information using information”.

In this context, the program is a method of manipulating/generating information and program itself is also information.

For programs to be run, we need hardware; when a program manipulates/generates information, so does the hardware running it, but the hardware never does it directly, it does it through the program, but the program is directly manipulating/generating information.

In that case, any instruction (programs in this e.g.), needs a real world object to to execute it. Either it be a human following instruction to solve numerical or a computer (hardware) following instructions (software) to do the same.

Arguments against software patents -




Mathematical methods also come in the same context, mathematical methods are methods to manipulate/generate information using the mathematical method, which's itself information.

The difference between computer program and mathematical procedures is that a mathematical procedure is executed by a human being and a program by a computer.

Actually in this context, I can even patent methods to write an essay or method of managing a log book. Other e.gs include -

Special margins to write both page no. and date.

Special formatting lines on a page designed for scientific use (diagrams).

Labeling methods of diagrams.

Method to write content to criticize the government and set people against them.

Method to write articles to convince conservative people to buy your product.

Method to write a patent document.

Etc... etc... etc...

If you can patent things in written form, why cant you patent methods of speaking in specific structural ways; finally it's a method of manipulating information (speaking)? e.g. -

Method to talk in such a way to convince people to take your products.

Method to respond to your opponent in debates (lawyers will have to pay royalty in other to use this methods)

Method to structure your statements in a speech so as to not make them boring (politicians will have to pay royalty for this).

All these fall under the category of “method of manipulating/generating information using information”.

Why software only? -




Question is, if you're allowing software patents why are you not allowing patents of mathematical methods; why are patents on the above examples (method to write/draw/speak) forbidden? Why are software developers targets and not anyone else?

If your arguments is the fact that writing and speaking are trivial things then are electronic devices in the 21st century trivial? If they are according to you, then you're discouraging people to adopt and code for electronic medium by using concept of software patents, similar to the way you'll be discouraging people to talk in public or distribute their writings cause it may be violating a patent.

Also developing mathematical methods are not trivial, yet patenting it is not allowed.

Thus I suggest, every patent covered under “method of manipulating/generating information using information” be allowed or software patents should be forbidden. No use targeting developers.

Freedom –


If you allow patent on basis of “method of manipulating/generating information using information” it'll rob basic freedom of the common people, this's apparent from the above e.gs.

In the same way, as the law “method of manipulating/generating information using information” robs freedom of from people, software patents, falling under the same principle robs the right of developers to write code... and writing is a fundamental right.

Even if a software developer is selling a software using a patented technology, his basic rights to write code is taken away; in contrast if we patent a “Method to respond to your opponent in a debates”, lawyers and a lot of other people who also earn money by talking; so if they use this method, they should pay for the license. Similarly a method of writing story for kids to make it more entertaining can also be patented and book authors should be charged for selling a book with patented technology. This'll rob the freedom of everyone, enforcing this law will force people out of the country, and we see the same trend with developers (atleast they threaten).

Root of innovation is not money -


This's specially true with software.

Did scientists and mathematicians made their mathematical methods or derivations for money? Maybe – if they were hired, but you cant ensure their payment'll increase cause of this work, thus this work done was not intended for money. The employment was done to ensure that continue working without survival issues.

My point is, the source of innovative work is not always money – this's true for the larger majority of software. If you really want money, there're other ways to get it. To name a few -

Vorbis and mp3 – Vorbis is a better compression yes does not use any patents (point is – the developers have not copied over any patent methods).

Internet and MS exchange – Yes, all common protocols used over the Internet are not patented. The MS exchange protocols is proprietary and probably uses a lot of patents; still the standard protocols are much better and show more innovation than MS exchange.

NFS and CIFS – Agreed, NFS is not as feature rich as CIFS, but it's designed to work over local networks where security is not much of an issue; NFS is a lot faster than CIFS (30 – 40%), yet it's a free implementation by Sun (now Oracle).

C, C++ were revolutionary languages and yet not patented.

TCP/IP, TCP, ICMP

Countless others........

Instead, patents have a large role in stopping innovation.

For real life inventions, there're no non-profit inventions. If there are, they're not as good as the profit ones.

Preventions of innovation, discouragement of opensourcing software development -


Imagine a developer making a new opensource protocol (for public cause (RFC)), considering the amount of software patents in the market, the probability of him violating a software patent are high. Cause of software patents he could not make the new protocol or improve the new protocol or software patents hindered development of a new innovative protocol.

He can apply for a license, but there are legal issues in the way – too much work. Then you don't know if the company will provide a license even.

All in all, the developer has to spend money to make a software for public cause – this's forbidding developers (or sponsors) to make a new innovative technology for public cause; in this case the patent office favors the the powerful (to make them become richer and powerful) and leaves the common people in dismay. By powerful I mean someone holding a lot of patents.

This way, if there's a sponsor of the software, he'll be encouraged to make it closed source to avoid patent infringement (by not disclosing to the world the code) and so use it only for internal purposes only, depriving world off the technology and yet violating patents. The disadvantage of close source software is also to be considered.

Thus, my conclusion is that if software patents are abolished, it'll not stop innovation, instead it'll increase it by causing less hazel.

Cross licensing of technology results in complications -


For a video format to be best possible in the market, it should violate many patents (or method of efficient encoding). If the maker of the format itself applies patent on newer methods that he developed – it'll just increase the complications.

All in all, cause of many violations in patents, making this ideal video codec will be impossible cause you'll be on the mercy of the companies holding the patents all the time discouraging people form making the video codec.

Unfortunately this very concept can be turned against the concept of patents as a whole – even in real world things. Thus this fact may be invalid.

Objective of software patents fail -


When you implement a software patent, it's success and utility also lies by the way you enforce it.

A software patent is of no use if don't enforce it.

Unlike real world machinery, information can be hidden, it can be encrypted such that it's practically impossible to decode or reverse engineer; this fact can be used by a company to hide the use of many types of software patent (for e.g. use of an algorithm/method in a compiled program, compiler related patents, file formats which are encrypted by the software to escape patent infringement etc... ).

Considering the no. of closed source software available in the market, one can ensure that the number or patent violations are in the order of millions if not billions – they get away with it with no effort and sometimes without even knowing.

Opensource projects are targets -


Opensource projects are projects made for public interest, even if a company sponsors a projects, it being opensource (having a free license) means that other companies can use it for it's own purposes – thus if a companies (like Google), sponsors an opensource projects and keeps it opensource, it means the companies also thinks about global standards and benefit of the public rather than money. The competition between companies will be at a different front rather than wasting resources on software development and re-implementing an implemented piece of code in another project.

So a companies funding an opensource project doesn't mean it's doing it for profit; the reason for it being opensource, has to do with more than just money.

All in all, I wanted to say that if a software has a free non-restrictive license, it always benefits the public by a higher amount than closed source software (their only intentions being profit most of the time).

See 'why opensource' document for more advantages of opensource software than closed source.

Since you cant reverse engineer the code and may be the file formats of closed source projects, the only easy target that you have are opensource projects which's for public cause.

This's ironic cause the end objective of the patent system was for the benefit of the public, but projects which are also for the benefit of the public is being targeted by use of this same patent system. In the mean time, closed source software which breech the law and have a main intention of profits, escape unharmed.

Discourages use of opensource software -


If a patent holder targets a company using an opensource software, then also it's not fair. Doing do discourages the company to use and develop opensource software, instead, it'll now make and use the software patent internally, this breeches the law, and also wasts the company's efforts by redeveloping closed source software.

Then there're disadvantages of closed source software.

The company holding the largest no. of software patents today blackmails companies using opensource mobile operating system to pay them taxes for using opensource software cause of their violations of patents.

And today we have the perfect e.g. Apple (a closed source software vendor) targets Samsung (using opensource software) and surprisingly Apple wins. The (Apple/Microsoft favoring) US courts were blind to the advantages of opensource software and were so immersed into Apple's profitability that they didn't mind actions and decisions which harms opensource software projects like Android. This's a direct and serous attack to opensource projects.

As of people who stupidly claim Google profits from Play store, it's to be noted that Play store is not tied down with Android, Android can be modified to unofficial stores which may be run by non-profit organizations like Mozilla.

This encourages the companies to drop opensource alternatives and adopt/develop closed source software which directly harms the public, furthermore this enforces monopoly of a monopoly – Microsoft, reducing competition and verity in the market.

On the other hand – companies already using close source software start to realize the benefits of using it, the only benefit being avoiding patent infringements.

All in all, this system directly harms the public and the thing fueling it is the government itself.

Law not implemented is a joke -



People/companies who want sell their products which violate patents can do so easily with assurance that the violation will be ignored. The software if available in binary form, cannot be reverse engineered to see if it violates software patents.

Even if a law is passed that such that a software patent owner can obtain the source to check if it violates patents or not, then also it's a huge waste of time and effort – just to see if the software is violating patents or not.

There're billions of close source software available today, imagine the number of software patents they violate.

Software is mathematics -


Most software patents are basically algorithms – algorithms are a method of manipulating information, but every country forbids patenting algorithms.

But magically, if you write the algorithm in a C/C++/java/etc.. program, you can patent them! So you're basically patenting an algorithm by fooling the patent system.

This's like you can patent a technique to write books, but only if you give examples in Latin or French... or any non-english language.

Discourage developers/students -

A student can violate a software patent while making a program during practicing.

Since he has breeched the law, he should be fined and pay royalties.

If a target student looks at the amount of patents and controversies related to patents, he will probably drop the idea of being a developer following the fact that he's being restricted to write what he wants.

Financially difficult for commoners to manufacture things, but easy to make programs –


One of the reasons why patents on methods of talking and writing are forbidden cause it can be done by anyone. Especially in today's world, it can be published by anyone without spending huge amounts of money or efforts (for e.g. publishing your work in a blog, website etc...).

Programs come in the same category. Everyone has a computer, so everyone should be allowed to publish or do anything with their original work – programs can be made by anyone, free of cost and can be published by the author free of cost or via small free. One can even distribute it's binaries easily; but software patents are hinder this right.\

Software concept is always used -


When there's a new software concept, we always use it somewhere – or inventions in software are made for the cause of using it somewhere. Have you ever heard of someone getting paid to ponder concepts penetrating computer software? They get paid to code, but they don't get paid to invent. Thus, before a software concept is born, it's used.

A software concept doesn't require you to spend money, and it's designed to be used in a piece of software (that's the original motive of the invention); so this piece of innovation is certainly getting used if this's your concern.

This theory meets facts – there're plenty of people who're inventors full time, but are there any people working on 'software inventions' (NOT coding) full time? Inventors of real world things have one job – just make the concept, but with software invention, they are made cause of requirements in the software.

If software patents didn't exist, innovation will continue out of requirements -


With software patents, it makes sense to start software R&D, patent software concepts and ask opensource non-profit software developers/organizations/projects for royalties.

But what if software patents where not allowed? Will it harm innovation.

As stated before, a software concept is always used. The developer of a software method is almost, all the the time, is the sole developer of the software or part of the team making the software itself – he codes apart form developing the concept.

Thus a new method of software is being developed for a need, not for money. Thus innovation in software is always fueled by the need of it, and if software patents don't exist, software innovation will continue cause of requirement.

If men can follow instructions why can't their computers?


We have freedom to follow instruction or make anything we own follow our or other's instruction (depending on the permission we give) – this's especially true when it comes to manipulating copyleft information (your own work for e.g.). For e.g. via the remote, we can give our TV instructions... we have the freedom to do so.

So why are we restricted to give instructions to our computers?

We can publicly display free (copyleft) material to the public, hosting it via our computer and our domain and our Internet connection.

Displaying something, in IT terms means downloading it, to view information you need to download it. So why are we not restricted to display information... but are restricted to host (and download) copyleft programs cause of software patents?

One argument may be that objects that one owns and that has the capability to manipulate and generate information are not a part of a human being, so manipulating/generating information through that object may not be considered a 'right'. But when a person owns an object, it becomes a part of it; a pacemaker is an object and a part of a person... but a person has the right to make any of his objects his part, including your computer, his phone or a chip. An object owned by a person and not being a part of his body doesn't mean that he can be restricted to things with it.

Information can only be copyrighted -


As stated before, if you can patent information, if you allow patents on information, you can patent, methods of writing, speaking and method of filing a patents itself.

As of the current time, patents on any kind of information is not allowed, except software.

X86 is the largest scam ever -


x86 in a patent on information, although it doesn't directly fall into the category of “method of manipulating/generating information using information”, it has caused us enough trouble.

Via this patent, Intel has monopolized the desktop and server markets as a result, the condition of the market was very bad until AMD came up.

Today also the condition is striving competitions and an innovative idea of manipulating x86 and amd64 cannot be implemented cause of these patents. Everything lies on the hands of Intel and AMD.. if they reject the innovation, the idea will be lost and waisted.

Also x86 and amd64 is just a method of representing information to a processor – it just represents the things which a programs wants to do.

Infact, if x86 and amd64 can be patented, I think the concept of a program communicating with a processor via an instruction set can also be patented. That way the whole IT industry will be owned by Intel.

Same is not true for a particular CPU architecture, they are patentable, cause it's a physical machine to manipulate information and many can be manufactured.

So I tend to think, any kind of patent on information should be forbidden.

Copyright on information should be only allowed.

Patenting artistic work vs patenting software -


Artistic work requires technique, every artist has a technique to paint, and every author has a technique to write book, and also software developers can make techniques to code for a particular purpose.

Patents on techniques to code is allowed, but techniques to make art and write books is not allowed.

Patents discourage adoption of opensource software -


We know that the more the world uses opensource, the better the software industry will thrive. A key event in adaptation of opensource software is it's use in business organization, and it's use in the organization's products.

With software patents, a company will prefer using and giving closed source software to the public and hinder it's adaptation. In the closed source software, they will themselves be violating patents, but without the knowledge of the patent holder.

If software developers wants monopoly on the method, they may not release the source –


The objective of software patents, apart from extracting money from non-profit organizations, is also to ensure that their technique is not used by competitors (this includes non-profit organizations) and so they don't gain the upper hand.

To do so, the company/person can simply make it's software closed source. But it can happen that the concept is re-invented by another developer for or not for profit.

A software method can be called the best, but not real world methods –


Mathematical methods and techniques apply in a software, but not directly in real world inventions. Software can be considered a form of mathematics, it involves techniques to manipulate information, it can be said to be a mathematical procedure/algorithm designed to be executed on a computer.

On the other hand, a machine invented for a certain task has no such limitations, there're infinite directions and concepts that the machine can apply – it has to do more than mathematics, mathematics is just a part of this.

Since software is a part of mathematics, we can define the best method to do a particular mathematical task (all tasks at programming level are mathematical) in the best way possible or we can 'prove' it to be the best mathematical way. If this method is patented, there's no scope of innovation in that field, there's no inspiration for another better way to do the task cause it can't be done in a better way. Thus the person/company will have a monopoly on it and tax everyone from using it; this forces everyone to make a lower quality software, specially FOSS projects.

Get royalties from the source, not consumers -


In every product, patent royalties are taken form the place where the patents are used, it never happens that someone targets the consumers and asks them to pay royalties cause the people providing the product didn't take care of it so it doesn't add convenience to consumes.

Same can be said at a higher level too, if a company (A) provides products to another company (B) patents shouldn't be taken from B, but A.

What I mean to say here is that the source where patents are violated should pay for the royalties.

But this's never seen with software patents. In software patents, the only target is non-profit software, but companies holding patents never target them, they target the companies using opensource software causing all of frustration, inconvenience and confusion to both FOSS developers and the company.

Companies pay frauds to sway trouble -


Some people patent ridiculously simple things (and they're also granted), and ask a small fee from large companies.

The company, to avoid legal inconvenience, pays the person/company fueling more such frauds.

Royalties only from opensource non-profit organizations -


If a software patent inventor wants to get royalties, he has to get it from opensource organizations, cause only they revel the sources. Closed source software can freely use the patented invention without the users permission and without the users notice. They can encrypt file formats for better security.

Things become obvious in the future -


The IT industry develops at a rapid pace. 5 years is considered revolutionary... whereas even 10 years is less for scientific work.

So patents in the IT fields which were not-so-obvious 5 years ago are obvious now, but these fundamental things, being patented may not be used... this hinders development of better technology; obviously patents ties your hands down.

If the concept of web browser whould've been patented, there'd be only a few implementation of it (only people who had money could market it) and would be available at a price. There would've been no Firefox or chrome, only IE. Since there would've been less competition, innovation whould've stopped. People using the Internet would've been less cause the web browser had a price (apart from the computer hardware).

Methods of displaying information -


Now a days, even layout of UI components are patented. This does not fall in the category of “method of manipulating/generating information using information”, but is a more fundamental right.

As stated before, why the layout (margins, lines etc...) of a book can't be patented, but the same thing when applied to Ui of a website or software can be patented?

If they were patented -


If we had patented the following would the world be a better place?

HTML, TCP, IP, IP6, HTTP, FTP, blog, Toolbars concept, menu concept, forums (bulletin boards), Desktop, Windowing system, graphical file manager, taskbar, titlebar, double-clicking, mouse clicking, system tray, various common window components like slider, drop down box, a button, radio/check button, office suit, OS concept etc... etc.. etc...

Cause today all these thing are patentable.

Restrictions on so many thing would've restricted the development of the IT industry to a standstill... only a few rich and powerful would be able to host websites and provide software to the end user that too at a hefty price. We would still be writing on pen and paper if the people who made these patented it.

In no way these patents would have improved technology to humanity.

Reap benefits but give nothing back -


Various non patented technologies is used freely by companies having a strong patent portfolio (and rest of the world), but when they invent or develop a technology, they don't give it back to the world for free use, instead patent it.

The inventor of the free technology has to pay licences if he wants to use the patented technology developed by the technology, even if it's for public cause.

Apart from being unfare, this encourages the developers to patent technologies which he would otherwise not.

Layered architecture means simple software has many patents -


Almost all application software work on layered approach. Since in each layer, there may be patented technology used, the end cost of using the application software will increase exponentially.

All software royalties should be given back -


The main target of software patents are companies using opensource software. Since this hinders adaptability of opensource software, all royalties taken as software patents should be given back, infact a penalty should be imposed on such companies for doing such a thing.

Arguments favoring of software patents -


None in public interest.

This only favors companies who have a strong patent portfolio. Via software patents, they can enforce the use of their bad products, and replace a good one.

e.g. Windows phone and Android.

Wednesday, August 22, 2012

KDE too slow at startup (high I/O)

This may be apparent if you've been using a kde install for years (an impossible deed with Windows) with many upgrades.

Solution is to delete cache-*, socket-* and tmp-* in the .kde (or .kde4) folder which lies in the user's home directory.

Friday, August 17, 2012

Improve Firefox performance under slow Internet connection.

This scenario is specially true for mobile Internet connections where you may loose connectivity cause of bad network as a consequence, the phone/modem falls backs to GSM data connection which's HORRIBLY slow.

If you hog down these low speed connections with a lot of TCP/HTTP/FTP connections to remote servers, apart from adding a lot of overhead to the tiny Internet connection, there's a lot of packet drops and connection drops (e.g. TCP establishment failure) cause of high latencies (FF or the remote server gives up). Furthermore, FF, by default comes configured for normal speed Internet connection. It normally makes like 50 TCP/HTTP connections to remote servers and keeps them alive. At most it can go 200+ connections. This's surely an overkill for such a delicate Internet connection.

In about:config (typed in the URL bar), the following values can be decreased to improve your Internet connection -- 

network.http.max-persistent-connections-per-server -- Maximum number of HTTP connections FF can keep alive for a single server

network.http.max-connections -- Maximum no. of http connections at once. It's a bad idea to limit this without limiting other http connection values.

 network.http.connection-retry-timeout -- In case there's no response from HTTP/TCP connection, how much time to wait before trying in ms.

 network.http.max-connections-per-server -- Maximum http connections per server.

For professions or IT students -- Limit the number of connections to 2 or 3 servers at a time. But if it the value is too less, FF may hang waiting for a response which it may never get, resulting in manual intervention, until which other pages (which're qued to load) will not load.

For users -- Set network.http.max-persistent-connections-per-server and network.http.max-connections-per-server to 2 if you're 95% sure your Internet connection is slower than all server's.

Set network.http.max-connections to network.http.max-connections-per-server*.

If you want FF to load 2 pages at the same time, and let the 3rd or 4th etc... page wait till the first 2 have loaded, then set this value to network.http.max-connections-per-server*2.
Similarly, if you want  7 pages to load in value set it to *7. For a slow Internet connection, *2 is more than enough.

Set  network.http.connection-retry-timeout between 1000 and 5000 (maximum). Slower your Internet connection (or longer the time it takes to 'connect' to a website), set the value higher.

Sunday, August 5, 2012

"/dev/dsp: Device or resource busy"

This's commonly the problem with old games which use legacy OSS sound system.

This issue is 100% reproducable in KDE cause phonon is always using the device, yet fusers doesn't return any process giving you any guesses.

The solution is to change the default device for all things (most importantly notifications) in system settings > multimedia > phonon > device preference to the exact hardware interface provided by ALSA, e.g. you may like to change it to hw:0.0.

This'll usually make /dev/dsp free.

In this situation I've assumed there're no sound servers like pulseaudio, which has it's own OSS emulation.

As an alternative, or along with the above technique, you may try to kill knotify4 process once. Then it'll respaws, but the resource will be free by then.

Friday, August 3, 2012

KDE pendrive/external/flash format script.

This script is intended to be placed in device notifier, i.e. when you click on a FS (aka 'drive'), this script should be present with the name format.

You can do this via custom actions in the device notifier settings.

As the title suggests, this's a simple format script made using kdialog which offers formatting options in a verity of FS and also checks the contents of the disk before formatting.

The first argument supplied to the disk should be a partition name (like /dev/sdb1 or /dev/sdd1 etc...).


#!/bin/bash
DEVICE="$1"
if [[ $(echo $DEVICE | grep --ignore-case sda) != "" ]]
then
 kdialog --msgbox "I will not format an internal partition. This must be a mistake."
 exit
fi
ch=$(kdialog --menu "Choose a filesystem" "fat" "Compatible with Windows/Linux/Mac/BSD and other devices (fat32)" "ext3" "Compatible with all Linux (faster) (ext3)" "reiser" "Highest performance on small files (Linux only) (reiserfs)" "xfs" "Highest performance on large files (Linux only) (xfs))") || exit
mount_dir="$(mount | grep $DEVICE | cut -d ' ' -f3)"
if [[ $mount_dir != "" ]]
then
 cd "$mount_dir"
 contents="$(ls -a -1)"
 contents="${contents:5}"
 kdialog --yesno "Storage device is mounted in $mount_dir and has the following contents - 
$contents
Unmount and continue formatting?"
 if [[ $? == 0 ]]
 then
  cd /
  kdesudo -c "umount $DEVICE"
  if [[ $? > 0 ]]
  then
   kdialog --yesno "Storage device is in use, force umount and continue formatting?"
   if [[ $? == 0 ]]
   then
    kdesudo -c "umount -l $DEVICE"
   else
    exit
   fi
  fi
 else
  exit
 fi
fi
kdialog --yesno "This'll erase all data. Continue?"
if [[ $? != 0 ]]
then
 exit
fi
kdialog --msgbox "Formating in background... wait till \"Done!\" message occurs.
This may take a few minutes." &
case $ch in
"fat")
 kdesudo -c "mkfs.vfat $DEVICE || kdialog --error 'The device failed to format for some reason.
Re-insert the storage device and retry. If it still does not work, contact commercial support.'"
;;
"ext3")
 kdesudo -c "mkfs.ext3 $DEVICE || kdialog --error 'The device failed to format for some reason.
Re-insert the storage device and retry. If it still does not work, contact commercial support.'"
;;
"reiser")
 kdesudo -c "mkfs.reiserfs -q $DEVICE || kdialog --error 'The device failed to format for some reason.
Re-insert the storage device and retry. If it still does not work, contact commercial support.'"
;;
"xfs")
  kdesudo -c "mkfs.xfs -f $DEVICE || kdialog --error 'The device failed to format for some reason.
Re-insert the storage device and retry. If it still does not work, contact commercial support.'"
;;
esac
kdialog --msgbox "Done!"

Wednesday, August 1, 2012

12 V fans at 24 volts (overvolt 12V fan).

(dated 1st aug, 2012)
I'm talking about the average 12 V fans you'd find at $1; it appears their reliability is pretty good, and looking at their MTBF (4 years of continuous operation), it's desirable to reduce their life with expense of higher airflow.

So I over-volted 2 of these fans to 24 volts and another one (which I dumped a few days ago cause it's bearings were problematic) to 20 volts. Notice, you can't take these fans to 30V, they burn out. So below 30V seems to be safe.

The 20 v one is working continuously for 3 or 4 days, with no signs of wear and tear (despite the fact that the fan's bearings are at a bad shape), and the 24 V ones is used atleast 8 hours a day, and is working since 2 days.

All of these are working fine till now. Notice that people claimed, at these volts, these fans won't last more than a few hours, but their reliability seems good till now, many times their expectations.

I tend to think the first thing to come off are the bearings (being mechanical components), since I don't think the coil of the motor gets too hot to burn the insulation of the copper wires of the windings, although burning of the coil is the second possibility cause the insulating layer degrades over time.

Burning of the controller is ruled out completely cause they were ok even after long operations.

As of the performance, you should realize that the power delivered to the fans is not doubled, should increase 4 folds, cause with the volts, the amps also increases. This means 4 time the air flow, and 4 times the RPM (read fan laws). I measured the power consumption of one of these fans.

To experiment, I attached 2 fans facing (the output of one fan is fed into the output of another) each other and sealed together with insulating tape. When one fans runs, cause of it's airflow, the blades of the other fan will also run; the other fan will also generate an EMF. I'll measure that. It's a measure of RPM.
At 12V, the other fan generated 0.45V, and at 20V, the other fan was at 1.59V, that's more than 3.5 times. Expect 4x at 24V.

At these volts, these fans make a lot of noise cause of air motion, the motor itself doesn't make much any noise. The air flow is so strong that you can feel the suction of the fan from quiet a distance, like 2 or 3 inches. Come up close, and it sounds a bit like a vacuum cleaner.

As of the wiring in my setup I used an external 12V 500 mA adapter clubbed with the SMPS's 12 v source from the molex connectors for the purpose (2 fans).

Don't try to club 2 of the 12 V outlets of the different molex connectors. They come from the same source which will result in a short when positive of one molex meets wit the negative of the other.

Maybe this setup has more value for money than the deltas and 120 mm fans.

Update (Aug 5th 2012) --one of the fans (running at 20 V) broke. My dog bit it, shattering half of it's blades. It ran for ~9 days straight with practically 100% uptime. The same day I bought a new fan with the same specifications.

On night of 7th Aug, the new fan died. It was working continuously for 2 days. It didn't get burnt in any way, but there was a strange problem with it. After giving it power (12 or 24 V), the the fan will rotate for a few minutes, then it'll stop. On manually rotating the blades, it behaved like a spring, or like a very powerful motor with TREMENDOUS torque (and powerful permanent magnets) which's offline.

I've decided to replace the fan with a home-made one. The Q/A of the fan was questionable from the start. It was moving slowly.

Also note that rest of the 2 24 V fans still work

Update -- one of the 2 fans was replaced today by me (on oct 13th 2012). Problems came up with the bearings; it was making too much noise.
But it's to be noted that this problem started before I hiked up the voltage to 12 V; it was showing symptoms of failure.

Update -- Again the new fan that I replaced above gave the same bearing problem; I've replaced it with a new one on 27th feb 2013. However this time the fan was not at 24V all the time cause of cold climate.

Update -- I realized these sleeve bearing fans can be lubricated (search google). That'll solve the bearing problems. However if you ignore the noise for a long time, the fan may incur permanent damage. After this, the fan has practically unlimited life until it's winding burns.

Unlike what Google articles suggest, I'll ask you to fill the oil almost to the brim (but not so much such that when you close it with tape the oil will stick to that tape) and seal it off with a small portion of an insulating tape.

Cut out the tape such that it just covers the hole (keep a little bit of margin), and apply superglue around the border of the tape. Just put a small drop of suerglue at 1 corner of the tape and try to spread it all around the tape to form an airtight seal. If you apply less superglude, it'll be easier to open up the hole again for oiling.

The reason for the complications as above and the reason for using insulating tape specifically is that, these sleeve bearing fans tend to heat up at the bearings and the coil also heats up. Then the oil and air in the hole will heat up and will put pressure on the sealing of the hole. So if you use tape without superglue, the oil will leak out cause the adhesive of the tape is not strong enough to contain it.

If you use a rigid material to seal the hole (insulating tape expands under pressure), like straight and rigid plastic sheets, the pressure inside the hole will increase to a very large amount until the sealing between the shaft and cylinder of the sleeve bearing breaks and the oil leaks out from the other side (this will not damage the fan though). Insulating tape on the other hand expands to compensate for the high pressure, preventing such a thing from happening.

The fan heats much more when you're overvolting it.

The large amount of oil will act as a reservoir and compensates for the evaporating oil. The sleeve and shaft is an air-tight seal (like piston/cylinder) and wont leak oil unless something's wrong with the fan; you can figure that out if the oil disappears from the reservoir the moment you put oil in it (or after a few minutes).

Practically I've seen a suction being formed instead of high pressure in the oil reservoir, that depresses the tape over the hole. The low pressure will be there until all the oil is used up, and then high pressure will develop bulging the tape. After this, within a few days (or maybe months), the fan will start making noises again.

The problem with oil is that it evaporates quick; so grease will be good, but the problem with grease is that it doesn't flow -- so it wont go down the bearing from the reservoir. So what can you do is mix them both and you get the best of both.

Since grease has an oil base, machine oil forms a homogeneous mixture with it. Thin the grease this way till it form a thick mixture which flows easily, then fill it in the oil reservoir.

This mixture lasts much longer (4 to 5 times more as per my stress tests, but in real life, it should be much more durable) and the fan moves MUCH faster cause of reduced friction.

However there are downsides. Once the mixture is used up, there maybe carbon deposits on the shaft which will prevent new lube from going in and at the same thing slow then fan down to a crawl. In this case, you've to actually open the fan up to clean the shaft and sleeve. And before you put it back, you may like to grease the shaft.

See how to disassemble the fan --

http://www.instructables.com/id/How-to-take-apart-a-case-fan/

Tuesday, July 31, 2012

Optical disks -- The most unreliable and expensive data storage medium.

When you think about disks -- thousands of complications come to mind: starting from the disk itself (+/-, DL, RAM etc...) to doubt about the data written on the disk (data corruption) caused by 1000s of possible combinations of problems (dirty lens, bad mechanics, old/faulty driver, manufacturing defect, software fault, writing speed, wrong way of handling, a fingerprint or scratch on the surface etc...)

Following all these facts, it's a matter of chance why a disk should write properly, and in most of my personal experience, they never do, even if they do, they degrade quickly over time and are susceptible of things like fungus etc..

Then it doesn't have any stable shelf life either, at most, it'll be 5 years; i.e you've to rewrite all your disks every 2 years in order to ensure that your data is OK.

Well, after all this, considering the amount of blank disks you waste and the data loss that occurs, disks ARE the most expensive and most unreliable medium.

A much better alternative is to buy hard disks for archival purposes or use tapes.

Wednesday, July 25, 2012

Offline wikipedia howto (with Apache, and mediawiki CMS, PHP, mysql)


Starting point –
Wiki allows downloading of their databases for offline use, these include static HTML (not updated) to SQL dumps to XML dumps.
The most tempting way is to use wiki's official CMS (mediwiki) and host it using Apache locally for internal use. You need to compile php with xml viewer and session support. To import database, you need to build it with the shell interpreter also.
Mediawiki uses PHP and some kind of SQL (mysql, postgre, or sqlite); it depends on the configuration of PHP on what backend will be used.
Next you need to download the XML dumps, follow the above links to do so. As an alternative, follow –
Both point to the same place actually.
Download xml dumps intended as backups (thus may be incomplete). If you want a single XML, download from

The keyword here is the 'pages-articles'. The above file is one large tarball of all articles, other files with name '*pages-articles*' are parts of the actual articles.

These dumps don't have images, only text.

Next, you need to get the sql server started and set the root password (how you do it depends on the OS), next start the apache server, open the wiki CMS and start the setup.

You'll be asked for the username/password for the SQL database you set up for r/w access.

Your wiki will soon be ready and a conf file (in php) will be made available for download which you have to place in the root dir of the installed CMS.

To import the xml database dump, you may use several ways as listed in

The most reliable but slow method is using the importDump.php php script as root to import the pages.

The maintenance folder has this importDump.php script with a lot more script which's used for housekeeping and management. To import –

php importDump.php

e.g –

php importDump.php '/home/de/media_writeit!/temp(others)/enwiki-20120702-pages-articles1.xml-p000000010p000010000'

This's going to take a lot of time. As the script imports, it will show progress on the number of pages imported.

You may check the import by opening random pages, but all of these will be without images.

Next, the images have to be fetched straight from the Internet in a crawler-like fashion, you may use 'wikix', a C program which does so and puts the images in a directory structure which the wiki CMS can read. Wikix takes input of the same xml files you used to import pages into the database from stdin; as output (stdout) it's going to make a bash script to fetch the images and put it in a directory tree (which's intended to be put in the 'images' directory in the place where you extracted the wiki CMS) which the wikimedia CMS can read.

E.g –

./wikix < ../../enwiki-20120702-pages-articles1.xml-p000000010p000010000.xml > scripts.sh

This makes a single script which uses curl to fetch the images.

Now the script has to be placed in the 'images' directory of mediawiki CMS and made to run.

If you use -p switch many scripts will be made which're intended to be run in parallel to allow parallel fetching (via a single master script which calls these scripts). The stdout doesn't have much when this -p switch is used, there's no output.

Download the source code of Wikix (copy-paste in text files) from –

The compiled program is recommended to be placed in the images directory, but you can place it anywhere, just ensure the directory structure holding the download pictures are placed in the images directory of the CMS.

Once downloaded (or partially download) and placed in the images folder, run –

php ./rebuildImages.php –missing

This's going to index the images and link it to the images which're linked in the rendered CMS which makes the images available.
The script lies in the maintenance folder.

Sunday, June 24, 2012

Gigabyte H61m-D2h Linux compatibility.

It works perfectly. All of the VGA, DVI and HDMI outputs work with multi monitor setups. The mic input also works; but I've not tested digital output and input.

Although this product is Linux compatible, but like all Gigabyte boards, it's full of issues.

The front USB don't work, booting from USB CD/DVD doesn't work with the latest BIOS (F5).

There're problems with over clocking.  If you've over clocked the board, and reset the PC (or push the power button for 4 seconds), the BIOS will think there has been a crash cause of bad overclocking settings and it'll reset to defaults after a few minutes of failed starts (the PC starts for a few seconds, then shutsdown, and then starts up again; this happens for a few minutes). And many times, it'll never recover. It'll keep on resetting whole day and night, but it'll never start. You've to cut off the power (or push the power button for 5 minutes) to shut down the PC completely and then start (with OC settings reset to default).

At times doing the above to recover doesn't work, i.e. if you power on the PC, it'll start resetting forever.

And now (update) I realized that this doesn't have to do with overclocking. Even without overclocking, there's no guarantee the PC will boot next morning; it may just fail to boot and after a series of resets, when it finally starts (somehow), it warns you that the overclocking settings are reseted to default -- when infact, I've not overclocked.

Gigabyte has ensured that the dual BIOS feature DOES come to use. The BIOS is deliberately corrupted as the board simply resets again and again, and then when it starts "check sum failure, recovering..."

It doesn't matter if you have a dual BIOS feature or not, cause boards without them will simply never get their BIOS corrupt; whereas this one will frequently.

Another problem, actually more of a Microsoft Intel (for Microsoft Ultrabook and various other things) problem is that the USB will reset from time to time resulting in 'reset high speed USB device' by the ehci_hcd driver. It manifests itself as silent unknown errors on Windows; and this problem is well know with this particular chipset.

No, this's not the end of it. Now I'm getting SATA errors. The SATA link will drop all of a sudden resulting in a 'tack' sound from my HDD. This happens when the HDD is under a lot of load. I'm not sure if this's a known bug, but speaking of sata, the sata controller of this particular chipset has limited life cause of 'unknown Intel errors' (may be they inherited it by trying to make their products too much Windows 8 compatible), however Intel provides replacement for this.

This board can be best compared to Windows and designed for Windows enthusiasts/diehard users. It has a lot of buttons/feature to play and tinker around with, and it really doesn't matter then work or not, Windows users just like to 'see' them and change settings and options; on top of that, we get Windows like reliability and all bells and whistles (anti-virus, anti-spyware, anti-crapware, anti-malware, firewall, tweaking software etc... etc... etc... in contrast to stuff like dual BIOS) which's needed to keep using the board and to compensate for it's bad QA.

All in all, I've warned you, I've had 2 Gigabyte boards (older being a higher end one), and none of them worked well.

Intel HT (Hyper threading) single threaded performance.

I didn't find any info on this, so I decided to test it on my own.

I ran mksquashfs with just 1 thread (-processors 1) with HT truned on and off.

It turned out that, with HT enabled, despite a single thread used (or 1/4th of the no. of threads the processor had to offer), all of the processing power of a single core was utilized. With HT turned on, the task finished in 46 seconds and with HT turned off, it took 45 seconds.

So I suggest HT turned on always, even for single threaded applications.

Saturday, June 9, 2012

The perfect call blocking app (Android).

By perfect I also mean permissions.

Privacy Guard (also called Block SMS & calls in play store) is a simple app with professional grade permissions, so you can be ensured that your contacts are not uploaded to the internet without your knowledge, which other apps might do (cause they have full network access).

It's a very bad idea to install an app blindfolded on your secure Android phone. By installing apps with bad permissions, you're yourself encouraging your phone to get compromised; after doing so, don't blame the OS if you do get compromised, it's all your fault.

Wednesday, May 23, 2012

Using flash? Your site and skills are sold to Adobe.

Well, not exactly sold, but 'at the mercy of'.

You should always keep in mind the disadvantages of relying or learning too much flash; yeah, learning is not bad, but you should be careful what you're learning.

Remember that Flash, shockwave are Adobe product, it's Adobe's property, but your work (your work on Flash), your skills, or you heavily flash ridden website rely on these products. It depends on Adobe how your flash work displays, and also depends on Adobe on what devices you flash work is displayed. Any security vulnerability in Adobe's product may be exploitable via your flash work, and unknowingly you (and Adobe) will be to blame.

And these are not hypothetical examples, but these have been already proven. For starters, Adobe is no longer supported on mobile devices and on Linux, it's been discontinued and your flash (or future flash work based on future versions of flash) work wont work on these devices, even though you want to.

To businessmen with a company's website (who very commonly use flash), all this means that your company is already more dependent on yet, more companies, which no business owner likes; your customers may have a bad experience for your eye-candy flash animation and might not even consider your products simply cause your website didn't open on their device, or they were having technical issues related to flash. To most businesses, a customer wants to see your products, get product information and find information on your products easily, what will they do with eye candy? Even Facebook and Google doesn't have that, why do you need it? People want your website to open fast and provide them the information they need as fast as it opened, they don't want to get hogged by slow animation and loading times which makes your website impossible to view with slow internet connections!

These are the reasons for why not Flash/Shockwave or any propitiatory plugin. With these technologies, you're never your own master, Adobe is your master and Adobe is all about money, not about you.

So go for HTML5 and webgl, they're all about you, all about standards and benefits to the public without any political or business motivation.

Tuesday, May 15, 2012

Low and high frequency sound collection.

 Download from -

http://minus.com/mlUGvWe6m

Contains one minute clips of frequencies from 15hz to 25Khz.

Although the sounds are right, your player might be wrong. Some players produce the wrong frequency. For me Kmplayer worked.

Sunday, May 13, 2012

"Can't establish a reliable data connection to the server" -- android + google account.

This's a fairly common problem which people are facing with Android.

Apart from more common solutions like resetting the phone and logging in via youtube, first you should check if you set the date and time correct or not.

Monday, May 7, 2012

Debian 2 year's release cycle is good for the Desktop.

Debian always got this criticism of long release cycles. 2 years in development of GNU software is revolutionary, but still Debian continues to churn out new stable distros at a snail's pace.

But actually, in my experience this kind of cycle is good for casual users who require only a few set of software to survive instead of complications like the latest DE, software or Window manager.

In KDE and Libreoffice at least, it happens that after each upgrade, there's a regression. And you know those regressions will be ignored long to cause major annoyance (you know the KDE devs will be implementing 'features' instead in their 6 months release cycle), and ultimately these buggy updates with regressions will be pushed to unstable and testing... and nothing can stop it from being pushed.

So, after each update of the distro, there's an element of surprise.

But the sable branch on the other hand will remain with the old version, the few tolerable bugs that existed will continue to exist and people will find workaround for them, and many times the fixes will be backported and updates will be provided, then for the newer software we have the backports, the only problem with them is that it's difficult for the average joe to install form backports. Maybe Ubuntu software centre should be modified show graphical packages form backports also.

Also drivers and kernel can be backported, solving most of the hardware compatibility issues.

People who ask for comparatively newer packages (5%) can usually handle the small inconvenience with testing, but not the average non-IT guy.

So ultimately: Debian's stable's release cycles matches the average user's requirement of a stable and secure desktop.

Friday, May 4, 2012

Philips 192EL2 review.

I don't own many Philips products around; this must have been the first few, and I'm not having a good impression on Philips's QA.

The first monitor I bought did not work... it just displayed a blank screen, nothing else.

So I got it replaced.

For the good part, the brightness is fabulous, and colors are good but the firmware is equally bad.

It's so bad that you have to reset the monitor at times in order to get it's sharpness back.

At times the auto adjustment doesn't work well and you can see some parts of the screen as blurred (yes, the monitor is at it's native resolution). Solution is to reset the settings to factory default.

I would've liked it if there were presets for settings, but following the bad firmware and resets, I wont work hard storing them.

Thursday, May 3, 2012

Samsung Galaxy Y review

This's one of the cheapest Android phones around and is good value for money.

At this price range you really can't complaint about missing features, but still for the review, the phone is not very slow (very fast than you Windows computer) but you can complain, yes, sometimes you do get a few seconds delay when opening the desktop after a long browsing session, or opening calls/contacts if you have a lot of entries in them.

IMO the battery life is ok if you set the brightness to low, but if it's at max, you may have to lug the charger around. Notice you have to set it to high brightness outdoors.

Low resolution display and camera come with the price.

Verdict: It's a good phone for business application with Android expanding the possibilities, but bad as an entertainment phone (cause of low resolution display, slow processor and less ram).

Saturday, April 14, 2012

List of logged in users (with port) in a ssh server.

Run

netstat --numeric --numeric-ports --program | grep ^tcp

To list them, this'll also show the port via which they're connected to your box/server.

Sunday, March 25, 2012

Force GTK UI in QT Libreoffice

Tired of QT related UI bugs in libreoffice[kde]? In the same libreoffice build, you can force the GTK UI as such - 

OOO_FORCE_DESKTOP=gnome libreoffice

i.e. changing this environment variable to gnome in order to start with GTK UI.

If you've not installed gtk or gnome integration (or in Gentoo if you've  not compiled with gtk USE), then it'll open in libreoffice's stock GTK UI which does not respect the system GTK themes.