Does it matter what UDP port a WOL signal is sent to?

Question: i have seen many WOL instances use port 7 and many use port 9, does it matter?
Isn't it just looking for a WOL packet at layer 2 or ethernet?
Answer: @Spiff is correct that it doesn't matter as far as the Wake-on-LAN functionality of the intended recipient goes. However, UDP is recommended because it can be generated without raw sockets which come with security restrictions, and port 9 is recommended because it maps to the old well-known discard protocol whereas port 7 maps to the echo protocol.
This means that if there are hosts on your network that support these old simple standard services you will get unnecessary backscatter traffic when using port 7 but none when using port 9. And since Wake-on-LAN is normally broadcasted, you could get backscatter from many hosts.
Further, if you are troubleshooting WoL with a network sniffer such as Wireshark, it will decode WoL packets properly only if they are UDP packets on port 9.
Comment: Thanks, that was informative!  Turned out Intel vPro nics discard and ignore WOL packets completely and of course turns out these were vPro machines I was trying to wake.
Answer: Nope, it doesn't matter. It doesn't even have to be a UDP or an IP packet at all. The NIC is just looking for the magic pattern (six bytes of 0xff, then its own MAC address 16 times) in all the frames it sees.
Comment: So this will even work if you egress the WoL-VLAN tagged toward the end user (if not otherwise possible)?
Comment: "in all the frames it sees"  --- so the 6x0xff + 16xMAC can be in a single frame?
Comment: @rjt Yes, the magic pattern can be in a single frame. In fact, it probably has to be. I doubt it would work if it was split between frames.
Answer: When I woke my computer using port 9 it would restart instead of coming out of sleep. For the life of me I couldn't figure out what I did wrong. I tried using port 7 and instead of restarting it woke up normally. It doesn't seem to matter most of the time which you use, but for my hardware I need to use port 7.
Comment: for the sake of knowing, what hardware was it that behaved this way? sounds like port 9 was being used as a sort of ILO instead of WOL.


Work abroad while living on the US under H4 Visa

Question: I just arrived to the States a couple months ago under H4 visa, I work in oil and gas and have a opportunity to apply for a commuter/rotational position in the middle east, I know I am not allowed to work in the US but what that position offers me is going to ME for 30 days and then come back to the States for 30 days on days off... Is that legal? Can I ask them to pay me here in the States or they need to pay me in my homecountry?  Thank you for your help.
Answer: You are only in H4 status when you are in the US. The US has no conditions on what you do when you are not in the US.


Validate Unsupervised Binary Classification

