HTC G2 crashes, comes back on falsely saying battery level is 0%

Question: Recently my G2 has started dying whenever I use it for more than 5 consecutive minutes. When I reboot it I need to plug into a power source or it will not reboot and it reports that I have 0% battery even though I actually may have 95% or more. Removing the battery does not help - only a 5-minute wait period - could it be some overheating issue? It does not feel warm to the touch.
If I leave it off for about 5 minutes and reboot it, it then correctly reports battery life. I have had this phone since September 2010.
I am running Gingerbread 2.3.4.
Has anyone else experienced this?
Comment: I'd try getting a replacement battery. For less than $20, you either locate your problem or have a spare battery.
Answer: It is possible that the problem is in your battery more precisely in battery controller.
There are a few possible solutions:

Try recalibrating your battery.
Try removing /data/system/batterystats.bin.
Put somebody's battery inside (if you know somebody with the same model) and look how phone works. If it works fine with somebody's battery then just buy new one.
Comment: Thanks for your response - how do I recalibrate the battery?
Comment: Also my /data folder is empty
Comment: http://myhtcdesire.com/tutorials/how-to-improve-your-battery-life-calibration-tutorial . There are some more tutorials in internet. All those tutorials propose to make a couple charge-wait-boot cycles. I had some issues with my pocketbook`s battery but I solved it by charging and resetting my device in random order :|.
Comment: Install JuicePlotter from latedroid.com to see what happens to your battery


Building a dynamic web app for questionnaire

Question: I am interested in a building a web app that displays, for every new visitor, a specific set of questions to be answered. The set of questions to be displayed are selected from a pool of database and are not supposed to be the same for every visitor. More precisely, the questions are selected based on the set of answers already received from previous workers. For e.g., if the goal is to get only n answers (from n different visitors) for every question, then the app should check how many answers have been collected for a given question already and select new questions accordingly. Is wordpress suitable for building this kind of app ? If yes, please point to the appropriate resources (docs/plugins etc). If not, do you recommend any other framework or writing code from scratch (for e.g. in PHP/MySQL) is the only option ? I am not very comfortable with rails and is perhaps an overkill for such a simple application.
Comment: Using the plugin "NexForms" would be an easy way to accomplish that
Answer: You can use WordPress to save you some time. The structure of WordPress admin can be a time saving when you need to offer the client a panel to access some info, or control something.
You can use WordPress plugins to do, like, half of the work or more. You will still need to tweak the code, but it's faster than developing from scratch.
If you have the knowledge and the time, you can develop it from scratch and is probably better if you do so. But that actually is the result of what the client need, what time you have, the budget of the project, your knowledge, and etc.
If you decide to use WordPress, It's probably best to get a template or a framework to save you some time and work. You can install one of the many pool plugins for WordPress and tweak it around. A good free option would be https://wordpress.org/plugins/yop-poll/


Why did my snake die suddenly?

Question: My boyfriend and I had a ball python and we loved him very much. He was only a couple years old. He was perfectly fine last night, but in the morning he was limp and one of his sides turned grey. I tried googling and googling, but nothing came up about why he was turning grey. He died and we are very upset and have no idea what went wrong. Please help.
Comment: Was the Ball Python skin wrinkly?
Comment: Could you tell a bit more about its environment? Also there was any sudden change in weather conditions?
Answer: Hi there jxzzx and welcome to Pets.SE. There are many reasons why your ball python could have died. Here is a list of them:
Dehydration: Symptoms include Wrinkly Skin, Lack of appetite, constipation, Rapid weight Loss, and stuck shed around eyes, tail, and nose.
Low/High Cage temperature
Infection
and parasitism.
I am very sorry for your loss.

Why did my snake die suddenly?


Fatal error in my website

Question: I am getting a fatal error on my website. I am using magento 1.8 version. Can anybody let me know what is the cause of it.
Answer: Are you using a new magento installation or installing already running site?
It's look like it is a already running site,which you are unable to configure on your machine or server.
There are some module in community codepool which are causing problem. You have to check the site after disabling them.
There may be a possibility that compilation mode is on. You have to check this, if it is on then disable it.
To disable compilation
Go to root folder includes/config.php
 and comment every thing. clear cache and the try to run you store by hitting home page URL.
Comment: This is already a running website. Can you let me know the path to go to the config page as I am not a developer.
Comment: It is in /home/diamofft/public_html/includes/config.php. comment everything inside it.
Comment: What do you mean by saying comment everything inside it ??
Comment: check that these two line are commented or not.
define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');

define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');
Comment: Check this also.

