Passing lazy loaded Fluent Nhibernate POCO to multiple worker threads

Question: I'm looking for a bit of advice on what can be done with POCO instances, lazy loaded by Nhibernate (Fluent NHibernate if it makes any difference).
I'm working on a generic implementation for change logging. Reason for doing a completely custom implementation is that change data has to be written in a very specific format to be used for different purposes. Not all information needed can be directly accessed from POCO instance but has to be calculated instead. End result is, change data will be written to a database separate from operational database. The act of writing the data will be done using SqlCommand.
Because the implementation has to be generic to support current POCO classes as well as any future additions it will use Reflection to extract properties of a POCO passed to the change logging implementation.
What I have is:
public interface IChangeLogger
{
    void Log(BaseEntity entity);
}

where BaseEntity is a class every POCO inherits from.
The implementation is
public class DefaultChangeLogger : IChangeLogger
{
    private readonly string _connectionString;

    public DefaultChangeLogger()
    {
        var connectionString = ConfigurationManager.ConnectionStrings["ChangeLogger"];
        Guard.Against<ConfigurationErrorsException>(connectionString == null || string.IsNullOrEmpty(connectionString.ConnectionString));
        _connectionString = connectionString.ConnectionString;
    }

    public void LogChange(BaseEntity entity)
    {
        var logger = new SqlServerDirectChangeLogger(_connectionString, entity);
        var starter = new ThreadStart(logger.Log);
        var workerThread = new Thread(starter) { IsBackground = true };
        workerThread.Start();
    }
}

And then finally the final worker implementation:
public class SqlServerDirectChangeLogger
{
    private readonly string _connectionString;
    private readonly BaseEntity _entity;

    public SqlServerDirectChangeLogger(string connectionString, BaseEntity entity)
    {
        _connectionString = connectionString;
        _entity = entity;
    }

    public void Log()
    {

    }
}

The reason behind having a separate thread is not to bog down the application (MVC3, IIS7.5) and instead do the formatting and logging in a low priority background thread. When front end user updates a record I don't want to delay the response because the logger needs to do it's bit synchronously.
So what the SqlServerDirectChangeLogger.Log() will be doing is using Reflection to extract property values and also load some additional meta data that is then written to change log tables in a separate database in key - value like format.
The issue is as follows:

Web applications use ISession scoped to PerWebRequest. The DefaultChangeLogger would have lifecycle of Singleton. If I am passing in a lazy Loaded POCO and evaluating properties which may trigger lazy loading, requiring an open ISession. ISession will likely be closed by the time it is needed.

Is it possible to get NHibernate to "finalize" a POCO instance? By finalize I mean to force lazy loading to a certain level and possibly disconnect the ISession?
Can I anticipate any other issues by passing an instance like above between IIS worker thread and spawned worker threads?
Any better idea on how to implement change logging? :)
Thanks for any insight.
Answer: You should probably just pass the id of the object to the worker thread and re-query it in that thread.
Comment: Thanks for the suggestion. I did think of this approach and it might be something I have to fall back to.


How do I merge schema changes made to a production database into my migration-managed process?

Question: My team is evaluating dbdeploy for managing database migrations.  As I understand it, using migrations requires a bit of process discipline, namely that a migration is written for every change, and that to reach production, it would have to be promoted from local to development to test to production.
Occasionally our production DBA team makes schema changes directly to the production environment.  If we write a new migration to make the change against our current development version of the database, that migration will never be tested against a schema that already contains the change until the migration is being deployed to production.  This concerns me.
The other option is to make the change directly to the baseline schema, then rebuild the database in all environments (local, development, test, stage).  This approach concerns me, because the new schema could cause one or more migrations to break.
How are people currently handling this scenario?
Answer: We restore a copy of our production DB onto a test server overnight.
This then serves:

As a reference copy (code and data)
We can reset any changes we've made
We can test against real data
We can side by side new/old code preformance
We can generate 100% safe change/rollback scripts (Red Gate)

