Kayıtlar

Mart, 2012 tarihine ait yayınlar gösteriliyor

Visual separator in RelativeView

So far , i have tried to add separator inside the TableLayout using the below code: <View android:id ="@+id/view_separator" android:background ="#FFFFFF" android:layout_centerVertical ="true" android:layout_width = "fill_parent" android:layout_height ="2dip" android:layout_alignParentTop ="true"/>   It may helps you, just try it.

End the ellipse problem with TextViews

In the android mobile development, If you want to ellipsize, simply use android:singleLine="true" , or android:ellipsize="end" .

How to Fix Memory Leaks in Java

What Are Memory Leaks? Let’s start by describing how memory leaks happen in Java. Java implements automatic garbage collection (GC), and once you stop using an object you can depend on the garbage collector to collect it. While additional details of the collection process are important when tuning GC performance, for the sole purpose of fixing a memory leak we can safely ignore them. Is My Program Leaking Memory? Not every OutOfMemoryError alert indicates that a program is suffering from a memory leak. Some programs simply need more memory to run. In other words, some OutOfMemoryError alerts are caused by the load, not by the passage of time, and as a result they indicate the need for more memory in a program rather than a memory leak. To distinguish between a memory leak and an application that simply needs more memory, we need to look at the “peak load” concept. When program has just started no users have yet used it, and as a result it typically needs much less m...

How to Check Memory Usage in Linux based Server

free free command displays amount of total, free and used physical memory (RAM) in the system, as well as shoing information on shared memory, buffers, cached memory and swap space used by the Linux kernel. Syntax of free free -[options] usage: free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]   -b,-k,-m,-g show output in bytes, KB, MB, or GB   -l show detailed low and high memory statistics   -o use old format (no -/+buffers/cache line)   -t display total for RAM + swap   -s update every [delay] seconds   -c update [count] times   -V display version information and exit Example usage of free free -m The command will display information about physical memory in MB.

Creating a memory leak with Java

Here's a good way to create a true memory leak (objects inaccessible by running code but still stored in memory) in pure Java: The application creates a long-running thread (or use a thread pool to leak even faster). The thread loads a class via an (optionally custom) ClassLoader. The class allocates a large chunk of memory (e.g. new byte[1000000] ), stores a strong reference to it in a static field, and then stores a reference to itself in a ThreadLocal. Allocating the extra memory is optional (leaking the Class instance is enough), but it will make the leak work that much faster. The thread clears all references to the custom class or the ClassLoader it was loaded from. Repeat. This works because the ThreadLocal keeps a reference to the object, which keeps a reference to its Class, which in turn keeps a reference to its ClassLoader. The ClassLoader, in turn, keeps a reference to all the Classes it has loaded. It gets worse because in many JVM implementations...

10 Points about Java Heap Space

10 Points about Java Heap Space 1. Java Heap Memory is part of Memory allocated to JVM by Operating System. 2. Whenever we create objects they are created inside Heap in Java. 3. Java Heap space is divided into three regions or generation for sake of garbage collection called New Generation, Old or tenured Generation or Perm Space. 4. You can increase or change size of Java Heap space by using JVM command line option -Xms, -Xmx and -Xmn. don't forget to add word "M" or "G" after specifying size to indicate Mega or Giga. for example you can set java heap size to 258MB by executing following command java -Xmx256m HelloWord. 5. You can use either JConsole or Runtime.maxMemory(), Runtime.totalMemory(), Runtime.freeMemory() to query about Heap size programmatic in Java. 6. You can use command "jmap" to take Heap dump in Java and "jhat" to analyze that heap dump. 7. Java Heap space is different than Stack wh...

Installation Oracle 11.10 g on Ubuntu

I tried several times to install Oracle from handbook ,youtube, oracle web sites, forums and so on.. however this is not possible because Ubuntu Linux is not certificated for Oracle 11.10 g ,you have to install lots of package and also you change some important hardware configuration.

Backup iPhone Notes

Doubtlessly the simplest way to backup iPhone notes is to send them to yourself by email Start by setting up your email account on your iPhone ( shown here with Gmail ) Make sure your iPhone is properly connected to the Internet through Wi-Fi or mobile phone network Tap Mail Then tap Gmail Your name is optional, but enter at least your email address and password and tap "Save" Now, back to the iPhone main screen Tap Notes Open one of your Notes At the bottom of your display, tap the Envelope Tap your email address in the "To" field Edit the Subject if required Click "Send" and Voila ! Your Note will show up in your Gmail account within a couple of seconds !

Sync iPhone Notes

If you really want to "synchronize" iPhone Notes, your best bet is to use Google Sync Just follow our Sync iPhone Contacts with Gmail Guide and make sure "Notes" is switched on when you select the Google services you wish to sync Notes & possible issues Syncing iPhone notes requires Apple's iOS 4.x firmware ( iPhone OS 4.x ) This allows you to Sync your iPhone Notes with Gmail. They will show up in Gmail with the "Notes" label This solution allows to Copy Notes from one iPhone to another, which is very handy if you need to Transfer Notes from your current iPhone to a new iPhone

How to edit notes in icloud mail

To create a note: 1. Create a new email message. 2. Save it as a draft. 3. Move the message to Notes folder. To edit or delete an existing note: 1. Move the note from Notes folder to Drafts folder. 2. Do what you need 3. If you want to keep the info - save it and move it back to Notes folder. I wish Apple at least automated this process :)