Services in Android

Services are seprate entity which is being run in background of the app. It have no effect on the front end of the app activity(functionality). • A facility for the application to tell the system about something it wants to be doing in the background (even when the user is not directly interacting with the application).  This corresponds to calls to Context.startService(), which ask the system to schedule work for the service, to be run until the service or someone else explicitly...

Running and Configuring VNC Server on Linux

VNC stands for Virtual Network Computing. It is, in essence, a remote display system which allows you to view a computing 'desktop' environment not only on the machine where it is running, but from anywhere on the Internet and from a wide variety of machine architectures. The VNC system allows you to access the same desktop from a wide variety of platforms.Oracle Enterprise Linux ships with a VNC Server. If you find it is not installed, you can deploy the package thats part of the install...

Parsing XML Files in iOS

Reading XML files is one of the common tasks we perform in our application, In this tutorial let's see how we can use NSXMLParser to parse XML in our iPhone app.Introduction NSXMLParser is a forward only reader or an event driven parser. What it means is, an event is raised whenever the parser comes across a start of an element, value, CDATA and so on. The delegate of NSXMLParser can then implement these events to capture XML data. Some of the events are raised multiple times like the...

Oracle Startup

Starting oracle databaseStarting up Oracle database requires some important detail to note. Failure to follow the proper steps would end up to failed database startup. Remember that we need to login as a user with SYSDBA privileges to startup an Oracle database which would enable us to for example do a – SQL>connect / as sysdba. Here is an example of a DBA connecting to his database and starting the instance: In the above example the database was shutdown so when we logged as sysdba,...

Drag and drop marker on google map

I have markers. I would like to move the marker with a drag and drop-function, and then check the location where we drop that marker. 1.) In this show google map tiles show on screen and zoom at given level. MainActivity.java @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); MapView map = (MapView) findViewById(R.id.map); map.getController().setCenter( getPoint(40.70686417491799, -74.01572942733765));...

Google launched Zopfli to compress data for making webpages load faster

Google launched Zopfli Compression Algorithm, a new open sourced general purpose data compression library.It is a new deflate compatible compressor that was inspired by compression improvements developed originally for the lossless mode of WebP image compression. Being compatible with deflate makes Zopfli's output compatible with zlib. It uses a different and more effective algorithm to compress data that can compress web content about 3-8% smaller compared to zlib at maximum compression....

Table Sorting in HTML by Javascript

This JavaScript code can be used to convert tables in ordinary HTML into sort table ones by associating each title column with an onClick event to automatically sort the data rows. No additional coding is necessary. All you need to do is give your table an ID field, include the sorttable.js file in jsp page and call init in your document's onLoad method. JSP Page Code < %@page contentType="text/html" pageEncoding="UTF-8"%>< !DOCTYPE html>< html> < head> ...

Setting up Password less or Passphrase less SSH/SCP

SSH uses a public key cryptosystem. That means that, among other things, it can present a secret signed with your secret key, which anyone can decrypt with your public key, in order to verify that you are really who you say you are, assuming no one has stolen your private key. There are two main ways of setting up ssh authentication in such a way that you do not have to enter a password or passphrase to log into machines, but without sacrificing security overmuch. You can set up ssh keys...

Scheduling shell Script to check memory usage & automated email notification

1)Create a .sh file [root@ystbckp ~]# vim script_memory.sh 2)Write a the following script in the script_memory.sh file 3)Change the permission to the script_memory.sh file [root@ystbckp ~]# chmod 744 script_memory.sh 4)Scheduling the file to execute on a particular time [root@ystbckp ~]# crontab -e Each entry in a crontab file consists of six fields, specified in the following order Minute hour day month weekday command 05 * * * * sh /root/script_memory.sh When...

Browse existing image or capture new image in android

In this we will learn about how to select exist image in gallery . And In this we will learn about how to capture image from the android device and save into internal memory of android device. In this we do not need external memory or sdcard for capture image. 1.) Intent browsePicture = new Intent(); browsePicture.setType("image/*"); browsePicture.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(browsePicture, "Select Picture"),SELECT_PICTURE);...

Google Visualisation Table Implementation

Google visualisation table provides us such table in which we can easily sort, format table data and make pages in list view. Table cells can be formatted using its different pattern format. Table header row remain fixed and you can easily sort data by click on specific cell of header row. Visualisation table show boolean value in check or uncheck mark and numeric data in format with right aligned. To apply google visualisation table, we have to use following steps: Step 1: Include following...

