Skip to main content

Posts

How to enable Linux wifi hotspot for android devices

This is some trouble I faced. When I create a wifi hotspot from my laptop, I couldn't connect my phone to it. Normally it allows when you create an open wifi hotspot, but with a password protected one you can't. This is because Ubuntu based OS's create ad hoc wifi networks, and they are not compatible with connecting to other devices. We can fix this with a simple trick. 1. Create a new wifi connection This is nothing big, most of the Ubuntu based OS's have a GUI to do this via a network icon the top etc. Remember create it as WPA & WPA2 Personal network. This is the type of the network that we're gonna create, and it allows you to set a password for that. 2. Make it accessible to other devices After you creating the wifi network it will create a file in the  /etc/NetworkManager/system-connections/ directory I created mine as mynetwork  so here is the file I got. You might need sudo permission to access that. The file is there, so I just wan...

Back to blogging!

Its been like 3 years after my last blog post. Looking back at those, it seems all the posts are so out dated and some times hilarious lol. Was thinking whether to start a new blog, but end up with thinking i'll be update the same old blog. Hope to keep posting more frequently! will see :) ~TJ

A guide for beginners. How to setup Android SDK?

Setting up the SDK Hi guys, I prepared this pdf some time ago for a workshop at my university. It is only about setting up the Android SDK. You can see step-by-step instructions on how to set up your environment to start developing Android. If you are new to Android then it's really nice for you. I'm too lazy to type a whole new post about it so just download the pdf in the link below. ;) In the document, I've used ADT bundle which includes Android SDK and Eclipse IDE. But you can try it out with Android studio as well. I highly  recommend using Android studio because it is developed from IntelliJ Idea IDE and comes with cool new features. Link to PDF

Taking care of user inputs: Using jFormattedTextFields

When developing an application, it is critical to validate the user inputs. In order to give the right output the right input should be given. But the users don't always provide the right inputs as we expect, the right design should have the ability to deal with all kinds of bizarre inputs that user might give in. One way to handle them is validating the given inputs before we process it. But it is better to limiting the user to type something we don't expect. In Java swing we can use formatted text fields for this task. This is a quick tutorial for jFormattedTextFields using Netbeans. This will be enough to get it done, and I won't go more details on it. Formatted text field is very similar to the simple jTextField but we can set a format that it would only accept as an input. Therefor user will not be able to type anything else other than the given format. First let's look doing that easily using Netbeans IDE. Netbeans provides jFormattedTextField in the...

Day-to-day Programming 3: Rename Files with numbers - part 2

How to rename bunch of files with numbers (with leading zeros)? I mentioned in my earlier post  Day-today Programming 2     about the simple java program to rename files with numbers.  eg:- 1.MP3 2.MP3 3.MP3  ... As I said there were about 200 MP3s. Mom wanted them to play in the numbered order. But when the DVD player plays them after playing 1.MP3 it didn't play 2.MP3 next. It played 10.MP3 instead. That was because it plays them in ascending order.  When it plays in ascending order, after 1, the next one is 10, and the next one is 100. It plays 2.Mp3 after finishing all the tracks that start from digit 1. So I had to write the DVD again. This time I have to rename them in a different way.  If I rename them with leading zeros, it will play them in the order as numbered. eg:- 001.MP3 002.MP3 ... 010.MP3 ... 100.MP3 In order to do that, I changed my previous renaming program a little bit. This might not be the most efficient way...

Day-to-day Programming 2: Rename Files with numbers

How to rename a bunch of files with numbers? From my earlier post-Day-today  Programming 1  I told you how my mom asked me to write her a DVD. Then as I mentioned earlier, I managed to take a printout of the filenames. Now I have to write them into a DVD. But mom asked me to rename the MP3s with numbers. so that she can find the number of the MP3 printed-out document. So I again wrote a simple java program to rename the files with numbers starting from 1. Here is the small program I wrote. //simple java program to rename files with numbers.  import java.io.File; import java.io.IOException; public class Rename2Numbers { public static void main(String[] args) throws IOException { File folder = new File("C:/My Folder"); int i = 1; for(File f : folder.listFiles()){ f.renameTo(new File("C:/My Folder/"+i+".mp3")); i++; } ...

