Selasa, 31 Agustus 2010

jQuery Plugins' Layout Issues In Internet Explorer 6

Q: I am using jQuery Cycle plugin but the element containing a set of photos to rotate through shows up at the wrong place in IE6. HELP!!!!

Okay you need help and YOU GOT IT! Below is a page on my other website www.mensfashionforless.com:

Position Issue With jQuery Cycle Plugin In IE6

Here's the story behind it: While working on my website I needed to rotate through a set of photos on the top left corner of a webpage via some animation. I knew jQuery has this nice plugin called Cycle; so I downloaded and began to use it. When I was done everything worked great in IE7+, Firefox 3+, Chrome, but I saw a layout issue with IE6. The photo at the top left is at the wrong place:

Bad Layout Issue With jQuery Cycle In IE6

In IE6 the container that contains the photos to slide show through shows up at a weird place in the page. At the start of the browser load it's at the right place, but when the animation kicks in the element gets positioned incorrectly, somewhere in the middle of the page. The correct page looks like the first photo.

Solution: This issue actually can be solved via CSS. Simply put all the image tags inside a div tag that has the following CSS property:

position: relative

and try again. This attribute needs to be present for IE6 to work; otherwise the plugin's jQuery UI CSS framework dynamic styling would position the element somewhere unexpected in IE6. The more advanced browsers are tolerant of this issue and therefore you don't see this CSS issue in them.

Q: I am not using jQuery but somehow an element is positioned at a funny place in the page. Any idea what's going on?

If you are floating some elements and some other element's layout is broken, try floating that element as well. For example I have three elements that I am floating, and at the end of them I clear:both, then I put an Adsense block, but the block is showing in the middle of the page which is not where it's supposed to be. After I wrapped the Adsense block in a div and float the div, the problem goes away.

Questions? Let me know!

Jumat, 27 Agustus 2010

Solve 3x3 Rubik's Cube Correct Edges on Last Layer

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

This is our last step! We move edges to their matching sides on the last layer. You only need to remember the following two algorithms. As you can see, the first algorithm swaps the 3 edge cubies clockwise, and the second one swaps them counter-clockwise.

L2 U B F' L2 B' F U L2L2 U' B F' L2 B' F U' L2






There are actually 4 possible scenarios, but for each scenario you need to use only these two algorithms, at maximum two tries.

Congratulations! You just solved the incredibly challenging game of the Rubik's cube Give yourself a big pat on the back will ya?

I think I covered every detail that any layman can do this. But if you are still confused, let me know!

Happy solving a Rubik's cube

◀ Orient Corners on Last Layer

Solve 3x3 Rubik's Cube Orient Corners on Last Layer

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

If all corner cubies are oriented correctly, meaning the colors are on the right side, then you can skip this step. Otherwise you need to know the following two algorithms. One orients 3 corner cubies counter-clockwise. The other orients 3 corner cubies clockwise.

F' U' F U' F' U2 F U2F U F' U F U2 F' U2






There are actually 8 possible scenarios, but each can be solved by using only these two algorithms, at maximum two tries. This means that after you perform either algorithm once, you should end up with a state where 3 corner cubies need to be oriented clockwise or counter-clockwise. With some thinking you should be able to figure out what needs to be done in each scenario.

After you are done the Rubik's cube should look like this. Whew~ We are almost there




◀ Correct Corners on Last LayerCorrect Edges on Last Layer ▶

Solve 3x3 Rubik's Cube Correct Corners on Last Layer

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

In this step we are going to move correct corner cubies on the last layer. By correct I mean that each corner cubie needs to be moved to the corner it's supposed to be, but the colors could be on different sides. First you can rotate the last layer to see if you get lucky. Otherwise, you only need to know one algorithm to swap two corners facing you. As you can see they should be swapped to be in the correct place.

B U' F' U B' U' F U2




As you can see from the result of running the above scenario, the corners are at the right place but the colors are on different sides. This is fine.

This algorithm is enough for every possible scenario, but sometimes you need to perform it more than once. Perform as many times as you need to get this right. If you are confused, write down what needs to be swapped and the solution will come.

◀ Form a Cross on Last LayerOrient Corners on Last Layer ▶

Solve 3x3 Rubik's Cube Form a Cross on Last Layer

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

First turn your Rubik's cube upside down. The goal here is to form a cross on the last layer. In our examples, the last layer is blue side. So when this step is done, you should see a blue cross. Note that it's not required to have the correct cubie in the cross (e.g. one side of the cubie is green but is on the red face). You only need to remember two algorithms. In the following examples, I only show the last layer, which is on the top so that you can see the colors.

L U F U' F' L'L F U F' U' L'





Suppose you are just unlucky and you start out with neither of the scenarios above, then you simply apply either algorithm and go from there. After you are done, the Rubik's cube looks like this.




◀ Solve Middle LayerCorrect Corners on Last Layer ▶

Solve 3x3 Rubik's Cube Middle Layer

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

In this step, we will be solving the 4 edge cubies of the middle layer. First in the last layer find the edge cubie you want to move to the correct place. For example, between a red and a green face, find the edge cubie that has a red and a green side. Often the cubie is located in the last layer, and there can only be two scenarios, as the following algorithms suggest. They actually mirror each other, but you won't be able to see it until you practice enough.

D' F' D F D L D' L'D L D' L' D' F' D F





