HD and the loss of brain cells
Huntington’s disease is caused by neurodegeneration, or loss of brain cells called neurons. Early in HD, this cell loss particularly affects neurons in a part of the brain called the striatum. Even within the striatum, one type of neuron called a ‘medium spiny neuron’ is most susceptible to degeneration. These neurons make up 96% of the striatum, so losing them is bad news for this part of the brain.
The symptoms of Huntington’s disease reflect this distinctive pattern of cell loss. The striatum helps to control our body’s movement and emotions, as well as performing cognitive tasks, such as learning, multi-tasking and problem solving. These are all areas reported by patients to be affected by Huntington’s disease.
The problem with neurodegenerative diseases like HD is that once vulnerable neurons like the medium spiny neurons are lost, they do not grow back. As far as we understand now, once they’re gone, they’re gone.
The brain can cope with loss
The TRACK-HD project, led by Professor Sarah Tabrizi, used MRI scans to reveal a noticeable loss of brain tissue early in the course of the disease. This progression of neuron loss is seen even before symptoms are reported by the patients.
In one way, this is bad news — the brains of HD mutation carriers are shrinking even before they experience symptoms that we call ‘HD’. But another way of looking at this is very hopeful — despite the fact that most neurons cannot regenerate, the brain can still show remarkable flexibility to compensate and maintain normal function.
Since degeneration of the medium spiny neurons in the striatum causes the symptoms of Huntington’s disease, one approach to treatment would be to replace the neurons that have been lost.
Cell replacement in brain diseases
While this may sound a little like science fiction, it might be more feasible than once thought. For treatment of Parkinson’s disease, this approach has already been undertaken with moderate success.
Parkinson’s disease is caused by degeneration of a tiny but important set of neurons that produce a brain chemical called ‘dopamine’. Loss of these cells causes tremors, stiffness and poor coordination.
In clinical trials, cells from fetal tissue have been transplanted into the brains of patients with Parkinson’s Disease, resulting — in some cases — in marked improvements in their movement abnormalities and overall health.
However, compared to Huntington’s Disease, treating Parkinson’s by cell replacement therapy is relatively easy. Since loss of dopamine in Parkinson’s Disease brains causes its symptoms, all that is needed to treat the disease is replacement of the dopamine source. To have a beneficial effect, it only matters that transplanted cells are able to grow and release dopamine.
Unfortunately, this is not the case in Huntington’s disease. Medium spiny neurons in the striatum have many intricate connections with other neurons in the brain. The medium spiny neurons are required to both receive information from these other regions, as well as pass the information along.
Not surprisingly, this process can get pretty complicated, as the formation of connections between neurons starts when we’re developing in the womb and continues throughout our lives. These connections form and reform based on genetics and experience.
So, we might not expect that replacing medium spiny neurons would repair the devastating effects of Huntington’s disease, because it’s unlikely that replacement cells would be able to re-form the specific connections with other cells in the brain.
Proof of concept in a mouse brain
Interested in testing this this cell replacement idea, a team at the University of Wisconsin lead by Su-Chun Zhang recently injected replacement cells into mice whose striatum had been damaged. They found that the transplanted cells are capable of forming new connections in an adult mouse brain, and even more importantly, that these connections can improve the movement abnormalities of the mouse model.
The cells transplanted into the brains of mice were generated from human embryonic stem cells. Human embryonic stem cells are obtained from early stage embryos discarded after in vitro fertilization (IVF) procedures. These cells can develop into every cell type in the human body, including neurons and other brain cells.
The advantage using embryonic stem cells, as opposed to obtaining neurons from fetal tissues, is the ability of stem cells to continuously regenerate, creating a more consistent source of tissue.
Sonic hedgehog: the secret to spiny neurons?
What makes one cell type different from another is the collection of proteins that they produce, which allows the cells to take on different shapes and functions.
For example, a neuron, which transmits impulses that allow us to think and move, has a very different role in the body from the cells that line our intestines and absorb nutrients. To make a neuron from a stem cell, the action of proteins called transcription factors make the stem cell gradually more specialized. Transcription factors work by turning on some genes, while turning other genes off.
Zhang’s team treated the human embryonic stem cells with a transcription factor called ‘Sonic Hedgehog’ or a chemical that mimics its affects, and triggered the cells to transform into neurons. These man-made neurons looked like mature medium spiny neurons — the specific cells lost early on in Huntington’s disease.
Replacing neurons in the mouse brain
In the past, before the genetic basis for Huntington’s disease was understood, researchers would model the disease in mice by treating them with a neurotoxin called Quinolinic acid.
Quinolinic acid treatment doesn’t cause HD, but it causes medium spiny neurons in the striatum to die, which also happens in HD.
These days, mouse models are much more advanced — they carry CAG repeat mutations in the mouse huntingtin gene or an extra copy of a mutant huntingtin gene. These genetic mouse models experience physical and behavioural symptoms similar to the real disease.
In their recent work, Zhang’s group used Quinolinic acid to mimic the cell loss in Huntington’s Disease, and then replaced the lost cells by injecting the medium spiny neuron-like cells they generated from human embryonic stem cells.
They were happy to discover that not only did the newly formed neurons grow in the brains of the mice, but they were also able form the correct connections with surrounding tissues. When the movement functions of the mice were tested, they showed moderate improvement in symptoms.
Hopes and limitations
This work is hopeful, as it suggests that transplanted neurons have more capacity to form functional connections than previously predicted. That means that cell-based therapy for Huntington’s disease could be a real possibility in the future.
However, it must be noted that this study uses a Quinolinic acid treated mouse model, where the other, unaffected neurons are healthy. That’s not the case in a real HD-affected brain. The formation of healthy connections may be more difficult in HD patients.
Furthermore, the mice used in this study received radiation treatment to disable the immune system, meaning that they will not reject the transplanted tissues. Although the brain is usually protected from our immune systems, there is still a be risk of rejection of the transplanted tissue after surgery. So if this were tried in human patients, they’d likely need to take drugs to suppress the immune system, putting them at risk of developing serious infections.
With cell-based therapy, especially using tissues generated from embryonic stem cells, there is also a risk of uncontrolled cell growth — which could result in cancer. There are real questions about how we stop the transplanted cells from growing when they’re done replacing the dead cells.
Clearly, cell replacement treatments will need to be further refined before any clinical trials can take place. But this new piece of work suggests that new neurons might be more flexible than we previously thought.
You expect me to what?!
AS THE legions of gym bunnies and jogging enthusiasts who race out into the spring sunshine every year clearly demonstrate, running can be fun. More specifically, running triggers the release of brain chemicals called endocannabinoids that create a potent feeling of pleasure. As their name suggests, these endocannabinoids work in the same way as the active ingredient of marijuana.From an evolutionary standpoint this surge of endocannabinoids, and the “runner’s high” it creates, make sense. For ancient humans, remaining fit enough to run after game and away from predators and enemies was vital for survival. Yet whether other mammals are also driven to exercise by endocannabinoids has remained a mystery. Now a study led by David Raichlen of the University of Arizona has revealed that the runner’s high does exist in other species, but not in all.Dr Raichlen hypothesised that endocannabinoid-driven exercise highs would be found in those mammals that gain an evolutionary benefit from being fast on their feet: antelopes, horses and wolves, for example. However, he also...
THE phrase “indoor solar power” sounds like an oxymoron. But there is growing interest in the idea of using photoelectric cells to run gadgets as well as power grids—and doing so even when those gadgets are inside buildings. Much of the light these cells used would, of necessity, come from incandescent bulbs, fluorescent tubes and light-emitting diodes (LEDs) rather than through the window from the sun. But if the right sorts of cells were available this could be cheaper than constantly replacing the batteries that currently power electronic gizmos.On April 8th G24 Innovations, a firm based in Wales, announced that it may have come up with just such a cell. The latest version of its special, dye-based photoelectric devices has set a new record for the conversion of light from bulbs into electricity: an efficiency of 26%, compared with the 15% which previous ones can manage. That lifts dye-based cells to the point where they might be widely deployable for indoor power.Dye-based cells are similar to the silicon-based variety found on rooftops around the world in that both rely on a semiconductor to assist the conversion of luminous energy into the electrical sort. The difference is that in the case of silicon cells, this conversion happens directly. That means the frequency of light absorbed is constrained by the physical properties of silicon itself.In the case of dye-based...
Less is more
IF YOU are a suspicious type you may be disturbed by the fact that, despite reassurances of the safety of the procedure, dentists and their technicians, when administering X-rays, usually step out of the room while the deed is done. Not only that, they often drape a lead-lined apron over your body to protect your vital organs. Well, all but one: your brain.A study by Elizabeth Claus, of Yale University, just published in Cancer, suggests your suspicions might be justified. Dr Claus thinks she has identified, in those who have had dental X-rays often, a significant rise in the admittedly small risk of developing a brain tumour.In rich countries, five men in every 200,000, and twice as many women, develop tumours called meningiomas that affect the membranes surrounding the brain. Meningiomas account for a third of primary brain tumours. Only about 2% of them are malignant, but non-malignant does not mean non-dangerous. Even a “benign” meningioma can kill. Around 30% do so within five years of diagnosis. Symptoms can include seizures and blindness, and...
ONCE upon a time the overstressed executive bellowing orders into a telephone, cancelling meetings, staying late at the office and dying of a heart attack was a stereotype of modernity. That was before the Whitehall studies, a series of investigations of British civil servants begun in the 1960s. These studies found that the truth is precisely the opposite. Those at the top of the pecking order actually have the least stressful and most healthy lives. Cardiac arrest—and, indeed, early death from any cause—is the prerogative of underlings.Such results have since been confirmed many times, both in human societies and in other primate species with strong social hierarchies. But whereas the pattern is well-understood, the biological mechanisms underlying it are not. A study just published in the Proceedings of the National Academy of Sciences, however, sheds some light on the matter.In it, a group of researchers led by Jenny Tung and Yoav Gilad at the University of Chicago looked at the effects of status on rhesus macaques. Experience has shown that these monkeys display the simian equivalent...
I don’t own a Chomebook; and it’s been a couple of years since I’ve tried the Chrome OS — a pre-alpha release or something. Anyway, the new version came out yesterday. Most of the Web was all ga-ga over the new window manager Aura, which intrigued me enough to give it another try.
So, I grabbed the latest build from Hexxeh — to be precise, it’s the open source Chromium OS, “Vanilla” edition (Version 20.0.1096.1; and not the 19.0.1048.17, the rest of the Web is talking about). Hexxeh also offers a Lime version (that supposedly supports additional Wi-Fi drivers and such), but that one failed to boot on my Samsung RV509 laptop. Good thing is the Vanilla build didn’t have any issues with my Broadcom wireless Ethernet.
I played with it for a few hours this afternoon, and here are my notes…
The bootupAfter copying the image into a USB key using the dd command, the bootup time left me quite pleased — around 20 seconds for first boot, 12-13 seconds for subsequent bootups, and 5-6 seconds for shutdown. And this is on a not so state-of-the-art hardware.
Instead of a display manager (like KDM or GDM), it starts of with a four-step wizard:
Right after login it opens the Chromium browser with a welcome message which shortly redirects to a touchpad tutorial page — tap for left click, two-finger right click, two-finger scroll, and drag and drop. Besides left click using touchpad tap, none of the other tests were successful on the RV509. Maybe it only works with official Chromebook touchpad hardware; nonetheless all the other three worked across the OS. However, it made no difference since moving the cursor from one place to other turned out to be really slow (no improvements after the setting the “touchpad speed” to the maximum from system settings). No worries, I attached a USB mouse and things were normal.
The desktop UI pretty much looks like what we are traditionally used to — a panel at the bottom and the rest is place for windows. The Chromium window only has a maximise and close button (no minimise). Maximising a window hides the panel under it. The window manager even supports features like snap to edge.
The panel, on the other hand, has a Chromium icon on the extreme left to launch a new window, or open a new tab if the browser is already running. To launch a new window you can press Ctrl+N as you would on a regular desktop OS. Next to it sits the Applications icon.
The extreme right side of the panel has what we typically call the system tray — with the clock, keyboard type, Wi-Fi signal, and battery indicator icons. Clicking on the system tray gives you options to system settings, screen brightness and volume controls, Bluetooth settings, date & time (clicking which takes you to the date and time configuration setting — which otherwise is hidden under system settings as “advanced settings”), the battery power indicator, besides links to shut down, sign out and lock screen.
Interesting deal with the sign out link is it takes you back to the display manager, and this time shows an option to login as guest. Guest login launches Chromium in incognito mode.
Back to the date and time, I think it’s very silly for the system to default to UTC – 0700. Either it should ask the user during system setup for a time zone, or intelligently guess from location access based on IP address or something similar.
By the way, right-clicking the desktop pops just a single option — “Set wallpaper”. But it turns out we’ve to be happy with the preset defaults, with no way to set one of our own. Would have been nice if, at least, it was able to fetch pictures from the user’s Picasa account.
Apps and a Web StoreNow on the Applications button, to begin with, you’ll only find the Chromium browser, a file manager and the Chrome Web Store icons. The latter two will, obviously, launch inside Chromium. Time to fill up the system with some apps.
Of course, for Google, apps aren’t what we’re used to on a regular desktop — we can’t have GIMP, Libre Office, Firefox and the like. Apps here are whatever holds inside of the Chrome Web Store — browser-based applications, which more often than not, are links to Web-based services’ websites. But we are familiar with that already. I’ll not get into the sort of apps available here, because those are accessible to anyone with a Chrome/Chromium browser at their disposal at all times.
Anyway, I randomly installed a few apps just to fill up the apps launcher screen.
File managementComing to the file manager, it has a minimalistic and clean UI as you can see in the following screenshots. By default, it mounted all my hard disk partitions, and somehow always chose to open the first available hard disk partition after launch — see the vmlinuz file, and var, tmp, etc, directories? While the OS saves everything in a folder called Downloads (like the browser does by default on a regular desktop OS too), I wonder why it doesn’t default to this directory — after all, the Downloads directory here is complimentary to the user home directory on other distros.
Things like Ctrl+A, Ctrl+C, etc., work as expected inside the file manager. However, the odd thing is, when you paste something, it doesn’t immediately show up sometimes — you gotta hit the refresh button. That reminds me, keyboard shortcuts like F5 to refresh a page, or Alt+F4 to close a window, don’t work. I wonder why!
On the up side, the online Google Docs directory is also mounted by default and we can copy paste between the local and the online storage like we do between two regular directories. Then again, copying a google document like word processor file locally and double clicking that has no effect. The only things that seem to work with double clicks are pictures, archives and FOSS multimedia files formats.
I gotta admit the browser-based picture viewer looks dandy. Usual keyboard shortcuts like right arrow key to view next, and left arrow key to view previews photos work as expected. Besides, it also comes with basic image editing features like crop, rotate, brightness controls, etc.