Day-to-day Programming 1: File names into a text file

How to get the names of the files in a specific directory (folder)  to a text file? Today my mother asked me to write some MP3s into a DVD. There were nearly 200 MP3 files. and she also asked me to number them and make a list of file names to print out. I was like o.O how am I going to do that? type all 200 file names into a document? I felt lazy and thought why can't I write a program that will do it for me !. so I wrote a simple program that gets file names and writes them into a text file, so I can print them out. This is the simple program I wrote. It took less than 2 minutes to write it. and saved a considerable amount of time!  ;) 1: import java.io.BufferedWriter; 2: import java.io.File; 3: import java.io.FileWriter; 4: import java.io.IOException; 5: 6: public class FilenamesToTxt { 7: public static void main(String[] args) throws IOException { 8: File folder = new File("C:/My Folder"); 9: BufferedWriter bf ...

How to set a background image to a jFrame?

in Eclipse in NetBeans IDE If you are using Netbeans IDE or windowbuilder in Eclipse to develop Swing GUIs, you might wanted to set background images to jFrames. The easiest way is putting a jLabel to cover whole jFrame and set an image to it. It might be ok Absolute layout but if you are using  something like SpringLayout this will not work. And also there might be problems with re-sizing the jFrame. Instead of that what we are going to do is put a jPanel to cover up the whole jFrame and set a background image to it. in Eclipse WindowBuilder I have already installed WindowBuilder plugin in my Eclipse and created a java project. And I have created a new jFrame form with WindowBuilder. (If you are not familiar with eclipse and windowbuilder please google it and read first) Here is the code for MyFrame class which is automatically created by windowbuilder 1: package org.jframebg; 2: import java.awt.BorderLayout; 3: import java.awt.EventQ...

VLC skins

It's been a while from my first blog post, so today I thought to make a blog post about skins in VLC player. I think you all are familiar with VLC player if not, here's the link for the website www.videolan.org/vlc/index.htm l In brief, VLC player is a free and opensource player that can play almost all the types of media formats. Even though it is a such a nice player, it looks kind of old and rusty, like the windows classic look. But you can make it prettier by just adding some new skins to it.  You can download skins for the player from here http://www.videolan.org/vlc/skins.php Then place the downloaded skin file (.vlt file) in the " skin " folder in the installation directory.           eg:- in windows:    C:\Program Files\VideoLAN\VLC\skins           or in linux systems:  ~/.local/share/vlc/skins Then, open the VLC player and go to the preferences. ...

Searching with Google

This first blog post is going to be about how to search things on Google. No I'm not kidding, I know it sounds like something doesn't worth to write a post, but I thought to write this because I've seen many of my friends type things in Google and struggling to get the results as expected. I hope this will help them to get their Google search results correctly and quickly. Be simple First thing is use simple and web-friendly search queries. As example, say you want find about the benefits of drinking tea. For that you might search like   "what are the benefits of drinking tea?" . But if you search like  "benefits tea" instead, it gives the same sort of results. But it is easier and most of the times it gives more relevant results than typing a complex query. file type If you want to find things in a specific file type, you can specify it like this.   benefits tea filetype:pdf Here it gives results with .pdf files Si...

Hello World!

Hello people! Thank you for visiting my new blog. Finally after all these years here I started blogging. So, I will try to fill this up with some useful posts for my friends :) And this is going to be kinda techy blog with tricks and tips, new things, how to do things etc. And of course related to computer stuff . I have to say that I'm really lazy at reading lengthy texts, so if you don't like to read lengthy posts like me, I'll try my best to write less texts and explain things with pictures and videos more :) And you guys have all the rights to comment your ideas and correct me if I'm wrong, I'll be glad :) thank you!