After you solve all edge cubies in the last layer, if the remaining edge cubie(s) is in the right place but the colors are reversed (e.g. red in the green face and green in the right face), you simply use either algorithm to move it to the last layer, and use the appropriate algorithm again to move it back to the right place with the right sides.

Now you should be able to solve the middle layer. After you are done, your cube should look like this.




Great work By now you may feel that you've done 80% of the work and solving the last layer will be a no-brainer. Not to burst your bubble, but the last layer is the most difficult to solve, the reason being that while working on it, we must make sure we eventually restore the top two layers. This is what makes it so effort-consuming and time-consuming. But don't worry; we'll ease into it.

◀ Solve Top CornersForm a Cross on Last Layer ▶

Solve 3x3 Rubik's Cube Top Corners

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

In this step we are trying to solve top layer's corners, so that after you are done you have the entire top layer solved. This step should also be intuitive. The following cover all possible scenarios.

L D L'F' D' FL D2 L' D' L D L'







◀ Solve Top Edge CubiesSolve Middle Layer ▶

Solve 3x3 Rubik's Cube Top Edge Cubies

MenuHow To Solve the Rubik's Cube
Solve 3x3 Rubik's Cube Top Edge Cubies
Solve 3x3 Rubik's Cube Top Corners
Solve 3x3 Rubik's Cube Middle Layer
Solve 3x3 Rubik's Cube Form a Cross on Last Layer
Solve 3x3 Rubik's Cube Correct Corners on Last Layer
Solve 3x3 Rubik's Cube Orient Corners on Last Layer
Solve 3x3 Rubik's Cube Correct Edges on Last Layer
Get a Rubik's cube or a Rubik's cube solving guide on

In this step we are trying to solve the top layer's edge cubies, so that when it's done you see a cross formed on top of the Rubik's cube. This step should be intuitive. After playing around with the Rubik's cube you should be able to do this intuitively.

The following are several exmaples. After playing with them you'll realize that there are many possible scenarios, but solving them are intuitive, even though the moves you take most likely are not the most efficient ones.

L2F UF L'






After you solved one or two cubies and are solving the next one, you may feel that solving it disrupts the previous solved cubies. In this situation, simply move the solved cubies away temporarily and move them back after solving the next one. Here are several examples.

