Posts

Tutorial 5: Some Useful (sample )join queries (specially for monetdb)

select * from (select 'a' as b,'c' as "c") as t1  left join (select 'b' as b,'d' as "d") as t2 using (b); select * from (select 'a' as b,'c' as "c") as t1  left join (select 'a' as b,'d' as "d") as t2 using (b); select * from (select 'a' as b,'c' as "c") as t1 right join (select 'a' as b,'d' as "d") as t2 using(b); select * from (select 'a' as b,'c' as "c") as t1 right join (select 'b' as b,'d' as "d") as t2 using(b); select * from (select 'a' as b,'c' as c) as t1 full join (select 'a' as b,'d' as d) as t2 using (b); select * from (select 'a' as b,'c' as c) as t1 full join (select 'b' as b,'d' as d) as t2 using (b); select * from (select 'a' as b,'c' as "c") as t1 natural full join (se...

Tutorial 4: Node.js - common error 1: contentType and undesired downloading

Image
Many of beginners may face problem where they want to show some content and the file gets downloaded (the browser does not show the content in its window). This problem arises because of not setting the content type of response.  It is advisable to set the content type, If no content type is defined browser try to detect the type of content. If it contain some buffer (or any type that browser is not designed to render)  it tries to download the file. Normally it does not happen as most of the time the file is in html (or other browser/plugin known format like images, videos, text, pdf). A small file demonstrating use and effect of setting content type with node.js: var http = require('http'); /*var server = http.createServer(function (request, response) {   response.writeHead(200, {"Content-Type": "text/plain"});   response.end(" \n"); }); var server = http.createServer(function (request, response) {   response.writeHead(200, {"Cont...

Totorial 3: simple Regular expression (regex) find replace in notepad++

Image
Let's suppose I have 100s of lines similar to this  { id: 'First Ack.', type: 'float'}, { id: 'Packets In', type: 'int'}, and I want to convert these lines in some format like : { id:'Packets In',field:'Packets In',type 'int'}, { id:'First Ack.',field:'First Ack.',type 'float'} To this in  notepad++ (also in most editors) search for id: (.*), type: and replace with id:\1,field:\1,type and press replace all and you are done no matter how many rows.

Ideas 10: Data usage monitor in routers

1. Better Internet Data usage manager Some internet connections have upper data limit. If multiple users uses a single connection, most of the software used now don't give the data each user have used till now. Nor it can assign specific limit to each user. (But it may be absolute in future as most of the connection will be unlimited. If I were to do something for country, Making internet fast and free would be one of the idea) 2. Better use of Bookmarks Bookmark are not used in way it should be used. I have more then 1000s of boomark on my computer but I rarely visit them using bookmark list. My use for them is to use them as browsers history. We can use them when some one googles something - we can show bookmarked images and links on search page (In right white space ) we can use them for browser homepage - to show which of your bookmarks are still popular on internet We can extract images and other stuff from them and save in the cloud

Idea 9: Problem with bookmarks and an Idea

Image
Note : You may have already read similar to this as I found out that some time this year mozilla community posted a similar article. We create a bookmark so that we can read it later, but the problem with bookmarks in that we never read them. From my own experience, I have more than 2000 bookmarks and I bookmarked those urls because I wanted to read them later. Now they( at-least some of them) are just used as a replacement of browser history as advanced system care deletes my browser history. IDEA or Solution : 1) What we can do with bookmarks is to first sync them with all browsers. Normally a web developer/designer uses atleast two or three browsers in multiple devices. After opera announced "it will move to webkit" some of the web designers would have felt good. (they would feel heavenly if IE does so but that will not happen). Coming to the point, I use many browsers in many devices if they sync the bookmarks across all devices that would be awesome. Xmarks ...

Idea 8: Fee structure for educational institute in rural areas

Normally in rural areas people register their children in school but they do not have good motive to send the child daily. To fix up this problem. Fix initial amount that is enough for people to not ignore, it will be returned after one year. (let's say 2000) For each absent of student he have to pay a fine of 50/100 rs. within 5 day, if not the final amount (2000) will not be returned. So institute will earn from absence of student and interest of that initial amount.

Thought ( मनन ) - 28: (Technical) A look at half empty glass of mobile world

Image
Motorola defy a rugged smartphone was announced on 1st of October, 2010. Later an updated version of this, defy+ was announced in 2011.The original defy had eclair and motorola released an froyo update for this phone. Defy+ was lucky enough to get shipped with android  Gingerbread inside. So I would like to compare these two phone models released 2-3 years ago to high end phones currently in market. OS Galaxy S3 was released with android 4.0 and can be updated to 4.1.x Nexus 4 was released with 4.2 most of other high end smartphone are running with android 4.0 or 4.1 With contribution from quarx2k and other developers from xda community both defy and defy+  can be flashed with highly stable android 4.1.2 and work on 4.2.2 is in progress. Camera Most of the high end smartphones are shipped with 8MP which is improved just in current series earlier all high end smartphones used to ship with 5MP. defy series have a camera 5MP Screen I have to accept - curre...