Tuesday, March 14, 2017

How to convert a string into sha256 in iOS

To convert a string into sha256 use the following code.

[str SHA256DigestString];

The O/P would be something like 3026d32a577df45d512fb409e17be0acc56baa02d9447a8eea4c542719e2a2ce

How to get the UUID in iOS

To get the UUID in iOS use the following code:

NSString *UUID = [[NSUUID UUID] UUIDString]; 
NSLog(@"UUID is : %@", UUID); 

The format should be something like 9063E103-1F1C-4220-818B-CB9FC94536D5

Saturday, November 12, 2011

Cure for Diarrohea

3 Months back my daughter(age: 10 months) suffered from Diarrohea.
She was having continous motions. We consulted doctor and he was mentioning to give only ORS(Oral Rehydration Salts - Recommended by W.H.O for Diarrohea) and food(what ever she eats). I searched Internet and I couldn't find any medicine. But the motions were not stoppable. Doctor was mentioning that it will continue for another 2 or 3 days, but not to stop the ORS. We have admitted in the hospital and have given the Fluids because she is not driking the ORS after some time.

Later after a day, one of my cousin mentioned to take some ayurvedic medicine from ARYA VAIDYA SALA - Kottakkal. She has given the below medicine.
Rajyadimastaka churnam - below one year
Dadimastaka churnam - after one year
And we have tried to give some food.

Interestingly with in 2 hours, motions got reduced. And my baby suddenly got Active and started playing. Its really a happy moment after she has become Active.
But still we have continued the ORS because that is the main medicine to decrease the Diarrohea. Even Ayurvedic doctor also mentioned the same thing.

Note: This has worked for my daughter, but still consult both the doctors.

Wednesday, May 26, 2010

Use of dirty objects

Some times we wanted to know what are the previous values for an object.
We can track the unsaved attribute changes in Rails.
These can be used before save only.

The below are the methods you can use.
* changed
* changed?
* changes

Before Assigning:
user = User.find(1)
user.first_name # => "Naga"
user.last_name # => "Harish"
user.changed? # => false
user.changed # => []

After Assigning:
user.first_name = "Turvi"
user.last_name = "Sri"
user.changed? # => true
user.changes # => {"first_name"=>["Naga", "Turvi"], "last_name"=>["Harish", "Sri"]}
user.changed # => ["first_name", "last_name"]

You can also you the dirty suffixes.
DIRTY_SUFFIXES = ['_changed?', '_change', '_will_change!', '_was']

user.first_name_changed? # => true
user.first_name_change # => ["Naga", "Turvi"]
user.first_name_was # => "Naga"
user.first_name_will_change! # => "Turvi"

NOTE: Once you save this record changed? will become false.

So you can have History as one more table or one more column called update_history as column to store all the changes.

Friday, November 6, 2009

Simplybus.com is launched.

As mentioned earlier we have launched our new product www.simplybus.com today i.e., on November 6th 2009 @12:14PM.
We also got the first ticket booked frmom Bangalore to Hyderabad.

Very happy to get this happen.

Hoping more and more tickets should be booked online.

Monday, October 12, 2009

About to launch Simplybus.com

Book Bus Tickets Online
We are developing a new product www.simplybus.com. This is mainly for the frequent travellers. Frequent travellers can get discounted tickets through out the life by booking on this website.

Here are the features.
Get your BUS tickets at discounted rate anytime, anywhere to all destinations on all operators...

Book online using credit, debit cards and net banking

Get confirmations by email and SMS

Book bus tickets online with over 500+ bus travel operators

Book bus tickets online for over 5000+ routes across India

Return bus tickets reservation

Stay Tuned.. We will release on November 6th 2009, 12:14 PM. (Auspicious Time. :))

Tuesday, June 30, 2009

BitlaSoft 2nd Year Anniversary

This year too we had a great celebrations in our office for Bitlasoft's 2nd year Anniversary. This year we had a dark blue Jacket with a logo on the front side and punch line on the back side.

We had party with our family too. Nice enjoyment with all the quiz, Tambola, some silly questions, silly games :) .

We discussed all the cool things about the company. We wish all the best to all of us for a bright future of bitlasoft.