=^.^=

Fun with Vapour Part Three: Back in the Game with the Joye 510 L E-Cigarette

karma

In the first part of this series I reviewed the Health E-Cigarette. Unfortunately, it shipped with nicotine-free cartridges so it spent some two months on the shelf before I obtained a vial of 10mg e-juice. In full compliance with Murphy's Law by this time the atomizer had mysteriously broken. In the mean time I have been smoking cartons of Native cigarettes. When you get your cigarettes in a giant ziplock bag by the 200s it begins to put in perspective the amount of tar one ingests.

I was eventually compelled to cough up the dough to try a new model. Today - after a very long wait - that model arrived:

Or models, I should say. I wised up this time and made sure to get two full units. Meet the 510:


I purchased this model from lightinthebox.com because when shopping hung over I am easily frustrated and moved to make compulsive decisions. The downside to lightinthebox is that their "Super Saver Shipping" adds a 15-day handling period before they even send the damned thing out. In total I was dinged USD$47.48.

The first thing I noticed about this model is how bloody long the battery is. Obviously, it should translate into longer runtime. I have a thing for long cigarettes and cigarette holders so it doesn't bother me. The second most noteworthy feature is the "steel wool" pad-style atomizer element which is apparently favoured by experienced vapers for its ease of use in "dip" or "drip"ping e-juice directly. While it shares this design with my Health E-Cigarette the 510's element is recessed almost an inch into the atomizer housing which, upon first inspection, seems to eliminate the possibility of dipping and increase the complexity of dripping.

These rather novel cartridges insert into the atomizer housing and supply e-juice to the element from a permanent compartment stuffed with loose polymer fibres. The design of the compartment and two small air slits suggest that in theory this particular model is very good at keeping unvaporized droplets from getting sucked into the user's mouth.

Update: The charger is sensitive to touch. Wonderful. It's sealed shut too, there is no opening it without breaking it.

Very cheap construction all around. You can see that the tip of the charger's connector is a metal bar with a position tab to keep it from protruding past the internally-insulated nut. The spring doesn't have much force so my second thought was to lengthen it a bit (the first was to clean the contacts). Still no change. It seems that the moulded cavity that is supposed to hold the nut securely has a little give to it and this is enough to make the connection impermanent.

I hope this won't be the second e-cig I have to take up with PayPal. :/

Update: The morning after. It is presently 09h30 and my last cigarette was at 17h00 last night. So far I FEEL GREAT! My biggest concern was that the e-cig wouldn't be man enough for my morning nic-fit; I think it has passed the test. The cartridges don't seem to hold anywhere near as many puffs as advertised but I was expecting that after my experience with "the blanks". Maybe they do - but they certainly don't come out creamy enough after a while. I probably went through six drops of e-juice plus the contents of two cartridges last night alone.

If a cartridge is supposed to be 36 cigarettes is it possible I am over-dosing it a little? I'm banking on the belief that this is just typical marketing crap and 6 or 7 puffs is about half a cig to a cig because it "feels right".

Both my little vial of e-juice and the cartridges that came with it surprised me in how actually cigarette-like they were. Don't get me wrong, they taste nothing like cigarettes as we know them but it was a far better simulation than I expected. It doesn't taste like smoke so much as the really clean, bare tang of a cigarette. It even seems to tickle the nose a the same way. There are hints of the other flavouring agents but I applaud the restraint with which they were added - it doesn't pretend to be smoke but it delivers the point without being obnoxious. The glycerin will probably always leave a slightly sweet taste no matter what flavour you use but it's not exactly the worst thing in the world. With my luck I'll end up on candy canes when I try to get off of e-cigs :\

I'm feeling pretty optimistic about quitting. I figure if I can make it three days I can make it all the way. Paws crossed :3

