Eclipse +++ LOG: Entry Corrupt Or Truncated

When developing in Eclipse you might run into this error when using logging. In this case Java while developing for Andorid. “+++ LOG: entry corrupt or truncated” First thing to test is if you’re running First thing to test is if you’re using a variable that might contain to much data. Log.e(“#”, myVar); Try using

Read More

Attaching Files In Email In Android Java

Opening the email application from java can be done like the following: final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE); emailIntent.setType(“plain/text”); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,new String[]{“email”}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, “subject”); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,”Extra”); //has to be an ArrayList ArrayList<Uri> uris = new ArrayList<Uri>(); //convert from paths to Android friendly Parcelable Uri’s for (String file : filePaths) { File fileIn = new File(file); Uri u

Read More

Visual Studio Make Selection Uppercase Or Lowercase

In Microsoft Visual Studio you can make a selected code or text uppercase or lowercase by using choosing: Menu: Edit -> Advanced -> Make Uppercase; Edit -> Advanced -> Make Lowercase Command: Edit.MakeUppercase; Edit.MakeLowercase You can also use the following shortcur: Keyboard: CTRL + SHIFT + U (upper); CTRL + U (lower)  

Linux Setup DNS

Setting up the DNS in Linux can be done in a few steps. sudo cp /etc/resolv.conf /etc/resolv.conf.auto Now edit the dhclient sudo gedit /etc/dhcp3/dhclient.conf Look for the below line, which will be commented, and match this setting. # append the following line to the document prepend domain-name-servers 208.67.222.222,208.67.220.220; sudo ifdown eth0 && sudo ifup eth0

Read More

Linux Add Boot Option In Grub2

You can add boot option for Grub2 for Ubuntu by editing the 40_custom file. sudo gedit /etc/grub.d/40_custom Append the following line menuentry “Ubuntu Mymod” { recordfail insmod ext2 set root='(hd3,1)’ linux /boot/vmlinuz-2.6.32-21-generic-pae root=UUID=c01e7d24-fc8c-4498-86a2-ad0ea8d1d4ec ro quiet splash acpi=off noapic nolapic initrd /boot/initrd.img-2.6.32-21-generic-pae  } Modify for your own use e.g. the set root if it’s located different

Read More

Android SetTextColor From Colors

When setting the colors for e.g. a TextView you can use the settextcolor from either a color or resource. void android.widget.TextView.setTextColor(int color) public void setTextColor (int color) Sets the text color for all the states (normal, selected, focused) to be this color. There are several ways to do this. To set the colors from your resource you

Read More