Solve the red cubie after solving green and orange cubie (U' R U)



Solve the red cubie after solving all other cubies (U L U' F)



Moving solved portions away to avoid messing them up while solving the next part is a critical skill you must have in order to solve the top layer intuitively.

After you are done, your cube should look like this.




◀ How To Solve the Rubik's CubeSolve Top Corners ▶

How come jQuery UI Tab Widget Does Not Work?

I am using JQuery UI Tabs widget library but it doesn't put the content in tabs as it's supposed to. Why????

I had this question when I was trying to get JQuery UI's tab widget to work. When it works it looks like the following:

jQuery UI Tabs Example

I included the necessary JQuery libraries which are basically jquery.js and jquery-ui.js, both of which can be accessed from Google Doc's code repository. I verified that those files are accessed correctly, but I kept not seeing my content put in tabs as jQuery UI API claims to do. After some digging I found that the failure can be due to the following causes:

* You need to include the necessary CSS: jquery comes with a default CSS stylesheet for its UI API, so you can either download it or simply reference it at Google Doc as follows:

<link href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css' rel='stylesheet' type='text/css'/>

Note if you download it you'll have to correct the path of each background image URL used in the stylesheet. Those URLs are relative paths, and since you'll be hosting it from a different server they'll be broken. You'll have to prefix it with http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base. You can further theme your tabs in your own CSS definitions. JQuery UI's official API guide has more information at http://docs.jquery.com/UI/Tabs.

* Do NOT use self closing script tag: This is extremely weird, but in my experiment I realized things fall apart when I use self closing script tag as follows:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery-ui.min.js" />

You should instead use the following:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery-ui.min.js"> </script>

Weird huh? I have absolutely no idea why this is the case. If any of you experienced the same thing feel free to enlighten me.


That should solve your problem and jQuery UI's tab widget should start working! Questions? Let me know!

Senin, 23 Agustus 2010

Java JDOM Jar Issue Cannot Find Symbol

Q: I am using the latest Java's JDOM library to compile some old code that uses JDOM, but I am getting "cannot find symbol" error. How do I resolve it?

Specifically the error you are getting looks like the following:

SomeJavaFileThatUsesJdom.java:14: cannot find symbol
symbol : constructor XMLOutputter(java.lang.String,boolean)
location: class org.jdom.output.XMLOutputter
private XMLOutputter xout = new XMLOutputter(" ", true);


The cause of the error is that the JDOM jar you are using is new and does not support this constructor. This really sucks because you'd think the newer version of some Java library should be backwards compatible. Anyway you just need to find the version that supports XMLOutputter constructor that accepts a String as the first argument and a Boolean as the second argument. I'll go through the steps to do this but if you just want to know which JDOM jar solves this issue then scroll down to find it. Questions?

To find the version of JDOM classes that fixes the error, you go to JDOM's archive binary page at http://www.jdom.org/dist/binary/archive/ and download and try each version during compilation. At the time of writing here's a list of available jars:

jdom-1.0.tar.gz
jdom-1.1.tar.gz
jdom-b3.tar.gz
jdom-b6.tar.gz
jdom-b7.tar.gz
jdom-b8.tar.gz
jdom-b9.tar.gz
jdom-b10.tar.gz


Download each one and untar or unzip it and identify the jar location. In older versions it should be named jdom-.jar located in jdom/ folder. In newer versions it should be named jdom.jar located in jdom-/build/ folder. Use '-cp' argument option when compiling the Java file to make javac use a specific jar (suppose the jar location is c:\jdom\jdom-b3.jar):

javac -cp c:\jdom\jdom-b3.jar SomeJavaFileThatUsesJdom.java

And see if you are still getting the same error.

To save you trouble, I tried them all and found that jdom-b6.jar fixes the issue:

admin@one-minute-info$ javac -cp jdom-b6.jar SomeJavaFileThatUsesJdom.java
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
admin@one-minute-info$


As an alternative, you can modify your code to use the version of the jar you are using but it's highly not recommended. You'd end up having to debug issues resulted from the differences between the two versions of the jar. If you are feeling adventurous and living on the edge knock yourself out!

Questions? Let me know!

Minggu, 22 Agustus 2010

Jewelry Making Silver Brass Pendants

MenuIntroduction To Jewelry Making
Basic Jewelry Making Tools
Basic Jewelry Making Techniques
Basic Jewelry Making Procedure
Simple Silver Ring And Split Open Ring
Jewelry Making Silver Brass Pendants
Towards the end of the course, I was eagerly looking for something to work on, and I thought a pendant would look great. I tested my water by doing a simple pendant with a cross on it. Don't get me wrong; I am not a Christian. I just wanted to do something simple before I ventured into something much more complicated. So how did I make this pendant? I first cut out the metal that I needed and shaped them the way I wanted, and then I simply soldered where necessary. One thing special about it is that I needed to drill a hole at the top to put the jump ring through, and I also needed to solder the slit in the jump ring. But they were not a big deal and I finished the pendant quickly

Silver Oval Base Brass Cross Pendant

After I finished my first pendant, I was desperate to find ideas for my next project, and something hit me. If I could sandblast a character on a glass dish (refer to my glass fusing post), why couldn't I apply the same concept on a pendant? I decided to solder a meaningful Chinese character on my next pendant. This Chinese character, "Fu", means all the good things in life. Ladies and gentlemen, here is my world famous Fu pendant. Isn't it just plain B-E-A-U-T-I-F-U-L ?

Chinese Fu Happiness Bliss Brass Pendant

Finishing this piece was particularly gratifying because when I started it, it was my last class. So I crashed other people's classes to finally finish it. The process was excruciating and long, and I went through so much to get it done. Nobody can feel the sense of accomplishment finishing the piece brought me

I like jewelry making, but it requires many pieces of equipment to make things. In the future if my jewelry-making instinct flares up, I will just come back and take another class in jewelry making. I certainly enjoyed the challenges it brought me! It also taught me PATIENCE and precision, two very valuable character traits!

◀ Simple Silver Ring And Split Open Ring

Simple Silver Ring And Split Open Ring

MenuIntroduction To Jewelry Making
Basic Jewelry Making Tools
Basic Jewelry Making Techniques
Basic Jewelry Making Procedure
Simple Silver Ring And Split Open Ring
Jewelry Making Silver Brass Pendants
My first project was making this simple silver ring. We simply measured how big we wanted the ring to be, and had our instructor give us the right length of silver wire. Then I wrapped the wire around a ring mandrel to make it round. Then I sawed off the unwanted part. Then I soldered the slit together and buffed it a bit to make it shiny.

Simple Silver Ring

My second ring was a split-open ring. This was much more challenging because it involved multiple soldering instances and more materials.

Silver Split Open Ring With Lapis Lazuli Gem StoneSilver Split Open Ring

The most special thing I had to do was that I needed to make a bezel to hold the stone. I also made some "free-style" design on the ring as you can see. An expert would know that going "free-style" means trying to make up for mistakes in the process :-)

◀ Basic Jewelry Making ProcedureJewelry Making Silver Brass Pendants ▶

Basic Jewelry Making Procedure

MenuIntroduction To Jewelry Making
Basic Jewelry Making Tools
Basic Jewelry Making Techniques
Basic Jewelry Making Procedure
Simple Silver Ring And Split Open Ring
Jewelry Making Silver Brass Pendants
Making jewelry is usually a long, excruciating process. Usually you spend most of your time polishing and making your piece beautiful after you solder them together. Once your piece is polished to your satisfaction you'll feel your effort has been well spent. This has been especially true when I was making the round brass pendant with a Chinese character on it. At least 70% of time was spent on smoothing the edges and buffing the front and back. I put together the following steps to making basic jewelry.

Prepare Materials

Shape Here you try to make metal the shape you want, by bending, pounding with a hammer, filing, biting with your teeth, attacking with your claws, etc.

Solder

Repeat the Above Two Steps as Necessary

Post Process Put the soldered product in the pot that we call a "pickle pot", which has a mild acid in it, in order to remove the dark oxide formed on your metal while soldering it.

Smooth and Polish To make your jewelry shiny, you need to polish it. We used machines called "buffers" to buff our rings. They are quite bulky and powerful. There is also this thing that looks like a soap or a clump of clay that you can use to make your metal shine. I find it very effective. Many types of metal oxidize, like brass. After you polish it it looks shiny for a day or two, and it gradually looks dark due to oxidizing. To prevent it from happening, you can put lacquer on it after you polish it.


◀ Basic Jewelry Making TechniquesSimple Silver Ring And Split Open Ring ▶

Basic Jewelry Making Tools

MenuIntroduction To Jewelry Making
Basic Jewelry Making Tools
Basic Jewelry Making Techniques
Basic Jewelry Making Procedure
Simple Silver Ring And Split Open Ring
Jewelry Making Silver Brass Pendants
Tools are very important in making your jewelry piece. Inadequate tools can ruin your piece or make you need to start all over again. There are so many tools you need to master this craft but to get started you at least need to know ring clamp, bench pin, file, saw, mallet, ring mandrel, and buffer. The following gives you an overview of them and how each one works:

Ring Clamp: You use a ring clamp to hold anything (usually a small object) tightly so that you can do work on it.

Bench Pin: You use a bench pin to support the metal being worked on, especially being sawed.

File: A file may be the most often used tool in a jewelry maker's life. There are many types of files, and each one is fit for a certain situation. You use a file to file down your work to make it look smooth, or to get rid of unwanted edges or roughness.

Saw: I am not talking about a big, electric saw here. I am talking about a small hand saw that you use to shape metal.

Mallet: It is a hammer with a head made of wood or rawhide. You generally use it to shape your ring better.

Ring Mandrel: It is a steel bar on which you shape a ring round.

Buffer: A buffer is a big machine where you polish your piece by buffing it against a spinning wheel with a special polishing material on it. You can also get a portable polisher and it'll work nicely too! You have to replace polishing waxer bonnets periodically.

Pliers: A pair of pliers is used to bend or cut wires or things made of hard material. Since you work with wires in jewelry making all the time pliers are an indispensable part of your toolbox!

Cutter: A cutter is obviously a tool you use to cut. In jewelry making you use cutters all the time! You use them to cut decoration wires, necklace wires, designs, etc.

and many more...


Many people love to plunge in before knowing how some tools work, but in my opinion one should not start without familiarizing himself with the tools of trade. The thing is you want to do your work in the most efficient and painlessly manner, right? If so you really need to get to know the tools in the very beginning!

◀ Introduction To Jewelry MakingBasic Jewelry Making Techniques ▶

Basic Jewelry Making Techniques

MenuIntroduction To Jewelry Making
Basic Jewelry Making Tools
Basic Jewelry Making Techniques
Basic Jewelry Making Procedure
Simple Silver Ring And Split Open Ring
Jewelry Making Silver Brass Pendants
Jewelry making is a huge field. There are so many techniques one can apply to different types of jewelry. In the class, I made a simple silver ring, a silver split open ring with a gem on it, a silver oval pendant with a brass cross on it, and a round brass pendant with some artistic design on it. Here are the basic techniques one needs to excel at these projects:

Saw: Whenever you want to make something, you generally need to saw your design off a bigger piece of metal. Even when you make a ring, you need to saw the redundant part of the metal.

Shape: Shaping metal to your satisfaction can be a challenging and time-consuming process. You need a HUGE amount of patience, and sometimes you just cannot get it 100% the way you want it. There are many tools you use to shape metal, including a mallet, a ring mandrel, and a vise.

Solder: You solder to join two pieces of metal together for good. This alone take extensive experience and patience to master.

Polish: You use files and sand paper to polish your work. In the process, you don't want to over file because there is no turning back! We also use machines called "buffers" to buff our work.


◀ Basic Jewelry Making ToolsBasic Jewelry Making Procedure ▶

Introduction To Jewelry Making

MenuIntroduction To Jewelry Making
Basic Jewelry Making Tools
Basic Jewelry Making Techniques
Basic Jewelry Making Procedure
Simple Silver Ring And Split Open Ring
Jewelry Making Silver Brass Pendants
Silver Split Open Ring With Lapis Lazuli Gem StoneWhen I first learned that this jewelry making class was offered at Santa Barbara Adult Ed program, it immediately aroused my interest. It's not like I want to make beautiful jewelry for girls I like (yea right...). I simply wanted to learn something new, and this sounds just about right. So I took this class.

Jewelry making is an art in itself. Their techniques are easy to learn but hard to master. The mostly used techniques are shape and solder. You first shape the materials into whatever shape you need and join them by soldering. Then you perform the same techniques on other materials to make a bigger piece. Eventually you finish your piece and you'd polish it to make it look shiny.

In this blog I'll cover the basics of jewelry making and show you pictures of some of the work I've done. Let's get started!

Basic Jewelry Making Tools ▶

Sabtu, 21 Agustus 2010

Fuse Glasses In A Kiln

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
After you put together your work, you are ready to put it in a kiln. You need very high temperature (like 1500 degrees F) in order to melt glass to a point where they can be fused seamlessly. People think a kiln is big, but there are small kilns one can buy, like this one:

A Small Kiln

After it's fused and cools down, it looks like a bulky piece of glass. If this is for decoration, you might not need to do any further processing. I don't know about you, but I am a practical person and I want my product to be something useful. I would want to slump it into some shape such as a small plate.

Here's a plate that I slumped into the shape of a funny, uniquely shaped dish or ashtray:

Clear Glass Ashtray With Red Chinese Character

◀ Glass Fusing Smooth And Decorate GlassShape Fused Glass By Slumping In A Mold ▶

Glass Fusing Sandblast Design

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
I love this step the most. You use sandblaster to take some glass off of your work to make it look rough, and it makes a contrast with the surrounding shiny surface . You first draw your design on this special sheet of paper. I forgot what it's called but it has a hard, sticky, transparent pane on a piece of white paper, and you cut out your design so that sandblasting doesn't affect glass outside of the design. Make sense?

I love to sandblast meaningful Chinese characters on a glass dish I made, and give it to someone as a gift. It is both practical and meaningful, and it is totally unique! Here is one.

Square Glass Plate With Chinese CharacterSquare Glass Plate With Sandblasted Character

This is actually a pretty simple piece. I didn't put any decorations on the glass. I simply cut a square from a sheet of clear glass, and then I smoothed the edges out, and then I slumped it. After it's done, I sandblasted my family name on it.

Here is one I made for my dad:

White Square Glass Ashtray

This is the most difficult piece I did. The white pieces you see have to be cut one by one, and each needs to be smoothed to perfection. The strips between them are made of transparent glass, and they also need to be cut and smoothed individually.

After I slumped it into the shape of a dish, I also sandblasted a beautiful Chinese character on it. Any idea what it means ? It is a character in my dad's name, and it also means all the good things in life!

Here is one I made for my mom:

Color Square Glass Ashtray

This piece looks different in its design. I threw on little colored glass pieces before it went in the kiln for fusing. I also used glass sticks to make up a Chinese character, which is a character in my mom's name, and it means "leaf". I sandblasted the same character on the back.

Here is one I made for my friend. Its shape looks special, but I simply picked a mold of that shape to slump it with. The difficult part was to make sure the size of my dish was within a reasonable range so that slumping would be successful. Oh, and I arranged red glass pieces to create a Chinese character as well. This one I am not going to tell you what it means. If you really want to know, you'll find out because when there's a will, there's a way!

Clear Glass Ashtray With Red Chinese Character

Glass fusing is very fun because you can make all kinds of design you want and you can make them practical. The only drawback is that you need several machines to finish your work, especially a glass smoother and a kiln. This alone makes it hard for me to make anything outside class. If I want to make a glass dish or plate for someone, I will definitely come back to class!

◀ Shape Fused Glass By Slumping In A Mold

Shape Fused Glass By Slumping In A Mold

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
After you have a fused product, you can slump it in a mold so that it takes on the shape of that mold. In fact, you don't even need to have a fused product to do this; you can slump one piece of glass if you want. It will be thin and not very interesting.

So the way you slump is to put the fused glass product on a mold. Remember it must fit the mold fairly well; so you must pick the mold from the very beginning and work your way towards now. The glass should be slightly bigger than the mold, so that when it slumps, it comes out to be about the size of the mold. After you put the glass on a mold, you put the whole thing in a kiln, and heat it at 1300-1400 degrees F for as long as it takes for slumping to occur, usually within a couple of hours.

Here's one sample piece I made that takes on the shape of an ashtray by slumping:

White Square Glass Ashtray

Here's another piece which takes on the shape of a funny looking vase by slumping:

Clear Glass Ashtray With Red Chinese Character

◀ Fuse Glasses In A KilnGlass Fusing Sandblast Design ▶

Glass Fusing Smooth And Decorate Glass

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
After you cut your glass, usually you would want to have smoother edges, or you have a bump somewhere that you want to get rid of. There is a wide array of tools you can use to smooth your glass. Most of them work by rotating a specialized surface with water on it, and you rub your piece against it to make it smooth. There is this machine that runs a thick belt and you rub your piece against it. In general they are easy to use; you just need to put on goggles to prevent little pieces from getting into your eyes!

Decorating your piece is the meat of the whole process. Usually you decorate glass with other pieces of glass, which can be of different color, shape, and so on. There is a wide range of materials such as glass powder and thin glass sticks.

Here's one glass piece I made with many small pieces of colorful glasses sitting on top of a bigger piece of clear glass. I even used red thin glass sticks to write a Chinese character:

Color Square Glass Ashtray

◀ Glass Fusing Cut GlassFuse Glasses In A Kiln ▶

Glass Fusing Cut Glass

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
You use a glass cutter to cut a glass into any shape you want. It sounds impossible but it's actually quite easy once you get the hang of it. The glass I was using was thin because if it's too thick, cutting it could be a challenge. You usually run your cutter in a straight line, but once you are used to it, you can do irregular shapes such as a circle. As mentioned in the previous section, if you are planning to slump your product in some mold, you need to cut your glass the same shape as that of the mold.

Here is what the glass cutter looks like.

Glass Cutter

◀ Glass Fusing Gather MaterialsGlass Fusing Smooth And Decorate Glass ▶

Glass Fusing Gather Materials

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
Like any other material, glass comes in different sizes, colors, and types for sale. It comes in full sheet, 1/2 sheet, or 1/4 sheet. Glass itself can be any color, and its type can be standard, standard iridescent, thin, thin iridescent, and so on. I just got some clear, thin glass and some white, thin glass because I didn't want to have too many colors in my work. I live by the motto, "Simpler is better." You actually have to plan ahead before you get your materials. For example if you want to make a small plate of a particular shape, you need to find an appropriate mold as well.

Here is a photo of one piece of white glass, one piece of clear glass, and one thin glass stick (I forgot the technical term for that..).

Material White Glass Clear Glass Stick

◀ Introduction To Glass FusingGlass Fusing Cut Glass ▶

Introduction To Glass Fusing

MenuIntroduction To Glass Fusing
Glass Fusing Gather Materials
Glass Fusing Cut Glass
Glass Fusing Smooth And Decorate Glass
Fuse Glasses In A Kiln
Shape Fused Glass By Slumping In A Mold
Glass Fusing Sandblast Design
Color Square Glass Ashtray
I'd like to share with you how I took up glass fusing. I took a class in glass fusing with the Adult Ed program of Santa Barbara City College. It was a beginner's course and it taught us the basics of glass fusing. Glass fusing is a process in which you fuse various pieces of glass together to make one beautiful glass piece. Obviously glass fusing is art and sky is the limit when it comes to creativity, but here are the basics:

* Gather Materials
* Cut Glass
* Smooth Glass
* Decorate Glass
* Fuse Glasses
* Slump Glass
* Sandblast Design on Your Finished Product


The whole point is to pick the glass you want, decorate it with other glass, smooth your glass to your satisfaction, and fuse all your pieces of glass together in a kiln. After your piece is done, you can put it in a mold and slump it in the kiln again with much lower temperature so that the glass piece comes out taking the shape of the mold. You can also sandblast some design on your glass. In fact, this is exactly how I made all my products in this class. There are many other ways to process and post-process your products to make them look fancy and stuff, but I choose to be simple and elegant.

Here are a couple of pieces I made:

Color Square Glass Ashtray

White Square Glass Ashtray

Glass Fusing Gather Materials ▶

Rabu, 18 Agustus 2010

How To Tell The Page Type In Blogger Template

Q: In Google Blogger's template HTML I'd like to be able to tell what page type the current page is so I can treat it accordingly. How?

First of all here's a screen shot of the Blogger template HTML editor user interface:

Blogger Template HTML Editor Window

The text area is where you edit the template HTML so that your blog displays what you want it to display. All pages on your blog share this template, so if you want to treat pages differently according to their page type you need to create such conditional statements. For example you may want the homepage to contain a pitch line that you don't want other pages to contain; you may want label pages to simply list links to the corresponding posts without showing the actual post bodies; etc.

Here's the deal: How do you know whether the current page is the homepage, a single post, a static page, an archive page, or a label page? What condition do I need to test? You need to be able to make this distinction to treat each type of page differently. Surprisingly the Blogger documents and references regarding widget tags for layouts and page elements tags for layouts do NOT address this question thoroughly. They merely say

data:blog.pageType specifies the type of the current page. One of 'item', 'archive', or 'index'.

And it says nothing about what each value means. How frustrating Some values are obvious but others aren't. After some digging I figured out the following:

Value
index


item

static_page
archive
Meaning
homepage such as http://www.mensfashionforless.com/ or
label page such as http://www.mensfashionforless.com/search/label/Express
item page such as http://www.mensfashionforless.com/2010/01/zara-black-leather-jacket.html
static page such as http://www.mensfashionforless.com/p/about.html
archive page such as http://www.mensfashionforless.com/2010_07_01_archive.html


To tell homepage and a label page apart test whether data:blog.url equals data:blog.homepageUrl. If so then this is the homepage. Otherwise use data:blog.pageType. Here's the complete code that has a condition block for each page type:

<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- homepage -->
<b:else/>
  <b:if cond='data:blog.pageType == &quot;index&quot;'>
  <!-- label page -->
  <b:else/>
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
    <!-- single blog post -->
    <b:else/>
      <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
      <!-- static page -->
      <b:else/>
        <b:if cond='data:blog.pageType == &quot;archive&quot;'>
          <!-- archive page -->
          <b:else/>
            <!-- unknown page; shouldn't be possible -->
          </b:if>
      </b:if>
    </b:if>
  </b:if>
</b:if>


Now you should be able to distinguish among the page types of your blog. Questions? Let me know!

How To Install Google Blogger Java API

In this post I will tell you EXACTLY how to install Google's Blogger Java API. I covered How to Install WAMP, Java, Hibernate, and Eclipse at another post; therefore consult it if you want to know how to install any of those tools. In my personal project I installed all of them as well as Google's Blogger API for Java so that I can use Java to update my blog based on some business logic which involves pulling data out of a local MySQL database. Without further ado let's follow the following steps to install Google API!

Download the latest Blogger Java client library from Google's code download page. The version I am using is gdata-samples.java-1.41.5.zip.

Unzip the zipped file and the unzipped files should be in gdata\ folder.

Copy all jars in the following directories to your Java's extension directory (my Java's extension directory is C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\). If you don't know why we are doing this consult How Java Recognizes Where Things Are. Basically you are trying to give Java access to Google Blogger Java API by copying those jars to your Java's extension folder. Here are the directories whose jars you should copy to Java extension folder:

* gdata\java\deps\
* gdata\java\lib\
* gdata\java\sample\util\lib\


There you go! Now you should be able to use Blogger API to programmatically update your blog rather than log into your account and update manually!

If you use Eclipse you should restart it so that it recognizes the newly added jars in your Java's extension folder.

If you are using a client library that's different than 1.41.3 it may have a different directory structure. Questions? Let me know! The jars in gdata\java\sample\util\lib are required to run their sample code at gdata\java\sample\blogger\BloggerClient.java. In this Java file you will learn how to use the API to create, read, update, delete a post. Trust me. The Blogger API is very easy to use and you'll get the hang of it in no time.

Throughout my stint with Blogger I've encountered and resolved many difficulties. They include how to add a label to a post via the API, how to tell the page type in template HTML, etc. So check out my posts at Blogger Category if you come across any issue! If you still have issues let me know! and I'll do my best to help!

How To Install And Configure Eclipse

MenuHome
Install and Configure WAMP
Install and Configure Java
Install and Configure Hibernate
Install and Configure Eclipse
Eclipse is a free open source full featured IDE for developing software, mostly for Java and PHP. It's incredibly powerful and is comparable to many other costly IDEs that do similar things. If you are developing Java applications I sincerely recommend that you use Eclipse! Follow the following steps to install and configure Eclipse correctly:

