Why Open Source

Open Source is not a concept, it's thought process.

Keep Watching this Space

This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Keep Watching this Space

This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Blog for open Source lovers

We live in a World of Technology and that tecnoglogy is for All to explore and understand. Period. !!

Tuesday, August 1, 2017

How to add Prefix to Every Field with Notepad ++

If your System doesn't support heavy applications or editors which are required for data editing or development purposes then the next best thing after notepad is notepad ++. It contains pretty cool features and one of them is adding/appending similar data to front of string in every row.  This is best show via example.

So let's say you have a file with numbers and you want to separate numbers with inverted commas like ' ' or let's say by ' , ' , then we can do it in following way.



Select the numbers and then Select "Replace" or Ctrl + H.

Now make sure that the radio button with option "Regular Expression" is selected.

Now put ' ^ ' in the text box with "Find what" option.



And put character name you want to replace it with in "Replace with" text box option, which is " ' " in our case.

Now Click on "Replace All" options and Bingo !! You are done. " ' " character is added in front of every string.  You can use this method to replace it with any string.



Also in similar fashion, if you want to append any character or string in the end of every row, you can also do that in similar way. Instead of  ' ^ ' in the "Find what" option put ' $ ' and click "Replace All" and you will get the results as below. 



Cheers !! 

Monday, February 20, 2017

Beginning Android Development - Must Not Undeclare Prefix

Usually when we start with some development activities, especially for new developers, there are many common errors which we face. They are usually not big issues but they become roadblock for new developers and hence de-motivates them to start development. 

However, if we see the brighter side, they help us in learning system better and troubleshooting them helps us in understanding tool quickly.

One of the most common error users face while starting with Android Application Development with Android Studio is: 

Error:(2) Error parsing XML: must not undeclare prefix


If you see on other websites and blogs, it has been suggested to add below line or make sure you have below lines:

xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"

However, there are chances that above lines are already there and if you look at the exception or error message closely, you will see that it talks about some prefix which is not declared, so try to look for undeclared prefix and remove it. For eg. it could be like:



xmlns:app2="" 
Try removing it and any other similar undeclared prefix and then compile it. You should be able to move ahead and the program should compile.

Cheers !!

Please leave your comments if more solutions are found and if this has been helpful.

Monday, November 28, 2016

Print All Prime Numbers between 1-500 Using Java

Prime numbers are those numbers which do not have any factor except themselves. So any number which can't be divided by any other number except itself is a Prime Number. So, how do we identify Prime Numbers ? There are many ways to do so but as usual we'll go with the simplest and the easiest one. We are going to print all the prime numbers between 1 to 500. So how do we do it. Below is the code.



This is how it works. 

We just need to check the reminder of  the n/2 ( where n is the number under test) by all the numbers before that and if they leave the remainder as 0 that means the number is not prime. 

For example if the number under test is 19, so dividing 19/2=9.5 and if we keep dividing 9.5 by all the numbers from 2 to 9, there is always a remainder and hence the number is Prime. 

So using the for loop we are doing this check for all the numbers from 1 to 500. So any number which leaves a remainder is prime and the one which doesn't is not a Prime. 

Try it yourself. Also try to find more easier methods is you feel are better and faster, do share them.

Cheers !!

Tuesday, November 22, 2016

How to find Even and Odd Number using Java

Although identifying a number as even or odd it's one of the easiest thing to do. However, just for the sake of knowledge and it's implementation with Java is our prime goal here and hence this post. The logic is simple. Any number which when divided by two leaves no remainder is considered as even and the number which leaves a remainder is odd. This is how we implement it using Java.


This Program is self explanatory and implemented in most easiest way. Please go through it and try implementing with your own logic also. We are using the Scanner java object to ask for user inputs continuously to check if the number is even or odd and until user enters 0 which will break the while loop and program exits.

Monday, November 7, 2016

How to Design Pyramid using Java

As as Beginner in Java Programming field, one try to be creative in playing with for Loops or If Else or While type of conditional statements. And this is where pattern printing programs comes handy. They help us in understanding loops and other java conditional statements in a better way. So more creative you are, more will be your programming skills and there is a good chance to quickly master them. Think of all the wild patterns you want to see and use your programming skills to design them with Java programming. 

One such pattern is Pyramid. It's easy and it really helps in understanding loops and it use on the basic java conditional (for loop) statement. This is what we are planning to print:

And this is how the code will be. Please note there are multiple and many better ways to print the pattern, and this is the basic one:


We have pasted the image of the code and not the exact code because we want you to write the code/program your-self rather then just copy paste. Programming is an art and you will be better at it only when you do it your-self. Still if you want the code to be delivered to your email then please leave your comments below or email at planetopensrc@gmail.com and we will send the code file to you. Also please try to print the pattern using your own code. As we said it earlier, there are many ways to do it better and quicker. So let's try Them.

Cheers !!

Wednesday, July 15, 2015

Learn Basic Linux Quiz : Part 1




Linux Basic learner quiz covers questions which focuses on improving basic knowledge in open source areas. These are useful for both new and experienced Linux learners. This blog is first in the series and more questions will be shared. you can subscribe to the blog if you want questions directly on mail. Each Question has only one correct answer and explanations are provided along with that. If you see any issues in the questions, please drop a mail to planetopensrc@gmail.com or leave a comment below.

Enjoy the Quiz and do leave your feedback.


Basic Quiz








Tuesday, July 14, 2015

Why Open Source

Most of us have heard about the word "Open Source" but not everyone understands it completely. Let’s start with this. You brought yourself a pair of Shoes worth 500 Dollars from a shop. Felt great? You must be after all you got the coolest stuff in the town. Now you wore it on your girlfriend birthday or on some party who loves your sporty look and appreciate the brand you are wearing. Then what happened is you got stumble upon something and the front sole has come out. Now what to do. It’s simple. Hardly spend 15 to 20 Dollars and get it repaired from any cobbler in the town.

But here is the catch now. What if you have a restriction that you can get it repaired only from that branded shop from which you have brought those shoes with no less then  100 dollars. Doesn't make sense. You have got the shoes, you paid for it. So they are yours now.

Why they are suppose to impose such a thing on you.

Well, my dear friends the proprietary software companies are doing the same thing. Once we have brought the software its our choice to do what ever we want to do with that. Then why we have to always go back to them in case of any update, patch or any single error solution. Answer is: we don't have the source code.

But if we see through open mind then we should be given the source code, may be at a higher price with the software we are buying, so that we can get it to any concerned person who can modify, customize, update in the way we want it. We can go back to the maker company by our own choice if we feel that they are giving us the best solution at the best price. But i am sorry they are not doing that. That’s why we are taken for granted.

The whole creativity, innovation dies there as few minds work to find the solution. But what if we have the most beautiful minds of this world working on that. Then you can always get the best solution. The solution of your choice at your price. Even you can modify it by your own. The concept of Open Source can change the face of the world we are living in.

And this World will be a more creative and beautiful place.