What is the possible disadvantage of putting declarations in inner blocks, instead of at beginning of function?

Question: At the place where I work, there are explicit guidelines for placement of declarations of variables. According to that, it is required to put them at the global level and / or at the beginning of functions, and not in inner blocks (such as a for loop). Since they've been specified by persons more experienced than I am, I'm sure that there must be a good reason for it, but I cannot figure out what that might be. It would be nice to know if there are any compile time / run time advantages at having them declared at a bigger scope.
Comment: The main practical benefit is not where declarations are located, but that there is an agreement among all teammates about that.This is true for coding rules in general.
Answer: I see two main advantages:

Reusing variable names with a different type is prevented.
It becomes clear at an earlier time that a routine needs to be refactored. The variables at the top become a major mess fairly quickly, and this mess is easy to recognize.

Any compiler worth its salt will optimize away the scope of the variables anyway, so it's purely a formatting concern.
For my two cents, I'd still prefer the innermost declaration of the variable to transport the intent of scope to the compiler. If you intended to have a variable only accessed within a loop, you can catch any later reference at compile time when you declare the variable in the loop.
Comment: Most compilers will happily warn about shadowing. See for example [gcc](//gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-shadow).
Answer: The only advantage I have found so far is code simplicity. Youalways know where to look for variable declarations and everybody in the team adopts the same coding style. These things make code maintenance easier but I am not sure that they make writing better code any easier. I do not mean that you write worse code only that sometimes it is harder to write code as good. Nevertheless if the development team is big or its members change frequently using code standards is helpfull.
Answer: This sounds like a decision to preserve consistency. It also prevents the use of same names for different variables in neighboring scopes and increase readability. As Gus points out, you'll also know where to look for variables. I think narrowest scope principle is better though because it prevents the variable clutter at the top. Outermost declaration is much like declaring private members of a class first IMO.
Answer: Every language might differ in the preference of style and practice.
Following is from JSF-AV-rules, which Stroustrup points to as the coding standards he prefers.

AV Rule 136
Declarations should be at the smallest feasible scope

The rationale for this is described as

This rule attempts to minimize the number of live variables that must be simultaneously considered. Furthermore, variable declarations should be postponed until enough information is available for full initialization

If you are in C++, declaring variable when you need them is preferred.
Answer: Not sure if you can call this a best-practice. When I set up guidelines for a new C project I always state that it is better to declare the variables close to where they are used. For two reasons, it makes it easier to refactor the code later on (i.e. when extracting a method). It also helps the compiler to do better optimization.
I'm not alone with this opinion. Here's a question that tackles the same problem:
https://softwareengineering.stackexchange.com/questions/56585/where-do-you-declare-variables-the-top-of-a-method-or-when-you-need-them
The answer here is to declare them where you use them. The same practice is described in the book 'Clean Code' by Robert C. Martin.
However, if you use an older C-standard (C-89), you must define local variables at the top of the function. So maybe the guideline is a remnant from the time when C-89 was used? It is probably better to ask the person that wrote the guidelines why the rule is still in there.
Answer: If the declaration is within an if clause that only rarely (if ever) gets exercised, but needs a lot of memory, your memory footprint is smaller (most of the time) than if you allocate everything at the beginning of the function.
If it is within a loop then you have to reallocate the memory repeatedly, this can be costly in performance terms.
There are reasons for doing things both ways.
Answer: The old C-standard of 1989 only allows variable declarations at the start of a block.
Only since C99 declarations are allowed anywhere. Maybe your place hasn't made the switch to C99 yet.
Comment: We use C99 - but more importantly, I was looking for what are the implications of declaring it in the innermost block, rather than at beginning of function. Perhaps, I wasn't clear enough...
Answer: Seems like those who made this decision are use to a time when putting declarations at the top was the norm and have chosen not to switch to a preference to declare closer to where it is being used.
I'm not sure how helful this level of consistency is. Some IDE's probably make finding things easier than others. For global variables this makes sense, but if your function is so long it makes finding variable declarations difficult, you have bigger problems.
Answer: I'd find that rule very unhelpful, and it leads to worse code and more bugs. In newer languages it is very bad. In Swift for example, and probably in other languages, it is a very good idea to have variables that only are assigned a value once - and that means they must be declared in a nested scope in practice.


Why struggle for a single pawn?

Question: I've seen many chess games, where after a certain point, one side maneuvers their pieces (like doubling the rooks) to target a single point. Most of the time it's a pawn on the wing and the other side tries to defend their pawn. But why struggle for a single pawn?
Answer: As the old poem says:

For want of a nail the shoe was lost.

For want of a shoe the horse was lost.

For want of a horse the rider was lost.

For want of the rider the message was lost.

For want of a message the battle was lost.

For want of a battle the kingdom was lost.

And all for the want of a horseshoe nail.

Exactly the same principle applies in chess. Usually the loss of the pawn results in the loss of the file, loss of control of the file allows the rooks to penetrate and the position soon collapses.
Answer: I'm not at all disagreeing with the existing answers - both sound. Indeed every pawn is a potential queen. However, one aspect of the question remaining is: why struggle for a pawn as opposed to a more decisive plan?
In the games that you are watching, if they are between capable and well-matched players, very often the game will be quite well balanced with neither side having a promising attack leading directly to checkmate. Launching such an attack in a position where it is not justified is more likely to lead to a worse position than an improvement - an unfounded attack is usually beaten off by a competent defender, leaving the attacker with a compromised position.
But a player has to try something to win and, in a fairly level position, the win of a pawn - even if not conclusive - may be the best plan available to get an advantage in the game. Even a small advantage is better than none!
Answer: Another point which has not been raised by the excellent answers above is that pawns are easy to block. A pawn can be blocked by just one piece in front of it, and it cannot take the piece which blocks it. Contrast this with any other piece, which can take a piece which blocks its movement (barring other circumstances such as a pin).
This property means that it is much easier to keep a pawn in place where it can be attacked and then taken.
Answer: Preceding answers and comments make many good points.
Why struggle for a single pawn?
The simple answer is: Chess games are mostly won by material advantage!
Generally being up a single pawn in an otherwise safe position is a clear advantage, often a winning advantage.
In such a situation a GM analyst might say: And the rest is technique!
Of course there are myriad situations where the extra pawn does not guarantee a win but the general rule is that material advantage counts.
This is seen at the highest level eg Bobby Fischer was happy to take the so-called "poisoned pawn" variation in the Sicilian and hang on to it even though White had an initiative.
He knew that he if could hold on to that humble pawn it would lead to increasing advantage as pieces were exchanged.
The player with the extra pawn also has the option of giving it back at some stage in exchange for some other advantage.
As the game progresses and piece exchanges occur the value of that extra pawn increases.
Answer: The answer by @Brian Towers is both beautiful and true, but not always true. It is perhaps true if you think of every pawn as a potential queen. However, in endings, especially in Rook endings, the textbooks will tell you not to be drawn into passive defence but to keep your pieces active, and counterattack. That being said, you may not have the choice. There may be no counterattack available that is strong enough. And even if you do have a choice, it may not be obvious which is the right choice. You may not have a workable defence available either. It then becomes a matter of style, which of two evils to endure.
Answer: You should think of pawns not as individual units but as a group acting as one unit. If one pawn is one "point" then the entire pawn formation is 8 "points". This actually makes pawns one of the most powerful units in the game. The pawns are your front line and do an excellent job of defending each other in diagonal lines. If your opponent takes one of your pawns then your front line has been split into two smaller pawn formations. This is a weaker line of defense because now you have a hole open between the two formations. Your opponent could place a rook or queen on the newly opened file and be able to threaten pieces behind your front line. So you are defending more than "just a pawn", you are defending the pawn structure as a whole.
Answer: Read Steinitz.
Before him, people didn't even ponder about that, they went to the throat of each other with no further question asked and no quarters given.
Steinitz had a breakthrough insight: You don't simply walk into Mordor. If you attack blindly a king hiding behind a position without weaknesses, with not more material than the defense will come up, you will fail miserably. (The defender will have at least the king, and that dude is as strong as a rook, I can show my own games.)
Thus Steinitz became father of positional play. It's so much easier (i.e. takes less material and moves) to force weaknesses and gang up pawns, and only if the opponents stand has been weakened, you can throw him. (Yup, that was a Judo metaphor.)
Of course Tal would talk back to me but he's dead :-(
tl;dr: All depends on the position.
Answer: A pawn is a potential queen (or any other piece you prefer, except the king of course). The great world champion Jose Capablanca was noted for winning a pawn and nursing his advantage into a winning ending.  Between skilled players where tactical errors costing more substantial material may be few, it is advantageous to try to gain a pawn to have these winning endgame chances.  Of course, if the opportunity to gain a greater material advantage arises, that's the course you should take instead. Even gaining a positional advantage, such as doubling your rooks on an open file and penetrating into the enemy position as you mention, which could ultimately translate into a material one, is a desirable course of action.
Answer: That's like asking why volleyball players struggle to win a volley. Winning volleys twice in a row, or when you already have the serve, gets you a point. Winning volleys is how you win the game.
Similarly, winning two pawns, or winning one pawn and getting a positional advantage, wins the game. The fact that just winning a pawn doesn't win the game isn't irrelevant, just as the fact that just winning a volley doesn't get you a point is irrelevant. Why wouldn't being halfway to winning not be something to fight for?
Answer: It has likely to do with harmony.
Harmony defined as a collaboration between pieces and pawns towards a meaningful target.
A pawn can be a meaningful target, provided that you have enough control in the center and your forces are ready to defend your king in case of an attack.
Either you manage to take the pawn and your well coordinated forces can continue the attack.
Or your opponent has to place their pieces in a bad way to defend the pawn and then you switch your focus to a different area. Keep doing this until your opponent makes a mistake.

Why struggle for a single pawn?


Illustrator CS6 Perpendicular Lines following a path

Question: I have a closed path from which I would like to create a parallel inner path. If I drew a series of lines, all the same length, with one end at points along the path (all extending inward), the second path I want would be defined by all the other ends of the lines, except where the lines cross, in which case, the inner curve would be defined as shown in the example image. Does anyone know how I can efficiently create this path? I looked at blending, but couldn't get the lines to orient correctly. I don't mind doing some hand work. I just don't want to have to draw a huge number lines calculating the angle for each. (Drawing a path that follows the inner line ends would be easy if I could get the perpendicular lines.)
Answer: If you only need the parallel inner path, you can use the Offset Path tool under Object->Path->Offset Path. You'll just need to enter a negative number as the offset value to make an inner path. The Joins and Miter Limit options work the same as the Corner and Limit options in the Stroke panel. Just make sure you have the Preview box checked to make sure it will look like you want it to. Note that this will probably add a few extra anchor points to the new path.

It's a little unclear if you actually need the small perpendicular lines or if you were just using them as a tool to make the inner path. If you do need them, the simplest way to make them is to add a Dashed Stroke to one of the paths. Just give the path a stroke equal to the value you used to create the offset path, set Align Stroke to either Outside or Inside (depending on which path you're using), and check Dashed Line. Then just adjust the Dash and Gap values until it looks like you want.
Comment: Hi wing-it welcome to GDSE and thanks for your excellent answer! If you have any questions, please see the [help] or ping one of us in the [chat] once your reputation is sufficient (20). Keep contributing and enjoy the site!
Answer: The easiest methods I can think of are a Dashed Stroke or a Pattern Brush. Either would need to be expanded then corners or curves fixed manually, but both would certainly quickly fill most of the path with lines.


