Bird Bot is a Facebook messenger bot. Bird watchers in India shoot photos of birds. And they want to know the bird name. My good old friend from college is an expert in Machine learning. He is building a bird identification api with the help of TensorFlow and Keras. I am helping him with the front-end. Instead of developing an app with React Native, I wrote a simple bot which works with Facebook messenger.…
Category: Miscellaneous
The Miscellaneous category contains posts which do not belong in any of the above category. They are usually zombies after a category is deleted.
Using a search engine shields an engineer from understanding how search works. In this article, we will explore how it works.
What is search?
Search is showing documents that match a query. Document is anything that has information. Such as web page or PDF document. Query is what the user types in the search box.
There is lot of work done in the background.…
I am learning Objective-C. This post contains some Objective-C trivia which I picked up over the last few weeks.
Concatenating Strings
In Objective-C, NSString
class represents strings. Concatenating two strings is not easy. To ease the pain, there is a NSMutableString
class. It has an append method. The StackOverflow post summarises the different methods available to concatenate strings. Usually, we have problems with XML strings which run into multiple lines.…
Text to Speech (TTS) is a new feature in iOS7. Text to Speech, as the phrase implies, converts a text to speech. By default, the voice is an American female. And it is a bit too fast. So, I wrote a small helper class to adjust the TTS experience. The helper class, TTSHelper
, uses a British male voice. And it speaks a bit slower.…
Playing audio in an iOS app consists of two steps:
- Creating an Audio session using
AVAudioSession
class. - Playing the audio using Audio player using
AVAudioPlayer
class.
AVAudioSession
We want to play audio in apps even though the background music is running. For that, create a shared audio session. The code for initializing a shared session is shown below.
-(void)initAudio { NSError *error; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; BOOL success = [[AVAudioSession sharedInstance] setActive: YES error: &error]; if(!success)…
HTML5 is an evolving web standard. It has good adoption across browsers – IE (10), Firefox, Chrome, Safari, Opera. To see the level of compliance in your browser, visit http://html5test.com. In this post, we will go over the basic features of HTML5.
Semantic tags
Semantic tags like article, section etc are more meaningful than plain div
tags.
<article> <hgroup> <h1>Title of the page</h1> <h2>Subtitle</h2> </hgroup> <section> <h1>Virgin Gorda</h1> <p>The Baths at Virgin Gorda are truly one of the most picturesque places in the Caribbean.<p>…
SQLite database has native support in iOS. The post provides a simple helper class that you can use to retrieve data and perform update operations on the data.
The helper class uses the libsqlite3.dylib
library. Link the XCode project with the library. Create a helper class in Objective-C: DbHelper
.
Header file
Define the DbHelper class with a static method (getInstance
) to create a singleton instance.…