Download the latest version of 32-bit Eclipse IDE for Java Developers from Eclipse's download website at http://www.eclipse.org/downloads/. Unzip eclipse-java-helios-win32.zip and save contents to C:\eclipse-java-helios-win32\.

Warning: Even if you are using a 64-bit machine you still should download 32-bit version of both Eclipse and Java JDK otherwise you'll get the following error:

Failed to load the JNI shared library "C:\Program Files(x86)\Java\jdk1.6.0_20\bin\..\jre\bin\client\jvm.dll"


Open Eclipse by clicking C:\eclipse-java-helios-win32\eclipse.exe. Its interface looks like the following:

Eclipse Helios Windows 32 Bit Java IDE

Create a new Java project and specifies the code root as the project Location. One thing you should do is use the JRE you installed earlier instead of the JRE that comes with Eclipse. Follow the following steps:

Project -> Properties -> Libraries -> Click JRE System Library [jdk1.6.0_20] -> Edit... -> Alternate JRE -> Installed JREs -> Add... -> standard vm -> C:\Program Files (x86)\Java\jdk1.6.0_20\jre -> finish -> pick jdk1.6.0_20 in Alternate JRE drop down menu.

The actual window looks like:

Eclipse Java IDE JDK Selection

This provides JRE for the code you run in eclipse. If something's not resolved you need to drop the corresponding jar in C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext


