While reading an article about WinAmp availability on Android phone this morning, suddenly Napster came to my mind. Did a Google News search for Napster and found lot of articles about internet wars that happened recently. Of all the links, the most interesting one was an article by Tim Hwang from The Washington Post titled WikiLeaks and the Internet's Long War.
He (Tim Hwang) did an easy to understand summary about the series of battles between "Anonymous" and the establishment. It makes me interested to read more about the topic.
It started with the history of open source against the proprietary software
"In the early 1980s, Richard Stallman, then an employee at MIT's artificial-intelligence lab, was denied permission to access and edit computer code for the lab's laser printer. Frustrated, he kicked off what he calls GNU, a massively collaborative project to create a free and sharable operating system. His efforts sparked a widespread movement challenging the restriction of access to software through patents. Supporters asserted that they had a right to control the code in their own computers."
Then the story about Napster
"Another major milestone in the conflict arose in 1999, when Shawn Fanning launched Napster, allowing for seamless peer-to-peer sharing of content. The service ballooned, claiming more than 25 million users at its peak and resulting in mountains of copyrighted content flowing freely across the Web. The site was sued and shut down in 2001. However, the ensuing battle over copyright law drew a line between industry representatives, such as the Recording Industry Association of America, and the "hacker" advocates for the free flow of content."
Napster was forced down but then BitTorrent emerged
"Large-scale use of this technology emerged in 2003 in the form of the Pirate Bay, which indexes BitTorrent files en masse. The site's founders and operators, Gottfrid Svartholm Warg, Carl Lundstrom, Fredrik Neij and Peter Sunde, would emerge as the Assanges of this battle, permitting a massive and continuous leak of copyrighted content in the face of waves of police raids and lawsuits - persisting even beyond their eventual conviction on infringement charges in 2009."
And now, the WikiLeaks
"The WikiLeaks fight is in the tradition of these conflicts, just on a much vaster scale. As the Internet has become an integral part of our everyday lives, narrow and technical questions about who gets to run and edit computer code have morphed first into battles over copyrighted content, and now into fights at the highest levels of government secrecy and corporate power."
We'll see how this war will shape the internet in the future.
A blog by an ordinary Linux user who uses Windows in his day job.
Tuesday, December 14, 2010
WinAmp is now an Android app...
There's no question that iTunes dealt some heavy blows to WinAmp over the years. But with a new Android app that aims to manage music between the smartphone and a computer, perhaps it's time for WinAmp to make a comeback.
WinAmp for Android is out of beta, TechCrunch reports. In addition to music playback and download management, the MP3 player now supports wireless syncing to the desktop and Shoutcast radio stations.
In fairness, WinAmp hasn't been living in total obscurity. It currently has 60 million users, says TechCrunch, but only 5 percent of them are in the United States. This was once the most popular program for listening to MP3s.
Click here for more and here for review.
WinAmp for Android is out of beta, TechCrunch reports. In addition to music playback and download management, the MP3 player now supports wireless syncing to the desktop and Shoutcast radio stations.
In fairness, WinAmp hasn't been living in total obscurity. It currently has 60 million users, says TechCrunch, but only 5 percent of them are in the United States. This was once the most popular program for listening to MP3s.
Click here for more and here for review.
Tuesday, November 23, 2010
Mike Galbraith's Linux kernel patch that does wonders...
Last week I came across a blog post "The Linux desktop may soon be a lot faster" by Steven J. Vaughan-Nichols. It's about the patch done by Linux kernel developer Mike Galbraith who adds a mere 233 lines of code to the kernel's scheduler that cuts desktop latency down by a factor of ten. Even Linus Torvalds himself praised the performance boost he gets from the patch.
Two days later, another post appear on Google News. Alternative To The "200 Lines Kernel Patch That Does Wonders" Which You Can Use Right Away by Andrew. Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file.
Everybody seems excited with the improvement. As for the champ at the bit, they've started implement the workaround and I believe some even recompile the kernel with the patch. Wow!!!
Two days later, another post appear on Google News. Alternative To The "200 Lines Kernel Patch That Does Wonders" Which You Can Use Right Away by Andrew. Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file.
Everybody seems excited with the improvement. As for the champ at the bit, they've started implement the workaround and I believe some even recompile the kernel with the patch. Wow!!!
Sunday, November 21, 2010
Customizing plymouth login screen background, fonts and gtk...
1) Open terminal, copy and paste the following command.
3) Now to disable Appearance pop up from login screen. Open terminal, copy and paste the following command.
Tested on Ubuntu 10.04 and Linux Mint 10.
$ sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow2) Close terminal and log out. Once at login screen you'll see an Appearance pop up. Make your changes and log in.
3) Now to disable Appearance pop up from login screen. Open terminal, copy and paste the following command.
$ sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktopNote :
Tested on Ubuntu 10.04 and Linux Mint 10.
Monday, November 15, 2010
First Ubuntu and now Fedora, dumping X for Wayland...
When I first read about the news, as normal user I can't really tell what impact might hit to people like me. My understanding, it seems like there's a claim that X is too complicated, too slow, too filled with archaic junk and so on. That trigger the movement from X to Wayland, an OpenGL-based display management system.
I'm more concern about the apps that I love to use on Linux, because to run natively on Wayland it needs to be ported. Otherwise, it is stated that:
"If they don't, you can run a nested X server like on OSX. They'll still work as well as they ever did, and you even get to keep ssh [Secure Shell] forwarding of them. You can run a wayland server that does nothing but run a nested X server and you wouldn't ever know the difference."
Questions in my head:
Changes are good but at what stake? If I hate to change, hell I'll just stick with Windows for the rest of my life. I don't mind learning, the advantages of using Linux are too enormous to be ignore. But if the change is too huge for me, I guess I'll stay on the safe side by reading more experience story by others. I'll do my best to avoid running a nested X server on Wayland because if I did that I personally feel it beats the purpose of the transition in the first place.
I'm more concern about the apps that I love to use on Linux, because to run natively on Wayland it needs to be ported. Otherwise, it is stated that:
"If they don't, you can run a nested X server like on OSX. They'll still work as well as they ever did, and you even get to keep ssh [Secure Shell] forwarding of them. You can run a wayland server that does nothing but run a nested X server and you wouldn't ever know the difference."
Questions in my head:
- How long will it take for all apps to get ported?
- If need to run a nested X server, do I need to configure it myself?
- With the hassle on the ported part (by developers of course) so that all apps can run natively on Wayland, is it going to improve graphical performance tremendously?
- Since it is an OpenGL-based, is it going to improve gaming experience as well?
Changes are good but at what stake? If I hate to change, hell I'll just stick with Windows for the rest of my life. I don't mind learning, the advantages of using Linux are too enormous to be ignore. But if the change is too huge for me, I guess I'll stay on the safe side by reading more experience story by others. I'll do my best to avoid running a nested X server on Wayland because if I did that I personally feel it beats the purpose of the transition in the first place.
Sunday, November 14, 2010
Sharing html table with sum formula that works on Excel and web page...
I'm in a situation where I need to include Excel SUM formula when exporting data from html. Questions raised in my head. What's the purpose of exporting it to Excel in the first place? It gives us the ability to manipulate data with whatever formulas available in Excel. Then why do we want to have it in html? I have no idea but at least I've found a way that I won't need to generate it twice. That matters to me.
Here's the trick. When generating an html, add the id to the cell that needs to be calculate exactly like cell in Excel. As for the cell with the sum value, add css class to it (doesn't need to be exist in css, it's just for the sake of searching later on).
<table> <thead> <th>header 1</th> <th>header 2</th> <th>header 3</th> <th>total</th> </thead> <tr> <td id='A2'>1</td> <td id='B2'>2</td> <td id='C2'>3</td> <td id='D2' class='sum'>=SUM(A2,B2,C2)</td> </tr> <tr> <td id='A3'>4</td> <td id='B3'>5</td> <td id='C3'>6</td> <td id='D3' class='sum'>=SUM(A3,B3,C3)</td> </tr> <tr> <td id='A4'>7</td> <td id='B4'>8</td> <td id='C4'>9</td> <td id='D4' class='sum'>=SUM(A4,B4,C4)</td> </tr> <tr> <td class='sum'>=SUM(A2,A3,A4)</td> <td class='sum'>=SUM(B2,B3,B4)</td> <td class='sum'>=SUM(C2,C3,C4)</td> <td class='sum'>=SUM(D2,D3,D4)</td> </tr> </table>Now if you copy the html above, paste it into a notepad and save it to .xls. You'll get an Excel sheet with calculated value based on the SUM formula provided. But then of course the formula won't work on the web site. You'll see table like shown below.
header 1 | header 2 | header 3 | total |
---|---|---|---|
1 | 2 | 3 | =SUM(A2,B2,C2) |
4 | 5 | 6 | =SUM(A3,B3,C3) |
7 | 8 | 9 | =SUM(A4,B4,C4) |
=SUM(A2,A3,A4) | =SUM(B2,B3,B4) | =SUM(C2,C3,C4) | =SUM(D2,D3,D4) |
This is where JQuery come in handy. The logic,
- Search for all the elements that has 'sum' class
- Convert the formula into something that is understandable by JQuery
- Loop through the elements and change the value from formula into calculated value
$(document).ready( function() { // search the elements that has 'sum' class $('.sum').each(function() { // convert the formula from =SUM(A2,B2,C2) into #A2,#B2,#C2 var formula = convert($(this).html()); var total = 0; $(formula).each(function() { total += parseInt($(this).html()); }); // replace with calculated value $(this).html(total); }); }); // converting from =SUM(A2,B2,C2) into #A2,#B2,#C2 function convert(formula) { var newform = formula.substring(formula.indexOf("(") + 1, formula.indexOf(")")); var arrayform = newform.split(","); return "#" + arrayform.join(",#"); }JQuery save the day...again...
Friday, November 12, 2010
Converting int to base26 string in C#...
For my own reference.
public string ToBase26(int number) { char[] base26 = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; int remainder = number % base26.Length; int value = number / base26.Length; return value == 0 ? String.Format("{0}", base26[remainder]) : String.Format("{0}{1}", ToBase26(value - 1), base26[remainder]); }Alternatively I can code it this way
public string ToBase26(int number) { if (number < 0) return String.Empty; int remainder = number % 26; int value = number / 26; return value == 0 ? String.Format("{0}", Convert.ToChar(65 + remainder)) : String.Format("{0}{1}", ToBase26(value - 1), Convert.ToChar(65 + remainder)); }
Subscribe to:
Posts (Atom)