How to analyse longitudinal data with 2 to 4 observations per person and varying time between observations

Question: I have clinical data from about 300 patients with repeated measures/observations of psychological distress over time. Psychological distress is measured as a continuous variable, but could be converted into a binary or categorical variable if necessary. About 60% of patients have only 2 observations and the rest have 3 or 4. The times between observations vary considerably, from a few days to a few months. I am interested in patterns of change in psychological distress over time. I have looked at various GEE models, growth models, mixed models, and time to event survival models, but am not able to find anything appropriate for this data. The varying time between observations is problematic for GEE, and the small number of repeated observations is not appropriate for mixed models. Because there are more than one possible outcomes for psychological distress (e.g. stay the same, improve, deteriorate) recurring over time, this is problematic for time to event models. Any advice on an appropriate analysis method for this data?
Comment: Personally, I'd start with either a mixed model or a generalized least squares (GLS) model with a continuous AR1 residual correlation structure. I'd treat time flexibly using splines. I strongly advise not to categorize a continuous variable, as you'll lose information (and power).
Answer: The small number of observations per individual isn't necessarily a problem for a mixed model. The bigger problem is often not having enough individuals or groups to get good estimates of the associated random-effect variances. See this page for details.
That said, the suggestion from @COOLSerdash to use generalized least squares (GLS) and your continuous outcome measure, modeled flexibly over time, is probably better here. You don't have to force Gaussian distributions on the random effects, as you do with a mixed model. You do have to specify a within-individual correlation structure; the continuous AR1 structure recommended is typically a good choice for data with different observation times. This answer provides some links for further reading to decide among the different ways to proceed, and for implementation of GLS in R.


Set location country based on coordinates

Question: Is there a way to have Location pick the appropriate country based on the latitude/longitude entered when the node is saved?
Comment: To which Drupal version are you interested?
Comment: Good question! D6.
Answer: I believe Location has the ability to be added with a CCK field. The coords can then be converted into a long address. From there you should be able to pull out the country.
If you want to get even fancier you can use OpenLayers to show the location on a map. Does that answer your question?
Comment: That is more or less right, you will need to make sure location has access to one of the geocoders for this to work.
Comment: Well it's part of a large existing project where converting Location to CCK isn't going to happen, but if it's possible with how you say, then I suppose it's not a far cry from a custom module. Thanks :D
Comment: So you already have existing location data?
Comment: Yes there's already a ton of nodes with coordinates input, but the editors are pretty lazy and never both to input the address properly and sometimes they don't even select the correct country. I'm trying to use the address data for google rich snippets ultimately. OpenLayers looks like the way forward though, I'll try and push that :) thanks!


SSL on JBoss and nginx

Question: I've got an application that runs on JBoss server. Also I've got nginx as reverse proxy server for this application. Now I want to configure ssl. Do I have to configure it on both servers? JKS for JBoss and crt, key for nginx?
Answer: It depends. I'm assuming, that nginx serves (and proxies) ports 80 and 443 to JBoss. For this alone, setting um SSL in nginx is sufficient.
If JBoss needs to serve a different port via SSL directly, without nginx proxying, to handle your application needs, (e.g. 8443) then you need to setup SSL in JBoss too.

SSL on JBoss and nginx


iPhone 5s forwarding automatically to another phone in the household after iOS 8 is installed

Question: My son updated his 5s to ios 8 and now for some reason when I call his phone if he doesn't answer it will ring to my daughter's phone and vice versa.   I have looked on both phones and cannot figure out why. The forward feature is not on.
Answer: The problem you are having is due to the Facetime feature "iPhone Cellular Calls" which allows you to "Use your iPhone cellular connection to make and receive calls on devices signed into your iCloud account when they are nearby and on Wi-Fi."  This is fine if all of the devices are your own so that you can answer the call on any of your iDevices but obviously not a good idea for multiple people.
Are all of the phones signed into the same [primary] iCloud account? Settings > iCloud
If so, you have 2 options.

Log them out of the primary account and sign in using their own personal AppleID accounts.

If you were using a single iCloud account so everyone has access to a shared account for Music/Movie/App purchases, you should switch over to the new iOS 8 Family Sharing feature.
If you haven't created their own AppleID accounts because they were under 13 or you didn't want to include your credit card on their account profile, with the Family Sharing feature, you can create accounts for each child that is automatically part of Family Sharing and all purchases must be approved by you first. See this Apple KB article for more details.

Turn off the iPhone Cellular Calls option in the Settings > Facetime screen.  This will stop the calls from going to multiple devices for now but in the long run, it would be best to set up multiple AppleIDs and start using the Family Sharing feature.

Tip: When you switch over to the Family Sharing, you can either use the old shared iCloud as your own (the Organizer) or create your own personal account.
 When setting up the Family Sharing, one of the screens will ask if you want to share your purchases or use a different account.  Choose the different account option and use the old shared account.  This 2nd method will share all the previous purchases made under the shared account out to all family members but gives you the option to NOT share your own purchases.  This is helpful for parents to purchase items that the rest of the family shouldn't have access to.
If you want to purchase something that should be shared, either sign into the App Store using the old shared account (just remember to sign out and back into your own account) or simply use one of your kids devices.
Hope this helps :)
Answer: ...also. i have 5 phones on a shared itunes (iCloud) account and after IOS 8.0.2 all of our phones started ringing when someone called 1 of the phones. This was happening on wifi only.
turn off iPhone cellular calls under "settings", "facetime" as the handoff will still work if your on wifi even though it is turned off.
Hope this helps
Answer: The only way to do this is Settings - phone - calls on other devices - switch to off.
Answer: Select "settings"
Select "general"
Select "handoff"
Turn "off"
You will note: this is only available on iphone5 or later. I had this problem when upgrading my 5 and my 4, but only calls to my 4 would get forwarded to my 5. Turning this feature off on my iPhone 5 has seemed to clear up the issues.
Answer: The problem is caused by FaceTime. There is a setting iPhone Mobile Calls:

Use your iphone mobile connection to make and receive calls on devices signed in to your icloud account when they nearby and on wifi.

Turn this feature off.
Answer: Turn off your Handoff! It is only available for IPhone 5 and up. Go to settings, general. Handoff &Suggested App and turn it off!
Hope it helped
Answer: I had this problem. Personal iPhone 5 and a iPhone 6 for work. My work phone would ring if I didn't answer my personal phone. I turned off the FaceTime over cellular (as indicated above) on my work phone only, and it no longer rings when my personal phone does. However, I have the Handoff feature set to on, on both phones. So, Handoff does not affect this.
Answer: Power the phone off and back on. If that doesn't work, then try a reset, hold the sleep/wake and home buttons together until you see the Apple logo and then release. This will make the phone reboot. This will not affect your data.
Answer: I called apple and ios 8 has a feature called Hand Off that comes with the Continuity feature set. You have to go in and turn those off to make it stop.
Comment: This answer could be greatly improved by expanding on "you have to go in and turn those off" to provide explicit, step-by-step, instructions for "going in" and "turning off" things.  Answers that aren't fully spelled on out Ask Different tend to get down voted. For more information on how Ask Different and the StackExchange Q&A format works please see our [FAQ](http://apple.stackexchange.com/faq).


Will a cement mixer extend the working life of mortar?

Question: I'm going to do some brickwork on my own.  Last time it was quite the job to mix up mortar and get it laid before it started to go off (I know, working in pairs would be helpful!).  I know I can extend the working life of mortar a bit by making a looser slurry (at the expense of some strength), can I also keep my mortar workable for longer by continually agitating it in a cement mixer?  If so, how much longer is it likely to remain workable - just a couple of minutes, or indefinitely?
Comment: It is a chemical reaction - once started it will complete.
Comment: @SolarMike Understood, I probably haven't expressed it well but am curious whether the rate of the chemical reaction can be slowed by agitation - it certainly seems like mortar left to sit becomes unworkable faster than mortar kept moving with a shovel, but I don't know if this really has any bearing or is just a perception thing...
Comment: I've probably made a bit of an XY error here - I guess what I'm really after is finding out if there are any ways to keep mortar workable for longer to allow more time for my inept bricklaying.  Keeping it moving was my guess at a solution, but maybe that is a faulty premise and there are better suggestions?
Comment: Are you using the ready mix type or the kind you measure the sand to one bag of type N or S or I masonry cement and then mix with water?
Comment: Chilling everything (water, sand, cement) will slow the reaction somewhat. Chilling only one part (water being easiest) will slow it somewhat less, as the rest of the materials will bring the temperature back up, and the reaction itself is exothermic. But mixing only the right-sized batch for your rate of work is easier. I use a scale that reads in grams when I mix tile mortar and grout, working by myself on fussy small tiles. I can't possibly get through a whole bag at a time within the working time, and I don't even try.
Answer: A mixer might help you mix smaller batches more quickly, so that you can easily adjust the size of a batch and keep up. But most mixers will make you think you should be making an even larger batch, and that's not a great plan.
It won't perform magic, and trying to extend the working time of cement products is heading down a road that is better left untravelled. Far better to sort whatever you need to sort to make small batches accurately and make more of them.
Without knowing what method you were using, you may be better served by a proper mortar hoe that has two big holes in the blade to promote mixing than a mixer, since your problem was having too much mortar mixed up to get through. A beneficial side effect of smaller batches is that they are easier to hand-mix.
I recall being instructed to make sure the mixing pan and tools were cleaned between each batch, to prevent the partially set earlier batch from speeding up the set of the next batch.
If you just want to extend the working life, then chilling everything (water, sand, cement) will slow the reaction somewhat. Chilling only one part (water being easiest) will slow it somewhat less, as the rest of the materials will bring the temperature back up, and the reaction itself is exothermic. But mixing only the right-sized batch for your rate of work is easier. I use a scale that reads in grams when I mix tile mortar and grout, working by myself on fussy small tiles. I can't possibly get through a whole bag at a time within the working time, and I don't even try. –
Comment: Your mention about smaller batches and cleaning the tools is spot on. Cleanup is what I learned the few years I was a masons tender.
Answer: Making mortar too "loose" will simply make a big mess over the brick since it has less reason to stay in place. Mixing it to the proper consistency will allow for easy clean up off the joints with out it smearing everywhere. When I was coming up in the trade, my boss would tell me to "temper" the mix, by adding a bit of water to it to make it more pliable again. This was only don once per batch since it does weaken the mix.
As mentioned in the comments, once it is mixed, there is nothing that stops the setting up reaction. If you use a mixer to try to extend the workability, you will end up cleaning out a difficult mess.
Answer: Stirring it does slow the setting time, this is why concrete trucks have those revolving barrels on the back.
However over stirring it also weakens the end product, and also makes for a thicker coat of cememnt on the stirrer that will eventually need to be chipped off.
so you can, but you should not.
Answer: Adding more water will not make your mortar weaker. It will take longer to dry but once fully cured it will have similar strength. To keep your mix workable for longer you can either add a plasticizer or cover your mix with a thick plastic. This will slow down the drying process so your mix will remain workable for longer. Make sure the plastic is as sealed as possible to avoid air/wind getting under. This is also recommended for mortars & renders once laid. Slowing down the drying process reduces the chance of shrinkage cracking and allowing the mortar to cure slowly hence achieving maximum strength.
Comment: Any excess water weakens the bond strength. Please check the fact. Other recommendations are correct and to the point.


