// archives

General

This category contains 37 posts

width:auto width:100%

Great article that explains something I know I have had issues with for CSS in the past wondering the difference between width:auto and width: 100%, but not anymore http://www.456bereastreet.com/archive/201112/the_difference_between_widthauto_and_width100/

CKEditor – Change the background color using JavaScript

I found a great article on how to change the background color of CKEditor on the fly.  This became a great approach when performing form validation: Link is here, but for a quick reference, here’s how you reference it: this.document.$.childNodes[1].childNodes[1].style.backgroundColor = ‘Blue’; this refers to your CKEditor Instance (CKEDITOR.instances['instanceName'] or CKEDITOR.instances.formFieldIdName)

Java Decompiler

Found this Java Decompiler from a colleague.  Very impressive, especially if you use Eclipse http://java.decompiler.free.fr/?q=jdgui

Getting Query String from a JSP

public String getQueryString(HttpServletRequest req) { Object reqUrlObj = req.getAttribute(“javax.servlet.forward.query_string”); StringBuffer result = new StringBuffer(“”); if (reqUrlObj != null) { result.append((String)reqUrlObj); } return result.toString(); }

CSS Background Image Hacks

Great article on CSS some great things you can do with CSS Background Images: http://nicolasgallagher.com/css-background-image-hacks/

Captcha Alternatives

This article gives a great summary of using Captcha alternatives. http://blogs.sitepoint.com/captcha-alternatives/

Opacity in CSS

I came across a nice article here that sums up using opacity (ie on images) that works nicely in most browsers. http://www.quirksmode.org/css/opacity.html The article summarizes it this way, use the following CSS properties to better support IE versions: .opaque { -ms-filter:”progid:DXImageTransform.Microsoft.Alpha(Opacity=50)”; // first! filter: alpha(opacity=50); // second! }

Eclipse DLTK Index Slowness

I have found a number of times that the DLTK index kicks off during my Eclipse Helios session and sometimes can hang.  What I did to fix this was to remove the files (database index files) in this folder: <workspace folder>/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/

iFrames and WordPress

Unfortunately, WordPress does not allow you to insert iframes into an Article or Page.  You’ll need to install an embed iframe plugin into WordPress (http://de77.com/other/wordpress-iframe-embedder). Working Example using [ iframe http://www.onmiddleground.ca/index.html 640px 350], remember to remove the space before the word iframe:

sed – replace text in multiple files

To replace foo with foo_bar in all PHP files, use this command: sed -i ‘s/foo/foo_bar/g’  *.php

Categories

  • No categories

Categories