Creating a content toggler like Gmail in Android

If you are an Android user and you use Gmail app; then you know this: If there are more than one mail in your thread, then you can touch on the heading of any mail and make it collapse and appear.

If you want to implement a similar content toggler then you can also do so. Continue reading “Creating a content toggler like Gmail in Android”

Thoughts on Suicide, Fear, and Life

This is what I stumbled upon today. The thing that I liked about it is that it expresses the fear of suicide more clearly than I have ever seen. I generally cave in by saying that I am afraid of suicide because of what will happen to others in my life after me? It is definitely a factor, a big factor I can say. The way I think of it, won’t it be easier for them, if my suicide didn’t looked like suicide but looked like an accident. It will be easier for them to accept the truth then. It will be less painful. The pain of knowing that your son, your brother, your husband killed himself is more than knowing that he died because of an accident(traffic, electrocution any accident). But is that all? Is that the only factor of the fear of suicide. No it’s not. The post expresses, my thoughts more clearly than I have the courage to do so myself. And YES I say the courage to express my feelings toward suicide. Because it’s a little weird, even though I think of dying, even though I think of committing suicide, I fear in expressing my true feelings. And I think it’s because of what anyone would think of me. It’s weird at one hand I think of dying and on the other hand I am ashamed in admitting my true feelings about it and thus cave in and lie.

Kefka Ponders

I was basically asked two questions: Are you afraid of dying? Is that fear why you’re still here?

As to the fear question, the short answer is yes, but it’s more complicated than that. However, that fear is not why I’m still alive. But that question certainly got me thinking… Why am I still here?

I think what I hate most of all is having to deal with all of this in the first place. I don’t want to have to deal with suicide. I don’t want to have to deal with death. But I must because I have something else I have to deal with, something I never wanted to deal with, something I wish I never had: life.

But, oh, how I so do not want to deal with any of this! I want to be spared from life, but in order to do that I must face…

View original post 800 more words

jQuery to Jump Start PHP – SitePoint’s give-away

jQuery
jQuery

I have recently started developing a website. I wanted it to be filled with things I don’t know yet. So going to tutorials and articles on the internet was an obvious choice.

Searching for a method to make the div elements sticky after a certain amount of scrolling ( in other words , window-scroll + scroll-position + display:fixed ), came up with results containing the usage of JQuery. Now to be fair I have never used JQuery. Like never ever. Although I have worked on JavaScript and HTML5 Canvas. Continue reading “jQuery to Jump Start PHP – SitePoint’s give-away”

Samsung Galaxy Star

I haven’t put a anything over here since a long time. And there is a reason for that. I was busy playing with my new android phone. By playing I mean hanging around looking for apps trying then out. Enjoying features of Android (yeah okay gaming was involved too), but that’s what I do. I play with other people’s implementation look at how good the work they have been doing. And then I keep on learning to make myself able to do the things which are already being done by others and if possible better 🙂

image

Anyways I bought a Samsung Galaxy Star (GT-S5282).
It’s got a single core 1.3 ghz processor. 2 GB internal memory. 512 MB Ram. 802.11 b/g wifi.
2 megapixel camera. No front facing camera. A 320X240 resolution 3 inch screen,  with a specification of 133 dpi.
I bought it during summer holiday for 5K. It comes with a USB cable which helps in developing for android.

image

An interesting thing, I couldn’t set my bsnl broadband modem to open the port for play store used in Android. However here in Jalandhar with the Internet connection I use I didn’t had any problems with play store, but the irony is I couldn’t get ports to open for my torrent clients.
I have been using the phone to test the apps I have been developing. The simulator for android is too slow. So having a phone to do testing is a life saver.
I have been spending my time learning android and java. I will put about my first simple app. However I am also thinking about making a game for Android. However I don’t even have a plot /type in mind.
P. S.
Flatland book seems interesting. Let’s see if I can find my way to a game in it.

node.js

node.js
node.js

As it’s website says node.js is :

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Continue reading “node.js”

I am back baby doll !

Ted back in the bar
I am back baby doll

Yeah it’s funny. And exactly for that reason it’s been put there. It’s something a character ‘Ted Mosby‘ from the sitcom ‘How I Met Your Mother‘ says when he was drunk and gets to a bar at the middle of a night. If you haven’t seen the sitcom it may not appeal to you, but for it’s lovers it’s awesome. By the way if you haven’t seen it, the website for the sitcom is here.

I haven’t posted anything since 20th April. Continue reading “I am back baby doll !”

I took CS50X

I was busy about whole last month, with my Mid – Term Examinations, and then trying to back up on CS50X.
I wanted to do a thorough review of my whole journey through CS50X. However I am still waiting for the final results. There are strict rules against cheating and sharing codes with one another. However seeing that CS50 on Harvard campus is over and CS50X through the EDX platform is over too. Doing a week by week analysis of my CS50X journey wouldn’t hurt.
I am waiting for the results. Once it appears, this will be my first successful online course.

After this I will be completing my HTML5 Game Development course. And then moving forward.

How torrenting works

How torrenting works

 

  • A user who wants to upload a file first creates a small torrent descriptor file that they distribute to other users by conventional means.
  • They then make the file itself available through a BitTorrent node acting as a seed.
  • Those with the torrent descriptor file can give it to their own BitTorrent nodes which, acting as peers or leechers, download it by connecting to the seed and/or other peers.
  • The file being distributed is divided into segments called pieces. As each peer receives a new piece of the file it becomes a source (of that piece) for other peers, relieving the original seed from having to send that piece to every computer or user wishing a copy.
  • Pieces are typically downloaded non-sequentially and are rearranged into the correct order by the BitTorrent Client, which monitors which pieces it needs, and which pieces it has and can upload to other peers.
  • Pieces are of the same size throughout a single download (for example a 10 MB file may be transmitted as ten 1 MB Pieces or as forty 256 KB Pieces). Due to the nature of this approach, the download of any file can be halted at any time and be resumed at a later date, without the loss of previously downloaded information,
  • When a peer completely downloads a file, it becomes an additional seed.

 

Disclaimer :

I have not written a single word of the above lines. I copied them from the blog of Colt McAnlisLink to original Article