Image viewer comes with basic image editing facilities
Accessing multimedia content onlineThere’s a major goofup with Adobe Flash installation in this build. As you can see on the following screenshots, both Grooveshark and Google Music indicate that Flash is missing. Both services provide a helping hand with a direct link to Adobe’s website for installing Flash. Meanwhile, Adobe reports latest version of Flash is already installed.
Next thing to check was YouTube, and although it opened the HTML5 videos instead of Flash, videos were basically still frames. What I mean by this is, you can see the progress bar racing towards the right while downloading video, but the video itself decides to sit pretty on the very first frame. No amount of pause and play will make it roll… in fact, dragging the slider will take you to the video frame for that very position, and again sit pretty there.

YouTube's HTML5 video player doesn't work
Now, considering its inability play common/popular multimedia file formats stored locally on your disk (due to lack of installed decoders), and add to that its inability to access media content online — it’s sort of like a sign for the multimedia junkies to stay off of this OS. Although, I’ll give Chrome OS the benefit of the doubt, and blame it on the specific dev release version that I’m using here.
Regular browsing and finishing touchesNothing to report here. You browse the Web as you would using a regular Chrome/Chromium browser installed on your system. And, yes, you do occasionally encounter a crash. You can check for misbehaving apps/websites from the Task Manager application (browser settings –> view background pages).
I’m assuming the Stats for Nerds link on the Task Manager application (see above screenshot) is to please us nerds with some “detailed” system data. But wouldn’t it been nicer if a terminal application was also available so that us nerds could use regular command-line utilities?
I guess that’s more or less it. Although, the new UI is a major face-lift for the Chrome OS, this distro seems only good for casual reading, browsing and electronic communications, and nothing serious. I do understand that this is what netbooks are for, but under it’s current incarnation, I don’t really see any real need for Chrome OS — a regular distro with KDE, GNOME or something else is a much better option in my books.
I sure can understand it’s inability to play/access/open patent-encumbered and/or proprietary file formats like mpeg, avi, mp3, rar, etc., but what about PDF, ODT and CSV files? Silliest of the issues were things like — the system’s inability to open PDF files stored on your Google Docs directory when accessed from within the file manager, although you can open them just fine when you access them from the docs.google.com website.
It should also be able to intelligently guess the file/mime types. For example, it opens any file with a .txt extension just fine, meanwhile would throw an error if a file has a .conf or .csv extension. Besides, just like any other distro, there should be a way to install support for the patent-encumbered formats — as long as the user comes from a country where software patents are illegal. MP3, AVI, MPEG, etc., all have FOSS decoders available after all.
By the way, check the above screenshot where it plays an Ogg Vorbis album. The songs in that album are property tagged with song titles, album artist names, etc. Yet, it wasn’t able to read anything but the file name. Thankfully, it could play the song.
The only thing significant in Chromium OS that I notice is the battery indicator showing around 5 hours of battery life (when fully-charged) compared to 3 hours for regular distros on a 6-cell laptop. But just for battery life, would you be willing to give all the other flexibilities? As for accessing multimedia content online, reading, browsing and communicating on an Android phone or a tablet bundles a much more mature experience — after all those apps from Google Play (Android Market) will not only help you store/access data on the cloud, but also let you, yes, store and access, data on your local SDCard.
On a side note: Thankfully, Hexxeh has created a persistent image, so data/settings across reboots stays in the USB. Additionally, this goes to Google… even after overwriting the USB with a fresh image, and up on a fresh sign-up to Chromium OS, the apps that I had downloaded earlier somehow came back automagically. If only it was able to keep the timezone in memory? Sigh!Related Posts:
This article explains the local (client-side, browser) storage feature in HTML 5.
Since the introduction of HTML5, the technology is making an equal impact in the desktop and mobile space. It has completely changed what is possible with a Web interface. The new features are so powerful they bring Web pages closer to Apps. The new features include a plugin-free paradigm, with the introduction of tags like <video>, semantic markup like <header>, new form elements like email, and client-side storage. There is a constant drive to make browser-specific incompatibilities disappear.
The need for client-side storage has been felt with the increasing use of Web for e-commerce, with the aim to enhance the user experience by storing user preferences, shopping cart items and user-session information. Cookies have served Web developers for long, but have size limitations (4 KB each) and need to be transferred from client to server. The importance of offline storage has increased with Web app development using HTML5. There are times when the user is not connected to the Internet (e.g., composing an email in an airplane using Internet Web app to send later), or when data needs to be saved across sessions (e.g., a Web gaming app needs to store the session state, like the board positions for chess, so that the game can be resumed later).
With HTML5, two new objects are introduced for client-side storage. They are localStorage and sessionStorage. We will focus on localStorage in this article. New object sessionStorage is to store data for one session. Before introduction of localStorage in HTML5, developers had to choose from various vendor- or browser-specific options like Google Gears, userData in IE, and Local Shared Objects used in Adobe Flash Player.
An introduction to localStoragelocalStorage is also called Web Storage or DOM storage. It is a database that can store only key-value pairs, and the value data-type should always be a string. At first, this might seem a serious limitation, but using along with JavaScript arrays and JSON we can achieve quite a bit. The good news is that this feature is supported in the latest versions of all browsers, both on desktop and mobile environments (Android and iOS). Also, the developer gets a huge 5 MB of storage per domain.
The code snippet below checks if the browser supports localStorage. The code in this article has been tested on Google Chrome 17.0.963.56 and Firefox 11.0. There is a small difference in behaviour when the code below is executed in IE: if the HTML file is opened locally (file:///C:/Web/mylocaltodo.html), IE throws an error — but if the same file is hosted on a server (even localhost), it just works!
In the following code, localStorage is an object under window and can be referenced via the window object, or directly as localStorage.
function browserCheck() { if (typeof(localStorage) == 'undefined' ) { alert('Your browser does not support HTML5 localStorage. Try upgrading.'); } }localStorage support on browsers/platformsThis table lists the minimum version of each browser required to support localStorage:
IEFirefoxSafariChromeOperaiPhoneAndroid8.0+3.5+4.0+4.0+10.5+2.0+2.0+Operations on localStorageThe methods of localStorage include setItem(), getItem(), removeItem() and clear(). Here is sample code to add a record to localStorage using setItem():
// max limit reached exception try { localStorage.setItem(itemId, "Sample Value"); } catch (e) { if (e == QUOTA_EXCEEDED_ERR) { alert('Quota exceeded!'); } }We will use getItem() and removeItem() in the Web app that we will develop. Note that localStorage.clear() removes all entries from the database, so use it with caution!
Debugging localStorageThe quick and easy way to view the localStorage database is in Chrome, as part of Developer Tools. Select the wrench menu at the top-right corner, go to Tools –> Developer Tools. Click the Resources tab, select Local Storage and then Local Files. The right pane should display key-value pairs (Figure 1), if the database has data. For debugging in Firefox, you need the Firebug extension.

Figure 1: Database view
MyLocalTodo: An example of the use of localStorageLet’s try implementing a My Local Todo Web application, which can work offline, with minimal code. Besides localStorage, we will also use HTML5 features such as placeholder and required.
Application UI
Figure 2: Task listing
In this simple to-do application, the first (text) field “New Task” is the task description; the second is task priority, and third the due date. Only the first is mandatory. If the user clicks “Create Task” without entering it, the browser shows a tooltip below the text field (Figure 3).

Figure 3: Tooltip notification for mandatory entry
The default task priority is “Normal” and the due date is today.
<body onLoad="browserCheck();getTasks();"> <h3>My Local Todo</h3> <form name="todoForm" onSubmit='addTask();'> <input type="text" size="50" name="task" placeholder="New Task" value="" autofocus required> <select id="priority"> <option value="high">High</option> <option value="normal" selected>Normal</option> <option value="low">Low</option> </select> <input type="text" size="10" name="duedate" placeholder="dd/mm/yyyy"> <input type="submit" value="Create Task"> </form> <p id="theTaskList">Nothing much to do!</p> </body>There are three functions that perform operations on localStorage:
Here are some ideas that could be implemented to build on the skeleton app:
Some quick ideas:
References
It’s as simple as this: have SSH listen on the standard port 22, and when you check your server logs, you see all sorts of random people trying to login to your server. Same thing goes for any content management system with an obvious admin URL. A good example is WordPress. Unless you do some voodoo hacks to change the location of URLs (yes, I exaggerate), it can be accessed from example.com/wp-admin/ or example.com.com/wp-login.php.
The htpasswd way!The easiest thing to do is lock down the wp-admin folder with an htpasswd (as we showed you in an earlier article on Nginx). On Apache you follow a similar directive.
It’s even easier on a shared hosting environment. Simply login to the Web host’s admin console, fire the app icon that says something similar to “password protect directories”, password protect the wp-admin directory, and you’re done. From next time on, when you go to example.com/wp-admin/it will prompt for a second layer of authentication before it brings up the WordPress login screen.

Web server directory access authentication for accessing /wp-admin/
This is good enough for most cases, however, it still doesn’t stop people from accessing example.com/wp-login.php, because the wp-login.php file is on the root of WordPress directory. (Note that in this case, once WordPress authentication is successful, it will still throw the htpasswd authentication pop-up before redirecting you to wp-admin.) Naturally, it makes many of us uncomfortable seeing people trying guess work.
Let’s take an easy example. Install the Limit Login Attempts plugin (it helps you set a limit to the number of failed logins from a particular IP address, and based on that bans it for a set period of time).
What’s interesting is you still see access attempts from random IPs even after setting the htpasswd… because from example.com/wp-login.php, the htpasswd kicks in only if the WP authentication succeeds (as I mentioned).
Open the settings page of Limit Login Attempts plugin and you see something like the following screenshot.

Random login attempts on the WP backend
So, people can keep the guess-work business going as long as they keep changing their IP address after Limit Login Attempts bans their IP for a time frame.
The real obvious thing to do is password protect the wp-login.php file too. The downside is, the admin console of a shared hosting service most probably won’t have a dedicated application to handle that — the “Password Protect Directories” app seems to be only good for, well, directories.
The clue lies in the wp-admin/.htaccess file that app creates. Fire your Web host’s file manager application, open that file — it should look somewhat like this:
AuthType Basic AuthName "protected area" AuthUserFile /path/to/.htpasswd AuthGroupFile /path/to/.htgroup Require group myNewGroup Require user myNewUserWhy not use the same username/password to protect wp-login.php. Open .htaccess file on the root directory of WordPress and append the following in it:
<Files wp-login.php> AuthType Basic AuthName "protected area" AuthUserFile /path/to/.htpasswd AuthGroupFile /path/to/.htgroup Require group myNewGroup Require user myNewUser </Files>Simple, isn’t it?
This way we save the unnecessary processing load on PHP and MySQL for unauthorised access requests. However, the Web server connection remains open (for a while, at least) for htpasswd authentication.
Apache .htaccess when you have a static IPWhat is we want the Web server to close the connection with an error as soon as it detects an unauthorised access — bypassing the password prompt?
The job becomes a bit easier if you have a static IP address from where you always login. Then by appending the following directives in .htaccess files of WP’s root directory:
<Files wp-login.php> Order Deny,Allow Deny from all Allow from xx.xx.xx.xx </Files>…and wp-admin subdirectory:
Order Deny,Allow Deny from all Allow from xx.xx.xx.xx…(where xx.xx.xx.xx is your dedicated IP) you take care of the issue.
Well, if you don’t have static IPs (in case of most DSL broadband connections) or you need to login from different places (office, home, friends’ place, etc.), this is not a solution, is it? (Yes, you can login to your Web host’s backend and keep changing/appending the the new IPs in the .htaccess files, before making a pass at the WP login — a major pain in the neck, I would say.)
But this, or the htpasswd method, is the best you can do on shared hosting environments, unless your Web host also gives you SSH access.
Using Socks5 proxyWe’ll create a SSH tunnel, and use it as a socks5 proxy for Firefox to tackle the situation.
ssh -C2qTnNv -D 8888 username@example.comAfter you authenticate with your password, it won’t return you the prompt (like you’d expect from a typical ssh connection.) The argument that’s important is -D 8888, which basically tells ssh to create a tunnel between port 8888 of your localhost (127.0.0.1) and the IP address of example.com. We also added the verbose mode with the -v so that we can see all activities on the session.
<<SNIP>> debug1: Next authentication method: password user@example.com's password: debug1: Enabling compression at level 6. debug1: Authentication succeeded (password). Authenticated to example.com ([xx.xx.xx.xx]:22). debug1: Local connections to LOCALHOST:8888 forwarded to remote address socks:0 debug1: Local forwarding listening on ::1 port 8888. debug1: channel 0: new [port listener] debug1: Local forwarding listening on 127.0.0.1 port 8888. debug1: channel 1: new [port listener] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. <<SNIP>>Now before we can use this tunnel to access WP login (or generally visit websites), we need to set the proxy in Firefox. Go to the browser proxy settings dialogue and enter the IP details as noted in the following screenshot.

Configuring Firefox to use Socks5 Proxy
An additional step is required if you’re using a service like CloudFlare for accelerating your website. Open about:config (by typing it in your FF’s URL bar), and filter for “dns”. Change the directive that says network.proxy.socks_remote_dns from false to trueas shown in the following screenshot.

Changing about:config settings in Firefox
This additional step will also send DNS queries through the tunnel (that otherwise would have resolved over your normal Internet gateway).
Now go to a service like whatismyipaddress.comand see where it says you’re located at :-)

