Monday, April 27, 2020

Changing XCode to create .h files instead of .hpp files

When we create files in C++ project in XCode It results in creation of .hpp files which are not used as much as .h files

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/C++\ File.xctemplate/WithHeader

Change permission of ___FILEBASENAME___.hpp to edit it using the below command
sudo chmod 666 ___FILEBASENAME___.hpp


Now open the file ___FILEBASENAME___.hpp in nano by using the below command on terminal
nano ___FILEBASENAME___.hpp

Replace hpp in file with h
Press Ctrl + O to overwrite and save the file
Press Ctrl + X to exit nano

cd ..

Change folder permissions to allow to rename file
sudo chmod -R ugo=rwx WithHeader/

Finally rename file
mv ___FILEBASENAME___.hpp ___FILEBASENAME___.h

Similarly for ___FILEBASENAME___.cpp we need to replace hpp with h

sudo chmod 666 ___FILEBASENAME___.cpp
nano ___FILEBASENAME___.cpp

 Replace hpp in file with h
Press Ctrl + O to overwrite and save the file
Press Ctrl + X to exit nano


Tada! Relaunch Xcode to get .h files on creating .cpp files in project



Tuesday, December 31, 2019

Chronology of CAA Poll


The twitter poll launched by Sudhir Chaudhary purportedly to get real opinion of India saw a few twists and turns

As our beloved leader said - "Aap chronology samajhiye". So I tried to understand chronology of the poll and found it quite interesting to share.


On day 1 for first few hours - there was more support for CAA probably due to Sudhir Chaudhary (who has pro government bent) starting the poll So naturally his followers would be among the first to see the poll and vote on it .

After few hours twitter user @Nehr_who started to rally opposition for CAA and then the trend changed with 57% votes in opposition of CAA to 43% in support

For the first and second day opposition to CAA maintained its edge consistently with votes in opposition always above 52% and votes in favour below 48%

On the third day opposition to CAA was 52% and support was 48% was maintained for most of the time
Suddenly three and half hours before the poll was scheduled to end  17,161 votes were cast in favor of CAA in a span of just 18 minutes turning the result to in favour of CAA : 50% and opposition to CAA : 50% .

Note : An average of around 2,250 votes casted in 20 minutes was found compared to sudden burst of votes This indicates 7.5 times more than normal rate of votes were casted and 99.1% in favour of CAA during the given 20 minutes.

This was noticed by other twitter users as well. (provided screenshots in link) This prompted many users in opposition rallying their supporters to get more votes in opposition.

For next few hours it seemed despite overall trend for past 3 days being against CAA in poll - result would be in favour: 52% and opposition: 48%.

But the sudden lead could not be sustained and final result was 50.4% in opposition to CAA and votes in favour trailing at 49.6%

In summary majority of twitter users remain opposed to CAA throughout the poll and the final result was in line with majority trend for the 3 days.








TimeDurationVotesCasted votes in favourCasted votes % in opposition
2:29 to 2:4920 minutes2,25248%52%
2:49 to 3:3545 minutes517648%52%
3:35 to 3:5318 minutes1716199.1%0.9%





Link to download screen shots

https://1drv.ms/u/s!AhtxYZmjxi2zg9c-NN7lyY4vkV9PGA?e=vjgboL




Thursday, November 7, 2019

Bommanahalli to Richmond circle buses

Bommanahalli to Richmond circle buses

355E
356

Bommanahalli to St. Patrick's bus stop
G3
362C

Friday, September 27, 2019

Sometimes

I was travelling in bus coming back from interview. I saw a girl from one side of the bus. There was some quality about her. She reminded me of a girl I knew, took me back to past - that bitter sweet feeling. These are just stolen glimpses of what once was.

Friday, September 13, 2019

Removing logs from your release apk

Just add the following to proguard rules.pro file

-assumenosideeffects class android.util.Log {
public static *** d(...);
}


Sunday, August 18, 2019

My Launcher - Android Home Screen Launcher app


If you wanted a simple launcher that would remember your recent apps and allows you to simply choose the apps like Windows Metro style You can download it from here -> Link

1. Download the apk

2. Open the apk

3.  Allow installation from unknown source (Google says this for any apk not downloaded from its Play Store. Nothing to worry about, the app doesn't require any access to your data. No pesky permission requests. :) )

4. Install the app

5. Click Open. Set it as your default launcher if you enjoy it! :)


Sample Picture of screen when you start using the app - Top row provides the recently used 6 apps. Feel free to comment any new features to add in the app. :)




Friday, April 12, 2019