Monday, October 24, 2011

ADB Android Driver

  1. Plug the device into a USB port of your computer. Windows informs you that it cannot find the driver.

  2. Using the Windows Device Manager, open the Details tab of the device properties.

  3. Select the Hardware IDs property to view the hardware ID.

  4. Open android_winusb.inf in a text editor. Find android_winusb.inf at the following location:

    C:\IBM\android\android-sdk_r05-windows\android-sdk-windows\usb_driver\android_winusb.inf
  5. Note the listings in the file that apply to your architecture, either [Google.NTx86] or [Google.NTamd64]. The listings contain a descriptive comment and one or more lines with the hardware ID, as shown here:

    . . .  [Google.NTx86]  ; HTC Dream  %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01  . . . 
  6. Copy and paste a comment and hardware listing. For the device driver you want to add, edit the listing as follows:

    1. For the comment, specify the name of the device.

    2. Replace the hardware ID with the hardware ID identified in Step 3 above.

    For example:

    . . .  [Google.NTx86]  ; NEW ANDROID DEVICE  %CompositeAdbInterface%     = USB_Install, NEW HARDWARE ID  . . .

example, Motorola Droid Bionic
; Motorola Droid Bionic
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_42F7
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_42F7&MI_01
;
; Motorola Droid Bionic2
%SingleAdbInterface% = USB_Install, USB\VID_22B&PID_42F7&REV_0216
%CompositeAdbInterface% = USB_Install, USB\VID_22B&PID_42F7&REV_0216&MI_01

Tuesday, September 6, 2011

Dojo Build error [exec] release: ********** Not Copied: ../../dojo/

If you see this:

[exec] release: ********** Not Copied: ../../dojo/widgetname

make sure custom-dojo-build.xml has an entry to copy over the widget:



Tuesday, December 14, 2010

WebSphere Role Override


The other day I was having issues with my WebSphere security role definitions. It didn't matter what I did or how I updated the WebSphere role mappings, it wouldn't let my authorized user access some protected resources. I tried setting the special mapping to ALl_AUTHENTICATED, I mapped 3 different groups that I knew the user was in, and then I even added the user to the role. No luck. Turns out the problem was fixed by looking at my ibm-applicatoin-bnd.xml file. If that file even references the security-role it will fail and no overriding on the websphere admin console will work. Removing that reference and all my mapping worked perfectly.


Monday, July 12, 2010

Friday, July 2, 2010

Android Setting TextColor

You can't do something like this:

inststatus.setTextColor(R.color.white);

instead do:

inststatus.setTextColor(getResources().getColor(R.color.white);

Wednesday, June 30, 2010

Java Dynamically adding Android Views android:Layout_toRightOf

I found this post really useful today:
http://stackoverflow.com/questions/2305395/laying-out-views-in-relativelayout-programmatically

ex.
RelativeLayout layout = new RelativeLayout(this);
TextView tv1 = new TextView(this);
tv1
.setText("A");
tv1.setId(23);

TextView tv2 = new TextView(this);
tv2
.setText("B");
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.FILL_PARENT);
lp
.addRule(RelativeLayout.RIGHT_OF, tv1.getId());

layout
.addView(tv1);
layout
.addView(tv2, lp);



******
you need to provide id's to your child views: tv1.setId(1); tv2.setId(2); Parent views do not automatically assign child views an Id, and the default value for an Id is NO_ID. Id's don't have to be unique in a view hiearchy - so 1, 2, 3, etc are all fine values to use - and you must use them for relative anchoring to work in RelativeLayout

Tuesday, May 18, 2010

Android screen capture

I found out how to use Eclipse to grab a screen capture of my android device. REALLY cool. No market app necessary.

  1. Connect your phone to your computer
  2. Open Eclipse
  3. Click on the DDMS Perspective
  4. Look at the Devices view
  5. Click on your phone
  6. Use the Menu Icon to Select > Screen Capture.


  7. You'll see something like this:



  8. Save your screen capture

Friday, May 14, 2010

Android custom buttons

http://stackoverflow.com/questions/1521640/standard-android-button-with-a-different-color


Put something like the following code in a file named custom_button.xml and then set background="@drawable/custom_button" in your button view:
xml version="1.0" encoding="utf-8"?>