Update: Almost day 6! I got drunk on night 2 and figured if I didn't have a cigarette it would stay in my mind and bother me all night. I didn't even finish half of it before I had to put it out. I've been tempted since then but all it takes is three puffs off the e-cig and I'm back to normal. I had no idea quitting could be so easy and I've made all of my friends interested. Right now I'm putting together an order for six (that's right, SIX) eGo T starter kits. Since most 510 and eGo parts are interchangeable I don't feel particularly bad about settling for the 510 first. If you want an e-cigarette that works and looks like a cigarette the 510 is certainly for you. If you want something that HITS like a real cigarette... well I'm hoping that's what the eGo will deliver.

I dropped one of my batteries while I was out. Now the button likes to stick unless one only presses the far edge. It doesn't seem to stay on when it's stuck like this but it has fire hazard written all over it.

Noticed that all of the cartridges that shipped with my 510s are stale. The juice didn't go brown so much as it congealed into a very robust translucent white gel very firmly attached to the polyester which does not so much wash off in warm water as it does break apart, leaving the filling looking a lot like a wad of loose Velcro fibres. Unlike Velcro, the globules do not act as hooks and re-matting the filler remains quite difficult.

It didn't take even 24 hours for me to try my first modification: Fun with Vapour Part Four: Straw Air Pressure Cartridge Modification. This cartridge modification makes using stuffed cartridges daily conceivable but from what I have seen they are no match for the longevity of tanks. I was very interested in pursuing the brass screen modification but don't feel I can afford to risk breaking my atomizers before their time. The next modification I hope to try is the "Pyramid Teabag Mod" which supposedly provides better capacity and wicking through the use of tea bag material for cartridge filler.

I went to a local flea market on Sunday where I got my first vial of nicotine-containing e-juice many months ago but the vendor I purchased from was no longer there. Nobody had juice (nicotine-free or otherwise), but three vendors had taken up selling cheap nicotine-free e-cigs. Two of them were pushing the Health E-Cigarette which I have already reviewed (crap). One of these vendors ripped my 510 out of my hand and TWISTED the cartridge off (anyone with a 510 knows that's a great way to break your atomizer) then told me with a straight face that it was a "knockoff."

I very nearly punched him in the mouth.

Rotate Red5 Logs Without logrotate

karma

If you are capturing log output from Red5 via stdout and stdin as I had configured in this init script you will not be able to use logrotate and reliably preserve data as the active files are not replaced until the daemon has been restarted, losing anything that happened between then and the last rotation. Logging this way also suffers from a lack of timestamping. Fortunately, red5 has the capacity to rotate log files itself. Disable logging from stdout/stdin and replace the following portion of /opt/red5/conf/logback.xml:

        <appender name="FILE" class="ch.qos.logback.core.FileAppender">
                <File>log/red5.log</File>
                <Append>false</Append>
                <encoder>
                        <pattern>%d{ISO8601} [%thread] %-5level %logger{35} - %msg%n</pattern>
                </encoder>
        </appender>
        <appender name="ERRORFILE" class="ch.qos.logback.core.FileAppender">
                <File>log/error.log</File>
                <Append>false</Append>
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
                <level>WARN</level>
        </filter>
                <encoder>
                        <pattern>%d{ISO8601} [%thread] %-5level %logger{35} - %msg%n</pattern>
                </encoder>
        </appender>

with:

        <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
            <File>/var/log/red5/red5.log</File>
          
            <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
              <FileNamePattern>log/red5.%d{yyyy-MM-dd}.log</FileNamePattern>
              <!-- keep 30 days worth of history -->
              <MaxHistory>30</MaxHistory>
            </rollingPolicy>

            <layout class="ch.qos.logback.classic.PatternLayout">
              <Pattern>%d{ISO8601} [%thread] %-5level %logger{35} - %msg%n</Pattern>
            </layout>
          </appender>
          <appender name="ERRORFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
            <File>/var/log/red5/error.log</File>

            <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
              <FileNamePattern>log/error.%d{yyyy-MM-dd}.log</FileNamePattern>
              <!-- keep 30 days worth of history -->
              <MaxHistory>30</MaxHistory>
            </rollingPolicy>
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
                <level>WARN</level>
        </filter>
            <layout class="ch.qos.logback.classic.PatternLayout">
              <Pattern>%d{ISO8601} [%thread] %-5level %logger{35} - %msg%n</Pattern>
            </layout>
          </appender>

Thank you to the bigbluebutton staff.

Fix Kopete, other libmsn MSN/WLM Clients Broken/Won't Connect

karma

Microsoft made changes to their Windows Live Messenger servers on November 8 2011 which negatively impacts the ability of instant messenger clients (Kopete, emesene to name a couple) using libmsn 4.1 and earlier to connect.

At the time of writing version 4.2 addresses the issue but is not included in the mainstream portage for Gentoo. We will use an ebuild from the KDE overlay available at http://gpo.zugaina.org/net-libs/libmsn/euscan to implement a quick and dirty fix without setting up the whole overlay. It will not survive the next emerge --sync but I am operating on the expectation that 4.2 will be brought mainstream ASAP due to demand.

Note that we must comment the PATCHES line:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit cmake-utils

DESCRIPTION="Library for connecting to Microsoft's MSN Messenger service."
HOMEPAGE="http://sourceforge.net/projects/libmsn/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="debug"

DEPEND="
        dev-libs/openssl
"
RDEPEND="${DEPEND}"

DOCS=(README THANKS TODO)

#PATCHES=( "${FILESDIR}/${P}-install-xmlparser-header.patch" )

Download the bzipball to /usr/portage/distfiles:

# wget http://ufpr.dl.sourceforge.net/sourceforge/libmsn/libmsn-4.2.tar.bz2

Digest the ebuild (yum!):

# cd /usr/portage/net-libs/libmsn
# ebuild libmsn-4.2.ebuild digest

Now unmask 4.2:

# echo "net-libs/libmsn" >> /etc/portage/package.keywords

Emerge the new version of libmsn:

# emerge --update libmsn

Now restart your libmsn dependent instant messenger.

Rapidly Import Database Column Names as Variables with Spreadsheet Formulas

karma

Many times when processing form data for a database I find myself using table column names as the variable names for their corresponding datum. You can save yourself a lot of time by importing your table column names into a spreadsheet then applying the SUBSTITUTE() function to nest their names in repetitive code. For this example we will be processing some form data in a PHP script for insertion into a MySQL database. Although it is possible to take your column list from almost any source we will only cover phpMyAdmin and the CLI interface in this example.

mysql> show columns from users;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+

...

| d_address1         | varchar(255) | NO   |     | NULL    |                |
| d_address2         | varchar(255) | NO   |     | NULL    |                |
| d_city             | varchar(255) | NO   |     | NULL    |                |
| d_prov             | varchar(40)  | NO   |     | NULL    |                |
| d_postal           | varchar(20)  | NO   |     | NULL    |                |
| d_pone1            | varchar(40)  | NO   |     | NULL    |                |
| d_phone2           | varchar(40)  | NO   |     | NULL    |                |
| d_fax              | varchar(40)  | NO   |     | NULL    |                |
| d_email            | varchar(255) | NO   |     | NULL    |                |
| d_type             | varchar(255) | NO   |     | NULL    |                |
| d_usedinv          | varchar(255) | NO   |     | NULL    |                |
| d_purchasepref     | text         | NO   |     | NULL    |                |
| d_frannum          | varchar(255) | NO   |     | NULL    |                |
| d_legalname        | varchar(255) | NO   |     | NULL    |                |
| d_hst              | varchar(255) | NO   |     | NULL    |                |
| d_license          | varchar(255) | NO   |     | NULL    |                |

...

+--------------------+--------------+------+-----+---------+----------------+
101 rows in set (0.00 sec)

LibreOffice crashed when I tried to do a straight-up formatted paste from Firefox and even when it does work it tends to take a long time so I recommend first dumping it into a plain text editor then copying from there to your spreadsheet application. LibreOffice automatically detected that I was importing a table and opened the Text Import dialogue box; depending on your spreadsheet software you may have to first save the data in a text file (perhaps .csv) and open it with the correct delimiter. For imports from phpMyAdmin use Tab, for imports from the CLI use the pipe (|) character.

We are probably going to end up with some white-space around the values in our names column so it is important to TRIM() the data when plugging it into a formula. Insert a column next to the names column to accommodate the results. The first step in our PHP script will be to run our variables through a function called clean() which might escape characters and perform some level of input validation. Assuming our first name is in cell A1 this is the formula we will put into cell B1:

=SUBSTITUTE("$sub = clean($_POST['sub']);", "sub", TRIM(A1))

This is effectively the same as:

$b1 = str_replace("\$sub = clean(\$_POST['sub']);", 'sub', trim($a1));

Now drag the formula using the drag icon in the lower right hand corner of cell B1 (or wherever your formula resides) and drag it down the length of the result column. The formula will be inserted into each cell, with calls to A1 automatically incremented to A2, A3, etc. Observe:

Now it is simply a matter of copying the result column into your source code, updating the formula and re-applying it to the lower cells in the column to complete the operation. Changing the formula to wrap the column name in backticks, then in single quotes with a $tring symbol will construct your mysql insert query; changing it to reflect `sub` = '$sub', will construct the body of an update query.

Installing Webcam Studio for GNU/Linux From Source on Gentoo

karma

WebcamStudio For GNU/Linux creates a virtual webcam that can mix several video sources together and can be used for live broadcasting over Bambuser, UStream or Stickam.

Ensure you have netbeans 6.x installed:

# emerge netbeans

Create and change to the directory /usr/src/wcs:

$ mkdir /usr/src/wcs
$ cd /usr/src/wcs

Check the source out of the CVS repository:

$ svn checkout http://webcamstudio.googlecode.com/svn/trunk/ webcamstudio-read-only

JNA should have been installed with netbeans however the symlink in the trunk/libraries/ directory must be adjusted:

$ rm /usr/src/wcs/webcamstudio-read-only/trunk/libraries/jna.jar
$ ln -s /usr/share/jna/lib/jna.jar /usr/src/wcs/webcamstudio-read-only/trunk/libraries/

Start netbeans. Under Gentoo the Subversion plugin will already be installed and activated. Click Open Project under the File menu and navigate to /usr/src/wcs/webcamstudio-read-only/. Select the trunk directory and click Open Project.

Once the project has loaded click Build Project under the Run menu. It will produce output similar to:

init:
Deleting: /usr/src/wcs/webcamstudio-read-only/trunk/build/built-jar.properties
deps-jar:
Updating property file: /usr/src/wcs/webcamstudio-read-only/trunk/build/built-jar.properties
Compiling 545 source files to /usr/src/wcs/webcamstudio-read-only/trunk/build/classes
Copying 178 files to /usr/src/wcs/webcamstudio-read-only/trunk/build/classes
compile:
Created dir: /usr/src/wcs/webcamstudio-read-only/trunk/dist
Building jar: /usr/src/wcs/webcamstudio-read-only/trunk/dist/WebcamStudio.jar
Copy libraries to /usr/src/wcs/webcamstudio-read-only/trunk/dist/lib.
To run this application from the command line without Ant, try:
java -jar "/usr/src/wcs/webcamstudio-read-only/trunk/dist/WebcamStudio.jar"
jar:
BUILD SUCCESSFUL (total time: 38 seconds)

Make sure the user you are running WebcamStudio as is part of the video group.

$ groups <username>
wheel audio cdrom dialout cdrw usb users portage scanner vboxusers roccat uucp

If the user is not a part of the video group add them:

# usermod -a -G video <username>

Test the application by running:

$ java -jar "/usr/src/wcs/webcamstudio-read-only/trunk/dist/WebcamStudio.jar"

Now build and install the kernel module:

$ cd /usr/src/wcs/webcamstudio-read-only/trunk/vloopback
$ make
# make install
# modprobe webcamstudio

To make the module auto-load on boot append it to conf.d/modules:

# echo "webcamstudio" >> /etc/conf.d/modules

Install the application to /opt/:

# mkdir /opt/webcamstudio
# cp /usr/src/wcs/webcamstudio-read-only/trunk/dist/WebcamStudio.jar /opt/webcamstudio/
# cp -r /usr/src/wcs/webcamstudio-read-only/trunk/dist/lib /opt/webcamstudio/

You may encounter this error if you do not manually build and install libwebcamstudio.so:

OS is Linux
27-Oct-2011 3:48:06 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'webcamstudio': libwebcamstudio.so: cannot open shared object file: No such file or directory
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:164)
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:237)
        at com.sun.jna.Library$Handler.(Library.java:140)
        at com.sun.jna.Native.loadLibrary(Native.java:374)
        at com.sun.jna.Native.loadLibrary(Native.java:359)
        at webcamstudio.exporter.vloopback.V4L2Loopback$CV4l2.(V4L2Loopback.java:75)
        at webcamstudio.exporter.vloopback.V4L2Loopback.open(V4L2Loopback.java:31)
        at webcamstudio.Main.selectOutputDevice(Main.java:221)
        at webcamstudio.Main.cboVideoOutputsActionPerformed(Main.java:1824)
        at webcamstudio.Main.access$700(Main.java:48)
        at webcamstudio.Main$5.actionPerformed(Main.java:794)
        at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
        at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
        at webcamstudio.Main.initVideoDevices(Main.java:192)
        at webcamstudio.Main.(Main.java:92)
        at webcamstudio.Main.main(Main.java:1901)

Return to /usr/src/wcs/webcamstudio-read-only/trunk/vloopback/:

$ cd /usr/src/wcs/webcamstudio-read-only/trunk/vloopback
$ gcc -c -fPIC libwebcamstudio.c -o libwebcamstudio.o    
$ gcc -shared -Wl -o libwebcamstudio.so.1.0.1  libwebcamstudio.o
# cp libwebcamstudio.so.1.0.1 /usr/lib64/
# ln -s /usr/lib64/libwebcamstudio.so.1.0.1 /usr/lib64/libwebcamstudio.so

Substitute lib/ for lib64/ on 32-bit systems. Now the application can be run from the command line:

$ java -jar "/opt/webcamstudio/WebcamStudio.jar"