How to choose the most suitable technologies for your project?

Question: While architecting the system, often you have to choose the appropriate technologies to be used for every module. What are the different parameters to be considered while choosing the technologies/frameworks? How those parameters can affect the project quality, schedule, expense? Can anybody please explain in detail.
Comment: While you're at it; please explain the meaning of life ;o) In other words: That is one mighty big question you ask!!!
Answer:
What are the different parameters to be considered while choosing the technologies/frameworks?

Politics.
Experience.
Budget for license.

Note that there are few technical considerations that really matter C#, Python and Java (for example) all work perfectly.  The choice is usually political or experience more than anything else.  Having talked to a lot of CIO's and development directors, the politics of the situation matter more than almost anything else.

How those parameters can affect the project quality, schedule, expense?

Zero effect.
Quality is a matter of doing things properly.  Right Design.  Right Requirements.  Right Budget.  Right Testing.  Right Attitude.  etc.  Technology doesn't matter.
Schedule is a matter of having the right people doing the right things at the right time.  Technology doesn't matter.
Expense is a function of licensing and schedule.  The technology choices are irrelevant.
Most -- not all -- most technology choices are based on experience.  "Go with what you know."  You build highest quality most quickly with familiar tools.
[I prefer the rare cases of choosing something new.  However, after 30 years in this business, I've seen most decisions based on experience and going with something well-known.]
Comment: I am not convinced that RoR cannot scale given some effort.  If they were to put enough effort to it, they could figure out the complexity issues.  Not all technologies are created equal, some have certain strengths over others certainly, but effort solves everything.  Look at the effort Facebook has put into scaling MySQL as a perfect example, in the end however, that decision to abandon the effort of getting RoR to scale in favor of a Java rewrite was a political one and probably based on money and available talent on the job pool.  A good Java developer is more common than a good RoR dev.
Comment: @Saurabh: "parameters like scalability" play no role at all.  R0R can be written in a scalable manner.  Java can be written in a way that doesn't scale. Both technologies work.
Comment: thanks for your reply. Before a month or so, I heard that initially Twitter was developed using Ruby on Rails. And in fact, that was one of the most successful application developed using RoR. But due to some scalability issues, twitter shifted to java and that has increased its search speed some folds. This is what I read on internet. If it is true, then... Is it only POLITICS and availability of experienced professionals which matters while building an application? or other parameters like scalability also plays role in choosing technology? Please correct me if I am wrong.
Answer: It's a broad question, but one thing you should keep in mind is the balance between new technology and routine. It's a trade-off in my eyes and you have to choose a value between close to outdated but well known, tested and understood by experienced programmers and bleeding edge, interesting to learn, doing more things for you than the previous version.
My experience is focused on a team size of 5-7 programmers and I tend to say that you shouldn't introduce more than one entirely new technology per project if noone in the team has worked with it before.
As for choosing the appropriate technology, vertical prototyping can help a lot so you understand how the new framework affects the rest of the technology stack you're using.
Comment: +1 for 'not more than one entirely new technology per project'. One of our project went horribly off-schedule due to addition of many new technologies. Very true..we should not introduce many entirely new technologies per project.
Answer: Some broad criteria may include:
1-Type of application (Web, ETL, etc.)
2-Expertise of development team and whether the gap is could be crossed
3-Budget fit
5-User Requirements and usability needs - Compare each competitive technology for that. This
is very broad point. You need to examine every known requirement against the selected stack/platform.
6-Ease of finding knowledgeably support people (if you plan to live with the product)
7-Software licensing style (per user, server, etc.)
8-Interface compatibility between the platform/tools and the existing systems
9-Localization support (in some countries where English is not the first language)
Answer: I once heard of a company who gave a fake advertise that they want to hire some developers. The selection criteria was to plan a project (the one they were actuly starting to working on). You had to chose the technology and how many people would work on it etc.
Then they just picked the technology that was mentioned most of the times:)
I don't recomend this but I just had to share this short story:)


How many apps can be installed on an Android device?

Question: How many apps can be installed on an Android device? Is there any limit in number? Or whether it depends on RAM/Storage ?
Answer: In the source code of Android M that you can find here, is this statement:
/**
 * @hide Range of uids allocated for a user.
 */
 public static final int PER_USER_RANGE = 100000;

In this line of code, it states that a user can have one hundred thousand UIDs.
However there is a conflicting information. You know that root UID is 0 and system UIDs start from 1000. Normal user apps start from 10000. This interval defined for user apps' UID numbers is also stated here as:

FIRST_APPLICATION_UID has the constant value of 10000 (0x00002710)
LAST_APPLICATION_UID has the constant value of 19999 (0x00004e1f)

Therefore, first UID that will be given to a user app will be 10000, and last one will be 19999. Therefore, it states that a user can have ten thousand apps.
So, which one is correct? I think this might explain. Before 4.1.1 LAST_APPLICATION_UID was 99999, allowing ninety thousand user apps as the limit. However, this is for user apps while PER_USER_RANGE doesn't specifically say so and therefore probably includes all UIDs from 0 to 99999. After 4.1.1 LAST_APPLICATION_UID was reduced to 19999 but PER_USER_RANGE was left untouched.
So for pre-4.1.1 versions, the limit is ninety thousand user apps and for 4.1.1 and after it is ten thousand user apps.
That is of course the limit that Android accepts. But in most cases, your storage will be full before you can reach such numbers.
Comment: I'm somewhat curious why pre-4.1.1 it's 90k, then it's lowered to 10k after that. I still have no conclusion (well, only Google can answer that), but I assume it has something to do with the addition of [multiple users on Android 4.2](http://developer.android.com/about/versions/android-4.2.html#MultipleUsers). Probably the question can be extended to: how many apps can be installed *per user*?... or is 10k apps total for *all* users? (might be a homework in the future)
Comment: @AndrewT. I haven't used the multiple users option ever. Are UIDs for user apps different between them?
Comment: I haven't either unfortunately, so I don't know.
Comment: I had upvote earlier but missed to mention. Today I was referring in some other context :)
Answer: Theoretically you can install as may apps that fits on internal storage. In reality it's significantly lower due to an Android bug/OS limitation which may cause other apps, and the system itself to crash if the list of app "information" is larger that 2MB:

https://code.google.com/p/android/issues/detail?id=93717
https://code.google.com/p/android/issues/detail?id=69276
Comment: The sources you have quoted have nothing to do with a large number of apps, rather they deal with an issue with a set of specific Android versions where apps would crash when asks would simultaneously try to access contact databases.
Answer: Citation needed
You can install as many apps as you want to the device but...
If your like me and use a good Chunk of your internal storage just for apps and you have a 8GB phone or tablet as the Android Operating system will take a chunk as well and leave you with about 3-5GB of available storage you are limited to the devices storage capabilities but a good rule of thumb is to have 128Mb per GB of storage for device usability without getting random crashes from stable apps and not usable situations for apps that are not so much stable. It is also a good idea if you have a Micro SD card slot in the device(s) you have the apps on and send them to the SD card by going in settings and tapping on

Apps
Tap or scroll to On SD Card
Select the app in question and tap Move
"Move" will possibly cut up the app (depending on device and or app requirements) and send all data including app data(again depending on device and or app requirements) to the SD card or not be available at all to move. If you have a device that has no SD card but supports OTG(On The Go storage it will not be possible to have the apps sent to the OTG and be usable whenever you want due to the Mount protocol as it is not the correct mountable hardware
be aware that not all data can be sent to SD
assuming that you can make it this far with the device, wait till the grayed out Move is pressable again then repeat till complete
Please note that some apps that can move to SD may work better on the devices internal storage

Also be aware that the more apps you have the more possible resources (RAM)(Random Access Memory) can be used in the device in question as let's say you have 12 apps that request a refresh in the background (like Facebook, Gmail, Twitter to name a few) the less RAM can be found for other operations and causing ANR(App Not Responding) messages and drain the battery faster than expected
Comment: Comments here have been purged. They were deviating *way* beyond just the content of the answer here. If y'all need to have an extended discussion regarding views on what makes for a good/bad answer or how to present answers "safely" then feel free to start up a new room in [chat](http://chat.stackexchange.com).


Are distributions from an S corp taxable as long term capital gains?

Question: We have several shareholders. As needed, we will do a distribution for taxes. We are being told that these distributions are taxable as long term capital gains. Is that right?
Should shareholder salaries be paid as distributions vs. payroll?
Comment: This question, http://money.stackexchange.com/questions/28935/capital-gains-in-an-s-corp explains additional concerns of paying S-corp shareholders as distributions versus payroll. LittleAdv's advice is good, to consult a tax professional.
Answer: If you have an S-Corp with several shareholders - you probably also have a tax adviser who suggested using S-Corp to begin with.  You're probably best off asking that adviser about this issue.
If you decided to use S-Corp for multiple shareholders without a professional guiding you, you should probably start looking for such a professional, or you may get yourself into trouble.
That said, and reminding you that: 1. Free advice on the Internet is worth exactly what you paid for it, and 2. I'm not a tax professional or tax adviser, you should talk to a EA/CPA licensed in your state, here's this:

Generally S-Corps are disregarded entities for tax purposes and their income flows to their shareholders individual tax returns through K-1 forms distributed by the S-Corp yearly. The shareholders don't have to actually withdraw the profits, but if not withdrawing - they're added to their cost bases in the shares.
I'm guessing your corp doesn't distribute the net income, but keeps it on the corporate account, only distributing enough to cover the shareholders' taxes on their respective income portion. In this case - the amount not distributed is added to their basis, the amount distributed has already been taxed through K-1.
If the corporation distributes more than the shareholder's portion of net income, then there can be several different choices, depending on the circumstances:

The extra distribution will be treated as salary to the shareholder and a deduction to the corporation (i.e.: increasing the net income for the rest of the shareholders).
The extra distribution will be treated as return of investment, reducing that shareholder's basis in the shares, but not affecting the other shareholders. If the basis is 0 then it is treated as income to the shareholder and taxed at ordinary rates.
The extra distribution will be treated as "buy-back" - reducing that shareholder's ownership stake in the company and reallocating the "bought-back" portion among the rest of the shareholders. In this case it is treated as a sale of stock, and the gain is calculated as with any other stock sale, including short-term vs. long-term taxation (there's also Sec. 1244 that can come in handy here).
The extra distribution will be treated as dividend. This is very rare for S-Corp, but can happen if it was a C-Corp before. In that case it will be taxed as dividends.