xmlns:android="http://schemas.android.com/apk/res/android">

android:state_pressed="true" >


android:startColor="@color/yellow1"
android:endColor="@color/yellow2"
android:angle="270" />

android:width="3dp"
color="@color/grey05" />

android:radius="3dp" />

android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />



android:state_focused="true" >


android:endColor="@color/orange4"
android:startColor="@color/orange5"
android:angle="270" />

android:width="3dp"
color="@color/grey05" />

android:radius="3dp" />

android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />






android:endColor="@color/blue2"
android:startColor="@color/blue25"
android:angle="270" />

android:width="3dp"
color="@color/grey05" />

android:radius="3dp" />

android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />



Thursday, May 13, 2010

How to Add a repeating background graphic on an Android Application

This took me a little to find the right resource to make this happen. So here it is:

http://android-developers.blogspot.com/2009/03/window-backgrounds-ui-speed.html

The author shows how to add a style for a repeating background towards the end. The style isn't picked up immediately using the Eclipse xml editor but once the application starts it's there.

Monday, May 10, 2010

Associating a Private Key using Android ConnectBot

https://isa.its.yale.edu/confluence/display/UNIXSYSPUB/Android+SSH+App+-+ConnectBot

Adding your OpenSSH Private Key

Connect your droid to your pc via USB. Copy over your ssh private key, and you can use ConnectBot's "Manage Pubkeys" tool to import it. I tried it with an OpenSSH private key, and it worked flawlessly. Importing a SSH.com key is possible, using PuTTY's keygen tool to convert the private key first.

Setting Up A Connection

Once you have your private key in ConnectBot, you can set up a connection. You can edit that connection once you've created it by long-tapping the host listing and choosing "Edit Host". When you edit the host, you can associate a private key with it, set the SSH Agent Forwarding to on, and change the font size (VITAL -- I find font size 16 to be very readable...size 10 not so much.)

Saturday, May 8, 2010

Eclipse Debug with HTC Incredible Droid

I just got my new HTC Incredible phone yesterday and wanted to test some local android applications on it. The Incredible is so new that the standard usb device installer recommended by the android dev website isn't enough to get started. I found this blog post from someone who figured it out and sure enough, my incredible was recognized after following his steps.

Thursday, May 6, 2010

Android - Writing to the log file

Very simple.

Add a log such as this:
Log.i("Main","Starting the IBM Cloudroid application");

This first string is the "tag" you want to give your log message. And the second string is your message.

To view the log, start you application, in Eclipse is switch to the DDMS perspective








to see the LogCat view:



Wednesday, May 5, 2010

Android - Opening a new "window" activity

I'm playing around with some android development for work and found this post helpful as a newbee.


Basically all you have to do is:

1. Add the following to your AndroidManifest.xml file:

2. Create the NewActivity class

3. On the button press or whenever you want to see the new activity launched call something like this:

Intent i = new Intent(MainActivity.this, NewActivity.class);
startActivity(i);

That's it!!

Wednesday, March 24, 2010

Javascript Operating System version check

A number of ways to do it. This article mentions a few of them:

Example,
to check for Linux you could do something like this:

var isLinux = (navigator.platform.indexOf("Linux")!=-1);

Monday, September 14, 2009

CSS Wrap a long word to fit container

Today I had to do some searching to find a solution for an internationalization problem. I had a div with a fixed width of 140px and wanted to ensure the text fit inside this div and automatically wrapped. In order to do that I had to find the right css. At first I thought using white-space: pre-wrap would work. However, the problem with that is it only wraps between spaces. So:

this is a
long area
with a
forced
wrap

would look okay. But the following would not wrap and would overflow into the other divs:

thisisalongareawithaforcedwrap

In order to fix that (I was doing it for internationalization purposes) I used this:

word-wrap: break-word;Worked like a charm!!

Sunday, August 16, 2009

Our Favorite Tweets of the Week Aug 9-Aug 15, 2009

Our Favorite Tweets of the Week Aug 9-Aug 15, 2009: "

Every week we tweet a lot of interesting stuff highlighting great content that we find on the web that can be of interest to web designers.


The best way to keep track of our tweets is simply to follow us on Twitter, however, in case you missed some here’s a quick and useful compilation of the best tweets that we sent out this past week.