Congratulations! You've successfully installed Apache, MySQL, PHP, Java, Hibernate, and Eclipse. You are ready to crank out some serious killer app! Questions? Let me know!

◀ Install and Configure Hibernate

How To Install And Configure Hibernate

MenuHome
Install and Configure WAMP
Install and Configure Java
Install and Configure Hibernate
Install and Configure Eclipse
Hibernate is an incredible open source Object-relational mapping (or ORM, O/RM, O/R mapping) tool in Java. Suppose you have many database tables that are related to each other in some ways. If you want to query them with raw SQLs it'd be a nightmare (lots of joins, criteria, etc.). But with Hibernate you simply define the mappings in XML configuration files and you'll be able to retrieve the data as Java objects and be able to manipulate them as such

Download the latest Hibernate distribution package from Hibernate's download website. Mine is hibernate-distribution-3.5.3-Final-dist.zip. If the latest version is not this one it's fine. Try it and Let me know if you encounter any issues.. Unzip it and drop the following jars in your java's extension directory (mine is C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\). If you don't know why we are doing this consult How Java Recognizes Where Things Are.

* hibernate-distribution-3.5.3-Final\hibernate3.jar
* hibernate-distribution-3.5.3-Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar
* every jar in hibernate-distribution-3.5.3-Final\lib\required\