The world seems to think I'm connecting from my Web server
Anyway, copy this IP (which is typically your shared server’s IP; although it’s sometimes different — for example, in case of Media Temple’s gs shared hosting setup, as I realised while writing this article) and paste it in place of xx.xx.xx.xx in the Allow from statements of .htaccess files we mentioned earlier.
That’s it, we’re done! Launch some other browser besides Firefox, and try to access www.example.com/wp-login.phpand you should see this:

The Web server closes a connection with a 403 error the moment the IP address doesn't match; no more prompts, etc.
While on Firefox, the same URL gives you access to WP login screen. Neat eh?
When the Web server is NginxIf you’re on a vps, or dedicated server, chances are you’re running nginx as a web server instead of Apache (like we are). To restrict WP logins to a specific IP address add the following location blocks to your Nginx server configuration files:
location /wp-admin { allow xx.xx.xx.xx; deny all; } location ~* ^/wp-login.php$ { allow xx.xx.xx.xx; deny all; try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php-fpm.sock; }Restart Nginx server. Henceforth, if you don’t use the socks5 proxy, you’d see this.

Nginx also likes to throw a 403 error and close the connetction
Note that, the fastcgi parameters will change depending on how you’ve setup your nginx configurations — so make sure you adapt the above to your settings.
While you’re on VarnishMeanwhile, in case you’re running Varnish as a reverse proxy in front of your Web server, like we are, then adding these rules in your Web server’s config files won’t make any difference. This is because the Web server will see all requests are coming from 127.0.0.1. Although, technically you can make use of the X-Forwarded-For directives to tackle this, but why not let Varnish directly handle this? It would be faster by saving your Web server some trouble.
Open your default.vcl file, and append the following highlighted lines at the beginning of your vcl_recv section:
sub vcl_recv { # Ban outside access to wp-admin if (req.url ~ "wp-(login|admin)" && !client.ip ~ internal) { # Have Varnish throw the error directly. error 403 "Hey there sneaky pants! What are you trying to do?"; } # Your existing recv-routines follow... }Here we’re asking Varnish to throw a 403 error directly by setting an acl for wp-login.php and wp-admin. Time to put the server IP by creating this acl internal that we defined:
acl internal { "xx.xx.xx.xx"; }Restart the varnish service. Here’s what you’ll see now when you try to login without creating the SSH tunnel:

Varnish's way of tackling unauthorised access
That’s from our production server — don’t mind the language :-)
Like you can see, as long as you can ssh into your server to create a tunnel, you can restrict the admin access to yourself. Besides, the best part is, since SSH is an encrypted protocol, you don’t have to worry about someone sniffing for your login passwords that typically travel over an unencrypted HTTP protocol in WordPress.
Guess I’m done here. You can pretty much adapt these to any other CMS by changing a few things like wp-admin and wp-login.php with your specific admin authentication URLs. Of course, connections over VPS is another option that you can try rather than creating socks5 proxies this way.
ReferenceRead this excellent article on calomel.org for a deeper understanding of socks5 proxy, and other associated Firefox about:config tricks.Related Posts:
First week of the month is typically when the KDE team releases its maintenance updates. These releases are nothing to get excited about — but they still hold water for us users. Why? The project steers clear of the glitches introduced with point zero releases towards stability, by squashing bugs and adding minor feature improvements.
Looking at the changelog, there are 5 feature improvements attributed to two specific utilities — Kwin window manager, and KGpg encryption tool. Now you can encrypt multiple folders at once using Kgpg from within Dolphin — neat feature for the privacy conscious folks amongst us.
Meanwhile, the remaining four enhancements are related to xrender support in the KDE window manager, obviously in the areas of desktop effects. While most of us use the OpenGL compositing (KDE defaults to that) in place of xrender, those of us who face issues with desktop effects (generally due to proprietary graphics drivers) can give xrender a try and see if there are any improvements. We’d really like to hear about it — personally, I don’t remember needing to using xrender since KDE 4.1.x days. [In case you're wondering where it's at -- open System Setting --> Desktop Effects --> Advanced tab.]
Anyway, the rest are all bugfixes — the most important of which is a fix for the annoying bug #296965. It’s like this: Insert a disc, do whatever you have to; and then when it’s time to eject it using the Device Manager widget (most of us eject discs/USB keys using it), the eject button would just sit there as if its just an image and not a button.

