Oracle why you bug!!

2 Comments

So I have been using OBIEE for some time now for reporting purpose in my organization. Although its an easy to use tool there are good amount of bugs in it and for such a widely used tool some of the bugs outright seems stupid.

For instance you cannot delete records properly from a Fixed Value List if it has more than 10 records.

Here is a sample of that, I created a Fixed list with 10 + records. See how it asks for deletion of the element correctly but deletes an element different altogether. It should have deleted “Record 12” but deleted “Record 2”

The reason is simply bad coding. So there is a javascript function “LovPanel.NVEntry.remove” which does the removal of record from the list. But it does not work!!

Oracle if you are listening fix this.

How to send Notification in Android App

Leave a comment

We are going to do a quick tutorial today on how we can generate notifications in Android. Although the standard Android Guide does explain it, but I dont think its a very quick way to understand stuff.

So here we go.

Here are the basic steps –

  1. Create a notification channel
  2. Build a notification
  3. Send a notitification.

How do we create a notitification channel, we do it simply by keeping in mind that we need a unique channel id(“1000111”) and channel name(“cld_notif_channel”). The values do not matter, however they need to be unique.

The notitification channel can be invoked as many number times as required, although once invoked and available it will just not create another if its already present. I would suggest to create your notitification channels as soon as your application opens.

The way you do it is simply by calling the createNotificationChannel() function in your Main Activity.

Step 2 involves creating the notification itself. There are few basic things we need to take care of, it must have a Small Icon available, this one is mandatory along with the Channel Id, which we created above.

Step 2.5 involves creating a notification manager which is actually going to be responsible for sending out notifications.

Step 3 involves obviously firing the notification and sadly this again requires a unique id(“1001”) to uniquely identify the notification and send it.

And there you go, its so simple it hardly would take 10 minutes of your time to learn how to send notifications in your Android application.

*Note – where you see *this* that is android.content.Context so this goes inside your class for the activity.

A blog a day challenge

Leave a comment

I am going to start with the blog a day challenge. Simply put for the next 100 days I am going to write a blog every single day without fail on any topic.

I need to invest a considerable amount of time in learning new things for career growth and my own as well. Having a regular blog should help in prioritising the activities in that direction.

How do we start?

Leave a comment

Hi Guys

Long time no see πŸ™‚ sometimes I feel like I should tell that to myself as well.

So how do we start, we start by noting down what we need to do, and while we are at it, we note down what we didn’t write in the first place and also few more things which you should have thought of before. To do things is to improvise, learn and also to keep on adding more things to do, obviously a to-do list never ends, because to do something or to learn something, you need to do a lot of things πŸ™‚

To understand that lets write a blog post πŸ™‚ This is going to be quick. All you need is rails setup in your system.

Lets start with creating a blank app

rails new todoapp # this will create a blank slate for you to work on

rails g scaffold todo task:string complete:boolean parent_task_id:integer # this will create your model/views/controller/migration etc etc files which you will do the work for you

rake db:migrate # if this throws an error, you gotta do “rake db:setup first” this will create your database migration and the schema for todo tasks.

Now we need to build something like the below to sorta have a parent child relationship between the tasks. Why ? just read the 2nd para again from top.

Parent Task 1
—- Child Task 1
—- Child Task 2
Parent Task 2
Parent Task 3
—- Child Task 1
——– Child Task 2

In your new and shiny app/models/todo.rb add these two lines to create the parent child hierarchy.

has_many :child_tasks, :class_name => 'Todo', :foreign_key => "parent_task_id"
belongs_to :parent_task, :class_name => 'Todo', :foreign_key => "parent_task_id"

Now a bit of magic is needed to the views to allow us to easily select the Parent tasks for any child task.

Head over to your app/views/todos/_form.html.haml or *.erb file depending on the templating engine and change the f.parent_task_id to a collection_select

.field
= f.label :parent_task_id
= collection_select :todo, :parent_task_id, Todo.all + [Todo.new], :id, :task

This will allow us to choose a parent task, whenever we are creating a new task with – not a very bad hack? πŸ˜›

Finally in the show and index page, we need to display the parent task.

replace your todo.parent_task_id with
Todo.find_by_id(@todo.parent_task_id).task rescue "No Parent Task"

And the end result is tada!!!

Todoapp

Where do we belong!

Leave a comment

Hey guys!

Writing something down after a long time. I always get these urges to write something, but never do that due to lack of time or investing time in other worldly problems.

Of late, I have been thinking about the direction in which my career is heading. Even though I like my current job, understanding how large manufacturing companies work and implement oracle for them. However it is not entirely what I imagined myself to be doing when I was a kid.

Ofcourse when are are younger, we imagine us to be a lot of things, lots of dreams and then when you grow up, we stop chasing the dreams and start running to just get the things done in front of us. Somehow the tasks at our hand are too pressing and we forget what we always wanted.

All of us want to find our place in the world. Some find it, some make one and some just are happy with what they get. What if you are one of those, who have to make a place for yourself in the world and it is always there in the back of your mind. Even if you choose to ignore it, your sub conscious mind keeps on telling you, you don’t belong here. There are places you must go to and see for yourself, where you fit and if you don’t make a place for yourself. I have always loved Anime series. You get to learn a lot from them.

One of the Characters in the show Nanatsu no Taizai says, if I live long enough, maybe something will happen to me, I am waiting for that something to happen. We long for that something to happen, but it never might. We have very limited time in our hands and cannot wait an eternity for that moment. We have to work towards reaching that moment. We can only wish.

With that wish in my ghost, I will try to find the place where I belong.

Stack Overflow Questions

Leave a comment

Hey Guys!! Howdy!!

These days I have a lot of free time on my hand due to my new assignment at work. I have no work absolutely πŸ˜€

Strangely it came to my mind, I could pass my time at work by answering some SO questions related to tech that I have been working on. Seems like a good idea, right!!

However just going to the website and searching for new questions every 5 odd minutes seems like an overkill and boring. So I am thinking, why shouldn’t I make a small Stack Overflow linked application which would fetch 10 New questions attached to a specific TAG and mail it to me every hour. Let me get on with developing that and ofcourse I will post the code on My Github

Stay Tuned and Stay Happy πŸ˜€

Coursera Courses

Leave a comment

Hey guys!Β  wassup!!

I am free, yeah really free! coz it’s weekend πŸ™‚

So planning to catch up on the coursera courses I have been attending.

Need to complete the 1st week of the rails course aaaanndddd the deadline is tomorrow.

Welcome to Ruby on Rails Web Services and Integration with MongoDB!

So off to studying πŸ™‚ cya later πŸ™‚

 

Older Entries