Download the latest slf4j package at http://www.slf4j.org/download.html. At the time of writing it is slf4j-1.6.0.zip. Unzip it and drop slf4j-api-1.6.0.jar in java's extension folder; then delete slf4j-api-1.5.8.jar in the same folder if you see it.

Download and drop mysql-connector-java-5.1.13-bin.jar in java's extension directory.


Now you should be able to use Hibernate! Let me give you a sample setup. Create hibernate.cfg.xml in C:\ and put the following in it. Hibernate automatically reads hibernate.cfg.xml from the directory of the Java class you are running. Questions?

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.url">jdbc:mysql://localhost:3306/mffl</property>
<property name="connection.username">root</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- <property name="connection.password">iamroot</property>-->
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<!-- thread is the short name for
org.hibernate.context.ThreadLocalSessionContext
and let Hibernate bind the session automatically to the thread
-->
<property name="current_session_context_class">thread</property>
<!-- this will show us all sql statements -->
<property name="hibernate.show_sql">false</property>

<!-- mapping files -->
<mapping resource="config/automate.hbm.xml" />

</session-factory>
</hibernate-configuration>


From this configuration file Hibernate learns about underlying properties of the database and where to look for mapping files (specified by mapping tag). Here's the corresponding automate.hbm.xml in C:\config\: Questions?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping default-lazy="false">
<class name="entity.Brand" table="brand">
<id name="brandId" column="brand_id">
<generator class="increment" />
</id>
<property name="title" column="title" />
<set name="stores" table="brand_to_store" cascade="all" lazy="false">
<key column="brand_id" />
<many-to-many column="store_id" class="entity.Store" />
</set>
</class>
<class name="entity.Store" table="store">
<id name="storeId" column="store_id">
<generator class="increment" />
</id>
<property name="title" column="title" />
<set name="brands" table="brand_to_store" cascade="all" lazy="false">
<key column="store_id" />
<many-to-many column="brand_id" class="entity.Brand" />
</set>
</class>
</hibernate-mapping>


You should be able to create the corresponding database tables brand, store, and brand_to_store. Then create the corresponding Java files Brand.java and Store.java. Questions? Let me know!

