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

Sunday, February 22, 2009

Scriptalicious Tree is null or not an object line 935 - Internet Explorer only

For some reason my scriptalicious ajax code works beautifully for dragging and dropping in firefox but when it comes to Internet Explorer I'm getting a weird error:

'tree' is null or not an object at line 935Here's line 935: if (options.tree) {

I'm still trying to figure out what is going on...

**** fixed it. The problem was I had another element on the page with a name="x" and my draggable item had id="x". So since there was a conflict the error occurred.

Solution: Check to see if the id is unique (also not used as a name value).

Friday, February 20, 2009

Another weird tomcat error

Works locally on WAS but when installed on tomcat I get the following error when accessing a jsp page:

INFO | jvm 1 | 2009/02/20 16:16:32 | org.apache.jasper.JasperException: /gensetup.jsp(17,4) Expecting "jsp:param" standard action with "name" and "value" attributes
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parseParam(Parser.java:827)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1665)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1004)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parseInclude(Parser.java:856)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1118)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Parser.parse(Parser.java:133)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
INFO | jvm 1 | 2009/02/20 16:16:32 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
INFO | jvm 1 | 2009/02/20 16:16:32 | at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
INFO | jvm 1 | 2009/02/20 16:16:32 | at java.lang.Thread.run(Thread.java:619)


The problem was i had a scriptlet to print out a message during test:

<% System.out.println("message"); %>



so after removing that print statement it worked just fine.

Thursday, February 19, 2009

404 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) error

I was seeing the weirdest error when I tested some of my jsp code on my server after doing some updates locally and then deploying the same files to the server that worked locally. At first I thought it had something to do with the hosting server being tomcat and my local server being IBM WAS. Turns out WAS let me run a servlet that returned to:

myJsp.jsp

when the real name of the file was: myjsp.jsp (no capital J).

So when I went to test the "working" code on my hosted tomcat server I got a 404 error:
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

All it was was a capitalization error. But it was a hard one to debug since I had no idea what it was referring to.