How can I figure out what technologies a site is built on?

Question: I'm researching building a site by looking at what other people have done but I don't know how to determine what technologies or platforms are being used.  How can I tell what any given site is running when I visit it?
Comment: The Pro Webmasters FAQ states that the scope of this site "covers the operation of websites *which you control*", however, this question comes up often so I am converting this to a Community Wiki for closing out past and future duplicates.
Answer: There are four basic things you can check to determine what any given site is running:

Source code.  Do a view source on the page and look at what scripts are being called in.  Typically you will see things like JQuery, Modernizr, and other common javascript libraries and these will give you some clues about how things were built.  If the site is using a common CMS, you may also see paths that tip you off as to which CMS it was (e.g. /wp-content/ for WordPress).
Server. Checking to see what web server a site runs can also help give you clues as to how it was built. Sometimes this is pretty easy to figure out...if you see a file extension of .cfm or .asp/.aspx then you are on pretty solid ground with knowing which technologies are in play.  If a site uses permalinks or other method to obfuscate the extension, check it against Netcraft to get a report of what server it is running on or you can use some tricks like issuing a telnet to servername on port 80 or a curl command to see the response header and that will tell you what the server environment is like. Combining what you learn in these two steps with experience and some extra Googles will usually tell you what you want to know.
humans.txt. Check http://example.org/humans.txt to see if developers already listed everything for you.
Check the headers of a page with a console/debugtool. You might find info like Server Apache/2 or X-Powered-By PHP/5.3. This site is build with PHP on an Apache server.
Ask.  Believe it or not, people may just tell you.

There are also browser plugins and other tools that will analyze a site and show you what is running.  One of the more popular examples of this is Wappalyzer which has extensions for both Firefox and Chrome and is worth a look for you.
Comment: Grumble grumble *community wiki* grumble grumble *no rep* grumble.  Grumble.
Comment: none the less you still get virtual respect points from me :P
Comment: nice suggested edit JCL1178 n1
Answer: You can get a breakdown of what different components a site uses using Built With.
When a site uses a content management system such as Wordpress, it usually shows up there. In the case of the site you are asking about, it does not show a content management system but the following libraries: jQuery, FancyBox, JQuery Mousewheel plus a number of widgets.
Answer: The Chrome Sniffer extension for Google Chrome detects what web applications and JavaScript libraries a site is built on and displays icons in the address bar accordingly.
Answer: 1.I get the http headers, sometimes it tells you something (for instance if it is ran by php).
2.I can type mywebsite.com/wp-login.php, if a login page appears it means the website uses wordpress.
3.If a login page appears by typing mywebsite.com/admin it means it uses drupal.
4.If a login page appears by typing mywebsite.com/administrator it means it uses joomla.
Answer: See this question over on Stack Overflow for a pretty complete answer
SO - How do you determine what technology a website is built on?
Answer: Someone has already mentioned wapalyzer. You can use it as a browser plugin for Firefox. Hot icons appear in the address bar, and when selected, take you to the wapalyzer webpage with a description of the technology.


Nikon D5200 off camera flash setup

Question: I have a Nikon D5200 and want to get an affordable off camera flash setup.
I'm new to this, and have no experience or knowledge about flashes, so my question is: Would getting the MEIKE MK570-Ⅱ flash and Godox CT16 trigger/receiver set work, and would it be any good?
Comment: How do you define "work?" Fires the flash but nothing else? Allows you to set power and zoom manually from the camera/trigger? E-TTL automatic flash? Second Curtain or High Speed Sync?
Comment: posting eBay links without even typing out the product names in the question is not ideal. Once the links die no one will know which products you were asking about.
Comment: Yes I just want to know if it would fire the flash.I don't really mind having to set power and zoom  on the flash itself. I would just like to start experimenting with off camera flashes and cant really afford anything super expensive.And sorry, I wasn't really thinking about that:/
Answer: If you get that particular flash it already has a built in radio receiver that is compatible with the Meike MK-RC9 transceiver. You'd just need to buy a single MK-RC9 to place on your camera to fire the flash. However, you can buy a set of two MK-RC9 for about the same price as a single one. That would allow future expansion with another non-Meike flash in the future. Using the extra receiver instead of the flash's built in one just means an extra piece of gear and set of batteries to worry about and keep track of.
The Godox triggers linked in your question will fire the flash (or any other single pin manual flash with a trigger voltage below about 10 volts) you linked in your question, but they are Godox's old 433MHz technology. Godox has since moved on to a 2.4GHz system like most everyone else. 2.4GHz is superior to 433MHz in terms of range. In more complex setups using multiple flashes in multiple groups, 2.4GHz has even more advantages over 433MHz.
You'd probably be much better off going with something like the Godox TT600 manual flash that has a built-in receiver and transmitter for the Godox 2.4GHz system. You'd need a Godox X1T-N to trigger it (or XT-16/XT-32).

Yes, I just want to know if it would fire the flash. I don't really mind having to set power and zoom on the flash itself.

You might not mind now, but after about the tenth time in ten consecutive shots you probably would...
The nice thing about spending just a bit more on the Godox X1T system compared to using the Meike MK-750 II with the CT-16 system is that when you get tired of walking back and forth every time you want to change flash power, or you want to mix manual only and TTL flashes, you get tired of having three sets of batteries and their backups to recharge and keep track of, or you want to add bare bulb and/or studio flashes you won't have to start over with another trigger system - The X1T can handle all of the Godox flashes within their system. You can upgrade to manual or TTL flashes with a single rechargeable Lithium battery in each flash, add more powerful bare bulb or studio flashes, etc. without rendering your original manual only stuff useless.
Comment: Thank you! I will probably end up getting the Godox TT600 and the X1T-N trigger. Found both for about $90, and I feel like that's a very good price for what it is. Thanks again!
Comment: Godox X supports it, but the Meike MK-570 II does not, particularly when paired with a set of CT-16 triggers.

Nikon D5200 off camera flash setup


Collect Data from User in Workflow - custom email - collect data URL creation

Question: When I'm creating a workflow in SP 2010 Foundation, I'm using the collect data from user action.  I'm able to add it and by default it sends the default e-mail to the user asking to action the item.  I DON'T want to use the default e-mail for other reasons, I want to customize an e-mail with a link that says something like "Click here to approve" which would take the user to the "collect data from user" form (which has the buttons Save Draft, Complete Task, Cancel).
Dynamic string creation seems like a ton of work for something so simple and I've tried FORM_URN which I heard can generate this URL.  Has anyone tried this?  I've seen tons on getting a link to edit the task but I want to spit out the link to the CDFU (collect data from user) screen.
Comment: Could you give some hints on how you associate task ID with form ID? Thanks.
Answer: I ended up building the string myself which wasn't that difficult after I was able to associate the source list record to the task using a second workflow once a task was created.  Don't try and send out the e-mail immediately after the CDFU is initiated as for some reason the task ID is not ready.  I had to create another workflow on the task list that associates the original list ID of the record to the ask and then sends the e-mail that builds the string.


