Today I’d like to mention about search engines and their design criterias. Yes we have Google, Bing, Yahoo, Duckduckgo, yandex and many more. But is it easy to build a search engine? The answer is clearly NO. If you think that you can easily build a search engine you’re more like you’re comparing a Ferrari and 1769 Cugnot Steam Trolley (Jonathan Holguinisburg). Yes, it is that much different.
I’ll elaborate what I mean. Let’s start with first phase, crawling.
I should mention about a tool that deserves to be described specifically – rsync.
This tool is well known by system administrators but not as much by home users. But this tool has promising capabilities for them as well. If you’re a backup lover like me (your photos, documents and etc.) and if you’re doing a copy&paste for that, rsync is a life saver.
rsync simply synchronizes your destination directory to be same as your source directory. It does this process with very effective way. It calculates differences and only copies/synchronizes the differences of files and related directories. The destination can be a remote machine (i.e. remote_user@remote_ip:/destination/directory/path). So I backup my home folders contents with my external HDD with:
rsync -avz source-dir destination-dir
Do not use copy&paste (including console cp commands) for backup purposes. Use rsync.
My elder brother needed an application to manage price lists of his wholesalers and dealers. Products’ prices that he is following are subject to change daily because exchange rates may change daily and it may be very hard to find optimal price for a product if it can be obtained from multiple dealers. So I decided to help him with an software solution. Price lists and displays support utf-8 (as they can be seen in screenshots – Russian language price lists are used for tests).
If you tried to run your android app on your device and android studio shows that device off-line there are some reasons:
- You may be using and USB3.0 port, move it to USB2.0
- Your USB cable may have some problems, change it
- Restart phone, adb etc.
First option solved mine.
In this post I will provide mathematical background and C++ implementation of greatest common divisor (GCD) calculation of big numbers problem. Problem can be described as:
You have two numbers to calculate their GCD. First number is very big, let say 250 digits long. Other number is not so long, maybe less than 6 digits. How do you calculate GCD of these two numbers. Continue reading
Selection sort finds minimum element of the unsorted elements and swaps it with the first element of unsorted part. It continues with the rest of the unsorted elements with this manner. Below is the implementation of selection sort. Note its worst case is O(n^2). Continue reading
Merge sort is a divide and conquer based algorithm. Its merge behavior names the algorithm. Algorithm details can be found elsewhere but I’ll give my basic merge-sort implementation here. It starts with dividing the array into two equal sized arrays. Division done until each array only holds an element. But merging procedure is the interesting part of the merge array. It merges 2 arrays into one sorted array. Continue reading