Note that options #2, #3 and #4 subject the shareholder to the NIIT, while option #1 subjects the shareholder to FICA/Self Employment tax (and subjects the company to payroll taxes).
There might be other options. Your licensed tax adviser will go with you through all the facts and circumstances and will suggest the best way to proceed.


use of dominate

Question: Mr. A has two qualities.He is kind. He is aggressive. He is more kind than being aggressive.
If we say:
'His kindness dominates his aggressiveness.'
'His kindness overshadows his aggressiveness.'
'His kindness surpasses his aggressiveness.'
 Which one is better?
Answer: X dominates Y essentially means X controls Y.
If you simply want to say there is more of X than Y, dominate isn't the right word, but overshadows and surpasses can work.
X surpasses Y implies that X is moving forward or growing.  If this is not the case overshadows is the best term.
Answer: If you want to say that he is more frequently kind than he is aggressive, but that he nevertheless can be aggressive sometimes, then "dominate" is probably too strong a word, implying that kindness is always the dominant feature.
I suggest "moderates".
Moderate, verb: To cause to be less extreme, intense, or violent. Source: thefreedictionary

use of dominate


Chocolate covered cookies stuck to cooling rack

Question: I have some glazed chocolate cookies that I accidentally put on a cooling rack to let the chocolate glaze cool off, but now the chocolate glaze is completely stuck to the cooling rack. Any ideas on how to get the cookies off the rack without destroying them?
Answer: Turn the rack upside down, suspend it so that there is about a quarter inch between the cookie and the surface it will fall onto when it detaches from the rack, then heat the chocolate underside of the cookie (which is now the top that you can see because the rack is upside down) with a hairdryer/low temp heat gun so that it melts enough for the rack metal to move through the chocolate and for the cookie to fall/push off the rack
Answer: Get a sharp knife and gently cut the cookies off the rack.
Push the knife flat along the cooling rack and ideally cut just towards the center of your cookies - this may need some manoeuvering if your cookies are pretty close together.
If you are dealing with a glaze that melts, heat your knife. A tall glass with hot water helps, for example. But wipe the blade before using.
Comment: @Frank, just post an answer to your own question. That's perfectly ok here. Welcome to the site, btw.! Don't forget to take the [tour] and browse our [help] to learn more about the site and the Stack Exchange system in general.
Comment: Yes, I tried that with a hot spatula, but it didn't work. What did work was just holding the rack over my gas stove burners for a few seconds, then picking the cookies off and flipping them over onto parchment paper. Chocolate mess dripping all over the place, but I pretty much saved the cookies!
Comment: freezing contracts metal and cookies are more stable to brute force but who has freezer space for a rack?


Upper Spine Pain after Overhead Press

Question: I was overhead pressing on my 3rd and last set of 135, on the last rep I tried to push it up in a strict manner, I got it up to about my forehead, it want budging, so I let it back down and switched to a push press for my last rep. I got it up, and locked it out for about 5 seconds, let it down, and re-racked it, 5 seconds later I felt a sharp pain in my spine right in between my traps, where the gap in the muscle is. Is there a way to fix and prevent this? Here is a picture of where the pain is. BTW I'm 15 years old.
Comment: Unfortunately we can't diagnose your pain or form. I would get it checked out.
Answer: I had a similar experience when overhead pressing. My problem was deactivation of the core, causing instability. The problem is amplified by heavy load causing poor form. Before pressing brace your core tightly.
What I did : I do GermanVolumeTraining (10x10, 60 second rest) standing dumbbell overhead press. Concentrate on bracing the core and keeping the body stable: not deactivating core, not locking out knees and keeping hips slightly bent. Hereby activating the whole body.
Notes on my experience: The high volume (100 reps) helps with developing good motor patterns, developing stability, and increase muscle mass. You'll notice that using 3 kg dumbbells the first week will be sufficient. If you can (with good form) perform all 100 reps then it you would typically increase the weight. It is important to start with a light weight to learn good motor pattens.
At 15 I don't think you should be performing heaving over head press without a good coach. Injury is one of those things you'd prefer not to learn by experience. Please be safe. Happy lifting.

Upper Spine Pain after Overhead Press


How To Rescue Content from a Corrupt Database