Punch weapon vs. Swing weapon ,which applies more force to target?

Question: Have been told the punch weapons i.e. katar impact with more force than a swing weapon i.e. broadsword . My question is simple which applies more force to target with an impacted hit ? Please back up your answer with science and math ,hope to use this in future,will give credit .
Comment: As the impacts have very different impact area, it is hard to evaluate. The swing may have bigger energy to absorb due longer path, but OTOH, it gets better absorbed by target, so higher impact is needed to cause damage. Some extra evaluation is needed for combination of swing and punch, like for war hammers.
Answer: Punch has a greater impact.
When we use a punch the opposing force that is generated is perpendicular to your motion and thus you can be  easier to oppose it, to keep moving your hand forward.
$$ F_{hand} = F_{target by punch} $$
Whereas when you are using a swinging motion type of weapon you will probably be holding it near to one end and the then hit on the target with the other.
If you consider the end from where you are holding it to be nearly stationary,you can apply the equation of torque about it.
$\tau= r×F$ so if you see,
The force that would be applied to your weapon by the target which will hit it farther away from the stationary point, can generate larger torque because it is farther away, so to oppose the torque, you need to apply a greater force near the ends from where your holding it. So to keep it in motion ,
$$ \tau_{hand} = \tau_{target by swing} $$
$$ r_{hand}× F_{hand} = r_{target}×F_{target by swing} $$
And as $r_{hand} < r_{target} $,
 $$ F_{hand} > F_{target by swing} $$
And as $ F_{hand} = F_{target by punch}$
$$F_{target by punch} > F_{target by swing} $$
Hence Prooved.
Considering a person is using the weapon and he can apply the same amount of force in both the cases.


Does the destruction of the Borg transwarp Hub have any effect on the other transwarp conduits?

Question: At the end of "Endgame," the Borg transwarp hub was destroyed. Does that have any effect on the transwarp conduits that are generated using the transwarp coils on Borg vessels?
Answer: They would be unaffected
In explaining the technical side of a transwarp conduit, Memory Alpha explains that:

The Borg maintained a network of thousands of transwarp conduits throughout the galaxy, connected by six transwarp hubs supported by interspatial manifolds, with exit points in all four quadrants. They were additionally able to generate new conduits through use of transwarp coils.

