Thursday, December 18, 2014

Run Hello World Python on Raspberry pi/ Qemu

There are two different ways you can write programs for Python. You can create text files that contain the code, and then run these files with Python, or you can use an Integrated Development Environment (IDE) such as IDLE 3. Either way will result in the code being run in the same way and it's just a matter of personal preference.




If you want to write the programs as text files, you need to use a text editor such as Leafpad. A word processor such as LibreOffice's Writer is unsuitable because the various formatting it uses will confuse Python. As an example, open Leafpad and create a new file that just has the line:

print("Hello World!")

Once you've created your file, just save it with the extension .py; for example testpython.py. You can then run it by opening LXTerminal and navigating to where the file is saved. Then you run python <filename>. You can use the cd command to move to different directories. For example, if you save the file in a folder called programming in your home directory, you could run it by typing the following into LXTerminal:
 
cd programming
python3 testpython.py

 
If everything has worked correctly, you should see the following line appear on the screen:
Hello World!

otherwise just open python shell IDLE 3 and command  print("Hello World!") press Enter you will see the output as 
 Hello World!  
 

Wednesday, December 17, 2014

Set Proxy to Raspberry Pi or Emulator Qemu

In this post I'm going to explain how to connect internet thorough proxy connection because most universities and colleges have the proxy internet connection so these are the steps we need to do to connect internet through Proxy





1. In Raspberry pi there is two Terminals one is user terminal and another one is root terminal in order make connection setting we need to open root terminal
Start Menu --> Accessories --> Root Terminal

2. in the Terminal navigate into the directory apt.conf.d thorough type the command cd /etc/apt/apt.conf.d


















3. Then create and open 10proxy file (actually this file is not exist so we have to create the file) through command nano 10proxy (this is the command for this creating and opening the 10proxy file in Terminal)





















4. Then add the Acquire::HTTP::Proxy "http://username:password@proxy_server_address:port"; line ( you have to add the sentence in bold) and Save it .
( Example :The format is Acquire::HTTP::Proxy "http://username:password@10.0.0.1:8080"; the format is according to you local proxy)

5. Then Close the Terminal . For checking Type sudo apt-get update in terminal . Then you get the internet access in raspberry to download the packages.

to check ip type command ifconfig on terminal

Run Raspberry Pi using Qemu emulater on Windows

There are a few things that make the Raspberry Pi a great device on which to learn programming. Firstly it's cheap. At around a tenth of the price of a low-end PC, it's cheap enough to have in addition to your main computer.Here is the guide to emulate Raspberry pi using Qemu Emulator on our PC.





1. Download Suitable virsion of the the Qemu Emulator and Extract it into the folder
2. Download and place the Qemu kernel in the same directory.
3. Download the Image file for your Raspberry Pi Emulator and Extract it into the same Directory .

Now Your Folder Should be like this in the final view after all editing works
Now the time to start our Emulator so to make easy the work we need to create a .bat file to run Starting command.in your text editor create a new file and type the below command and save it as Raspberry.bat name is optional one and make sure your image file name.
qemu-system-armw.exe -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash" -hda wheezy_raspbian.img



then we need to make some modifications before we boot properly to make this change run the .Bat file as a administrator then only it will allow to modify the files

Type                nano /etc/ld.so.preload
Put a # in front of the first line so that it looks like this:
           #/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so
Now Press ctrl-x then y then enter to save and exit.

Now is the time to run the Emulator to do then open your .bat file and delete the code init=/bin/bash
 its mean
qemu-system-armw.exe -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda wheezy_raspbian.img

Above is the new code to run if you run this code




















when we run the command it will ask the username and password for the pi

Default Username=pi
Default Password=Raspberry

if we type correct username & Password above window will appear in that console type startx this is the command to start the Raspberry pi Emulator




















Yes! we Done our work now Qemu Emulator Running on Windows Machine

Wednesday, October 15, 2014