Question: I'm working on a fully unsupervised anomaly detection problem. Since it's completely unsupervised, I'm having hard times in defining some metrics to kind of validate the results (I run several algorithms, but the final result is a binary classification). I was considering a Mann-Whitney test to check for significant differences between the sample that I labelled anomalous and the non-anomalous one. Of course this is not going to tell me whether the classification is proper or not, but at least I can assume that my classification method splits my data into two significantly different samples. Does it make sense ? Thanks for any reply and maybe potential effective alternatives.
Comment: Can you clarify what labeling did you do?
Answer:
One way would be to separate algorithm testing and model evaluation for the specific task.
For algorithm testing, you can use a related benchmark dataset and validate results.
For your task, you would want to create a ground truth dataset and validate against it.
Answer: In terms of anomaly detection, it is useful to know a certainty range for each value (ex: A has 80% chance to be an anomaly) to be able to set a threshold that would be a model quality parameter.
The certainty range could be measured in many existing algorithms, for instance by getting the distance from an outlier to the closest group of normal values.
Consequently, I would recommend ways to measure such a distance and give a relative value to it (i.e. compared to other existing outliers' distances).
Unfortunately, most unsupervised algorithms don't have a universal rule, because their results are relative to each other. I don't know if it is your case, but if it is so, you should test values from data analytics indicators (standard deviation, etc.) and define the most realistic ones.
If it is not the case, I'd like to know which unsupervised algorithm are you using to see if there is any solution.
Comment: Does it answer your question? If not, please let me know.


Relay built in to cable with arduino interface

Question: To be able to switch 220 volt stuff on and off using arduino, I need a relay (I assume). Is there really no nice extention cable with built in relay so you dont need to cut and connect high voltage.
I imagine a Power strip With a simple input port that can be controlled from the andruino, just like a relay board. When I Google this I get a lot of USB controlled and remote controlled, but none that works with an andruino project.
Answer: PowerSwitch Tail is what you are looking for.


Is non-solicitation specific to hiring capacity

Question: If a person signs a non-solicitation agreement with company A, that limits them from soliciting coworkers to another company for one year after the end of their employment. Is that specific to the hiring of a previous co-worker? Such that the departing person is a manager or forms their own company after leaving company A, and has an actual capacity to hire. Or would that include the person who is hired by company B, as an individual contributor with no hiring capacities, and refers a former coworker from company A. In this case the person did not hire the former coworker, but did refer them, would they also be violating a contract that limits solicitation?
In looking this up I mostly only see the former, where the person soliciting is actually doing the hiring. I couldn't find any case where it was just a referral and they were brought to court on it.
This would be in the US that I am looking for examples of it. In particular of a company filing suit against a former employee for recommending one of their former coworkers to their new workplace. In this case neither former employee or former coworker have any company A specific knowledge, but are trained, nurses. So they will not bring any customer lists, or any special knowledge, from company A, to the new company. Is it sufficient for company A to bring suit claiming the effort of finding/hiring a new nurse as damages? If so, are there any examples of this?
Answer: You would have to look very carefully at the contract. And then you would have to look very carefully whether any laws are being violated, because in some US states you are not supposed to take any actions that prevent employees from finding a new job.
Comment: non-solicting is not the same as not hiring. Someone answering an add in the paper for an engineer is different than calling that person up and offering them a job.


Can energy be borrowed from vacuum? Even if virtual particles do not really exist does energy in vacuum exist in reality?

Question: Is the energy that can be borrowed from vacuum to return it inmediatly real?
Comment: Possible duplicate of (also by OP) [Do virtual particles and energy in vacuum really exist?](http://physics.stackexchange.com/q/297802/)
Comment: AccidentalFourierTransform's link is okay, and not the current dupe...
Comment: This is related, but you may have already read it. I  suggest it only because there may be a link off of it, or an associated page or that it might interest you in general terms. It does not address your particular  question directly, sorry.   https://profmattstrassler.com/articles-and-posts/particle-physics-basics/virtual-particles-what-are-they/
Answer: The vacuum energy is generally referred to as zero point energy and yes it does exist. Well, actually we have some evidence that it does exist and some evidence that it doesn't. It's likely we don't currently understand this issue thoroughly.
The evidence that vacuum energy exists is the Casimir effect. In the absence of any constraints the Standard Model vacuum has some state that we'll call $\lvert\Omega\rangle$. If we place two metal plates very close together then this perturbs the vacuum state and in between the plates the vacuum state is slightly different - lets call this state $\lvert\Omega'\rangle$.
The zero point energies of $\lvert\Omega\rangle$ and $\lvert\Omega'\rangle$ are slightly different, and the result is that there is an attractive force between the plates due solely to the difference in zero point energy. This force is measurable and indeed has been measured, so we know the Casimir effect is real and therefore that zero point energy is real.
On a side note: this is not a result of vacuum fluctuations since as pointed out in your previous question the vacuum doesn't fluctute. The effect is due to a difference in the vacuum states not some hypothetical fluctuations.
The problem is that this zero point energy should have a gravitational field, and in fact that field should be so strong that the universe as we see it today could not exist. This constitutes evidence that zero point energy does not exist.
Which leaves us in the uncomfortable position of not being sure what is going on. I think the general view is that zero point energy really does exist, but for some reason we don't currently understand it does not gravitate.


I have used a GB of data in less than 24 hours, how is this possible

Question: I got my android phone a week ago. This morning I recieved an text from telus telling me I have used 75% of my data, then an hour later I recieved a text saying I used 95%. Since I was sleeping and was not using my phone I want to know if this is at all possible, I took my phone into telus and all the settings for wifi are off. Is someone taking internet from me? What should my settings be?
Comment: Wi-Fi is not the same as mobile data.  I believe we have some questions on tracking what uses your mobile data, try a search and see if they help.
Comment: You actually want to switch wifi on if you're having these problems. If you have a home/office/school/etc internet connection that has wireless access, then while you're connected to that any data will go through the wifi, not the mobile phone company's network, so it won't count toward your data limit.
Answer: All sorts of background processes and applications will use cell data bandwidth.  If you've installed some new apps recently, which given your phone is only a week old seems likely, check to see if some of them are doing anything in the background.
If you list your apps, perhaps we could shed some light on which ones might be data hogs.
Answer: Are you downloading any games? Some of the more complex games could weigh hundreds of megabytes, and they download additional resource data when they're first run.
Comment: Duplicates my comment above...
Answer: My Verizon data widget was telling me numbers I couldn't believe.  I went through a gigabyte over night and was at 3 gigabytes for the month most in the last 10 day of the cycle.
I found the My Data Manager app in the market and that told me which app was causing the problem. The app breaks down data by Wireless and Wifi and shows you how much data each app used. I LOVE this app.


Interfacing Gtk with Mono on Linux

Question: I've got a Raspberry Pi-like device running Linux, connected to a custom printer. There is also an LCD touch screen that the user utilizes to interact with the printer (select files, configure the printer, print, etc.).
The printer controller was written in C#, so we run Mono on top of the Linux kernel to handle the printer.
The LCD screen is written in Gtk#, since we want to use Gtk as the UI layer of choice, and so it interfaces with our C# code. The problem is that Gtk# bindings only go up to 2.12, and there are features we need from 2.14 and later (or even 3.x).
Since the device is running Linux, is there a way to use a C++ or Python- based binding for Gtk, and then pass signals between that and C#? I would need input from the printer (like printing status) to be sent to the Gtk handling the screen, and inputs from the screen (like "print the selected file") to be sent from Gtk back to the printer.
Answer: Suggestion:
Run a systemwide (or user) dbus daemon. Interconnect via dbus – gdbus (just a server example and dbus-sharp.
I'd suggest you to go for either C or python with the gobject introspection (not the wrapper stuff!) as they are usually better maintained than gtkmm (which "just" wraps gtk+ into class structures).

Interfacing Gtk with Mono on Linux


How to make Doctrine PostgreSQL Foreign Key constrain DEFERRABLE

Question: Using Doctrine2 and PostgreSQL I need to create foreign key constrains DEFERRABLE and INITIALLY DEFERRED
Found options "deferrable" and "deferred" In Doctrine/DBAL/Platforms/PostgreSqlPlatform.php, but have no idea where to use it inside Entity annotations
<code><?php
/**
 * Class User
 *
 * @ORM\Table(name="jira_issues_changelogs")
 * @ORM\Entity
 * @package JiraBundle\Entity\Issue
 */
class Changelog
{
    /**
     * @var string
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="NONE")
     */
    protected $id;

    /**
     * @ORM\ManyToOne(targetEntity="\JiraBundle\Entity\Issue", inversedBy="changelog")
     * @ORM\JoinColumn(name="issue", referencedColumnName="id")

     Need this column foreign key to be DEFERRABLE INITIALLY DEFERRED

     */
    protected $issue;
</code>
Answer: I hit this same problem with an app I was working on, and came to the conclusion that the DEFERRABLE support in Doctrine DBAL isn't exposed to Doctrine ORM.
The crux of the problem is that in the ORM's SchemaTool the gatherRelationJoinColumns() method doesn't discover any $fkOptions except for onDelete. In order to support adding 'deferrable' there would need to be extended syntax in the ORM mapping layer for it.
In my case it was easier to just patch SchemaTool to add it than coordinate with upstream to add this properly, as there are very few references to people wanting to use advanced FK options on Google.
I thought I'd dump an answer here to avoid other people having to trace the issue themselves...
If someone wants to file a Doctrine ORM issue about it, be my guest!


How to Transfer Domain from one Geodatabase to another?

Question: How do I transfer Domain to another .gdb in ArcGIS?
Comment: What version of ArcGIS Desktop are you using?  What have you tried?
Answer: You could export a featureclass that uses the domain from the original gdb to the new one and select transfer field domain descriptions from the 'Fields' section of Environments. The process is described in more detail here: http://support.esri.com/technical-article/000011973
Or you could use the "Domain To Table" tool (in ArcToolBox > Data Management Tools > Domains) to export the domain from the old gdb, then use the "Table To Domain" tool (located in the same toolbox as the previous tool) to load the domain into the new gdb.
Comment: I have tried the former approach and it didn't work for me. I tried both importing the feature class (from the new location) and exporting the feature class (from the original location), and neither brought the domains over.
Answer: If you are using ArcGIS Pro you can right click the original gdb in the catalog > domains.
Then click the domain that you are interested in highlighting the row. Then right-click the side of the table row > Copy.
Open up the new gdb table by right-clicking the gdb in the catalog > right click the side of the domains table > paste > save.
Answer: I used the above ArcGIS Pro method and it worked perfectly.
Remember, to add a domain you have go to the Fields View of the attribute table, and use the Domain field to select an existing domain or create a new one.
Once I copied over the OG domains to the right geodatabase, I was able to choose them from the drop-down menu in the Domains column of the Fields View.
Comment: "Above" and "below" are not effective descriptions when each user can order the list as they see fit. To reduce confusion, be sure to reference by screen name.
Answer: Copy/paste function in the Pro domain table doesn't work when attempting to copy domain matrix out of ArcGIS Pro into a txt or xls file. If this is the goal, you will need to use the geoprocessing tool to convert the domain to a table.
Answer: Expanding on @AvidDabbler's answer:
(In ArcGIS Pro) Start by adding your domain, so it's available to reference if/when you add a new field.

Access the Domains interface either by:

right-clicking source GDB in Catalog > Domains, or
right-clicking source layer in table of contents > Data Design > Domains

Copy/paste domain(s) from source into target by right-clicking > Copy/Paste on the left side of the desired row in the domains interface (the bottom blank row in the case of the target). Save when done. New domains will be visible for selection.

If adding fields, repeat the above step for Fields instead of Domains. If done in this order, 'domains' should already be filled in. Save when done.


Is tamari and soy sauce a 1:1 substitute?

Question: I tried a bottle of San-J tamari for the first time today. It tasted salty and bitter. I found that adding a pinch of sugar with the tamari to smooth out the bitterness made it taste more similar to soy sauce. But, wanted to get your thoughts? Is tamari and soy sauce a 1:1 substitute?
Comment: Thoughts on what, precisely? Tamari ***is*** soy sauce, specifically one made without wheat. Simple comparison… https://sanchi.co.uk/blog-cs/shoyu-or-tamari-soy-sauce/
Comment: Is it possible you're used to sweetened soy sauce, such as is often served with dumplings? If you still have an older bottle of soy sauce that tastes normal to you, check the ingredients for sugar.
Comment: related : https://cooking.stackexchange.com/q/56335/67
Answer: The answer is both yes, and at the same time no.
The problem is that there are a lot of types of soy sauce (see What are the differences between types of soy sauce? ), and many of them are not good substitutions for each other.
Depending on what type of soy sauce you're replacing, Tamari may be a good 1:1 substitution, or it may not be.


Why is the Solar Helical (Vortex) model wrong?

Question: Could someone give a lay description of why the Solar System's depiction of motion as a vortex is wrong?
ref: Youtube video The helical model - our solar system is a vortex
Please don't take for granted that because of my previous question about why planets or asteroids don't have cometary tails, that I believe the 'tails' shown in the video are real. I do not. I know that the tails as shown are simply a graphic representation of the path 'flown' through space by the planets. It seems that the solar system we inhabit has to be moving through interstellar space in some fashion. If the paths of the planets could be shown in a video, it seems to me (a lay person) that there would have to be motion 'forward' in addition to the eliptical path around Sol.
Comment: That thing - http://www.universetoday.com/107322/is-the-solar-system-really-a-vortex/ - sums it up.
Comment: If the planets appear to approach earth and are distant, then it may disprove that the planets spiral behind the sun moving forward and back at great distances. They may appear to be revolving around the sun, but how can they do this at very eccentric forward and backward positions? In other words, what explains the extreme size differentiations of the planets at different times of their periodic revolutions?
Comment: Nowhere was the (a) definition of *vortex* used/provided.
Answer: It isn't correct, because a vortex is not a helix, and so while the planets do trace a helical path as they move through the galaxy, this is not evidence of a vortex.
Yes, the sun actually is moving through space, as it traces a path around the centre of the galaxy. The whole mass of the solar system moves with it, so the planets are not left behind as the sun moves.
Rhys Taylor and Phil Plait have comprehensive smackdowns debunking this vortex idea and other misunderstandings/delusions by the author.


Is the Road Building Development card applicable for ships in Catan Seafarers?

Question: In the Seafarer's Expansion for Settlers of Catan, is the Road Building Development card applicable for ships?
Answer: Yes, the Road Building Development Card can be used for ships or roads.
From the Seafarers rules, page 5.

When playing the "Road Building" Development Card in a game of Seafarers, you have the option of building 2 roads, 2 ships, or
  1 ship and 1 road.
Answer: The "Road Building" progress card in Cities & Knights explicitly states that, when playing with Seafarers, you can play either 2 roads, 2 ships, or 1 of each.


SharePoint 2013 Search Result Refiners Showing No Data

Question: Inside my document library I have columns named "Departments", "Category", "Sub Category" and "Index". I added data to these columns, re indexed the library and created managed property for them. The property at which was mapped started with ows.... I waited for a full crawl, went to the search page begin to add the created managed property. The results for this show No Entries. I know there are entries but they will not show up. Can anyone please help.
Answer: Have you checked that:

The documents being crawled are checked in and published (if publishing feature is enabled)?
That the crawl log in the Search service application shows that SSA actually crawled your documents?
The user doing the search has at least restricted read access to the documents?

If so, and it still doesn't work, provide more details to your question, and I'll try to guide you further!
Answer: To add to Benny's answer also check that you can retrieve the data with a property query before you try refinement. Property:Value should return a result. If it doesn't you need to fix that first. Ensure the property is marked as Retrievable and Refinable.
Answer: Make sure that the managed property you added is set to be used as a refiner, if you edit the managed property you will find a drop down list indicates whether to use the property as a refiner, by default it is set to none, set it to Active


What to use to fill a gap where the metal face of the wood burning fireplace meets?

Question: What should I use to fill a gap where the metal face of the wood burning fireplace meets the other metal below the brick? There is a 3/8" gap. It's too big to just use fire safe caulk. I would like to use something like backer rod, but i know it needs to be fire safe. There is a very cold draft coming through. Thanks!
Comment: What "other metal", and why does that space have access to unconditioned air?
Answer: I have used rock wool around stove and fireplace inserts to close up air leaks, it is about the best in my opinion for this some stoves use it in the fire box above heat pipes to channel the heat and it lasts quite a while in there.
Comment: And rock wool comes in various shapes for ease of installation.


How to change the size of the Chapter Number (pedersen style of memoir)

Question: I am creating a document using the memoir class and pedersen style. I am unable to change the size of the chapter number. I tried using code from memoir.cls (see last MWE at How to change the position of the Chapter Number (pedersen style of memoir)) but with no luck. Altering line \renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape\colorchapnum} seems to affect everything but the font size!
Comment: As always on this site, please provide a full minimal example others can copy and use for testing. It is not a particularly good idea to just link to someone elses MWE as it may be deleted in the future
Comment: I understand, thank you for your comment. Will do so in the future.
Answer: The chapter number for this style is not really set using a font size, instead it is resized using \resizebox from graphicx
Here is the code being used
  \renewcommand*{\printchapternum}{%
    \sidebar{\raisebox{0pt}[0pt][0pt]{\makebox[0pt][l]{%
      \resizebox{!}{\midchapskip}{\chapnumfont\thechapter}}}}}

So here the length \midchapskip (which normally is the space between the chapter 1 line and the actual title, is here controlling the height of the resized chapter number. So you can use say \setlength\midchapskip{1cm} to set it to something else. The pedersen style sets it to 2cm.
Comment: This solves it. Thank you!
Comment: @vbobanac if it answers your question click the check mark on the answer to mark it solved


Dusk blade channeling and full attack action

Question: A sixth level duskblade channels shocking grasp and misses his attack. I believe he still holds the charge to his next round. Now would he be able to take a full attack action with the shocking grasp being discharged when he hits? Casting the spell and channeling it is a standard action, but now that he is holding the spell why couldn't he use a full attack?
Comment: Here is a [link](http://dictummortuum.blogspot.qa/2011/08/duskblade-handbook.html) to Dictum Mortuum's Duskblade Handbook if you haven't seen it already.
Answer: Yes, he can full attack with a spell on his blade.
Arcane Channeling class feature uses standard touch spell rules with some exceptions. While there are exceptions, they change nothing in how one holds the charge after the initial casting. So said Duskblade may use Full Attack action if he already is holding the charge, but the spell will still discharge after a single hit, so his remaining attacks are just regular melee attacks.
In general, all characters may do just that by first acquiring a charge (casting a touch spell without attacking or missing on initial attack) and than full atacking unarmed. They may even full attack with touch attacks (when first hit is scored, the spell discharges, and remaining attacks are abandoned) which usually is a better option for a non-gish.
Comment: That is how I saw it by RAW. I understood the charge would be expended after the first hit but this way you get both your shots in the round.
Answer: You can't Full Attack with Arcane Channeling, and having the spell affect all targets, until 13th level.
There are some inaccurate assumptions in your question.

You aren't holding the charge. You already "cast" the spell whenever you channeled it through your weapon.
Shocking Grasp doesn't discharge until you hit someone. As soon as you hit someone, it discharges.
You can't full attack with arcane channeling until you reach level 13. There is no way around that using the information provided by the class.
Can you full attack and have a spell affect the first target hit
prior to level 13? Absolutely.

Arcane Channeling at 3rd level - 12th level:

If the melee attack is successful, the attack deals damage normally; then the effect of the spell is resolved.

Arcane Channeling at 13th level on up:

The spell affects each target you hit in melee combat that round.

You can see by the text that prior to level 13, the spell will dissipate on the first person you successfully attack. After level 13, the spell will dissipate after a hitting whomever during that round.
Note: If you were asking if Arcane Channeling would prevent iterative attacks, it doesn't do that. Only the spell would or would not affect targets of your full round attack action depending on level.
Comment: I am sorry if I wasn't clear with my question, I know the spell would discharge on the first hit but the quotes you showed  don't give any reason why you couldn't full attack in the second round.
Comment: @Nathtfm Because the spell is discharged on the first successful melee hit - it wouldn't extend to the full round attack; until 13th level. The quotes _do_ show that.
Comment: Everything in this answer is true, but is not addressing the situation asked about.


Time Machine not backing up

Question: Suddenly T.M. posted 'delayed' when backing up to an external 250 gb drive. I have deleted perhaps 10 old back-ups but freed up space does not show on T.M. Shows 47 gb of space out of of total 214 gb. How can I get this freed up space to occur? Running OS 10.6.8. 2.33 ghz Core 2 duo.  Thanks for any assistance.
Comment: How much space does one full single backup take up? I am asking since Time Machine uses hard links for unchanged files when backing up again to safe space but to retain the ability to fully restore a computer from a backup again. So, removing a certain backup will only free up the space of the changed files.
Comment: When you click "back up now" on the menubar-icon-menu, do you get an error message?
Comment: Thanks for comments. Phoenix - When backing up displays 3.34 gb, to back-up, but simple stops about half-way thru. Kevin - The error message in red reads 'Delayed'. However, I have deleted about 10 early back-ups without the available disc space displaying this on the available space left. This is the main problem - why? TM does go thru scanning files and as I have mentioned, but stops on back-up about half-way thru. Hopes this helps to explain.
Comment: Just remembered. No old back-ups have ever been removed by TM as it should - except the ones I deleted myself.
Answer: The time machine shouldn't care about free space as it will just remove the oldest backups to make space. Mine was stopping mid backup a bunch so I had to hit skip backup then boot down with the drive still connected and back up again then hit back up now and it worked.

Time Machine not backing up


calculate $\sum_{n=0}^\infty \frac{3^n}{n!(n+3)}$ using power series

Question: let $f(x)=\frac{e^x-1-x-\frac{x^2}{2}}{x}$, because $e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$, $f$ can be expressed as $$f(x) = \frac{\sum_{n=0}^\infty \frac{x^n}{n!}-1-x-\frac{x^2}{2}}{x}=\frac{\sum_{n=3}^\infty \frac{x^n}{n!}}{x}=\sum_{n=0}^\infty \frac{x^{n+2}}{(n+3)!}$$
the power series converge in $(-\infty, \infty)$ because $\lim_{n\to\infty} \sqrt[n]{\frac{1}{(n+3)!}}=0$ and let $f_n(x) = \frac{x^{n+2}}{(n+3)!} \Longrightarrow f'_n(x) = \frac{x^{n+1}}{(n+1)!(n+3)}$, $\sum_{n=0}^\infty \frac{x^{n+1}}{(n+1)!(n+3)}= \sum_{n=0}^\infty f'_n(x)$ also converge in $(-\infty, \infty)$ (for the same reason), hence $$f'(x) = \sum_{n=0}^\infty \frac{x^{n+1}}{(n+1)!(n+3)}$$ by repeating this process once more I get $$f''(x) = \sum_{n=0}^\infty \frac{x^n}{n!(n+3)}$$ and if $x=3$ I get $$\sum_{n=0}^\infty \frac{3^n}{n!(n+3)} = f''(3)$$ which is what was looking for. my problem is that $f$ isn't defined for $x=0$ yet the series does converge for it as $\sum_{n=0}^\infty \frac{0^n}{n!(n+3)}=0$, so was the function $f$ I used wrong? or could it be that I can't differentiate $f$ the way I did?
Answer: Hint
$f$ is not formally defined at $0$. However you can extend it by continuity at $0$.
In particular
$$\lim\limits_{x \to 0} \frac{e^x - 1}{x} = (e^x)^\prime(0) = 1$$
Hence you can extend $f$ by continuity at $0$ with $f(0)=0$.
There is no contradiction and what you did seems OK regarding the computations.
Answer: You are correct that the version of $f$ given by the recipe $\frac{\mathrm{e}^x-1-x-x^2/2}{x}$ is undefined at $x = 0$.  However, the limit of this recipe as $x \rightarrow 0$ is $0$, so there is a continuous function, $\hat{f}$, with domain $(-\infty, \infty)$, which agrees with $f$ on $(-\infty, \infty) \smallsetminus \{0\}$ and agrees with $f$'s limit as $x \rightarrow 0$.  You have already written a recipe for $\hat{f}$, when you wrote $\sum_{n=0}^\infty x^{n+2}/(n+3)!$.
Since you manipulated the series, $\hat{f}$, with infinite radius of convergence, you need not worry about the defects of the original recipe.  Furthermore, $f$ and $\hat{f}$ agree at $x = 3$, the only point at which you intend to evaluate.  You would be properly concerned if you were trying to evaluate at $x = 0$, but you are not.
Answer: Try using the following instead so you avoid that mess:
$$x^2e^x=\sum_{n=0}^{\infty} \frac{x^{n+2}}{n!}$$
$$\int x^2e^x \; dx=x^2e^x-2xe^x+2e^x+C=\sum_{n=0}^{\infty} \frac{x^{n+3}}{n!(n+3)}$$
 At $x=3$:
$$9e^3-6e^3+2e^3-2=5e^3-2=\sum_{n=0}^{\infty} \frac{3^{n+3}}{n!(n+3)}$$
Notice that the series on the right is what you're looking for but multiplied by $3^3$, so divide both sides by $27$.
I understand that this approach is slightly different than yours, but I believe this approach is faster and easier to understand so I thought you might appreciate it.  I'm sure you can refer to other answers posted here regarding your confusion with $f(0)$.
$$\boxed{\frac{5e^3-2}{27}}$$
Comment: No aspect of this Answer responds to the Question's "was the function $f$ I used wrong? or could it be that I can't differentiate $f$ the way I did?"  The method proposed here is subject to exactly the same questions.
Comment: The function is defined at $x=0$ in my answer.  I was showing an alternate and easier way to calculate the sum.
Comment: while this way is, by far, more elegant, I haven't "learnt" integrals with series yet, thus I had to use derivative.


Making Guitar Rig 5, Spotify and Guitar Pro 6 be routed to my headphones

Question: I'm a electric guitar player and I like to Jam along to tunes. My current setup is my guitar, plugged into my ME-25, which is hooked up to my computer (Windows 7) with a USB cable, using ASIO4ALL v2 and finally the sound comes out to my headphones on the standart output jack of my PC. To get the most out of my sound, I use Guitar Rig 5 to apply distortions, delays and such, using my FX pedal as a interface only.
But when Guitar Rig is open, none of the other programs, such as Chrome (youtube),  Guitar Pro, and Spotify can get their sound routed to my headphones. I want to be able to hear every other sound while playing guitar. Is that possible?
Answer: I use Guitar Rig with ASIO4All and have noticed it locks the sound to itself.  I can not play any other audio while GuitarRig or Amplitube (which both uses the ASIO driver).  You can open a sound file with Guitar Rig's player and play songs and backtracks that way.
Answer: I've been able to successfully play spotify (or any other "system sound" source) with Reaper while using Amplitube/Bias as a VST plugin. I imagine Guitar Pro/Rig has a similar way to get it's sound into a DAW. For bonus, you can combine different VST plugins and record as well with a DAW.
Also, I highly recommend using the official ASIO drivers, rather than generic ASIO4ALL drivers: http://roland.com/support/article/?q=downloads&p=ME-25
Answer: I don't use the me-25 (I have a Stealth Pedal), but you ought to use the ASIO driver from Roland's website.
If you do this, you will have then two audio devices.
This should enable you to use the outputs on the ME-25 for guitar (select ME-25 as both in and out for guitar rig). The PC onboard sound device will no longer be locked when using Guitar Rig.
This will require two sets of speakers (or a hardware mixer to one set, or a y-splitter). I have a 150 watt AV receiver with stereo speakers and subwoofer connected to my Pedal for guitar and a set of PC speakers for "PC noises."


Set Facebook Profile to Not Appear In Friends Lists

Question: If you want your Facebook profile to not show up in the friend's lists of your friends, can you set it up to do that?
Answer: You can disable the display of your friends on your profile.
Your friends will still see your profile, but not your list of friends.
The general public when looking at your public profile will not see your friends.
The general public when looking at one of your friends' profiles that does not hide their friends' list, will see that you are friends with that person.
There are no settings in Facebook that you can set, to change that behavior. Your only setting is whether or not you want people, who are viewing your profile, to see your friends' list.


Virtual vs. Named SQL Instances

Question: What are the benefits to using virtual as opposed to running multiple instances of SQL on a box?
Answer: If you break out your SQL Servers into individual virtual machines on the same host, the advantages are:
Better resource limiting.  SQL 2008's Resource Governor is a good start, but still not that fine-grained, especially when it comes to limiting IO.  With virtual servers, you can throttle CPU, memory and IO at the virtual machine level, thereby giving you the ability to limit resources even on older versions of SQL Server.
Easier performance upgrades and downgrades. If one virtual machine needs to be scaled up, like if its application suddenly becomes more popular, you can VMotion it to a more powerful machine without taking an outage.  If you're using multiple instances, on the other hand, you're looking at a time-intensive and labor-intensive installation.
More flexible outage windows - if you have all of your databases on a single OS (multiple instances of SQL) then you have to do a lot of coordination to do Windows patches.  If they're broken out onto different virtual guests, then you can do patching whenever it's most convenient for each individual guest (and its matching databases.)
Better security limits. If one SQL Server runs into problems and a third-party needs to get involved with troubleshooting, you can give them OS-level permissions without worrying about what they'll do to the other SQL Servers installed on the box.
Less problems with application compatibility.  Some apps just aren't compatible with named instances of SQL Server.
It's not all unicorns and rainbows, though.  Some drawbacks of the virtual server approach include:

Possibly more expensive - you have to pay for the virtualization layer, and depending on how some of your software is licensed, you may have to pay differently for it.  Some utilities are licensed by the number of CPUs on the host machines, and not all of the CPUs may be allocated to SQL Server.
Possibly tougher troubleshooting - some vendors like to point fingers at the virtualization layer.
More OS management - every OS you add means more management and maintenance.

I did a webcast on consolidation vs virtualization with SQL Server experts Kevin Kline and Ron Talmage.  Registration is required for that, though.
Comment: Yeah, with VMware you don't have to pick the individual CPU.  You can say, "Throttle this virtual machine to 50% of two CPU cores", and you don't have to micromanage which cores they are.  VMware just picks what's available at the time you need 'em.  This eliminates problems with trying to manage cores individually, which becomes really painful with active-active clusters and failovers.
Comment: i can set the affinity for each named instance, as well as set the memory. is there any benefit to using VM in doing so?
Comment: Thanks! I love it when I can say, "I've done a presentation on that!" Hahaha.
Comment: Makes me want to go virtual.
Comment: Yeah, I'm totally sold on virtual servers now.  I'm heading up the Professional Association for SQL Servers chapter for Virtualization, too, because I really believe in it.  Solves a ton of problems.

Virtual vs. Named SQL Instances


Converting PWM into an analog signal

Question: I'm trying to think of the best way to convert a PWM signal into an analog signal. I could use an RC filter, but that requires a very high PWM frequency to create a faithful reproduction of the signal. In my case I'm dealing with audio frequencies for the analog signal - up to 20 kHz. So, what other options are there?
Comment: @Thomas, Fine, so you need an active low pass filter with a fairly steep roll off.
Comment: How did you get a PWM signal that represents up to 20kHz without a very high frequency PWM in the first place?
Comment: @Thomas - Have you actually looked at your audio frequencies?  20 kHz is about the theoretical limit of audible signals, which probably isn't the standard you need to meet.  Voice, for instance, can be well represented entirely under 3 kHz.
Comment: @reemrevnivek Depending on your application, < 3khz could be entirely unacceptable.  You can get the gist of a voice in this range, but to say it can be really encoded in this range is not correct.
Comment: @JoeMac  A standard phone call is encoded with 8-bit audio at a sample rate of 8 KHz.  But the antialising filter normally is set for a cutoff of 3 KHz (and a high pass filter cuts off everything below about 300 Hz).  So, for many speech applications, 3 KHz is just fine.  Higher does sound better, however, but doesn't add to the intelligibility.
Comment: @Martin, using Nyquist, the PWM frequency is about 50kHz.
Answer: The simple answer is that you can't.  There are several things going against you:

would be that for good audio quality you'd need to be very precise in your PWM generation.  This is fairly difficult, as your master clock frequency (the freq that the logic used to generate the PWM from) would have to be around 100 MHz just to get the equivalent of an 11-Bit DAC.  There are ways to generate PWM that good without that, but then you'd be starting with an analog signal and thus wouldn't have this problem.
as noted you would need a super steep rolloff of a filter.  Just to match your 11-bit DAC equivalent you'd need something like 60 dB/octave-- which is unreasonable even for the pro's.  There is a lot of difficultly in doing this kind of filter which is why everyone went to Delta-Sigma DAC's for their audio, which require about a 6 db/octave filter.
If your filter is not 60 db/octave then you'll need the PWM frequency to be super high.  If you have 60 db/octave then you could have a PWM freq of 40KHz.  At 54 db/octave then maybe 80 KHz will work.  48 db/octave = 160 KHz.  Etc.  Very quickly you get into the high MHz range-- and then your master clock frequency would have to be into the GHz.

All is not lost, however.  Do you really need to filter out the high frequency stuff?  In many applications (not all) you can either not filter it or use a simple RC filter at 1-5 MHz.  There will still be high frequency stuff getting though but either the speaker or your ear will filter it all out.  But the audio will still sound bad.  AM Radio on a bad day quality.  That's just the way it is.
Update:
My numbers for #3, above, are somewhat wrong.  But before I get to that, let me explain where I got all the numbers from.

Let's say that you are generating the PWM using digital logic (FPGA, Microcontroller, etc.).  And then let's say that your audio sample rate and thus your PWM frequency is 48 KHz.  And you want 8-bit resolution.  That means that your master clock frequency should be 12.288 MHz.  I calculated that this way:  Master_Clk_Freq = Sample_Rate * 2^n_bits.  Doing that again for an 11 bit resolution is 98.304 MHz.
The theoretical best noise level of an ideal DAC is about -6dB/Bit.  So a 24-bit DAC has no better than -144 db noise.  (Note:  I'm playing a little loose with the terms here, lumping SNR, THD+N, and dynamic range all together.)  Of course, no real 24-bit DAC can do this, but we're talking theoretical here.  What this means is that an 11-bit DAC has about a -66 db noise level, so there is little point in making a filter that works better than this.  AM Radio has approximately 60-ish dB signal to noise ratio, for comparison.
Ok, here's where I royally messed up the numbers.  Assume that the PWM Rate = 48 KHz, and filter Cutoff=24 KHz (to make the math easy).  With a -60dB/Oct filter we'll be -63dB @ 48KHz.  If our filter were changed to -54dB/Oct then we'd be -57dB @ 48 KHz and -62.4dB @ 50.4KHz.  What this means is that by changing our filter from -60db/oct -54db/oct we would have to change the PWM rate from 48 KHz to 50.4KHz to achieve the same filter blocking performance.  Not a doubling of PWM frequency as I mentioned before.  In the same way, if the filter were changed to -18dB/Oct (which is a manageable design) then the PWM frequency would have to be 104 KHz to still have -63dB filter attenuation at the PWM frequency.  I calculated this by making a small spreadsheet and playing with the numbers.
Comment: This answer could be improved a lot if you explained how you derive your numbers... (11-bit DAC, 60 db/octave \$\rightarrow\$ 40 KHz, etc.)
Comment: @reemrevnivek -- You're right.  Maybe that's why I shouldn't be writing answers just after waking up in the morning...   I have to go into a meeting right now, but when I'm done I'll go back over the numbers and make sure they are correct.
Comment: This is precisely why I said an RC filter probably wouldn't be an option. I was considering something else, like integrating the PWM ramp up, capturing the voltage and then resetting the ramp. I'll see if I can get an example working...
Comment: @reemrevnivek - I updated my answer with how I got the numbers.
@ThomasO - While integrating the PWM as you described might make the resulting waveform look all clean, it would still have a huge frequency spike at the PWM frequency.  So you'd still need the same nasty low pass filter.
Answer: The RC Low-pass filter would be the natural solution, but you can also use a microcontroller to measure the duty cycle and use that value to control a DAC. To measure duty cycle you need a timer with input-capture capability. The higher your timer clock, the more accurate your measurement. If the microcontroller doesn't have on on-chip DAC you can use an external one.
Answer: I'm integrating the PWM ramp up, capturing the voltage with a sample and hold circuit and then resetting the ramp. This seems to get a relatively faithful representation of the signal, but it still has some issues, like PWM noise on the peaks, and it's slightly nonlinear. But, it does work fairly well, and it allows me to use a 100kHz PWM signal.

Simulate it here.
Comment: That's a cool website simulation thing!  Anyway, when you clean up the "PWM Noise on the peaks" you will find that you have lots of quantization noise (a.k.a. aliasing) on the output waveform.  I think that the noise that you have now, and the 1K/10nF filter on the output is hiding (but not removing) the quantization noise.
Answer: One issue not yet mentioned is knowing how the PWM signal was generated, in particular whether the leading edge, center, or trailing edge occurs at a uniform rate, and whether the PWM signal represents uniformly-spaced samples, or whether the PWM signal represents the samples taken at uniform intervals, or whether they represent the value of the input signal at the time of the rising edge, falling edge, or both.  Knowing how a PWM is generated, it should be possible to do a good job of recovering the original signal (as well as it could be recovered from a signal sampled at the PWM rate).  Attempting to reconstruct a signal which was sampled via some means other than what was expected is apt to cause phase distortion.

Converting PWM into an analog signal


Term for "a pattern that repeats once induced"

Question: For example, let's say that I went to sleep one night at 5:00 am. Out of exhaustion, I would most likely sleep until the late afternoon. Since I woke up so late, I wouldn't be tired until very early in the morning, maybe 5:00 am again. This pattern would repeat over and be hard to break out of. My question is, what would we call this type of pattern? Another example would be smoking; you begin to smoke and it's very hard to stop. I'm not looking for "addiction", because that implies that I am physically and mentally dependent on the object.
Comment: Did you think of *habit*?
Comment: @Robusto - I did, but what I'm describing isn't really a habit. What I'm describing involuntarily repeats, regardless of the wish of the person it affects, and it doesn't necessarily benefit said person. For example, in the above situation, I don't want to go to sleep really late, but I have to because I did it the previous night.
Answer: The apt term for this is vicious circle or vicious cycle. According to NOAD, the definition goes thus:

a sequence of reciprocal cause and effect in which two or more elements intensify and aggravate each other, leading inexorably to a worsening of the situation.

In your own words: This pattern would repeat over [and over] and be hard to break out of. I cannot think of a better phrase than vicious cycle.
Comment: Good ones are sometimes called virtuous cycles or virtuous circles.
Comment: Hah @Merk!! I just stopped short of including that in my answer! Nice one!
Answer: You might use self-sustaining or feedback loop.
Comment: Your answer would be expected to cite the sources and some justification for these terms.


Non-Read-Only field giving error with trigger that it is read-only

Question: I'm getting an error on my trigger that it cannot change the value of a field because it is read-only. The problem is, it is not Read-Only. Is there a setting somewhere or some information about the field I should direct my attention to that I'm missing? It seems pretty straight-forward, but it's been a "bug", if that's what it is, for a few days now. I don't want to delete the field because I would have to sift through a few triggers and classes to get rid of the field and then add it back in. I'm hoping there's something more to this that I'm missing rather than a bug.
Comment: Where did you check that the field is not read-only?
Comment: it will be also nice to see actual error message
Comment: I didn't think it'd be necessary, it's a very straight forward error. System.FinalException: Record is read-only. I checked that it is not read-only by clicking on the field (where you see an object's list of fields and relationships) and going into "Set Field-Level Security"
Comment: when you encounter a problem and ask on stackexchange, please, provide more information - in this case - what field is it, your trigger code(better not the whole code, but the part/method where the error appears), error message and so on.
Answer: This sounds like you're trying to modify a record contained in a trigger context variable (possibly in an After trigger).
Taking a look at the documentation on trigger context variables, there is this tidbit (emphasis mine):

new --- Returns a list of the new versions of the sObject records.

This sObject list is only available in insert, update, and undelete triggers, and the records can only be modified in before triggers.

So if you have a trigger that looks like this, you will run into an error
trigger myTrigger on MyObject__c (before update, after update){
    for(MyObject__c myRec :trigger.new){
        // This line will result in a 'record is read-only' error because
        //   it can be executed in an 'after' trigger context and attempts
        //   to update a record which is read-only at that point
        myRec.someField__c = 'newvalue';
    }
}

There are two main ways to overcome this issue:

split the trigger into different blocks that only run in certain trigger contexts using if statements and other trigger context variables like Trigger.isAfter and Trigger.isUpdate
perform a separate query for the records contained in trigger.new, and modify those records instead of the copies stored in the trigger context variables

Which strategy you end up using is up to you, and depends on the situation. My preference is for the first solution. I'll give an example using a combination of both, though trying to use this example directly would not make much sense.
trigger myTrigger on MyObject__c (before update, after update){
    if(Trigger.isBefore){
        for(MyObject__c myRec :trigger.new){
            // Since this line is now only executed in before trigger contexts,
            //   you will be able to execute this line of code without issue
            myRec.someField__c = 'newvalue';
        }
    } else if(Trigger.isAfter && Trigger.isUpdate){
        // It is possible to update a record that appears in a trigger context variable
        //   in an after trigger, but there are risks involved.
        // It is very easy to get yourself into a situation where the trigger
        //   gets into an infinite loop.
        // The general rule of thumb is that if you are updating an sObject record
        //   in the trigger for that same sObject, it should be done in a 'before' trigger

        List<MyObject__c> recordsToUpdate = [SELECT Id FROM MyObject__c WHERE Id IN :Trigger.new];

        for(MyObject__c myRec :recordsToUpdate){
            myRec.someField__c = 'otherNewValue';
        }

        // In any after trigger, DML is required to update records.
        // We only get to skip the DML in 'before' triggers when directly
        //   modifying a record in trigger.new or trigger.newMap
        update recordsToUpdate;
    }
}

Comment: This makes sense. Apex Triggers run in System mode and can thus do any CRUD operations independently from the context of the User that is causing the trigger to fire.
Comment: @NatalieSpatharakis In an after DML trigger, the record has already been saved to the database. You should always use a before trigger to modify records in Trigger.new.
Comment: @NatalieSpatharakis If this is indeed the issue that you're running into, then it has nothing to do with FLS. If you take a look at the error, it should mention that the _record itself_ is read-only, not the specific field. sfdcfox covers why trigger context variables are read-only in `after` triggers.
Comment: See also: [Triggers](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm), which astutely recommends all field updates occur in a `before` trigger.
Comment: Thanks! So, why exactly can't I update this field in an After, but I can in a before? That perplexes me that it would throw an error having to do with its security, when in reality it has to do with.....what exactly? I guess if I better understand why, I will better approach similar issues in the future


Android emulator screen sizes

Question: From your experience as an android developer what emulator screen sizes do you use?
Are there a couple that tend to catch most UI sizing issues or do you test your app in every size and density?
Answer: While coding, try to cover at least one of each from this table: http://developer.android.com/guide/practices/screens_support.html#testing . After most of the work is done, I would suggest try every combination you'll find in real devices you plan to deploy your app.
My very basic list while I am designing the UI is:

WQVGA 120 dpi
HVGA 160 dpi
WVGA 160 dpi
WVGA 240 dpi

Add 480x640 240 dpi if you want to support small screens.
You can use the pie chart here to have an idea of relative screen size usage: http://developer.android.com/resources/dashboard/screens.html
BTW, I have use AVDs from Donut to Gingerbread also.
Answer: At some point, I test on every size and density that I intend the app to run on. It's irresponsible not to do so.
But beware of densities; because of dpi scaling, you may be running what you think is an hdpi emulator, but the emulator is loading mdpi resources (or vice versa). It's a good practice when testing to log the reported density during onCreate of your launch activity. (My approach, though, is to use an app icon for each density that displays the density, at least until I want to test the real app icons. That way I can tell from the home screen what the emulator thinks it is running.)
Answer: you should test your app in every size , in order to be sure that your app will work fine in every android phone ;
and for density , try to create your UI with dip :)
hope it helps

Android emulator screen sizes


Algorithm: array of arrays in Cocoa Touch (perhaps using NSCountedSet)

Question: This one is a bit tedious in as far as explaining, so here goes. I'm essentially populating a tableView on the iPhone with multiple sections, and potentially multiple rows per section. To my understanding, it's best to have an array of arrays so that you can simply determine how many sections one has by sending a message to the top level array of count, then for rows per section, doing the same for the inner array(s).  My data is in the form of a dictionary. One of the key/value pairs in the dictionary determines where it will be displayed on the tableView.  An example is the following:
{
  name: "bob",
  location: 3
}
{
  name: "jane",
  location: 50
}
{
  name: "chris",
  location: 3
}

In this case I'd have an array with two subarrays. The first subarray would have two dictionaries containing bob and chris since they're both part of location 3. The second subarray would contain jane, since she is in location 50. What's my best bet in Cocoa populate this data structure? A hash table in C would probably do the trick, but I'd rather use the classes available in Cocoa.
Thanks and please let me know if I need to further clarify.
Answer: The following code works: (edit: added my initialization code)
NSArray * arrayOfRecords = [NSArray arrayWithObjects:

    [NSDictionary dictionaryWithObjectsAndKeys:
     @"bob", @"name",
      [NSNumber numberWithInt:3], @"location",  nil],

    [NSDictionary dictionaryWithObjectsAndKeys:
     @"jane", @"name",
      [NSNumber numberWithInt:50], @"location",  nil],

    [NSDictionary dictionaryWithObjectsAndKeys:
     @"chris", @"name",
      [NSNumber numberWithInt:3], @"location",  nil],

    nil];

NSMutableDictionary * sections = [NSMutableDictionary dictionary];

for (NSDictionary * record in arrayOfRecords)
{
    id key = [record valueForKey:@"location"];
    NSMutableArray * rows = [sections objectForKey:key];

    if (rows == nil)
    {
        [sections setObject:[NSMutableArray arrayWithObject:record] forKey:key];
    }
    else
    {
        [rows addObject:record];
    }
}

NSArray * sortedKeys = [[sections allKeys] sortedArrayUsingSelector:@selector(compare:)];
NSArray * sortedSections = [sections objectsForKeys:sortedKeys notFoundMarker:@""];

NSLog(@"%@", sortedSections);
Comment: Hey James, that's currently crashing with the message: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key'
Comment: I now added in the code I used to initialize arrayOfRecords. This compiles and runs for me.
Answer: And NSDictionary is a hash table.
Answer: In Cocoa, it's best to use model objects rather than primitive collections, especially when using Bindings. The dictionaries should certainly be model object, and you may want to turn your inner arrays into model objects as well. (The outer array should stay an array.)
Cocoa Touch doesn't have Bindings, but I find (in Cocoa, as I don't program my iPhone) that model objects make things easier to think about and work with. I recommend you make model objects anyway.
("Model" refers to Cocoa's "Model-View-Controller" pattern, in which Cocoa provides view and controller objects and you provide the model.)
Comment: What constitutes a model object? A home-grown objective-c class that does not rely on anything in the 'NS' arena?
Comment: No. A model object models the user's data; it represents something the user is creating, editing, or otherwise manipulating. http://developer.apple.com/documentation/Cocoa/Conceptual/ModelObjects/


Shower leaking onto carpet in adjacent bedroom

Question: Carpet in the bedroom that backs up to the 2nd floor shower gets wet. There is no water leaking below the shower or in any other direction.
I removed the drywall and there is a liner which was filled to the rim with water. In the picture below, the water has been removed. I removed caulk which had water behind it.
My plan is to let everything dry out, re-caulk, and seal the grout. I was also thinking about pouring some liquid rubber into the bulging liner in the hope that it will find its way underneath.
Any thoughts? Thanks so much!
Comment: Why don't you unclog the shower drain?   I'm assuming that's why the pan/liner overflowed.
Answer: I'd be careful about how you add more waterproofing here.
Sealing the grout should help, and makes your shower surface less porous. However, depending on the water proofing system used, throwing in liquid rubber could halt water from exiting the shower and lead you back to mold or worse.
If your pan liner has water backed up, there may be an issue with the drain, such as with its weep holes, which are under the drain a bit and allow water at your water proofing level to drain. If these get clogged, any water that passes through the surface, which is by design, will get trapped by the waterproofing system.
Water has the nasty ability of affecting other parts of your shower, and home that are far from where the actual issue is. Its possible issues at the drain are leading to overflows onto your carpet.
Alternatively, within the picture of the liner there seems to be a hole in the backerboard? If that's the case, and there is no waterproofing at that spot. It could be an issue of water/moister leaking onto the liner behind the rest of the water proofing and thus creating the issue.
I'm unsure how to fix the backerboard's hole in this scenario though.
Most would suggest redoing the entire thing from scratch and do it right, but that still costs a good amount of money and time. Waterproofing the surface might give you a little longer. Just keep an eye on everything in the meantime.
Answer: Caulk and grout are not going to keep water out. This is a complete tearout job with a liner replacement. Do you know what was used to waterproof the walls behind the tile itself?
Comment: I think that it was a waterproof plasterboard, and that there is a liner on the outside of that around the bottom.
Answer: I let everything dry out thoroughly, and then caulked and sealed the grout. So far everything remains dry. I think that the problem began with a degradation of the caulk at the joint between the wall and floor of the shower. The liner slowly filled up with water and then eventually spilled out as the water seeped through that failed joint. Re-caulking at that point failed as the liner served as a reservoir of water to keep the caulk from setting properly. Once I removed the drywall and dried out the liner, I was able to get a good caulk seal. Thanks to everyone for their help!


Create installer for java web application (linux and Windows)

Question: How to create installer for web application to run on both Windows and Linux? I need no more than extact some jar, jsp and xml files into a chosen directory. (Web server and database should be already installed, when our app is installed)
There can be two output files - one for Windows, one for Linux.
Answer: http://izpack.org/ is a fully-fledged cross-platform java installer-generator, and it's awesome.
But I'm not sure you need that exactly ..
I think, maybe, you just want a .war file? (i.e. a web application archive)
Here's an old article about war files:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html
Answer: Our product, BitRock InstallBuilder is a multiplatform installer that can do what you want. It is commercial but we have discounts for small companies and free licenses for open source projects. For example of web applications packaged with BitRock, check Bitnami


Changing bot difficulty in Dominion Online

Question: Regarding the new online version of the deck-building card game Dominion, my friend complains that the bot is too challenging. Is there any way to decrease the difficulty when playing bots 1-on-1 in Dominion Online?
Comment: Hah, fair enough. The friend is new, and I'm very happy they are making a good-faith attempt at learning the game. But let's face it, we were all there at some point.
Comment: I recommend your friend keep playing more and learning Dominion better. The bot is, to be frank, pretty terrible at Dominion.
Answer: No, there is not currently any difficulty settings for the AI.
I cannot find an official source stating this to quote/link as reference, but you can read through the official FAQ and see some mentions of playing against the AI, with no mention of a difficulty setting.
As this is a pretty new implementation of the game, it is constantly in development with improvements and bug fixes happening often. So it is reasonable to expect such functionality to happen; though I have not heard about any expected timeline or priority for that feature. You can request that feature at the feature requests board on the Shuffle iT forums.
Comment: I confess I have played little Dominion in the past 4 years, so that seems about right. If I recall, your posts on the Dominion Strategy forums were frequent and well-received. Yours is one of the few names I remember from those days.
Comment: Thanks for the very thoughtful and informative reply! I thought that was the case (i.e. I tried and failed to locate such a setting), thank you for confirmation. Also, I'm pretty hyped that such an esteemed player answered my question!
Comment: @ancientcampus You're welcome.. but I have to ask, what makes you think I am "an esteemed player"? Did you see my frequency of the Dominion Strategy Forums? There was a time, back in the days of Isotropic (over 4 years ago), that I was a pretty high-ranked player, but not so much anymore.
Comment: Update: browsing the feature requests board confirms this. Multiple bot difficulties is not presently implemented.


There are 3 sequences $a_n $, $b_n$, $c_n$. Prove that limits in $\infty$ are equal and that 2 of them are convergent

Question: There are 3 sequences $a_n, $, $b_n$, $c_n$ with $n \in \mathbb{N} \setminus \{0\}$ given by recursions:

$a_{n+1} = \frac{a_n+b_n+c_n}{3}$
$b_{n+1} = \sqrt[3]{a_n*b_n*c_n}$
$c_{n+1} = \frac{3}{\frac{1}{a_n} + \frac{1}{b_n}+\frac{1}{c_n}}$

Elements $a_1, b_1$ and $c_1$ are all positive numbers. Prove that at least $2$ of those $3$ sequences are convergent and that: $$\lim_{n \to +\infty} a_n = \lim_{n \to +\infty} b_n = \lim_{n \to +\infty} c_n $$
The first thing that I see is that those seqences are made of subsequent elements of functions known as arithmetic, geometric and harmonic means. Because of inequality of means, I know that:
$$a_{n+1} = \frac{a_n+b_n+c_n}{3} \geq b_{n+1} = \sqrt[3]{a_n*b_n*c_n} \geq c_{n+1} = \frac{3}{\frac{1}{a_n} + \frac{1}{b_n}+\frac{1}{c_n}}$$
Then, I know for sure that:

every subsequent element of $a_n$ must be smaller than the former one because $b_n$ and $c_n$ are smaller than $a_n$ for every n
every subsequent element of $c_n$ must be greater than the former one because $a_n$ and $b_n$ are bigger than $c_n$ for every n

Additionally, I know that the limit of each one of those means is reached when all 3 elements in the mean are equal. In my case all 3 elements are the same for all 3 means so, the limit must be equal as well.
But here comes my problem - how to write it all down, to present my thinking in a correct way? Is there any scheme that I that could apply in my case (I only know how to formally find limits and prove convergence in cases of $\lim_{n \to +\infty}$ for sequences of $n$ elements)?
Answer: If you put $a_n \gt$ in front of your inequalities and $\gt c_n$ afterward you have a proof of convergence for $a$ and $c$ as the sequences are monotone and bounded.
Comment: And do I need to show in any way that the sequences are monotone and bounded? I mean, it is rather obvious in that case (they are means of means) but who knows.
Comment: You said that $a_{n+1} \lt a_n$, which says the $a$ sequence is monotone decreasing and that $c$ is monotone increasing.


Absence of phase transitions in quantum 1D systems at positive temperature

Question: While it is generally said that there are no phase transitions in classical lattice systems in one spatial dimension, there are also exceptions to this rule. Rigorous proofs involve some fairly strong assumptions about the statistical weights, such as positivity. I wonder what the situation is for quantum spin chains at positive temperature. That is, under what assumptions can one prove that there are no phase transitions at positive temperature?
Answer: For translationally-invariant finite-range lattice 1d Hamiltonians, the absence of phase transitions at positive temperatures has been proved by Araki:
H. Araki, "Gibbs states of a one-dimensional quantum lattice," Comm. Math. Phys. 14 (1969), 120-157.
Later he gave a different (and less computation-heavy) proof which also covers a wider class of Hamiltonians:
H. Araki, "On uniqueness of KMS states of one-dimensional quantum lattice systems", Comm. Math. Phys. 44 (1975), 1-7.
In particular, the 2nd proof covers the case without translation-invariance.
On the other hand, the 1d Ising model with long-range interactions is a famous counter-example. See two papers by F. Dyson and references therein:
F. Dyson, Comm. Math. Phys. 12 (1969), 91-107; Comm. Math. Phys. 21 (1971), 269-283.
Comment: Are there any results regarding 1D finite sized systems at finite temperature? For example, are the poles in the free energy as as function of inverse temperature when extended to the whole complex plane?


Is there a widely used vocabulary for electronics and electrical systems, much like the UMLS for medicine?

Question: I am searching for an inclusive view and typology of electronic and electrical systems, and the design and engineering concepts etc. that underpin them. Is there a widely used vocabulary for electronics and electrical systems, much like the Unified Medical Language System (UMLS) for medicine?
Comment: Far, far too broad.
Comment: I think the answer is "no".
Comment: I guess if you scroll through an ee textbook, you will meet a ton of them, I mean, starting with the words "resistance" and "capacitance". Of course, there could be some concepts that have 2-3 names, but other than that, we all use the same language. If you're asking whether there already is an EE dictionary of some sort, I guess no
Comment: I always thought there was... until I signed up to this site!
Comment: I have, from a long time ago, a technical dictionary that is between 6 languages and was built for the company for hydraulic terms. In Europe the are several terms for voltage for example, so engineers tend to be very careful when discussing things.
Comment: I'm voting to close this question because it's not about electionics design
Answer: No, not that I'm aware of.
As someone who helped out in a physician's office: I have my doubts about the UMLS thing. I only know ICD, and that's only used to formalize diagnoses. And it is so subjective and formed by the ideas of those standardizing it that it hardly counts as the common language of doctors when describing diagnoses. And that's albeit diagnosis is just a tiny, tiny subfield of human medicine…
Any field has a lot of terms. Medicine and electrical engineering don't really differ in that respect. Also, every field has different ways of looking at things. The way I'll explain how some communications technology works might have not much to do with how the next engineer does it, even if we correctly both describe the same thing. And: with books and articles being written, answers being drafted here, and engineers talking at work, language is always in the flow.
Such a compendium of language is bound to be outdated within very short time, and indeed, the 39 GB (!) of UMLS are far more than just a dictionary. They contain semantic links and description of these, ways to generate field-specific views of the data and many tools to even make that huge dump of data useful.
I have immense respect for that level of effort, and especially in human medicine and biology, it might be extremely important to have a canonical reference for meaning of words. In electrical engineering, that need might just be lower – for all basic things, you can just deliver your mathematical definition alongside your statement. If that definition doesn't match someone else's definition, not really a problem, they can just apply math to figure out whether the statement is relevant to their case. In human biology, you can't just "define" something mathematically. You need to have a list of discrete features that make up anything. Even very fundamental things. What is a "liver"? Does it include the arteries running into it? If yes, how far out? Is that the same in humans as in bats?
So, no, EE doesn't have something like that – you can certainly buy thick books that say "dictionary of electrical engineering" and are essentially something that only students look into, maybe 10 times during their whole studies, and engineers in universities tend to have in the library, catching dust until once every 3 years, someone comes and looks up what an "oscillogram" might have meant in 1950.
Comment: Considering that 1 shot, single shot and monostable multivibrator are all the same thing (differing usage over the years) it is virtually impossible to get an agreement of terms.
Comment: The problem in electronics is that developers are inventing new terms every year, if not every month while new acronyms are poping up in discussions and articles all the time. Very often matching acronyms from other fields. If you mix acronymes from electronics with those from finance, I wish you good luck to understand anything. A dictionary of electronic should be updated very 6 months.
Comment: But we are all supposed to know everything all the time. ;)
Comment: @PeterSmith you mean a delayed impulse generator? ARE YOU ASKING ME TO GET MY TORCH AND PITCHFORK? MY TAR IS HEATED UP ALREADY; DON'T MAKE ME GET MY DOWN-FILLED CUSHION!
Answer: There is IEEE Standard 100-2000 - The Authoritative Dictionary of IEEE Standards Terms. The 2000 means that is hasn't been updated in 20 years. It has been withdrawn. The best definitions are those presented in text books along with diagrams and complete explanations of the concepts involved. Many standards contain a glossary of terms that are essential for understanding and applying the standard. Many manufacturers publish handbooks and application guides that contain glossaries. If you look at two or three and find similar definitions, you can have some confidence that there is a consensus on the use of the terms.
If you find a term that is used to describe an "improved" product, but is not well defined or consistently used, that term is likely a "marketing" term. Marketing terms are not engineering terms. They may be useful, but not dependable. The underlying specifications must be carefully studied as applied to each usage.


Anchor links scroll to incorrect position

Question: I'm struggling to make my anchor links work properly. Website is http://www.imprero.com and at the very top you see a link "Zobacz atrakcje" which should lead to a section below called "Produkty". Here already the scroll positions the window too much upward, since all two icon rows should be visible (according to div id="produkty"). Now this is the product list linked internally to sections of the page below. Only the first two position correctly, whereas all further are more or less wrong. In each product section there is a link "Lista atrakcji" which directs back to the product list. When I click the same icon link it many times directs me to a slightly different position. What the heck??? Any ideas? Would appreciate...
Answer: The problem is that your fixed header is out of the document flow so it's height/position are not factored in to the scroll position of the browser. If you were to hide the header after clicking the anchor tag you would see that it does place you in the right position. This can be compensated for with a little CSS:
<code>// Adjustment for anchor tag positioning with fixed header
:target:before
{
   content: "";
   display: block;
   height: 57px; //Height of header
   margin-top: -57px;
}
</code>
Comment: Then that means it has to be an issue with the _scrollToElementOnLinkClick function that is fired when you click on those buttons. You'll have to modify it to also compensate for the 57px height of your fixed header.
Comment: Hi, inserted your CSS at the end of my stylesheet and... didn't help. Have a look :( What did I wrong?
Comment: It looks like you made a typo when entering the CSS. I think you put it all on one line and the comment on height broke the margin-top rule. So my advice would be just to remove "//Height of header" and then try again.

The issue is on line 1395 of http://www.imprero.com/wordpress/wp-content/themes/generatepress_child/style.css
Comment: Didn't think the comment will break the rule. Anyway, still not good. Depending on the link, it moves to different positions and can't make it look good in every case :(
Comment: Well it looks like that is because the layout is different in each location. So the height of the div with data-node "58d13008b6de8" is 140px and the height of the div with data-node "5836c59051ea9" is 80px. This discrepancy (and some others) in your layout are causing the scroll position to be different for each anchor tag. The easiest way to see it is to take all the classes off of the div with data-node "5836c59051ea9" and replace them with all of the same classes from the other "fl-module fl-module-heading fl-node-58d13008b6de8 kontakt-inner-heading". Then both buttons behave the same.
Comment: I'm not sure why you are reffering to nodes which are not linked to in my issue. And don't understand why a different height of a div can influence the behavior of the anchor link scroll position. The fixed header is of course something to consider but that would be the case when each scroll to a target anchor would scroll to the same height, whereas each anchor directs to a different position of each targeted section. Furthermore, it targets to a different position using the same anchor, i.e. clicking a link with `#produkty` moves the scroll differently each time.
Comment: Lastly, typing the link manually in the address bar eg. [http://www.imprero.com/#sys](http://www.imprero.com/#sys) scrolls to the correct position, same with other links. The issue is with the buttons in this case. Why? Have no idea...


Is 帮忙 and 帮助 interchangeable?

Question: I looked up in the dictionary, 帮 means help, and 忙 means busy while 助 also means help, so is 帮忙 (help busy) and 帮助(help help) interchangeable? Or what is the subtle difference between them? Thanks!
Answer: 帮忙 is more colloquial, it is intransitive or separable. 'A comes to help' translates into 'A来帮忙了' and 'A helps B' into 'A帮B的忙', not *'A帮忙B'.
帮助 is a transitive verb or a noun. 'A helps B' translates into 'A帮助B', the verb is not separated unlike 帮忙. 'With the help of A' translates into '在A的帮助下', usually not '在A的帮忙下'.
Another difference is that 帮忙 is always used for more concrete activities (related to its colloquial state). For instance, 'to help fight against infection' translates into '帮助对抗感染', never '帮忙对抗感染'. On the other hand, 'to help lift the box' translates into '帮忙抬箱子' more often.
Answer: They have the same meaning. But 帮助 is more formal. 帮忙 is used more in oral Chinese. Besides, 帮忙 can't have an object while 帮助 usually have. And 帮助 can be a noun while 帮忙 cannot. Usually they are not interchangeable.
Answer: 帮忙 can only be used as a verb, as in "他帮忙我做事情."
帮助, on the other hand, can only be used as a noun, as in "他给我很多帮助."
Comment: That's misleading. I don't think you can use 帮忙 as 他帮忙我做事情. In fact, 忙 can be treated as an object, and there should not be any other objects (for example, 我). But "他帮我的忙", "帮我(一)个忙" or "他帮我做事情" is ok.
Comment: Or, how about, "他帮忙了我做事情."
Comment: AFAIK, that's inappropriate. If you want to use 了, "他帮我做了XX" is mostly used. "他帮了我做XX" could also be right sometimes. But using both 忙 and 我 is wrong. You can find some details from [here](http://baike.baidu.com/view/165257.htm).
Answer: 帮忙->(verb+object) while 帮助 is a transitive verb or noun. I don't think it's interchangeable because their different grammar structure. 帮忙 is a fixed with an object"忙", for this we can call it 离合词. You cannot say 帮助[我的/他的]忙. However, semanticallay, 他帮我的忙。 has the same meanings as 他帮助我。(what kind of help not specified here).

Is 帮忙 and 帮助 interchangeable?


Gating/Redirecting anonymous user back to an origin page after logging in/registration

Question: I have a use case where I need to redirect a user visiting a page, let's say sprockets/order when a user clicks on an "order" link. We take them to a page with a login field (not user/login, but something with that form). Once they log in, we need to redirect them to that page, or for that matter, any origin page they click from to the login page.
I've looked into a couple of modules, right now Login Destination is the one i'm experimenting with, with no real success, even when its routing is configured to fire from this origin page. I'll keep experimenting with it, but I can't imagine its the only option at hand.
The question ultimately is, with the logic below, is there an approach I can take with how I send users to this specialized login page, and have them return to the origin?
The logic I have for this is as follows:
/**
 * Implements hook_menu()
 */
function hook_sprocket_menu() {
  $items['order/%order_id'] = array(
    "title" => t("Order Sprocket"),
    "page callback" => "example_order_sprocket",
    "page arguments" => array(1),
    'access arguments' => array('interact with orders'),
    "type" => MENU_LOCAL_TASK,
  );

  return $items;
}

/**
 * Routes the order call based on click
 */
function example_order_sprocket($orderid) {
  global $user;

  if(user_is_anonymous()) {
    drupal_goto("custom/user/login"); //The custom login/reg page
  } else {
    //Continue with Order logic here
  }
}

Answer: You can have destination parameter in url. Something like below.
drupal_goto('custom/user/login', array('query' => array('destination' => current_path())));


Remote desktop protocol experience

Question: Whats the internet bandwidth required to have near desktop experience while doing a RDP (Remote desktop )  to windows and linux machines ? I use NX client to login to remote linux machines and Windows RDP to windows machines.
Comment: latency is probably more important then bandwith
Comment: Depends somewhat on how fast your desktop is. :)
Comment: depends on what you include as part of the desktop experience. Viewing files while using only page up/down in Notepad, 150kb/sec is comfortable. Viewing you tube, and gigabit is marginal.
Answer: As already pointed out by xenny it is highly dependent on the refresh rate of the applications you are running. But for most office like desktop applications (not including video) typical usage is around 120-150kbps tops.
I can recommend reading this white paper on RDP performance by ms:
http://download.microsoft.com/download/4/d/9/4d9ae285-3431-4335-a86e-969e7a146d1b/RDP_Performance_WhitePaper.docx
There is also:
http://blogs.msdn.com/b/rds/archive/2009/03/03/top-10-rdp-protocol-misconceptions-part-1.aspx
It's been a few years since I worked with terminal server and RDP so I have very little experience with analyzing RDP performance on windows 7 and win2008R2.

Remote desktop protocol experience


Using Eichler-Selberg trace formula to compute dimension of modular forms?

Question: Is it possible to use Eichler-Selberg trace formula to compute the dimension of modular forms of weight $k$ for $SL(2,\mathbb Z)$? This was computed by classical methods such as Riemann-Roch.
Comment: Yes, the dimension of the space is just the trace of the first Hecke operator.  Use Theorem 2 in http://people.mpim-bonn.mpg.de/zagier/files/google/es-trace-sl2z/fulltext.pdf with $m=1$ there.
Comment: The only relevant values of $t$ there are $t=0$, $t=\pm 1$ and $t=\pm 2$.  And you just need to know $H(0)$, $H(3)$ and $H(4)$ which are provided in the previous page.
Comment: Lucia: Your comments look like a perfect answer to me, why don't you put them in the answer box?
Comment: but somehow theorem 2 can't be computed effectively to reach the same formula given by Riemann-Roch.
Answer: Yes; here's an elaboration of my comments.
The Eichler-Selberg formula (see Theorem 2 of Zagier's http://people.mpim-bonn.mpg.de/zagier/files/google/es-trace-sl2z/fulltext.pdf which appears in Lang's book on Modular Forms) states that the trace of the $m$-th Hecke operator on the space of cusp forms of weight $k$ for $SL_2({\Bbb Z})$ equals
$$
-\frac 12 \sum_{t=-\infty}^{\infty} P_k(t,m) H(4m-t^2) -\frac 12 \sum_{dd^{\prime}=m} \min(d,d^{\prime})^{k-1}.
$$
Here $H(n)=0$ if $n<0$, $H(0)=-\frac{1}{12}$ and for positive $n$, $H(n)$ is a weighted class number for positive definite binary quadratic forms of discriminant $-n$.  Note that $H(3)=\frac 13$ and $H(4)=\frac 12$.  The quantity $P_k(t,m)$ (for $|t|\le 2\sqrt{m}$) is defined as follows: find $\rho$ such that $|\rho|=\sqrt{m}$ and the real part of $\rho$ is $t/2$.  Then (with the obvious interpretation if $\rho$ is real)
$$
P_k(t,m) = \frac{\rho^{k-1}-\overline{\rho}^{k-1}}{\rho-\overline{\rho}}.
$$
The dimension of the space of cusp forms of weight $k$ corresponds to the $m=1$ case of the above formula.  Note that $H(4-t^2)=0$ for $|t|>2$ and so the formula gives, using the values for $H(0)$, $H(3)$ and $H(4)$
$$
-\frac 12 + \frac{1}{12} P_k(2,1) -\frac{1}{3} P_k(1,1) - \frac 14 P_k(0,1).
$$
It's a simple matter to compute that $P_k(2,1)=(k-1)$, $P_k(1,1) = \sin(\pi(k-1)/3)/\sin(\pi/3)$ and $P_k(2,1) = \sin (\pi(k-1)/2)$.  This is the desired dimension formula.
For the sake of completeness, it is worth pointing out that the Selberg trace formula establishes an analogous formula for a weighted trace of Hecke eigenvalues of Maass forms.  Here one obtains class numbers and regulators of real quadratic fields rather than the imaginary fields above.  From the trace formula one can obtain an asymptotic for the number of Maass forms with eigenvalue up to some point $T$ which is the analog of the dimension formula above.  Establishing such a formula was one of Selberg's motivations in developing the trace formula.
Comment: A technical addendum: this computation is fairly delicate, and in the first edition (or so) of Lang's book there was something wrong in Zagier's computation. By now I don't remember exactly what, something about not-absolute convergence and rearrangement (!), but it certainly gave an incorrect result (as opposed to a merely flawed computation of the correct). This was corrected perhaps in the second edition or so.
Answer: An adelic reference for $GL(2, \mathbb{Z})$ is also "Traces of Hecke operators" by Knightly and Li. You choose matrix coefficent at the infinite place and the characteristic function $GL_2(\mathbb{Z}_p)$ times the center, and plug it into the Arthur trace formula. They do that almost for weight $k \geq 3$, but they work with matrix coefficient. This gives the dimension formula. This is likely to be more fruitful for generalization to higher rank or deeper level, where not always a classical treatment is available.
Comment: I meant to say one wants to work with *pseudo* matrix coefficients where KL use matrix coefficients:/


Why are there California border crossing checkpoints that don't seem to do anything?

Question: Why are drivers stopped at the border going into California?

Picture courtesy reviewjournal.com via Google.
There is a border checkpoint on the Interstate 40 freeway that stops drivers going from Arizona to California (but not the other way). When I was a kid, they used to ask if you had any produce and then wave you through when you said No.
When I go through nowadays, I stop at the checkpoint. The guard doesn't say anything to me (or even look at me). After some time from 20 seconds to 5 minutes they wave me to go. They don't come out to my vehicle, ask me any questions or do anything that might seem constructive.
The couple of times that I asked what the deal was, the guy ignored my question and told me to go.
I have also stopped at the Nevada Border with similar results - no questions or any kind of inspection.
What are they actually doing anything at these checkpoints? Is there anything that I can do so I just don't sit there for a few minutes for no apparent reason?
Comment: Practicing for when California secedes.
Comment: Is it possible the guard was looking on a screen at closed-circuit TV cameras surrounding your car, looking for signs of produce?
Comment: Could you record a video next time you go there?
Comment: Are you of a typically discriminated against group, if you don't mind sharing?
Comment: @IanF1 - That's possible but my last truck had dark tinted windows that would make it hard to see in - especially when it's bright and sunny out. My current truck's tock tint is a little lighter.
Answer: It's a California agricultural inspection checkpoint. You can read an FAQ about who they are and what they're doing:

WHAT ARE YOUR INSPECTORS LOOKING FOR?
Our inspectors check vehicles and commodities for compliance with
  California and federal plant quarantine regulations. They also check
  commodities to make sure they are free from exotic invasive species
  that may be hitchhiking with them. Although the primary focus is on
  plant materials (i.e., fruits, vegetables, nursery stock, hay,
  firewood, etc.), other items are also frequently inspected.

They're mainly interested in commercial vehicles, boats, and cars coming from farther away.
Comment: I know that's what it was for but they don't seem to inspect anything nor ask any questions any more. I sit in my SUV while the guy in the shack ignores me for 1 to 5 minutes before waving me through. I think I could have a truck load of plants and bugs for all they know.
Comment: @HannoverFist It has been the case now for some years that they rarely inspect cars with license plates from California or the neighboring states, or even ask for homegrown fruits and veggies, like they used to. In fact, when it's busy, they'll only inspect bigger vehicles like boats, box trucks, and tractor trailers unless you're obviously hauling something like mulch or watermelons or ferrets. News reports say [about 70% are waved through](http://mynews4.com/news/local/whats-the-point-of-the-agricultural-inspection-station-in-truckee) at Truckee, for example, with only a quick visual check.
Comment: Yes - the guy just stands in the booth while I sit in my truck. The couple of times that I asked what he needed, the guy ignored me and waived me through a minute or so later. Like in the picture, no one is walking around any vehicle. A couple of years ago, I was waived through without stopping.
Answer:
California's Border Protection Stations (BPS) are the first line of defense in our pest exclusion efforts. At these stations, vehicles are inspected for commodities infested with invasive species. California established its first agricultural inspection stations in the early 1920s. Today there are 16 of these facilities located on the major highways entering the State (see interactive map). At these stations, vehicles and commodities are checked to ensure they are pest free and meet all regulatory requirements.
Most years, more than 20 million private vehicles and 7 million commercial vehicles were inspected at the BPS. From these vehicles, inspectors rejected over 82,000 lots of plant material (fruits, vegetables, plants, etc.) because they were in violation of California or federal plant quarantine laws.
Watercraft, self-movers, recreational vehicles and utility vehicles comprise about five percent of the vehicles that pass through the stations yearly. Commercial vehicles cover over 25 percent of the traffic. The remaining 70% are classified as passenger private vehicles that are required to be screened for routes of travel determining pest risk and level of inspection. Inspectors are busy day in and day out, filtering and inspecting these 20 million vehicles that come into the State.  As a result, inspectors intercepted thousands of contraband material annually.

https://www.cdfa.ca.gov/plant/pe/ExteriorExclusion/borders.html
This question belongs to Google.
Comment: Why do you say it belongs to Google? You don't even answer the question, just copy-paste the standard explanation. Why does he have to stop when they don't actually inspect his vehicle?
Comment: @pipe I think what he's saying is that this question should have been googled instead. Which is also inappropriate for this site because the goal for this site is for every question to be the first result on Google when searching for something related to the question. In fact, right now, this question is at rank 5 on Google when googling the question that it starts with.


Manual transmission kicks in and out of gear while driving

Question: 1999 Subaru Impreza Outback Sport - I put it in gear, start driving, then it starts kicking in and out of gear. It does this in all gears and reverse. Is it the transmission or an electrical problem?
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: With a bit of luck the shift linkage or engine mounts are  worn/loose, else the gearbox needs an overhaul (expensive). How does the shift lever feel?
Answer: Try driving it as gently as you possibly can, like there's a vat of boiling soup on the dashboard.
If that prevents or reduces the transmission from popping out of gear, you can suspect the engine and/or transmission mounts have torn.
This allows the drivetrain to shift, while the gear shift lever is held by a joint in the body.  This causes the car to "shift" out of gear.
This is a relatively easy and inexpensive repair.  I usually replace ALL of the mounts, unless some others have been replaced recently.