Monday, August 23, 2010

Mod on Sequences

While solving a problem at one of the Programming Practice sites, I came to know this about sum of a sequence. I wonder how much lacking do I have in Maths.

If, for example, 1+2+3+.......+(n-1)+n is the sequence that you want the sum of then, what we do is
add all the numbers from 1 to n. But this has another method. Whenever the sum crosses n during the the summation process you can take it as sum%n.

Which means, (1+2+3+.........+n)%n = (sum+1)%n + (sum+2)%n + ...... + ( sum+n)%n.

I didn't get it from any book so not sure if it's wrong or right. If someone finds it a mistake please comment.

Saturday, August 21, 2010

Exporting and Importing Code::Blocks Themes

I like coding a lot, keeps me glued to the PC for hours. For that reason it's a need to edit the Syntax Highlighter to suit my eyes for that long. I use Code::Blocks which lets me do just that. But redesigning the theme every time a crash or a OS reinstall takes place is a mess. That's when CB Share Config comes to play. Note you'll need to use the Nightlies version of Code::Blocks in this case. Here's a guide for doing that on Ubuntu [ http://tafhim.blogspot.com/2012/05/how-to-install-codeblocks-nightlies-in.html ]
And for Windows [ http://tafhim.blogspot.com/2012/05/setup-codeblocks-nightly-on-windows.html ]

To export your themes:
  1. Make sure Code::Blocks is not running
  2. Go to Code::Blocks Installation directory and run "cb_share_config.exe". If you are using Linux, open up terminal and type "sudo cb_share_cofig" to make the effect system wide or "cb_share_config" to make the effect work only for your account. (Thanks to this page's author for the remove 'sudo' tip)
  3. On the left side panel, click "...." and choose, "default.conf". (For XP users, it's in "C:\Documents & Settings\\Application Data\codeblocks\", For Linux(Ubuntu) users, it's in ~/.codeblocks/ or /home/user/.codeblocks/)
  4. Now tick the second option, ""
  5. Click "Export", choose "Yes" and show the location where you want to store it.


To import your themes:
  1. Make sure Code::Blocks is not running
  2. Go to Code::Blocks Installation directory and run "cb_share_config.exe" If you are using Linux, open up terminal and type "sudo cb_share_config"
  3. On the left side panel, click "...." and choose the file which holds the theme.
  4. In the right side panel choose your "default.conf" as stated above.
  5. Now click "Transfer >>" and give positive responses.
  6. Click "Save" and give positive response.

Bruteforce: A theme for Code::Blocks

I've been using Code::Blocks for a very long time. Well, I started coding with it! It's a nice cross platform IDE that lets you do a lot of things to be imagined. Includes, edit of it's Syntax Highlighting as well. Today I created a Theme myself for my coding sessions. Couldn't really bring together everything I wanted but it still looks great to me. Though can't fully appreciate the string color. Here's a screenshot:


And if you'd like to use it, here's the export that I made. [BruteForce]
Copy the text file and save it as Bruteforce.conf
If you don't know how to use these exports on Code::Blocks, click here.

Saturday, August 07, 2010

Linkin Park on the mic again

I've been a hardcore fan of this band since the late 2003. I've listened to each record and can remember almost any track's lyrics at any given time. But since the last installment in the band's sound (Minutes to Midnight [2007]) I kind of lost the appetite and moved onto more alt metal sounds.

However, today I heard the newest track from the band which is soon to be found with their forthcoming album very soon. The Catalyst, as the band names it is a totally new kind of sound I've heard in many years. I never was expecting such fusion whatsoever. A total ballistic start with screaming vocals, not growls yet somewhat rude. The track got my weak point of sound at the very start, energy. And it is an
awesome progressive blaster. The vocals follow their own way, while the surrounding sounds keep on building their ground. I don't know much about music but this surely is a progressive come industrial type of some rock.

A noticeable new astonishment for me was Mike's place taking performance. He along with Chester drives the song where it belongs. Rob's drums this time pump the ears more than he ever pushed them to do. The track also runs in some kind of trance like base. You can hear the excessive pushes of industrial punches. But as same as before
the song seems to have a quick and hasty ending as LP always did. I don't know is it just me.

However, a rocking promo, I hope it doesn't does the same as it did with M2M-What I've Done start. I want the sound blasting.

Sunday, August 01, 2010

3rd Semester gone!!!

When entering the class for the first of the lectures in my uni, I remember of thinking about the four years as a long, windy, curvy, wavy whatever not way to go. Today, I'm going to perform on my 3rd Semester Lab Exams for Software Development. I'm starting to miss those days. Or maybe I should jerk it all off with a smirk. It's 7:05 AM here in Chittagong, Bangladesh and I haven't slept for the whole night. Guess I'm sure to have some of these nostalgias with this tired brain of mine. Don't wanna go to sleep though.

Connect Rapoo MT750S with Linux (Tested on Manjaro)

 I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...