Please check if you have a folder named "errors" on your magento root (in /home/diamofft/public_html/) and whether there is a php file named report.php (probably someone had added entire errors folder to the gitignore or something?
Comment: So...do I need to delete the error folder ??

Fatal error in my website


Point all subdomains of domain1 to the same subdomain of domain2 (masked)

Question: I own two domains: example.com and example.net
My 'main' domain is example.com - it has several subdomains pointing to different resources. I want example.net to behave just like example.com, only that the user sees a different domain ending in his browser. So .example.com should be pointed to .example.net. Is this possible? (My provider is godaddy if that's important)
Comment: Is that really what you want? I wouldn't recommend having two domains that mirror each other because the duplication will hurt SEO and it will dilute your brand.  You usually want to redirect to the main one so that search engines know what to index and all users see your preferred brand name.
Comment: I agree that having a single URL (ie a canonical URL) is a best practice - although I am not convinced that this duplicate content will hurt SEO.   Regardless, one way this would be handled would be by having a single virtualhost with both domains pointed to it and the appropriate config to recognise all domains - and if you are using HTTPS, the certificate would need to include all domain variants.
Answer: In case somebody else is having the same question: No it's not possible to achieve this via DNS only. There are some ways to achive this using a proxy server, but for me that was not relevant


Restore from lost+found

Question: There was a problem on an EXT4 FS/memorycard and after and fsck all the files were put in the lost+found.
Question: how can I restore the old filename/hierarchy from the lost+found? Or it is impossible? Not counting a restore from backup.
Answer: You can't find the original name and location of a file in /lost+found because that's what lost+found is about: it's where fsck puts fragments of files that it hasn't been able to attach anywhere in the directory tree. If the location was known, fsck would have left the file where it was meant to be.
It's theoretically possible that fsck could have only partial information, such as the file name but not the directory location, but that doesn't happen with typical filesystem.
You may be able to find clues in the file itself. The file command will at least tell you what kind of file it is (if it recognizes it). Some files carry additional information inside; for example JPEG and TIFF images may contain EXIF data, MP3 files may contain ID3 tags, etc.
Answer: Last time I had to do that - many years ago - you had to guess based on file content. I doubt there is a better way today.
The 'file' program can help here since it will give you an idea of the type of data, so you can use this to view the files appropriately for a start.
Answer: In my case there was I/O error during reading. And after run of e2fsck I've found most of my files in lost+found in subfolders, and most files (and filenames) was ok.
So go to lost+found, run
find | less

and see if you will find your files. Good luck!
Answer: The real answer is that you shouldn't try. You have no idea if the contents are complete. You should restore from a known good copy.
Answer: File names and hierarchy no, but using file can help you recover some stuff.  I use the Joe editor which has rectangular selections if you enable them.  So I could do "ls > ques" then search-replace to turn it into a list of statements like 'file "#133024" >   133024.txt'.  I ran that as an sh script, then I could do 'grep PDF *.txt > pdflist'.  With that open in an mc viewer and another mc in another terminal I looked through pdflist.txt and moved all the PDFs into their own directory.  You can do the same with ASCII text files and whatever else it identifies.
There are also the odd surprises like '#410423: gzip compressed data, was "x264_git.tar"'.  You can also 'cat *.txt > filelist' to get the descriptions all in one file.

Restore from lost+found


What are Unity's keyboard and mouse shortcuts?

Question: In Unity, are there any pre-defined shortcuts, e.g. to open the dash or unhide the launcher?
Comment: We don't normally put answers in comments, but just hold **Super** -- aka the Windows Key. You'll get the shortcuts for your version of your operating system localized to your language. It's that simple.
Comment: Basically none of the shortcuts listed here work any more (13.10)
Comment: Can this be updated for 14.04? Is there *current* master list somewhere? It's not clear to me that the [one on the wiki](https://help.ubuntu.com/community/KeyboardShortcuts) is even up-to-date.
Comment: After upgrading from 10.10 I experienced that many of the shortcuts didn't work. At last I found out that previous settings in CompizConfig Settings Manager was the problem. After resetting to defaults everything works perfectly. Just a hint to others with the same problem. Couldn't find anything about this myself.
Comment: And can we get this via the command line, e.g. so we can get a sorted list of keyboard shortcuts?  `gsettings list-recursively` shows a lot of window manager keybindings, but not the Unity ones.  I'm looking for what bindings are unused and suitable for customization.
Answer: This page will document the keyboard shortcuts and mouse tricks for Unity. Please feel free to add more!
Read this first to get familiar with the UI elements of Unity and to find the right keys on your keyboard:

Unity Terminology
What are the meta, super, and hyper keys?

Keyboard Shortcuts
Holding down the Super key will get you a keyboard overlay that documents most of these.
Launcher

Hold Super - Invoke the Launcher and display the shortcuts

Hold Super, then press 1 or 2 or 3 and so on until 0 to open or focus an application. The number corresponds to the location of the icon on the launcher from top to bottom.

Adding Shift will open a new instance of the application if it's already open.
Holding the key is also useful when you want to get to the Launcher but do not want to invoke the Dash.

Super + T - Open the rubbish bin/trash can.

Alt + F1 - Put keyboard focus on the Launcher, use arrow keys to navigate, Enter launches an application, Right arrow exposes the quicklists if an application has them.

Ctrl + Alt + T - Launch a terminal window.

Dash

Tap Alt - Opens the HUD

Hold Alt - Reveals application menu

Tap Super - Opens the Dash. The open signal is sent when you let go of the key, not when you push it down, so if it feels slow just let go of the key earlier.

Over an item, you can hit the Secondary key (commonly to the left of the right Ctrl) to see a preview of the item, as you can do with a secondary click over it.

Ubuntu 11.10 (Oneiric Ocelot)
 * Tab Move to the next lens (When the dash is open)
 * Shift-Tab Move to the previous lens (when the dash is open)

Ubuntu 12.04+
 * Ctrl-Tab Move to the next lens (When the dash is open)
 * Ctrl-Shift-Tab Move to the previous lens (when the dash is open)

Alt + F2 - Invoke the Dash in a "special mode" to run a command. Typing in a folder name will find that folder in Nautilus, you can also use ~ as a shortcut in the field.
The Dash opens with focus on the search box to find applications and files. Using the arrow keys will navigate the results, use Enter to launch. Hitting Enter twice in rapid succession after a search term will automatically launch the first match in a search, even if it's still ongoing. (Basically a dash version of "I'm feeling lucky").
Super + A - Open Applications lens
Super + F - Open Files & Folders lens
Super + M - Open the music lens
Super + V - Open the video lens

Panel

F10 (11.10 and earlier) / Alt-F10 (12.04 and earlier) - Open the first menu on the panel, use the arrows keys to "scrub" across the menus. (There is no shortcut for the session menu, so hitting F10 and left arrow is a quick way to get there)
Press Esc to close the menus without choosing anything.

Window Management

Ctrl + Super + D - Show desktop; hitting it again restores the windows.
Super + W -  Spread mode, zoom out on all windows in all workspaces, in 12.04 and 12.10 it zooms out on the windows in the current workspace.

In Spread mode of 14.04 ↑ + ↓ + ← + → navigates through windows, Alt + F4 closes selected window, typing any text filters windows (for example typing "terminal" leaves only terminal windows), Enter restores selected window, Esc exits Spread mode

Super-D - Minimize all windows; hitting it again restores them.
Alt + Space - Opens the window's accessibility menu.
Alt + Tab - Switch to other applications, you can hold Alt down and then hit tab to switch to the next application.
Alt + ` - Switch between an application's windows. Hitting this combo when you're already focused on an application will automatically switch only between the windows for that application. The ` key on US layouts, but Unity will use whichever key is above your Tab key. (More information) (Video)
Ctrl + Super + ↑ - Maximize the current window
Ctrl + Super + ↓ - Restore/Minimize the current window (seems to be buggy at the moment)
Ctrl + Super + ← - Maximize current window to the left
Ctrl + Super + → - Maximize current window to the right

Window Placement
If you cycle through the same key Unity will cycle through different placement widths, so experiment by hitting the numkey multiple times, for example Ctrl + Alt + numpad 5 +  5 + 5:

Ctrl-Alt + Numpad 7 - Place window in top left corner of screen.
Ctrl-Alt + Numpad 8 - Place window in top half of screen.
Ctrl-Alt + Numpad 9 - Place window in top right corner of screen.
Ctrl-Alt + Numpad 5 - Center/Maximize the window in the middle of the screen. In 12.04 this toggles between maximize and restore state
Ctrl-Alt + Numpad 1 - Place window in the bottom left corner of the screen.
Ctrl-Alt + Numpad 2 - Place window in the bottom half of the screen.
Ctrl-Alt + Numpad 3 - Place window in the bottom right corner of the screen.
Ctrl-Alt + Numpad 0 - Minimize the current window (Ubuntu 12.04.1).

Workspace Management

Super + S - Expo mode (for everything), zooms out on all the workspaces and lets you manage windows.
Shift + Alt + ↑ - Expo mode for all windows in the current workspace only.
Ctrl + Alt + ← / → / ↑ / ↓ - (11.10+) - Change to a new workspace.
Ctrl + Alt + Shift + ← / → / ↑ / ↓ - Place window to a new workspace.
Ctrl + Alt + L - Lock the screen.

Screenshots

PrtScn - Take a screenshot of the current workspace
Alt + PrtScn - Take a screenshot of the current window
Shift + PrtScn - Take a screenshot of a region traced by the mouse (shows crosshairs)

System

Ctrl + Alt + Del - Logout

Mouse Tricks
Launcher

Clicking and holding an icon and then dragging it around will allow you to reorder it on the launcher. You can also drag it off to the right of the launcher to move it around. Note that you need to make an explicit movement to the right to move the icon off the launcher before you can move it around.
Dragging and dropping an icon into the trash can will remove it from the Launcher. The program itself will remain installed and accessible through the dash.
Scrolling the mouse wheel while over the Launcher scrolls the icons if you have too many and need to move around quickly.

Window Management

Maximizing - Dragging a window to the top panel, or double-clicking a window's titlebar, or Alt + F10 (11.10 and earlier), will maximize it.
Restore - There are two ways to restore, or unmaximize, the topmost maximized window of the current monitor for this workspace (not using the window controls)

Double clicking on the top panel (but not in the application's menu)
Dragging the top panel down.

Middle click on Maximize - Maximize window vertically.
Right click on Maximize - Maximize window horizontally
Focus the topmost maximized window of the current monitor for this workspace: Left click on the top panel (but not in the application's menu)
Tiling - Dragging a window to the left/right border will auto tile it to that side of the screen.
Middle click on an application's launcher icon - Open a new instance of the application in a new window. If the application isn't running it will just open it normally.
Middle click on the top panel or window title bar (but not the menu) - send the current window behind all other windows.
Alt-Left drag inside a window - move the window
Alt-Middle drag inside a window close to its border - resize the window
Alt-Right click inside a window - window accessibility menu
Comment: Any key for zooming desktop? In Mavrick I used `Super + Mousewheel`, but it is not working in Precise. Did the keys change or I have to enable it somewhere?
Comment: Key for show desktop has changed in 12.04. It is now Ctrl+Super+D.
Also, in 12.04 F10 is enough to show the first menu item (not Alt+F10)
Comment: The "Expo Mode for All Windows" doesn't seem to work in 12.10
Comment: The `Secondary` key is also known as `Menu`
Comment: Is it possible to keep the menu opened even when stop pressing alt ?
Answer: I've made a Unity tricks overlay for the 11.04 default wallpaper.

Click on the image for a full screen version.
If you find a mistake just tell me. Here is the JPEG source version.
Enjoy!
Comment: This is awesome, it would be cool to include gestures as well.  That will get pretty cluttered though.
Comment: There is a typo for Super + 1 .. 0, where it says "of", but should say "or" in the explanation.
Comment: @EdgarHoffmann Glad you like it. I've used the official [Ubuntu font](http://www.google.com/webfonts/family?family=Ubuntu⊂=latin).
Comment: @hansioux Just click on the SVG source link, right click that image and click `Save As...` it is a SVG so you should be able to modify it without any trouble.
Comment: @KenVanDine Thanks! I will try to come up with a solution. I already have quite a nice idea for a really awesome overlay. Something kind of overlay like conky but with as a help overlay like this one.
Comment: Hello.
Many thanks for all the effort.
By the way: what font did you use for the wallpaper ? Greetings
Comment: hi, can't stand the default Ubuntu wallpaper.  saw you had a SVG source, and thought I could just use your SVG to remove the back ground.  But when I tried to download it, it only comes in Jpeg.  Is there an actual SVG somewhere that we play with?
Comment: This is super cool. Really useful (and non-intrusive) when set as replacement for the default desktop background.  Highly recommended.
Comment: Should be added as one of the default wallpapers or as a feature, to show the list on top of the wallpaper, on future Ubuntu versions
Comment: Do you have a source with non-rasterized text? I can't find SVG source link, where is it?
Answer: There is a feature in development for 12.04 so that when you long-press the Super key, a detailed overlay of possible shortcuts will appear.
Also notice the numbers appearing besides the application icons in the launcher dock on the left.  Super + Number is a short cut to that specific app, to save you from Alt + Tab madness when rapidly switching between three or more apps (such as while programming).
Comment: This answer really should be at the top.
Answer: I have found a very good wallpaper, which shows the unity shortcuts:
German explanations:

(Click on the image for the full size version)
As per demand an English version of that wallpaper.

(Click on the image for the full size version)
Spanisch version from jagarciavi

(Click on the image for the full size version)
Answer: If you hold down the 'Windows' key (Called 'Super' in the Linux world) you will get an overlay on your desktop, containing the most common shortcuts.

Some of the most common include:

 Ctrl  +  Alt  +  Arrow Key : changes workspace.
 Super  +  S : Workspace Overview
 Ctrl  +  Alt +    L : Lock Computer
 Alt  +  Tab : Windows Switcher
 Super : Opens Dash

Among the commands you want:
Ctrl  + Shift  +  N
And Alt  +  D  both work.
An equivalent to run would be  Super  and holding  Super  will focus the launcher.
Answer: Here's an Spanish version of the first wallpaper:

Click on the image for a full screen version.
If you find a mistake please inform me!
Answer:
Alt + F7 with arrow keys to
move the current window on the screen. Use arrow keys to change its position fast, and use arrow keys (on number
key area when NumLock is off) to change it slowly.
Alt + F10 to resize current window between normal size and max size.
Comment: Really usefull on a laptop, where one generally has no number pad.
Answer: I made a printable version of the shortcuts and mouse tricks. You can grab the ODT here or the PDF here.
Comment: Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Comment: Both links are working for me.
Comment: It looks like the link is broken :/ ...
Answer: Cheat sheet here . Credits to Chase Seibert
Answer: I translate into Spanish the printable version of the shortcuts and mouse tricks. You can grab the ODT here or the PDF here.
Please inform me if the links are broken or the translation is bad.
Comment: Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Answer: Otra version en español
Hi, I made another version of this in Spanish mixing those images.
Click for a fullsize image:
Comment: The text color is badly chosen.
Comment: This is a duplicate of this answer: https://askubuntu.com/questions/28086/what-are-unitys-keyboard-and-mouse-shortcuts/37769#37769


How should I change the permissions PRIVATEMSG for users in order them to have the access?

Question: Good day,
I've marked read, write and delete the privatemsg for the authenticated users but they don't still have access to the pages such as user/user-id/messages. The access is only granted with "read all" permission.
I use privatemsg 6.x-1.5
Thanks.
Answer: The normal user interface is at /messages, user/uid/messages is only meant to read messages of other users and is not a full replacement.
6.x-2.x has a feature that allows to move it around but it's relatively complex and I wouldn't necessarly recommend using.


How to setup Page Cache to work with the Flag Module and Views?

Question: I have a Site where Views are used to display flagged Nodes.
When i turn on Cache Pages for anonymous Users, the anonymous Users only see the change in the Views until the cache is cleared. (If logged in no problem). What is the best Way to deal with this caching issue. I would prefer that all pages with views where item flags are updated would be recached. Is this possible ?
Answer: Similar to the first answer but not assuming your cache is in the database. (memcache, redis, apc, etc)
function hook_flag_flag($flag, $entity_id, $account, $flagging) {
  $view_name = '<view_name>';
  $display_id = '<display_id>';
  $cid = $view_name . ':' . $display_id . ':*';
  cache_clear_all($cid, $bin = 'cache_views_data', $wildcard = TRUE);
}

Answer: You can achieve this functionality using the Flag module hook_flag_flag, This hook will act on an object being flagged.
In this hook you need to clear the cache data for that particular view from cache_views_data table.
Below is the sample code,
function hook_flag_flag($flag, $entity_id, $account, $flagging) {
  $view_name = '<view_name>';
  $display_id = '<display_id>';
  $cid = $view_name . ':' . $display_id;
  if (db_table_exists('cache_views_data')) {
    db_delete('cache_views_data')
      ->condition('cid', db_like($cid) . '%', 'LIKE')
      ->execute();
  }
}

Usually views will set the cache ID based on the view name, display id and other data being passed.
Below is code snippet which prepares the cache ID for views result
$this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . md5(serialize($key_data));

So specify the cache ID accordingly in the delete query. However make sure to not to delete other entries in the cache_views_data table.
Hope this helps.
Comment: Thx for the answers, but isn-t there a difference between the caching of the whole page and the views cache ?
Comment: Ah misunderstood. Then this is a possible duplicate of http://drupal.stackexchange.com/questions/35443/caching-pages-for-anonymous-users-prevents-other-cache-logic


how to restore dropped table with django-south?

Question: I wanted to clear out a table in my DB, so I dropped the table. Normally I would do manage.py syncdb to re-create it. However, the answer here says not to use syncdb anymore. So, what do I do instead?
Answer: It's a pretty late response but for people who will run into the same issue (like I did).
Normally to drop the db_tables for the app that is managed by south you should use:
python manage.py migrate appname zero

But if you dropped them manually in the db let south know about it
python manage.py migrate appname zero --fake

And of course to recreate the tables
python manage.py migrate appname

Comment: I had the same problems as @EliAlbert (only one model dropped).  I was able to recover with [the steps in my answer below](http://stackoverflow.com/a/17374887/785400).
Comment: Just for clarification: *This only works if you dropped every table* . With *every* is meant *every table that corresponds to a model of the specified app*.
Answer: Had the identical problem. Not sure this works in all circumstances, but here's what I did:

comment out "south" from INSTALLED_APPS
run manage.py syncdb
uncomment "south" in INSTALLED_APPS
run manage.py migrate

Voila!
Your mileage may vary....
Comment: you'll need to rename the migrations folder too whilst performing this, I just prefix with an underscore. do this between step 1 and 2 above, then rename back to 'migrations' before step 4
Answer: Hmm this exchange covers my very question:

If you modify the database by hand, South won't notice - its only way of
  keeping track of what version the database is is the
  south_migrationhistory table, so if you fiddle behind its back, it's
  your responsibility to fix it.

What I ended up doing was commenting out the model that I dropped in question, doing a schemamigration, creating an empty no-column table of the one I dropped (so South has something to drop), migrateing, then un-commenting the model, schemamigration and migrateing again. A bit more annoying than just dropping the table and syncdb but ah well.
Comment: Is it possible to create no-column table in mysql?
Answer: Make sure all your migrations are applied:
python manage.py migrate
Tell Django to create the tables as they are in your models: python manage.py syncdb
Tell South that everything is where it should be: python manage.py migrate appname --fake
This assumes that nothing has changed in any of your models since you created your last migration.
Answer: I know this issue is old, but I just ran into this issue and thought I'd post my solution in case this helps anyone.

Go into your models.py folder where the database is.
Cut the entire class out of the models.py file.
Run ./manage.py schemamigration appname --auto (this will create another migration where South will recognize to delete this table). You may need to recreate a blank table in you database so South sees it.
Run the migration and the table should drop from your database.
Re-paste in your table class back to where it was in your models.py file.
Run a ./manage.py schemamigration appname --auto. South should pick up the table and allow you to migrate
Run ./manage.py migrate appname and South should re-add the table back into your databasse... with the columns and such again, but without the data, obviously. :)
Comment: Hah nice, this is exactly what my answer says but in a step-by-step layout.
Comment: Oh nice! Sorry, I didn't see you answer. Glad we both came to the same resolution, at least. :)


How do I make a clickable dropdown menu

Question: How do I make a clickable dropdown menu?  I'm making a dropdown menu that allows the user to click the item they want.  I would like then like that page appear automatically, or at least allow the person to click on the item and taken to the new page.
Answer: There are several modules that can accomplish this, eg Superfish and Nice Menus.
If you want to roll your own, the basic steps are

Edit you menu items (admin/structure/menu/manage/menu-foo-menu) so that they are always expanded.  This will result in all menu items always being available, instead of only available in the active/sibling hierarchy.
Write some CSS and JS to get the menu behavior that you want.  With the way the nested menus are built in Drupal, you should be able to achieve a CSS only solution.  You can either do this with a custom module, or add it to your theme.

The CSS and JS involved with this is beyond the scope of this site, but there are lots of resources on the net to help you out.

How do I make a clickable dropdown menu


Convergence of a recurrence

Question: Given the recursive definition (starting with a positive integer)
$$
a_n = \frac{a_{n-1}}{2}+4
$$
I am trying to find an explicit form and show that it approaches 8.  So I started by writing it out, starting with an arbitrary value $a_1$, and one way to write this is
$$
\begin{matrix}
\frac{\frac{\frac{a_1}{2}+4 }{2}+4}{2}+4
&  \\
& \ddots
\end{matrix}
$$
or writing it term by term we could have
$$
\begin{matrix}
  \frac{a_1}{2}+4 \\
  \frac{a_1}{4}+6 \\
  \frac{a_1}{8}+7 \\
  \frac{a_1}{16}+7.5 \\
  \frac{a_1}{32}+7.75 \\
\end{matrix}
$$
From the pattern it seems that an explicit formula for the $k^{th}$ term would be
$$
a_k = \frac{a_1}{2^k} + \left(8 - \frac{4}{2^{k-1}}\right)
$$
which we could rewrite as
$$
a_k = 8 + \frac{a_1-8}{2^{k}}
$$
and then to show convergence it is just
$$
\lim_{k \rightarrow \infty} \left[ 8 + \frac{a_1-8}{2^{k}} \right]= 8
$$
This seems to work, but I simply looked for a pattern and guessed the explicit formula.  My question is if there is a direct way to get from the recursive definition to the explicit one.
Comment: Simple trick, if its going to converge on something, then we must have $\lim_{n\to\infty}(a_{n+1}=a_n)$ ie the **definition** of converging
Answer: We have
$$ a_{n+1}-a_n = \frac{1}{2}\left(a_n-a_{n-1}\right) $$
hence $\{a_n\}_{n\geq 0}$ is a Cauchy sequence and $a_n\to L$. Such $L$ has to fulfill
$$ L = \frac{L}{2}+4 $$
hence $L=\color{red}{8}$.
Comment: Well, not from $\;a_{n+1}-a_n\rightarrow0\;$ , since there are examples of non-converging sequences that fulfill this, but from the fact the sequence is Cauchy.
Comment: Thanks Jack. I am reading on Cauchy sequences now, and I see this property about the differences between adjacent terms.  So is it that the $L=\frac{L}{2}+4$ simply follows from the fact that $a_{n+1}-a_{n}$ is approaching zero?
Comment: @Jed: exactly so, a Cauchy sequence is converging.
Answer: For the ((asub1/2+4)/2+4)... representation, set that equal to asubn=k as n approaches infinity. Then, consider that one less iteration (asubn-1) is also approaches k when n approaches infinity. Thus, k/2 +4=k, so k=8.
Answer: HINT: a more direct way to show the convergence of $a_n$ is
$a_{n+1} = \frac{a_n}{2} + 4 = \frac{a_n+8}{2}$
If $8<a_0$, then $8<\frac{a_n+8}{2}<a_n$
If $a_0<8$, then $a_n<\frac{a_n+8}{2}<8$
Do you see how to turn this into the function for how quickly $a_n$ converges?
Answer: This can be solved with quadratics:
$$a_n=\frac{a_{n-1}}2+4\implies 2a_n-a_{n-1}-8=0\implies$$
This sequence is not homogeneosu, so we can do:
$$2a-a-8=0\implies a=8\implies 2(a_n-8)-(a_{n-1}-8)=0$$
and we now put $\;A_n:=a_n-8\;$ to get a homogeneous one that can be solved by means of its quadratic characteristic equation:
$$2A_n-A_{n-1}=0\implies 2r^2-r=0\implies r=0,\frac12\implies$$
the general solution is $\;A_n=B\cdot 0^n+C\cdot\cfrac1{2^n}=\cfrac1{2^n}C\;$
Suppose now that $\;A_0=K\implies \cfrac1{2^0}C=K\implies C=K\;$  , and thus our sequence is $\;A_n=\frac K{2^n}\;$, and going back to our original one:
$$a_n=A_n+8=\frac K{2^n}+8\xrightarrow[n\to\infty]{}8$$
Observe please that $\;K=A_0=a_0-8\implies a_0=K+8\;$ , but this first element is just unimportant in this case to get the final limit.
Answer: Simple trick, if its going to converge on something, then we must have $\lim_{n→\infty}(a_{n+1}=a_n)$ ie the definition of converging

Convergence of a recurrence


Objects in Illustrator Not Aligning to Pixel Grid Correctly

Question:
I'm having problems aligning my objects to the pixel grid in Illustrator. As you can see in the picture, my object is correctly aligned with the pixel grid. However there are still parts outside of the green transform lines. Does anyone know how I can fix this? I've been trying align correctly with the direct select tool for over an hour with no luck.
Answer: Are these objects created in Ill. or imported? make sure stroke is off, and try to create new objects with Align to pixel Grid checked in the Transform Panel.


Why would an external testing team find more bugs then an internal testing team?

Question: I work on a project as an internal testing team, our team put 100% effort to all formal testing procedure like complete testing process & at a certain level of time we don't find bugs in application, but when we pass build to external testing team they found a lot of bug in the same build.
One thing I don't understand that we know product requirement better than them but even after that they found more quality bug then us, can you please explain this why is it so?
Comment: Could you please add more context: what is "internal" and "external" testing team - how are they, their responsibilities and scopes different in your case? Thanks!
Comment: Internal testing team "members of the project team become the members of the test team" & External testing team "member who does not relieve the project personnel of responsibility for the correctness of the application system"
Comment: Members of the project team know how the application is meant to be used.  It will not even occur to them to do certain things.  People not related to the project will try all sorts of things that were never even thought about.
Answer: Some of the reasons:

fresh eyes
more time for exploratory testing
existence or non existence of a testing plan
working without boundaries, without knowing the product requirements
working without executing any text cycle, more exploratory
no time constraint pressure that might be present in the SDLC between sprints
they are focused on finding bugs, you re focused on fulfilling the requirements
Answer: It is inevitable that you are not testing 100% of the product. You are using your formal process which might test things always in exactly the same way. All bugs found this way will eventually be fixed, and your formal process only tests parts of the code that have been made bug free.
Your external testers don't have any such restrictions. They test whatever they like. They tests parts of your code that haven't been tested. You have a test that says "if the user enters X then the output is Y". As an external tester I'd try "what happens if I don't enter X but ABC?£££839 ?".
There may be a subconscious thing going on: That your team wants the tests to succeed (because the developers or your management hate you if you find too many bugs. Deadline missed because bugs were found, and you get the blame). And the external team wants to prove how clever they are by finding bugs. That difference in attitude can make a lot of difference.
Answer: Somethings come to mind which could be the reason would be:

Your internal team members aren't overly motivated, for X reasons
perhaps they are unhappy in their jobs and do not put as much effort
as you think into the testing.
You have relatively new members internally, perhaps they aren't as
familiar with the system and thus will struggle to find a lot of the
issues.
Its not so much a case of internal vs. external in the sense that its
just a fresh pair of eyes if you like, perhaps the external team have
better indepth test cases than you do and what you are executing is lackluster in discovering a lot of the issues.
They are covering more than you are, likely due to resources issues, perhaps you are testing mostly the new features and they are doing a regression suite across the entire project.
Lack of training on the internal team in what is actually a defect, perhaps some things are spotted but left because the tester thinks they are intentional or "product funtionality".
Your environment could be relatively toxic, perhaps dealing with non approachable devs/PM's etc some testers are in fear of logging the defects as it A) ends with it not being fixed anyway or B) confrontation.
Inefficiencies and/or bad estimations mean you are struggling to actually test what you set out to cover originally.

The list could go on forever, but it's almost hard to really pinpoint without more detailed information on your end.  Who is responsible for the testing effort in your organisation, sounds like you need more root cause analysis in order to discover why you tend to miss a lot of these issues and modify your processes accordingly.
Answer: You should take a few of the bugs found by the outside testers and ask your team how/why those weren't found by the internal team.  Be clear that you aren't looking for fault, only trying to understand why they found bugs afterwards - for the purpose of learning & improving.
Comment: +1 While this does not answer the question (why is is happening), it is THE ONLY answer which does not try to **guess the reason of the lackluster performance** of the "internal" team using just pure WAG guess, but tries to **find the root cause** of it, and fix it. We cannot know the reason, so we cannot guess it. OP can investigate and find it. Finding the root cause of a detected problem is very valuable skill by itself.
Answer: Problems that internal testing teams face:
Continuously working on the same application is a monotonous activity. I have many examples, where people don't even refer to the test cases that have been written; because they are so sure that they know the application in and out. Many times, internal testing teams are under too much pressure to meet the deadlines. This results in poorly created test cases and poor reviews. This is the reason, that the teams are used to writing test cases in a certain way, covering some common scenarios. Generally, reviewer is also from the same team, and being a part of the team for a long time, his brain is also tuned to accept only these scenarios. So, gradually, the whole team loses the ability to think out of box.
What does the external testing teams do different:
There is always more pressure on external testing teams. If they miss an issue, that is mostly likely, will go to production too.
So, there thought process is more aligned with the business use of application.
Even this is visible from the way external testers create test cases. They try to cover high level scenarios and also try to be on top of them. So, they will pick a scenario and test whatever they can (trying all the permutation and combinations); within the scope of that scenario.
On the contrary, internal testers have in-depth test cases covering even the text for each error message. Because of so much detail, they are not on top of the test scenarios. At any point in time, an external tester knows "how many scenarios for a particular functionality have been executed?" whereas internal testers are just solely relying on test cases.
Apart from this, external testers get a relatively stable product to test. Thanks to the internal testing team. So, they can focus on what they are targeting to test. There are hardly any distractions because of which they can lost focus. So, whatever they find is generally of great value for the team.
What internal testing teams should do?
Better planning (as you don't have too much time to experiment during the execution phase)
Generally, development phase activities take longer that planned and consume time of testing phase, squeezing the testing window, mounting more pressure on internal testing teams.
So, Create scenario based test cases.  Before looking at test case coverage, ensure that all the test scenarios are covered.
Ensure that test case reviews are effective.
Get the test cases reviwed externally from another team. Because if you are missing too many issues then that means that you need to do away with the peer review policy because the person reviewing the test cases has the same mindset as of the test case writer. So, it is important to invite people who are looking at the application with a fresh eye.
Update the automation/manual regression suite regularly:
If you are not doing it periodically then application bugs are immune to this suite. So, you have caught whatever falls in the way of your test suites but nothing other than that. So, a six month or more older test suite which has not been updated is generally has limited capability to catch bugs.
keep your test suites updated for all the minor or major changes that have been introduced in the application.
Even if no changes have been made to the application, still try to include more and more scenarios in your test suite to increase the application coverage
After every release, do RCA of bugs and try to identify areas of improvement.
Do RCA of bugs. Try to find out major areas of improvement for testing team. Try to work on the weaknesses identified in order to be a stronger QA team after every release cycle.
Answer: I believe this comes down to a personal pet peeve of mine.
It has become a fairly common thing for the testers to be integrated into the development teams, which, in itself, is a good thing. It shortens the feedback paths and accelerates the development. On the other hand the testers are much closer to the development process and are in danger to adopt certain biases.
Let's assume a new feature gets implemented and validation of said feature is accomplished by using a complicated regex. The tester will be objected to discussions within the team and he will, willingly or not, develop a bias against the input validation, something the devs probably tested thoroughly themselves.
An external tester would test the input validation but since he wouldn't suspect it to break he wouldn't spend as much time on it. It's a concept called believe bias and sadly enough there is nothing you can do against it (at least I came up with nothing that would solve the problem yet).
I'm not saying it's the only factor but it is an often overlooked factor.
Answer: I agree with gnasher729 and Aalok.
Also the additional point I would like to mention is about the Test environment. Please look into it whether both the teams are testing in the exact and more authentic environment.


Select all team data from a drop down

Question: I have a drupal form  with a drop down list of teams like team A, team B, Team C and on submit it goes to page /team-page/[team-id] and displays the particular team details.So how do I do if I have to select all team data? because my page only accepts team ids and I want to use /team-page/all.
Comment: No need to select all team data, you need to create a **default page(/team-page/all)**, by default it will load all the teams. When user submit without selecting any of the teams then it will redirect to **/team-page/all**. And also you can make **all** as the default value in the **select list**, when ever the user submit the form all teams information will be shown.
Answer: if your teams data are coming from the same table use drupal db select and table api to create a table where u can see all the data
try to ajust that to your system
  /**
 * Render a filtered list of entries in the database.
 *
 * DBTNG also helps processing queries that return several rows, providing the
 * found objects in the same query execution call.
 *
 * This function queries the database using a JOIN between users table and the
 * example entries, to provide the username that created the entry, and creates
 * a table with the results, processing each row.
 *
 * SELECT
 *  e.pid as pid, e.name as name, e.surname as surname, e.age as age
 *  u.name as username
 * FROM
 *  {dbtng_example} e
 * JOIN
 *  users u ON e.uid = u.uid
 * WHERE
 *  e.name = 'John' AND e.age > 18
 *
 * @see db_select()
 * @see http://drupal.org/node/310075
 */
function dbtng_example_advanced_list() {
  $output = '';

  $select = db_select('dbtng_example', 'e');
  // Join the users table, so we can get the entry creator's username.
  $select->join('users', 'u', 'e.uid = u.uid');
  // Select these specific fields for the output.
  $select->addField('e', 'pid');
  $select->addField('u', 'name', 'username');
  $select->addField('e', 'name');
  $select->addField('e', 'surname');
  $select->addField('e', 'age');
  // Filter only persons named "John".
  $select->condition('e.name', 'John');
  // Filter only persons older than 18 years.
  $select->condition('e.age', 18, '>');
  // Make sure we only get items 0-49, for scalability reasons.
  $select->range(0, 50);

  // Now, loop all these entries and show them in a table. Note that there is no
  // db_fetch_* object or array function being called here. Also note that the
  // following line could have been written as
  // $entries = $select->execute()->fetchAll() which would return each selected
  // record as an object instead of an array.
  $entries = $select->execute()->fetchAll(PDO::FETCH_ASSOC);
  if (!empty($entries)) {
    $rows = array();
    foreach ($entries as $entry) {
      // Sanitize the data before handing it off to the theme layer.
      $rows[] = array_map('check_plain', $entry);
    }
    // Make a table for them.
    $header = array(t('Id'), t('Created by'), t('Name'), t('Surname'), t('Age'));
    $output .= theme('table', array('header' => $header, 'rows' => $rows));
  }
  else {
    drupal_set_message(t('No entries meet the filter criteria (Name = "John" and Age > 18).'));
  }
  return $output;
}

Select all team data from a drop down


What are some safe chest exercise for people with shoulder impingement?

Question: Are there any safe chest exercise you can do when you have shoulder impingement? Or should you avoid all forms of chest exercise in general?
Answer: Push ups. ONLY IF THEY ARE PAINLESS. It goes without saying that, if your feel shoulder pain during push ups or any other exercise, you should stop immediately (ignoring this puts you under risk of becoming a full supraspinatus tear).
Be careful not to flare your elbows out. That goes for your triceps too (you asked that in another thread). Push ups will work your chest and triceps.
If you cannot exercise without pain, then you should not try it. Seek a therapist. Exercising while in pain will only worsen your condition. The pain happens because the subacromial space is reduced and the supraspinatus has no room. Trying to push through the pain will eventually lead to severe damage to that delicate muscle.
If you cannot afford medical treatment, then try to rest and avoid any overhead activity with that arm, and anything that causes pain. If that is your dominant arm, learn to use the computer mouse with the other. Only after the pain has gone and is well in the past, then start exercising, but always avoiding overhead activities.
Answer: Basicly any excercise you can do 30+ repetitions without pain. For rehabilitation you want a low load and a lot of repetitions, this will get the blood flowing and help the healing process. If push ups are to hard, try easier variations, e.g. leaning against an open doorway and performing the push up movement. Adjust angle by moving your feet either closer to the door or further away until you can do 30-50 reps. 3 sets are sufficient.
Stretching also helps. Stretching is also a light eccentric excercise. Take a belt or elastic band and grab above your head. Slowly move your arms backwards till the belt touches your bottom, then reverse. Repeat 5-10 times.
Answer: You need to find what works for you, depending on the severity and manner of shoulder impingement.
For some people a flat bench press hurts but an incline one feels strangely fine. Others find that barbell work is problematic but dumbbell work doesn't cause issues.
I'd suggest some experimentation, but again this all depends on how severe your impingement is.
Answer: You could give decline benching a go. Should be less of a strain on your shoulder.
You could also try some dumb bell / cable flies.
You also want to avoid any incline exercises, these will use you shoulders slightly.
But as Mephisto said only if you don't feel any pain. There is nothing worse than re-injuring yourself and having to take even more time out.
Comment: But the weight is still going to push down on your shoulders, by virtue of your arms being connected there.
Comment: I'm not sure how decline benching would be less of a strain given the effects of gravity and the general awkwardness of the movement.
Comment: You don't use your delts as much as opposed to flat/incline
Answer: Find yourself a physical therapist to help you if possible, as he/she will be able to tailor exercises to your particular situation.
I recently went through this. I found that I could bench (flat) if I went really light on the weight (I dropped back down to the bar only) and if I got my back and shoulder position correct. For me this is retracting the scapula (but not as exaggerated as powerlifters do) and getting my elbows in the right position (for me, at a 45 degree position). Also, lift off with the arms rather than pushing the shoulders forward.
If you play around with this, you should be able to find a combination of variables where it doesn't hurt (or just barely hurts). That's what you want.
I've also found face pulls to be very helpful to get my shoulders back. Make sure to get the shoulders back and down at the beginning of each rep.
Answer: Do a reverse grip bench press. It's a good way to open up that subacromial space and correctly position the humerus head in the rotator cuff and in fact it actually helps to decompress that joint space. It's a good rehab exercise that takes pressure off the shoulder joint and emphasizes the upper chest and triceps more than the regular bench press. Don't go too.heavy, watch videos on proper form and always use a spotter. Over time, you'll notice that you should be able to go up in weight with little to no pain at all in your shoulder joint space. Eventually over time your shoulder should be able to rehab itself. By simply switching the grip from an overhand (pronated) grip to a reverse (supinated-to-neutral) grip you can preform all kinds of pressing movements with this hand positioning in mind. I can almost guarantee that you'll feel very little if any pain and it'll start to subside over time. Hope this helps.
Answer: Personal experience, there is a lot of trial and error when working out with an injury. You have got to seriously listen to your body.
I can't do anything with a barbell or my shoulder is screaming in less than 5 reps, doesn't matter what weight it is or the motion. Dumbbells I can do without any pain what so ever. I can't do close grip pushups but I can do any other grip. I have to warm up a lot to do a shoulder press and really listen to that joint. When I haven't run for a while (I skip when it's cold) I have the same pain for the whole run, day 2 no problem. I usually break every 1/4 mile or so for push ups or my hip makes weird noises. Unfortunately being an idiot growing up has left me a much higher than healthy pain tolerance. Also many wtf's from Dr.s when my x rays come back. Been told before I shouldn't be capable of walking, not that I need to be on bed rest, but that I shouldn't be capable of it.


How is it technically possible for Apple to unlock the San Bernardino shooter's iPhone?

Question: If the iPhone of the San Bernadino shooters is locked, how would it even be possible for Apple to acquiesce to the FBI's request for them to unlock the phone?  Does that mean Apple has some kind of "back door" that would let them into any phone?  Wouldn't a locked phone theoretically be secured from access by anyone who doesn't have the password, including the manufacturer?
Comment: This has been covered repeatedly in the news and on this board. http://security.stackexchange.com/search?q=iphone+fbi
Comment: @roryap The short version of the FBI's plan is to modify iOS, install that on the shooter's phone, and then unlock it. All the links above cover this.
Comment: Thanks all.  Some interesting reading to be sure.  I'm sorry I pulled a "new users" and didn't do my due research.  I should know better given my participation level on stack overflow.
Comment: I disagree. All those I've seen so far talk about modifying iOS going forward to add a back door. How does that help retrospectively?  They can't apply that to the shooters phone.
Comment: They can push the new firmware to the shooter's phone without erasing the data.
Answer: Apple would have to develop a version of iOS that bypasses delays in passcode entries and disables the setting which deletes the phone's data after the 10th failed attempt. The phone would then be brute forced. FBI would also like to enter passcode through a connection to the phone rather than the current UI.
Apple would then most likely load this onto the phone using a tool referred to as PurpleRestore. This is the best guess as to how they would load a new version of iOS without unlocking the phone.


Is Hanukkah a holiday or a festival? Is there a difference?

Question: I recall hearing that Hanukkah (or maybe Purim) is a festival, rather than a holiday. Is this true? Is there a difference?
Comment: Welcome to Mi Yodeya espertus. Jewish legal literature has traditionally been written in Hebrew. Thus, various legal terms e.g. _Yom Tov_, _Mo'ed_, and _Chag_ are used to describe special days. All may legitimately be translated as either "festival" or "holiday". Thus, to clarify the question, one must choose which legal (Hebrew) term is being used. To learn more about the site consider taking the following two-minute [tour](http://judaism.stackexchange.com/tour). Hope to see you around.
Comment: @DoubleAA, I disagree. Part of what is nearly-explicitly sought in this question is the precise terminology. The question is clear enough on its own terms.
Comment: VTC as unclear, per @mevaqesh's comment.
Comment: I agree, @DoubleAA. Apparently the two answerers do not.
Comment: @msh I don't think you can bring proof from the answers. Users have been known to answer posts which should be closed before.
Answer: I don't think there's a formal English terminology what people would call "festival" vs. "holiday", but there certainly are distinctions.
The Jewish holidays such as Passover, Sukkot [booths], Rosh Hashanah (new year) and the like are spelled out in the Five Books of Moses. They all include "no-work" days. So you will not see an observant Jew at the office on those days.
Hanukkah and Purim are both post-Mosaic (Purim described in the Book of Esther, and Hanukkah in the Talmud), so they are known as holidays of rabbinic, rather than "biblical" force. Additionally, when they were instituted, they allowed people to work. So they're actually more minor holidays, and plenty of observant Jews do work those days -- though they have to handle a few rituals over the course of the day (often before or after work).
Answer: It's hard to answer this question concretely because "festival" is an English word and Jewish concepts are not generally categorized by English words. But I will attempt to answer this question as well as I can.
In my experience, with respect to Jewish observance, the word festival usually has one of two meanings. The first corresponds to the three pilgrimage festivals. These are Passover, Shavuot, and Sukkot. Going by that definition, neither Purim nor Chanukah would fall into the category of "festival."
The other usage of "festival" that I am aware of refers to Jewish holidays that are called "mo'ed" in Hebrew. The word "mo'ed" means appointed time. Purim is called a mo'ed so using that definition, one could call Purim a festival.
Comment: To use your phraseology on a prev. question of mine, I'm being a bit pedantic, here. Purim is called a "Yom Tov" in the Megillah, not a "Mo'ed". OTOH, Tisha B'Av is called a "Mo'ed". Shabbat is also called a "Mo'ed", by inference.
Comment: It might be worth talking about the word *chag*, which is usually (in my experience) translated as "festival".
Comment: @DanF If you check the Talmud Megillah, you'll see that "yom tov" with regards to Purim was never actually "accepted", it's a bit of an explanation
Comment: @warz3 I know that. "Accepted" meaning that the people did not accept it as a day prohibited from work. See my answer, below. I think I did a limited explanation of Yom Tov without delving into this nuance. I may ask a separate Q about the origin and meaning of the term "Yom Tov", as I think Esther is the only place in Tna"ch that uses this term.
Comment: @DanF that sounds like a good question; you can look at my answer on this one, and I bring how the Talmud defines it
Comment: I'm going to try to post one in a few mins. Perhaps, you can port (and expand / link) this answer to that one.
Answer: In addition to the answers above, perhaps I can summarize things in terminology. As stated, the term "festival" or "holiday" doesn't translate well into a specific Hebrew word, when discussing the "important" days mentioned in the Torah.
Let's view a key verse in the Torah that appears before the entire list of holidays. Focus on the bolded Hebrew terms more than the English, as the English almost always misses some nuance.
Leviticus 23:2:

דַּבֵּ֞ר אֶל־בְּנֵ֤י יִשְׂרָאֵל֙ וְאָמַרְתָּ֣ אֲלֵהֶ֔ם מוֹעֲדֵ֣י
  יְהוָ֔ה אֲשֶׁר־תִּקְרְא֥וּ אֹתָ֖ם מִקְרָאֵ֣י קֹ֑דֶשׁ אֵ֥לֶּה הֵ֖ם
  מוֹעֲדָֽי׃
Speak unto the children of Israel, and say unto them: The appointed
  seasons of the LORD, which ye shall proclaim to be holy
  convocations, even these are My appointed seasons.

There are two terms used here - מועד and מקרא קדש. For purposes of this discussion, the first term is a superset of the 2nd term. I.e. - a  מועד such as Passover, lasts 7 days, according to the Torah (I don't want to delve into why in Israel there are 7 and outside Israel 8; separate discussion.) Only the 1st & last days are מקרא קדש  , meaning that work is forbidden meaning that work is forbidden. But the entire 7 days are called a מועד.
If you read all of Leviticus chapter 23, you will find a list of all the מועדים, which include:

Shabbat
Pesach
Shavuot (not mentioned by name, here)
Rosh Hashanna )here, called Zichron Teru'ah)
Yom Hakipurim (a.k.a. Yom Kippur)
Succot

Of these, the term מקרא קודש is used for:

Shabbat
1st day & 7th day Passover
Shavu'ot
Rosh Hashanna
Yom Hakipurim
Succot (1st & 8th day)

So, what's excluded?

Rosh Hodesh
Chanukah & Purim (neither of which are mentioned in the Torah, anywhere)

It is interesting to note, that Tish'a B'av is called a מועד as per  Eicha (Lamentations) 1:15. However, work is permitted (part of) that day, and it is not a Torah listed holiday.
There is another common term for "holiday" called יום טוב Yom Tov which means, literally "Good day". This term is commonly used to refer to one of the non-work days that I mentioned above. However, Purim, a day on which work is allowed is also called a  יום טוב as seen in Esther 9:19. So, we see that this term does not necessarily imply that it is a day where work is prohibited.
Answer: The term Chag traditionally means "festival", whereas "holiday" doesn't necessarily have a strict Hebrew translation. Chagim in its strictest sense refers to Passover, Shavous, and Sukkos (Rosh Hashanah as well as seen in Talmud Rosh Hashanah on Tehillim 81:3).
Hannukah, Purim, Shabbos, etc. are not traditionally "chagim." I have even heard that technically it is incorrect to use the greeting "chag sameach" on Hanukkah & Purim, as they are not chagim.
With regards to holiday, if one wanted to try and use "yom tov" analogously, that would also be likely incorrect, as "yom tov" implies a cessation from melachot (halachically laborious activities). (see Talmud Bavli -- Megillah for this definition and also why Purim (called a 'yom tov' in the megillah itself is not included)).
This is probably why there is the common greeting of "Hanukkah Sameach (Happy Hanukkah", Frelicher Purim, etc.


Using SQLite ODBC without installing a driver

Question: I am currently trying to access a SQLite database via an ODBC connection but the system that I am working on is extremely locked down and it is therefore not possible to install the drivers. Is there any way to bypass this?
Comment: Use the client from a memory stick?
Comment: What are you trying to do? Are trying to access the data from a frontend application or just trying to query for data?
Answer: ODBC as just an interface between applications and drivers.
It is impossible to create an ODBC connection without using some installed driver.
Answer: The answer will depend upon what tools you have available. What database system are you trying to get the data into? Oracle? Sql server? Windows machine or unix box?
One alternative could be install software on a 3rd machine. (your PC?) Extract the data and convert it into a suitable format to import.
Another option could be to export the data to a .csv file and then import that.
You could use Excel, MS Access or even sql express.
However, this is going to become part of a regular process. I suggest you try again to have the required drivers installed.  That would be the cleanest and most straight forward option. Everything extra step you have to take costs time and introduces risk.


How to save the render result within Blender

Question: Is it possible to render an image and have blender remember it, so that next time I open the file the render result will not be blank?  I am not talking about saving to an external file.  Specifically I would like to render an image, close blender, and come back later and be able to do some compositing on the render without having to waste a half an hour rendering it again (my GPU drivers are messed up so I have to use the CPU).  Currently the render result is blank when ever I open a file.
Answer: No, Blender doesn't have this functionality.
Its possible to write an addon to do this, on-save it could save the render result to a Multi-Layer-EXR image, and on load it could check for that image, loading it if its available. (probably not all that hard to get basic functionality, but you will loose render slots).

An alternative which is admittedly little clumsy, you could use a file-output node in the compositor and save this in your user-defaults,
so your renders are automatically saved. In the user default you could have an image view pointing to this file, so on-load it would read the last rendered image.
Comment: I am not familiar with EXR files, would it be able to have all data the *render layers* node does, i.e. z-depth, RGB values greater than 1, material pass indices, etc.?  If so this would be extremely helpful.
Comment: Yes, multi-layer EXR's store passes & render-layers.
Comment: This sounds like what I am looking for, if you could explain how I would go about doing this that would be great!  I have never done any scripting for Blender before and my Python is a bit rusty (I do do quite a bit of programming in other languages though).  So if you could add some code to your answer it would be greatly appreciated. - Thanks!
Comment: For info on writing an addon, best you have a go, and if you run into troubles, ask a different question. (link to it from here is fine)
Answer: Yes, but it's a pain.
If you just need the image:

Render your image
save the image externally (this isn't the answer, just a step)
open the saved image in in UV/Image editor (now separate image from your 'live' render)
Pack all your images
save your work
you can now delete the external image, the packed version will travel with the blend, and be available the next time you open the file.

However, when you need to update the render, you need to unpack, update, and repack. So, it's just a pain.
If you need the individual render layers, then you should render to .exr as @ideasman42 suggests.
Edit: You can render the EXR, then pack it with the steps above. Same effect, the render will be stored in the blend, and available next time you open.


Paperless Environment

Question: my company is planning to go for paperless, what free open source software do I need to help pull it off? All suggestions are welcome, We all ready have citrix cloud stack on premise if that helps.
Comment: Shopping questions are off-topic, as per the FAQ.
Comment: "Paperless office" is really a marketing term. You/your company might start its journey by banning the use of that kind of talk, & start defining exactly what you mean in terms of the day to day operations that staff there have to carry out. This will move you towards actually having an actionable list of items, as opposed to a meaningless mission statement. This will tell you if there is a need to send (for example) legal letters in postal mail as per t1nt1n's comments, & it will also show you if there are any obvious "wins", e.g. company newsletter that can easily become a company intranet.
Comment: Your comapany lives a dream. When it wakes up it liost moeny or is bankrupt. Paperless wont work - if for anything then for a lot of LEGAL reasons.
Answer: This is very hard to answer in its current format, we do not know if you use a CRM/ERP. Emails etc etc.
But you need to look at where the paper is generated. You cant just install a single app and think that all paper will go!
We run a paperless office but I can tell you we still have paper in the office. Clients still send things in and certain things NEED to be printed by law.
My suggestion would be take a step back, look where things are being generated is it needed? Is it just easier for the user, could they have a little training to help? look at the applications that you have in house and sit down with users and ask why the print it. We found a number of people didn't know they could save email text into our CRM so printed it out and scanned it in! After training we cut our print count by around 2000 pages  a month.

Paperless Environment


hide windows taskbar on page load

Question: is it possible to hide windows taskbar during page load of an aspx page?
Answer: No. There used to be such option in IE, but as it was abused by malware (e.g. it hid the real taskbar and pretended there was a virus on the computer, then scared the user into downloading the real virus), it was removed.
In general, the code inside the browser has no business messing with anything outside the browser, for security reasons.
If you have control over the clients' computers (e.g. for an internal application that will be used from specific computers) and you know which browser(s) will be used, you could write a browser plugin (or an extension, in case of Firefox/Chrome/Opera) and install it on those computers - these have a much higher privileges of access to the rest of the OS, almost like normal processes.
Answer: No it is not possible without using some proprietary plugin inside the browser.

hide windows taskbar on page load


Equivalence of exponential moving average to simple moving average

Question: I am aware of the differences between an exponential moving average and a simple moving average, with the weights of the latter being fixed and equal for each observation in the calculation compared to exponentially decaying weights for the former.
Is there a rule of thumb to compare the lookback-period / formation-period of a simple moving average to the half-life of an exponential moving average? I.e., if I am working with a simple moving average of say 10 days, is there an approximate equivalent for an exponential moving average half-life? A former colleague told me once that a simple moving average is approximately equivalent to about 3x the half-life of an exponential average, but I do not recall why. He claims that e.g., if you're using a simple moving average of 10 days, the equivalent exponential moving average will have a half-life of 3.3 days. Does anyone have an analytical solution to the equivalence?
Comment: Wouldn't it be quick to check if you simply computed/retrieved and compared both values?
Answer: Hi: I haven't heard of that equivalence. But one other equivalence which you may be interested in is the $\rho = 2/(N+1)$ relation where N is the width of the moving average and $\rho$ is the parameter of the SES model: $\hat{y}_t = \rho \hat{y}_{t-1} + (1-\rho)y_{t}$.
The derivation of above is in Brown's book: "Smoothing, Forecasting and Prediction of Discrete Time Series". IIRC, he equates the weighted age of the observations in the moving average with that of the SES.
This is not to say that your colleague is incorrect. It might be something he-she came  up with on their own. So, this is not an answer to your question but it was too long for a comment.
The half life in an SES model is obtained by setting $\rho^{halflife} = \frac{1}{2}$. This can be re-written so that one gets $halflife = \frac{log(1/2)}{log(\rho)}$. In this manner, one can obtain the
halflife given the SES parameter, $\rho$.
Comment: Thanks for your comment. How do you link 'rho' to 'alpha'? Or is 'rho' equivalent to 'alpha' in your example?
Comment: @The User: My apologies. The use of $\alpha$ was a typo. I meant $\rho$ but you are correct that $\alpha$ and $\rho$ are the same thing. I'm just used to using $\rho$.
Answer: There is no (and cannot be) any exact relationship between simple moving average (SMA) and exponential moving average (EMA).  Qualitatively, they are similar for similar trailing horizons.  I would argue in favor of EMA for most (or all) applications as much much more computationally efficient and API-friendly.  I am not aware of a single case, in my ML/forecasting experience at least, where SMA is superior to EMA in some respects.  But I would also recommend against the simple EMA update formula as used in the previous answer.  Instead, a simple data structure maintaining the weighted sum of observed values, their squares, and the weights themselves supports an efficient computation of mean, standard deviation, effective number of weighted observations, and other statistics.  An EMA horizon is introduced by a decaying all sums by a factor less than one.  A similar data structure for multivariate observations supports EMA correlations, OLS, ridge, Lasso, and other linear models.
Comment: Hi Michael: The advantage of SES is the computational ease and that it's optimal for an ARIMA(0,1,1). But, as you mentioned, if you  compare the results of the two resulting series using $\rho = \frac{2}{N+1}$ you'll see that they are quite close. So, I agree that, generally speaking, there's no big difference if one uses that relation for SES. See Brown's text for an in-depth discussion of SES. It's called "Smoothing, Forecasting and Prediction of Discrete TIme Series".


What is the role of plasma in nuclear fusion energy production?

Question: I read that confined plasma in electromagnetic field uses in TOKAMAK nuclear fusion reaction. But I don't know what is the main role of plasma in fusion reaction. Is it use for producing energy required to fuse nuclei or something else?
Comment: The plasma is largely a consequence of giving the atoms/molecules enough energy that they start losing electrons.  They need the high kinetic energy to overcome the Coulomb barrier produced by the protons of each nucleus in order to undergo fusion.  So the plasma is unavoidable with current technology and in some cases is the primary constituent that the experimenters hope will undergo fusion.
Answer: You may have things a bit mixed up.
Plasma is not something that plays a role in fusion as if it were a tool or an instrument for its achievement. It is instead the only possible medium where nuclear fusion can occur: very basically, high enough temperature for protons to overcome the Coulomb repulsion, and high enough density for increased chances of fusion reactions.
So it is an intimate part of nuclear fusion, rather than an appendix or a component of it. All components of nuclear fusion rather revolve around the plasma: how to heat it, how to contain it, how to shape it, how to control it, etc.
Whether in nature or in laboratories, these questions are answered by ancillary structures (e.g. large gravitational and magnetic fields, vacuum vessels, magnets, neutral beam injectors, radio-frequency antennas, lasers or solenoids), but the plasma will always be the central and indispensable part of the whole process of producing energy through nuclear fusion.
Comment: What is the application of quantum tunnelling in this process? Does quantum tunnelling is in now applicable technology for  nuclear fusion reaction?
Comment: quantum tunneling is what allows fusion to occur in the first place, but without high temperatures, the probability of fusion is extremely low
Answer: At the temperatures required for fusion reactions, matter can only exist in the plasma state. That's rather inconvenient for designers of fusion reactors, since plasma is hard to control and contain.
And that's why the claims about cold-fusion were so appealing. Cold fusion promised to provide fusion power without the hassle of dealing with high temperature plasma. Unfortunately, those claims turned out to be false.
Comment: But how tokamark gain power to fuse nucleus?
Comment: The [tokamak reactor](https://en.wikipedia.org/wiki/Tokamak_Fusion_Test_Reactor) never generated more power than it consumed. In other words, it was using power from the power grid (just like the light bulbs in your house) to heat the plasma.
Comment: So,fusion occurs in the confined plasma?
Comment: @Absaed Yes, the plasma contains deuterium ($^2H$) and tritium ($^3H$) nuclei that are the [fuel for the reactor](https://en.wikipedia.org/wiki/Fusion_power#Fuels).


What is minimum period by which my cycles should be service?

Question: I am using a Hercules MTB thriller,I drive a maximum of 75 km per week. When should I schedule periodic, quarterly full service for the bike?
Comment: Clarify this: do you travel on  pavement or dirt roads? Do you use high quality chain lube? What about weather conditions?
Comment: cycling on only proper state highways and city roads in India, rarely resorting to dirt roads and potholes (available in plenty in Indian road). Weather is humid and hot, very rarely rainy and very very rarely cold.
Comment: You should generally clean and oil the chain every 200-400km.  The chain should be replaced every 3000km or so (get a "chain stretch gauge" to check for the need to replace).  The rear cluster will need replacement every 8000km or so, the most heavily used front sprocket at about twice that long.  Wheel bearings (and bottom bracket if not sealed cartridge) should be repacked roughly every 20000km.  But a lot depends on conditions.  And more frequent service is needed if the bike is left in the rain a lot.
Answer: On the bike you have, just keep the chain oiled and the brakes tight.
There is no point in bothering to service anything else, as regardless of what you do it will just drop off one fine day. In any case, single speed commuters don't need much maintenance.
The bike has really poor build quality.
Go to your bike shop to get stuff fixed when you have real problems.
As it is you'll have to throw away the bike in about 3 years(if you use it as much as you claim).
To everyone else reading the answer, the bike in question is this. A $75(USD) commuter BSO.


How to add DNS server in icinga/nagios server on ubuntu?

Question: I already install and configure icinga on ubuntu.All host configure IP in manually.Now I want to add DNS in my icinga server. Actually, I want to add that keep to dynamic IP address in host. Now all the host IP is dynamic that why my icinga server does not working properly. Because every time host IP is changed. After that all host is down. This is a big problem in my icinga server. How to I configure DNS or Dynamic IP address in icinga server. Please given solution.
Comment: Configure your DNS server to reserve IPs for your hosts instead of messing around in Icinga.
Answer: It sounds like you need to re-think your network Topology find an IP range that works for your hardware and assign all devices individual Static IP's generally speaking only clients should use Dynamic convention unless all devices are dynamic.
Comment: whom ever is going around down voting everyone without reading the entirety of the question is quite frankly being childish. Johors English may not be perfect but he was clear enough for me to understand that he needed some help. Johor please go to my question and +1 it so its out of the negative range Ill do the same for you.


Is there a way to smooth scrolling in flot?

Question: I am currently using this chart from flot's examples page. I was just wondering if there is a way to make the zoom smoother or more lively. Is this supported in the latest version of flot or is there a good hack that can do this?
Answer: I'm not sure, but I had a similar problem with the resize plugin. I had flot graphs in a div that needed to grow/shrink with the browser window, and resizeing had the same choppiness. I found the resize plugin had a built-in 250ms delay for redrawing. I changed this to 0 and the result was perfectly smooth.
I'd look for something similar in the pan/zoom animation as it seems very similar.