Eject button in Device Manager just sits pretty doing nothing
It would gracefully eject/umount USB keys on the other hand. Anyway, this has been sorted in this release.
That’s about it to report. If you’re already running KDE 4.8.1 (or 4.8.0), I guess it’s time to grab the updates — provided packages are available in your distro’s package repository. If you’re still using KDE 4.7.x, maybe it’s time you upgraded too.
While latest updates are already available in openSUSE’s KDE stable repo and Arch’s Extra repo, the Kubuntu Backports PPA is yet to populate with the latest updates.
Of course, if you’re running KDE 4.7.x on openSUSE 12.1 or Kubuntu 11.10 with the default set of repos running a distro upgrade won’t fetch you these.
Follow these steps…
In Kubuntu, run:
$ sudo add-apt-repository ppa:kubuntu-ppa/backportsAnd then:
$ sudo apt-get update && sudo apt-get dist-upgradeIn openSUSE 12.1, run the following command as root to add the repo.
# zypper ar http://download.opensuse.org/repositories/KDE:/Release:/48/openSUSE_12.1/ KDE48And run a distro upgrade:
# zypper dupDo make sure you don’t have any incompatible repositories, because that might bork your system (or worst case scenario, render you DE useless). Just to be doubly sure, before you proceed in openSUSE, read this. I insist, because I’ve had issues in the past just because I had added the UpdatedApps and Extra repos before KDE 4.8.0 was released in January, and when I added the 4.8 repo later, I simply forgot to remove the those. End result? KDE kept crashing right after entering password in KDM :-)
Here’s a screenshot — yes, it looks pretty much the same as expected :-P

Shiny new KDE 4.8.2
Let us know of your experiences with the update in comments below.Related Posts:
Home, sweet home
ONLY one drug of every ten successfully tested in laboratory animals ends up working in people. One reason, of course, is that mice are not men. Another, though, might have to do with the fact that whereas human patients are afforded all manner of creature comforts, their animal proxies are not.Although medical science’s favourite critters relish temperatures of a little over 30°C, laboratories routinely keep them at five or ten degrees below that. This is not in order to torture the beasts but, rather, because when kept warm they are unmanageably aggressive. The downside is that they have to eat more than they otherwise would, in order to keep their bodies warm. That changes their physiology. And that in turn alters the way they metabolise drugs, with possibly confusing results.Joseph Garner, of Stanford University, thinks the answer is to keep the labs cool, but let mice cope with the low temperatures as they do in their natural habitat: not by eating more but by building nests. So far, though, no one has a clear idea of how much nesting material is needed to keep...
ONE stereotype of wisdom is a wizened Zen-master smiling benevolently at the antics of his pupils, while referring to them as little grasshoppers or some such affectation, safe in the knowledge that one day they, too, will have been set on the path that leads to wizened masterhood. But is it true that age brings wisdom? A study two years ago in North America, by Igor Grossmann of the University of Waterloo, in Canada, suggested that it is. In as much as it is possible to quantify wisdom, Dr Grossmann found that elderly Americans had more of it than youngsters. He has, however, now extended his investigation to Asia—the land of the wizened Zen-master—and, in particular, to Japan. There, he found, in contrast to the West, that the grasshoppers are their masters’ equals almost from the beginning.Dr Grossmann’s study, just published in Psychological Science, recruited 186 Japanese from various walks of life and compared them with 225 Americans. Participants were asked to read a series of pretend newspaper articles. Half described conflict between groups, such as a debate between residents of...
AMERICANS may no longer fret about being showered with nuclear-tipped ballistic missiles, but the idea that an atom bomb might enter their country in a shipping container or on the back of a lorry is still one that keeps the security services awake at night. They may sleep more easily, though, if an idea being developed by Michael Staib of the Florida Institute of Technology, in Melbourne, and his colleagues comes to fruition.Mr Staib is using naturally generated subatomic particles called muons to look inside places where such bombs, or the nuclear explosives needed to make them, may have been hidden by smugglers. At first sight this seems crazy. The muons in question drizzle down from the atmosphere at the rate of only one per square centimetre a minute. But, as Mr Staib told a meeting in Atlanta of the American Physical Society on April 2nd, this is enough for a practical muon scanner.Muons are like electrons, though heavier and unstable. They are produced when cosmic rays (fast-moving atomic nuclei from space) hit the atmosphere. The reason they might be useful for detecting nuclear explosives is that they are scattered more by heavy atomic nuclei, such as those of uranium and plutonium, than by lighter ones—even including relatively heavy elements such as lead. Clever electronics can tell the difference. Someone wanting to smuggle uranium or plutonium might shield...
This article explains the new challenges in enterprise integration caused by the advent of big data, and presents some approaches to overcome them.
Big data is the latest buzz-word in the industry. At the basic level, big data is just that: large amounts of data that cannot be handled by conventional systems. With increases in hardware capacity, our definition of what constitutes a conventional system changes, and so does the threshold of big data, which is not something new but has always been around. It’s just that the threshold of what constitutes big data has changed. Today, the threshold for big data may be terabytes (1012 bytes). Soon, it will be petabytes (1015 bytes). Twenty years ago, there were very few systems that could process gigabytes (109 bytes) of data in an acceptable timeframe. So gigabytes would have been the lower threshold of big data at that time.
IntegrationIntegration is needed when we have to connect two or more software systems together. Large enterprises will have tens or hundreds of systems to connect together. Since the number of systems involved in integration could be large, the amount of data that flows across these connections will also be large.
How does big data impact enterprise integration?With the advent of big data processors, more and more organisations recognise the value of big data analytics, and the need to process big data within enterprises is increasing. This will lead to large amounts of data (which is a subset of the big data captured by the organisation) moving across integration middleware (a software that connects two or more software systems). Such large amounts of data would overload existing integration middleware systems, since they were designed to handle lower volumes of data. This is depicted in Figure 1.

Figure 1: Big data and integration
Let us analyse Figure 1 in detail. Big data is not what is really interesting. Who needs a mountain of data anyway? What we want are the results of processing this data. Depending on the processing algorithm used to process the data, we get different results. This is where it gets interesting.
Let us suppose that an enterprise implements a big data solution. The big data processing (refer to the big data processor in the figure) solution could be a shared service across the enterprise. Due to the technical complexity and cost involved in building a big data processor, it is not possible for each division in the organisation to have its own. But due to the business value accruing from big data analysis, sooner or later, different divisions in the enterprise will want their own processing on the big data set. This can be done by moving a subset of the big data, relevant to that division, over to its systems. This is the point at which the integration systems in the enterprise will feel the impact. To enable different divisions in the organisation to “do their own stuff” with data, a subset of the big data will start moving across the integration middleware.
Overcoming the big data challengeSo how can we solve the new challenge caused by subsets of big data moving across the integration middleware? Let us look at three options:
How do these techniques help us overcome the challenge? Answering that question requires a deeper understanding of the root cause of the underlying problem. A middleware solution fails at high loads due to the following issues:
A distributed cache helps with the first issue, by increasing the available memory. For example, if you have ten servers with 10 GB each, a distributed cache can help you add up all that RAM and use it like local RAM, effectively giving you 100 GB. It helps with the second issue by avoiding the need for a large number of threads, or a large swap space. This is accomplished by intelligent persistence mechanisms, like write-behind-cache.
In a write-behind-cache, data that needs to be persisted is written in an asynchronous manner: the write request is accepted, and the write function returns immediately. The persistence mechanism then writes into the file or DB; this frees up the persistence threads of the middleware, increasing the scalability of the overall solution.
A telecom use-caseLet us look at how the third option from the previous section, of using data grids, can be implemented. The use-case here is from a telecom scenario, and is depicted in Figure 2.