What are the disadvantages of gravity flyby assist?

Question: Does the gravity assist get affected by any of the forces by other planets as they proceed towards the required orbit? Moreover what can be the other setbacks of gravity assist flyby?
Comment: The biggest disadvantage is the fact that you have to be where the planet is going to be. Basically, it means your mission is going to take a lot more time, since you're taking an indirect path. You also have to wait to launch at a specific time in order to align properly with the orbit of whatever planet/planets you're using to assist you.
Comment: One could say a disadvantage is that as it increases the velocity of the spacecraft it decreases the velocity of the body giving the assist. However the difference in mass is often so great that this decrease in velocity is negligible. In fact it is usually ignored due to it decreasing so little.
Comment: @JakeBlocker I asked about pretty much exactly that about two years ago, only about the Earth specifically (but the answers given can certainly be applied to any relevant body). [What is the effect of gravity slingshots around Earth on Earth's rotation and orbit time, and is this effect worth considering?](https://space.stackexchange.com/q/12055/415)
Answer: Arthur Dent caught the basic problem with gravity assists - you can't decide where and when you can use them - you must plan your mission around opportunities for gravity assists, and that means a very complex and often very long trajectory. It takes a lot of computational power to plan. It sets a rigid launch window; the planets won't wait for new budget for your probe or time you need for extra testing. The time spent maintaining the probe from the ground station while waiting for the assists is not free - the ground station and crew need to be funded. With each day in space the risk that something fails on the craft increases. And botching an assist will send your probe into a trajectory which is very unlikely to give you another chance to encounter the target.
You gain "free" delta-V. That's one huge advantage. But the two primary disadvantages of rigid mission plan, and increased mission duration lead to so many small secondary disadvantages many missions are designed with no gravity assists simply to save the headaches.
Comment: The spacecraft can also get hit by any other asteroid roaming in the space ..!!??
Comment: @ShwetaRathore: This isn't a big risk, but it certainly is a risk - the longer the mission, the higher the chance an impact can happen. Another sizable risk, especially in missions that utilize Venus gravity assists, is a large coronal mass emission (solar flare) capable of damaging the electronics.
Answer: Referring to the first (and only) answer to this question so far by SF, it's not quite correct that increased mission duration is a disadvantage per se, because for most missions that have used gravity assist the gravity-assist technique enabled a mission profile with much shorter trip times than conventional methods.
Case in point:  using the most efficient conventional orbital transfer technique known — the Hohmann Transfer — to travel from Earth to Neptune would take 40 years.  Using gravity assists at Jupiter, Saturn and Uranus, Voyager 2 arrived at Neptune 12 years after launch.  The more recent New Horizons mission to Pluto combined a gravity assist at Jupiter with an oversized launch rocket (Atlas 5) and got to Pluto in about 9 years.  (Pluto is about the same distance from the Sun as Neptune.)
True, you have to launch during windows when the planets are aligned to meet mission needs, but in most cases the trip times are much shorter than using conventional methods, and in some cases the mission is simply impossible or extremely difficult without using gravity assist.
Until very large, oversized rockets (e.g., BFR) and/or more exotic in-space propulsion systems (e.g., nuclear thermal) are available gravity assist will be the most efficient way in terms of trip time to bounce among our planets when Hohmann-like transfers won't do.  Current ion propulsion systems are very efficient propellant-wise, but mission trip times are typically much longer than gravity-assist missions for the same start/end locations.


What is the job of the Assistant Coach in the NFL?

Question: I understand what the job of a Head Coach is, but what does the Assistant Head Coach actually do during games/in the office?
Comment: I know it's in your original question, but are you looking for the responsibilities of the actual "Assistant Head Coach"? Most teams use a combination of position coaches and coordinators. The title of assistant head coach is rarely used and is typically a title (and salary) designation only and the responsibilities don't change much.
Comment: @MarcusSwope: Yes, the actual "Assistant Head Coach"...
Answer: Typically, in NFL and other sports, assistant coaches are responsible for a particular aspect of the team, while the head coach is responsible for the overall direction of the team.
For example in football you might have a quarterback coach, an offensive line coach, a running back coach, a kicking coach, a special teams coach, an athletic fitness coach, many of whom are given the title of assistant coach. Their job is to provide specific and expert direction in their areas. This isn't to say that the head coach wouldn't also be an expert in all areas of his team, because it would be bad if he wasn't. But his level of expertise will not be that of the specific coaches, unless he happened to grow out of that position or coaching position before being promoted to head coach.
It is very common for someone to be promoted to head coach and keep the responsibilities he held before promotion (especially in interim promotions).
Some teams do have a specific title of "Assistant Head Coach" - their responsibility is to act as the enforcers of the plan set forth by the head coach. The head coach can only supervise so many things at a time - some clubs feel the need for the extra management. Only two NFL clubs have an "Assistant Head Coach" position that is not also another type of coach like Offensive Line or Defensive Line - Kansas City and St. Louis. It could be a regional thing, both those teams have had a pretty rocky couple years lately, so it could just be that they wanted the extra emphasis on following the team direction.
I can't find a reference for it, but I would assume that for the teams that have Assistant Head Coaches that are also another type of coach (about half of them do) that if for some reason the Head Coach were unavailable, incapacited, or otherwise unable to perform his duties, that the Assistant Head Coach would take his position.
Comment: +1, good point about the assistant head coaches that aren't also special teams or positions coaches.
Answer: The duties of an assistant head coach vary widely, because each assistant coach on a football team takes on responsibilities that are designated by the head coach of the team. As an analogy of how duties might differ depending on the head coach, many coordinators may have a title, but plays might actually be called by the head coach (due to the head coach's previous offensive or defensive acumen), while other coordinators have handle play-calling, subject to the strategy set by the head coach.
As @corsiKa has mentioned, many assistant head coaches can be position coaches, while some coordinators may also serve in this role.
From general observation, I've seen that head coaches or team owners might designate an assistant head coach for several reasons:

Designate a successor (implied in the case of the Dallas Cowboys and Jason Garret, though it is against league rules)
Reward a long-time/loyal/key assistant with a more prestigious title (particularly if not already a coordinator) - seen at many colleges and the pros (see Rod Marinelli at several college/NFL teams, Brad Seely as special teams coach/asst head coach at several NFL teams, and Mike Singletary and the Minnesota Vikings as another example)
Provide justification for higher pay for a non-coordinator (see the Jason Garret case)

While coordinators sometime serve as assistant head coaches, quite frequently special teams or position coaches are rewarded with this title/role. Not all teams have the asisstant head coach role.
Comment: From an ESPN blogger: "Assistant head coaches might earn more money than they otherwise would, but the title does not distinguish them from other assistants in relation to hiring protocol. The title affords no additional protections against losing an assistant to another team, in other words." (http://espn.go.com/blog/nfcwest/post/_/id/62693/sizing-up-nfc-west-coaching-staffs-3)


Is there any price difference in buying VIA rail tickets online vs. at the station?

Question: I'm considering a long distance journey by train in Canada this summer.  I don't have a Canadian credit card yet and my financial institution's debit card is not supported for VIA Rail Interac Online payments.  If I go to the station to buy a ticket (I assume I can pay by debit card there), will I pay significantly more compared to tickets available online, or is the price (nearly) the same?
Answer: I believe you will indirectly pay more, because you can't buy in advance. I just tried to book tickets online from Toronto to Montreal for tomorrow, and the cheapest price was $135 in economy.

I switched to the first Thursday in June, and the cheapest price was $39 in economy, $89 in business.

Looking further ahead did not make it cheaper. If you can get to a station and buy your ticket with cash a month in advance, I don't think you'll pay more. But if you want to walk up and buy it on the day, you will pay about 4 times as much for your ticket. As well, there may be even more discounts on some Escape fares that are available only on the web. The wording isn't clear, which isn't unique to Via - Air Canada used to sell some web-only fares that were impossible to change over the phone, but weren't labelled as such. I think you could get an explanation over the phone if you wanted to use a discount you see on the web but go into a station to do it.
Comment: *I believe you will indirectly pay more, because you can't buy in advance*.  But *If you can get to a station and buy your ticket with cash a month in advance, I don't think you'll pay more*.  I'm confused.  Can one or can one not buy a ticket at a station 3-4 months in advance?
Comment: I don't know. You'll have to ask them.
Comment: Well, that's kind of key to the answer.  Also, if I try Toronto-Jasper departure 1 May (tomorrow) I get $855.41 in a lower berth, if I try 28 August I get $950.33.


How do you motivate a teen who has no interest in Davening?

Question: Recently I met a 13-year-old who simply has no interest in Davening (praying). What would be a way of motivating such a kid to Daven?
Comment: If you add more information about the specifics of the situation I can recommend more specific resources, texts and/or programs to better suit this particular teen. If you want to discuss the teen privately let me know and I can find some time to talk.
Comment: Adam - what are your qualifications?
Answer: It all depends on the teen and his/her background. Generally, with teens the issues fall into 1 of 3 categories and sometimes a mixture of the 3:

No understanding of the depth/basic meaning of the liturgy (ie. no issues with the concept of talking to God or praying, but an issue with the codified liturgy)
Deeper emunah issues (eg. an issue with the concept of a personal God, God in general or God caring about them)
Lack of inspiration

Once you have an understanding of which issue (or mixture thereof) is affecting the particular teen you are dealing with you can begin to craft a plan to counter it. Usually the most effective methods involve one-on-one learning and conversations with the teen to address and go through the issues, but don't expect them to understand what issues are actually at the core of their lack of interest, you need to extrapolate this from the conversations.
Finally, NCSY runs Tefilla (and many other Jewish learning) programs for teens in various cities across the US and Canada which have proven successful with many different teen demographics. I would recommend trying to connect the teen with their local chapter of NCSY.
For teens living in areas with no active NCSY chapter or for teens who are not matim for NCSY's programs, I would recommend employing the methods listed above and finding a positive peer group with whom the teen can associate who are actively involved in improving their tefillah.
Comment: How would you deel with a teen that has grown up in a Charedi area where NCSY is not present?
Answer: Talk to them.
As an ex Teen who once had no interest in Davening, I can speak from experience here.  Most attempts to get me to Daven backfired.

Find out why they aren't davening.
Find out what they think davening is.  Is it different than what you understand it to be?  What do they think it is, what do they wish it was?
I suggest getting a copy of "Call to the Infinite" its an unfished book by R. Kaplan.  What I find great about it, is that its a huge collection about all the sources regarding why we pray, and different ways of davening.  It has no 'narration' or 'explanation' just sources in english.  It's a great spring board to help the teen figure out what they do and do not like about Davening.
Allow for self exploration.  If the motivation doesn't come from within, it just builds resentment.
Start them slow.  See if they are willing to try to do the bare minimum in davening.  Perhaps all they need is more focused concentration on what they are saying, which can be hard to achieve if you are rushing to say every single word.
Comment: +1 for "talk to them".  If you don't understand what's motivating the teen, you're just guessing and might make things worse rather than better.  (My qualification for saying that?  I walked away from religion at around that age because nobody took my questions and doubts seriously, chiding me instead of helping me, and it took me 20 years to come back.)
Answer: Invite him over, show them through joyful song bit by bit how davening is precious. And most of all be a living example as teens look for hypocrisy with a magnifying glass.
Answer: By Example! If he sees you davenning with all your 'koichos' he will most likely follow.
Answer: Motivating an entire populace is one thing; starting a movement. Usually that requires a number of hands, somewhat selflessly dedicated to the cause. But a one-on-one lesson almost always proves fruitful, as the apprentice who learns from the master. How so?
In my personal experience, as a teacher and spiritual leader for young teens, examples/parable/metaphor works best. Living or historical, showing a youth how it's "done by the pros" kind of thing. Want him/her to be interested in Davening? First yield respect for it, and the culture surrounding (Adam's #1). Show him an old-school cat who practices faithfully and selflessly. If you can physically do this, awesome. If it takes a video, just as powerful. Our kids are more and more becoming visual learners. They're inspired (Adam's #3) by those around them. And yes, sometimes jaded by the overabundance of creativity or amount of people as well, but it will happen in time. May not take a day, may not take a week. But you sow seeds if you want something to grow. Don't just cast it on him/her. Why do you do it? Where did you learn? What was the process you took to get there, with grace and understanding?
And yes, I agree with Adam. NCSY, or youth organizations in general, channel the group dynamic that could support his/her growth, as opposed to feeling like he/she is having to practice alone, be devoted alone (which I think we eventually come to discover and cherish), instead of in community.
Comment: welcome to Judaism.SE, and thanks very much for sharing your perspectives. I've deleted the final paragraph of your answer, relating particularly to beliefs from other religions, which are out of scope on this site.


Hair particle system converted into mesh doesn't render

Question: I'm in cycles render. In "add modifier", I clicked on "convert", to transform the hair particle system into a mesh. The new mesh shows in the solid viewport shading, but not in the other render (texture, material, rendered) viewports. I assigned a material, but it doesn't show. What am I missing?
Answer: It's because there are no faces to show, just edges and vertices. Select your converted hair and press Alt + C and select convert to: Mesh to curve.
Then in curve option go to Geometry tab, find bevel and add depth to the curve.
The disadvantage of this method is that the tip and the root are the same width.
Comment: You can adjust tip and root width with either a *Taper Object* or using *Curve Radius* property https://blender.stackexchange.com/questions/58564/curve-bevel-function-scale


Why I can't vote for questions and answers on askubuntu.com?

Question: I'm loged in with facebook open id. I can post questions and answers. I can edit my profile and I see my login name and reputation point at the top of the page. But when I try to vote I get "Please login or register to vote for this post." message.
Answer: You should make sure that it is not because of insufficient reputation. You need 15 reputation to vote, and you get rep when someone upvotes your question or answer. Go and answer some questions, get some upvotes, then you should be able to up and down-vote for yourself.
Answer: Your username at the top of the page is updated dynamically, whilst the rest of the page is not. You are looking at a cached version of the page. You need to refresh the page (F5) in order to be able to vote.
However,
voting up requires 15 reputation and voting down requires 125. You don't have sufficient reputation to be able to cast votes. Refreshing the page will remove the "please login" message, but you will have to earn more reputation in order to be able to vote.
Answer: Not only do you need more reputation, but you also don't have a registered account (with askubuntu--I see you have a registered account with SO). Even if you acquired enough rep, you'd still need to register (to vote). It is explained in the FAQ (regarding registration) and this part of FAQ (regarding reputation and what you can do with your rep points).
If you do decide to register, you only need 15 points to up-vote. (It is explained here.)
Comment: He says he logged in with facebook, thus he _doesn't_ need to make an account, he just uses facebook.
Comment: @iSeth Again, his profile says he is unregistered. No, he *doesn't* have to make an account to use SE, but in order to do certain things on SE, he *does* need to register.
Comment: Hmm, OK your right.


Requirements to be an Anbu Black Op

Question: I am curious as to how is an Anbu chosen, what are the requirements, and does every one of them have like a certain backstory that makes them special or different from the normal ninjas (like how Yamato is able to do Wood style jutsu's and how Kakashi was one of the youngest Jounin in the village), or are they just trusted by the Kage's?
Answer: Anbu are recruited directly by the Hokage (or, in case of Root, by Danzou). There's no mention of a hard requirement, but generally excellent shinobi are chosen.
Comment: Correct... mostly trusted over special, or if the Hokage wants to keep a close eye on someone. Foundation was picked differently, they had to be special and were made more special by Danzo.
Answer: In general, they are chosen from the excellent jounins the village has. This is because the ANBU has to do missions like assassinating missing ninjas, and missing ninjas are more often than not, includes ninjas of jounin level. So if they are just so-so level jounin, they won't be able to do their missions well.
Of course, even though s/he is strong, doesn't necessarily qualifies them as ANBU. Notice that although Might Guy is a strong ninja, he never joined ANBU. I think one of the qualifications for entering ANBU is that even if you excels in one ability, your other abilities must be high-leveled too. Guy is very strong in taijutsu (even Uchiha Madara admitted that he never met someone remotely as good as Guy in taijutsu), but his ninjutsu and genjutsu is so so. Compared to Kakashi, although Kakashi is not as strong as Guy in taijutsu, he is quite high-leveled in it. His genjutsu is good and he is excellent in ninjutsu, being called the Copy Ninja.
The last requirement and the most important is the willingness. That they know what missions the ANBU conducts and they accept that if they join, they have to do it, even if that means you have to massacre your entire clan.
Answer: Guy actually requested to be in ANBU to keep an eye on Kakashi but the third hokage and Danzo didn't let him because they said he "Lacked the necessary darkness in his heart"
Comment: This is referencing a scene from Naruto Shippuden episode 357. This answer seems like more of a comment in response to [絢瀬絵里's answer](https://anime.stackexchange.com/a/14369), but it does make a valid point regarding the temperament required to join ANBU, seeing as they basically perform the equivalent of [black ops](https://en.wikipedia.org/wiki/Black_operation) missions in the real world.

Requirements to be an Anbu Black Op


How would I install Apache Mahout on Windows or Mac?

Question: Is there a simple way to install Apache Mahout on Windows or Mac without the need of Hadoop?
I heard there is a library called Taste which Mahout is based on... but I did not  find it on the web
Answer: I believe you won't be able to decouple mahout and hadoop. Mahout uses the hadoop API in the code and it also ships with the hadoop jar files. And this is irrespective of whether you run mahout on Windows or Linux
Answer: Mahout has a lot of code. Some requires Hadoop to run, some doesn't. If you don't need the bits that use Hadoop, you don't need Hadoop.
And yes in particular, some of the collaborative filtering code came from "Taste" (I'm the author) which is not distributed, not Hadoop-based. (There are also Hadoop-based recommenders inside Mahout.)
The answer is you don't have to do anything with Hadoop, therefore, to "install" Mahout by itself, if you're not using these bits. The Maven build script will download the Hadoop libraries for you just for compilation purposes.
Answer: It is true that you will need a hadoop jar in your system to compile Mahout, but you don't need to actually run Hadoop for big chunks of Mahout.  That jar is downloaded automagically so you don't have to do anything explicit to get it.
I work on Mahout on my Mac all the item without running Hadoop.  In fact, with maven doing the dependency work for me, I don't even really have any awareness of the dependency impinging on my work which is almost all lately on the non-Hadoop code.
It should be about as easy on Windows, but you almost certainly will need cygwin and you will run into problems if only because Windows is, well, so much like Windows.  On a Mac or particularly on Linux, you won't have any problems of that sort at all.


Hissing/air sound when applying brakes

Question: I recently noticed that when applying the brakes, I can hear a hissing sound that is similar to air being released. The car is a 2006 Infiniti g35x. I did a thorough search and the problem that comes up says brake booster issue. However, I did some tests with the pedal and turning the car on/off and seeing if the pedal goes down a little. There are no other issues that point to the brake booster being the issue. The only problem is this hissing sound. I have had the brake pads and rotors replaced within the last few thousand miles, so they aren't worn. I am hoping that this sound is no big deal. There was no visible issue under the hood that I could find. My fluid was at a normal level, the sound only occurs when the car is moving. If it's a few mph or stationary, there is no sound when pressing the brake. Any help is appreciated. Thanks
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: The test you conducted checks to see if the brake booster is working, and not leaking with the pedal released.
The vacuum boost section has a leak and will not seal on the push rod when the pedal is depressed.
The leak is not sufficient to prevent booster operation, so there will be no other obvious indication.
You can disconnect the vacuum hose at the booster (and plug the end) to see if the noise goes away.
Comment: No, I'm suggesting the large diaphragm inside the booster is leaking where the pushrod passes through it.
Comment: So are you suggesting that the vacuum hose has a leak and that is the issue? I believe that there's a large price difference in repairing the two... still a little confused.

Hissing/air sound when applying brakes


Reasons for pregnancy to be difficult in long-term space travel

Question: I am looking for medically viable reasons why we might discover it to be more difficult than expected to bring pregnancies to term in space. This is for a society based approximately 75 years in the future that was forced into long-term space travel with limited time for preparation, which is to say technology is advanced but not perfected.
Comment: *"discover it to be more difficult than expected to bring pregnancies to term in space"* - current expectations vary a bit, but many are up to "impossible".  How do you want it to be worse than that? And if you don't, then in essence you're asking about real life world the way it is.
Comment: Are your ships provided with a mean to produce artificial gravity (spinning wheels probably) ?
Comment: Welcome to WorldBuilding! If you have a moment please take the [tour] and visit the [help] to learn more about the site. Have fun!
Comment: Similar: https://worldbuilding.stackexchange.com/questions/97028/is-pregnancy-in-zero-g-a-barrier-to-long-term-space-living
Answer: Radiation
Radiation is the obvious answer, as L.Dutch pointed out. A fetus is particularly susceptible to radiation impacts as it is grown lots of new cells. An adult in space already has a lot of functioning cells of all the kinds he or she needs; but if a growing fetus can't generate these cells, it won't turn into a viable adult.
Low Pressure
If for some reason, your spacecraft is kept at a lower than normal atmospheric pressure this might impact the ability to have children. Low barometric pressure can cause spontaneous labor, especially in women who are not acclimated to this lower pressure.
Possible reasons for keeping the craft at a lower pressure include the lack of enough atmosphere to go around. If you are forced to go into space suddenly, you might not have thought to bring your nitrogen bottles with you. If you build new space habitats or starships in space, you won't just be able to find some nitrogen lying around. If you have a limited supply, you might compromise on air pressure in your spacecraft.
Alternately, if you have a low amount of available gasses, you might keep various parts of the station at different pressures. For example, crops could be grown in a habitat module with lower air pressure and higher CO$_2$ pressure.
Zero-G environment
There are no studies of the effects of low gravity on pregnancy since there haven't been a lot. It would be easy to imagine a whole host of reasons that gravity could affect pregnancy. Extended time at zero-g can cause the heart to weaken, lowering blood pressure. Lowered blood pressure can cause miscarriages.
Comment: Also zero-g weakens your bones. I imagine you're going to want full-strength hipbones to give birth
Comment: Additionally in zero-g, is the baby going to turn head down or is it going to be breach as often as not
Answer: A fetus is a cradle of cellular multiplication. When a cell is splitting in two, its DNA is unfolded and more prone to damages by external agents.
Space environment is a soup of radiation, and you are putting the fetus in such a soup. A small damage to the DNA and the fetus cannot continue growing and thus survive.
Comment: @Clearer The best radiation protection by unit mass would be hydrogen heavy compounds like water, ammonia, hydrazine, or methane/hydrocarbons. Since you have to take water with you at least, and some of those others could be useful fuels, shielding in space would probably take the form of water or fuel tanks.
Comment: @Clearer  lead and rock are quite heavy, which makes them a bit less viable as a solution than on Earth.
Comment: @fyrepenguin I suspect that depends entirely on the situation. A generation ship, for instance, shouldn't have any problem using a mile of rock between space and the inhabitants. That's probably what you should do anyway. On a space station akin to what we have no, I agree. It's not practical, at least, but only because of weight.
Comment: A wall of lead or rock will reduce the radiation quite a bit.
Answer: I don't know why it is important for your story. So I also told you some stuff that I wouldn't consider a medically viable reason. But they could make the problem worse, even if you don't like them as sole reason.
Radiation?
If you go with radiation, because the space ships aren't shielded enough. hte egg cells in a fetus gets killed. Of course I would also expect some babies do have mutations and more people die because of cancer, if the radiation is not shielded enough.
Zero Gravity?
We think you could give birth in space, because humans can give birth in water. But that is only a guess at the moment. It could be, that the head of the baby doesn't align itself. Or the umbilical cord goes around the head, because somehow inertia. They could have all c-sections, but operations in space are hard, because of the fluids you would need/want a special suit or room. So no fluids can go into equipment. For the same reason you would want special rooms, or suits for the baby making. (But I think it would not stop them from the baby making.)
Logistical?
Just not enough food. Lets say you only have 1 ton of carbon atoms on board. You could only make so much humans out of it. (10 ton of humans, with the assumption 10% of our mass is carbon atoms.) And you would need also carbon atoms for food. Even if you recycle every carbon atom. At a point you have no carbon atoms outside of humans.
Not enough space... okay that is weak, especially if you want a generation ship. Were you replace only dead people.
Politicians were stupid and split men and women on different ships... Yeah.. Really stupid.
Environment
Some material release some toxin into the air/food. And they can't get it out or find it or stop it, because without the material or machine all would die. So yeah, less babies get born.
**Social? aka stupid reasons **
It could be a society who doesn't like babies. Maybe because their religion says you can only have souls if you were born on earth.
Or nobody wants to sex their children. So depending on population size in one ship, you could have an all male population. (Look below for a possibility) Or the opposite, everyone wants a boy. Or the 2nd generation doesn't like to be only considered breeders.
Or only few are allowed to have children, so nobody wants any, because of envy from everybody else.
Bad Luck?
Through unlucky events, they get a population with less females. Maybe they started with 50 woman and 50 man because an evacuation wants to get everyone off planet. Not like a Generation ship which could send out an all female crew with frozen sperm that is selected for x chromosomes.
And some freak accident happened and because of that 30 woman die or are now infertile.
Genes?
Maybe they kept only few men for reproduction (Like they only let 1 in 100 male fertilized eggs develop into a child). Because men have then more children (~1000) than women (~8), you get more offspring, if you produce more sons (Even if the sons have only 1 in 100 chance of surviving). Since the sperm cells decide which sex the baby will have, the genes to produce more male offspring will get passed down easier. (From father to son, which produces more sons.) Lets say they let a lottery decide which male embryos get implanted into a willing mother. Then the genes that produces 800 males from 1000 fertilization have better chances to get picked up than genes that produces 500 from 1000. Worse when they find out what happened, most males only produce male offspring and only very rarely female. And nearly all females have the same genes for male only sperm. Meaning if one male gets a female offspring, that female will have still the same gene for more male offspring, which she would pass on to potential sons. Of course there could be other reasons making each issue worse.
Other reason:
Maybe have the same effect (lack of babies/miscarriage) with another explanation/reason, where you don't need to make assumption about medicine. When people really get pregnant in space, your book/world wouldn't need to be adjusted. I wouldn't believe a world exactly like our earth, except where plains can't fly because of different physics. I would believe that it is to expensive, because we don't have much aluminum and kerosene.
Some ideas I got from there:
https://www.livescience.com/33047-space-sex-pregnancy.html
Comment: The gravity argument is easily countered using rotating stations.
Comment: Ok, so this is kind of a nitpick, but, regarding that last bit, lack of cheap/abundant aluminum and kerosene wouldn't stop flight. We choose those materials on Earth precisely because they are cheap and abundant here for materials with their properties (e.g. strength, density, energy density, flammability, etc.) If they weren't cheap and abundant here, we'd just pick other materials (and, indeed, carbon fiber composites are already replacing most of the aluminum in new designs.)
Comment: the nitpick makes my point more valid. You wouldn't believe a world were plains don't exist because of unbelievable reasons. (Doesn't matter for suspension of disbelieve if the reasons are true or not)
Also other materials could be even more expansive^^


Is there a Point and Shoot camera with a Macro function or ability?

Question: I am looking for a simple point and shoot camera with a macro function to be able to take photographs for eBay auctions.
Are there any P&S cameras with this function?
Answer: There are plenty. What I recommend though is a compact with manual controls and for the purpose of eBay, unless you are selling truly miniature items such as insects, they are more recommended than DSLRs and SLDs.
A number of ultra-zooms are actually capable of extremely close focusing distance, as close as 0cm even! Although you will have lighting problems if you get that close, any of those models will do to focus closely. Not only that, the depth-of-field will be much greater than with an interchangeable lens, which is less artistic but arguably better for selling products.
The Canon Powershot SX150 (1cm min) or older SX200 (0cm min) are great choice in a compact form-factor. You can also go with an ultra-zoom like the Canon SX40 or Fuji HS20 EXR. Since these cameras have manual controls, you can set the aperture very small to capture an large depth-of-field. Just make sure to keep the ISO low for getting quality output and using a tripod for stability.
Comment: would be great if you could show some samples.
Comment: Hi, for example, there is one from Nikon P300 - pocket sized camera with advanced controls and great lens: http://translate.google.cz/translate?sl=cs&tl=en&js=n&prev=_t&hl=cs&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.digimanie.cz%2Fphoto_doc-3DDE3D02F320A178C12578DD0056AACA.html&act=url
Comment: Indeed, I liked the Nikon P300 and macro is simple with it but one will do better with an ultra-zoom for this purpose which not only gets closer but also stops down the aperture more.
Answer: Not in the literal sense, no -- but almost all of them will let you take close-ups that look a lot like macros.
The thing about point-and-shoots is that they use very small sensors (typically around 4.5x6mm). True macro shooting means subject magnifications of around 1:1 on the film or sensor, so a point-and-shoot that actually did macro would allow you to fill the frame with a 4x6mm subject.
I have a bottom-of-the-line Canon Powershot A490 for rough-and-tumble (it has a 1/2.3" sensor, which is 6.16mm by 4.62mm). It doesn't shoot true macro, but it will let me fill the frame entirely with a subject that is 1.5" by 2" at maximum optical zoom at its closest focusing distance. On the camera's sensor, that's less than 1/8 life size, so it's nowhere near macro in the technical sense. Getting the lens to focus that closely is no mechanical or optical feat. But if the same shot were taken on a full-frame DSLR, it would be about 70% of life size, which is definitely in macro territory. (Okay, it would be a whole lot better picture too, but that's outside the scope of the question.)
So with just about every P&S camera out there having an extreme close-up function thanks to their small sensors, and with plenty of pixels to crop from for a resolution sufficient for eBay and the like, your choices are pretty much wide open. And keep in mind that although better cameras with larger sensors might not be able to focus quite as closely, you get the ability crop from a higher-quality image (sharper and less noisy) if you have to.
Answer: While Stan is technically right about what macro really means, I'm interpreting your question as looking for a point and shoot that can go down to a small field of view so that you can take detailed pictures of small things.
I looked for exactly that a few years ago to upgrade our "office" camera.  We design electronics and circuit boards, so occasionally we have to send pictures of small things to remote customers or suppliers.  This was probably around 5 years ago, but I ended up picking the Fuji Finepix F20 (from memory, may not be the exact name).  Surely things have changed by now, but at the time Fuji seemed to be paying more attention to closeup detail capability than the others in the point and shoot realm.
The F20 has its annoyances, but it works well enough for the purpose.  Like most point and shoots, you can't really control aperture.  You can't, for example, chose a fixed small aperture to get good depth of field since you know the camera is on a tripod and you don't care how long the exposure is.  It has these stupid and totally unintuitive program modes like "party", "museum", "on side of road with flat tire", and whatnot.  Still, you can give it enough hints to be useable.  Here is a example shrunk from a 1200 x 900 section out of the middle of a 2848x2136 frame:

It's not a great picture, but it says "fix your manufacturing process to stop leaving junk on my boards and get a sighted person to do inspections next time" well enough.


What is the difference between InnoDB and MyISAM?

Question: I am using MySQL as my database for my current web project. I am new to MySQL. Please explain to me the difference between InnoDB and MyISAM.
Comment: feel free to add a MySQL tagg as well :)
Comment: Doesn't this belong on stackoverflow?
Comment: @ripper234. Two better versions of this post (far more background; more demonstration of prior research) exist on SO: http://stackoverflow.com/q/12614541/209139 and http://stackoverflow.com/q/20148/209139.
Answer: ISAM = Indexed Sequential Access Method and is essentially a flat file (for those DBAs who can remember, think Btrieve, or B-Tree). It's a very old technology - but don't let that put you off using it. Because it's a flat file (more on that later), it is not relational, and thus is not an RDBMS, and thus is more appropriate in some situations.
InnoDB is the full RDBMS like you are most likely familiar with. MyISAM can appear to be relational through another layer added on top that maintains your links, logic and referential integrity.
ISAM is brilliant if you have a LOT of records (like, 20 million), and the records are mostly stand-alone (i.e. you don't need to do lots of links to retrieve associated data). It relies VERY heavilly on indexes and if you don't have the right index, be prepared for very very long query times. Case in point: We had a Btrieve ISAM table with 20M+ records and to do a retrieve and filter data based on an accurate index was almost instant. Using the wrong index was literally 15 minutes.
InnoDB is great for if you have a lot of relational links. Table A references a field in Table B, which references Table C and D. InnoDB can fetch these records using all sorts of nice joining methods (hash joins, etc), whereas an ISAM database would have to run multiple sub-queries for every single row and match the records manually.
You will really have to do a course in databases if you want much more detail than that!
Comment: ISAM is just as relational as anything else, it's just not optimised for it.
Comment: thanks 4 your brief description. Now basically i am cleared
Answer: The most fundamental is that InnoDB is transactional. MyIsam isn't. MyIsam is generally a bit faster, so if you don't need transactions that is generally your best bet. For detailed descriptions you should read the MySQL documentation.
Answer: These days unless you're using a table for log style data (many more INSERT's then SELECT's, no transactions) InnoDB is usually faster, more reliable, has more features, etc.
The only other feature MyISAM has is the fulltext search which is fine for basic use, but most people use some from of Lucene for anything serious.
Either way you must tune MySQL as the defaults are essentially set for a 32MB pentium that's shared with other services.
Answer: A bit late to the game...but here's a quite comprehensive post I wrote a few months back, detailing the major differences between MYISAM and InnoDB. Grab a cuppa (and maybe a biscuit), and enjoy.

The major difference between MyISAM and InnoDB is in referential integrity and transactions. There are also other difference such as locking, rollbacks, and full-text searches.
Referential Integrity
Referential integrity ensures that relationships between tables remains consistent. More specifically, this means when a table (e.g. Listings) has a foreign key (e.g. Product ID) pointing to a different table (e.g. Products), when updates or deletes occur to the pointed-to table, these changes are cascaded to the linking table. In our example, if a product is renamed, the linking table's foreign keys will also update; if a product is deleted from the 'Products' table, any listings which point to the deleted entry will also be deleted. Furthermore, any new listing must have that foreign key pointing to a valid, existing entry.
InnoDB is a relational DBMS (RDBMS) and thus has referential integrity, while MyISAM does not.
Transactions & Atomicity
Data in a table is managed using Data Manipulation Language (DML) statements, such as SELECT, INSERT, UPDATE and DELETE. A transaction group two or more DML statements together into a single unit of work, so either the entire unit is applied, or none of it is.
MyISAM do not support transactions whereas InnoDB does.
If an operation is interrupted while using a MyISAM table, the operation is aborted immediately, and the rows (or even data within each row) that are affected remains affected, even if the operation did not go to completion.
If an operation is interrupted while using an InnoDB table, because it using transactions, which has atomicity, any transaction which did not go to completion will not take effect, since no commit is made.
Table-locking vs Row-locking
When a query runs against a MyISAM table, the entire table in which it is querying will be locked. This means subsequent queries will only be executed after the current one is finished. If you are reading a large table, and/or there are frequent read and write operations, this can mean a huge backlog of queries.
When a query runs against an InnoDB table, only the row(s) which are involved are locked, the rest of the table remains available for CRUD operations. This means queries can run simultaneously on the same table, provided they do not use the same row.
This feature in InnoDB is known as concurrency. As great as concurrency is, there is a major drawback that applies to a select range of tables, in that there is an overhead in switching between kernel threads, and you should set a limit on the kernel threads to prevent the server coming to a halt.
Transactions & Rollbacks
When you run an operation in MyISAM, the changes are set; in InnoDB, those changes can be rolled back. The most common commands used to control transactions are COMMIT, ROLLBACK and SAVEPOINT. 1. COMMIT - you can write multiple DML operations, but the changes will only be saved when a COMMIT is made 2. ROLLBACK - you can discard any operations that have not yet been committed yet 3. SAVEPOINT - sets a point in the list of operations to which a ROLLBACK operation can rollback to
Reliability
MyISAM offers no data integrity - Hardware failures, unclean shutdowns and canceled operations can cause the data to become corrupt. This would require full repair or rebuilds of the indexes and tables.
InnoDB, on the other hand, uses a transactional log, a double-write buffer and automatic checksumming and validation to prevent corruption. Before InnoDB makes any changes, it records the data before the transactions into a system tablespace file called ibdata1. If there is a crash, InnoDB would autorecover through the replay of those logs.
FULLTEXT Indexing
InnoDB does not support FULLTEXT indexing until MySQL version 5.6.4. As of the writing of this post, many shared hosting providers' MySQL version is still below 5.6.4, which means FULLTEXT indexing is not supported for InnoDB tables.
However, this is not a valid reason to use MyISAM. It's best to change to a hosting provider that supports up-to-date versions of MySQL. Not that a MyISAM table that uses FULLTEXT indexing cannot be converted to an InnoDB table.
Conclusion
In conclusion, InnoDB should be your default storage engine of choice. Choose MyISAM or other data types when they serve a specific need.
Answer: Generally, the rule of thumb is, if you want speed, use MyISAM and if you want stability, use InnoDB. Something to do with atomicity if I remember correctly.
Comment: Excecpt that's no longer true, InnoDB is actually faster in most cases.
Comment: can someone add a link some benchmarks or something...?


Selectively improve the frequency resolution of FFT (DFT)

Question: I have a digitally sampled signal(sampling frequency = 4000 Hz) which contains analog frequencies from 0 to 1000 Hz.
I wish to have a frequency resolution of 100 Hz(like 0,100,200,300 Hz .. 1000 Hz) and I have to improve the frequency resolution at the 0 to 100 Hz range by 10 Hz. That is at the frequencies 0,10,20,30,... 100.
So the frequency components I wish to detect are [0,10,20,...,100,200,300,...,1000].
In other words, I want more frequency resolution at the 0-100Hz range and less resolution at 100-1000Hz range.
How this is possible through FFT or related methods.
Answer: You can compute any single FFT result bin using a complex Goertzel  algorithm or filter.
Realize however that if you want to compute a number of bins on the order of log N or greater (such as 10 extra bins with 10 Hz bandwidth and spacing), it may be faster to do the full longer FFT and throw away all the extra FFT result bins.
So just compute 2 FFTs of 2 different lengths and ignore all the unwanted results.
Answer: I know it's a bit late to answer the original person who posted the question but just in case anybody finds this and wants an idea for a clever solution... The FFT algorithm is built ultilising a divide and conquer approach, so one could perhaps adjust it to calculate certain parts more accurately and others less so... During the FFT the frequency spectra are combined in stages from 2^x single point frequency domains to a single 2^x point frequency domain. During the algorithm I think there is a way to combine some of the bins together to get less resolution at one end than the other. Due to the 'butterfly' structure of the result at each stage, there are some limits to what one can achieve bit I think that in theory, one might be able to get it to produce bins in a exponential fashion such as [1hz, 2hz, 4hz, 8hz, 16hz, etc...] Just combine the last (s-1) bins together at each stage s! I haven't tried this yet myself but it looks pretty simple to give it a go, provided you are able to access and understand the code at guts of your particular FFT to begin with!
Thinking about it as a table of the bin bandwidth multipliers of frequency domains at each stage of the FFT, you would have:
<code>[1] * 2^x;
[1, 1] * 2^(x-1);
[1, 1, 1, 1] -> [1, 1, 2] * 2^(x-2);
[1, 1, 2, 1, 1, 2] -> [1, 1, 2, 4] * 2^(x-3);
[1, 1, 2, 4, 1, 1, 2, 4] -> [1, 1, 2, 4, 8] * 2^(x-4);
etc... until (x-s) = 0.
</code>
Sorry this is hard to understand! Each [] is a frequency domain. The numbers inside the [] correspond to bins and show the relative size of the bandwidth that each bin represents. E.g. If 1 means 10hz then 2 means 20hz. -> is meant to be an arrow symbol which represents the transformation of these domains as bins are combined, and * 2^z means there are 2^z of these frequency domains at a particular stage. x is the total number of stages minus 1, and s is the current stage counting up from s = 0, the first stage. (The first stage is usually represented by a bit reversal sorted time domain in the FFT, and some sort of  main processing loop then takes over and transforms it into the subsequent stages, but it depends on your exact version of the algorithm and it's design)
Is it worth it? Well because each bin is double the frequency of the last, such a set of bins will only perfectly match all octaves of a single pitch, so my guess it that it might be pretty useless unless you have some quite special requirements which could instead make it very useful... Would it be much faster to calculate? At each stage you would be calculating 2^(x-s) more bins than the last time instead of 2^x more bins every time, so I think that yes it should be substantislly faster for large FFTs as it scales far better.
The real question is, can such an approach be adapted to the kind of real world problem that the original question poses? There are multiple ways to produce bins in various other complex patterns, any one of which may be be more suitable, however some of these are not much more efficient than calculating a full high resolution FFT and combining bins afterwards. Also, designing an algorithm to create a pattern of bandwidths that makes any logical sense isn't so easy, although I cannot prove that it's an impossible task.
There are of course other simpler possibilities which might have quite interesting specific uses... One could manage to obtain something like [16hz, 24hz, 28hz, 30hz, 31hz] by combining the first (s-1) bins together at each stage. Or a pattern something like [1hz, 2hz, 4hz, 8hz, 12hz, 14hz, 15hz, 16hz] by combining some bins together around the middle at each suitable stage.
Answer: The frequency resolution of the FFT is Fs/N where N is the FFT size. The FFT gives you a uniform resolution at all frequencies. Therefore, you require N >= 400 points to get 10 Hz resolution.
Comment: You can get coarser resolution in that band by combining sets of ten FFT bins.
Comment: I don't want 10 Hz resolution in the frequency range [100,1000] Hz
Answer: I haven't seen this answer here, so I'll post it.  You can resample the signal to a lower sample rate before doing the FFT, which reduces the size of the FFT.
If you know that the only frequencies that you are interested in are from 0..1000Hz, you can safely resample the original signal to an FS of 2000Hz and then do the FFT.  This decreases the required FFT by a factor of 2 for the higher frequencies.
For the 10Hz divisions, resample the original signal again to an FS of 200Hz, and do the same FFT on the result to get your results from 0..100Hz.
Resampling the signal first increases the frequency resolution for the same size FFT, by limiting the FFT to only the frequencies you are interested in.  It effectively increases the length of the FFT over the lower frequencies while throwing out the higher frequencies.
In your case:
Input signal 4000Hz.
Resample to 2000Hz and use FFT of size 64 gives a resolution of 2000/64 or 31.25Hz.
Resample to 200Hz and use FFT of size 64 gives a resolution of 200/64 or 3.125Hz.
Comment: I think it's the other way round, see http://en.wikipedia.org/wiki/Decimation_%28signal_processing%29
Comment: Huh, either wikipedia is wrong or I am.  Neither is unheard of.  :)
Comment: I'd bet against Wikipedia. I've had a few of my edits on related pages rejected, for reasons that strongly suggest that the Wikipedian in charge doesn't actually understand digital signals.
Comment: For a fixed FFT size I think this a good solution.
Comment: An anti-aliasing lowpass filter should be applied before downsampling.
Comment: Deve, that's always part of the downsampling process, otherwise I would have called it decimation.
Comment: Well, my whole post just got downvoted too, as if what I suggested was WRONG and wouldn't work at all.  In this case it looks like Deve had a point, which I conceded.  In block form, a "decimator" is often the block after the anti-aliasing filter that takes every other sample, but "decimation" often refers to the whole process, so Deve's point is correct.  But now I've also been downvoted.  Whoever did that, can you please explain how my suggestion doesn't work?
Answer: You can't improve frequency resolution in a given frequency region without increasing a number of samples to be analysed. The picture is for example:

There are two input signals of the same frequency, but one is 64us duration while other is 256us duration. Their Fourier transforms are represented in the picture by blue and green curves respectively. Now we say that DFT (and also FFT) is sampling of the Fourier transform. Red line and circles in the picture are DFT bins of the short signal. They are obviously uniformly spaced, but changing coefficients of DFT matrix we can of course sample the spectrum in the interesting region more precisely. But the main idea is: the frequency resolution stays the same. It's dependent on signal duration (or number of samples under processing). It's clearly seen from the picture: green curve shows greater frequency resolution because it was calculated from more signal samples.


Travel guide to Kaliningrad?

Question: I'm looking for a travel guide (i.e. book) to Kaliningrad.  Are there any particularly useful English-language references for visitors to Kaliningrad?  I am particularly interested in any remnants of the old Königsberg.
Comment: See also: http://travel.stackexchange.com/questions/3804/curonian-spit-and-kaliningrad
Answer: Well there are lots of sites online that cover this.
For example you could look at Wikitravel's page on Kaliningrad.
It looks like the top site from the old capital Königsberg is the cathedral, built in 1333.  There is an English-language page on their official site.
Comment: Wikitravel's page is useful but a bit sparse.  I'd like something that does more than list the main sights.
Answer: Königsberg was destroyed during WWII, and then reconstructed. So there are some old houses, but not as many as you can hope to find.
As Mark said, you should start with Cathedral, and Kant's Tomb.
After that you can continue with some forts inside and outside the city, and visit some small city in Kaliningrad region. Especially I recommend the Svetlogorsk.
You can find much more information in this answer.
And about guidebooks - you can buy many of them inside the city - in bookstores or in travel agencies. A virtual excursions on city are available at Friedland gate site
There are also good online guide.
Answer: Although I still consult the default guides (e.g. lonely planet, rough guide), I find my self more and more to rely on online resources, specifically build around satnav devices.
My three favorites are 1. Geocaching.com, 2. routeyou.com, and 3. Everytrail.com.
Geocaching is nice, specifically if locals engage in this fun activity. Then again, you need to speak russian to appreciate the caches to the fullest.
So although these three online resources don't provide an extensive source on written descriptions, all provide interesting focal points in any destination, at least in my experience.
Routeyou has a very interesting route in Kaliningrad. In never realized that the in mathematical circles well known Travelling sailes man problem is actually based on Kaliningrad

Source: Wikipedia.org
Comment: The bridges of Königsberg problem are not particularly related to traveling salesmen -- except that the problem is generally regarded as one of the earliest starts of graph theory.
Answer: You can find a guide in the local tourist information center: http://www.visit-kaliningrad.ru/
And there are several books in Amazon about Kaliningrad in English: http://www.amazon.co.uk/s/ref=nb_sb_noss/276-9024839-7416712?url=search-alias%3Daps&field-keywords=kaliningrad+guide

Travel guide to Kaliningrad?


Am I correct about what AC/DC BAT BUS does?

Question: The purpose of the AC/DC BAT BUS is to distribute either A/C electrical power and D/C electrical to the things in the aircraft that need them. For example, I think he whole ECAM system and displays use A/C electrical power. There are 2 of each BAT BUS (AC and DC). Do they work together so AC BAT BUS 1 and 2 work together and both distribute randomly or for example does AC BAT BUS 1 supply certain systems and AC BAT BUS 2 supplies the others. Do they have assignments of which systems to power, or do they work together?
Comment: On some aircraft the pilot/copilot displays and instruments are powered on completely separate busses, I can't say if the A320 is like this though.
Comment: See [What does BUS mean in the startup procedure?](https://aviation.stackexchange.com/q/27879/3201) which describes how buses are interconnected and can be switched on/off. This is not for Airbus but the principle is the same. (BTW you could improve your question by fixing typos and uppercase.)
Answer: You can't easily link the two AC buses together, you'd need to synchronize the phases first. And then a short on one side could cause a complete failure so you'd have to isolate them again. Way to complicated to get that failure tolerant. Instead they just use two independent AC systems. Generally each system exists twice and each one gets a different power source.
In the A320 you have two main AC buses (AC 1 and AC 2) in flight these are powered by engine 1 and 2 respectively. And there is a AC essentials bus, which is either connected to AC bus 1 or if that bus is unavailable it is connected to AC bus 2. The AC essential bus can also get power from the DC essential bus via essential transformer. So you can run the captain PFD and ND and the upper ECAM on battery power (only available above 80kts or sth. or in the air - for emergency only)
Check out the A320 "electrical system descriptions" and "indicating and recording" http://www.smartcockpit.com/plane/AIRBUS/A320.html
At the bottom of the indicating/recording systems you have a bus equipment list telling you exactly which consumer uses which bus. This is true for all other sections as well, so if you are interested in a particular system you can quickly find out where it is powered from.
According to A320 FCOM, 1.31.75 Indication/Recording Systems, Electrical Supply, Bus Equipment List

AC ESS bus powers the captain PFD and (via AC ESS SHED) the captain ND, the upper ECAM screen, the display management computer (DMC) 1 and
  3 (if selected and AC1 failed), flight warning computer (FWC) 1 and SDAC1. (and many many other things ...)
AC 2 powers F/O PFD, ND, lower ECAM, DMC 2, FWC 2 and SDAC2 (...)
AC 1 powers the DMC 3 normally (...)
Answer: On A320, the essential AC bus could be connected either to AC 1 or to AC 2, there is no AC BAT BUS 1 or 2.
The DC ESS BUS is connected to BAT 2.
HOT BUS 1 is connected to BAT 1, HOT BUS 2 is connected to BAT 2.
Comment: @fooot, thank you for the edition


How to add custom options for plugin into the add post screen - like yoast seo

Question: On Yoast seo, when you create a new page it gives you the ability to alter titles, etc. This is added by the yoast module.
I am writing a plugin, that can have other things attaching to a post. How can I modify the admin panel to add these new option?
Thanks
John
Comment: Simply take a look at the yoast plugin and search for `add_meta_box()`...
Answer: what you are looking for is call in the WordPress world  a MetaBox and just like Yoast SEO you need to use add_meta_box() function to add your own.
there is a great tutorial and class you can use in your plugin at deluxeblogtips.com
 I would suggest you use that for a starting point.


Is there a IP-based login?

Question: Starting from today I noticed that I get logged out from time to time at SE. It doesn't matter if I'm active or not. So normally I browse the web using Tor. Thatswhy "my" IP address changes every ten minutes and I assume that the login is connected with my current IP address. Is this true? If not what can be the reason for those logouts?
Comment: Hmm, since I wrote my question I never got logged out again. If this doesn't repeat in near future I'll close my question.
Answer: Logins are not associated with IP addresses in any way. I expect something in the proxy layer is interfering with your cookies somehow.
Answer: My ISP has dynamic IPs and my IP changes every few days (more if the router has spasms) but I'm not logged out.
They might do a whois on the IP to do an ISP or country-check but it's quite a lot of work for a relatively small problem.
It's more likely that your cookies are getting invalidated at some point or their servers just don't like you and keep dumping your session.
Answer: I am logged in on my netbook via wireless and even I move around between different locations with totally different IPs and domains, I always stay logged in. It must have something to do with session management of your browser or the effect that tor has on it.

Is there a IP-based login?


Fondi 4.4 Wifi Tablet - Pattern locked and can't remember the gmail log in and password

Question: My Wifi tablet Fondi 4.4 is locked with a pattern and I can't remember the gmail account settings for this tablet or the password how do I retrieve this?  The tablet was locked in July 2017 and I have been struggling ever since to open it, please advise how do I get logged into the gmail account for this, the tablet does ask for the gmail login and password after I have done the pattern 5 times wrong
Answer: If your account has recovery settings, you should be able to regain access to the account, and therefore the tablet. Understandably, Google does not want entry methods that bypass the built-in security. If you cannot provide the details, there are no legitimate ways of gaining entry that I am aware of.
If you simply want to make the tablet useable, you can factory reset it.


Name for major/minor ambiguity in cadence

Question: Is there a name for a cadence which ends on I or i, but with the third intentionally omitted, so as to leave the final chord ambiguous between major and minor? Or a general term for using the tonic chord with the third omitted in a context where a major/minor third would be expected?
Answer: I've heard them referred to as "fifth chords", "power chords" and "no3 chords".
Answer: In addition to prooffreader's answers, the most common term that I've heard is "open fifth." The idea is that there is a fifth (say, C/G) that lacks the middle third (hence "open").
In analysis, these chords are sometimes identified as C5, indicating the only chord tone is the fifth above the bass. (This is in contrast to 5/3 figured bass, which suggests both a fifth and a third above the bass.)
Regarding a cadence that uses this, you may consider the general term "attenuated cadence," which simply refers to a cadence that is somehow weakened from its more normative form.
Answer: You mean the Quintal harmony, mostly used in Jazz harmony. It is the harmonic structure preferring the perfect fifth, the augmented fifth and the diminished fifth.
Perhaps you find this article more helpful
Answer: If it is the end of a three voice harmonic progression it is acceptable for the I to consist entirely of a tripled root. Also, strict counterpoint must end on a perfect consonance (excluding perfect fourths) this naturally results in the chord in question when the last I is just a fifth. I wanted to point out that a I5 does not imply ambiguity between major and minor. You could use it as a common chord for mode mixture to the parallel minor of your starting key. A smoother alternative to this would be using the V as a common chord followed by iv i (plagal progression in minor) this should result in a smooth mode mixture without too much resultant stability thus allowing flirtation with major or with other keys. It could serve as the departure for a developement section.