Question: I have spent many weeks inputting content into a commerce system. The database is corrupt. (The website displays fine for an anonymous user, but if you log in you get a blank page. Backups/restore all yield same results) I have now set up a new version of the system, but would like to export/import content and content types from the old system to the new one. How can I do this? Which tables would I need to transfer?
Comment: Doesn't sound like a corrupt DB to me, sounds like white screen of death.
Answer: The database isn't likely to be corrupt - unless you're coming up against a ridiculously unlikely scenario, it wouldn't work for any users at all if it was corrupt.
If the data was corrupt, you wouldn't be able to restore the backup, it would fail.
What you need to do is look into the server logs; you're currently seeing a WSOD (White Screen of Death), which is common in PHP applications.
Your server logs will contain details of the exact error your site is encountering, and you can use that information to decide on how to debug and fix it.
Comment: I'm not seeing any errors in the Watchdog table. Just a "Login attempt failed for %user." and "Session opened for %name." followed by a bunch of "Cron run completed."
Comment: Fatal exceptions won't make it to the watchdog - check your server error logs (nginx/apache/php-fpm/etc)
Comment: I have found var/log/httpd/error_log. The errors in this file are:
[Fri May 13 07:58:00 2016] [warn] mod_fcgid: process 11413 graceful kill fail, sending SIGKILL
[Fri May 13 08:01:58 2016] [error] [client 18.104.22.168] File does not exist: /var/www/vhosts/default/htdocs/robots.txt
[Fri May 13 08:05:12 2016] [error] server reached MaxClients setting, consider raising the MaxClients setting
[Fri May 13 08:32:28 2016] [notice] caught SIGTERM, shutting down
[Fri May 13 08:32:30 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Answer: I installed Drupal, the template and files and the database to a different server and the whole thing worked. The only thing that changed on the old server between it working and not working is an upgrade of PHP. It must be the culprit. Thanks for helping me work through this issue.


Merging small polygons with the biggest adjacent ones

Question: I want to merge the RED polygons with the YELLOW polygons.
But i want to merge the one red polygon with the adjancent polygon with yellow one. This polygons are in one Feature class but classified in atributes.
I am trying many methods but it doesnt work or i dont know how to do.
Comment: Could you put some sample data for downloading?
Comment: Are you using QGIS or ArcGIS? (you have both tags) Do you have both available and would take a solution in either? If you have ArcGIS what license level do you have available?
Comment: I use only Arcgis i know it better sorry for taggs, I dont know how to look licence level sorry?
Comment: Help::About Arcmap... look at the 2nd line where it says License Type: if you can access eliminate your license level *must* be advanced. This is important information when offering help with ArcGIS as the available tools are governed by the license type.
Comment: i just can send in email because i cant post here
Answer: Use the Eliminate tool to accomplish this. It does exactly this: "Eliminates polygons by merging them with neighboring polygons that have the largest area or the longest shared border. "
Comment: I would suggest that you probably have a selection (or definition query), which is why you're only merging red polygons. Before using Eliminate you might want to start with Polygon to Line (with IDs) then join by left and right, select the ones that are red on one side (you might need to do some work here to find and select only the largest adjacent for each red polygon) and remove these lines then use the line feature class in the eliminate tool to avoid merging the big polygons.
Comment: I tried the eliminate field but this merges only the small with small polygons that are adjencent. But it doesn merge with the neighbour with yellow polygon.                    Do you know how use or tu write any extensions at the eliminate .
Comment: could you help me better Dear. i did polygon to line in toolbox and created lines but not one polygon to 1 line but created 2 or 3 lines. can you help in email if i send you shape f


Bitcoin with transaction fee exceeds balance

Question: I have used Coinbase to send bitcoins to an address. Sadly though, I have sent ALL my bitcoins, which left me with the balance of zero. When I checked on the transaction (which is pending at the moment) I saw it added a fee TO THE TRANSACTION which essentially exceeds my wallet balance. Since I sent ALL my bitcoins, let's assume I sent 1btc (just an example) then when I check on block reader it seems the transaction is higher with the fee, i.e. 1.01 btc. Which essentially means I don't have enough funds. What should I do?
Answer: It sounds to me like Coinbase has paid the fee for you, as a courtesy.  They have a policy of doing that:

Using our wallet services to send, receive and store digital currency is free. We even pay the network transaction fees which are included with most digital currency wallets.

My understanding is that Coinbase doesn't maintain an individual set of private keys per customer; rather, it pools all deposited funds among its own private keys, and tracks each customer's balance in its internal records.  (More like a bank account than a safe deposit box.)  So when you requested BTC 1.00 to be sent, it didn't come from an address of "yours" containing only 1.00 BTC, but from some internal Coinbase address(es) with a potentially much higher balance.  Thus there should be plenty of funds available in the inputs to pay the extra BTC 0.01 if Coinbase wants to write the transaction that way, and it sounds like they did.
A transaction fee is implemented by having the inputs of a transaction exceed the outputs.  So if the transaction does in fact have a fee of BTC 0.01, in addition to your output of BTC 1.00, then by very definition, it must have inputs of at least BTC 1.01.  (There might be other "change" outputs sending whatever is left over back to Coinbase, or making payments requested by other customers.)  If the inputs weren't valid, that would be a bug in Coinbase's software, and the block explorer you checked should have detected this and warned you about it.
Everything is fine and the transaction should be confirmed soon.  When that happens, the payment is irreversible and you can stop caring about how it happened.


Programmable timer for boiler without touching thermostat

Question: I'll try to be clear in a field of which I know little...
I have a new pellet boiler feeding hot water into a puffer for radiators and hot tap water. A thermostat in the house requests water at given intervals for the radiators. Fine, when I go on holiday, I tell the thermostat to wake up the day before I get back. But in the meantime, the puffer has been cooling due to heat loss and the boiler has been keeping the puffer temperature up. I would like the whole system to shut down until I programme it to wake up.
Now, the manufacturer tells me there is a wire bridge on the circuit board. Without it, the boiler stays off, so what I would like to do is put a timer in on this. It's just one wire: out of one connector into another. Are there any times for just one cable? All those I've seen are plug-in between a power source and the utility. Any ideas? Thanks!
Answer: You need a relay, which is a usually part of a timer - but you need a timer which has separate contacts for its power, and the relay contacts, rather than a plug-in type timer that combines those.
This is not an uncommon configuration, but shopping questions are off-topic so you'll have to find one yourself. I wlll make a general comment that "DIN" relays (designed for mounting on a "DIN Rail" as part of industrial control solutions) often appear to be the most reliable form of these, but there are other form factors available.
You could also use a "plug-in timer" connected to a separate relay, but that's more parts than you actually need.
Concern: If you turn off the system completely while you are away, what happens if the temperature drops below freezing? Could be rather messy, which is why most systems are simply set back to 50-55F or 10-12C rather than being turned off, at least in heating season.
Comment: Thanks for the response! Yes, if it were mid-winter I would certainly leave everything in 'anti-freeze mode' and put up with the heat loss. But in mid-season it would just be a waste of energy.


What kind of German bike is this?

Question:
I want to buy this second-hand bike but the person selling it lives in a different city and I can't go there at the moment.
However I can't explain it but I really like the bike even though I only have this picture of it.
I would like to know if any of you recognize the bike.
The only thing I know about it is that the bike is German.
Comment: Voted to close as the OP hasn't been back with more answers to clarify.
Comment: It's old.  Cotter crank (often a trouble spot) and that sort of center-pull caliper brake (which, while an old design is not a bad one) suggest a date prior to maybe 1975/1980.  Otherwise the design is pretty standard for a lightweight steel bike and not much different from all bikes until aluminum became popular in the late 80s.  The photo is not detailed enough to determine the workmanship of the frame, however.
Comment: In addition to  Daniel's comments, the metal spoke protector is indicative of 70s or early 80s.  There's nothing wrong with downtube shifters, which are based on friction, but if you're coming from an indexed bike its a bit of getting used to.  The handlebars are probably not original - I expect this had drop bars from new.  The brakes are not normal caliper ones, so its not a cheap budget bike originally.  The rear rack is a newer style too.   I'm surprised there are no mudguards/fenders and no lights.   Finally, I suspect the last main rider was female, because of the seat angle.  Nice Bike.
Comment: Having a Japanese derailleur doesn't imply that the bike is Japanese. Indeed, today, most bikes have derailleurs made by Campagnolo, Shimano or SRAM, but that doesn't mean that most bikes are Italian, Japanese or American.
Comment: Thank you to the both of you for your detailed answers! It makes my decision a lot easier. In a few days I will receive the bike and I will return here with higher quality photos.
Comment: @AdrianGrozea Did you buy the bike?  If so, please post an answer with more info, and mark it as "accepted"
Comment: The bike was not german, it was japanese.
I found that the derailleurs were made by DNB Japan somewhere around 1960 and that the handlebar is french (Guidon Phillipe), but other than that , this bike is a mistery to me.

The brakes only have a logo on them and the frame has only a number and a logo on the back. Underneath all the black paint, in the front, is a sticker but there is no way I can peel just the paint without damaging the sticker... On the pedals it says Lyotard 82 and they are in a rather good condition.
Comment: Yep, some of the best derailers of that era were Japanese, and these were often found on European bikes.
Comment: Closing as its 4 years old, and OP never came back to add more information as promised.
Answer: OP's answer-as-a-comment:

The bike was not german, it was japanese. I found that the derailleurs were made by DNB Japan somewhere around 1960 and that the handlebar is french (Guidon Phillipe), but other than that , this bike is a mistery to me. The brakes only have a logo on them and the frame has only a number and a logo on the back. Underneath all the black paint, in the front, is a sticker but there is no way I can peel just the paint without damaging the sticker... On the pedals it says Lyotard 82 and they are in a rather good condition.

Thus, it is not identifiable.
Comment: A Japanese derailleur in no way implies that the bike is Japanese, just as the French handlebars and pedals don't imply that it's French.
Comment: @DavidRicherby Doesn't french pedals means it has french cranks and bottom bracket? AFAIK old french components have specific threads. https://www.sheldonbrown.com/velos.html
Comment: @GrecKo That's not something I know about. But the general comment still stands: the fact that a particular component was manufactured in some country doesn't imply that the whole bike was, as illustrated by the fact that this bike has components made in multiple countries. Perhaps the pedals are a bigger clue for the reasons you state since they would imply that various other components were also French. Or maybe they were made by a French company for export as components to somewhere else.
Comment: My point was that if it has a french bb, the frame should have french threads too. But don't quote me on that :)

What kind of German bike is this?


Why can't I offer luxury resources?

Question: In my current Civilization game, I have 2 x silk and 1 x marble. The tiles have improvements built on them and they show up in the resources info panel under "Luxury resources". However when I go to the diplomatic screen with another civilization, it shows as if I had nothing to offer. What's up with that? Is there a way to see how else they are being "consumed"?
Answer: Odds are, the resource issue isn't on your side, but on theirs.
If the civilization you are trading with already has a luxury resource, it won't show as being available to trade to them.  That's mostly to protect the AI from being abused by humans, who if they were allowed to trade luxuries the AI already has to it would probably find a way to take advantage of it - so they simply don't offer you the possibility.
Comment: My wife has certainly abused the AI in a similar way, trading the same luxury resource multiple times to the same AI.  It seems like it doesn't update until end of turn.

Why can't I offer luxury resources?


Is there a safe way to access this site

Question: " https://thewest.com.au/digital-edition?utm_source=SSW&utm_medium=Referral&utm_campaign=digital-edition&utm_term=read-the-digital-edition&utm_content=top-nav "
I am a paid subscriber to this digital newspaper. I understand the reason why the website would not allow me access if they suspect anything but normal when I try to access the site and I also understand if TOR will see this attempted access as a security risk but can someone say if there is a safe way to gain access. Thank you
Answer: Edit: I think I have found a possible solution. Try using: https://hidester.com/proxy/ as a proxy. It might let you access https://thewest.com.au. Or you can try using another website as a proxy since  there are many free proxy servers available (https://www.fossmint.com/free-proxy-for-anonymous-web-browsing/). However, I strongly discourage logging in if it is even possible. After all, the third-party proxy server would be handling your data.

From what I've checked, the entire website (not just the link you gave) doesn't work with the Tor network. It is most likely due to the one of these two reasons:

The website is blocking Tor. Some sites may simply refuse to allow Tor users or may give them Captchas. Many websites block Tor exit nodes since some (not all) individuals use it for spamming, distributing malware, cyber attacking, etc. Of course, the majority of Tor users don't intend to do this, but for security purposes, the website might block Tor users.

The Tor network breaks the website. Some sites cannot handle traffic coming from the Tor network and may not work. For example, https://reddit.com doesn't work with the Tor network and gives a 503 Service Temporarily Unavailable error so you would have to use https://old.reddit.com with Tor as a fix.

If this website falls into category 2, then it depends on the website owner to fix the issue and you would have to contact and request them to do so.
If this website falls into category 1, there wouldn't be much you can do other than contacting the site to talk about the issue.
As a sidenote, I noticed that the website might allow some proxies as seen below. Maybe you could try using a proxy with the Tor network though I wouldn't guarantee success. It probably won't work.

Ultimately, contacting the website owners themselves is the best option since they own the site. They probably can give you information on how to solve the issue or will explain why if you can't solve the issue. I hope this helps!
Contact website: https://thewest.com.au/contact

Is there a safe way to access this site


Difference between implicit conversion and explicit conversion

Question:
Possible Duplicate:
Implicit VS Explicit Conversion

What is the difference between "implicit conversion" and "explicit conversion"? Is the difference different in Java and C++?
Comment: This is only a partial duplicate.  This Q&A is about Java and C++ ... and the meaning of the words implicit and explicit vis-a-vis conversions.  The linked Q&A is only about implicit and explicit conversions in C++
Answer: An explicit conversion is where you use some syntax to tell the program to do a conversion.  For example (in Java):
int i = 999999999;
byte b = (byte) i;  // The type cast causes an explicit conversion
b = i;              // Compilation error!!  No implicit conversion here.

An implicit conversion is where the conversion happens without any syntax.  For example (in Java):
int i = 999999999;
float f = i;    // An implicit conversion is performed here

It should be noted that (in Java) conversions involving primitive types generally involve some change of representation, and that may result in loss of precision or loss of information.  By contrast, conversions that involve reference types (only) don't change the fundamental representation.

Is the difference different in Java and C++?

I don't imagine so.  Obviously the conversions available will be different, but the distinction between "implicit" and "explicit" will be the same.  (Note: I'm not an expert on the C++ language ... but these words have a natural meaning in English and I can't imagine the C++ specifications use them in a contradictory sense.)
Answer: You Mean Casting?
Implicit mean you pass an instance of type, say B, that inherits from a type, say A as A.
For example:
Class A;
Class B extends A;

function f(A a) {...};

main() {
  B b = new B;
  f(b); // <-- b will be implicitly upcast to A.
}

There are actually other types of implicit castings - between primitives, using default constructors. You will have to be more specific with your question.
implicit with default constructor:
class A {
  A (B b) { ... };
}

class B {};

main() {
  B b = new B();
  A a = b; // Implict conversion using the default constructor of A, C++ only.
}

Answer: Casting is an explicit type conversion, specified in the code and subject to very few rules at compile time.  Casts can be unsafe; they can fail at run-time or lose information.
Implicit conversion is a type conversion or a primitive data conversion performed by the compiler to comply with data promotion rules or to match the signature of a method.  In Java, only safe implicit conversions are performed: upcasts and promotion.\
Also I would suggest reading about C++ implicit coversion: http://blogs.msdn.com/b/oldnewthing/archive/2006/05/24/605974.aspx


Does a Jewish wedding involve bridesmaids or groomsmen?

Question: Are there such roles?  If so, what purpose do they serve?  If creating bridesmaids or groomsmen is a distinctly American (or Christian) cultural practice, then what are some reasons for or against including it an American Jewish wedding today?
Comment: Meliorate, welcome to Mi Yodeya, and thanks for bringing this interesting question here! I hope you'll look around and find other material here that you'll find interesting, perhaps including our 73 other [tag:wedding] questions.
Comment: From what I've seen, while there are positions of honor (people holding the chupah poles, people to chant the sheva b'rachot, etc), the idea of "attendants" is American and/or Christian.  But I don't have sources, nor have I been to a vast number of weddings.
Answer: The Talmud talks about having shushbinin -- close friends -- escort the bride and groom, to the point that someone who was shushbin at your wedding can't testify in court about you, as the personal connection is too tight.
What is still found today is having one good friend (each) serve as "honor escort", (shomer) for the bride/groom: for a day or two before the wedding, the bride-and-groom-to-be are treated as VIPs such that they shouldn't go out unattended. Hence a good friend accompanies them until the wedding.
Today I'm not aware of "bridesmaids and groomsmen" being part of what we'd expect at a traditional Jewish wedding, but given the above Talmudic discussion, I can't get all that upset about it. (Though keep in mind, we're talking a very tight handful of people whose job it is to help out, not a massive chorus line to serve as window dressing. Similarly, a lot of people will likely be busy, or don't want/need the spotlight. A Jewish wedding is about things that are bigger than just ourselves. "Hey everybody look at me!" isn't the right theme.)
As for the bridesmaids all wearing matching dresses -- I'm told this has non-Jewish origins about so the demons can't tell who's who or something -- my guess is no one today thinks superstition, only aesthetics on that one.
Comment: On your last paragraph, if the point of the identical dress is to confuse demons, then it seems like the practice makes it *easier* on the demons by pointing out unambiguously which one is the bride (who is dressed differently in that scheme)!
Comment: Shalom: thank you for the insightful response. I also understand that the _shomrim_ provide logistical and emotional support for the bride and groom and, for Orthodox couples, ensure that they don't accidentally see each other during the week leading up to the wedding.  I have also seen _shomrim_ guard the door during _yichud_.
Comment: @Meliorate technically it's two (male, unrelated) witnesses *observing* that seclusion is occurring. (Also considered an honor to give friends.) But once they're waiting around anyhow, they might as well guard the door, especially if it doesn't lock. (If someone came in, they wouldn't be witnessing seclusion, would they?)  A *shomer* / *shomeret*'s job is escorting the bride/groom before the wedding.
Comment: In regards to the previous comments about "confusing demons"; it used to be that the maid of honor would wear the same dress as the bride, hence confusing any demons or evil spirits. Unlike today where the bride looks different from the bridesmaids.
Comment: It probably depends on what you define as "traditional". I've been to more weddings than I could estimate, and a very large number of them (at which orthodox rabbis have officiated, at which the witnesses are kosher and at which all is done in accordance with halakha) have had groomsmen and bridesmaids. What they've *not* necessarily had is a best man.
Comment: @ShimonbM I thought the best man was what you call the gabbai guy who calls up the witnesses, people to say sheva brachos, etc.