Figure 2: Big data and integration: A telecom use case
Figure 2 has conceptual similarity with Figure 1. The Network Switch is the data source here. The big data processor maps to the Mediation solution here. The Analytics Application is similar to the Data Warehouse. The Event Processor system is similar to the Fraud Management application. Let us understand the data flow in this figure.
This is the data flow for a cell phone services provider — a telecom company, or telco, as per industry parlance. Whenever a phone call is made, records called Call Detail Records are generated by the telco’s hardware, and the records get collated at the Network Switch. The Mediation system then processes these records. It performs validation, filtering, etc., and gives the records to the three systems it connects to: Fraud Management, Billing and Data Warehouse. The Billing system needs to connect to many other systems: CRM, Inventory, Fraud Management. For some of the data flows, like CRM to Billing, the volume is so high that we have to provide a direct connection from Billing to CRM, for a few use-cases (around 5 per cent result in such high volumes).
Normal middleware, even with clustering and load balancing, cannot handle this. This is where the need for Middleware Infrastructure comes in, in the architecture (see Figure 2). The Middleware Infrastructure component is a separate product that provides features like local and distributed caching, load balancing, failover and recovery, with much higher scalability than that provided by standard middleware products. Some of the middleware infrastructure products come in the form of data grids, which support scaling to hundreds of nodes. Examples of such products are Oracle Coherence, JBoss Infinispan, Websphere Extremescale and Terracotta Big Memory.
The future of Big data and integrationAny solution in the technology space starts out in a niche area, and as it becomes mainstream, it gets more and more commoditised. We can expect big data solutions to follow this path in the near future with:
Hopefully, this article gives you a good overview of the challenges posed to integration solutions by the advent of big data in enterprises. The example discussed, which is a use-case from the telecom domain, is generic enough to be applicable to other domains. The key value that open source brings to such solutions is that we can scale out our solution with much lower financial implications, compared to commercial solutions.Related Posts:
THE biggest conceptual breakthrough in the war on cancer was the realisation by the 1980s that it is always a genetic disease. Sometimes the genetic flaw is inherited. Sometimes it is the result of exposure to an outside agent such as tobacco smoke or radioactivity. Sometimes it is plain bad luck; a miscopying of a piece of DNA during the normal process of cell division.Turning that breakthrough into medicine, though, is hard. No one has worked out how to repair DNA directly. It is, rather, a question of discovering the biochemical consequences of the genetic damage and trying to deal with those instead. But recently, another pattern has emerged. It is too early to call it a breakthrough as significant as the cancer-is-caused-by-broken-genes finding, but it might be.The pattern in question is that many of the genes whose breakage leads to cancer are themselves involved in a specific sort of genetic regulation, known as epigenetics. This switches genes on and off by plastering either their DNA or the proteins which support that DNA in chromosomes with clusters of atoms called methyl and acetyl groups. The nature...
The mountainous desert of Palm Springs provided a dramatic backdrop to the 2012 Huntington’s Disease Therapeutics Conference. Hosted by CHDI, the largest funder and driver of HD research globally, the Conference hosts many of the world’s top HD researchers, bringing them together to discuss the latest research and form valuable collaborations to share their expertise.
Systems Biology
The Conference began with an unusual theme: a focus on Systems Biology. That’s an abstract term for the simple idea that nothing in biology happens in isolation. As many people who have cared for an HD patient know, every symptom affects every other symptom, in complex and unpredictable ways. Systems Biology is the application of this idea that everything is connected, to our studies of HD — from molecules and cells to communities.
Computers and technology can now help scientists to study many more things than the human brain can consider at once. As a practical example, it’s becoming as easy to sequence someone’s entire genome as it is to test or measure changes in one gene. Generating vast amounts of data is increasingly easy — what’s difficult is turning this data into useful information. How do we use all the information we can collect to better understand HD? Or — how do we turn ideas into wisdom?
This is what Systems Biology is all about — and CHDI has jumped into the field in a big way. They’ve hired a new Vice President, Keith Elliston, whose job it is to encourage the Systems Biology approach to make the most of the work of HD scientists. HDBuzz snagged an interview with Elliston — look out for it in a future article.
CHDI has even given its logo a facelift to mark the occasion. Simon Noble revealed the new logo — a tree made from interconnected circles, reflecting CHDI’s view that atoms, genes, cells and people are fundamentally linked in the quest for effective treatments for HD.
The Systems Biology approach was outlined in a series of talks begun by Lee Hood, (Institute for Systems Biology, Seattle). Hood has spent decades applying technology to human disease, and his organization has recently gotten interested in HD in a big way. As an example of the type of work that’s now possible, Hood’s team is sequencing the entire genomes of multiple HD families — looking for very rare DNA changes that affect what age HD symptoms begin. The idea is if we can understand why some people have late or early onset, we could identify new targets for developing drugs.
Building on this theme, Jim Gusella reflected on his work to identify genes that affect the progression of HD. Gusella’s team recently pooled and reanalyzed loads of data using modern statistical techniques to re-evaluate whether previously reported ‘genetic modifiers’ stood up to scrutiny. Gusella plans to apply analysis methods using the interconnectedness of genes, to get the most out of large genetic studies that are underway.
Hanchuan Peng (Howard Hughes Medical Institute) demonstrated one impressive example of how Systems Biology can enhance our understanding. Using cutting-edge technology, he’s produced incredibly detailed 3D maps of worms called C. elegans that are commonly used in genetic research. These kind of maps will help us move to a level where diseases or treatments can be examined in terms of how they affect whole networks of cells.
Gene silencing
Gene silencing is a simple idea with a lot of promise as a treatment for Huntington’s disease. Gene silencing drugs — with names like RNAi and ASO — are tailor-made to stick to the message molecule that’s produced from the HD gene. Once the drug sticks to the message molecule, production of the mutant protein is reduced. The hope is that this will allow HD-affected neurons to recover.
So far, all the evidence from animal trials points to gene silencing drugs being effective, and safe enough to move forward to human clinical trials. Now, at least four teams are planning trials to test different gene silencing drugs in HD patients. Therapeutics Conferences have discussed gene silencing before, but this was different — here, the talk was about the practicalities of getting the drugs to human trials quickly and safely, and anticipating and avoiding possible pitfalls.
Frank Bennett spoke on behalf of Isis Pharmaceuticals, a company that specializes in gene silencing drugs called ASOs. An ASO is a DNA-like molecule with one strand rather than two. ASOs spread through the brain quite well, so Isis is planning to inject the drug into the fluid at the base of the spine. That may sound gruesome, but remember that the alternative is injecting drugs into the brain. Bennett reported that Isis has now given gene silencing ASO drugs to over 2,000 patients with various diseases — a track record that offers some reassurance.
Bennett discussed the development of Isis’ gene silencing ASO drug for Huntington’s disease. A trial of infusing the ASO drug into the spinal fluid of monkeys showed that it reached various brain regions, especially the cortex (that’s the crinkly surface of the brain). The deep substance of the brain that’s affected early in HD — the striatum — received a smaller dose of drug, but only human trials will tell us whether it’s enough to make a difference. Thankfully, the drug was well tolerated and didn’t cause any obvious harm — a crucial step on the way to trials in patients.
Isis’ current focus is on drugs that silence both copies of the HD gene that we all have. That’s easier to do, and easier to test, so it makes sense to start with that approach. But Isis is also working on drugs that target just the mutant gene, leaving the ‘normal’ copy untouched. They’ve bred special HD mice to help them test these ‘allele-specific’ silencing drugs.
Neil Aronin of the University of Massachusetts gave an enlightening update on some of the challenges he’s working to overcome in the area of gene silencing drugs. Aronin is particularly keen on allele-specific drugs that target only the mutant gene. Like other groups working on gene silencing, Aronin’s team has begun to focus on the practicalities of running human trials. He’s enlisted a neurosurgeon colleague to try something new and unusual — performing brain surgery on a sheep. Sheep have brains nearly as big as human brains, so they are ideal for refining the scanning and surgery techniques that will be needed to deliver gene silencing drugs to patients.
Aronin’s also thinking carefully about minimizing possible side effects of gene silencing drugs. Using giant Lego pieces, he demonstrated how the drug molecule might be broken down into smaller bits, each of which might still be able to bind to a message molecule — possibly switching off other genes we’d rather not touch. Improving our knowledge of how cells break down gene silencing drugs will help us to design drugs that minimize these ‘off target’ effects.
Some of the most advanced results so far in HD gene silencing were recently published by the three-way team of medical technology company Medtronic, RNAi drug maker Alnylam and researchers at the University of Kentucky. Medtronic’s Bill Kaemmerer reported that a clinical trial of their drug and delivery method in patients is already in the advanced planning stage.
Kaemmerer discussed the challenge of figuring out whether the drug has worked in patients — not a straightforward matter because HD causes changes slowly, over years. If we’re lucky, we’ll see improvements on clinical measurements. But that’s not guaranteed, even if the drug works. So we need a backup plan.
Measurements of brain biomarkers might help — chemicals released when neurons are malfunctioning or dying. If the treatment alters levels of these biomarker chemicals, it might give a clue to whether the drug is working. Medtronic is proposing to use several possible biomarkers to help run their trials.
Steve Zhang (Sangamo BioSciences) spoke about a ‘next generation’ approach to gene silencing using zinc finger drugs. These are designer drugs that can attach directly to chosen sequences in our DNA. Zinc finger drugs could directly prevent the HD gene from being read, or even — far in the future — carry out ‘genome editing’ to snip out the bad gene altogether. These techniques are a long way off yet, but it’s great to know that these exciting technologies are being applied to HD so that hopefully we’ll see a continuous improvement in our ability to target the disease.
Next-door neighbors
Everyone has high hopes for gene silencing, but we have to be careful not to put all our eggs in one basket. Gene silencing drugs alone might not be enough to halt HD completely, and most researchers reckon that several treatments, targeting different aspects of HD, may be necessary. So the session on ‘upstream’ and ‘downstream’ targets was important.
By this, we mean the ‘next door neighbors’ just before and after the huntingtin protein is made. The first step to making a protein is creating an RNA ‘message molecule’, using the HD gene as a template. This RNA manufacture process is the ‘upstream’ neighbor. The neighbor on the ‘downstream’ side is what happens after the protein is made: chemical tags are added that alter how the protein is handled in cells. That process is called post-translation modification.
Why focus on these next-door neighbors? They’re close to the mutant protein itself, so small changes to these processes might be able to make a big difference to the many bad effects of the protein.
Melissa Moore (University of Massachusetts) explained how it might be possible to exploit cells’ RNA manufacturing machinery to treat HD. Drugs that target RNA directly can’t be taken in pill form and require surgery to get them into the brain. The advantage of targeting the RNA-making machines, rather than the RNA itself, is that ‘small molecule’ drugs might work — the kind of chemical that could be taken as a pill.
In practice, we may end up targeting both the RNA message and the RNA-making machinery. For instance, a protein called SPT4 was recently found to be involved in reading long CAG repeats in our DNA. An SPT4-targeting drug might be able to enhance the action of a gene silencing drug, to help it target the mutant copy of the gene. Drugs that work on cells’ RNA-making machinery are already being tested in diseases like cystic fibrosis and similar approaches are now being studied in HD.
Naoko Tanese (New York University) discussed an intriguing new role for the huntingtin protein. Huntingtin has lots of functions, and new ones are being discovered all the time. Tanese’s team found that huntingtin hangs around with several RNA message molecules, raising the possibility that one job of huntingtin might be ‘shuttling’ RNA round cells. Adding another layer of intrigue, it seems that huntingtin might even shuttle its own RNA message molecule. Understanding the basic functions of huntingtin is important as we approach the stage of altering the production and function of huntingtin in patients.
Turning to the ‘downstream’ next-door neighbor, Lisa Ellerby reviewed the array of ‘tags’ that can be added to various parts of the huntingtin protein. Different molecular machines called enzymes add and remove each tag, depending on the situation the cell finds itself in.
How do we know which tags, and which enzymes, are most important? Marcy MacDonald of Massachusetts General Hospital proposed that we might be able to exploit the unusual nature of the HD mutation to help us decide. We know that the mutant huntingtin protein gets more toxic if it contains more glutamine building blocks — each one corresponding to one ‘CAG’ in the HD gene. MacDonald has produced huntingtin proteins containing different amounts of glutamine. The modifications that are found in the longer proteins might be the most important to focus on.
Dimitri Krainc (also of Massachusetts General Hospital) gave an update on one type of post-translational modification, called acetylation. Sticking an ‘acetyl’ tag onto the huntingtin protein tells cells to get rid of it by dissolving it. An enzyme called HDAC4 removes the acetyl tags, so we’d expect that reducing HDAC4 activity would be good. When Krainc’s team bred cells without HDAC4, they found suggestions that huntingtin removal was increased.
One HDAC enzyme, sirtuin-1, is the focus of a current drug trial in HD. Selisistat — a drug that decreases the activity of sirtuin-1 — is being tested in Europe in a trial called PADDINGTON. Krainc’s team have found that the drug does act on sirtuin-1 to increase acetyl-tagging, as expected. The published results of the first phase of the trial will hopefully tell us more.
Small is beautiful
Drug hunters are a bit obsessed with small molecules. Big or complex chemicals tend not to make for good drugs, because they are usually unstable, and have difficulty getting into the brain. So, the ideal drug is a small molecule that hits a chosen target. Drug developers do lots of chemical tweaking, to maximize desirable properties, and reduce side-effects.
One target where drug development has advanced significantly in the past year is phosphodiesterase (PDE) inhibition. CHDI’s Vahri Beaumont and Pfizer’s Chris Schmidt jointly presented the results of their collaboration. Last year we heard about synapses — the chemical connections that transmit signals between neurons — and the PDE enzymes that break down the signaling molecules on the far side of the synapses. We know that synaptic function goes wrong in HD, and that this seems linked to the functioning of PDE enzymes. Because connections are all-important in the brain, it’s hoped that restoring synaptic function might improve HD symptoms — and if we’re lucky, it might also slow down the degenerative process.
There are lots of PDE enzymes, and careful study has identified PDE9 and PDE10 as the ones that are most involved in HD, and the most likely to be possible targets for drugs. Through studying living slices of HD mouse brain, we can identify abnormal electrical behavior. Beaumont reported that using drugs to inhibit PDE 9 and 10 restored favorable electrical properties in these brain slices. Tantalizingly, this included improvements in the longer term functions thought to underlie learning and memory.
Schmidt announced Pfizer’s carefully thought-out plan for progressing PDE inhibitors to human trials. PDE10, the more promising target, is the priority candidate. First, Pfizer will conduct animal studies looking at the drug’s safety and effectiveness. We can’t slice people’s brains up and stick electrodes in, so we’ll need biomarkers to give an early idea of whether the drug’s doing what we want. This is the same principle we mentioned earlier for gene silencing trials. For Pfizer, this means developing new brain imaging techniques to look at the functioning of synapses in humans.
Pfizer’s timeline for its PDE10 inhibitor includes studies in humans in late 2012 and a larger 6-month trial planned in 2013-14. “This is not about rushing headlong into a trial … but a clinical experiment,” said Schmidt, “so succeed or fail, we’ll learn a lot’.
KMO inhibitors were one of the big HD therapeutics stories of 2011. KMO is an enzyme that alters the balance between a chemical that protects neurons — Kyna — and another that harms them — Quin. A drug developed by Paul Muchowski’s group, JM6, was reported to reduce the activity of KMO and enabled HD mice to live longer. Ladislav Mrzljak unveiled CHDI’s top KMO inhibitor candidate — CHDI-246. This designer drug has favorable properties and so far appears to produce healthy changes in brain chemistry, and seems safe. Interestingly — like JM6 — CHDI-246 doesn’t actually enter the brain. Instead, it appears to produce positive effects by inhibiting KMO in blood cells. This is a new and ground-breaking approach to brain drug development — but if it works, it’s likely to catch on.
CHDI is now pressing on with tests of CHDI-246 in three different rodent HD models. That’s more rigorous than many drugs go through, but we reckon it’s crucial to test drugs in this way, to make sure only the best ones get through to expensive and time-consuming human trials.
Another drug giant, Novartis, has just completed a human trial in HD. Graham Bilbe described how their drug, Mavoglurant, blocks glutamate receptors in the brain and is intended as a treatment for HD symptoms — especially unwanted movements. The results of the trial should be announced soon. One important lesson here is how long it takes to turn an idea into a drug — the idea of blocking glutamate receptors began decades ago and, after years of intensive work, is only now being tested in patients.
Getting it right first time
With all these drugs poised to be tested, it’s crucial that the next generation of human trials for HD is smart and efficient. Testing drugs is incredibly expensive, so it’s essential to get it right first time. Thankfully this has been an area of HD research where real progress has been made, and we reckon we’re now ready to test the drugs waiting in the wings.
Spearheading CHDI’s clinical trial efforts is Christina Sampaio. As the former head of the European Medicines agency, Sampaio brings a wealth of expertise in testing drugs and getting them approved — and her powers are now focused, laser-like, on Huntington’s disease! Sampaio, who is not shy of expressing controversial opinions, asserted that we have to move on from approaches that have failed to deliver in the past. We need to run smart trials, instead of big or long trials, she suggested.
Sampaio also reflected that new treatments would likely be tested first in people with symptoms of HD, where it’s possible to judge success. Treatments that work will then be tested to see if they can prevent symptoms from developing. She echoed the earlier idea that multiple treatments with different effects may be needed to tackle HD.
Marking the end of one era, and the beginning of a new one, Sarah Tabrizi (University College London) announced the final 3-year data from the international TRACK-HD study. TRACK-HD aimed to identify the best combination of measurements for testing drugs in different stages of HD — the biomarkers we mentioned earlier. Tabrizi demonstrated how the TRACK-HD toolkit could be used to decide how many people would be needed for a trial of any drug, and what biomarkers would be best at testing it.
TRACK-HD identified brain changes long before the official diagnosis of symptoms in HD. That may sound worrying, but it can also be seen as a good thing, because it suggests that the brain is actually really good at compensating for damage. As Tabrizi put it, “there’s a lot that we may be able to rescue”.
With this in mind, Tabrizi announced a new study, TrackOn-HD, aimed at probing these functional changes in the HD brain before signs of the disease emerge, to help us understand how the brain compensates and hopefully give us biomarkers for trials in ‘pre-manifest’ HD.
Big-picture thinking
Talk of ‘onset’ of HD symptoms set the scene for Mark Guttman (Centre for Movement Disorders, Ontario) to open a debate on how Huntington’s disease is defined. Is HD present from birth, does it begin when a neurologist diagnoses it, or is there a ‘spectrum’ of symptoms that comes on gradually over many years? This is an important topic, because a diagnosis of ‘onset’ is commonly used to inform important decisions like work and family planning — and also controls entry to clinical trials, and approval of new drugs.
The area is probably less controversial than you might think from the strong opinions that are often heard. Both patients and doctors are aware of ‘soft’ changes that precede an ‘official’ diagnosis of HD. So perhaps all that’s needed is to agree on better language for describing them. A discussion with the global community, aimed at figuring out this area, has begun.
With his closing talk, Michael Hayden (University of British Columbia) looked far ahead. Recent figures have suggested that HD may be twice as common as previously thought. Combine this with an aging population and the end product, claims Hayden, is that HD will become a relatively common disease with the majority of cases occurring in the elderly — something health care planners will need to think about. Meanwhile, Hayden’s studies of sperm samples to figure out how often CAG counts increase or decrease are likely to improve the reliability of genetic counseling for people at risk of HD.
A new era
We had high hopes for the 2012 Therapeutics Conference, and weren’t disappointed. A new era is beginning in Huntington’s disease drug development, with a number of therapies poised to be tested in patients that have been tailor-made for HD, using knowledge painstakingly gained since the HD mutation was discovered nearly twenty years ago. This puts us in a very different place from where we were as recently as five years ago.
Not only do we have the drugs to test — and more in the pipeline — but we have a clear idea of how to test them, too, thanks to studies like TRACK-HD. Forthcoming clinical trials should be well-run, smart and efficient. There is no guarantee that any experimental treatment will work, but we can be confident that the trials, and the drugs they’re testing, will be as good as possible.
In terms of specifics, keep your ears and eyes open for news of PDE-inhibitor drugs and gene silencing trials over the coming months and years. Wherever you’re reading this article is where you’ll be able find out the latest in the world of HD therapies research.