Tamil Ulaham Android Application

it's a place to read updated news from various news sites without spend much time in searching news


Google Tamil News Collection
www.jaffnamuslim.com
http://www.madawalanews.com
http://www.Tamilmirror.com
http://www.meelparvai.net
http://tamil.oneindia.com
http://www.khaibarthalam.blogspot.com
http://viruvirupu.com
http://newsfirst.lk
http://www.dinamalar.com
http://tamil.thehindu.com
Vikatan_World_News


Tuesday, October 7, 2014

Student Competitions

In order to create interest among students in the fields of programming, technology, robotics etc various competitions are organsied. There is no participation fees so it does not cost you financially to take part. Following are among some of them.





Yarl Geek Challenge

Yarl Geek’s Challenge is an annual premier technology competition open to all youth.The intent of the competition is to nurture IT skills, innovation and creativity, fostering a spirit of entrepreneurship among the entrants. The best and the brightest young minds will be invited to join hands to utilize technology, taking on some of the world’s toughest problems. While competing with their peers, participants will have the opportunity to work alongside industrial practitioners, gain valuable industrial experience, make new friends, expose their abilities to the global IT industry and transform their ideas into reality.




NBQSA

NBQSANational Best Quality ICT Awards (NBQSA formerly National Best Quality Software Awards) organised by the BCS the Chartered Institute for IT - Sri Lanka section is held annually for Tertiarary Student Projects since 2003. This Award is presented to the most innovative ICT software and/or hardware project from students of Institutions of Higher Learning. Any ICT project that is conducted by a student or a group of students who are formally enrolled in an institution of higher-learning, such as college or university, excluding Master and Doctorate programs can take part at NBQSA. Evaluation is conducted in stages, where first round is usually held at the applicant's university and the final round held centrally, mostly at UCSC. Top three student projects are recognised as Gold, Silver and Bronze and are nominated and funded partially or fully to take part at APICTA (Asia Pacific ICT Awards). Most of the final round applicants receive awards (i.e. at least Merit Award).


APICTA

APICTAThe Asia Pacific ICT Awards (APICTA) provide networking and product benchmarking opportunities to ICT innovators and entrepreneurs in the region. The program is designed to stimulate ICT innovation and creativity, promote economic and trade relations, facilitate technology transfer, and offer business matching opportunities via exposure to venture capitalists and investors. APICTA is hosted by one of the member countries. APICTA recognise the Winner of each category. Merit awards are sometimes awarded. Sri Lanka has participated in APCITA since 2003. First APICTA was held in 2001. Winners of NBQSA are nominated to participate at APICTA.


Imagine Cup

Imagine CupImagine Cup is an annual competition sponsored and hosted by Microsoft Corp. which brings together young technologists worldwide to help resolve some of the world's toughest challenges. Imagine Cup has several categories, such as Software Design, Embedded Development, Web Development, Project Hoshimi, IT Challenge, Algorithm, Photography, Short Film, Interface Design.  Winner of the local country event participate at the international event. 2013 local event finals will be held at UCSC.


IEEEXtreme

IEEEXtremeIEEEXtreme is a global challenge in which teams of IEEE student members – supported by an IEEE Student Branch, advised and proctored by an IEEE member – compete in a 24-hour time span against each other to solve a set of programming problems.
UCSC students first took part at this competition in 2011 (IEEEXtreme 5.0). It was a learning process for them where the top team was placed 39th in the country, 77 in the R10 region and 216 world wide.


Google Summer Code

Google Summer CodeGoogle Summer of Code is a global program that offers post-secondary student developers ages 18 and older stipends to write code for various open source software projects. We have worked with open source, free software, and technology-related groups to identify and fund projects over a three month period. 2011 was the first instance of participation.


e-Swabhimani - National Best e-Content Award