Miles or Kilometers for historical fiction?

Question: I am writing a novel of historical fiction about the Second World War. It is written in the POV of several German and Russian characters but is intended for English readers. Which units of measurement should I use when referencing distance, weights and time? Miles or kilometers, pounds or kilograms, 24-hour or 12-hour time designations?
Comment: I believe 24 hour time is fairly universal in militaries because it's unambiguous.  As for distances, you could always use the units the POV characters in a particular scene would use (Miles for the British, Kilometres for the Germans, etc)  I remember one book I read (The Machine Gunners) even made a plot point of unit confusion.  A bunch of British kids managed to get their hands on a German machine gun from a crashed plane but when they tried to use it they mis-set the range because they thought it needed to be set in yards when it was actually in metres.
Answer: It's not "history" but rather "geography" that determines whether you should use kilometers or miles.
If your characters are German or Russian, use kilometers, because that's what they use, even today. (Depending on the time, e.g. Tolstoy in the 19th century, a Russian might use "versts", which are just a bit more than a kilometer.)
On the other hand, if you were writing an American Civil War novel, use miles, because that's what nineteenth century Americans used.
Comment: Yes. Use the units that your viewpoint characters use.
Answer: If you're looking at this from the perspective of a set of characters talking to each other, it would depend on their background. If their country used metric, then they would have metric as their instinct. If you want them to 'convert' because of the presence of an American character, for example, you can do what we Canadians sometimes end up doing which is "It's about half a meter... hang on, two and a half centimeters per inch, it's about 20 inches." From that point you could have the "metric" character providing US Customary units or Imperial, or whatever (or the reverse).
At the end of the day, you don't want to break your reader out of the story. You don't want them to feel like you're ignorant of what was used, and you don't want to make things awkward. Doing something like this, or finding another means, allows you to have the transition to "what you assume your reader is most comfortable with." However, whenever they would come across "official documents" or they would receive orders, you could keep it in the "other" system, which would also allow you to create a sense of distance and formality about those issuing the orders.
I hope that helps.
Answer: I would just use kilometres, it's a fairly world-wide unit of measurement, known even in the English speaking world. Most people have a vague idea of how far it is even if they can't easily convert from kilometres to miles in their head - I imagine even more so if they are interested in military fiction.
Besides, don't (Didn't) even the American military use the slang "klicks" to mean kilometres? You'd often see it used in American media by American characters for an American audience - and they don't seem too bothered about the audience knowing exactly how many miles that is (not to mention what the hell a "klick" is)
Not sure if they did as far back as WW II but your audience are modern English speakers.
If exact distance is a factor, you could always add in extra information like ("so it will take fifteen minutes to get there").
Answer: I am not versed in who used what when, so I can't tell you exactly what to use. Fortunately, I can tell you how to find out.
In most fiction, your write for your readers. So if your audience is German or Russian, you use the Metric System. If they are American, you use the US Customary System
In historical fiction, Germans or Russians would use the metric system, so they should do so within your novel. You can always include a conversion somewhere within your novel if the detail is important, or even just a vague description of the distance: "A field away," "A castle the size of a pigeon on the horizon," "a stone's throw."
However, when you the author are talking to the reader (ie, narration, no character is speaking), you should use the Us Customary Units. It might seem a bit jarring, so if possible, you might want to not use exact measurement units all the time. Rather, use descriptions like I included above, or simply things like, "arm's reach" and "a stride away" for short distances.
I hope that answers your question, and good luck in your writing!
Comment: Yes, I was thinking of this in terms of which method the narrator would use. Specifically, I've seen authors who write about war and battles use date and timelines, such as:  Rhine River, 15 February, 1945, 16:30 HRS  Thanks for your comments. I appreciate it.
Comment: Remember that you can mark the most helpful reply as the answer - it helps other people with the same question find the answer faster.
Comment: This answer, and particularly what you discuss in the third paragraph, reminds me of my old question on [english.se] about [Multiple stone throws](https://english.stackexchange.com/q/36612/1858). Those who find this answer useful might want to also check out that one. (end shameless plug)
Answer: The Metrification of the U.S. Military can be dated as far back as the 1918, when Klick became slang for Kilometer was introduced.  Guns from 1957 onwards are in metric (legacy still use imperial measurments).  Aircraft use pounds for ordinance, but most military vehicles are built to metric standards.  U.S. Navy still uses inches for guns, and the submarine fleet still uses feet for depth and velocity and the "Kiloyard" for distance.  Other wise the Navy and airforce use Nautical Miles for distance and Knots for speed, both of which are metric unites of measure.  Civilian and NATO military aviation all collectively use feet for height.
With this in mind, the average U.S. reader will more than likely accept metric units as the accepted use in military jargon, even from their own troops.
Comment: "Other wise the Navy and airforce use Nautical Miles for distance and Knots for speed, both of which are metric unites of measure." — No, they are not. They are internationally used, and they are nowadays defined in terms of metric units (as are the US units, BTW; an inch is *defined* to be 2.54 centimeters), but they are not part of the metric system.
Comment: You're right.  Misread of my source.
Comment: In aviation, I think Russia is the only country that doesn't measure altitude in feet, but in meters. Yes, even pilots in thoroughly metric countries might be flying at, say, 4,000 ft above ground, or at [flight level](https://en.wikipedia.org/wiki/Flight_level) 280 (FL280) which is (28,0)00 ft above the altitude where the atmospheric pressure is 1013.25 hPa. (The latter is a bit of a mouthful, so "flight level" is used for brevity.)
Comment: ICAO is the International Civilian Air Organization and is the governing body of international flights.  Their membership includes 191 of the 193 nations of the UN (Dominica and Lichtenstein being the two non-signatories) and the Cook Islands (not a member state of the UN.).  That pretty much cements Russia as using feet, at least on international flights.
Answer: I would say: In general, use the system familiar to your readers.
German officers during World War 2 presumably spoke German. But if I wrote an historical novel intended for American readers, I would give the dialog in English, for the obvious reason that most of my readers do not understand German. The reader understands that the dialog is intended to be a translation.
Likewise, I'd generally give units of measure in the Imperial system, because that is what the reader is familiar with.
I'd say this is borderline because most Americans are at least generally familiar with the metric system, so they wouldn't likely have serious trouble understanding the units that German officers would really have used.
There can be an issue if the actual numbers matter. For example, if I was reading a novel where a German character said, "Our reinforcements are still 13 miles away. 13 is proving a very unlucky number for us today", as a reader I might balk and say, "But wait, he would have really said 21 kilometers. Why would the character relate 21 kilometers to the unlucky number 13? This doesn't make sense." (Assuming Germans think of 13 as an unlucky number. Just making an example.)
I'd avoid using one set of units in dialog and another set in narration. I think that would get very confusing. Readers would have to convert back and forth to make sense of the story.


Trailing Stop Order - how often do they get executed due to an error?

Question: I've just submitted a trailing stop order. In the order preview a warning icon popped out: "...your order can be executed due to a system outage or accidental miscalculated ticks..."
How often does that happen?
Thx in advance.
Comment: Geez, that sounds like a blanket CYA for  the broker...
Comment: Of course it is :) However I've seen accidental ticks on charts, but that was many MANY years ago... Just curious if it really happens now.
Comment: With equities, I've seen fat finger trades during after hours where the spreads are huge but that's a one off event.  What are accidental ticks? As for how often a stop gets triggered because of  system outage or accidental miscalculated ticks, I doubt that it's a reported event unless someone takes it higher up the food chain so frequency of occurrence is probably unknown.
Comment: Thank you so much, Bob. I was hoping to see if something like that actually happened to anybody and how often, or it's a thing that never happens...
Comment: Fat finger trades are also not bad ticks - they may be bad trades, but the trade does happen, so it 's inclusion in the price feed is valid.
Answer: I've never experienced it with any of the brokers I've used. The "miscalculated ticks" are rare - certainly not frequent enough to keep you from using trailing stops.
Make sure to use a limit on the trailing stop. In that case, even if you did get stopped out accidentally, you could always rebuy at a similar price
Comment: Miscalculated ticks are extremely rare these days. They come more from times when there was manual trading (as in: a trading pit) and price feeds where MANUALLY entered (as the data recorder - a person - heard it and typed it on keyboard). Nowadays all is electronic and simply typing errors reporting a bad price do not happen anymore.
Comment: Miscalculated ticks where not so rare in the old times when the ticker was manually entered and a provider's filters may not catch a small out of price variance. THAT SAID: Back then triggers also where executed manually. Today the feed is generated by the ticker plant and an error there sort of is illogical to start with.
Answer: It almost never happens because if it did too often, they would lose customers. The only thing that you need to worry about is the first case of system outage where they go down and can't operate normally. It is to their benefit to execute your order to the best of their ability (Most of these companies will also have things in their terms which state that they keep the customers interests at the forefront so you could take them to court if they screwed you over... then again that is expensive as hell)