Document management is an immensely complex task for organisations, where several people work on multiple documents, each of which probably has more than one version. How long can one depend on memory for file locations, names, and the changes made? OpenKM is an open source tool that lets you manage your documents online. You can version your documents, manage users, share select documents with select users, and much more.
You can download the latest OpenKM build as a zip file from the official website. It bundles the JBoss server required for OpenKM to run, so you don’t need to set up a separate Web server. Make sure you have JDK 1.6 or above installed on your system, since the JBoss server needs it. Once downloaded and extracted, start it and then run the run.sh (Linux) script in the bin folder, in a terminal window. Any errors or warnings are visible in this terminal window. With the JBoss server started, you can access OpenKM at http://localhost:8080/OpenKM/.
By default, JBoss only listens for connections on localhost. To make it available to other computers on the network, run run.sh with the parameter -b 0.0.0.0. Access OpenKM from another PC on the network by replacing “localhost” with the IP address of the “server” in the URL.
Profiles and usersThe default login ID and password are “okmAdmin” and “admin” respectively. This takes you to the home page, from where you can now upload files to share them. However, that is not much use without other users. Since you’re logged in as an admin, you can first create profiles to fine-tune the tabs and buttons that are visible to different users (and then create users).
Click the Administration tab at the upper right corner of the page; now click the Profile icon (in the middle of the buttons on the administration page, Figure 1).