e-SwabhimaniThe e-Swabhimani is an initiative of the Information Communication technology agency of Sri Lanka aimed at recognizing excellence in digital content creation. It is expected that this national award would stimulate a greater interest in the development of a wide range of content and services that would serve the needs of society. The e-Swabhimani was launched in 2009. The e-Swabhimani Award process is being conducted along the lines of the World Summit Award and has input from the Digital Empowerment Foundation if India as the Knowledge Partner to ensure that the jury process conforms to international standards. The award is a stepping stone to other regional and international awards with all short listed submissions being nominated to the Manthan Award South Asia.

Manthan Award

Manthan Summer Code
The Manthan Awards are granted for projects that aim at raising the standard of life of people,especially the rural masses by the use of Information and Communication Technology. The Award is an initiative of the Digital Empowerment Foundation with strategic support from the Department of Information Technology, Government of India and the World Summit Award Austria. With effect from 2008 the Manthan Award was extended to other countries in the region and is now the Manthan Award South Asia.
The Award recognizes the best e-Content for Development and this year applications were invited from e-Content innovators, practitioners and creators across South Asian Countries. Individual participants, organizations as well as individuals seconding nominations for grassroots practitioners from countries in the region were also invited to apply. The requirement was that they be engaged in pioneering work in developing, creating and disseminating digital content, be it online or offline, for grassroots empowerment and development in daily life.The theme of this year’s Manthan Awards was the use of electronic media content for Development in South East Asia. This year greater emphasis was laid on projects that apply information communication technology to raise the standard of life rural people. Sri Lanka participants are nominated by the ICT Agency of Sri Lanka (ICTA) from among the e-Swabhimani winners.

mBillionth Award

mBillionth Award
The mBillionth Award is a dedicated platform to explore the latent potential of mobile & telecom sector across 8 countries in South Asia.
 



World Summit Award mobile

WSA-MThe World Summit Award (WSA) is a global activity to select and promote the world's best e-Content and most innovative ICT applications. It offers a worldwide platform for all who value the creative use of ICTs and who are committed to making today’s information society more inclusive. The World Summit Award Mobile first took placed in 2010 to honour excellence in m-Content and innovative application creation. The Grand Jury selects 40 winners of the eight WSA-mobile categories. WSA was started as an initiative by the Republic of Austria as a contribution to the United Nations World Summit on Information Society (WSIS)  and is  organised by the International Center for New Media (ICNM) in Salzburg.


Inter University Innovations Championship

Inter University Innovations ChampionshipThis competition is held since in 2010 and is organized by SLASSCOM and Motorola Solutions. It involves training programmes conducted by the staff of the Motorola Solutions and runs over a period of 6-7 months. Competition focus on building human resource capacity in Mobile Technologies; develop entrepreneurial skills; and promote innovation among students by exposing their innovative and creative skills.

Thursday, September 18, 2014

Freelancer Android Level 1 Exam quiz and Answers

i don't know whether it's wrong or right but i'm passed in the exam i have more then 180 quiz with answers but here i'm posting only 40 quiz with the answers. i will slowly update this post with quiz ans answers

Question 1 / 40
Android architecture is comprised of _________.
  • applications, application framework, libraries, Android runtime, Linux kernel
  • applications, telephony manager, libraries, Android runtime
  • applications, telephony manager, libraries, Linux kernel
  • applications, libraries, library framework, Android runtime, Linux kernel
  • telephony manager, libraries, Android runtime, Linux kernelc
Question 2 / 40
What is the name of the Java Virtual machine in Android?
  • Juke Virtual Machine
  • Parrot Virtual Machine
  • .NET Framework
  • Dalvik
  • Forth Virtual Machine
Question 3 / 40
Intent data structure is comprised of___________________.
  • resource data
  • manifest files
  • an action and data to act upon
  • AppWidget files
  • View Groups
Question 4 / 40
What does an Intent filter do?
  • describes Intent tasks
  • describes Intent multitasking capability
  • filters Intent activities
  • describes intent capability of an activity
  • filters crashed applications