Text that doesn't appear on the contribution page

Question: For my contribution page: https://crm.teatronecessariogenova.org/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1  - I checked the option: "Pay later"; in the editor I put the "Pay instructions later", but what I wrote in the editor doesn't appear on the "contribution" page. Thanks
Comment: Hi - thx for the screenshot. Are you using Multilingual - or just a translated version? Trying to understand what might be the special circumstances for your site that might be stopping this - also can you provide a link to the public facing form?
Comment: Of course, thanks petednz - fuzion, this is the link: https://crm.teatronecessariogenova.org/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1  -  I'm using only the translated version, or rather ... it's an English version that I'm translating on the "word replacement" page
Comment: doing a test, I saw that only by going forward in the transaction, the form where I wrote the instructions to pay later appears! You need to fill in the fields and click CONFIRM CONTRIBUTION. The payment information on the Bank account is displayed on the next screen
Thanks to everyone anyway
Comment: Yep. I think the documentation is good but if you think it needs improvements you are welcome to make a suggestion or an edit. "Instructions added to Confirmation and Thank-you pages, as well as the confirmation email, when the user selects the 'pay later' option" - of course you don't need to use the Confirmation page if you don't want it (just in case you hadn't spotted that)
Answer: The text that you add to the "Pay Later Instructions' box should show per the following:

Instructions added to Confirmation and Thank-you pages, as well as the confirmation email, when the user selects the 'pay later' option (e.g. 'Mail your check to ... within 3 business days.').

You said:

what I wrote in the editor doesn't appear on the "contribution" page

Unsure if you incorrectly typed 'contribution' instead of 'confirmation', or if you meant what you typed, in which case the text is not expected to show.
The other text "Pay later label" should show on the Contribution page, but may only after an amount has been selected if (assuming more than one payment option is set up)
Please add any clarification you can to your original question via 'edit'
Comment: Screenshots are always good as well.
Comment: so I was right at the outset - the clue was that she referred to 'the "contribution" page'


Do you need root to flash a custom recovery?

Question: Does flashing a custom recovery requires rooting the device, or just unlocking the boot-loader is enough? On my Nexus 7, I was able to flash custom recovery (CWM) without rooting. Is the same applicable on other android devices too?
Comment: Welcome to the Android Enthusiasts! Two interesting questions – but which one to answer? Q&A sites like this work best if you only ask one question per post (each page being a 1:n relation: 1 question with n answers). This makes it easier to follow, and to search for the answer to a given question. Might I suggest you [edit] above post, and move your second question to a separate post? Besides, for that 2nd question: it's quite unusual to flash apps via recovery (with a few exceptions); plus if it's rather a development question, it should better be asked at [SO].
Comment: Thanks Izzy. Edited the post as you suggested. My second question was not about flashing the apps, but to replace the stock recovery with my piece of code (say "hello world") rather than CWM. Adb has the option of flashing a custom recovery image, but I was wondering about how to make one in the first place.
Comment: Yes, `fastboot` has as well. But as said before, adjusting your code goes beyond the scope of this site. You might wish to check the [Android section at StackOverflow](http://stackoverflow.com/questions/tagged/android).
Comment: Did post the question there, yesterday itself. Just wanted to clear my point. Thanks.
Answer: No, it doesn't require root. Although we talk about rooting the device, all you're actually doing is getting root access within the Android OS. Flashing a new ROM or recovery happens before Android is running - it's a lower-level part of the firmware - so you can do it regardless of how Android is set up or what permissions you have within Android.
Comment: Another thing, a lot of custom ROMs come 'pre-rooted' so if you choose the right ROM the rooting process is completed during the installation of the ROM. Obviously only applicable if you are considering installing a custom ROM.
Answer: You need to unlock the bootloader to flash a custom recovery. Search over at XDA to see how and to choose the best custom recovery for your device. Some popular ones are TWRP and CWM.


When is it necessary to have visual feedback if auditory feedback is primary?

Question: Example: If a product's main feedback is auditory (ie. alarm clock, voice assistant) when is it necessary to give visual feedback (ie. LED indicator, display graphic)?
Answer: Sorry if I misunderstand the question, but I've been given little detail.
I would say always, because:

People can have their sound turned off, because of their location or they forgot to turn it on.
Some people are deaf and will never be able to hear the feedback.

You could also have a clear toggle button in your application or website to turn visual feedback on/off.
Comment: Or, for (1), just because they don't like noisy devices! My phone normally only sounds for incoming calls, _some_ notifications and the alarm clock. My PC is usually silent (unless on Skype, and then I use headphones) and in the past, portable games machines (Sony PSP, Nintendo SP and DS) were nearly always played with the sound off.


Does image size impact compression efficiency differently in different formats?

Question: E.g., if an image is, say, 600px x 400px and the PNG format produces a smaller file size than JPG, does this hold true at any image size? If the image were 600,000px x 400,000px would the two file sizes still have the same relative proportions? Or is it possible that JPG's compression means that PNG will eventually produce a larger file size past some number of megapixels?
Answer:
JPEG images can't be that big; their maximum size is (2¹⁶-1)×(2¹⁶-1). (doesn't really matter)
These are fundamentally different file formats, and their compression stems from different properties: Where JPEG is a lossy format who is able to drastically reduce the file size of content that has photographic properties (mostly: low-pass behaviour in 8×8 pixel blocks) at different levels of lossiness, PNG is lossless and compresses especially well on images with similar rows.
Thus, the size of the images depend on the content. You can't directly extrapolate from a small image to a larger version: it depends on the content of the original large image whether it compresses better in JPEG (for a given lossiness factor) or PNG.

Hence, no statement of the sort you seem to be looking for can be made, in general.
Specfically, for images that are large and that results in large swaths of identical pixels, JPEG always operates on blocks of 8×8 pixels. Even if there's a lot of monocoloured blocks, these still have to be stored and later entropy-coded in JPEG; this leads to repeating bit patterns, but not necessarily constant 0-bytes, having to go through a Huffmann-alike compressor.
In PNG, identical runs of pixels will be converted to differences to neighboring pixels; thus, large portions of 0-runs exist in large pictures with constant areas. The DEFLATE algorithm that follows this differential encoding is very efficient in reducing consecutive constant values to very few bits.


motor diode placement

Question: this is a super simple question. Does the diode work the same in this circuit if you place the motor after the transistor, instead of before? I'm trying to understand variations of where I can place the diode and how it really works. Thanks!

Comment: If you mean you want to place the motor between pin 2 on the transistor and the ground, it likely won't work unless you change from an NPN to a PNP transitor - the diode should always be across the two power legs of the transistor to prevent high voltages from switching off the current to the inductive motor damaging the transistor
Comment: What @user2813274 said..., PLUS you need another diode pointing up across the motor pins.
Answer: As shown, the diode will not protect the transistor, because it doen't prevent the collector voltage becoming very high.
You can 'visualize' the problem this way: the motor is an inductor, the transistor a switch. When the switch is closed, current flows downthrough the inductor (motor) and the switch (transistor). When the switch is opened, current will continue to flow through the coil, in the same direction. This is a property of a coil. It will cause the voltage on the junction to rise (because current flows to that point, and there is now ay to leave it), untill something breaks (probably the transistor). The same thing happens (but longer) if inertial causes the motor to spin after it is switched off.
When correctly placed, the diode will allow the current a path back to the other side of the motor, effectively shorting that current. This sounfds bad but it is actually good, because the motor produces a current, not a voltage.
Somtimes a zener diode is used, placed where you placed the diode, with a zener voltage >> the supply voltage, but << the transistor breakdown voltage. In that case the current will flow through the zener diode to earth. This dissipates the 'residial energy' faster than the diode over the motor.
Answer: A flyback diode must be used this way:

simulate this circuit – Schematic created using CircuitLab
Otherwise, the collector voltage can overshoot well above the maximum rating of the transistor (and possibly destroy it) when the coil in the motor raises the voltage trying to compensate for its sudden current cut-off. Your circuit only protects the transistor against reverse current, but not from the overvoltage generated during cut-off.
Take a look at this excellent video tutorial to see what happens with and without the flyback diode. Look at this snapshot from the video to see how big can the voltage spikes be:
Answer: Your circuit should really use two diodes in the following arrangement.

What's going on?
A motor is an inductor. When the transistor is on current flows through it to ground. When the transistor turns off the current will still flow but now the resistance to ground is LARGE. V = IR means the voltage on top of the transistor tends towards a very very large voltage. Large enough to fry the transistor, and also large enough to prevent you from listening to your favorite radio station.
The "flyback diode" across the motor limits the voltage at the top of the transistor to Rail + 0.7 V or so.
The Diode across the transistor has a similar function and protects the transistor from any negative voltage produced by the motor.  This is especially required with brushed DC motors. The commutation effects cause the voltage across the motor to do some really nasty dances.
Comment: Thanks. I understand the motor diode. How does the diode around the transistor protect the transistor from negative voltage from the motor? Does it allow electrons to bypass the transistor moving in the opposite direction from ground (conventionally)?
Comment: Yes that is correct.
Answer: Your question title refers to 'diode placement' and a lot of people gave good answers about the diode placement not being correct in your circuit, but your question asks about how the diode works if the transistor and motor are rearranged.  I think the question is not written very clearly.
If you are actually asking about relocating the motor below the transistor, than the diode placement isn't affected.  It should still primarily be in parallel with the motor, and you could use the second one across the transistor.  But the problem is that the transistor wont turn on fully if it is above the motor since it is an NPN BJT and is driven from a lower voltage source than the motor.  You would have to change it to an PNP type.  If you did that, then yes the diodes work the same way.
The motor may run if you just move the NPN above the motor, but the BJT would not be saturated so it would be dissipating a lot of heat.  What will happen is, as the power is turned on (and motor voltage is zero), the emitter voltage is zero, so the transistor starts to turn on (there is some base current).  This allows current through the BJT and motor and the voltage increases.  This tends to reduce the base current which will try to increase the collector-emitter voltage and reduce the motor voltage.  This will stabilize at some point, but not in the saturation region (because if it was, the motor voltage would be nearly the full supply voltage and the emitter voltage would be higher than the base voltage, which can't be the case if it's saturated).  So it may come on with a reduced voltage, but it's probably not what you are trying to do.
Comment: Thanks. Yes, sorry for the unclear question. The motor does still work being placed at the transistor's emitter pin with an NPN when I wire it up. Perhaps its because the motor is rated for 3V and it's receiving 5V? If there was only 3V going to the collector would the motor not work when attached between the emitter and GND? My original question is asking does the diode achieve the same function if the motor is placed at the emitter, rather than the collector.
Comment: The regulator is 5V?  What is the supply voltage?  The motor may run, but probably the BJT is not saturated so it may be dissipating a lot of heat.
Comment: I edited the answer to describe why the motor would run in that configuration.
Comment: Not using the regulator. Basically everything in front of the motor/transistor is an Arduino. So 5V from arduino to collector, motor connected to emitter, Arduino pin connected to base.
Comment: OK, same would apply as long as the motor supply voltage is about the same or higher than the max base voltage.

motor diode placement


Is there a theory about time traveling without paradox or multiple universes?

Question: If you think about time travel you will quickly come to problems like the time paradox. In order to avoid a solution of the question about the paradox, the theory of multiple universes is used. Is there an approach that works without the multiple universes and yet does not contain a time paradox?
Comment: Hi, welcome to Philosophy SE. Please visit our [Help Center](https://philosophy.stackexchange.com/help) to see what questions we answer and how to ask. Vague questions such as yours are not really suitable for our format and are best addressed by reading encyclopedias, e.g.[IEP's](https://www.iep.utm.edu/timetrav/) or [SEP's](https://plato.stanford.edu/entries/time-travel/) Time Travel. We take more pointed questions that come up after that.
Comment: The question may be too speculative, but perhaps someone knows an answer that is not primarily a personal opinion. Although your question might be closed I hope you try again if that is the case. Best wishes and welcome to this SE!
Comment: You could check on physics.stackexchange.com.  There has been work on how time travel would work if it turned out to be possible.
Comment: This looks like a question for a physicist rather than a philosopher.
Answer: Welcome to Philosophy.SE!
Yes, there are several solutions.
Blinovitch Limitation Effect
Coming from Doctor Who it states that if you try to contact with another instance of yourself, some kind of energy will stop you from doing it. Another aspect is that you cannot change your past decisions.
Novikov self-consistency principle
In short, it states that despite you can travel back in time, you cannot change past. Instead, you being a time traveller are the cause of given present which sometimes might look like causal loop: you can be a father of yourself, for example. Whether to count it as a paradox, is on you, though. There is a novel where the main character becomes both a father and a mother of himself, which is an example of it applied. Can't remember the title, however. Another example is when Harry Potter travels the time.
This answer might not be comprehensive, people could come by with other solutions and if there are any, let others answer.


What's the Max character limit for a post in WordPress?

Question: Very software out there has a limit for character but I haven't seen any such limit for a post in WordPress.
So I need to know if there is actually a Max character limit for a post in WordPress or not? If there is then what's the limit?
Comment: In what context? Per post? Per comment? What? Total database capacity? No offense but as written the question makes very little sense.
Comment: Apologies!! I need to know character limit for Post in WordPress and I have also made changes in the question to make it more clear.
Answer: If you check the database description you'll see that the post content column is longtext, which is:

A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 − 1)
characters. The effective maximum length is less if the value contains
multibyte characters. The effective maximum length of LONGTEXT columns
also depends on the configured maximum packet size in the
client/server protocol and available memory. Each LONGTEXT value is
stored using a 4-byte length prefix that indicates the number of bytes
in the value.
http://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html

You will more likely run out of usable memory before the max character length becomes an issue.


Shared taxi from Abu Dhabi to Dubai

Question: Does anyone know of a shared taxi service for weekend round trips from Abu Dhabi to Dubai? Something for a daily commute from Dubai to Abu Dhabi would be helpful too. A private taxi would be AED 200-300 which is too expensive. I am aware of the E100 (Ghubaiba to Abu Dhabi) and E101 (Ibn Battuta to Abu Dhabi) RTA buses, but I would rather pay a bit more for a door-to-door shared taxi.
Comment: Door-to-door and shared taxi rarely go hand in hand.
Answer: This is possible at the main bus stations:

Lone passengers wanting to travel by car do have the option of a sharing taxi. At the main bus stations in Abu Dhabi and Dubai, taxi drivers offer single passengers the chance to share a taxi to the other emirate for between Dh40 and Dh60 each, depending on whether they have a four- or six-seater car.

(Source)
I found no door-to-door shared taxi, as these rarely work together.

Shared taxi from Abu Dhabi to Dubai


Readying an action for sneak attacks in surprise rounds

Question: If a rogue gains a second action during a surprise round (through Haste, action surges, etc.), can he ready the second action to interrupt an enemy's turn while they are surprised? Or does there need to be an action to key off of?
Comment: I'm confused about one thing.... the mention of 'surprise round'. 5E does not have 'rounds' of surprise.  Surprise is something a creature or player character either is or is not at the start of combat (the first round of combat), and any number of creatures might or might not be surprised depending on stealth vs perception checks.  Surprised creatures DO get a turn in the initiative on the first round, they just can't move or take an action on that turn and have no reactions until they end their first turn in the initiative.  So what kind of trigger are you trying to accomplish?
Comment: It also requires mentioning that once a creature or character TAKES that turn in the initiative, regardless of them being surprised or not, they are no longer surprised.  So this means if the rogue was stealthy enough to evade perception and surprised a creature, rolled initiative that was LOWER than the surprised creature, the creature still get's to act first.... the surprise 'status' has now ended for them.  Preparing a trigger will all depend on how surprise and initiative rolls play out.  All on pg 189 of the PHB
Answer: There is no surprise round in D&D 5, there is only a surprised creature!
Therefore, I don't think your question makes sense.
Assuming the hasted rogue (HR) is not surprised and the surprised victim (SV) is, the first thing that happens is that they each roll for initiative. There are 2 possible outcomes:

SV beats HR SV takes their turn, being surprised they can do nothing but they are now no longer surprised. HR then takes their turn which can include as many Ready actions as they have actions available based on a perceivable trigger.
HR beats SV HR takes their turn while SV is surprised. This can include as many Ready actions as they have actions available based on a perceivable trigger. Given that SV is going to do nothing on their turn it is difficult to see what the trigger could be. After their turn SV can take a reaction and this could serve as a trigger provided there is someone else in the combat to cause SV to take a reaction. If it is just the 2 of them then it is HR's turn and the Readied actions are wasted. I can't see why you just wouldn't use the extra actions to e.g. attack SV while they are still surprised i.e. on HR's turn.
Comment: @Dale M Actually, you can get a sneak attack outside your own turn. The wording clearly states "once per turn", not "once per round" or "until the beginning of your next turn ...". It's one of the rwasons that Commander's Strike works so well with a rogue in the party.
Comment: The intent of HR here is to push the second attack off turn, for a second sneak attack. It's worth noting that a RAW workaround to get that ready action to function is a trigger along the lines of "when my fighter buddy swings at an enemy I will attack it too."
Comment: @Ethan The trigger would work but it wouldn't give a second sneak attack - you only get one, on your turn or as part of the reaction from the Ready action, not both. Sneak attack "resets" at the start of *your* next turn.
Comment: @MrNattious I stand corrected.
Comment: @Dale M Cheers. No problem. I had the same thought until I looked at the PHB :)
Comment: Thank you for tackling this part of the question, I was confused myself and left a comment addressing the 'Surprised creature over surprise round' quandary.  What if the QA (question asker?) is trying to utilize the Assassin Archetype's level 3 ability 'Assassinate' ?  It works on any creature that has not yet taken a turn 'in the combat' , and is even more effective on surprised creatures.
Answer: This will depend on your DM
According to the text for a readied action:

Sometimes you want to get the jump on a foe or wait for
  a particular circumstance before you act. To do so, you
  can take the Ready action on your turn so that you can
  act later in the round using your reaction.
  First, you decide what perceivable circumstance
  will trigger your reaction. Then, you choose the action
  you will take in response to that trigger, or you choose
  to move up to your speed in response to it.

So, you can ready an action during a surprise round, however in order to use it you'll need to give your DM the perceivable circumstance that you're interested in.  Some DMs may consider 'the enemy starts their turn' as perceivable, but some may not.  It is definitely a 'meta' approach (turns aren't real things, they're abstractions), and many DMs would not let you do that.
Also, consider the fact that the text later says:

When the trigger occurs, you can either take your
  reaction right after the trigger finishes or ignore
  the trigger.

So whatever trigger you set has to occur first, then you can act.  So if you say something like 'the enemy begins their turn', and your DM accepts that, the DM is well within their rights to determine what the 'beginning' of the turn includes.  That may allow the target to attack back, slink away or even take the dodge action at the beginning of their turn, which would make it harder for you to hit your action (or even potentially lose your action altogether).
Comment: @GreenstoneWalker " A reaction is an instant response to a trigger of some kind" And it is after the trigger finishes, not the entire action. At the very least some actions can be interrupted. For instance, moving across a room, a RA might trigger in the middle of this movement.
Comment: Great answer. The 5e mechanic for "total defense" is the dodge action, which might make that point more clear.
Comment: @DerekStucki I knew I had the term wrong!  Thanks for the correction, I've edited my answer.
Comment: It needs stressing that Readied actions occur *after* the triggering action, so you cannot interrupt an enemy's action.