Figure 1: The OpenKM administration tab
Here you can see the available profiles and add new ones. Depending on your requirements, you can create a new profile with only certain tabs and buttons visible, and just select that profile for new users, to ensure those users have restricted access to the system, as per your needs.
Now, let’s create users. Click the Users button (next to the Profile button). This takes you to the User List (Figure 2).

Figure 2: The User List under the administration tab
Click the Add Users button, fill out the form for User Details, selecting the appropriate profile for the user. You can also set roles for each user; logical grouping of users makes privilege management easier. Roles can be added on the Roles page (Figure 3), which is accessible from the User page.

Figure 3: The Role list under the administration tab
Using OpenKMNow we come to the core functionality, which is knowledge management. You can upload documents in folders and share them with the users you want to, using the access-management mechanism discussed above.
OpenKM also has a privilege-control mechanism for all documents; you can fine-tune the privileges each user has for a document. Just select the document, and go to the Security tab in the lower half of the page, where you can view privileges that users/roles have for this document, and change them. Once users have access to a document, they can subscribe to it, and will get a notification whenever the document is changed.

Figure 4: The Privileges list under the security tab
OpenKM also provides version management of documents. Users can check out documents before changes, so that there is no confusion with someone else updating it simultaneously. Once an updated document is checked in, the new version is available to all. You can also lock a document so that no one else can modify it; this gives you better control of important documents.
Other featuresWe’ve discussed the basic features of OpenKM, but it has a lot more to offer. OpenKM integrates knowledge management with workflow, mails, and chat too. Along with the work-flow management, you can add a process flow to the documents or folders. Actions like user input, i.e., decisions based on the input, can also be added to the workflow.
The OpenKM workflow mechanism is based on JBoss jBPM, an extensible framework for process languages. The work-flow definition has to be made in XML. You can create the definition in JBoss and then deploy it with OpenKM. The steps to deploy the workflow are listed here.
I hope this introduction to OpenKM gives you some insight into it, so that you can reap the benefits of this tool. Feedback and comments are most welcome.
Links and referencesFeature imahe courtesy: Adam Rifkin. Scaled and reused under the terms of CC-BY 2.0 License.
Related Posts:
In this article, we take a look at SugarCRM, an open source, cloud-based Customer Relationship Management solution.
We know that organisations and enterprises, big or small, can save a lot (in terms of time, effort and resources) by switching to open source software. At the simplest level, FOSS offers the liberty to modify and scale the solution as per your needs. Also, you do not have to be bound by weird license agreement terms, simply because open source licenses are not at all restrictive as compared to their proprietary counterparts.
Additionally, the advantages of open source software can be multiplied many times over if migrated to the cloud. Wondering how? Well, the cloud, in itself, reduces implementation and maintenance costs. You do not have to incur recurring expenditure on hardware. Plus, backed by open source solutions, you know you have the option to customise your cloud solutions as and when needed.
Why a CRM?Every firm, big or small, needs to manage its relationships with its customers and clients. This is where Customer Relationship Management software comes in handy to maintain customer lists, support cases, profiles of sales representatives, and other related information in an organised manner. And quite obviously, an open source CRM solution will provide the added advantages of reduced costs and enhanced flexibility to suit your organisation’s needs.
Introducing SugarCRMSugarCRM is an open source, cloud-based CRM solution that can easily be customised to fit the needs of any organisation. Basically, it caters to small- to mid-sized organisations, enterprises and companies. You can run it both on the cloud or on-site.
Worried about its open source credentials? Well, SugarCRM happens to be one of the most active open source communities in the enterprise world, with over 250,000 community members, 25,000 developers and nearly 850 extension projects. To quote SugarCRM’s website, “With full access to Sugar’s source code, customers can take control of their own destiny. SugarCRM customers have the right to run our products anywhere: in their own data-centres, in our data-centres, or at any of a variety of cloud service providers.” Impressive, isn’t it?
Now, here’s the tough part. If you also consider hosting it on the cloud, SugarCRM is free as in freedom, not free beer. A regular subscription will cost you $360 per year, per user. You will get localisation in 22 languages, unlimited API calls, free backups, 15 GB of storage and many other goodies. While this does seem reasonable, many of us may find the pricing on the steeper side. If you just wish to play with it, or try it before investing on it, you can even enjoy a seven-day trial. Alternatively, you can download the project extensions and install your own version of the software, as mentioned below.
InstallationTo run SugarCRM locally, you will need LAMP — Linux, Apache, MySQL and PHP. You can easily install the last three from your distro’s repository, and information on how to install them is easily available on the Web and even on this website.
Once that’s done, you can download the installation package from SourceForge. The installation process is self-explanatory, with an installation wizard. You simply need to select the database type, specify user names and passwords, and off you go!
The interfaceSugarCRM offers customised interfaces for each user, depending on the user’s role and account attributes. Thus, the administrator gets to see the technical details that are hidden from the sales manager, while the HR manager views other information. You can, of course, tweak such abstraction to suit your needs.
The interface has a header bar that has links to common tasks. It shows almost identical icons for most user accounts — send email, create task, create note, log call, schedule meetings, etc. Beyond that, the interface differs based on the privileges of the logged-in user. Figure 1 shows the home page for a user with admin privileges.

Figure 1: Home page for the administrator
In general, the admin interface lets you create user accounts, opportunities, documents, contacts, reports, and other similar data.
With the basics covered, let’s now look at certain vital yet relatively lesser known tasks.
Importing data into SugarCRMIf you’ve been managing your data using any other CRM solution, or even LibreOffice/OpenOffice.org Calc, SugarCRM can import the data, enabling easy continuation of your work. To import, you will need to export your data as a CSV (Comma-Separated Values) file for each module. Different software have different methods for this; in LibreOffice Calc, simply save the file as .csv. If you’re using a proprietary CRM solution on the cloud, you can use the built-in data dump facility.
Next, for each module you wish to import, go to Shortcuts –> Import and upload the CSV file (you will need administrative privileges). SugarCRM will then give you an option to reorganise, arrange or cleanse your data of duplicates. This is it; you’re done with the importing process!
Understanding users and user typesSugarCRM offers four types of users:
To create new users, log in with administrative privileges. In the upper right hand corner of the admin interface, click Admin to get the Administration screen, where you need to select “User Management”. Under this section, you can view, modify and delete existing users, and create new ones. For instance, Figure 3 shows the page to create a new user. Along similar lines, you can edit/modify existing user accounts too.

Figure 2: User management options