Question 5 / 40
A Service _________________.
  • keeps running without the User interface
  • can run only when the User interface is active
  • None of these.
  • is used to handle incoming phone calls
  • is used to create user interface
Question 6 / 40
What are Android Events?
  • An Event is the opening of the User interface
  • None of these
  • Events are external activities
  • Events are resource of mobile device
  • Events are actions taken by the OS
Question 7 / 40
ViewGroups are ____________________.
  • an object of class android.view.Viewgroup
  • A class of View objects
  • a group of open UI windows
  • an object defined in AndroidManifest.xml
  • an object of class android.view.View
Question 8 / 40
How do you create a handle for a screen element?
  • call Activity.findViewById
  • Create a ListAdapter object
  • Give the ListAdapter to your ListView object.
  • use android.test
  • Create a Handler object in your UI thread
Question 9 / 40
An empty process does not have ______________________.
  • any resources.
  • active services.
  • active processes.
  • active application components
  • any memory allocated.
Question 10 / 40
What is an AVD?
  • A development environment.
  • A configuration that helps developing device drivers.
  • A configuration that runs Android applications.
  • A Graphical interface to create User interfaces
  • A configuration that specifies the Android platform to be used on the emulator
Question 11 / 40
Intent-based calls are usually bound at_________.
  • runtime
  • compile time and runtime
  • invocation
  • parse time
  • link time

Question 12 / 40
This is called every time an App Widget is deleted from the App Widget host:
  • onDisabled(Context)
  • onDeleted(Context, int[])
  • onReceive(Context, Intent)
  • onEnabled(Context)
  • onUpdate

Question 13 / 40
Styles, strings and arrays are placed in _______________.
  • /res/layout
  • /res/strings
  • /res/arrays
  • /res/styles
  • /res/values

Question 14 / 40
Dalvik VM is part of ____________________.
  • Core Libraries
  • Libraries
  • Application
  • kernel
  • Android Runtime

Question 15 / 40
Content providers are part of________________________.
  • Applications
  • Core libraries
  • Application Framework
  • kernel
  • libraries

Question 16 / 40
What is R.java?
  • an auto-generated file indexing all the ViewGroups of your project
  • an auto-generated file indexing all the Activities of your project
  • an file which gives information on the resources available
  • an auto-generated file indexing all the Services of your project
  • an auto-generated file indexing all the resources of your project

Question 17 / 40
A RemoteView object cannot support the following layout class: __________.
  • Viewlayout
  • LinearLayout
  • RelativeLayout
  • FrameLayout
  • All of these.

Question 18 / 40
What is Compound Button class?
  • specifies a button for switching mobile ON/OFF
  • None of these.
  • Specifies a button with 2 states: checked and unchecked
  • specifies a button with multiple functions
  • specifies Qwerty keyboard

Question 19 / 40
A view hierarchy is placed within an activity’s window by the _____________ method.
  • onCreate()
  • Activity.setServiceView()
  • Activity.setView()
  • android.app.Activity
  • Activity.setContentView()

Question 20 / 40
What does ‘+’ signify in android:id=”@+id/my_button”?
  • A new resource name.
  • A new resource name that must be created and added to resources.
  • The XML parser should parse the rest of the ID string.
  • A new Activity.
  • A new View resource.
Question 21 / 40
Which of the following is the immediate base class for Activity and Service classes?
  • ApplicationContext
  • Component
  • Object
  • Application
  • Context

Question 22 / 40
Which of the following would you have to include in your project to use the SimpleAdapter
class?
  • import android.widget;
  • import android.database;
  • import android.util;
  • import android.content;
  • import android.database.sqlite;

Question 23 / 40
Which of the following would you have to include in your project to use the APIs and classes
  • required to access the camera on the mobile device?
  • import android.drivers;
  • import android.hardware.camera;
  • import android.util;
  • import android.camera;
  • import android.hardware;