◀ Install and Configure JavaInstall and Configure Eclipse ▶

How To Install And Configure Java

MenuHome
Install and Configure WAMP
Install and Configure Java
Install and Configure Hibernate
Install and Configure Eclipse
Java is an incredibly versatile programming language. For a project I've been working on I use Java and Hibernate to easily manipulate the underlying database which is Mysql. I have many tables that relate to each other in complex ways, but Hibernate takes away much complexity and leaves me to worry about only the business logic. Java has so many useful third party libraries that do anything you possibly need for the rest of your life.

1. Download the latest Java at http://www.java.com/en/download/index.jsp. The one I downloaded is jdk-6u20-windows-i586.exe. It installs Java compiling and runtime environment at C:\Program Files (x86)\Java\jdk1.6.0_20\.

2. Add C:\Program Files (x86)\Java\jdk1.6.0_20\bin to 'path' environment variable so that you can run Java related tools in a terminal, two of which are 'javac' and 'java'.


For those who are wondering how Java recognizes where to find its libraries and stuff here's a good article: How Java Recognizes Where Things Are.

Let's move on!

◀ Install and Configure WAMPInstall and Configure Hibernate ▶

How To Install And Configure WAMP

MenuHome
Install and Configure WAMP
Install and Configure Java
Install and Configure Hibernate
Install and Configure Eclipse
WAMP Server WindowThis section is about installing and setting up WAMP to do its job. First of all WAMP stands for Apache, MySQL, PHP for Windows. This little nifty package contains all these tools running on Windows, compatible with each other. Install this application and you get Apache, MySQL, and PHP! For those who are familiar with LAMP, WAMP is simply the same thing for Windows instead of Linux.

Download WampServer2.0i.exe at http://www.wampserver.com/en/download.php and run it. At the time of writing WampServer2.0i.exe is the latest version but if not, you can download the then-latest version. However you may encounter issues with compatibility and stuff, in which case let me know and I'll try to resolve them for you.

Once you install and run it you should see its icon in the lower right corner. Left click on it and you should see the following pop up:

WAMP Server 2.0 User Interface

Verify that your Apache, Mysql are running by going to http://localhost/ and http://localhost/phpmyadmin/. If not, restart all services and try again. Questions?

Suppose your WAMP installation is under C:\wamp\. Add C:\wamp\bin\mysql\mysql5.1.36\bin in path so that you can do 'mysql -uroot' to connect to Mysql server in command line. There's NO root password in the default installation of Mysql.

Let's move on!

◀ HomeInstall and Configure Java ▶

How to Install WAMP, Java, Hibernate, and Eclipse

MenuHome
Install and Configure WAMP
Install and Configure Java
Install and Configure Hibernate
Install and Configure Eclipse
This is not an uncommon request for someone who wants to run a web server with an underlying database, backed by a server side programming language, assisted by several important one off or periodic tasks - me. Okay if it's just me then it might have been uncommon, but I have gone through a lot to finally have all these tools set up, so I'd like to share my experiences with you.

First of all I'd like to tell you why I am doing this. I'd like my web server (Apache) to serve dynamic content (PHP) driven by my database (MySQL) and dynamic content driven by one off or regular tasks (Java) with an easy way to manipulate my database content via Java objects (Hibernate), and I'd like to develop my Java code in a user friendly IDE (Eclipse). Last but not least I'd like to do ALL of these FREE, and they certainly are

Let's get right down to it! Click on the next section.

Install and Configure WAMP ▶

How Java Recognizes Where Things Are Internally

I've always wondered how Java internally recognizes where to find its core classes or jars, where to find its extension classes or jars, and what we need to do to make Java do find these libraries. This is before you use CLASSPATH environment variable or -classpath argument option of executing 'java' command.

Surprisingly I cannot even find this information on Sun's website. Want to share your frustrations? Anyway here's the answer.

The Java launcher uses the system property called 'sun.boot.class.path' to determine where to find classes. This property is set in part when you installed Java, and in part when you run a Java program. You don't need to know the nitty gritty details. Just remember: After you install Java JDK or JRE, put Java's bin/ directory path in your system's environment variable called 'path' to make Java load its core classes and extension classes automatically.

For example, I am running Windows 7 on a 64-bit machine, and the default bin directory of Java is C:\Program Files (x86)\Java\jdk1.6.0_20\bin\. I add this path in my environment variables. Here's a screen shot of the 'Environment Variables' window on my Windows 7 desktop:

Java Bin Directory Included In Environment Variable Path

As you can see the highlighted row corresponds to variable 'path' and its first value is C:\Program Files (x86)\Java\jdk1.6.0_20\bin. I have other values and therefore I delimit them with semi-colons (;).

If you are using Linux or some other operating system simply use a search engine to find the way to change your environment variables! Questions?

Once you've done updating the environment variable, Java automatically looks at C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\ for extension jars, and Java automatically looks at C:\Program Files (x86)\Java\jdk1.6.0_20\lib\ and C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ for core jars such as rt.jar.

That means if you want to use any third party jars simply drop them in C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\ and everything should work as expected. Questions?


Incidentally if you see NoClassDefFoundError while running a Java program do “java -Verbose ” to see the classes that JVM has loaded so you get an idea if it picks up the jars you put in the ext\ folder. Any questions let me know!
 
support by: infomediaku.com