PPT Macro for Formatting multiple slides

Dear All,Many times we come across situation in which we need to format 100's of slides withing specified amount of time, and doing it manually is really not a smart way thats where macro comes in picture.Below is sample macro I have written for formatting active slides :I hope you know how to run macros ;) else you can always take help from Google!!!!!!Dim myvar As SlideDim myvar1 As ShapeFor Each myvar In ActivePresentation.SlidesFor Each myvar1 In myvar.ShapesWith myvar1.Left = 50.Top = 71.LockAspectRatio...

Dynamic Column width in BI Publisher

Dynamic Column width in BI Publisher This has been a complex task to assign width of column dynamically in BI Publisher. This means number of columns is not fixed and they will come dynamically from XML and we want width of the columns to be distributed equally or in some ratio. Combined width of all columns assigned dynamically will be taken up from the width that we assign to that particular column. If there is only single column coming from XML then it will take up all width. If there...

Sending mail with attachment in JAVA

Sending mail with attachment in JAVA The JavaMail API is a set of abstract APIs that model a mail system. The API provides a platform independent and protocol independent framework to build Java technology based email client applications. The JavaMail API provides facilities for reading and sending email. The package defines classes that are specific to mail systems based on internet standards such as MIME, SMTP, POP3, and IMAP. Jar files required: 1. mail.jar that you can download...

How to take ScreenShot in iOS ?

How to take ScreenShot in iOS ? Sometimes requirement arises in iPhone/iPad app that how we get screenshot of a particular UI part. So this captured screenshot can be sent as attachment to authorities via mail or can be written on to photo library. MyImage Subclass of UIImageWe have to make subclass of UIImage that is MyImage and we are going to implement some extra methods inside it to get screen shot of a particular UI part. so customized MyImage Class code is given below. MyImage.h...

Send Email on Startup and Shutdown Process on Linux Server

Send Email on Startup and Shutdown Process on Linux Server It is always nice to have notification when a server reboots, especially when you are on vacation, away from the office, or just hanging around! In order to send an email on reboot, we can easily create a cron job to run on reboot. This means for a single reboot the Administrator will receive two emails. This solution will not send out an email if the system loses power, however an email will still be sent on reboot. This should...

Control File in DBMS

Control File in DBMS The Control File of the database is a binary file that contains database information such as the database name, data about the database log files and data files, timestamp of database creation, tablespace name, checkpoint information and backup information. Database can't open without a Control file.Getting information of current control file in use: SQL>SHOW PARAMETER control_files;SQL>SELECT * FROM v$controlfile;SQL>SELECT * FROM v$controlfile_record_section;...

Moving ORADATADirectory to another location in Oracle DataBase

Moving ORADATADirectory to another location in Oracle DataBase Database files are stored in ORACLE_BASE\oradata\DB_NAME\ If you want to move the oradata directory to another location or directory then the minimum required steps are as follow Step 1: Creation of tracecopy of the Control fileSQL>ALTER DATABASE BACKUP CONTROLFILE TO TRACE;The Default location of tracecopy is USER DUMP destination. If you want to find the USER DUMP Destination then use the following statementSQL> SHOW...

Virtualization

virtualization: In computing, virtualization means to create a virtual version of a device or resource, such as a server, storage device, network or even an operating system where the framework divides the resource into one or more execution environments. Even something as simple as partitioning a hard drive is considered virtualization because you take one drive and partition it to create two separate hard drives. Devices, applications and human users are able to interact with the virtual...

How To Convert PSD To HTML And CSS For Your Websites

Most designers have the ability to create a professional websites in software’s like Photoshop, but are not able to convert a PSD files to a W3C valid HTML and CSS code that could be optimized for search engines. In order to learn these you can follow PSD to HTML tutorials that are found easily on the internet. By following these you can bring the theory directly into practice. But it seems to be difficult to understand for the beginners. This roadmap will help the beginners to complete the PSD...

Ask Siri to Buy Movie Tickets in iOS 6.1

Ask Siri to Buy Movie Tickets in iOS 6.1 Apple has released Software update -iOS 6.1-which gives you the ability to purchase movie tickets through Fandango using Siri.As for Siri, Apple relentlessly continues to make progress in this technology from the future.In the recent iOS 6.1 release, Apple has empowered Siri with the ability to interface with Fandango.The result is that we are now able to have our faithful assistant find movies, help us purchase our tickets,...

What is customer relationship management (CRM) system?

Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0;...