Question 24 / 40
Which of the following can you use to display a progress bar in an Android application?
  • ProgressItem
  • ProgressView
  • ProgressBar
  • requestWindowFeature
  • ProgressDialog

Question 25 / 40
What is Context used for?
  • To load UI
  • To load and access resources
  • To load and access Services
  • To load and access Activities
  • To load and access Layouts

Question 26 / 40
What does getApplicationContext() do?
  • Returns the path of the directory holding application cache files of the current process.
  • Returns the context of the Activity of the current process.
  • Returns the full application info for this context’s package.
  • Returns the context of the single, global Application object of the current process.
  • Returns an AssetManager

Question 27 / 40
setLevel specifies the level of __________.
  • Drawable.callback
  • Drawable
  • color
  • Image
  • Bitmap

Question 28 / 40
What is InputMethod ?
  • An interface which defines the method for data entry.
  • An interface which handles the UI interface.
  • An interface which handles keyboard input.
  • An interface which generates key events and text, while handling input events and sending text back to the application which requested text input.
  • An Interface which generates email data, while handling input events and sending it back
  • to the application which requested it.

Question 29 / 40
How do you save any unsaved data and release resources being used by an Android
application?
  • Activity.onDestroy()
  • Activity.onStop()
  • Activity.onPause()
  • Activity.onShutdown()
  • Activity.onFreeze()

Question 30 / 40
Which of the following can save the data of an Android application?
  • Activity.onFinish()
  • Activity.onStop()
  • Activity.onDestroy()
  • Activity.onPause()
  • Activity.onFreeze()
Question 31 / 40
What does this code snippet do?
menu.add(0, MENU_QUIT, 0, “Quit”).setIcon(R.drawable.menu_quit_icon)?
  • Adds an icon to Icon menu items
  • quits the Menu
  • Adds menu items
  • draws icon items
  • defines a Menu layout

Question 32 / 40
Define a Dialog.
  • a small TextBox.
  • a dropdown menu
  • a small window that appears in front of the current Activity.
  • a small window that appears in the user interface.
  • a small checkbox.

Question 33 / 40
Which API is directly related to touch mode?
  • View.TouchMode
  • View.app.Touch()
  • View.isInTouchMode()
  • View.TouchMode()
  • android.app.Touch()

Question 34 / 40
How a service can be stopped?
  • By calling its shutdown() method
  • By calling its finish() method
  • By calling finishService() method
  • By calling its stop() method
  • By calling its stopSelf() method

Question 35 / 40
What is the NotesDbAdapter Class?
  • adapts notes to a database
  • allows the user to creates notes
  • None of these.
  • provides a text editor
  • encapsulates data access to a SQLite database that will store notes data and facilitates to update it.

Question 36 / 40
How can a Service stop itself?
  • by calling Service.stopSelf()
  • by calling Context.stopService()
  • by calling StopSelf.Service()
  • by calling Destroy()
  • by calling StopService()

Question 37 / 40
When we want a result to be returned by a child activity, which method is used?
  • startActivity.Return()
  • startActivityForResult()
  • ActivityForResult()
  • startActivity.Result()
  • getResult.Activity()

Question 38 / 40
What does this code snippet do?
Intent callNumber = new Intent();
callNumber.setAction(android.content.Intent.ACTION_CALL);
callNumber.setData(Uri.parse(“tel:9873719580″));
startActivity(callNumber);
?
  • stores number 9873719580
  • calls number 9873719580
  • Any of these
  • searches number 9873719580
  • deletes number 9873719580 from memory

Question 39 / 40
TimePickerDialog allows user to ___________________.
  • select a time
  • set date
  • set date and time
  • set time
  • select a date

Question 40 / 40
Which of the following is used to handle commands from menu items in an application?
  • onMenuItem
  • onMenuItemSelected
  • onMenuItemClicked
  • onOptionsItemSelected
  • CommandAction

Thank you for using our service.