Note that this is only a very small selection of the links that we tweeted about, so don’t miss out.


To keep up to date with all the cool links, simply follow us @DesignerDepot



12 Unusual and Creative Alarm Clocks: http://bit.ly/vHJtI





10 Most Downloaded Wordpress Plugins of All Time: http://bit.ly/LoDhO





Most Stunning Twitter Visualizations: http://bit.ly/nYv66





Beautiful Email Newsletters: http://bit.ly/dJK4





Unique point of view: http://bit.ly/3TpT9





10 Productivity Tips for Web Designers and Developers: http://bit.ly/45PRLo





Colorful Reflections: http://bit.ly/JTNGT





Living upside down: http://bit.ly/GRIVu





Interview with Rob Janoff, designer of the Apple logo: http://bit.ly/1WKZGf





10 Ways to Archive Your Tweets: http://bit.ly/jyiQv





Funky bathroom: http://bit.ly/11MpLb





8 Web Usability and Best Practices for Beginners: http://bit.ly/ZV7Ti





Sleeping on a burger: http://bit.ly/9rxBv





Photo crasher: http://bit.ly/JQ5gi





Gorgeous Magic Made Out of Street Lights and Bugs: http://bit.ly/173dCO







Similar Advertising Concepts and Campaigns: http://bit.ly/aUmma





15 Stunning Examples of Data Visualization: http://bit.ly/9od6Z





Organic Eco Logos: http://bit.ly/nDTVF





30+ Fantastic HDR Photos by Grey Jones: http://bit.ly/2pdL8F





10 More Typography Mistakes You Might Be Making: http://bit.ly/dmfeM





25+ Astonishing Examples of Creative Photoshopped Ads: http://bit.ly/brwbi





Five Minute Upgrade – Writing Blog Post Titles That Grab Attention: http://bit.ly/bwfnU





Watermelon Twitter Logo: http://bit.ly/H451J (it’s cool and everything, but who actually has the time to do these things?!)





The “Pros” and Cons of Spec Work: http://bit.ly/AhIbZ





You’re gonna love this one: The places where the top Internet businesses got started: http://bit.ly/kKMmT





The roof is looking at you: http://bit.ly/hVuch





Discovering Papervision3D: Best Design Practices and Tutorials: http://bit.ly/26kFU0





Internet high five (you know you want to.. just do it!) http://bit.ly/XmSNI





20+ Sites Using Amazing Lighting Effects: http://bit.ly/qHB5r





20 Great Designs using Black & White: http://bit.ly/INrD0





Hungry for more? No problem! Keep track of all our tweets by following us @DesignerDepot









If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: B5au6K

"

Saturday, May 9, 2009

Prezi.com An Alternative to Powerpoint

Check it out... unbelievable sweet!

http://prezi.com

Jing Screen Capture

One of my University of Texas MSTC fellow students seems to know about a ton of really cool websites. I thought I knew some of the latest but apparently I know nothing. ;)

This one is amazing:
http://www.jingproject.com/download/pc/

It's a free screen capture tool that can also capture video.

Thursday, February 26, 2009

TinyMCE java spellchecker

I was looking everywhere to find a spellchecker that was java for TinyMCE.... I figured it was needed since I had a Java web app running on tomcat. But! Then I found an article asking why convert.... Apache allows both java and php on the same site. In order to allow my hosting provider to recognize the php pages within my j2ee app I added the following lines:

SetEnvIf Request_URI \.php no-jk
SetEnvIf Request_URI \.cgi no-jk
to my web settings. Then it worked like a charm! So... I know this isn't a solution for those of you looking for a java spellchecker... but it was a solution that worked for me.

TinyMCE relative path IMG problem

I've been using TinyMCE as a WYSIWYG editor on my website www.puppages.com. I absolutely LOVE it. There was one issue that was a little frustrating. When someone tried to link back to another page on the site (or an image/document on the site), the TinyMCE code would convert the absolute path into a relative path and the relative path would not work. I was able to fix this by doign some javascript editing.

Here's the solution:
  1. Open the tiny_mce.js file.
  2. Find all references to the function: toRelative(u)
  3. replace with return u
  4. save