Figure 3: Creating a new user
Setting up email functionalitySugarCRM supports two types of outbound email accounts — system and personal. Bear in mind that there can be only one system outbound mail account. Almost all email-related tasks can be accomplished under Admin –> Email Settings. You can configure email settings for campaigns, view the outbound mail queue, set up group accounts for inbound mail, and perform other related tasks.
SugarCRM comes with native support for Gmail, Yahoo Mail, and Microsoft Exchange. If you use any other mail provider, you can always customise the SMTP settings, if needed.
When it comes to inbound mail, you can choose to use personal or group email accounts. The former is used for individual access, whereas the latter is ideal for collaboration. If you wish to create a Group Mail account, you will be required to enter information about your mail server, as well as folders that are to be monitored. Furthermore, you need to manually specify most of the email-handling options. However, SugarCRM does come with a one-click solution to load Gmail defaults for inbound email accounts.
Final wordsWe have seen that SugarCRM comes loaded with all the features of its proprietary competitors, and with the added goodness of FOSS! The final question is: is it worth it?
Well, if you are looking for an open source, cloud-based CRM solution for your organisation, it surely is! Commercial use of SugarCRM is way cheaper than closed-sourced options, and this further cements its position as a viable CRM solution.
On the downside, if you do not need the added features of SugarCRM, you will have to customise the software yourself — the company itself offers only one solution, though the packages are different (in terms of space on the cloud, support options, etc). This can indeed be a deterrent for SMEs considering SugarCRM. However, this is a one-time effort, and once you set up SugarCRM, it operates hassle-free. All in all, SugarCRM definitely is an option to consider when looking for open source cloud-based CRMs.
ReferencesFeature image courtesy: David W. McKelvey. Reused under the terms of CC-BY-NC-ND 2.0 License.
Related Posts:
Want to create great looking digital art? You don’t need to buy expensive hardware and software like Maya or Photoshop. The Art of Illusion comes to your rescue.
This simple yet very powerful software designed by Peter Eastman and others offers great scripting capabilities. So guys, get ready for a digital ride that might inspire you to create great digital art. This article takes you through an easy exercise to create a simple scene called ‘Papaya in the Monastic Cell’.
Getting startedJust download the software from artofillusion.org. The authors offer Linux and Windows versions. The Linux version is as simple to install as is Windows. Once installed, fire it up. You get a simple-looking GUI, with a default camera and a light visible in the centre of the viewport as shown in Figure 1.

Figure 1: Default view
Don’t be misled by the simplicity. Hidden beneath is sheer wizardry. Thanks to the authors, it is not cluttered by too many icons, like other software. On the left, you’ll find the icon toolbar. Although these icons are self-explanatory, I shall offer a quick introduction. The left column toolbar icons in Figure 1, in order, are for Move, Scale, Cube, Cylinder, Polygon, Camera and Move View. The ones in next column are Rotate, Universal Manipulator, Ellipsoid, Spline Mesh, Create Curve, Create Light and Rotate View.
To the right of Figure 1, you find the property bar, which is helpful whenever you are either editing or texturing an object in the viewport. It becomes a simple shortcut to the menu items, which are, as usual, arranged at the top.
Creating the profile curvesClick the Curve tool, and start adding points to create your first profile curve. Your profile curve should correspond to the shape of half a papaya, as shown in Figure 2.

Figure 2: Profile curve for fruit
Hide your first curve by selecting it and clicking Hide Selection under the Object menu. Now go and create the second profile curve for the fruit container or bowl, as shown in Figure 3. Hide this curve in a similar fashion. Make sure you create these curves in the front viewport.

Figure 3: Profile curve for plate
Lathing, tweaking, renaming and clearingMake sure the first curve is visible by clicking Show Selection after selecting the name of the curve visible in the property bar towards the right of the viewport. Select the first curve you created for the papaya, and go to the Tools menu and click the Lathe entry. A dialogue box pops up. Accept the default settings and close the dialogue box. You have created your first object in Art of Illusion, as shown in Figure 4.

Figure 4: Lathe option dialogue
Don’t be disheartened if it doesn’t look as impressive as you wanted. That is because you haven’t textured it as yet. Have a little patience; I’ll show you how to do that soon enough. If you feel that its shape is too “regular” and therefore appears artificial, you could even tweak your papaya by double-clicking it in the front viewport itself. This brings up the mesh editor. You could move around the points to shape the papaya as you want it to appear, as shown in Figures 5, 6 and 7.
Now, you might notice that your papaya object is called lathed object 1. Right click the entry; click Rename Object, and name your object “Papaya”. One more thing might annoy you — the extra lining along the papaya, which is the profile curve you used to create the papaya. Right-click the Curve 1 entry, and choose Clear. The curve is deleted. Go ahead and hide the Papaya object before lathing the basin. Similarly, lathe the profile curve you created for the fruit basin, and rename the lathed object “Basin”, “Bowl”, or whatever suits your taste, as in Figure 8.

Figure 8: Lathing the plate
Creating the tableHaving created the papaya and the bowl, you might feel that something is missing. The bowl will contain the papaya, but where do we place the bowl? The obvious suggestion would be a table. Yes! Go ahead and design a table to your liking. I will guide you to create the shape of a basic table, which you could refine later.
But before you design the table, it would be best to hide your papaya and bowl. Under the Object menu, click Hide Selection. Now the viewport is clear for you to design the table. First, create a default cube. Scale it down in the front view. After shifting to the top view, scale it to a rectangular shape, as shown in Figures 9 and 10.
Now you have a basic table-top shape. Create another cube, scale it down uniformly to sit below the table top in the front viewport. Scale it from top to bottom to form one leg of the table. Copy it thrice to make the other three legs. Join the legs to the table top with the Boolean command of union, as shown in Figures 11, 12 and 13.
You are now done with the basic shape of the table. You could further tweak it to your liking. Now hide the table too, after having joined all the parts, and rename the object as ‘Table’.
In the next article in this series, we will continue with building the wall
Feature image courtesy: Michael Gil. Cropped and reused under the terms of CC-BY 2.0 License.
Related Posts:
In the first part of this series, I gave a brief introduction to Open Flash Charts (OFC) and discussed how to draw bar charts with it. In this article, I will explain how to draw a pie chart. Since we have already discussed the prerequisites of OFC and how to set it up in the previous article, let us go straight to drawing the chart.
First, we need to define the values to be plotted on the pie chart. For our sample chart, let’s look at the example of a classroom. Our pie chart will show the distribution of the number of students getting different grades in a class of 28. Our data is shown in the following table:
GradeNo. of studentsA (More than 80 marks)5B (60-80 marks)10C (40-60 marks)10D (0-40 marks)3Now let us draw a pie chart showing the marks’ distribution. Let’s first store the above data to a database (I assume MySQL). Once that’s done, let’s create the data file, with the SQL query that fetches the data to be plotted. The data is then properly formatted and passed on to the interfaces provided by OFC, which then renders the graph to the Web page.
There are several functions available, depending on the type of graph to be plotted; so select the function according to your need, and pass it the data. The data file for our example pie chart is as follows:
<?php $die = false; $link = @mysql_connect('localhost','test_user', 'test_pwd') or ($die = true); if($die) { echo '<h3>Database connection error!!!</h3>'; echo 'A connection to the Database could not be established.<br />'; echo 'Please check your username, password, database name and host.<br />'; echo 'Also make sure <i>mysql.class.php</i> is rightly configured!<br /><br />'; } mysql_select_db('test_database'); include_once 'php-ofc-library/open-flash-chart.php'; $query = mysql_query('SELECT DISTINCT Grade, Number FROM test_piechart'); While($queryRow = mysql_fetch_array($query, MYSQL_ASSOC)) { $label[] = $queryRow['Grade']; $dataForGraph[] = intval($queryRow['Number']); } $title = new title( 'The grades distribution : '.date("D M d Y").' are' ); $title->set_style( '{color: #567300; font-size: 14px}' ); $chart = new open_flash_chart(); $chart->set_title( $title ); $pie = new pie(); $pie->set_alpha(0.6); $pie->set_start_angle( 35 ); $pie->add_animation( new pie_fade() ); $pie->set_tooltip( '#val# of #total#<br>#percent# of total strength' ); $pie->set_colours( array('#1C9E05','#FF368D','#1A3453','#1A3789') ); $pie->set_values( array(new pie_value($dataForGraph[0], "Grade" . $label[0]), new pie_value($dataForGraph[1], "Grade" . $label[1]), new pie_value($dataForGraph[2], "Grade" . $label[2]), new pie_value($dataForGraph[3], "Grade" . $label[3])) ); $chart->add_element( $pie ); echo $chart->toPrettyString(); ?>Here, let’s first connect to MySQL, then select the database (customise it to your settings). Let’s include the OFC library file, to make the APIs available. The database query returns the data, which is then saved to the arrays.
Now let’s start using OFC. First, create the graph title object, and use set_style to set its colour and font. Then create a new chart object and pass it the title using set_title. Next, create the pie object, using set_alpha, set_start_angle, and add_animation methods to give additional effects to the pie chart.
The set_tooltip method adds tool-tips to the pie, displaying information about the pie when the mouse-over is done. The argument passed to this method displays the value of a slice, and the total sum of values. The second line shows the percentage. In the set_colours method, the colours are passed as an array for different pie slices. The last method used for the pie object is set_values, where the value of the pie slices and the label, are passed as a pair. Finally, the pie object is added to the chart using add_element. The last line is used to format the data properly, so that the HTML file can use the data.
Save this file as data_file.php in the Web server root folder. Next, given below is the HTML file to be used:
<html> <head> <title></title> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript"> swfobject.embedSWF( "open-flash-chart.swf", "pie_chart", "700", "400", "9.0.0", "expressInstall.swf", {"data-file":" data_file.php "} ); </script> </head> <body> <div id="pie_chart"> </div> </body> </html>Here, I have invoked the data file I just saved as data_file.php. The size of the graph to be plotted can be passed as arguments; here, it is 700 and 400 pixels. The rest of the HTML file is just the addition of <div id="pie_chart">, created in the header, where I gave the name pie_chart while embedding the Flash.
Ensure the div ID is the same as the name given while embedding the Flash object. Save this file as Pie_display.html in the Web server root folder. When accessed through the browser, you can see the graph in action, as in Figure 1.

Figure 1: The final graph
Hope you liked the article, and that it was useful. Any queries or suggestions are most welcome. In the next article in this series, we will look at how to create other innovative charts.
Links & references
Recent comments
1 year 3 weeks ago