Permanent Approximation - Why can the JSV algorithm not handle matrices with negative entries?

Question: Going through the literature, it seems that what it comes down to is that if one could efficiently approximate permanents of matrices with negative entries, then that would imply an efficient algorithm for calculating permanents of 0/1 matrices exactly. On the other hand, Valiant provided a polynomial time reduction from the permanent of an arbitrary matrix with integer entries to the permanent of a 0/1 matrix. Why could one not make use of this reduction, followed by an application of the JSV algorithm (which can efficiently approximate the permanents of matrices with nonnegative entries but cannot handle matrices with negative entries) to efficiently approximate the permanents of arbitrary integer matrices?
Answer: The answer to the title question is: it's difficult to simulate a Markov chain with negative transition probabilies.
Valiant's reduction uses the Chinese remainder theorem, which requires an exact number, not just an approximation. The JSV algorithm cannot tell you what the permanent of a matrix is modulo 3, for example.
The type of reductions you'd need to reduce to JSV were named "approximation preserving reductions" by Dyer at al. An approximation-preserving reduction from a problem X to a problem Y is a way of turning an FPRAS for Y into an FPRAS for X (in a way that relativises). A simpler case of the same pattern is #DNF and #SAT:

There is an approximation algorithm (an FPRAS) for counting solutions of a formula in disjunctive normal form.
It is NP hard to approximate the number of solutions of a formula in conjunctive normal form to within a multiplicative constant (because it is NP hard to determine whether there is any satisfying assignment at all).
There is a reduction from #SAT to #DNF: given a CNF formula $\phi$ on $n$ variables, replace all the conjunctions by disjunctions and vice versa. If the resulting formula has $x$ solutions, then $\phi$ has $2^n-x$ solutions.

There is no contradiction, because the reduction described above is not approximation-preserving. Another common non-approximation-preserving reduction for counting problems is polynomial interpolation.
Comment: I see. The problem of calculating the permanent exactly is just as hard if the matrix has arbitrary integer entries as if the matrix is 0/1. However, allowing for approximation separates the problem into an easy case (nonnegative entries) and a hard case (arbitrary integer entries). I suppose I'm still confused on the point that the reduction is not approximation-preserving. By construction, the absolute value of the permanent cannot be greater than what you mod out by, so there are only two possible cases. What if I were to instead ask for only the absolute value of the permanent?
Comment: @Adrian: in the reduction given in Proposition 3.4 in "The complexity of computing the permanent", the primes "$p_i$" are generally less than the absolute value of the permanent, for which only the upper bound "$\mu^n n!$" is known.


Was Germany responsible for WW1?