We don't rebuild dev/test databases etc but some of our fellow projects do. However, I'm not sure of the benefit because a database is not schema and code: it's data too. It's different to a complied .net app.
In my shop, a production DBA making changes to a prod DB (any change at all) without approval would be fired. And it's happened.
Answer: It is understandable that DB changes on the production schema have to happen from time to time. It is very important though that these have to be documented and communicated ASAP back to the development team. Plain text with the sql executed together with comments on affected use cases/functionalities and possible bug tracking issues would do
Fetching the live DB back to the development every now and then and comparing it (it's schema) with what the developers have is a good idea as well.
Answer: I assume that the only thing DBA can change on production DB is to add an index here and there and tweak a few sprocs - all for the sake of performance. All other changes to the DB can, generally speaking, render DB schema to be incompatible with the application.
With this in mind, the only thing that actually should be versioned are sprocs, and it's the responsibility of a DBA to check them into source control. Indexes are much more volatile and may actually not be included in migration scripts.


Replacement for HAXM on ubuntu - says Intel x86 Emulator Accelerator is not compatible

Question: I'm using Android Studio and I need to add Intel x86 Emulator Accelerator to it's not compatible with Linux. Is there any software I could use instead and how would I install it onto Android Studio?
Answer: Check if your CPU supports hardware virtualization,  by typing:
egrep -c '(vmx|svm)' /proc/cpuinfo

If the result is 0, your CPU does not support hardware virtualization, which is necessary to run the KVM. If you get 1 or more, that means you're fine.
Next, install KVM. First make sure if your processor supports KVM by typing:
kvm-ok

You will see this if that's the case:

INFO: Your CPU supports KVM extensions INFO: /dev/kvm exists KVM
  acceleration can be used

If this is the result, you need to turn on Intel VT in BIOS:

INFO: KVM is disabled by your BIOS HINT: Enter your BIOS setup and
  enable Virtualization Technology (VT), and then hard poweroff/poweron
  your system KVM acceleration can NOT be used

The next step is to install the KVM and a few other packages needed. To do so, type:
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Add your user to some groups, replacing  by your own username:
sudo adduser <user> libvirtd
sudo adduser <user> kvm

Check if everything is ok:
sudo virsh -c qemu:///system list

Source.
Comment: Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Comment: After reading doc at https://software.intel.com/en-us/blogs/2012/03/12/how-to-start-intel-hardware-assisted-virtualization-hypervisor-on-linux-to-speed-up-intel-android-x86-emulator   on a 64 bit ubuntu 16.04 I issued suggested set of cmds shown above in your answer  then   I was able to launch HAXM accelerator using syntax   /path/android-sdk-linux/tools/emulator64-x86 -avd     -qemu -m 2047 -enable-kvm
Comment: After following your steps when I launch android to manage SDK and I checkbox ON the `Intel x86 Emulator Accelerator (HAXM installer)` it ignores my request and does not install ... ?
Comment: @ScottStensland I think SDK manager doesn't have the (root)privilage(maybe) to install, Same in windows, When i don't give administrator access, It won't install it...Check this point and let me know.
Comment: One more thing, In windows, When user checkbox on this installer, It will download the packages, *But it doesn't install it*. I think in your situation, You'll need to find it and then install it manually, As well as we do this on windows...The path in windows is : `C:\Program Files (x86)\Android\android-sdk\extras\intel` maybe this can help to install it manually...
Comment: In above solution, libvirt-bin is obsoleted, and instead of it use libvirt-daemon-system.


What order do I watch ALL BSG shows

Question: So i just finished watching Caprica, in what order do I watch the rest BSG? To include, but not limited to TV, mini series, and anything else.
Comment: Skip the original series (1978) and _Galactica 1980_. Unless you're a BIG fan of bad writing, bad acting, cheesy special effects, and late-seventies hair.
Comment: @sjl You left out mis-casting. I don't remember the acting being that bad though, it was just the lines they had to say that were terrible.
Comment: @MrLister I'm sure you're right about the acting. I have managed to repress most memories of anything specific about the show -- except the hair. "In a world ... where the Earth is only a distant memory, the last link to the home planet is _blow dryers_."
Comment: @sjl Absolutely agreed about that. No dispute! Just saying that many of the actors were simply good actors, that happened to be in the wrong place, with the wrong scripts.
Comment: This is clearly a duplicate. The author is asking specifically which order to watch the re-imagined BSG.
Answer: My stock, standard answer for all "viewing order" questions - the production order. Why? Because this is the order in which the writers and creators developed the stories throughout, and even if non-serial work (like Razor) is set in the middle of previously produced episodes, you won't fully appreciate those parts until you've seen the (in-universe) later episodes which were produced first.
So, all of series 1, 2 and 3, then Razor, then all of 4, and then The Plan (definitely, absolutely, leave this to the last unless you want to spoil the entire series). If you can watch the webisodes (unfortunately, not available to Australians), then probably do that before The Plan.
I know some people think you should watch Razor chronologically - but there are a couple of spoilers.
And, as has been suggested, avoid the original series unless you like camp 80s scif-fi.

What order do I watch ALL BSG shows


What is faster cutting or copying a file?

Question: To get large file from one place to another what is faster cutting or copying a file ? What factors can influence the result?
I've heard it matters if they are on the same drive and the speed of the drive, but don't know for sure.
Answer: It depends on some factors.
If you're moving the file on the same drive and partition it will be faster to cut/paste than to copy since it's not actually moving the data.
If it's across partition or drive boundries it will always be a copy or copy+erase so the difference is minimal.
Answer: On the same disk, cutting, by a considerable margin.
On different disks, Copying, by virtue of cutting would require the original to be deleted, which would take a tiny amount of time.
Answer: If we are cutting(moving) within a same disk, then it will be faster than copying because only the file path is modified, actual data is on the disk.
On the other hand, if the data is moved(cut) from one disk to another, it does 2 things, copying files to another partition, also deleting the main data from source. So time taken will be (copy+delete)
If the data is copied from one disk to another, it will be relatively faster than cutting because it is doing only COPY operation.
Answer: There's nothing faster than nothing.
Same drive >
Moving is instant
Copying is slower
Different drive >
Moving is Copying + Erase original data
Copying is Copying
The fact is that erasing a bigger file takes little time to be deleted.


Quality High Intensity Laser for Interference Experiment

Question: I am trying to do a variation on the double slit experiment in order to see how interference patterns change if the relative amounts of light passing through each slit change. I think I have the apparatus figured out, but my experiment requires the laser to be passed through three polarizers. As a result, the intensity is greatly diminished. I currently own a laser pointer which cost me about $10 and was advertised at 5mW, though I am tending to doubt that because the beam is not much more powerful than a 1mW laser from Pasco Scientific. In any event, the majority of this lasers intensity is lost by the polarizers so that once it is time to measure interference, it is difficult for the photometer to pick up distinct, clear interference patterns (I am using a light sensor from Vernier). Does anybody know where I could buy an affordable laser, or laser pointer, which could give me reliable interference patterns even after being placed through all the polarizers? I am not horribly concerned with overall beam quality as I have found that my cheap laser pointer gives me clear interference, but is simply not powerful enough. I was thinking of buying something in the neighborhood of 15mW. Any thoughts on the subject would be appreciated.
Answer: Choosing the laser for your project consider 2 aspects:
1) Laser power:  using 3 polarizers you need more power than 5 mW. In university didactic labs are commonly used He-Ne lasers for interference experiments, the one I used had a power about 150 mW and we had just one polarizer and a diffraction grating made of plastic (so don't be afraid of that power, it won't fry your hardware).
2) Photometer spectral sensibility: just like our eyes, photometer has a spectral sensibility which depends from the wavelength of incident radiation (e.g. our eye's top sensitivity is reached from green light, have you ever noticed that green laser pointers seems to be much brighter then red ?).
So in my opinion you should buy a 80-150 mW He-Ne laser for your experiment, or a laser not so powerful but at least of a WL which maximize detector sensitivity
Comment: The photometer is designed for a laser of <1mW red laser, so 80-150mW seems kind of large. Am I correct, or am I missing something? Also, where would I buy a laser with that much power?
Comment: You can consider filtering the laser in order to attenuate the power or use semitransparent mirrors.

Lasers of that power are commonly sold on ebay
Comment: Have you considered something like this ? (or something similar)

http://www.ebay.it/itm/Laser-Modul-532nm-40MW-grun-LED-MS-3-/221610337048?hash=item3399016318:g:omwAAOSw7hRWQXZs


Where is the high voltage measured at in a transistor based AND gate?

Question: I am experimenting with basic logic gates on multisim. From my understanding in digital logic the 0/1 represent output voltages of 3.3 - 5 and 0 V. My logic gate pictured conducts a current when 5 V is applied to the base terminals but nowhere in the output do I measure a voltage in the high range and the output of an AND gate should have 3.3/5 volts on it when high if I am not mistaken. Is the current just converted to a voltage or did I connect something incorrectly here. Thank you guys.
Comment: The transistor measures base voltage compared to its emitter. This means if the base is 5 volts but the emitter is also 5 volts, the transistor is off because the base-emitter voltage that would turn it on is actually 0 volts.
Answer: This circuit (and many others in introductory texts) is not an AND gate that can be combined with other gates of the same type.
For some of the simplest such circuits, check out 1960s-era RTL logic. For example, the RTL Cookbook from Donald Lancaster (RIP). He used somewhat unconventional symbols by modern standards.
For example, this 2-input NOR gate:

You can add an inverter to each input and get a positive-logic AND gate.
Comment: Thanks for the link, I used that book for many years.
Comment: I'd add that in my opinion at least, basic familiarity with RTL and DTL is valuable since it makes it far easier to understand how early computers etc. were built with what would appear to be a ridiculously low number of active components.


Passthrough PS/2 keyboard to guest OS

Question: OS Windows run on VM (ubuntu, libvirt, qemu-kvm). And I have PS/2 keyboard on host hardware. Is there any way to pass it to guest OS without lost of performance (maybe emulate USB keyboard with keys mapping from PS/2 keyboard). I tried to use Spice server (from libvirt GUI "Virtual Machine Manager"), but it gives very annoying delay when pressing keys.
Answer: First you must use virsh edit <vm-name> to modify the configuration XML, as you can't do this through the virt-manager GUI.
Check your top-level <domain> tag.  It should look something like this:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

If the type isn't kvm, you've boarded the wrong flight - start over with a new VM.  If the xmlns:qemu attribute isn't there, add it.
If you already have a <qemu:commandline> section, then add these two lines inside it:
<qemu:arg value='-object'/>
<qemu:arg value='input-linux,id=kbd,evdev=/dev/input/eventN,grab_all=on,repeat=on'/>

If you don't, then create it right under the <domain> tag with those two tags inside it.
You will also need to create the keyboard device in the guest using the following XML, which you should add to the <devices> section:
<serial type='dev'>
<source path='/dev/input/eventN'/>
<target port='0'/>
</serial>

The second qemu:arg and the source path defined here both have eventN defined.  You will need to replace N with the input device number for your keyboard.  Don't change the target port - just the source path.
My keyboard device is 2, but yours might be 0, or some other number.  To find out which one yours is, do dmesg | grep input and look for your keyboard device.  Mine says:
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2

You still want to use the path of /dev/input/eventN - this just lets you know what the right number is to use for N.  If you're using X with evdev, which you probably are, you can also find this information in the X logfile.  One caveat: Your device number might change if you reconfigure your host hardware.
Your keyboard will no longer be recognized by the host while you are using it in a guest.  To control the host, you can:

Exit the guest, or
Attach another keyboard via USB, or
Log in via ssh, or
Use a serial console.

I got most of this information from this link:
https://www.reddit.com/r/VFIO/comments/5hja2k/how_do_you_pass_through_a_ps2_keyboard/
Answer: I tried the steps from the other answer on Debian Bullseye and would like to update some instructions. I suggest to use journalctl -b and then search for input.*keyboard. My system had a longer uptime and dmesg did not show those lines anymore. I found:
kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/in>
systemd-logind[2716]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard)

With this I knew my keyboard was using event0 at the moment an thus I could find it via ls -l /dev/input/by-path as /dev/input/by-path/platform-i8042-serio-0-event-kbd.
Since libvirt version 7.4.0, the domain XML supports <input type='evdev'>. I updated libvirt from bullseye-backports to get version 8. So, all I had to add to my VM XML was:
<input type="evdev">
  <source dev="/dev/input/by-path/platform-i8042-serio-0-event-kbd" grab="all" grabToggle="ctrl-ctrl" repeat="on"/>
</input>

Note the additional grabToggle="ctrl-ctrl" which allows to switch keyboard between guest and host by left ctrl + right ctrl.
I got this from Archlinux wiki. This also contains suggestions for further delay reduction by "switching from PS/2 to Virtio inputs", but I have not tried this.
The benefit of this approach is that you do not have to configure additional ACL/permissions for Qemu to use your keyboard. This caused problems on my side when I tried the approach with the qemu:commandline section.

Passthrough PS/2 keyboard to guest OS


Is there a better way to move around and view a big scene?