So, as long as a Borg ship was outfitted with a transwarp coil, it should be able to generate its own transwarp conduit, irrespective of whether the transwarp hub was working or not.
Answer: Actually yes. As Borg uses hive minds,they have a share-tech as well. So as the hub gets destroyed,their vessels (both Cubes and Orbs) lose their Transwarp drive. Their Transwarp drives are dependable not on Subspace used by both Warp and Transwarp,but on condition of the hub which controls all the drives.
Let me put it this way:
With Warp drive,if the subspace collapses,the drive drops out of speed and the ship either comes to a full halt or switches to impulse drive (the kinetic power plays no role here since there's no gravity to support the drive necessary to achieve kinetic forward movement) while Transwarp hub causes a tunnel effect which (the hub) uses stabilisers to facilitate additional sturdiness to the Transwarp tunnel thus negating the Subspace collapse.
Hope this helped.
Comment: Are you basing this on anything actually seen in the show, or just your own [headcanon](http://www.urbandictionary.com/define.php?term=Headcanon)?
Comment: I don't know, I thought the transwarp the Borg have is similar to the quantum slip stream drive and the transwarp hub is a completely separate thing
Answer: Consider it this way. The Borg hive mind mentality is kinda like shareware website filled with information about almost everything. And their technology is pretty much the same. It is shared between the Borg mothership and Cubes and Orbs. That's one way,besides the hive mind,to control drones. And the Borg "queen bee" has the ability to disconnect a separate ship (the renegade drone Cube in Voyager series lost their Transwarp upon the mothership learning of their rebellion by a push of a button at the hub) as well as powering down the entire Transwarp system.
Transwarp depends on the hub straight and simple as seen both in Voyager and Enterprise series.
Comment: What is the Borg mothership exactly
Comment: You've posted two answers to the same question. Did you mean to [edit your previous answer](http://scifi.stackexchange.com/posts/115998/edit)?


Choosing Artificial Intelligence after MS in Theory

Question: Currently I am in an MS program with a research concentration in theoretical/formal computer science (mostly spatial and temporal knowledge representation and reasoning). However, I find myself getting more attracted towards artificial intelligence and robotics. When applying for a PhD do you think my MS research is a good concentration for a PhD research in Artificial Intelligence and Robotics? (I have taken courses that cover both artificial intelligence and robotics during the MS)
Answer: As always, it's going to come down to your application and your history.
From the sounds of it, you'll be a very strong candidate based on your theory background -- You just need to find the right school / supervisor that will see how to help you pursue those interests. Look for schools with good AI programs.
Knowing the research focuses at the CS Department in the University of Alberta, I think you'd have a good shot there with a number of supervisors, both in reinforcement learning and in machine learning.
Really though, it's going to come down to a demonstration that you can do the research, via your reference letters, CV, etc.


What would be the alignment of a Slaanesh worshipper?

Question: Would a Slaanesh worshipper necessarily have an evil alignment in D&D? can't a character be a hedonistic Slaanesh worshipper without mutating and going insane, if so, why?
Answer: Although this is probably more adept for rpg stack, I'll answer.
Slaanesh is not only a god whose worshippers are hedonistic. They are totally insane, crazy and chaotic. This limitates your alignments to the "Chaotic" branch.
Also, they enjoy and find pleasure in pain, getting it and causing it to others, this also limitates de "Good" branch of the alignment. A Chaotic Good character couldn't enjoy causing damage or pain to others.
So, from my point of view, a Slaanesh worshipper must be Chaotic Neutral or Chaotic Evil. No other alignment in the collection fits into their primary behaviour.
Comment: Warhammer lore presents a very polarized spectre of beliefs. While you can find usually that type of spectre also in D&D worlds, it usually depicts also "grayer" shades of faith. So you can find people from a wider alignment arcs worshipping gods. You won't expect to find evil characters worshipping Torm or Tyr (from forgottern realms setting), but with less "strict" deities you can find quite curious alignment combinations. However, in Warhammer, things are just black or white, there is no room to good lawful people worshipping chaos, because their same nature is to twist weak enough souls.
Comment: In warhammer, the chaos influence is something that affects souls. Long before any mortal knows or gets insight into the chaos, it's soul is twisted far beyond reparation. We've seen this hundreds of times in the novels. The fact is, you could have a good person with an hedonistic nature, but if he delves deep enough into this to "find" Slaanesh, surely his soul is already condemned. He won't change from an alignment to another in the blink of an eye. But he'll be making steps further into madness each passing day, changing his behaviour to a more extreme version and eventually becoming mad
Comment: Forgive me for not wording my question properly, I'm more interested in discussing Warhammer lore vs D&D lore than systems, for example, worshipping a god in D&D does not technically affect you mentally, you worship, and perhaps at some point your god may want to favor you if you ask for help, but in the case of gods of chaos in Warhammer it seems to be that if you worship them, for example if a relatively normal person drinks, has sex etc in excessive amounts he would be worshipping Slaanesh and their minds would be warped automatically, why is this?
Comment: So what I'm getting here is that while having a "moderate" Slaanesh supporter (not sadistic, not insane, just hedonistic) would be possible, there just aren't any in canon because the writers wanted to polarize the setting? or would that character eventually get corrupted because of some passive magical influence?
Comment: Thank you very much for your time, that last explanation gave me all the answers I sought, again, thank you.


Am I able to replace In-App purchase with Apple Pay?

Question: Apple Pay commission fee is much lower than 30% for In-App purchase. It seems it is more worth to use Apple Pay.
I use now In-App purchase to enable remove ad from my app. Do you think I can replace it with Apple Pay?
Answer: No, Apple Pay is for physical goods or services only.

Apple Pay or In-App Purchase
It is important to understand the difference between Apple Pay and In-App Purchase. Use Apple Pay to sell physical goods such as groceries, clothing, and appliances. Also use Apple Pay for services such as club memberships, hotel reservations, and tickets for events. On the other hand, use In-App Purchase to sell virtual goods such as premium content for your app, and subscriptions for digital content.

Source: https://developer.apple.com/apple-pay/Getting-Started-with-Apple-Pay.pdf (page 2)
Comment: @János That's probably acceptable as you are providing a product outside of the app, but I'm not Apple!
Comment: And what if I e-mail you a `ticket` for 1.33$ and by the way I remove ads from app you are using? I think tickets, i.e. ticket to a theater is something relating physical world.
Answer: Not at all. As @grgarside told Apple pay is a kind of replacement for credit cards and is only for physical goods.
Additionally, If you read the iOS Paid Applications agreement, you will see the following about commissions:

(a) For sales of Licensed Applications to end-users located in those
  countries listed in Exhibit B, Section 1 of this Schedule 2 as updated
  from time to time via the iTunes Connect site, Apple shall be entitled
  to a commission equal to thirty percent (30%) of all prices payable by
  each end-user. For purposes of determining the commissions to which
  Apple is entitled under this Section 3.4(a), the prices payable by
  end-users shall be net of any and all taxes collected, as provided in
  Section 3.2 of this Schedule 2.


How to clone Anchor Program with IDL

Question: If I have an Anchor IDL json, is it possible to generate an Anchor program (Rust) script with it?
Answer: To put it simply, no. You'll also need to clone the program executable from the chain. For example, if the program address is ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL, you'll need to do:
$ solana program dump ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL program.so
Wrote program to atoken.so
$ solana program deploy program.so
Program Id: PzZM4jv8R8MMWwx9QRep9o78eSUhipUQ4j8LBE9gAq8

Note that this may not work as expected, since some programs hard-code the expected address of the program when checking ownership or deriving PDAs. In our example, that means that ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL is hardcoded somewhere in the executable.

How to clone Anchor Program with IDL


.Net vs SSIS: What should SSIS be used for?

Question: If I have the option of using .Net and can do data transformations just fine in .Net, when would I need SSIS?  Is there a certain task that SSIS would be better for?  Are the added benefits of transparency worth it?  Is it just what I am more comfortable with?  What are the best practices for determining this?
Comment: My experience - If you know the requirements of a project well and if they can be easily achieved with standard ssis components with a minimum of scripting, then SSIS might be the way to go. Otherwise, its a pain.
Comment: Yes, you can use .NET to transform data, but there is a reason why the organization behind .the swiss-army knife that is NET also developed SSIS.  When it comes to ETL tasks, SSIS is the Chef's knife;  Perfectly honed and balanced for the task.  It was built specifically with ETL tasks in mind.  It handles multiple disparate sources of data (Files, DBs, FTP), transaction isolation, data flow logic.  Coding those features in C# yourself are not trivial.  However if the ETL task you face itself IS trivial, then perhaps .NET will suffice.
Answer: good question.
if the amount of data transfer huge? are you processing multiple data files and need transactions (both at file system level and database level)? are you dealing with multiple data sources at different locations (for eg ftp, local file system, database)?
if answers to above are yes then go ahead with ssis. basically .net is cool with small data import / export jobs, but when you have anything more complex, ssis is a definite winner
the other thing which i look at is - is it worth writing .net code when everything is available inside ssis. (dont mistake me - i love coding) however, anything you code, you need to maintain :-)
Comment: I love SSIS.  But there are times that .net is really the only way to go, an din those cases, I usually just code my transforms right into the SSIS package.  +1 for the is it worth writing code, when it's already done for you.
Answer: I think project time/budget constraints and the use of a standard tool are some of the biggest arguments for using SSIS. Creating an SSIS package is most of the times way faster than trying to code something similar in .NET.
But with that said, it seems like SSIS have a lot of pain points that sometimes might invalidate this argument. It did for me when developing a solution that needed to run in different environments at many different clients. SSIS simply looked too painful the more I evaluated it for the project. A properly architected .NET solution is easier to deploy, more reliable, more flexible, easier to understand and can also achieve very good performance.
IMHO: consider using SSIS for projects that you only need to deploy to one or maybe two in house SQL Server environments. Otherwise, the .NET approach will quickly become more appealing.
Comment: @DetectiveEric, you shouldn't be using Object oriented coding practices when loading data to and from a relational database anyway.
Comment: another +1 for pain points. SSIS is not a flexible ETL tool, it's very error prone, and makes object oriented 101 coding practices incredibly difficult
Comment: one more pain point - http://social.msdn.microsoft.com/Forums/sqlserver/en-US/946e516b-fdf3-40bd-886d-e70a8dfae46b/assigning-a-sql-null-to-an-ssis-string-a-ssis-flaw-?forum=sqlintegrationservices
Comment: same point here as well - http://www.sqlservercentral.com/Forums/Topic1538944-364-1.aspx
Comment: and on SO too - http://stackoverflow.com/questions/21616435/assigning-a-sql-null-to-a-ssis-string-a-ssis-flaw
Comment: SSIS is horrible for version control
Answer: My arguments for not using SSIS are:

Design greenfield products so that they have RESTful data feeds for reporting and extraction built-in to the project plan and budget, preferably to a standard like OData so that other tools can plug right in.
Data feeds should pull and transform from upstream systems and feeds on demand; such that schedule tasks, configuration of scheduled tasks, task runner VMs and staff to run all this unreliable scheduling stuff is negated.
RESTful data feeds leverage HTTP caching.
Feeds/services/APIs can be moved to elastic-scale cloud easily.
SSIS requires finding people with SSIS skills that enjoy doing that stuff for weeks. In my experience, finding and retaining SSIS developers is hard and expensive and the people found tend to be sub-par.
SSIS doesn't work well with source control and collaborative work.
SSIS doesn't lend itself well to code reuse, unlike microservices and traditional code libraries.
SSIS doesn't version easily, unlike a REST service.
SSIS doesn't lend itself to modular designs and continuous deployment of many small changes, it tends to be large-batch with scary releases.
SSIS promotes the use of stored-procedures which places a lot of demand on SQL which is the hot-spot. Favour designs that place demands on a scaleable, stateless middle tier.
The tooling is clunky and unreliable.
You're at the mercy of Microsoft's roadmap for SSIS.
Consider writing to tables/services that support analysis, reporting and views as soon as the data comes into the application; see Event Sourcing and other application architecture patterns.
Never use Excel as a data source; train employees.
Code is king.

Ultimately, I see SSIS as a relic of Enterprise IT. I like to ask, "Would Google use SSIS?" How else can the problem be solved? Think outside the box.
Answer: I guess it depends on what you are doing. SSIS is very powerful, just like old DTS. If you are loading lots of items and expect to have constant change, I would go SSIS all the way. If you are looking to load only a few items and it's for lots of customers, I would put it in code. I prefer SSIS for in house ETL processes, but I use .Net at client shops when I need to load data from a legacy system into a SQL database.  Now as I stated before if you have a lot of transformations and lots of different data silos to load, I think you would be crazy to do this in .Net  and I would go SSIS. If you have only a few items to load and it's for a single application and may be installed as part of an application at various clients, I would go .Net  all the way. Just my 2 cents.
Answer: I have a lot of experience with SSIS from small projects to large, complex ETL. Without going into the details, this is my guidance for you:

If you are a DBA and you are not familiar with .NET, or if you are a developer quite familiar with SSIS, then you can use SSIS for small, simple, fairly straightforward extract, transform, load  (ETL) tasks.
SSIS is very quirky and there are many pitfalls, gotchas, and what might be considered outright bugs. It is extremely powerful if you are intimately familiar.
C# now has TPL Dataflow. Simple performance tests put it ahead of SSIS. (eg http://mymemoryleaks.blogspot.cz/2013/10/ssis-vs-tpldataflow.html)
If you want to do anything beyond trivial, and if you can use .NET skills, use .NET instead of SSIS.
Comment: Sir i want to copy database from data sources like oracle or mysql or excel to my sql server instance through code.i am having a website where i would like to do this.so can you please guide me whether i should use ssis or not or something else for this task?
Answer: SSIS has many built in ways of doing transformations from different data sources and you can string them together in a way that makes it very customizeable.  They have built in optimizations that make them fast.
You can also use .NET to make your own custom transformations to take advantage of the speed and repeatability of an SSIS job.
Answer: I think main advantage is defining the entire programming construct visually. Any one look at the SSIS package is it pretty much self explainer.  The tight integration with the SSIS with SQL allows you to be part of SQL for back up scheduling and huge plus.
As every one explained if you are doing the lot of data manipulation it is good tool. It is free if you have SQL you all set to go and very easy to learn with VS 2008 BIDS
Answer: Bit late to answer this question but I hope it worth,
SSIS is often misunderstood when compared to programming language. SSIS is a framework whereas C# is a language on .NET Framework. I have extensive experience in handling & developing large data warehousing solution using (MSBI suite) and also had developed large websites (ASP.NET) - so I can't be biased.
SSIS if not used properly can decrease performance by par. SSIS packages have three kind of transformation:

Blocking transformation - which can only pass the data when above transformation is completed fetching all the rows and completed required calculation on it.
Semi-Blocking transformation - Which can pass partial data
Non-Blocking - which process the row as soon as it is ready

SSIS works exceptionally good with non blocking transformation with proper setting on control flow and data flow. I have used it on larger (over 2 TB of data warehouse) and I can guarantee that it was the fastest load experience. You can check Microsoft blog about We Loaded 1TB in 30 Minutes with SSIS, and So Can You
I agree that SSIS degraded performance when dealing with blocking transformation and they should be carried by T-SQL whenever required.
Coming to C#, I accept that SSIS uses .NET framework and data provider to accomplish task. But C#, as a language is bit more logical and must be treated to deal with business logic. For example, If we have to run exe with different parameter based on condition, you can write a package which will consider parameters and then logically decide what parameter needs to be passed to run an exe file. It would be lengthy process to do that in SSIS while I can do that easily in C# because logical thing can be easily done in language instead of a framework.
Now the point here is what is more convenient approach to solve your problem statement. SSIS is a sure winner loading large amount of records loading data from source to destination while C# is perfect for writing logic. Even if you like C#, I won't recommend you to choose for doing ETL (Extract Transform Load) operation on large data warehouse systems.
Answer: SSIS is generally used for ETL (Extract Transform Load).  Specific use cases are the pre-processing of SSAS (SQL Server Analysis Services) cubes; and enhanced extraction using Data Change Capture.
It can do typical automation, including FTP, and email. There is the programming aspect using script-tasks (C# or Visual Basic), so SSIS has functionality beyond it's included controls...
Packages can be programmed to use conditional control-flow path.  For example, do a certain task Monday thru Friday, and a different task Saturday & Sundays.  Or refuse to perform ETL if certain conditions are not met.
SSIS packages can call other SSIS packages.  That keeps the code modular, allowing re-use.
It can work with various Data Sources, and perform simple transformation using the Derived Column control.  This is versus doing transformation on the source server (which could be Oracle or Hadoop for example- something you don't have control of with your local SQL Server).
Answer: As the name suggests, SSIS is an integration system. It can be very difficult in .net to handle connectors to disparate data sources such as excel, teradata, oracle etc and also to live up to the responsibility to gracefully close those connections, garbage collection, handling memory issues.
So, SSIS is out of the box product perfect for scenarios where data not only needs to be pulled from, say, two different sources, but then a series lookups, transformations, merges, derivations and calculations need to be performed before writing it to a target location(be it sql server, a flat file or another db system).
SSIS also has checkpoints where, if the package fails due to any reason, it will pick up from where it left off (it needs to be configured as this is not default behavior).
In addition, SSIS will save you a lot of time because its tasks are reusable and its deployment process is fairly easy to implement and schedule, supported by great event handling.
Answer: Basically SSIS has many advantages like splitting data transfer from point A to point B in smaller blocks and debug them in individually, able to access SQL Server Tables easily, work on XML data, API calls using c# scripts and saving data on DB, Read DB data and FTP on remote server and many more.

Apart from bunch of already existing BI blocks, you can also create your own customized tasks with its own parameters and outputs.

Hope I was able to add some points to the already existing answers.
Answer: Day-to-Day Tasks , which are used by a SSIS Deveoper and are
   relatively easy as compared to .Net can include :
Data Comparison between the tables.
Conditional Splitting,data blocking the data on the basis of some
   logic.
Data Conversion,look up , merge , unionall  , relatively easy to use.
File Handling(Modifying , validations).
Error Handing  , Email Alerts.
Containers , FOR/FOReach loops are easy to use.
Posting data on web services is easy using the WebService task.
Checkpointing,Re-runablity of the data loads is easy to handle.
Debugging is easy in ssis - can be done on conatiner lever , package
   level.
Scripting can also be done , if the task is not available. Also , you can customize your own tasks
Answer: Whatever folks say in previous answers are correct but I think that the most important aspect of using SSIS instead of coding is to have easy maintenance process and also a reusable product.
Answer: SSIS is great for BI applications, you can manipulate the data on Stage Table and than make avaiable on DataWarehouse tables to be used for BI.
I can connect on SAP, Oracle to get employee information and make avaiable on PowerBI, QlikView, etc...
Its a nice tool if you know where and why use it. Use ir because its cool you will have troubles.


How to join two curves points of same index with edges using geometry nodes

Question: I want to join points with same indices on two curves with lines to get result as shown with GPencil on screenshot, but at best I figured out how to get this mess
Answer: To do this, you would actually only need to capture the index of the points with Capture Attribute, so that you can use this as a reference for Sample Index.

You can also capture this value in the instances after instantiation, but in some form you need a single numerical value per instantiated curve, since you want to access the points of another object.

And here's another solution that leads to the same goal, but is structurally quite different.

Instead of instantiating lines at the curve points, I simply duplicate a line and move its points either to the points of one circle, or to those of the other.
(Blender 3.4+)
Answer: You need to capture points index before instancing and use it for Sample index, because instanced curve lines will have twice as points in total so indices won't match
Answer: To produce such geometry, consider starting with a cone with one loopcut and middle tip vertex removed:

It even outputs a UV Map, but to control the inner radius you would need to select it and then scale like so:

Finally to just connect arbitrary vertices:

And of course you can use "Delete Geometry" node in "face" and "only faces" modes to delete all faces:

Well OK, still not the same, because of the rings, in such case you can easily spawn edges by extruding some verts:


Hiding a Task List

Question: I would like my users to be able to click a link straight to a new task form, then submit, but never see the actual task list. I want to be the only one that can ever view the task list and especially edit.
Answer: Being able to submit also means ability to change/update = Contributor (at least). So "hiding" in your case would probably mean you overriding a view with the UX your wish, e.g. via JSLink or better Client-Side rendering on a Custom task list and handle updates behind the scenes. That would of course, eliminate the need for people to use the standard UI, but it won't really, "hide" the list from knowledgeable people.
Now a 2nd alternative would be to rely on a Full farm solution and use Elevated privileges (https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx) to go around the permissions needs in your custom web part. The issue would be, of course, that you would be loosing the "Modified By", etc. as you would be executing your code with Site Collection administrator permissions, not to mention that you'd have to deploy binary code (e.g. WSP solution package) on your farm.
Comment: Will try, Thanks! I'll let you know which I end up using!

Hiding a Task List


AMD CPU clones of Intel chips

Question: When did AMD start making clones of Intel chips? What was the first chip they cloned?
Comment: http://en.wikipedia.org/wiki/List_of_AMD_microprocessors#x86_architecture_processors
Answer: From the wikipedia article:

In February 1982, AMD signed a
  contract with Intel, becoming a
  licensed second-source manufacturer of
  8086 and 8088 processors. IBM wanted
  to use the Intel 8088 in its IBM PC,
  but IBM's policy at the time was to
  require at least two sources for its
  chips. AMD later produced the Am286
  under the same arrangement, but Intel
  canceled the agreement in 1986 and
  refused to convey technical details of
  the i386 part. AMD challenged Intel's
  decision to cancel the agreement and
  won in arbitration, but Intel disputed
  this decision. A long legal dispute
  followed, ending in 1994 when the
  Supreme Court of California sided with
  AMD. Subsequent legal disputes
  centered on whether AMD had legal
  rights to use derivatives of Intel's
  microcode. In the face of uncertainty,
  AMD was forced to develop clean room
  designed versions of Intel code.

http://en.wikipedia.org/wiki/Advanced_Micro_Devices
The first computer my family owned, purchased in 1992, contained an AMD 386 processor.
Comment: So is the first chip they came out with the 386?
Comment: I believe the article states they first built the 8086 and 8088 due to a requirement of IBM that they source components from two vendors. Later, they built the 286, and due to legal problems with Intel, they had to reverse engineer the 386 in order to make it.
Answer: Though not an answer, a couple minor things people may find interesting.
Intel came out with the 486, called it the i486 (for Intel obviously). They tried to trademark it, the judge threw it out. Just 26 companies could trademark the whole language (same reasoning when Zilog tried to trademark Z80). They learned they needed a name, and came out with Pentium(TM).
The licensing agreement actually helped Intel once 64 bit extensions came out.  They put their bets on Itanium. AMD came out with AMD64 extensions and cleaned up in the market. Eventually Intel saw the handwriting on the wall and copied the extensions as EM64T. They could because of the original licensing agreement.
The most advanced Pentium class processor design probably was Cyrix 5x86. It bridged the gap by dividing CISC instructions into microops that were more RISC like and easier to process.  The new processors now all do this, and the newest chips not only decode to microops, but they cache the microops and not the x86 instructions anymore.
Comment: I just did some research on the subject.  My memory of the time was correct.  The Cyrix 5x86 fits the Socket 3, which makes it a 486-compatible.  The Cyrix 6x86 fits the Socket 5, which was the socket for the Pentium.  Intel never released a chip called 686, for the trademark reasons you indicated in your answer.  BTW, AMD did something similar.  The fastest 486 chip ever made was the AMD 5x86-P75, which was a 486 running at 133MHz.  Back in the day, I ran one with a fancy high-end cooler at 200MHz (50MHz FSB x4).
Comment: I might still have the chips in my collection somewhere.  I should see if I can take some pictures.
Comment: I'm pretty sure that wasn't the 5x86, but rather the 6x86.
Comment: @TrippKinetics it was the Cyrix 5x86. The intel that did that was indeed the 686 line.

AMD CPU clones of Intel chips


Dents in aluminum

Question: I am looking at a good alloy road bike, cannondale caad12.
It is a good deal but there are some dents all the down the seatstays, not major but not nothing.
Is it safe?
Does it affect the bike?
Should I still consider buying it??
Thanks
Charlie
Comment: without photos, cannot even guess what your measure of "not nothing" is. Generally if a deal is too god be be true, it is.
Comment: Keep in mind that such abuse likely reflects upon the condition of the rest of the bike as well.
Comment: Without pictures it's hard to do anything with a question like this.
Comment: Is this the same bike with the loose cassette in your other question?  Sound like some PO has not cared for it.
Answer: Aluminium doesn't like dents.  Steel bikes can cope with enormous dings, but on an aluminum frame the same dent would weaken the metal, and undenting it makes the weakness worse.
It may be worth acquiring as a parts donor, if the groupset/stem/bars/wheels are in reusable condition.
Ultimately it is your decision.
Comment: Being that the dents are on the seatstays, where there is far less material implying the dent involves more of the surface area of the structure, makes it a deal breaker for me.  The fact that there are numerous dents would make the situation even more potentially ominous. There is no economically--nor practical,  in my mind--feasible repair either.  I would keep your money and move on.

Dents in aluminum


Websphere single sign on from PHP site?

Question: I need to provide SSO for a Webpshere portal. The authentication process needs to be handled by a PHP site (which itself should authenticate a user against an Active Directory via LDAP - think I have this bit covered though). I have been told I need to create an LTPA cookie. How would I go about doing this? What information need to be set? Will Websphere be able to read this cookie and grant access to the user?
Answer: Websphere comes with out-of-box support of proapgation of authentication using LTPA tokens (in web apps, these are usually stored in cookies named LTPAToken and LTPAToken2).
In general, for this to work both the Websphere and your PHP app have to share the same LTPA keys (based on which the LTPA tokens are generated). In websphere administration, a little configuration is needed to  enable LTPA and synchronize the keys.
However, I'm completely ignorant about PHP capabilities for this; don't know if there are any LTPA PHP libraries or a builtin Apache/PHP support for LTPA whatsoever. Googling IBM's infocenter (publib.boulder.ibm.com) may help.
Answer: This ST Awareness on a PHP page article on IBM developerWorks may help you.
There is also an example of adding awareness to an ASP page in chapter 12 of the Redbook Building Sametime Enabled Applications. It details a way of doing it if you don't have LTPA in your environment.
Answer: WAS can create a LTPA cookie with a custom TAI, please read the link below for further details:
Developing a custom trust association interceptor

Websphere single sign on from PHP site?


English translation of etz chayim (arizal)

Question: Does anyone know of a good English translation of Etz Chayim by the Arizal?
Comment: Do you have any reason to suspect this exists?
Comment: I found one book from Amazon.com on the palace of Adam kadmon, link below. There is also the translation of shaar hagilgulim no chabads website. But the full etz chaim i havent seen anywhere.http://www.amazon.com/Tree-Life-Chayyim-Introduction-Kabbalah/dp/0979597102/ref=sr_1_4?ie=UTF8&qid=1424629189&sr=8-4&keywords=Etz+chaim
Answer: You can purchase an English version of the sefer here. It also includes some explanation of difficult passages and a clear introduction introducing the basics of kabbalah.
I am not certain if it contains everything that is in the original Sefer Etz Chayim by Chayim Vital, but it is a good start nonetheless. I have read the book, but I have never read the original ספר עץ חיים so I cannot vouch for its accuracy in that regard.
Comment: Did you understand anything? Ever since, have you learn the sefer Etz Chaim?
Comment: @FalseMessiah I have since learned some of Sefer Eitz Chayim but I don't profess to be an expert :)
Answer: An English translations page for the Arizal's works has been started at Wikisource.  As of Mar. 2021 there is just a little, but if everyone learning contributed a bit at a time (or if someone contributed a lot at once) ...

https://en.wikisource.org/wiki/Author:Isaac_Luria#Perek_3

Sefaria has Chapter names in English, and some sections have summaries or notes as of Mar. 2021:

https://www.sefaria.org/Sefer_Etz_Chaim.1.1?lang=bi
https://www.sefaria.org/Pri_Etz_Chaim?lang=bi


What is flops seen percentage?

Question: In a poker application I have to display flops seen percentage for each table. I understand flop is when 3 community cards are on the table. But what is 'flops seen'? I tried googling but could not understand.
Answer: It is simply when a player does not fold before the flop. Folds pre-flop + flops seen = 100%. If a player is dealt 100 hands, and stays for the flop 32 of those hands, he saw 32% of the flops. I am assuming your talking about Holdem Omaha and other flop games. I would take it a little further and also do the same with the turn and the river.
Comment: @SubhenduMahanta, it seems a perfectly valid metric.  It's just the fraction of deals where the flop is shown vs total deals (which would include some where a pot is awarded pre-flop).  I just don't know what the point is of table stats like that since it will vary based on the number of seats.  More flops will be seen with a full table than when a small number are playing.
Comment: Thanks for answering. So it is a player specific thing. Not for a table I guess. So if somebody asks me to find out 'flops seen %age' for a particular table, that question itself is wrong, right?
Comment: @BowlOfRed Agreed. The flops seen % in a recent amount of time might be valuable (say, in the last 10-30 minutes) to indicate how loose the table is right now, compared to other tables.
Comment: @SubhenduMahanta I think that is a cool stat, gives you an ideal of how loose a player is.
Comment: @SubhenduMahanta you can definitely calculate it for a table just as well, but that'd be a different measurement

What is flops seen percentage?


Do x-rays get emitted upon initial acceleration in this setup?

Question: Based on the diagram and the paragraph before it, the x-rays are caused by decelerating the moving electrons and thus x-rays are emitted where the diagram clearly shows it (the red arrows pointing downwards labeled "x-rays"). But does this mean that x-rays are also emitted near the cathode where the electrons are initially accelerated?
Answer:
As with any vacuum tube, there is a cathode, which emits electrons into the vacuum and an anode to collect the electrons, thus establishing a flow of electrical current, known as the beam, through the tube. A high voltage power source, for example 30 to 150 kilovolts (kV), is connected across cathode and anode to accelerate the electrons. The X-ray spectrum depends on the anode material and the accelerating voltage

....

Electrons from the cathode collide with the anode material, usually tungsten, molybdenum or copper, and accelerate other electrons, ions and nuclei within the anode material. About 1% of the energy generated is emitted/radiated, usually perpendicular to the path of the electron beam, as X-rays. The rest of the energy is released as heat.

(Italics mine.)
Radiation needs  acceleration or deceleration .
You ask:

But does this mean that x-rays are also emitted near the cathode where the electrons are initially accelerated?

The beam leaving the cathode and undergoing continuous acceleration to the anode, will radiate as it is accelerated, but to a much smaller amount of energy loss.( See this link,the discussion for linear accelerators.) The amount is small and not in the x-ray electromagnetic spectrum, rather the infrared, (as the beam does not shine contiunuously) for a cathode ray tube.  So no xrays   either beginning at the cathode or on the electron beam line.
The reason x-rays are produced at the anode is that for a percentage of the hits (1% quoted above), the sudden deceleration on hitting the anode takes up (for that percentage) most of  the energy of the beam electron, and thus radiates in the keV X-ray region, (due to the keV voltage drop between cathode and anode) when interacting with the charges in the anode.
This is a plot of the spectrum of photons generated given and initial KV value:

As a sidenote, the small radiation effects in linear accelerations in contrast to circular ones makes linear colliders attractive because there is little energy loss in the beams, in contrast to the synchrotron radiation of circular ones.
Answer: The X-rays are emitted as a form of energy release. In decelerating, the electrons "lose" kinetic energy, and we see this energy released in the form of X-rays. To accelerate the electrons would require an input of energy. We do not expect X-rays to be released in this case (an output of energy).
Comment: Additionally, the timescales for the accelerations are probably very different, with the collision being more sudden. So if there was some bremsstrahlung in the first part, it might not be at x ray energy
Comment: The radiation is mostly caused when the electrons are deflected by the fields of the target nuclei. These fields inside the atom are much stronger than the accelerating field.
Comment: please note that both acceleration and deceleration give rise to em radiation . (synchrotron radiation is  what limits the possible dimensions of circular  e+e+ colliders) . It is just that the accelerating field in a cathode ray tube is too small to give even visible radiation, let alone x-ray. the keV energy of Xrays needs all/(most of) the energy of the accelerated electrons by kV fields.
Answer: The acceleration of the electrons whilst travelling between cathode and anode is very much less than the (negative) acceleration of the electrons when they hit the target atoms.
The higher the acceleration the more energetic are the emitted photons.
So the photons emitted from the interaction of the electrons with the target are much more energetic (in the X-ray region) than the photons emitted when the electrons are traversing the gap between the cathode and the anode.
The text hints at this when it states "X-rays are produced when the electrons are suddenly stopped in the anode" after mentioning the acceleration of the electrons between cathode and anode.


Do colleges have students that writing coach for free for practice?

Question: I have already worked with a university program to get a student life coach to work with me for free for practice, with good results.  I am wondering if there are similar opportunities to get writing coaching for free.  I have thought of contact MFA programs at colleges, but that is sort of an intensive process, so I wanted to ask this forum first.
Comment: Are you a college student looking to get help with writing homework?  If so, your college will have resources.  Or are you a member of the public asking for free writing help?  That's a bit harder.  You might want to ask the local junior colleges about writing classes (if you're in the US; elsewhere they may have different names, but they're for 2-year degrees or just extra training, and they're generally inexpensive).  They and other schools will have classes for the public that don't require you to be a regular student.
Comment: I certainly hope not! Writers get paid little enough as it is.
Comment: At the University of Saskatchewan, there was a writing help centre. That maybe what you are looking for??? Not sure --- also what country are you in that may help you get more targeted answers.
Answer: This strongly depends on the college you attend. My university had a free Writing Center with staff that you could make an appointment with. There were also student and school-sponsored tutoring resources that offered help with writing.
To find these, you can check your course webpages and ask your classmates. Professors will sometimes direct students to relevant resources in the class syllabus. If you can, take a writing elective.
The resources you look for also depend on what you want to improve, be it technical writing, communicate professionally via email, or write journal-worthy poetry. If you have declared your major or program, check with your adviser for field-specific resources. If you're undeclared, try checking with your school's career or tutoring centers, if they exist. A school or local library would also be a good place to ask for resources.
There are also plenty of online resources that introduce you to various citation systems and the writing process, the first coming to mind is the Purdue Owl
Comment: Hi Verona, welcome to writing.se! Take the [tour] and visit the [help] for more information. This is a great first answer! Thanks for participating and happy writing!


What is benefit of ArcPy function GetParameterAsText?

Question: I know that the purpose of the ArcPy GetParameterAsText function is to return parameters as text, but what is the benefit of doing that?
Comment: How do you find the list of parameters? (from arcpy.GetParameterAsText(0))
I've inherited scripts from a predecessor that uses this a lot, and I need to be able to edit these parameters to provide new/different options in the dropdown that the user sees. I'm new to python, arcpy. Can read most of it and understand what's being asked, but I can not figure out where the parameters come from, to be able to update them as needed.
Answer: The summary on the Esri GetParameterAsText documentation states:

Gets the specified parameter as a text string by its index position
  from the list of parameters.

Functionally this allows you to pass arguments to a Python script tool. Script tools allow you to provide custom functionality in a GUI to those who do not want to use Python.
The documentation also provides an example of the usage:
import os
import arcpy

# Set the input workspace, get the feature class name to copy
#  and the output location.
arcpy.env.workspace = arcpy.GetParameterAsText(0)
in_featureclass = arcpy.GetParameterAsText(1)
out_workspace = arcpy.GetParameterAsText(2)

out_featureclass = os.path.join(out_workspace,
                                os.path.basename(in_featureclass))

# Copy feature class to output location
arcpy.CopyFeatures_management(in_featureclass, out_featureclass)

Comment: Yes, the script tool dialogue box would have those three parameters which the user can input in the script tool. `os.path.join()` is combining the workspace path (e.g. `/path/to/your/geodatabase.gdb`) and the basename (e.g. `some_name`) to produce `/path/to/your/geodatabase.gdb/some_name`
Comment: so in this example the tool dialog box would have those three parameters that are prompting the user to input? Also, is the os.path.join trying to join different workspaces?
Answer: In the ArcGIS Pro Help for arcpy.GetParameterAsText() its Summary is that it:

Gets the specified parameter as a text string by its index position
  from the list of parameters.

The way I think of it is that it is the means used to communicate, as text rather than objects, the choices made by an end user from the tool dialog that fronts a Python Script Tool of ArcPy.
The first parameter that the tool's author configures on its tool dialog is referenced from the script by using an index of 0 i.e. arcpy.GetParameterAsText(0).
There is an alternative way to reference the first parameter on the tool dialog, and that is as sys.argv[1] but that has limitations in the number of characters that it can accept whereas arcpy.GetParameterAsText() has no character limit.  The two alternatives are documented in Accessing parameters in a script tool.


Xbox one s controller button mapping is incorrect when connecting to android

Question: The inputs for the controller do not output the correct buttons. For example. The x button and rb button don't work and my triggers control the analog stick. How can I change this? I connect via Bluetooth though that is not the problem.
Answer: OK finally figured it out. Make sure you have windows 10 and have the anniversary update installed, if you don't a quick Google should help. Download the Xbox accessories app, plug in your controller, an update should appear. Download and your good to go. The update will not appear if the anniversary update isn't installed. You don't need to change the mapping at all, just plug in the controller and update the firmware of the controller itself, this also works on an xbox one.
Comment: Wait, so the mapping needs to be registered on a windows PC before it can be transferred to a phone?  This normally doesn't work for any other device.
Comment: I downloaded the Windows 10 Anniversary Update, as well as the Xbox One S controller update that appeared, but the buttons are still mapped incorrectly when using the controller with my Samsung Galaxy S6.


pfSense 2.1 OpenVPN client not using tunnelled interface

Question: I'm having some trouble getting OpenVPN working on my pfSense box. The issue is quite strange to me.
When I have the OpenVPN turned on, only my router is able to connect to the Internet. From the router I can use ping, links, etc., and connections work exactly as expected - through the VPN, with the IP address assigned by my VPN provider (Proxy.sh, incidentally).
However, none of the clients on the local network can connect to the Internet. I get timeouts when using ping or a web browser. I can ping my router, and the IP address of the gateway.
When I switch the default gateway from the VPN to my ISP's gateway, all works exactly as expected.
Here the routing table (netstat -r) when in VPN mode, and a key for it:

IPv4
Destination     Gateway     Flags   Refs    Use  Mtu     Netif   Expire
0.0.0.0/1       10.XX.X.53  UGS     0       122  1500    ovpnc1  =>
default         10.XX.X.53  UGS     0       235  1500    ovpnc1
18.104.22.168         10.XX.X.53  UGHS    0       82   1500    ovpnc1
10.XX.X.1/32    10.11.0.53  UGS     0       0    1500    ovpnc1
10.XX.X.53      link#12     UH      0       0    1500    ovpnc1
10.XX.X.54      link#12     UHS     0       0    16384   lo0
ZZ.XX.XXX.0/20  link#1      U       0       83   1500    re0
ZZ.XX.XXX.XXX   link#1      UHS     0       0    16384   lo0
127.0.0.1       link#9      UH      0       12   16384   lo0
126.96.36.199/1     10.11.0.53  UGS     0       123  1500    ovpnc1
192.168.1.0/24  link#11     U       0       1434 1500    ue0
192.168.1.1     link#11     UHS     0       0    16384   lo0
Y.Y.Y.Y/32      ZZ.XX.XXX.1 UGS     0       249  1500    re0

IP addresses

10.XX.X.53/54 - My DHCP-assigned IP address/pair from the VPN provider
ZZ.XX.XXX.XXX - My external IP assigned by my ISP
Y.Y.Y.Y - The external IP assigned by the VPN provider

Interfaces

ovpnc1 - My VPN client interface
re0 - My LAN interface
ue0 - My WAN interface

This looks essentially what I would expect it to be. The default route is through the VPN provider. The VPN address is routed through the ISP-assigned IP address. I am not sure what would be wrong here.
So figuring this was a firewall issue, I basically tried enabling all in/out traffic. This did not seem to remedy the problem.
Also figuring it could possibly be some client networking issue, I restarted the clients on the LAN. This did not help.
I also ran route flush and reset the routes manually.
So I am a bit stumped, and would be very grateful for any thoughts on what the problem might be.
Answer: Normally, you must provide an instruction to forward IPv4 traffic from the LAN to the new interface which the VPN provides, be it tun0 or tap0.
I am way too rusty with pf to try and suggest how to do it. With iptables you would use this command:
 iptables --table nat --append POSTROUTING --out-interface tap0/tun0 -j MASQUERADE

I hope this will provide a push in the right direction, even though this is not a solution.
Comment: Thanks for the comment. These are my thoughts exactly, but alas trying manual NAT rules has not yet alleviated the problem. I appreciate the suggestion though.
Answer: To resolve this I had to go to:
pfSense -> Firewall -> NAT -> Outbound -> Manual Outbound NAT rule generation
          (AON - Advanced Outbound NAT)
From there I had to move all the OPT1 mappings to the top (i.e. above the WAN mappings).
Note as well that:

in the firewall rules I had to set an rule for all incoming traffic on the LAN subnet to have it use the Proxy-Gateway. Looks like this in the rule list of pfSense:

IPv4 TCP LAN net * * 80 (HTTP) ProxySHGW none "LAN Subnet to Proxy.sh gateway"

I kept the default gateway as the WAN, but had to add the ProxySHGW gateway used by the above rule.

I hope that helps someone else along the way.


At what age do babies begin to synthesize their own antibodies?

Question: When babies are first born, they receive their antibodies from their mother (I assume because they do not yet have the capacity to synthesize their own).  So my question is, at what age do babies begin synthesizing their own antibodies?
Answer:
In the graph above the darker blue line refers to the antibodies the baby receives from the mother in utero, as you mentioned in your question.
As you can see, the red line indicates that babies begin to produce low levels of their own antibodies between 3 and 6 months before birth.  However, these are IgM antibodies, immature 'rough draft' versions.  These have much lower affinity for antigens then their mature IgG counterparts which are the classically thought of antibody.
Levels of an infant's own IgG start to rise after birth, however don't reach a reasonable level until after the child is roughly 1 year old.  Maternal antibodies start to tail off at around 3 months leaving a period highlighted in blue on the graph where infants are particularly prone to getting infections.
Comment: I don't think that is correct to say that IgMs have lower affinity. When a cell shifts from making an IgM to an IgG via class switching, the variable domains remain the same, there is no change in affinity - affinity maturation has already occurred during proliferation of the IgM-producing cell line. In fact IgM will bind well to weakly cross-reacting antigens because of its high avidity (due to the pentameric structure of the IgM molecule).
Comment: If the fetus gets infected, can it produce antibodies intrauterine to fight the infection ? If yes; is it effective ? Can it be used to test if the infection has traveled from mom to fetus ?
Comment: @AlanBoyd this is perhaps a shortcoming in my notes, I was under the impression that affinity maturation has two 'sub-processes', class switch and then somatic hypermutation however I could have easily got the order reversed.
Comment: B cells undergo isotype switching AS WELL AS affinity maturation, under the direction of T cells. So, when a B cell shifts from making IgM to IgG, it is simultaneously altering its antigen binding site in the variable regions to increase the affinity of the antibody being made. Ref: Janeway's Immunobiology


How is recycling of plastics beneficial to the climate?

Question: How is recycling of plastics beneficial to the climate? Using PET flakes, for example, reduces your indirect demand for oil extraction, it's good. But if you break them down to monomers during chemical recycling, it's more or less the same thing as synthesizing monomers from oil or gas, isn't it? Is reducing demand for oil the only reason production with recycled material has a lower carbon footprint than virgin production? Are there complex analyses that look into when (at what stages) GHGs are emitted and what technological differences between recycled and virgin plastics lead to different climate impacts?
Answer: Recycling plastic uses less energy than producing new plastic
Note: this answer borrows heavily from my answer to an earlier question about shipping plastic.
According to Wikipedia, polyethylene (PE) is the most common type of plastic. There are three main categories of polyethylene (also from Wikipedia):

PET (polyethylene terephthalate), used in polyester fibers, drink bottles, tote bags, furniture, etc.
HDPE (High-density polyethylene), used in bottles, playground equipment, plastic lumber, etc.
PP (polypropylene), used for auto parts, industrial fibers, food containers, and dishes.

In 2019 the American Chemistry Council (ACC), the Association of Postconsumer Plastic Recyclers (APR), the National Association for PET Container Resources (NAPCOR), and the PET Resin Association (PETRA) funded a third-party life cycle analysis of PET, HDPE, and PP recycling. The study is available here (pdf): "Life Cycle Impacts for Postconsumer Recycled Resins: PET, HDPE, and PP".
The results show significant energy savings from using recycled plastics:

The analysis includes all aspects of the recycling process, including collection, transportation, cleaning, and processing. "Cut-off" assigns 100% of the impacts of the virgin plastic to the first use, while the "open loop" analysis distributes the impact of the virgin plastic across all subsequent uses of the product (i.e. even a product made from 100% recycled plastic required virgin plastic at some point in it's lifecycle).
For the sustainability-minded, the open loop analysis is most relevant -- in this case, recycling PE results in an energy savings of about 30% compared to virgin PE.
Comment: Good, but it doesn't attribute GHGs to specific stages of virgin production
Comment: @SergeyZolotarev no, this report is looking only at energy use, so GHG emissions would depend on the grid mix where production or recycling is happening. This is only a piece of the puzzle -- hopefully other answers will provide other pieces.
Comment: Polypropylene is not a category of polyethylene


Not an answer flag declined for a comment

Question: This answer doesn't really answer the question at all. It is really just a comment about the usefulness of the in operator. I flagged it as NAA but my flag was declined because there was no evidence to support it. Am I misunderstanding the NAA flag?
Comment: NAA is generally for things that are much more blatantly not answers, such as someone trying to ask another question in an answer, or the OP trying to add something else to their question without knowing how to edit it.
Comment: @Servy: agreed. I've looked at it more closely, and as an answer it is a puzzling one, but I don't see what it would be comment to if it is not an answer. I've left some comments on it explaining why I downvoted it.
Comment: How are the reviewers or the moderators supposed to know that? It looks like an attempt at answering. Raise a custom flag explaining that you feel this is not an answer to the question, but in stead a comment response. Bonus points if you can link to the content it is replying to.
Comment: @MartijnPieters Would a mod flag be okay?  I just ask as this is something the community can vote on and delete.
Comment: @MartijnPieters That post wouldn't make any sense as a comment; it's not commenting on anything else there.
Answer: The answer isn't Not An Answer.  It's a really bad answer (partially stemming from the fact that the question is a really bad question), but it's an answer.  Note that "doesn't contain much information" doesn't make a post not an answer.  Short answers, bad answers, poorly explain answers, unclear answers, etc. are still answers, they're not comments.  Comments aren't where we put poorly explained answers, it's where people post information about how the post they're commenting on can be improved.  If you don't like the answer, then downvote it.  That's the appropriate tool for indicating that you don't think an answer is useful.
Comment: @fordprefect "If the mod doesn't know the language well enough to make a determination why interact with the flag"  Mods aren't there to make technical judgements about the quality of a post.  The mechanism for providing technical judgements of the quality of a post are votes.  Mods are there to address issues that *are unrelated to the technical merits of the post*.  In the case of NAA, this means the mods are there to judge if someone isn't even trying to answer the question, not whether or not they succeeded in providing a quality answer.
Comment: @fordprefect: that's what makes it an unhelpful answer. It is *still an attempt at answering*, they just did a really bad job at it.
Comment: @fordprefect The fact that it fails to give you enough information to properly answer the question doesn't make it not an attempt to answer the question.  It makes it a *failed* attempt at answering the question (in your opinion).  Not An Answer is for posts that aren't even trying to answer, not for posts that are answering the question but *fail to successfully answer it*.
Comment: @fordprefect Like I said in my answer, comments aren't where we put bad answers that fail to provide a useful answer.  An answer isn't a comment just because you don't think it's useful.  If you think it's not useful, downvote it.  That's what downvotes are for.  Flagging a post because you think it's not useful is just going to get you declined flags, and possibly a flag ban if you do it enough.
Comment: @fordprefect: I'm afraid any other flag would also be rejected. There is a standard reject reason: *flags should not be used to indicate technical inaccuracies, or an altogether wrong answer*.
Comment: I disagree that it is a bad answer. If I come across that answer from google I don't even know what to do with the `in` operator. Do I add it and just hope iterate magic happens? Are there other keywords required? If the mod doesn't know the language well enough to make a determination why interact with the flag
Comment: I would argue that this still isn't attempting to answer the question it's just a semi useful comment
Comment: Either way thanks for explaining. I will change how I flag
Comment: @MartijnPieters Servy thanks. I will update how I manage this


Adjoint functors, inclusion functor, reflective subcategory

Question: Suppose that a category $A$ is reflective in a category $B$ and that the inclusion functor $K:A\to B$ has a left adjoint $F:B\to A.$ Now what does it technically mean that this bijection of sets $$A(Rb,a)\cong B(b,a)$$ is natural in $a$ and $b$? I.e. what squares are supposed to commute? Here $R=KF:B\to A.$ See the MacLanes' CWM page 91 here.
I'm also confused with the apperance of $R$ in that natural bijection. I would rather expect $$A(Fb,a)=B(b,Ka).$$
Comment: @MaliceVidrine I cannot figure out what should commute. I have always difficulties with this kind of exercises.
Comment: Sorry, I misread part of your question (haven't had coffee yet) and I think I understand where you're coming from better. Mac Lane is being careless about notation here in a way that a lot of authors tend to be about reflective subcategories, so that probably doesn't help. I'll try to cook up an answer if no one beats me to it.
Comment: @MaliceVidrine Tell me what did you misread and what is written? I'm awaiting your answer...
Comment: I misread your first question as asking *whether* it was natural in $a,b$, not what it *meant*. The latter question is more understandable, and highlighted some other problems with Mac Lane's presentation.
Comment: @MaliceVidrine MacLane's presentation is the best textbook on general categories up to date, despite its age.Therefore it deserves one's attention to every detail.
Comment: I'm not sure I'd agree with that statement; in any case, it doesn't prevent it from having errors and problems.
Comment: @MaliceVidrine So if you disagree do you have a link to Amazom.com with a better and more modern textbook on categories?
Comment: It's getting off topic, but it's not that I think there's a clear alternative best (I think there are several it could be tied with); I am also far from claiming that Mac Lane is sub-par in any way. This highlights one of the things that I think is a weakness in Mac Lane, but it's hardly limited to Mac Lane.
Answer: The way Mac Lane (and an unfortunate number of authors) write this is unhelpful; consequently, a lot of this answer will be about how to avoid being misled by this notational convention. Note that he states that the isomorphism $$A(Rb,a)\cong B(b,a)$$ is natural in $b\in B$ and in $a\in A$. So this points out one way in which the notation is misleading; in the right hand side, if we're expecting the $a$ place to be natural with respect to morphisms in $A$, then really what we're looking at is $B(b,Ka)$. On objects, this is a distinction that doesn't matter, but when we start looking at the naturality condition, it matters quite a lot.
Similarly, the left hand side shows an object that lives in $B$ (namely $Rb$) in a hom-set $A(-,-)$, so what we're actually looking at here is $A(Fb,a)$. The reason is that an inclusion functor like $K$ is always faithful, so that for any $Rf:Rb\to Rb'$, there is a unique $Ff:Fb\to Fb'$ in $A$ which is carried to it under $K$.
Making these substitutions gives you the form you were expecting. What's happened here is that, since subcategories are usually taken to consist of subclasses of objects and arrows, $Ka$ and $a$ will be the same object, and some authors will consequently denote both with $a$; similarly, they don't always distinguish between $Rb$ and $Fb$ since they will be the same object thought of in two different categories. The reason it's helpful to notationally make these distinctions instead of ignoring them can be illustrated once we answer your other question about naturality.
Looking instead at the nice form $A(Fb,a)\cong B(b,Ka)$, and calling the left-to-right half of the isomorphism $\phi$, naturality in both variables means that for $f:a\to a'$ in $A$, $$B(b,Kf)\circ\phi_{b,a}=\phi_{b,a'}\circ A(Fb,f)$$ and for $g:b'\to b$ in $B$ $$B(g,Ka)\circ\phi_{b,a}=\phi_{b',a}\circ A(Fg,a).$$ And similar equalities hold for $\phi^{-1}$.
Note that if we just denoted the right hand side of the isomorphism $B(b,a)$, then it looks like for any $f:a\to a'$ in $B$ we need $B(b,f)$ to behave nicely in our naturality square. But there may be morphisms in $B$ for which there's no counterpart in $A$, and explicitly showing the inclusion functor avoids the temptation to think that any $B$-morphism between objects from $A$ are part of the naturality condition. Likewise, seeing $A(Rb,a)$ should look wrong since $R$ gives you an object in $B$, but $B(Rb,a)$ is actually not the hom-set you want to look at--there may be morphisms $Rb\to a$ in $B$ (by which we really mean $Rb\to Ka$) that are not morphisms in $A$, but it's only these latter that correspond to morphisms $b\to Ka$ in $B$.


Rosemary plant issue

Question: My rosemary cutting had been growing normally for past few month but since last week, the new grown leaves are not as green as before and I have noticed that the young leaves are turning brown. I would like to know what is happening to my plant? I suspect there might be a fungi infection but it seems like the browned spots only happens to the new leaves. What can I do to deal with this problem?
Comment: Are you intending to transplant into a pot with soil  now it has roots, or were you  wanting to continue keeping it in water? What is the orange  'stick' in the water  in the final  photo?
Comment: The orange stick is just for holding up the cutting because the jar was too tall, and I planned on keeping it grow in water.
Answer: If you want to keep growing the Rosemary in water, you need to use a hydroponic system, which provides nutrition and deters infection, though Rosemary is more prone to botrytis when grown in this way; whilst Rosemary will root in water, it's  usual for it then to be potted up into soil. Information on growing Rosemary hydroponically here https://gardeningtips.in/growing-rosemary-hydroponically-a-full-guide
UPDATE:
I suggest you plant it in new potting soil in a relatively small pot with drainage holes asap. Water in well,allow  to drain down freely, and water ongoing when the surface of the soil feels dry (but not so dry it's shrunken from  the sides of the pot),emptying out any outer tray or pot 30 minutes later. After you've potted it up, cut the stem back by a third to a half (see final sentence), to encourage new growth from the base. Hopefully,this will mean, although the browning leaves may fall (and when they do, remove them from the soil, don't leave them sitting on the top) your cutting will grow on healthily. The signs are hopeful, because there is evidence of new side shoots developing above the browning parts - cut back to just above a part with new side shoots.
As it gets bigger, you will need to move it into a larger pot, once it's formed a good root system in the soil.
Comment: see updated answer
Comment: I see, but is the plant going to die due to this browning problem? And if so can planting it in soil solves the problem? Thanks in advance.
Comment: Great suggestions. Thanks for the replies.

Rosemary plant issue


AWD Towing with Sling Type Truck

Question: I now know AWD towing should be done with a flatbed type truck.  But say you have a sling type truck and towed an AWD with the rear wheels on the grounds. This could maybe cause damage to the front end but the front wheels are free to rotate. If the driver went slow and a short distance would this greatly reduce the risk of drivetrain damage?
Comment: Welcome to Motor Vehicle Maintenance & Repair! What is a short distance?
Answer: The reason you should tow an AWD either all 4 wheels on the ground, or all 4 wheels on a flatbed is because just having two on the ground means the differential is having to carry the, well, difference in rotation speed between the front and rear wheels.
Having the front wheels fixed in position would obviously be bad, but even allowing them to rotate freely will lead to significant speed in your diff, generating heat, and possibly causing failure.
If you were to do this very slowly, and for a very short distance, yes, you'll probably be okay, but I would suggest it isn't worth the risk to find out. The value of your vehicle is significantly more than the cost of a flatbed rental.
Comment: This, all day long *this!* And if a flatbed isn't available for some reason a tow pole is a much more suitable option, or even a rope at a push.
Comment: The reason I ask is my gf's newer generation mazda was towed about a mile in a bad winter storm with icy roads. the front wheels weren't hooked to anything. I understand dollies would have been appropriate, but I think they also just needed to get out of the way. I don't know for sure because I wasn't driving but it doesn't seem like they went more than 20 ish mph. I don't blame them if damage did occur, but still a bummer.

Thoughts? What would be the things I should look for?

AWD Towing with Sling Type Truck


Transition from LSA to non LSA

Question: If you obtain your PPL (Private Pilot License) in an LSA (Light Sport Aircraft), do you have to go for additional training or certification for other SEL (Single Engine Land) aircraft (ie. Cessnas), or how would that work?
Comment: Can you please write out what LSA and SEL mean in full? Also what country are you talking about?
Answer: I'll assume from the terminology that you're asking about FAA rules.
If you have a PPL ASEL, then as far as the FAA is concerned, you are legal to operate any ASEL that does not require any additional endorsement (complex, high performance or tail wheel) or a type rating.
However, in practice, it is highly unlikely you will be able to do so without additional training.  No insurer will cover you without a minimum amount of time in type, and nobody will rent a plane to you either because their insurer will require similar time in type. But how do you get time in type without already having that time in type?
This is solved by getting "transition" training. By the time that is complete and the CFI is satisfied you can safely operate the new type solo (which typically amounts to being able to pass a BFR/IPC, whether or not they do the paperwork making that official), you will probably have the minimum required hours.

Transition from LSA to non LSA


Linear combination of nonnegative variables

Question: We suppose linear combination $a_1x_1+a_2x_2+\cdots+a_nx_n=y$, where $y>0$. If $x_i>0$,  $i=1,2,\ldots n$, then $a_i$, $i=1,2,\ldots n$, have what conditions to satisfy the above equation? Conversely, What can be said about the $a_i$ to satisfy the above equation with assumption $x_i>0$?
Answer: The only thing you can say is:
At least one of $a_i$ must be positive.
Answer: A system of vector basis is linear independent if no linear combination of them equals to zero i.e. let $x_1,x_2,...,x_n$ be a set of $n$ vectors. If for coefficients $a_1,a_2,...,a_n$ we have $$a_1x_1+a_2x_2+...+a_nx_n=0$$then $$a_1=a_2=...=a_n=0$$this means that the set of that vectors spans whole the $n-$dimensional space for which any vector in it could be expressed uniquely as a combination of those vectors, meanwhile $$\forall y\qquad,\qquad \exists \{a_i\}\to y=a_1x_1+a_2x_2+...+a_nx_n\\\text{if }y=b_1x_1+b_2x_2+...+b_nx_n\text{ then }a_i=b_i$$


Newbie to emacs. need help

Question: Are there any good resources that anyone can suggest. I rate myself 3 out of 10 when it comes to using editors like vim
Comment: Welcome to Emacs.SE!  Please do a web search for "emacs tutorial" and you will come across a number of useful resources.  This forum is designed for discrete questions rather than open-ended ones.
Comment: The answer is "yes".  You may want to rephrase it in order to clarify if you want a different answer.
Answer: I write up something like the canonical answer.
If you have Emacs with graphical environment such as X11 or Windows just start Emacs and open the menu item Help → Emacs Tutorial with the help of your pointing device such as mouse or touchpad.
If you only have the command line version of emacs start emacs with the following command line:
emacs -f help-with-tutorial
Then fight your way through the tutorial.
PS: This answer is marked as community wiki. So do not hesitate to improve it in any way.

Newbie to emacs. need help


Sample space and outcome of birthday problem

Question: Suppose, calculating the probability of having at least two peoples same birthday from 25 people. What is the sample space and outcome of the experiment?
As far as I pondered, S = 365^25 and outcome 365C25
Comment: What do you understand sample space (and outcome) to mean? $365^{25}$ is a number - how could a number "be" a sample space? Also, is this some kind of  exercise question - if so, see http://stats.stackexchange.com/tags/self-study/info
Answer: The sample space is the set of all possible outcomes of the experiment, corresponding to the Cartesian product of the set of $365$ possible birth dates (after hedging for pertinent caveats as to the possibility of leap years, seasonality in births, etc) with itself as many times as the number of individuals in the room.
This will produce $365^n$ ordered pairs, or $365^{25}$ $25$-tuples. From Wikipedia:

In mathematics, a Cartesian product is a mathematical operation that
  returns a set (or product set or simply product) from multiple sets [in this case the sample space, $\Omega$].
  That is, for sets A and B, the Cartesian product A × B is the set of
  all ordered pairs (a, b) where a ∈ A and b ∈ B.

From this sample space, the event of getting two people with the same birthday can be assigned a probability. Being that we are dealing with a discrete probability space, outcomes and events can be treated as interchangeable.
The actual calculation is not $\binom {365}{25}$. The denominator will be the number of elements in the sample space, $365^{25}$, and the numerator will be much more straightforward to figure out if instead we calculate the complementary: the probability of having no matches, which can be calculated easily thinking that each person "occupies" a date that no other person can share:
$$\Pr(\text{at least 2 people share birthday})=1- \frac{365\times364\times\cdots\times \overbrace{341}^{365-n+1}}{365^{25}}$$


If the strings of a language can be enumerated in lexicographic order, is it recursive?

Question: If the strings of a language L can be effectively enumerated in lexicographic order then is the statement "L is recursive but not necessarily context free" is true?
Answer: Lexicographic order is not such a good order since its order type is not $\omega$. Instead of explaining formally what that means, let me give an example. Consider the language $(a+b)^*$. If you enumerate the words in lexicographic order, you get
$$
\epsilon, a, aa, aaa, \ldots, ab, \ldots
$$
The first $\ldots$ signify infinitely many terms. So it isn't really clear what it means to enumerate a language in lexicographic order. There could be two interpretations: either the language $L$ doesn't suffer from this problem, or you really mean a slightly different order. Since the precise answer doesn't matter for all that follows, we will just assume that you can effectively enumerate $L$ in some (effective) order whose order type is $\omega$ (i.e., when the problem above doesn't happen).
The proof that $L$ is recursive can be a bit subtle, due to a certain ambiguity: what happens if $L$ is a finite language? There are two reasonable interpretations of effective enumerability in this case: either the enumerator will eventually halt, or it won't, but at some point would stop outputting strings. Fortunately, this ambiguity doesn't affect the proof.
For the proof that $L$ is recursive, we consider two cases. If $L$ is finite, then it is trivially recursive. If $L$ is infinite, then to decide whether $x \in L$ and wait until either $x$ is output, or a string larger than $x$ is output (if $x \notin L$ then this will happen eventually since $L$ is infinite). In the first case $x \in L$, in the second $x \notin L$.
To see that $L$ is not necessarily context-free, you can consider your favorite non-context-free language $\{c^nb^na^n : n \geq 0\}$ which is effectively enumerable in (plain vanilla) lexicographic order.
Comment: $\epsilon,abc,a^2b^2c^2,a^3b^3c^3,\ldots$
Comment: ok sorry for deleting comment, but shouldn't $aabbcc$ precede $abc$. because tha't what lexicographic order is right?
Comment: Consider the order $c < b < a$ on letters.
Comment: Ok got it. Thanks.
Comment: How would you compare a string $x \notin L$ with the enumerated strings? We are only assuming an ordering on $L$.
Comment: We assume an ordering on *all* strings.


scheme implementation running on emacs under Windows for working through SICP

Question: I want to find the scheme implementation running on emacs under Windows for working through SICP. the MIT scheme come to my mind, but the its official site says Code for running MIT/GNU Scheme under GNU Emacs doesn't work on Windows, I don't want to use its default editor on windows. How can I work through this under windows? are there any scheme implementation can do this? I have tried Petite Chez Scheme. But there is something wrong to work through the SCIP.
Comment: Chez Scheme should be sufficient. What error are you getting?
Comment: Also, you can edit your files on any text editor and run them with MIT Scheme.
Comment: @erjiang I am a newbie on scheme, and the Petite Chez Scheme implementation say some function or variables are not bound such as `dec` function and the `nil` when I load and use the function in SICP source code, and I don't know how to fix it.
Comment: It looks like SICP is using some old or non-standard names that aren't defined in Chez Scheme. You can `(define inc add1)`, `(define dec sub1)`, and `(define nil '())`. But see my answer below for a better option.
Answer: The most friendly Scheme environment these days is Dr Racket, which you can get from http://racket-lang.org/. It provides a graphical IDE on top of Racket, which supports many variations of Scheme.
To use Dr Racket with SICP, first open Dr Racket and then replace the first line that says something like
#lang scheme

with
#lang planet neil/sicp

Then click the green run button in the upper right. That will start downloading an SICP package from Racket's repository and install it (you can Show Log to see what's happening).
Once that's done, you should be able to run (dec 5) and get 4, and (inc 3) to get 4.
Edit: The documentation for neil/sicp is at http://www.neilvandyke.org/racket-sicp/ if you want to check it out, but there's not too much to know about the package.
Answer: As another answer has mentioned, Racket is probably the best/most widely used scheme implementation for Windows.  You can use the #lang sicp directive at the top of your .rkt file when working through SICP.
To get the nice features (REPL, syntax highlighting, etc.) you can install emacs racket-mode.  Thereafter, you should be able to open your .rkt file in emacs and run it with C-c C-c*.
*Note that I needed to explicitly set the racket-program variable to "C:\\Program Files\\Racket\\Racket.exe".


Azure Windows VM restore to new copy from backup when PC joined to domain

Question: I have a VM that is running in Azure, and joined to our domain (also in Azure). I need to restore a copy of this VM to a new machine, however because the computer is joined to domain I have issues with Kerberos and duplicate SIDs. Sysprep OOBE cannot be performed on an Azure VM because it removes the Azure VM agent extension, rendering the VM innaccessible. Solutions?
Answer: You need to run Sysprep on the VM to resolve the SID issues etc. Once you run Sysprep the VM will be shut down, do not start it up again. At this point you need to create a managed image of the VM, which you can then use to create a new VM, which will get setup correctly with the VM Agent extension etc.
The steps to Sysprep and create a managed image can be found here.


Prevent Android browser scaling on rotation without setting target-densitydpi to device-dpi

Question: Right now I'm using the following viewport meta tag:
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, target-densitydpi=medium-dpi, user-scalable=0" />

The medium dpi scaling seems to get the best results in terms of default legibility. On most pages, when I rotate between portrait and landscape, the scaling stays at that level, however, on pages where I have orientation media queries, a higher zoom level is triggered, which is not desired.
I know this can be resolved by using target-densitydpi=device-dpi, but on high-resolution Android phones this doesn't look good, so I'd prefer to keep the target-densitydpi=medium-dpi.
Am I correct in thinking that the above meta tag should lock the scaling at medium-dpi? Also, is there a way to prevent the scaling/zoom on rotation as described above?
Comment: higher zoom level is not desired by you, but may be helpful to people with sight problems
Answer: With that below i never ran across you issue
<meta name="viewport" content="user-scalable=0, initial-scale=1.0, width=device-width" />