Question: I know that the US, England, and France  decided that Germany was responsible for WW1, but was this a fair assessment?  Why/why not?
Comment: @Tyler, so what you're saying is that I should edit my question as to make the answer I got not make sense?
Answer: The question of responsibility for the first World War is sufficiently unclear to count as "primarily opinion-based". Most nations could have acted better, and who was worst is a value judgement.
Comment: The origins of the First World War are extraordinarily complex. There were inherent long-term reasons, and issues that lit the fuse. But the essential problem was Germany's late industrialisation, and her late unification as a nation state (1870s). There were also massive issues concerning a myriad of nationalisms within the Austro_Hungarian Empire and in the Balkans, as countries like Serbia fought off the Ottoman Turks, and *Pan-Slavisim* took root. Germany's  imperial ambitions could not be accommodated within the existing states system. 1914-18 was essentially a war of empires.

Was Germany responsible for WW1?


Managing SQL Stored Procedures' Version

Question: I am working with a team of 5 persons. We are using SQL Server as our database.
Since long time I want to store the Stored Procedures in SVN so that the versions can be maintained. Is there any tool which can be used as a plugin with SQL Server Management Studio and allows checkin from there.
Answer: Sounds like Red Gate's SQL Source Control might be what you're looking for.
It says it connects to "TFS, SVN, SourceGear Vault, Vault Pro, Mercurial, Perforce, Git,
and any source control system with a capable command line," and that it "links your databases to your existing source control system straight from SSMS".
I haven't used it personally, but I have used other Red Gate SQL tools, and they have been excellent.
Comment: I am looking for some open source tool. Redgate tools are right now not fitting our budget.
Answer: SSDT projects are great for this these days.
You keep all your db & proc & function definitions in script files (which define your model) and within Visual Studio sync the model with your database / publish to a database to update it. As all your object definitions are in script files you can have them under source control using SVN/Hg/whatever.
Answer: If I remember correctly (it's been years since I've used SQL Server), you can execute external scripts using osql.
For each stored procedure, I'd write a sql script that removes the current one (if it exists) and creates the new version. Saving these in external .sql files will allow you to easily commit them to any versioning system. Then, you could write a script using your language of choice to update the database whenever you want.
Obviously you'd want to create a backup of your current database prior to running your script in case all goes to hell.
Comment: I am looking for some more automated way that may be more error free.
Comment: It works pretty well (we do that here) but the key is that nothing is ever put on QA or prod unless it comes form the source control system. Since devlopers do not have the rights to deploy to other servers, their code doesn't get deployed unless they check it in.

Managing SQL Stored Procedures' Version


How to avoid gap after merging two objects

Question: I tried to merge two objects A and B, before merging, I use the snap tool to snap each other perfectly along the edges as shown in the screen shot, After merging, the A and B become one object, then I selected them all by hitting "A", then beveling, I found the "Green X" area are beveled which I don't want to have, what should I do to make this face become one piece so there doesn't have any bevel in between?
Comment: For your own benefit you may want to put one or more images which shows your problem more fully.  The choice is yours. That image alone does not tell me much .. although it may tell everyone else much.  I do not see a bevel in that particular image.  Of course vertices can be added, deleted, updated  to get the mesh you want.
Comment: Any edge can be beveled.  Selecting all and using the bevel operation will not always get you your desired result.  Consider selecting less than all and beveling.
Comment: I put some details in it thanks
Comment: Edge can be beveled, but I have already joined the two objects at the green X edge, then why it is still an edge, it should be a single face
Comment: Better images. Although I cannot tell if your meshes are flat like a plane or 3D like cube. Please see a tutorial on loop cut and extrusion
Comment: When you start using Blender you might do yourself a favor and try to comply with Blender as it currently works.    This means seeing only a few of  the  hundreds of possibilities as time goes by.  Time consuming process.  Blender determines vertices, edges, and faces.  Casual inspection does not.  So Blender may not agree with your statements about [should].  Many times it is a situation of .. How can I work with Blender ... with all the Rules of Blender.  I suggest a tutorial series ... on noonoob ... maybe 20 episodes of 6 minutes on average.
Comment: Edges in the same mesh .. even close together .. may be identified as different faces by Blender.  Through time and tutorials this may become clearer.
Answer:
Left White Mesh. A Cube with loop cuts and one face [extruded] in the z direction.  Thus having the edges you might need to control bevel operation.  Next 2nd White Mesh Selected. Edges selected and the bevel operator used.   These meshes are intended as crude facsimiles of yours.
At this time we think having a fresh start is easier than [join] operator.  Or at least equivalent.
Possible option. 3rd from left Blue image. Faces selected and [Face Dissolve] operator used for a ngon, on both sides. Yellow image on right. Inset faces.
Comment: Thanks for the solution, but this still doesn't address my problem, after a whole day's searching on the net I found an alternative solution, using "intersect/knife tool"
Answer: I finally found an alternative solution for this case, using Intersect/Knife tool to address this situation, follow the steps:
1.Select all meshes on both object
2.Ctrl+F and select Intersect/Knife
3.The edges overlapped with each other will have cuts automatically generated for each vertices(vertices sit on the edge, because the two objects were edge snapped before)
4.Dissolve limited, because the vertices on object A will overlapped with the cuts on the edge.
Then it's done.
Answer:
Select object A
Go to Modifier and choose Boolean
Choose Union
Select B as an object
Done


Solspace Super Search - Special Characters

Question: How can we make sure that special characters like ä,ö,å would be noticed while searching for content on a webpage. We are getting no results at the moment. I would appreciate any help! Thank you!
Answer: Note: I'm the dev of Low Search.
If you look at the comparison table (which I helped set up together with the Solspace team), then you'll see that "Accent-insensitive (diacritics)" -- the special characters you're referring to -- is not supported by Super Search. As far as I'm aware, Low Search is the only search solution in EE that allows for this functionality.


How to obtain data to create average precipitation in 2012?

Question: I am currently doing a final project, which I have to create a map of 2012 average precipitation of lower 48 states by using natural neighbour interpolation. The problem is that how can I get the data? I already have the data of 2012 from NOAA website in .CSV format. There are more than 80000 geographical locations in the file (http://www1.ncdc.noaa.gov/pub/orders/cdo/434898.csv) Would it be possible for me to use them to create the map and if anyone has any idea for
me about getting a data please help.
Comment: It sounds like you actually *have* the data already, but don't know how to use it to do the interpolation. You may want to revise your question to reflect this (as written and with the data tag, it's a different question). MyFamily's answer should get you going. You also may want to refer to the [QGIS documentation page](http://www.qgis.org/en/docs/index.html) for the User Guide and Training Manual. There's a specific [interpolation tutorial](http://docs.qgis.org/2.2/en/docs/training_manual/processing/interpolation.html?highlight=interpolate) in the training manual.
Answer: Display XY Data > Natural Neighbor Interpolation - use the points you just created as the Input Point Features and the Z value set to average precipitation.
That will get you a raster surface of rainfall which you can represent how you choose.
*Be aware that with Natural Neighbor Interpolation, you may need to add some 'Anchor Points' so as to ensure complete coverage of the US.
Answer: Build Thiessen Polygons tool would probably accomplish this. Convert the csv to a point file and go from there.
Comment: That tool would simply generate a polygon around each point. It doesn't really do any interpolation, or create shapes/contours around points with similar values.


Is there a way to hide the world seed on Minecraft 1.8 SMP?

Question: Is there a way to stop players being able to see the level seed in Minecraft SMP 1.8 when they press F3? Because they could use this seed to generate a copy of the world and then find the location of strongholds, dungeons, ores etc.
Comment: @Raven I think he's looking at this from a server admin perspective.  Obviously, the players who generate the world at home would have an advantage over those who don't, seeing as only the admin has access to the actual files.
Comment: ...why are you worried about players generating copies of a world in the first place? How is knowing the seed any different from simply opening up the files in an editor and looking manually?
Comment: @Raven Hmm, ok.  Totally did *not* get that from your first comment.
Comment: This world may be copyrighted ... who knows :P
Comment: @John - my point is, if he's worried about players having an unfair advantage, there are easier ways to garner one than genning a copy based on the world seed.
Comment: @Raven But on a multiplayer server the players don't really have access to the level seed do they? So how could they cheat?
Comment: @DanieL - By the virtue of the fact that they're playing on the server at all, their computer has to have parts of the map downloaded to it. It's possible to parse through this if you're technically adept and so inclined. See [this answer](http://gaming.stackexchange.com/questions/18190/how-do-i-copy-a-minecraft-multi-player-smp-map-to-single-player/21921#21921)
Comment: I suppose, but the players I'm concerned about are not that technically adept, but they could easily get the level seed from F3 and then use that.
Comment: @Warface secret seed number, would that be like an [illegal prime](http://en.wikipedia.org/wiki/Illegal_prime)?
Answer: While I doubt you can do much to change the client that people use to connect to your server, here's my terribly convoluted solution:
Explore a great deal of the map to force it to be generated then edit the seed in the level.dat file.  It should report what the current seed is (which will only do anything when they go further out than you did...and there might be a huge discontinuity when you do).
Comment: This is a good if not the only solution, just keep in mind that when you change the seed you also change the biome locations, it may snow in the desert.
Comment: Thanks for your answer. I did actually think of doing something similar to this, but decided against it as it would kinda make the world rather weird.
Comment: IF someone wanted to go with this solution, you could probably use a bot to explore the world for you.
Answer: Perhaps generate the world in a snapshot, and then update it. The seed should only be able to replicate the world if generated in the same snapshot.