Question: My problem is that I have a huge scene with meshes and (let's say) I see this scene for the first time. I do not know it, I want to look around. I can use the controls like
MMB  plus look around, ⇧ Shift + RMB  (but scene is too huge for this).
Then I select some objects on the hierarchy and press numpad . (but as I said: I do not know the scene and/or the object names can look like all the same as well), what will take me there.
I know, I can use the fly camera mode, but that is well... kinda hard to use, for me at least. Is there a better way to move around? Like in a game: WASD + mouse look? (I do not want to move my camera, my goal is to move my editing area to a specific position / angle)
Comment: Related: http://blender.stackexchange.com/q/3327/599
Comment: Also see: http://blender.stackexchange.com/q/644/55
Answer: Since 2.70 there is a walk mode (like a game). Press Shift F to enter walk mode. Then use either WASD or the arrow keys to walk and the mouse to look around.
To speed up walk mode.

during walk mode you can point the mouse cross hairs at any object and press space to teleport there. (I find it really neat)
holding shift will speed up any of the movements.
NumPad + or Mouse-Wheel up to increase the movement speed for that one time, when you exit walk mode the speed goes back to what it is set at (see next point). There is no feed back to changing the speed, just hold the button for a bit. Likewise NumPad - and Mouse-Wheel scrolling down will decrease the speed.
If you want to make any lasting speed changes you can go the the user preferences, on the input tab down on the left is a section for the walk mode entitled View Navigation. Change the Walk Speed, also the Speed Factor is how much holding shift or alt will change the speed.

If you want to zoom right in on any object or objects with NumPad . you can select the objects in the 3D view, you do not have to select them in the Outliner.
Answer: Like David said, the walk mode since 2.70 is a good way to start.
Additionally I want to add this:
http://wiki.blender.org/index.php/Doc:2.6/Manual/3D_interaction/Navigating/3D_View/Navigation_Modes
You can adjust the speed with Mousewheel Up/Down
And you can also start the Fly Mode with Tab
Teleport to a point with Space
Answer: Set up cameras for each view you might want then select one in the outliner and switch to it in view menu.
Answer: For anyone looking to replicate the navigation in other 3D software I've been able to come close. The solution below allows you to press the middle mouse button then you can navigate the scene using wasd and moving the mouse.
Go to Edit... Preferences... Keymap...
Search for "View Navigation (Walk/Fly)" (AKA: view3d.navigate) and set it to middle mouse button like this:

Delete these two interfering mappings by clicking the "X" on the right of them (or change them but you probably won't need them anymore with the new navigation style) :

(This ones hard to find I search for "middle mouse" and scroll...) Delete it:

Unlike other 3D software this activates when you click the middle mouse button not by holding it in (which I would prefer let me know if you figure out how, I've asked here). This means you need to disable it when you want to go back to doing something else by left clicking, right click makes you jump back to the last location you were at, which I'd prefer it didn't do.
I also tried to associate this with the right mouse button but didn't have any luck due to it interfering with the context menu and so many other things.
Comment: Super cool stuff! You answer gave me a push into trying Blender again. I got a step further even: I got it so that on right mouse button press I enter into Walk/Fly Mode and on right mouse button release I leave it. The trick is to bind "View3D Walk Model" -> confirm to right mouse button release. I also used a python script to change all other right mouse button actions to require the alt key pressed as well.
Answer:
Blender 4.0
⇧ Shift +  ` Walk Navigation
View > Navigation > Walk Navigation

Much better than Fly Navigation, follow @DoubleVoid hints


Deciding how many random sampling points needed for specific area?

Question: I have a study area (forest) around 25he. I would like to randomly have sampling points (center of the sampling plots) there. How many points (plots) I need in related to the area of my case study? is there any rule for calculating the number of the random points?
Comment: It depends entirely on what you're studying. "Sampling" allows for a huge range of possible answers.
Comment: between 1 and infinite. It all depends on what you are collecting If it is slope and perfectly flat one point may be enough. if it is tree DBH and you have 1000 trees of all differing species and ages (like a botanical garden) you may need 100s.
Comment: Have a look on [ArcScripts](http://arcscripts.arcgis.com/), there are various user community created tools for sampling.
Answer: Do you have a specific hypothesis? What type of analysis or statistical model are you intending? The number and spatial distribution of sample points is completely dependent on these considerations.
Commonly, random sampling is applied to avoid spatial autocorrelation, which can have a profound influence on certain linear models. However, if you are wanting to incorporate spatial process into a model, you need to ensure that the sample captures some type of autocorrelation process in the data, which can sometimes be accomplished by simply increasing the sample intensity. In the case of sampling for a spatial process I would recommend a stratified random sample in lieu of a purely-random sample.
There are two important considerations:

1) Are you capturing or minimizing autocorrelation - In sampling
  autocorrelation this could mean creating a sample that represents a
  specific type of autocorrelation following a hypotheses of spatial
  process or just rejecting a null of CSR (Complete Spatial Randomness).
  To minimize the effect of autocorrelation you could, in theory,
  generate a random sample that accepts a CSR Poisson process.
2) Are you adequately capturing statistical variation - This has
  to do with sampling the distributions of your dependent and
  independent variables. For instance, it you want to make an estimate
  the incorporates elevation [500-2500] but you only sampled in the
  range of [800-1000] then the sample variation of elevation has not
  been adequately captured. To evaluate this just examine the sample
  distributions against the population distributions. This is a critical step in exploratory data analysis.

If you are wanting to make a spatial estimate (eg., model forest biomass, species distribution), capturing spatial and statistical variation are both of paramount importance. In directly addressing your question of "how many samples" you could use a mean expected random distance and test multiple realizations of a random n to test if you are accepting or rejecting a random spatial process. This can be done using a simple test statistic such as the nearest neighbor index.
<code>Mean Nearest Neighbor Distance (observed); D(nn) = sum(min(Dij)/N)
Mean Random Distance (expected); D(e) = 0.5 SQRT(A/N)
Nearest Neighbor Index; NNI = D(nn)/D(e)
  Where; D = neighbor distance, A = Area
</code>
If you are working in the ArcGIS ecosystem, this statistic can be calculated using the Average Nearest Neighbor tool in the Spatial Statistics Toolbox. This is one of the few tools in the toolbox that I recommend using but keep in mind that it is a very simple measure of spatial process. The advantage is that it works entirely on the point locations, unlike statistics like Moran's-I or Getis-Ord that require that the points have an associated continuous value.
Please keep in mind that sample design is not a trivial issue and more consideration than "what script should I use" should be given to the design. I spend considerable time with students performing post mortems on their sample design and how it cannot address their question/analysis. In my quantitative ecology course I spend over two weeks on sample/experimental design alone.
Comment: Thanks! based on your explanation, I found that 40 sample plots is perfect for the area (25 he).ANN ratio was 1.074 and the given z-score of 0.8993238 shows the pattern does not appear to be significantly different than random. The spatial distribution is random. However, I didn't get such result for 50, 60,and 70 random plots for the area.


Finding British Columbia township grid?

Question: I'm looking for a shapefile of the Dominion Land Survey township grid for British Columbia. Where might I find this data?
Comment: Related question: http://gis.stackexchange.com/questions/141376/ where I'd come across a [thread on Esri GeoNet](https://geonet.esri.com/thread/16426) that was asking specifically about BC. More information at that linked question describing how it is apparently maintained province by province.
Answer: Try this
Data – Canada Lands Surveys
Comment: That is a potentially good resource which came up in my quick search, but preliminary browsing around didn't see the requested data available anywhere. If you know for sure it is available there, directions on how to find it would be helpful. Otherwise this might be better as a comment than an answer (particularly given it starts with 'try').

Finding British Columbia township grid?


Failing over to mirror instance when not using a witness server

Question: I have a set up where I have two SQL servers set up for failover mirroring to two other SQL servers.
I am not using a witness server.
I had previously used a witness server and that of course would automatically failover the databases when the primary would go down.
Now without using a witness database, how do you manually failover?
If I right-click the database on the mirror instance and click Tasks > Mirror, just get the database properties window, no option to "failover" or make the mirror the primary instance.
Of course if I do the same from the primary database I get the option to failover to the mirror but I obviously can't do this if the primary server is down.
Any ideas?
Answer: If my understanding is correct mirroring phase begin using restore database with norecovery option. So you should restore database with recovery


Can I travel to Schengen countries with a Czech Republic employee card?

Question: Can I travel to Schengen countries with a Czech Republic employee card?
Comment: What is an employee card?  (If it is an employer-issued ID then it is not generally going to be useful for travel.)  Are you traveling by air?  By private car? By bus?  By train?  Are you traveling directly from the Czech Republic or from some other country, or by way of some other country?
Answer: I think you are actually asking if you can use a Czechia government employee card as a form of government-issued identification to travel within the Schengen area.
Typically, you are required to have a national identity card from a Schengen country to travel within the Schengen area, or if you are not a Schengen-area citizen, a passport from the country of your citizenship.  While using a Czechia government employee card may be decent evidence of a right to live in Czechia, it is unlikely that other countries will recognize it and you will be taking unnecessary risks trying to travel with it.
Travel with your Schengen country ID card, if you are a citizen of such, otherwise travel with your passport.  (A passport is always OK, even if you are a Schengen area citizen.)
Answer: If you have a legal permission to stay and work (tourist or national visa) in any Schengen country like Czech Republic you can travel to any other country of Schengen zone by air or land transport.
Comment: However, he may be required to carry a passport *or an acceptable substitute.*


Gender-based name endings: Are they common?

Question: For instance, if an English name ends in -a, it's likely female.  But English has no grammatical gender, and there is no general requirement that nouns in -a refer to women.  It seems like in English this is a pattern that applies exclusively to names.  Does this sort of pattern occur in other languages?
Comment: Many languages have gender marking patterns like this for *all nouns.*  For instance, Spanish nouns in *-a* are overwhelmingly likely to be feminine, and this is true both for personal names and for common nouns.  In English, on the other hand, we don't have gender marking for common nouns, but we *do* have the strong sense that personal names in *-a* are feminine.  Would the Spanish pattern be an example of what you're talking about, or are you just asking about the sort of pattern we have in English?
Comment: Please bear in mind that in the European culture a huge number of names, maybe the majority, are of Hebrew or Greek/Latin origin, and therefore the *-a* can't really be considered an *English* ending.
Comment: Hello zzxjoanw, do you mind expanding this question a bit so that it's reasonably scoped and narrowed? Do you want answers for *all* languages? :) Also, they are common but every language has exceptions, of course, so I'm not sure what you're looking for. Help us to help you improving your question. :)
Comment: I wasn't asking so much for a list of languages that have this as much as whether it's a common thing (however you define that).

@Dan: I'm referring more to the English pattern for first/given names.
Comment: I should have phrased that better. I meant 'used in English speaking countries'.
Comment: @user839 You can edit your question to improve it. :)
Comment: The same "ah" ending appears in modern female Hebrew names. Japanese has a "ko" motif. Generally you want a phoneme marker for name gender.
Comment: I took a stab at editing the question.  User839, feel free to edit further or remove my changes if you don't think they're useful.
Answer: This tendency ultimately comes from Proto-Indo-European (PIE), which is the common ancestor of many of the languages in which the pattern seems to hold.
PIE had three genders, like Latin, Sanskrit and Ancient Greek, and like in Latin, one set of stems was stereotypically masculine or feminine (ō-stems and ā-stems respectively, corresponding to the Latin second and first declension respectively).
The early daughter languages (and many modern descendants) declined personal names just as they declined common nouns. If there were noun paradigms which were stereotypically masculine or feminine, I would expect that personal names would be chosen to coincide with this.
As a point of conjecture, a bunch of personal names derive from attributes. If PIE speakers took attributes (adjectives) as names, then those personal names would take the same paradigm as adjectives, including agreement for gender and usual declination for case.
Comment: Japanese tends to end female names in "ko", no PIE there.
Comment: Japanese names that end in "ko" tend to be female (maybe always? I don't know) but the reverse is not true at all. So it's just like English -a.
Comment: "PIE had three genders." And you know this how? The PIE gender system has always been an extremely contentious issue. And by no means it has been settled. However, the current consensus is that there were two genders in PIE, e.g. Luraghi 2011. Melchert in his most recent publication  contends that "the development of the feminine gender is
a common innovation of the non-Anatolian Indo-European languages."
Answer: While Old English did have grammatical gender, it is completely extinct in that native words are not at all perceived as masculine or feminine according to their endings. The survival of perception of gender-based endings for names is probably attributable to extensive language contact with languages that have them. Particularly, as with many European languages, lots of Christian names were imported via Romance languages.
We would expect gendered name endings in the absence of grammatical gender to be peculiar to a few languages like English that both lack gender and have borrowed names extensively.
However, a similar phenomenon could apply in languages which retain grammatical gender whose inflections either have been sound-changed or are distinct from those of a language from which it borrows many names. The result is distinct inflections for common nouns and (subsequently-)imported names. For example, native German nouns inflect with various combinations of /ə/ /n/ /s/, whereas many female given names are instead indicated with /a/.
Interestingly, most Slavic languages take gender-based endings further: they even inflect surnames and patronymics according to gender. For example, Леонид Ильич Брежнев had a son named Юрий Леонидович Брежнев and a daughter named Галина Леонидовна Брежнева,
Answer: Most European female names end in "a" whether they are older or modern.
The reason for this is the way Indo-European languages create gender in nouns.
By analyzing the grammatical gender of the nouns and names ending in a
we can see a clear correlation: the gender of the common nouns reflects
on the gender of names.
For example the Spanish has approximately 89% feminine nouns with an a ending and
98% given names with the same ending.
The article "Why most European names ending in A are female" shows statistical
data to support this theory for the Latin languages, Slavic, Illyrian, Germanic,
Baltic and Celtic.
Answer: I'm not exactly sure what you're looking for here, but to give you an example of a language that you could say does show this, you could look at Welsh.  There are girls' names that end, for example, with the suffix -wen (e.g. Branwen, Gwen, Awen) where the suffix carries the meaning 'white, fair'.  There is a masculine counterpart to this in names like Gwyn or Wyn, also carrying the meaning 'white'.


How do you practice to play with perfect note accuracy?

Question: We've all seen high level pianists play with immaculate polish on their notes.  How is this done?
Comment: Actually, professional pianists sometimes play fistfuls of wrong notes in live concerts - but they usually edit out the mistakes in studio recordings.
Comment: To create the impression of perfection in a listener, a musician only has to become skilled enough that their playing is more precise than the discernment of said listener. In other words, someone in the audience might hear zero mistakes in the same performance where the musician walks off stage and immediately complains to a friend about how terribly they played.
Comment: Something my school music teacher told me many years ago: - An amateur will practice until he can play it right, a professional will practice until he can't play it wrong.
Answer: well, you know, lots of practice.
i'd say just record yourself.  video and audio.  break the song into 4 bar loops with a few beats' overlap.  don't go to the next loop till the one you're on is perfect.  and always end a loop's practice on a perfect take so your nerves get wired like THAT overnight.
but, in the end, nobody cares about perfection except the musician.  you should care about it.  but you really can't expect to play perfectly every dang time through the piece.  your average take can be pretttty close to perfect, though.
Answer: Hard to know where to start with this one! You need to practice around the clock, have good teachers, a good dose of innate ability, money...
Most importantly, you need to listen very closely to yourself & others playing. It also helps to have a nice piano & quality recording equipment.
Answer: A high level concert pianist will practise a minimum of 8 hours a day. You'd think at that level they wouldn't need to practise much at all. However, usually without the music in front of them, they have to be note perfect, and that's the best proven way to do it, as the other answers also say.
There is also the propensity for players at that level to be able to make mistakes that they can recover from. Mistakes for them won't often be wrong notes, so the audience won't hear things like that, but could be a different voicing in their piece, playing over someone else in the wrong place, or forgetting a repeat. They will have played the piece so much that it'll be an almost automatic correction that, unless the listener plays the piece themselves, or has heard it thousands of times, won't be spotted. And even if that's the case, it could be argued that that was the preferred way the performer wanted it!
Answer: You know what they say:

"Miss one day of practice, I notice; miss two, the orchestra notice; miss three, the audience notices"

You need lot of practice to achieve this levels. Actually, professional pianists sometimes play a lot of notes wrong in concerts.
"A musician only has to become skilled enough that their playing is more precise than the discernment of said listener".


Godox x1r x1t and canon speedlite 430exii

Question: I was waiting for your kind reply on how to synchronise the godox x1r x1t & canon speedlite 430exii..
Thank you
Comment: What problems do you have? Have you followed the instructions in the user manual? http://www.godox.com/EN/InstructionManual/Godox_X1C_20170906.pdf
Comment: What have you tried that did not work?
Comment: Different transmitter, same system. Probably same issue. [How do I set up a Godox X2Tc to control a Canon Speedlite 430 EXII](https://photo.stackexchange.com/q/112033/15871)
Answer: When we have similar questions here, it's almost always the same thing.
I'm going out on a limb here and assume you have the transmitter properly attached to the camera's hot shoe with on-camera flash enabled in the camera's menu. As far as the camera is concerned, the X1T is the flash.
I'm also going to assume you have the 430EX II properly attached to the Godex receiver with the flash not set to slave mode. As far as the flash is concerned, the X1R is the camera.
We'll also assume both the X1T and X1R are both set to the same channel and group.
What else could it be?
In addition to Group and Channel, the newer Godox/Flashpoint transmitters and receivers (both internal and external) have the ability to designate an ID number of 1-99 (plus "Off"). The older pieces of the system do not have the ability to use ID numbers. In order to use the older pieces with the newer ones, the ID number setting needs to be "Off" on the newer units. Even with the newer units, the ID numbers that are set on each unit must match each other or the other unit will ignore it.
If your X1R-C uses firmware version 18 made since January 10, 2018 then the following instructions allow you to set the "RF ID" on the X1R-C:

The customer can set RF ID. Operation: press the CH and GR button simultaneously and power it on to enter the RF ID setting interface. Short or long press the CH button to add the ID value while short or long press the GR button to decrease. Power off the flash trigger after 5s, and ID value can be set and saved. Then, power it on, and the ID value will affect RF reception.

To check what firmware version your X1R-C is running hold down the group button [GR] while turning the X1R-C on. The firmware version will be displayed as long as you hold down the [GR] button. When you release the [GR] button the firmware version will no longer be displayed and the channel and group number will be displayed.
There's a micro-USB port under the rubber flap on the left side of the X1R-C that will allow you to attach it to a computer to update the firmware using the Godox G1 Firmware updater software.


Save list as template - include content and deploy on new site

Question: I am going to upload my list template onto a live site, don't have the option of testing first. Will the .stp file include the content type used by the list. Also where will it be uploaded to on the new site e.g Site Content Types or List Template Gallery or where?
I am using SharePoint 2013.
Answer: Question: Will the .stp file include the content type used by the list?
So answer of this question is, no the content type will not be included with the list template.
Question: where will it be uploaded to on the new site?
We upload the .stp file in List Template Gallery. So, it will be stored there in certain. and then you can create a new list from this list template from "Add an App" option. You will find the uploaded list template here.
Hope it will help.
Answer: When saving the list as a template you get the option "Include content". So depending on your selection content will be included, but I think there is a limitation regarding the max. size of list templates (which was pretty low in SP2010, I think 10 MB) I will doublecheck on that...
Comment: No, the content type will not be included. And I dont think there is a way to include it in a list template. Only chance to copy the content type into another site collection would be to use the content type hub (which might introduce other challenges...)
Comment: First addition: The template will be uploaded to list template galery.
Comment: And the content type of the list, will that also be included if i select "Include Content"??
Comment: Will the content type also be in the "List Template Gallery"?
Answer: Create a list template

Open the list that you want to save as a template.
Click Settings and then click List Settings.
In the Permissions and Management column, click Save list as template.
The Save as Template page appears.
In the File Name box, type the file name to use for the template file.
NOTE: Do not add a file extension to the file name. The .stp file extension
is automatically added for you.
In the Template name box, type the title that you want to appear in the list template gallery for this template.
In the Template Description box, type a description for the template.
To include the content that is currently in this list in the new list
template, select the Include Content check box.
NOTES:
This step does not save any security settings that may have been applied to
the list. Because of this, we highly recommend that you save this list
template to a secure place so that it cannot be restored by someone who
should not have access to this content.
By default, you can create a list template that contains up to 10 megabytes (MB) of content. Server administrators can increase this size limit, if necessary.
Click OK.
The new list template appears in the list template gallery.

MSDN


Discussion Board replies as threaded view in SharePoint 2016

Question: I want to display replies on discussion topic as a threaded view instead of Flat view. In SP 2013, i see threaded view is available which might do this job but i cant see threaded view in SP 2016. Is there any other way i can achieve this?
Answer: Yes, you can get a threaded view. No, you can't get it on SharePoint itself (that I'm aware of).
How can you get a threaded view?
My current workaround is syncing the discussion list to MS outlook. Once synced, you can select this list and then click in the menu "view" on "conversation settings", where you can check the box for the "Use classic indented view". Wonder above wonders, you suddenly get an indented ("threaded") view on each discussion.
Added bonus: you can see which items are new (they are marked as unread). No more scrolling through discussions to see from where the new replies start!
The list in MS Outlook stays synced and you can even reply from directly in MS Outlook as well.
There is one bug you have to take into account: when you start up in the morning, it's possible Outlook doesn't sync the discussions. According to our IT department, this has something to do with the authentications, but it's not enough of an issue for MS to solve as you can simply close Outlook and restart it and the syncing works for the remainder of the day.
If you want to get a threaded view on SharePoint instead, I suggest you vote for this feature on UserVoice.


Would the existence of a universal wave function automatically mean the Many Worlds Interpretation?

Question: If the Universal Wave Function definitely existed, would that mean the Many-Worlds Interpretation was automatically true or would it only imply that?
Comment: No, correct me if I'm wrong but objective collapse theories _also_ posit a universal wavefunction.
Answer: It would imply that we are entities bound by the laws of quantum mechanics, and thus there are no truly classical observers to observe the system.  The QM interpretations are only needed to explain their behavior with respect to a classical observer.
Decoherence based theories would be the natural winner.
Answer: The concept of "wavefunction"is inherent in the definition of Quantum Mechanics,in the same way the concept of mass is inherent in the definition of classical mechanics: it is a mathematical function which is used to model data and predict physical behavior of matter at small dimensions .
Present physics modeling assumes that the underlying microscopic interactions obey quantum mechanical equations, and it has been shown that the classical theories emerge from this underlying level. In this sense a universal wave function, assuming extreme measurement accuracies, exists and has been modeled with the density matrix formalism .

[The many-worlds interpretation] (MWI) is an interpretation of quantum mechanics that asserts that the universal wavefunction is objectively real, and that there is no wavefunction collapse. This implies that all possible outcomes of quantum measurements are physically realized in some "world" or universe

As in principle a universal wave function exists,  the crucial word is "interpretation". It means that the  proposal  gives exactly the same numerical  predictions for new studies , just a different way of interpreting the internal functions.

would that mean the Many-Worlds Interpretation was automatically true or would it only imply that?

The universal wavefunction exists, can be formulated mathematically . The mathematics is true, but  the many-worlds interpretation of the mathematics is just a different optical angle,there are  no new predictions to be able to distinguish if it is valid or not.
Comment: Thank you for your answer. What I meant was specifically regarding what that quote said "(MWI) is an interpretation of quantum mechanics that asserts that the universal wavefunction is objectively real", that being the objective existence of the UWF as more than just math. Like, does Copenhagen contradict EVERYTHING, including the observer being part of the UWF (cuz of measurement)? If I recall correctly Bohmian Mechanics has a UWF that is objectively real. If that last part is true then I guess that would answer my question, although I'm still wondering how it works for other interpretations.
Comment: @Thatpotatoisaspy  Again I emphsize that "interpretation" means that the exact same predictions come from different mathematics. The Bohm hypothesis is an intepretation for non relativistic energies, but fails for relativistic ones, afaik.It has a pilot wave generating the probabilistic nature, but it is not possible to measure it independently (otherwise it would be a different theory to be checked for validity)
Comment: Interesting. I'm running into a similar problem as Aristotles "prime mover" if you've ever heard of it. In Copenhagen afaik collapse occurs when an (presumably classical i think?) observer somehow affects a system externally, but if the UWF conception had any validity then if everything in the Universe was part of the UWF then what would cause a collapse to happen in the first place? There would be nothing external to the system to do it. This is all very confusing to me.
Comment: for "collapse" see my answer herehttps://physics.stackexchange.com/questions/263417/double-slit-experiment-evidence-of-wavefunction-collapse/263433#263433
Comment: Isn't that at odds with the copenhagen interpretation? I presume you just take a different stance then. If i'm not wrong isn't this referred to as QBism?


How to withdraw a paper (under review) from fake journal

Question: I have sent two research papers to an open-access journal. It seems a very good journal. One of my papers sent back to me for a minor revision (the condition for accepting my paper is the quality of the revision). The second paper is now under review. I just found that the publisher is fake. Hence, I would like to withdraw my papers. I could not find any way to withdraw my papers from the journal website. What should I do? I did not send the revised manuscript to the journal.
Comment: Thanks @Louic for your comment. No it will not. As I did not publish yet, just under review.
Answer: Simply let the editors know that you withdraw your submission. Tell them that you do not grant them any right whatsoever to internally keep or externally distribute that paper.
Publishing occurs on the basis of a bilateral contract. If one of the parties – in this case: you – does not agree with the agreement's core performance (here: the publication), there is no contract. No obligation arose for you.
Things, however, may get complicated: It is possible that the publisher will claim that a contract was initiated through your submission (and with the help of some hidden agreements and terms of services). In this case, you can argue that entering into that agreement occured "under a mistake as to a matter of fact essential to the agreement". Make sure to list any evidence that would qualify that publisher as predatory, that is, any evidence through which you were misled about their identity. In many laws around the world, there are explicit provisions about contracts being voidable if it was agreed upon under an erroneous belief about the identity of the contract partner.
But let's hope that no argument will arise. Otherwise it would help to know which publisher you are talking about, and which country's law is applicable in your case.
Comment: SCIRP publisher.
Comment: Thanks for the clarification. I do not see any hidden terms at SCIRP, so I would not worry about a contract that was initiated through the submission process. - On the contrary, SCIRP says: "[...] authors retain the copyrights of their papers, and all open access articles are distributed under the terms of the Creative Commons Attribution License, CC BY". Thus, you are the licensor -- and according to Creative Commons, you can revoke your license at any time (which would not affect existing licensees, but I would not regard SCIRP as a licensee as long as your paper is unpublished).


Can I upgrade Magento 2.3.4 to 2.3.7-p4?

Question: We can't upgrade to 2.4.x as the current theme is not supported however I would like to apply the latest patches. Is the possible to apply security only on an earlier version? Like going from 2.3.4 to 2.3.7-p4 directly or I have to go to 2.3.7 first then apply the security patches? Also would 2.3.7-p4 contain all the previous security fixes released in 2.3.7-p1, 2, 4?
Answer: You can go directly on 2.3.7-p4.
Command to upgrade magneto version:
composer require magento/product-community-edition=2.3.7-p4 --no-update
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush


Where does the term "Smurfing" come from?

Question: In multiplayer online gaming, the term "Smurf" (noun) is used to refer to an experienced player who creates a new account for the purposes of being matched against inexperienced players for easy wins.  Where does this usage of the word come from?
Comment: So, in other words, the experienced player would be called a Smurf? In this example, "Wow, I just got owned in that match. The opponent has a low score, but clearly knows how to win. He must be a smurf."
Comment: might want to try on http://gaming.stackexchange.com
Comment: @JYelton yes, I believe that would be a proper usage of the term.
Comment: Of note (but not worthy of an answer): The person you describe can also be referred to as a "ringer" or "shark."
Comment: Yelton - sure, that's absolutely correct.  "I got crushed by a new player!  But it was actually SomeFamousPlayerName, who was smurfing!  Whoa!  At least I got to meet SomeFamousPlayerName!  She is amazing you should have seen the moves!"  it's that simple.
Answer: This definition of smurfing comes from 1996 and the game Warcraft II when certain well-known players made up new names, pretend to play badly, then beat the other players. They picked the names PapaSmurf and Smurfette.
It was used in alt.games.starcraft, and defined in April 1999 as:

someone who makes a new account then pretends they are a newbie.

An origin was offered in the same group in February 1999:

How prevalent do you think fake newbies are? You know, good players who
    lure real newbies in for an easy win. Why do they get their jollies from
    doing something so stupid?

I think it's interesting to note, however, that this kind of
  thing was started in Warcraft II days by Shlonglor and his buddies,
  who seem to be demi-gods for some people. They called it smurfing and
  Shlonglor's stated reason for it was because they couldn't find anyone
  who wanted to play them. So they started picking on newbies and having
  great fun 'smurfing' them, that's the name they gave it. He went on to
  say how there quickly developed the habit of smurf-smurfing, great fun
  he said. Yeah, and who's the one suffering from all this fun the
  experienced are having? The newbie, of course. If it isn't the most
  inconsiderate behaviour I've ever seen..

A Warcraft II: Glossary defines:

Smurfing
A slang term coined by Warp! and Shlonglor to mean good or famous players using fake names to hide from people then attempting to beat other players. It is only a "Smurf" if those players win.

The earliest definite use of smurfing I found was in alt.games.warcraft in August 1996:

heheh, when a really good player is depressed or is looking for fun
  whipping the living hell out of a newbie, he adopts a fake name and then
  joins game and ACTS like a newbie, then he thouroughly destroys everyone
  in the game. this bizzare act is called smurfing, when he said "don't
  step on any smurfs" he meant don't get so caught up u find a smurf, and
  then get the living hell beat out of you :)

There was also a reference in alt.games.warcraft that some experienced players were "probably smurfs" in July 1996.
More description:

it was started by Shlonglor, who is more than a SC player (he works for Blizzard as their webmaster). He was one of the all-time War2 gurus and was extraordinarily famous due to his war2 page ... still one of the best gaming pages ever created (although it's no longer anywhere on the net ... he took it down when he began to work for Blizzard).
Anyhoo, there came a point in Shlonglor's fame where no one but a few select individuals would play him; everyone, hearing his name, would do one of the following things: cower in fear, worship like mad, or repeatedly challenge like a newbie. In the midst of this it was virtually impossible for him to get a game.
SO ... Shlonglor and his roommate at the time, Warp, came up with a stroke of genius: make up a false name that no one would recognize and go beat the * out of newbies.
For whatever reason, the names they chose were "Papa Smurf" and "Smurfette."
From hence came the term "Smurfing."
(Shaf, 1999)

A quote by Shlonglor from 2003:

-(1996) I was the originator of the term "Smurf" or "Smurfing" to signify a famous person playing games under a fake name. Before that point, everyone stuck with whatever nickname they had and never considered changing their name or playing under fake names. It began when me and Warp! played under fake names "Smurfs" and fooled all our friends. I made a page about it and it caught on big time. Pretty soon everyone played under made-up names and you had no idea who you were playing. This practice continues to happen a TON today and you still hear about Smurfing/Smurfs which all dates back to me, my site, and my Smurf page.

And an extract from an August 1996 game report ("The Smurfs vs Spiderman(Zima), Red Barron, and Void(idiot)") by Warp!:

Well, I finally played a game worth writing a story about. It was a five player game on Garden of War with medium resources. The players involved were Shlonglor (playing as PapaSmurf), Myself (playing as Smurfette), RedBaron, Void, and Spiderman (who we later discovered was the same person as Zima/Cpl_Will). Shlonglor and I were teammates as were RedBaron, Void, and Spiderman.

And then by Shlonglor, this may be the earliest description:

First let me explain the Smurf thing. Warp and I enjoy making up names and playing people at war2. We make them think we really suck and then beat them up. But the joke was on me because Zima pulled my own trick on me. He played as Spiderman making me think he sucked. Beaten at my own game! So sad. Well we have lots of fun playing as smurfs. We talk in smurf. We smurf us some ass at war 2. I guess that is totally childish, but it sure is fun.
Comment: I can confirm Hugo is correct. Shlonglor used to smurf people while playing Warcraft2 on Kali: https://en.wikipedia.org/wiki/Kali_(software) and popularized the term on his website.
Comment: Hugo, normally I would say *"why such a long answer for a definition that can be given in a few words, and maybe one link to any of the very many long explanations of the etymology of this on the web"*. That's what I would normally say.  But here I say *"I deeply congratulate you for taking the tie to fully explain the word, given the amazingly random guesses at it elsewhere on the page!"*
Answer: I'm not sure I agree with Robusto's answer.  I think the term smurfing, as applied to gaming, has more to do with the indistinguishability of the individual Smurfs.  Other than Papa Smurf, Grumpy Smurf, Brainy Smurf, and Smurfette, you can't really tell the Smurfs apart by any physical characteristic other than their names.  Mostly, they are an amorphous blob of blue bodies in white underpants. That to me suggests how the verb smurfing came about: When a player goes smurfing on an account, that player is purposely choosing to hide his public characteristics -- e.g., his past win-loss record, league ranking, disconnect tells, and network reputation -- for nefarious reasons, and the only thing that distinguishes him is the name he chooses to adopt.  He is faceless but for his name, just like most of the Smurfs are.
Comment: I don't agree with @Robusto's answer either but I can't say I agree with either answer as they both appear to be wild guesses :/ But the images alone put a smile on my face :))
Comment: If I'm not mistaken, it's only the American version of 'Smurfs' that makes any distinction between smurfs other than Papa Smurf and Smurfette.  Many of the gags in the original 'strip-books' relied on smurfs not being able to tell each other apart, by looks or voices.
Comment: The upvotes on this answer are a great example of how, on this site, upvotes are often, the best word is perhaps "bizarre".
Comment: It wold be fascinating, sort of, to know if any of the upvotes were given after Hugo answered the question.  (As an aside, who the heck doesn't know what smurfing is? How old would you have to be .. like born before, what, 1955???!  Geesh!)
Comment: @Fattie It was a question of etymology, not definition
Comment: Sure, they are undifferentiated, but even more famously they are small. Makes sense to me that they didn't put much more thought into it than, our names are big, lets make them look small
Answer: I thought it was because of the "Smurf Attack" where spoofed packets were used.  Therefore, spoofing, or hiding one's identity has become generally known as "smurfing" on-line.
However, I have no idea how the "Smurf Attack" itself originally got the name...  :-)
Comment: This was my first thought, but it feels like a stretch. Sending pings to the broadcast address isn't much like beating down newbies.
Comment: @nmichaels I see the emphasis as being more on the hiding of identity portion than dishing out of beat-downs.  :-)
Comment: It has utterly no connection to this.  It's a straightforward, well-known activity in gaming, explained in the correct answers.
Comment: Not very well known I'd say, since I'm a gamer and had never heard it used in that context before.
Comment: I thought Smurf Attack came from saturating someone's bandwidth with very small packets, (just SYN packets, or ICMP, I don't remember which). Overwhelming in numbers, not in size as seen on the picture in https://english.stackexchange.com/a/17218/1943 . But coming from Smurfing sounds also plausible as the gaming term was popular back then and Smurf also used IP spoofing.


Why does Yona get off easy for running away?

Question: Why doesn't God chastise Yona for disobeying him? Perek 3 of Yona picks up as if nothing had happened.
Answer: Because Yonah did teshuvah (2:2), which causes the sin to be forgotten (Rambam, Teshuvah 1:3).
Comment: not seeing where he said viduy or resolved to do azivas ha'chet, in fact later on he yells at God and says he was right in running away.
Answer: If Job is about how the ways of G-d's justice are beyond our understanding, then Jonah is about how the ways of G-d's mercy are sometimes beyond our understanding.
Jonah in fact expected G-d's vengeance -- according to Malbim, he went to the bottom of the ship figuring he would be killed by the storm, and tactically this way he would go quickly and the sailors on top would likely survive. Instead, G-d baffles him by opting for rehabilitation. The same pattern repeats itself with what happens to Nineveh.


What happens if someone force to break you fast

Question: Does the fast still count or no or do the person have to fast again for another day. Not about ramadan but broken wallahi
Answer: It depends on the force.
If you are at the risk of losing your life then it's permitted to break your fast. But you should repay your missed sawm after the force is over and you should pay the kaffara. And the person who forced you clearly is a sinner and awaits punishment.
Source

As for the one who breaks his fast by forgetfulness or on the Day of Doubt or is forced to break it, and their excuse is removed, then it is obligatory for them to refrain. When the one forced breaks his fast after the compulsion is removed, he must make it up with kaffara unless there was a valud interpretation.

Of course it's important to note that different muftis may have different views on the matter.
Comment: is that only for ramadan
Comment: The reason why I post this question is because I fasting  because an broken Wallahi and I need to make it up and my Dad thinks that im killing myself because I been fasting for 3 days and he didn't know the reason (because I forgot to tell him) so he forced me to eat but after I still try to remain fasting until sunset. so does that still count for fasting?
Comment: So edit your question to include these information and the fact it's not a question about month Ramadan.


Why do nuclear multipole moments of charge density vary with isotopes?

Question: Why do some isotopes have different quadrupole/octupole moments, when these moments of charge density should be independent of mass?
Comment: Related: http://physics.stackexchange.com/questions/36469/are-the-protons-and-neutrons-in-the-nucleus-arranged-in-any-particular-way
Answer: The charge density stems entirely from the charged particles in the nucleus, but the higher moments depend largely (in a sense, "entirely") on their arrangement. Placing 8 protons at the vertices of a cube produces notably different higher moments than, say, placing all along a line segment, or in an octagon. (This should be apparent from the different symmetries of the system).
As you add more mass, you introduce more neutrons that will affect the spatial organization of the nucleons. This can induce or break symmetry of the protons' arrangement, modifying their moments.
Comment: Could it also be because the charge distribution is of Woods Saxon form, which depends on the mass number?
Comment: @Ana: I don't think that really offers a good explanation... the Woods Saxon form by itself is spherically symmetric, and the multipole moments of the nucleus are the result of breaking the spherical symmetry. The Woods Saxon potential is related in that its mass dependence is indicative that, yes, neutrons and protons repel each other, so the neutrons will force rearrangement of the protons; but I think that's about it. Disclaimer, I'm not an expert on nuclear physics or anything. :)
Comment: Even though the Woods-Saxon form is spherically symmetric, we can still expand it in multipoles like other spherically symmetric potentials. The deformation parameters would arise due to the deformed potential.
Answer: In atomic physics, we have Hund's rules which tell us whether the next electron added to an atom will fill an $s,p,d,f$ orbital.  One consequence of the Wigner-Eckart theorem is that the angular momentum of an object constrains its multipolarity. A spinless object may carry only monopole moment; a spin-half object may carry monopole and dipole moments, but no higher; a spin-one object may carry monopole, dipole, and quadrupole moment; etc.  A full shell, whether it's an $s$ shell or an $f$ shell, has spherical symmetry.  So for atoms, it's the multipolarity of the partially-filled electron orbitals that determines the multipolarity of the atom.
In the shell model, we construct "nucleon orbitals" within the nucleus analogous to the electron orbitals outside the nucleus.  They are likewise grouped by their angular momentum, and nuclei with full nucleon shells are especially tightly bound in the same way that the noble gases are especially chemically  inert.
Away from the magic nuclei, it is the multipole moments of nucleons in partially filled shells which gives net quadrupole, octupole, etc. moment to a stable nucleus.


Is there a way to easily split a wall register?

Question: I have a small powder room that doesn't have a register/vent so it gets a bit cold compared to the rest of the house. I could install a new duct line split off from the main but there is a wall/floor register right on the other side running in the wall cavity in a 2x4 wall. I'm wondering if I can just cut out the back of the rectangular duct and install a baffle to split the air to two registers and then fine tune with how open the registers are. Or is there a premade solution for this? I found some split return air ducts for equalizing are between rooms but not this specific setup
Answer: My parents' house has one place with vents that look exactly like that - the duct has two vents, one on each side, and there is a baffle inside such that you cannot look through the vent and see the other room. The baffle extends about 1-2 inches past the edge of the registers.
I spent some time trying to find a pre-made part (or even a picture of someone having done this), but I can't find one.
Comment: I actually used this to my advantage when running network cable between the two rooms. I was able to remove the cover on one side and reach in to pass the cable over the baffle and into the other room. NOTE: for safety, this should use plenum-rated cable.
Comment: good idea on extending the baffle down past the edges
Answer: This was a common practice in very old houses especially when running heat ducts to a 2nd floor. The only problem is that the room needing the most heat may not heat properly. The fitting you are asking about were called double stack head duct fittings or a similar name and are still available. Myself, I would buy a 4" hole saw and drill a 4" hole in the plaster/drywall and through the back side of that supply duct. Then seal the newly cut hole and install a 4" plastic sewer fitting or similar fitting into that hole. You could go to a big box store to match a sewer fitting or vent fitting with a correctly sized hole saw.  (hope this helps).
Comment: You say "sewer fitting" I'm seeing a plastic floor drain which is pretty ugly. I'm sure that's not what you're talking about, is it? Could you maybe supply an example pic of what you're talking about?
Comment: I used the "sewer fitting "  as an example of what you could use which would fit in the newly cut cut hole.. The size of the hole and the covering would be up to @redlude97. Oh ya; since I am not computer literate I have no idea how to post a picture. my bad
Comment: You've got 8k rep and never posted a pic here? That's most impressive!


A potentially dangerous Request.Form value was detected from the client

Question: I have this issue. I have tried everything. ValidateRequest="false".. and decoding and encoding html.. etc. etc..
What I need is a popup box (so im using ModalPopupExtender) to present to a user where people can type in xml settings and click ok/cancel button to close the popup and save.
However i keep on getting this error "A potentially dangerous Request.Form value was detected from the client"..
Here is my test code below (quick example of my scenario and error)..
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1"
    ValidateRequest="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title></title>

    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

        <asp:Panel ID="Popup" runat="server" Width="800px" Style="display: none;">
            <asp:LinkButton ID="Display" runat="server" Style="display: none;" OnClick="Display_Click" />
            <cc1:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="Display"
                PopupControlID="Popup" DropShadow="false" Y="10" />

                                <textarea id="txtAreaValue" cols="35" rows="6" style="resize: none;" runat="server" />

                                <asp:Button ID="btnOk" Text="Ok" SkinID="default" Width="50px" runat="server" />
                                <asp:Button ID="btnCancel" Text="Cancel" SkinID="default" Width="50px" OnClick="BtnCancel_Click"
                                    runat="server" />

        </asp:Panel>

    </form>

Code Behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ModalPopupExtender.Show();
            string str = "<?xml version=\"1.0\" encoding=\"utf-8\"?><XmlConfig xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <XmlConfig Type=\"TEST\" DefiningXpath=\"/PERSON/NAME\"><Index Name=\"Name\" XPath=\"/PERSON/NAME/VALUE\" Type=\"String\" /><Index Name=\"Id\" XPath=\"/PERSON/NAME/ID\" Type=\"String\" /> </XmlConfig></XmlConfig>";

            txtAreaValue.InnerText = str;
        }

        protected void Display_Click(object sender, EventArgs e)
        {
            //Shows the Item detail Edit box
            ModalPopupExtender.Show();
        }

        protected void BtnCancel_Click(object sender, EventArgs e)
        {
            ModalPopupExtender.Hide();
        }
    }
}

To run the code.. Add ref to AjaxControltoolkit.dll and then run and you will see the textarea being populated with xml. Click on the cancel button and this causes the error. Please can anyone help me?
Comment: Check out this  http://stackoverflow.com/questions/2673850/validaterequest-false-doesnt-work-in-asp-net-4
Comment: Possible duplicate of [A potentially dangerous Request.Form value was detected from the client](http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client)
Comment: possible duplicate of [A potentially dangerous Request.Form value was detected from the client](http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client)
Comment: Thanks mikey :-) It worked.. Thanks cant believe it was that simple..
Comment: Another question those this only work on framework 4? What about 3.5?
Comment: It shouldn't bee needed on 3.5 as the issue is from a change that happened with 4.0 (I didn't notice the one mikey linked to, though I disagree with @JonEgerton 's duplicate claim as while all the info is in there, it's not the same Q&A though mikey's is).
Comment: Listen user92..  You should heed Jon's warning and make sure you understand what you just disabled, and take measures to prevent successful attacks..  In my case I needed to let administrators input HTML and scripts, so I limited the ValidateRequest=false settings to only pages that were accessible by administrators.  Even then an attacker who can get an admin account could do some real damage to the users who would eventually see that admin-entered code.
Comment: Checkout http://stackoverflow.com/a/41679040/58553 it has a solution!
Answer: Use
<httpRuntime requestValidationMode="2.0" />

in your web.config (keeping any attributes you already have on that element, if it's already there). ASP.NET4.0 ignores ValidateRequest otherwise.
And, of course, do make sure that you take necessary measures to protect against genuinely dangerous requests, now that it's not being done for you.
Edit: A great way of doing this is to create your own class derived from RequestValidator, and using the 4.0 behaviour, but with that as the class that does the checking.
Comment: @AkshayKulkarni change the main .NET config to change the default web.config? I'd imagine that'd work, but if you don't want to change the web.config, you really don't want to change this. Really though, it doesn't make a lot of sense to have a high-level configuration to block something that isn't enforced at that level. Why do you not just change the web.config?
Comment: Additionally I found a good description here at MSDN: [Disabling Request Validation](https://msdn.microsoft.com/en-us/library/hh882339.aspx). You can use the `` setting in ``.
Comment: Hi Jon is there any way to achieve this without changing web.config file. Sorry for asking question at wrong place :)
Answer: Here are possible solution which may help you. Make a server side configuration setting for this. If you want to allow HTML element as input from selected pages in your project than you set this page attribute.
<%@ Page ValidateRequest="false" %>

This ValidateRequest="false" on each page.
If you want in all pages in you project than make changes in Web.Config file.
Add this tag In <system.web> section.
If you are using .Net 4.0 than you have to make one more change in Web.Config file.
Add this tag In the <system.web> section.
<httpRuntime requestValidationMode="2.0" />

Here are configuration for do not validate request for all pages in .Net 4.0
<configuration>
  <system.web>
     <httpRuntime requestValidationMode="2.0" />
  </system.web>
  <pages validateRequest="false">
  </pages>
</configuration>

Comment: Which Web.config? The one for the Web app or the one for the Views?
Answer: Well, people are talking about Asp.net 4.0 only... I guess we need to address other versions too. Today, I had the same problem when I replaced my AjaxToolkit editor with TinyMCE and with the postback I found the same issue.
"A potentially dangerous Request.Form value was detected from the client"..
So I used this line inside my webconfig and it worked for me.
<system.web>
    <pages validateRequest="false" />
</system.web>

It should work across Asp.net 2.0 to 3.5.
UPDATE: Even works upto .net 4.5
UPDATE: You can also try to validate the request on page level rather whole website. Just wanted to let the readers to choose the best way. Thanks DVD for pointing this out.
Comment: using requestValidationMode="2.0" and turning off validation (ValidateRequest="false") only on the page needed would be better for security, instead of turning off validation for the entire site.
Comment: Why someone would mark it negative without telling the issue?
Comment: @dvdnhm, dude, the question was how to get the error fixed... No matter if its for one page or entire web. it could be done one way or another.
Comment: @BradleyDotNET (slow_clap)
Answer: I created a table article with columns articleId and article_content. I also used html editor for article_content column. When I tried to save I got the same error. It was resolved by adding [AllowHtml] to the article_content property in the class.
 [AllowHtml]
 [Required]
 public string article_content { get; set; }

Don't forget to include the namespace using System.Web.Mvc. For more details: http://www.infinetsoft.com/Post/A-potentially-dangerous-Request-Form-value-was-detected-from-the-client/1246
Answer: You can use JavaScript to encode the values before sending to the server, if that suits your needs
see this answer
Answer: There are 3 options to remove this error.

Set validateRequest="false" in page directives.
Set validateRequest="false" in web.config file.
Set requestValidationMode="2.0" in web.config if you are using DotNet 4.0

Checkout this link for more info.
Answer: "A potentially dangerous Request.Form value was detected from the client"..
1) set httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="<,>,\" in web.config file
2)  set validateRequest="false" in side pages tag in web.config file
<system.web>
    <httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="<,>,\"/>
 <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" validateRequest="false"/>
<system.web>

Answer: I faced this same problem while sending some email templates from aspx page to code behind....
So I tried to solve this by adding
 <httpRuntime requestValidationMode="2.0" />

in my web config under enter code here` but that did not helped me unless I putted
ValidateRequest="false"

attrribute in the page directive of the aspx page.


How can I tell what kind of JOBY tripod I own?

Question: When I first bought my Canon EOS 7D at a local electronics dealer, I also bought a JOBY Gorillapod for it. I've hardly used it though, as my camera weighs a ton and the tripod nearly buckles under its weight. How can I tell what version of the tripod I got from looking at the tripod itself? All it has on it is the JOBY logo.
Answer: Look at the Joby website. They are all different!
Pay attention to the color of the joints and if yours has a joint above where the legs join or not. If there is a built-in head, look at it and compare as they are three distinct ones. It is not easy to see but the focus joints has rings which are metallic instead of grey.
The specs are available there too. If you want to really be sure, then you can weigh it.
Comment: Looks like I own the SLR one. I'll probably upgrade to the Focus edition, as I like my stands to be really stable :)
Comment: Then you might want to consider a real, non-Gorillapod, tripod. The GP's are great for what they do, but they are never going to be "really stable"


Can I configure Swype to use two different languages for keyboard layout and spell checking?

Question: With my built-in iPhone keyboard that is easily possible, but I can't seem to find the setting on Swype.
Answer: Yes, that's possible in Swype. And in SwiftKey, too, by the way. Let me walk you through how I did it. But let me tell you why first.
For Stack Exchange, I use:

US English spelling, since we're on a US website. Though, as a European, I should advocate UK spelling. Then again, the UK doesn't seem to advocate being European.
A German keyboard layout, i.e. QWERTZ instead of QWERTY, because I've been using that layout for physical keyboards for the last couple of decades.

With the iPhone, it's easy to set those two differently. With third-party keyboards, not so much. But it is possible:
Swype
Preconditions: You have bought the app and performed basic configuration so that you can access Swype as a virtual keyboard in your apps.
Steps:

Open any app that can access the Swype keyboard.
Select Swype as input method.
Press and hold the space bar, then slide up to More Languages.
Do not click on any language! Instead, for the language you want to configure, e.g. "English" (the US variant is implied), click on the right arrow >. It took me a while to discover this.
Choose the layout that you want, e.g. "QWERTZ" in my case. Voilà.

SwiftKey
Preconditions: You have downloaded the app and performed basic configuration so that you can access SwiftKey as a virtual keyboard in your apps.
Steps:

Open the SwiftKey app.
Go to Languages. Under Downloaded Languages, you should see at least "English (US)" and "QWERTY"
Click on switch layout for a language.
Choose the layout that you want, e.g. "QWERTZ" in my case. Voilà.

PS: I haven't quite made up my mind as to which of the two apps I actually prefer. I see immediate differences, but no killer criterion yet. I'll keep testing both for a while longer.
Comment: still not using both languages spelling.
Answer: You can't use two languages simultaneously, this is device wide, not specific to swype. However swype is bilingual and you can set the keyboard to any language they support by holding down the swype icon button and then selecting the settings icon and choose a language according to your needs. Auto complete and keyboard layouts change respectively to the language you select. Characters are localized.
Hold down the swype icon button :

Until the settings gear populates, select it and navigate to Languages to alter your settings
Comment: Maybe it's specific to my German iOS, but using the standard keyboards, I can set English as *language*, but the German QWERTZ (instead of US QWERTY) as my *keyboard layout*. Sadly, Swype registers as a totally separate keyboard and does not use my existing settings.


Setting Transparency in .IMG format

Question: Is there a way for QGIS make just the black value (255,255,255) on an .IMG format file transparency. Right now their transparent option makes the whole image transparent.
Answer: QGIS has the option to set transparency based on a number of factors no matter the file format you use.
All can be set from the Transparency tab in the raster layer Properties. Just set 100% transparency for red=255, green=255 and blue=255.

Setting Transparency in .IMG format


2D Fourier transform over mask of an image

Question: I have an image, which has an inherent mask built into it. The exact shape isn't super important, but it looks something like a circ multiplied by a rect. I would like to calculate the 2D Fourier transform of only the masked region. If I calculate the Fourier transform over the full image it will have spatial frequencies associated with the mask, not the underlying image. Does anyone know how to do this?
Answer: I don't think what you're asking for is possible.  If you take the Fourier transform with the existing mask / window function you're going to get the spectral content of the underlying image convolved with the spectral response of the mask due to multiplication in the time domain being equivalent to convolution in the frequency domain.
An alternative is to take the Fourier transform or a subset of the masked image, but this will just result in what is effectively a new mask being applied to the underlying image.
Comment: hmm yes, this is kind of what I thought. So is there no better solution than just applying some kind of Tukey window on top of my image to suppress the high frequency content due to the edge of the inherent window function? (I'm interested in measuring the amount of high frequency content)
Comment: @user2551700, I believe so.  There may be some more sophisticated windowing possible but I don't do much image processing so I haven't ever investigated it.


Is it possible see the interiors of the Dome of the Rock?

Question: Is it possible to visit Dome of the Rock for non-muslim tourists these days?
Last time I tried was in 2005, and back then it wasn't.
Answer: According to Wikipedia, the Dome of the Rock complex (Temple Mount) was reopened to non-Muslim visitors for limited time and days of the week (for example, non-Muslims are not allowed in on Fridays).
Frommer's has a detailed description on how to get tourist access to the site. You may be able to get into the complex and the museum, but probably not into the actual dome.
Comment: I agree. Was in Jerusalem in March and got in to the complex no problem, but only practicing Muslims can enter the actual structure


Dynamic model of a robotic arm

Question: I have a question regarding the dynamic model of a robotic manipulator. It is commonly written as follows:
$$
\tau = M(q)\ddot{q} + C(q,\dot{q})\dot{q} + G(q) + J^\intercal F_{ext}
$$
From what I have seen, the equation $\tau_{ext}=J^\intercal F_{ext}$ only holds true at very low velocities, so authors usually remove the velocity and acceleration terms and write:
$$
\tau = G(q) + J^\intercal F_{ext}
$$
So my question is, what happens when our task is highly dynamic with high velocities and accelerations ?
Answer: I suggest you bring all the external forces on the same side i.e., consider
$$ M \ddot{q} + C \dot{q} + G = \tau - J^T F_{\text{ext}} $$
This equation is always valid.
On the right member, there is the net external force acting on the joints (a vector in the joint space).
Vector $\tau$ is the force (or torque for revolute joints) in the joint space determined by the controller. Force $F_{\text{ext}}$ is the force (in the task space) exerted by the hand over the environment (non-zero only if the hand is in contact with the environment). The reaction force, $-F_{\text{ext}}$, is the force (in the task space) exerted by the environment on the robot's hand. Using the concept of kineto-static, we know that we can determine the force from the environment reflected back on the joints (in the joint space) using the transpose of the (Geometric) Jacobian. Therefore, $-J^T F_{\text{ext}}$ is the force on the joint determined by contact with the environment.
If the arm is pushing toward a concrete wall (static situation) the joints' velocities and accelerations are zero, from which $\tau = J^T F_{\text{ext}}$ that is the results you have from the kineto-static analysis. Roughly speaking, the force exerted by the arm on the environment must be exactly compensated by the force (torque) on the joints from the controller.
Answer:
The first equation is always true. So at high velocities and accelerations, you use the first equation. See this

At low velocities $\dot{q}<<$ and low accelerations $\ddot{q} <<$, the first two terms are negligible, and thus you use the last equation.

$\tau_{ext} = J^T F_{ext}$ is also always true. It is the contribution of external forces. See this

There are control laws, when you want to exert a desired force $F_d$ at the environment, when the end effector does not move (thus $\dot{q}=0$ and $\ddot{q}=0$):
$$\tau_{control} = J^T F_{d}$$
and this can be even more precise if you add the gravity term. This leads to your last equation. See this
Comment: So if I understand correctly, (3) is always true even at high velocities, but it is the (4) that assumes a quasistatic condition, right ?
Comment: Yes, but (4) is a control law, it doesn't describe the dynamics. The dynamics are again : $M\ddot{q} + C \dot{q} + G + J^T F_{ext}= \tau_{control} = J^T F_d $ . In quasistatic conditions, $\dot{q}$ and $\ddot{q}$ are negligible, and thus $J^TF_{ext} =\tau_{control}-G$

Dynamic model of a robotic arm


How do I create a custom shapes in the shape of a circle in Illustrator

Question: I'm designing my own shapes, but I can't get them to align or replicate the way I want them to. I need them to be in a perfect circle as shown below. How would I do this?
Answer: Start by creating your ring and a single divider:

Duplicate and rotate your dividing shape as many times as you need around the cirlce. I've used a transform effect because it's easy to enter the correct number of copies and rotation angle but you could just as easily do it manually:

Expand everything and create two compound paths, one for your ring and one from the dividers (just select them and hit cmd+8). Make sure your dividers are on top, select both compound paths and hit the "Minus Front" Pathfinder button:

Your finished shapes:

Color and style as you wish. For the text create a new circle and use the Type on a Path Tool:


Using Data.Array to solve Sierpinski in Haskell

Question: Here is an earlier attempt to solve the original problem:
Solving Sierpinski Triangle in Haskell
I was never satisfied with my solution and found it was awkward and twisty. Here is another attempt to solve the same problem using Data.Array and I found that by using mutable arrays the solution becomes much shorter and easy to read.
import qualified Data.Array as DA (Array, listArray, (//), assocs)
import qualified Data.List as DL (groupBy, intercalate)
import qualified Data.Function as DF (on)

type Point = (Int, Int)
data Triangle = Triangle { up :: Point, height :: Int } deriving Show
type Canvas = DA.Array Point Char

emptyCanvas maxLevel = DA.listArray ((0, 1-h), (h-1, h-1)) $ repeat '_'
  where
    h = 2^maxLevel -- 1*(2^maxLevel)

drawTriangle :: Triangle -> Canvas -> Canvas
drawTriangle (Triangle (r, c) h) canvas = foldr drawLine canvas $ map line [1..h]
  where
    line h = let h' = h-1 in [(r+h', j) | j <- [c-h'..c+h']]
    drawLine l c = c DA.// map (\p -> (p, '1')) l

drawCanvas :: Canvas -> IO ()
drawCanvas canvas = putStrLn pic
  where
    rows = DL.groupBy ((==) `DF.on` (fst . fst)) . DA.assocs
    pic = DL.intercalate "\n" $ map (map snd) (rows canvas)

split hLvl (r, c) = let w = 2^(hLvl-1) in [(r, c), (r+w, c-w), (r+w, c+w)]

splitSier maxLevel (sierLevel, ts) = (sierLevel+1, ts')
  where
    ts' = ts >>= (split (maxLevel-sierLevel))

mkSierpinski :: Int -> Int -> Canvas
mkSierpinski maxLevel sierLevel
  | maxLevel >= sierLevel = foldr drawTriangle c $ allTriangles
  | otherwise = c
  where
    c = emptyCanvas maxLevel
    (l', ts') = head $ drop sierLevel $ iterate (splitSier maxLevel) (0, [(0, 0)])
    allTriangles = map (\p -> Triangle p (2^(maxLevel-l'))) ts'

main = do
    sierLevel <- readLn
    drawCanvas $ mkSierpinski 5 sierLevel

The idea is to model the canvas by a 2-D array of Characters and attempt to draw easy individual triangles on top of the empty canvas. In this solution it starts with one big triangle and keep splitting to generate Sierpinski pattern. Another solution that I didn't post here attempts to solve it by starting with the smallest triangle at the top, and repeatedly copy what is current on canvas to its lower left corner and lower right corner. Both solutions look very similar at the end.
Please let me know if you have suggestions. Thank you in advance.
Answer: // is best called with one bulk list because each call incurs one O(n) array copy.
Folds over iterates when you need an index and know its range, it's like for vs. while.
drawCanvas :: Canvas -> IO ()
drawCanvas = putStrLn . unlines . map (map snd)
  . DL.groupBy ((==) `DF.on` fst . fst) . DA.assocs

mkSierpinski :: Int -> Int -> Canvas
mkSierpinski maxLevel sierLevel = emptyCanvas maxLevel DA.//
  [ ((r+h, j), '1')
  | maxLevel >= sierLevel
  , (r, c) <- DF.foldrM split (0, 0) [maxLevel-sierLevel+1..maxLevel]
  , h <- [0..2^(maxLevel-sierLevel)-1]
  , j <- [c-h..c+h]
  ]