May 2014

Feel the power and torque with the Herringbone Gear

Herringbone gear

Herringbone Gears have the advantage of transferring power smoothly because more than two teeth will be in mesh at any moment in time. Their advantage over the helical gears is that the side-thrust of one half is balanced by that of the other half. This means that herringbone gears can be used in torque gearboxes without requiring a substantial thrust bearing. Because of this herringbone gears were an important step in the introduction of the steam turbine to marine propulsion.

citroen axel herringbone gearThe logo of the car maker Citroen is a graphic representation of a herringbone gear, reflecting André Citroën’s earlier involvement in the manufacture of these gears. Early Mors and Citroen cars used a herringbone bevel gear final drive in the rear axle. Panhard Dyna X and successor cars (1948-67) used double helical gears in the transaxle and for t he camshaft timing gears in the engine. You can see a Citroen Type A final drive herringbone pinion and crownwheel.

DIY: How to fix a zipper at home in a few minutes

Zipper Quick Fix

Some times you wake up and you are in rush to put on your clothes with a puffy eyes and when to pull your pants zipper up the zipper slider comes off the zipper track and it seems almost impossible to fix it. You put on another pant and the replacement will mean that you won’t be wearing that particular pant for a day or two perhaps. But wait, you can fix it quickly only using a pair of scissors, a needle and a matching thread.

zipper fixing in 3 steps

First make a slit between the teeth of zipper tape. Make sure that it is as close to the bottom of the tape as possible. The slit needs to be a deep one so that you can easily put the zipper slider back on track.

Now to attend to the opening that was left by the slit, you’ll need to make a stopper with the thread and needle that you have. Start sewing around and keep at it until you think you’ve made a strong and subtle stopper.

That’s all ! It’s fixed and the zipper slider will move up and down perfectly fine.

Funny Google street and Google maps moments

Google street view car

Various ways to check the visibility of the elements using jQuery

Use jQuery to test if an element is visible or hidden

In jQuery, it is possible to toggle the visibility of an element using the functions .hide(), .show() or .toggle(). You can also use jQuery to check if an element is visible or hidden.

For a single element you can use the code below:

// Checks for display:[none|block], ignores visible:[true|false] 
// usuing the reverse logic words:
// to check if it's hidden:

All the codes above check the display property of an element, but what if you want to check items that have visibility: hidden?

$(".item").each(function() {
    if ($(this).css("visibility") == "hidden") {
        // handle non visible state
    } else {
        // handle visible state

The :visible selector according to the jQuery documentation:

  • They have a CSS display value of none.
  • They are form elements with type=”hidden”.
  • Their width and height are explicitly set to 0.
  • An ancestor element is hidden, so the element is not shown on the page.
  • Elements with visibility: hidden or opacity: 0 are considered to be visible, since they still consume space in the layout.

This is useful in some cases and useless in others, because if you want to check if the element is visible (display != none), ignoring the parents visibility, you will find that doing .css(“display”) == ‘none’ is not only faster, but will also return the visibility check correctly.

If you want to check visibility instead of display, you should use: .css(“visibility”) == “hidden”.

Also take into consideration the additional jQuery notes:

Because :visible is a jQuery extension and not part of the CSS specification, queries using :visible cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using :visible to select elements, first select the elements using a pure CSS selector, then use .filter(“:visible”).