Prevent Foucault's Pendulum from an Ellipticity

Question: I am using a 15kg dumbbell as the bob of a Foucault's pendulum attached to a string of 4 meters. However, using the common method of burning a wire to set the bob in motion, it will begin to oscillate in an elliptical path. I attribute this to the rotation of the dumbbell itself. No matter how long I wait before and after tying it to a stationary pole at the greatest displacement to set the dumbbell in equilibrium (no motion at all), the bob would start to swing in ellipticity right away, disrupting all data. Any suggestions to improve this experiment so I can determine the period of Earth's rotation using ${\displaystyle \omega =360^{\circ }\sin \varphi \ /\mathrm {day} ,}$ where $\omega$ is the angular speed of the bob and $\varphi$ is the attitude (this translate to about 10 degrees per hour)?
Comment: How is the dumbbell hung? Middle of the handle, one side of the handle, or what?
Comment: @AlexK thanks for the comment, a picture is added
Comment: [A Short Foucault Pendulum Free of Ellipsoidal Precession](https://www.researchgate.net/publication/23995600_A_Short_Foucault_Pendulum_Free_of_Ellipsoidal_Precession) and [Foucault pendulum in the United Nations](https://pearl-hifi.com/06_Lit_Archive/02_PEARL_Arch/Vol_16/Sec_53/Philips_Tech_Review/PTechReview-19-1957_58-236.pdf).
Comment: In the picture: the 4 wires that go up to the carabiner will for sure cause uneven flow of air, introducing bias. The pendulum bob must have the same interaction with the air in all directions of velocity. The entire suspension setup must be cilindrically symmetric. When improvising with weighlifting weights: use a (stack of) disc(s), to have at least cilindrical symmetry.
Answer: The classic method is to add a ring somewhere near the top, through which you pass the wire or string that suspends your dumbbell. Make sure the amplitude is so large that with every swing, the wire clips on the ring. That way, every swing adds a little force that keeps the elliptical motion from building up. @Cleonis pointed out that this ring is called a "Charron Ring". The original publication is here but perhaps more of historical interest. @Farcher provided a description (pdf) of a Focault pendulum in the UN building, figure 3 shows the Charron ring. Here is another example from the University in Magdeburg:

BTW you would also get this elliptic motion from a spherical bob. It's a possible degree of freedom of a real pendulum's motion. Any torque that isn't perfectly symmetric in azimuth will pump energy into that degree of freedom. That can be a twist in the wire, finite size of the bob, local disturbances in the gravitational field, etc. Thus, every Foucault pendulum I have ever seen has such a ring to prevent this precession.
Comment: What do you mean exactly by clipping on the ring? Is there any diagram or pictures? Thanks!
Comment: @DianSheng The mitigating device component that rfl and Farcher are referring to is called a 'Charron ring'. The Charron ring is positioned close to the upper attachment point of the wire. When the plane of swing is opened up the unwanted velocity component is largest at the point of largest amplitude of the swing. The Charron ring is placed such that at the point of largest amplitude the wire just touches the Charron ring. That will affect the swing minimally, but the friction will drain kinetic energy from the unwanted transversal velocity component.
Comment: @DianSheng Read the two links that I have provided.
Comment: @rfl I need to correct myself on a detail: the description of the [Magdeburg Foucault setup](http://hydra.nat.uni-magdeburg.de/foucault/foucault.html) also gives technical details. The period of swing is 11.92 seconds. Out of the half-period of 5.96 seconds the wire presses against the Charron ring for 1.37 seconds. Well, that is not 'just touching' at all. Also: the Magdeburg pendulum is a driven pendulum. There is a magnetic coil in the floor plate, timed to exert an attracting force during motion towards the center, replenishing energy lost to friction. Charron ring requires driven pendulum
Comment: Yeah, I've never seen a non-driven pendulum swinging long enough to exhibit the Focault effect. Was wondering whether or not to mention  that in my answer, but it seemed to go off the actual question which is clearly defined...
Comment: @rfl Thanks for the suggestion of using a Charron Ring. However, as Cleonis pointed out, it uses friction to decrease unwanted motion. As my set-up is a non-driven pendulum, any excessive loss of energy is undesirable. All I require is for a swing time of approximately one hour, as shown [here](https://www.youtube.com/watch?v=M8rrWUUlZ_U). I was going to try using a spherical bob with a uniform wiring system, but as you mentioned, that will also cause ellipticity.
Comment: @DianSheng It seems to me that a Charron ring will not necessarily drain energy from the desired swing. The Charron ring will predominantly affect the *unwanted* motion. (The plane of swing opening up is arisal of a motion component *perpendicular* to the wanted swing.) The reason, I think, that a Charron ring requires a driven pendulum: a driven pendulum will have a consistent amplitude of swing, leading to consistent interaction with the Charron ring. With an undriven pendulum there is the decay of the amplitude.
Comment: @DianSheng In the video that you link to it is mentioned they were able to make use of a 6-story staircase. That underlines: the longer pendulum wire is, the better the odds of the Foucault effect dominating over the spurious effects. To paraphrase a trope: what are the three important H's in Foucault setup building? Height, Height, and Height.
Answer: About the cause of the plane of swing opening up.
(I'm not sure what you mean by 'rotation of the dumbbell itself', I will return to that at the end of this answer.)
The upper attachment point of the suspension cable is critical. For every orientation of the plane of swing the effective length of the suspension wire must be the same.
A worst case scenario would be where the pendulum wire runs through a slit (for example a slit between two ceiling boards) and secured at the top of the slit.
In that worst case scenario: when the plane of swing is parallel to that slit the effective length of the pendulum wire is longest, and when the plane of swing is perpendicular to the slit the effective length of the pendulum wire is shortest.
Another factor for the effective length is whether the wire is equally flexible in all directions. For a Foucault pendulum setup the wire must bend equally easily for all directions of swing.

The effective length of the pendulum wire affects the period of swing.
The jargon name for any effect that causes the period of the swing to be not the same in all orientations is anisotropy (an-isotropy; not isotropic)
Let's say there is an anisotropy. The simplest instance of a period bias is where there is a single bias as you go through a full circle. Let's call the orientation of largest period of swing the 0 degrees plane. With a single bias: the orientiation with the shortest period of swing will be at 90 degrees to the orientation of largest period.
Let's say you happen to release the pendulum bob along a plane that is at a 45 degrees angle with respect to the 0 degrees plane. When released from that angle the ensuing swing is a superposition of two swings with unequal period of swing. This unequality then causes the plane of swing to open up.

Generally it takes a while for the plane of swing to open up. You describe: "the bob would start to swing in ellipticity right away" That is actually worse than what you would expect with an anisotropy of the pendulum wire.
With any Foucault pendulum setup the aim is to make the plane of swing opening up happen slower.
A Foucault pendulum setup is very sensitive. The rotation-of-Earth-effect is very, very small. The Foucault pendulum setup accumulates that very, very small effect, making the effect visible to the naked eye. The thing is: the Foucault pendulum setup accumulates everything. The effect of anisotropy of the pendulum wire accumulates too!
If as you describe the bob starts to swing in ellipticity right away then you have a major, major problem.

About rotation of the dumbbell.
It could be that you are referring to the fact that the dumbbell is co-rotating with the earth.
Let me tell the story of how the idea of the Foucault pendulum setup occurred to Léon Foucault.
Being an experimental physicist Foucault had a workshop with a lathe, and for some job he had clamped a rod in the jaws of the lathe. He twanged the rod, and then he was curious what would happen to the plane of swing upon changing the orientation of the chuck of the lathe. So he turned the chuck, and the plane of swing remained in the same orientation.
Foucault recognized that the momentum of the swing of the twanged rod is not bound to the physical orientation of the rod.
If occurred to Foucault that if a pendulum would be suspended over one of the poles then the fact that the pendulum bob is co-rotating with the Earth is not a factor; the plane of swing will remain in the same orientation anyway.
The first Foucault pendulum setup was in Foucault's basement workshop. The second one had a 21 meter wire, in the 'Musée des Arts et Metieres', the third one had a 67 meter wire, in the Pantheon in Paris.
The longer the wire, the less sensitive the Foucault pendulum setup is to imperfections in the wire.

(A discussion of why on latitudes away from the poles the rate of change of pendulum swing orientation is slower is discussed in an article on my own website. Link to my website is on my stackexchange profile.)


The category of all small categories

Question: Let $CAT$ be the category of all small categories and functors between them. One of the category axioms says that for every two objects $A$ and $B$ of a category, the class of morphisms from $A$ to $B$ must be a set, not a proper class. Assume now that $A$ and $B$ are small categories, that is their classes of objects are sets. How can I deduce that the class of functors from $A$ to $B$ is a set and not a proper class?
Answer: First off, the requirement that $\hom(A,B)$ be a small set isn't always assumed; such categories we call "locally small". But $\mathrm{CAT}$ is locally small, so that's a side issue.
It's actually fairly easy to show that $\hom(A,B)$ is small when $A$ and $B$ are small categories: every element can be described by one or more functions between small sets.
And given any two small sets $X$ and $Y$, basic set theory tells us the class of functions from $X$ to $Y$ is a small set.

For completeness, the encoding I have in mind is to describe a functor $A \to B$ by the two functions describing how it acts on objects of $A$  and how it acts on arrows of $A$.
Other encodings are possible.
Comment: @bateman: You're right; I had in mind the strict 2-category where $\hom(A,B)$ is the *category* of functors $A \to B$ and the natural transformations between them. I've corrected my answer.
Comment: I can't understand why natural transformations come into the picture. I mean, if I want to prove that $\mathrm{CAT}$ is locally small, is it sufficient to "count" how many functors are there between two fixed categories, isn't it?
Answer: A functor $F:A\rightarrow B$ $F_O:Ob(A)\rightarrow Ob(B)$ which is an element of $Set(Ob(A),O(B))$ a map which assign to a morphism $f:X\rightarrow Y$ a morphism $F(f):F(X)\rightarrow F(Y)$, it is a map $F_f: Mor(A)\rightarrow Mor(B)$, remark that $Mor(A)$ is a set since it is $\bigcup_{X,Y\in Ob(A)\times Ob(A)}hom(X,Y)$
Thus the set of functors between $A$ and $B$ can be viewed as a subset of $Ob(B)^{Ob(A)}\times Mor(B)^{Mor(A)}$.
Answer: "One of the axioms of category theory says..."??
There are many different axiomatizations!
While it is certainly the case that "there must be" a hom-class
between any two objects, there is not always an axiom saying so --
Here is one axiomatization that says nothing of the kind!
First-order axiom-sets in general do not say anything about their
own model theory -- that's a separate semantic issue.  The elements
of the domain of a model of a first-order theory can be literally
anything -- it's the interpretation-functions defined on them (by the
model) that matter.

The category of all small categories


How do decentralized exchanges prevent front running?

Question: With the coming rise of decentralized exchanges for bitcoin and altcoins. How do these exchanges prevent front running of trades? Since all the transactions are transparent, what stops someone from monitoring the blockchain to detect a big order coming in and then immediately execute a similar trade before it?
Comment: Exchange trades/orders happen within the exchange, not on the blockchain.
Answer: For those not familiar with front running: it is the process of market/price manipulation. If I know, that a big purchase of s.th. valuable will happen, the amount of this would get more rare on the market and it's price may rise. Therefor I could quickly do my own purchase of such a good, speculating that the price will rise, and sell it after the big transaction at a higher price.
In the bitcoin world this is not excluded. Imagine that you are within a big financial corp, and this institute asks the trading desk to buy bitcoins for 10mio Euros. An employee could see this planned trade, and do a quick self trade before. So this is within corporations.
In the public bitcoin space, there is no indication of a "big" trade, that will happen on the blockchain. Usually a tx is composed and then sent into the network, to the nodes that you are linked with, and from there to the whole network. So if you could see this UTXO with an enourmous amount in your node, you have the time to create your own tx to do front running. It would need to get into a candidate block, before the "big" tx joins a block which is then minde. I do not see that there is a guarantee to do so. It might get different when a miner comes into the play, and he is hand crafting a tx, but I am not 100% sure... He would have to be fast enough, that no other miner has a candidate block, that get's into the blockchain before him...
Answer: There is no practical technology that I've found that prevents front running in a trustless manner. This is the case whether the exchange is decentralized or centralized. The only thing that will prevent frontrunning is proper auditing performed by an independent third party.
I've written here in regards to how some cryptocurrency projects implement the orderbook onto the blockchain and how it doesn't prevent front running:  http://www.kkurokawa.com/2015/06/front-running-decentralized-exchanges.html
Other projects implement the orderbook outside the blockchain, and this does not prevent front running either, the same as centralized exchanges.


Music with brutal and high variations of tempo and/or sound level and/or pitch

Question: I try to give a hand to a friend who is preparing a talk about borderline personality in psychology.
Particularly, she was thinking to highlight the emotional distress and instability with some particular song with "some kind of peaks" in it.
The critical section would ideally last max 2-3 min, and maybe suggest huge joy, before to fall into deep and dark sadness very quickly, before to revert to another feeling with extremely high intensity.
To give an example, she had considered the final piano performance in '4 minutes' movie (but extracted from the movie, its emotional footprint was lower than expected). I have indicated classical music to set a tag to the question, but it is not required.
Any idea of music you've heard of, so that we should give it a try?
Thanks
Comment: I'm voting to close this as the is not only primary opinion based, but too broad.
Answer: Certainly not classical, but your question led my mind directly to this track:
Stubb (A Dub) by Mr Bungle off of their self-titled debut album.

Mr. Bungle was an American experimental band from Eureka, California. The band was formed in 1985 while the members were still in high school, and was named after a 1950s children's educational film regarding bad habits which was later featured in a 1981 Pee-wee Herman HBO special...
  Mr. Bungle was known for its distinctive musical traits, often cycling through several musical genres within the course of a single song.
  - https://en.wikipedia.org/wiki/Mr._Bungle
Answer: Well, I'm not sure it would make a suitable illustration for your friend, but it fits the description:
The Most Unwanted Music
This song was created by artists Komar and Melamid and composer Dave Soldier in 1997 with the goal of including a wide range of elements that people, according to a survey, disliked in their music, including sudden changes of mood and tempo.
Outside of that, my other best suggestion would be Bjork's It's Oh So Quiet.  You could also look into the music of Daniel Johnston who actually (I believe) has borderline personality disorder.
Comment: Good call on the Bjork. She was the first to pop into my mind when reading this question.
Answer: You might find interesting things in breakcore music and electronica.
Venetian Snares - Hajnal,
Aphex Twin - Windowlicker also go check for
Toe Cutter and
Xanopticon's work.
Cheers
Comment: I agree on both artists listed - they have very extreme and fast-changing music patterns.
Answer: Or the symphonies of Gustav Mahler:  try the final movement from Symphony #6!
Answer: Try "Arms" by Genghis Tron, it's a mixture of thrash and electronic music with abrupt, heavy changes.
Answer: "In My Time Of Dying" - Led Zeppelin
It's an 11-minute long rollercoaster.
Answer: An orchestral answer would be:
I. Stravinsky "Le Sacre du printemps" Part II.


Motherboard Compatability

Question: The amount of Video Cards a motherboard can support (if using powered risers) is only limited by the number of PCI-E slots, correct? I've found a board (MSI - B250 GAMING M3 ATX LGA1151 Motherboard) that has 2 PCI-E 16x and 4 PCI-E 1x. If I use powered risers there should be no issue right?
Answer: Not necessarily correct, though it may be correct in your situation. It appears some people have issues with fully populating the PCI-e slots, though it's unclear whether a BIOS update or reconfiguration would have helped.
I also recently read something on a review site that was testing a motherboard for fun that supported a ridiculous number of PCI-e slots (pretty sure it was more than 10). However, it refused to work when fully populated with AMD cards. All slots were usable when a few nVidia cards were used. Not clear whether this was an OS or hardware limit. Speaking of which, you may also wish to consider OS limits. I seem to recall encountering instances of people running into walls with certain versions of Windows 8 and 5+ GPUs.
I can't say for certain that all motherboards can support as many GPUs as they have PCI-e slots, but I can say that some configurations may involve tofurkey sacrifices and head-banging.
P.S. I'm not endorsing (or discouraging) this particular setup, but you should be aware of things like the potential for fire when dealing with high-power setups and equipment of questionable repute (I'm looking at you, powered risers of unknown origin).
Answer: Well I've learned it the hard way.. but apparently, that particular board, MSI B250 Gaming M3 can support only 4 GPUs at the same time, despite there are 4 pci-e slots on it.
See the notes under "Slots" section of the specification below:
https://www.msi.com/Motherboard/B250-GAMING-M3.html#productSpecification-section
• 2 x PCIe 3.0 x16 slots (supports x16/x4 mode)*
• 4 x PCIe 3.0 x1 slots
** The PCI_E4 slot will be unavailable when an M.2 SSD module has been installed in the M.2_2 slot.
** The PCI_E2 slot will be unavailable when an expansion card has been installed in the PCI_E5 slot.
** The PCI_E3 slot will be unavailable when an expansion card has been installed in the PCI_E6 slot.
So the answer is no, it is not only limited by the number of slots, there are also these kind of "not so clear" limitations.

Motherboard Compatability


How to clean tubeless tire sealant from rims

Question: How to clean the stuck/dry sealant from the rim edge, and the rim tape, etc? (In order to replace my old tubeless tyres with new, and the new ones to sit on a clean/fresh surface). With water? Water/soap? Any other liquid?
Answer: I did this weekend. It was not hard to do it mechanically with a piece of cloth and water. Then for patching I needed a piece of a very clean surface so I used a dish-washing liquid and then finally isopropanol, but that will probably not be necessary if you do not need patching.
From the rims the mechanical way was enough, a dry piece of cloth or even just fingers were fine, but a wet cloth will be even easier.
Comment: brake cleaner works very well, but i only tried it without rim tape: it could ruin it.
Answer: Tubeless tire sealants and generally latex based, so anything that will remove latex.
Adhesive remover is probably the best bet, e.g. Goo-Gone (sold in the US at least, I don't know if that brand is used elsewhere);
Comment: Goo-Gone is pretty high up there on the harshness index.  It does indeed clean up latex paint (I have some myself and even used it 40 years ago when I did a lot of painting), but I would be careful on a carbon wheel with goo gone.  It may be OK, but I would be leery risking it there.  On an aluminum wheel however, go to town with the stuff.  You won't affect the aluminum with goo gone.  Just be careful of rim tape and any rubber parts like where the valve stem enters the rim.  Just in case.


The Saarthal Amulet does not show up in my inventory

Question: I have started the "Under Saarthal" quest and once I remove the amulet from the door and get trapped, it does not show up in my inventory.  I have re-loaded several times with no luck.  In one case I even reloaded to the start of entering the quest and then went off and completed other quests and sold stuff etc. but when I returned to the quest, the same issue occurred at the exact same point.  Again, I have reloaded but to no avail.  I have confirmed that I am not looking for the wrong item, it is simply not in my inventory. This issue is preventing me from progressing the Mage's and Forbidden Legend questlines.  Any ideas?
Comment: Also, if you run it in PC you can spawn this item in your inventoty by typing this in the console (activated by pressing the `~` character): `player.additem 000233D0 1` (never done that personally but it should work. Use only as last resort as it's pretty much cheating)
Comment: No idea, but try to install [SkyUI mod](http://skyrim.nexusmods.com/downloads/file.php?id=3863) it fix lots of issues related to inventory and works fine for me even without the Skyrim Script Extender (SKSE) - it will show you big warning but so far the game work flawlessly and my inventory look much better..
Answer: This seems to be a bug in Skyrim. If you're on PC I would recommend you download the "Unofficial Skyrim Patch" as it fixes a lot of these bugs.
Again, if you're on PC you can add the item to your inventory by typing:
<code>player.additem 000233D0 1
</code>
This should add the amulet to your inv, and the quest should go on as usual! :)
Unofficial Skyrim Patch
Answer: I might be 3 years late, but I found a solution for myself.
I have encountered the exact same thing, annoying as warm sticky fudge.
No site could provide me the help I needed so I forgot about the whole thing, still freaking annoyed.
I could not add the item cause it would not appear in any way in my inventory.
And then it came to me, I solved once a bug by clearing all my bounties, and so I did that and bam.
I had 2 saarthal amulets in my invent (cause I tried 2 times to spawn it in) went back to saarthal, it was a bit awkward for a moment but now I finally have finished this fudging quest.
Hope this still helps
Lazy person from the future


How to translate only the interface back to English?

Question: My site default language is Hebrew (RTL), the problem is that it's all the site, and I want my sites admin-interface to be in English (American). how could I re-translate it to English?
Answer: There is a module for that: Administration Language.

This module lets the administrator see all administration pages in his/her preferred language.
You can use this to display the frontend of the site in one language and still keep most of the backend in English (or another language of your choice).
You can use the standard Languages page to choose the language of the admin pages.
Comment: well, i really want to do it without a module (i already have some modules in the site, and because i also love to update, i prefer to use a minimal number of modules). you wrote: "You can use the standard Languages page to choose the language of the admin pages." really? i didn't see such a page or such an option. the only option i have is to check if a particular language is the default one, or if it's active.


ALPR on Raspberry Pi

Question: I'm looking to do a quickie - that is, a simple project for ALPR on the Raspberry Pi.  I would prefer to have the ALPR engine on the Raspberry Pi so that I don't have to send images over to the cloud.  Any suggestions?
Answer: What great timing!  We are excited to announced our ALPR SDK on Raspberry Pi.  Depending on the size of your project, you may be able to get away with our Free Trial.  You can read more about our ALPR SDK for the Raspberry Pi) in our blog: https://platerecognizer.com/blog/alpr-on-raspberry-pi/.  And from there, you can get the Free Trial to start your project.

ALPR on Raspberry Pi


Small Z axis step: Repetier-Firmware

Question: Z axis length for my printer equals 120 mm. When I manually pass this length, from display controller menu, it's about few millimeters. Then I set the resolution (ZAXIS_STEPS_PER_MM) at 1600 steps per mm. And nothing changed, step still very small.
I use Repetier-Firmware, Arduino Mega+RAMPS 1.4, standard Nema 17 steppers and Prusa i3 like cartesian printer.
This is hardware or software problem? I checked the steppers, they're fine.
Answer: I solved this problem by change EEPROM value to "2" in Configuration.h:
<code>#define EEPROM_MODE 2
</code>
Now ZAXIS_STEPS_PER_MM value load from firmware, not EEPROM.
<code>#define EEPROM_MODE 0
</code>
— does not result in my case.

Small Z axis step: Repetier-Firmware


Should .NET Assembly names include a version number?

Question: We currently have a heated internal debate as to whether the actual .NET assembly name should include the code's version number (e.g. CodeName02.exe or CompanyName.CodeName02.dll). Does anyone know of an authoritative source, like Microsoft, that provides guidance on this issue?
Answer: This is what the Properties/AssemblyInfo.cs file is for.
There are two versions within that file, the file version and the assembly version:
<code>[assembly: AssemblyVersion("188.8.131.526"]
[assembly: AssemblyFileVersion("22.214.171.1246")]
</code>
Once these are set you can use them to track the versions of you binaries.  It is easily viewed in explorer with right click->properties.
None of the dll or exe names included in Microsoft's applications (and OS) use that convention.
Other systems will use these numbers to resolve dependencies and verify the version. For example the MSI system will update binaries based on the version properties.
Comment: How do you increase the build number automatically after each build?  Or do I have to manually open this file up and change the maj, min, build number each time?
Comment: use and * rather then a number and the build will auto increment the value. 1.1.*
Comment: You could also set AssemblyInformationalVersion which ends up as the "ProductVersion" VERSIONINFO field.
Comment: ray247, that is a problem we have faced--and we handled it by using the svn number. A bit of a hack involving a pre build event, a vbs script, and finally a svn revert.
Comment: If you change the assembly name with the version, consumers of the assembly will need to update their references in order to use new versions instead of just recompiling.
Answer: Framework Design Guidelines by Krzysztof Cwalina and Brad Abrams of Microsoft suggests assembly naming like
<code><Company>.<Component>.dll
</code>
I further support this (NOT using version #) because the GAC and dll file properties will show the version.
Comment: And, as stated, the assembly version can be accessed through the Assembly properties in AssemblyInfo.cs
Answer: I know DevExpress website use version indicators as part of their assembly names such as XtraEditors8.2.dll. I guess the reason is that you want to be able to have multiple versions of the assembly located in the same directory. For example we have about 15 smartclients that are distributed as part of the same shell/client. Each smartclient can have a different version of DevExpress controls and therefore we need to be able to have XtraEditors7.1.dll and XtraEditors8.2 existing in the same directory.
I would say that if you have common libraries that are dependencies of reusable modules and can exist in multiple versions 1.0, 1.1, 1.2 etc. then it would be a valid argument that version numbers could be included in the name to avoid collisions. Given that the common libs are not living in the GAC.
Comment: I do it for exactly that reason I have shared dll's on a network drive used by multiple programs and people. If there is a problem in uptime I can upgrade a dll and program relying on it without affecting users.
Answer: I'm not aware of anything authoritative, but it would seem to me that using a consistent name would simplify everything from the process of installation scripts to documentation.  Given that one can store the version as metadata on the file, I don't know why it would be needed in the filename.  Why set yourself up for the hassle of having to account for differently-named files?
Answer: just look at the .NET framework or any other microsoft product for that matter. putting a version number as part of the assembly name sounds like a bad idea.
There is a place for this (and other information) in the assembly's meta-data section. (AssemblyInfo.cs)
This information can be view in Windows Explorer (properties dialog,status bar, tooltip - they all show this information).
Answer: I think the main idea of putting a version number in the filename of a DLL is brought over from DLL Hell, where having multiple versions of the DLL, all with the same name caused problems (i.e. which actual version of a DLL do you have and does it have the required functions, etc).
The .NET Framework handles dependencies completely different compared to the C/C++ DLL files that are more traditional, it is possible to have multiple versions of a library in the GAC, mainly because the GAC is a 'fake' folder that links to other files on the filesystem, in addition to being able to have the assemblies included with your executable install (same folder deploy, etc).
Answer: The version information can be contained in assemblyInfo file and can then be queried via reflection etc.
Some vendors include the version number in the name to make it easier to see at a glance what it is. The Microsoft dll names dont contain a version number in framework directory.
Answer: Since the version can be set as a property isn't this semi redundant?
I'd also go on a limb and suggest MS doesn't have a standard given a quick look at their DLL names: user32.dll, tcpmon.dll, winsock.dll, etc.
Comment: I'm not sure that citing 20 years of software archaeology is terribly relevant!  Names from that era had to be 8.3, which tends to rather dominate the debate.
Comment: These are not .NET components - they are native win32 and are subject to "DLL hell." In .NET, the gac is used to provide versioning and allows subsequent DLLs to have the same physical name.
Answer: Microsoft used a suffix of 32 to denote 32 bit DLL versions so that those DLL's could coexist with the existing 16 bit DLL files.


Solution developer and solution tester

Question: Between a solution developer and a solution tester who must understand the IT architecture of a project in order to work.
Answer: It is very important that both entities understand the programming architecture as it will be useful when reporting the errors or when looking for the the errors or bugs int he software. If the tester does not understand the programming architecture he/she will not know all the dimensions to test.
Answer: Both of them, but on a different level. The developer should understand the basic characteristics of the architecture in order to deliver software which works, performs and scale. The tester needs to know more about how the system is configured in order to be able to solve possible deployment and configuration issues.
Answer: Let's start from the beginning.
The ultimate goals of the developer and tester are opposite:

The developer works to prove that the application works as expected;
The tester works to prove that the application does not work as expected;

"As expected" literally means that the application performs exactly as specified in requirements.
However, the requirements can't be coded or tested directly. For this purpose, two artifacts are created:

Design Specifications (DS), containing the Architecture of the solution;
Test Cases (TC), containing details of individual usage sequences;

The developer implements the DS by writing the code.
The tester tests the code according to TC.
As you see, only the developer has direct need to be deeply familiar with the Architecture.
However, if the tester is also familiar with it, they get a good opportunity to find design-specific problems that are otherwise hard to detect.

Further reading: V-Model

Solution developer and solution tester


Only move one page in double-page view | iBooks

Question: I like reading books in double-page view in iBooks. But I always can only move two pages in this view, like in RL.
Is there a way to only move one page, for example to compare images on different pages and still keep the double-page view?
Answer: It doesn't look like there's a setting where you can make it go by one page, but what you can do is that you can use your Trackpad (the Magic Mouse works too) and move your fingers (to the left or right, depending on where the page are) so that you can see the pages that you want.

This may not be the most glamorous solution, but it gets the job done. Hope this helps.


Frequency Monobits Test

Question: As detailed in the paper Statistical test suite for random and pseudorandom number generators for cryptographic applications by NIST, the first test is given as a basic significance test, it uses a bit sum and calculates the p-value and test statistic. But I do not have the clearest understanding of why $S_{obs}$ is defined as the sum of the sequence divided by the square root of the length of the sequence. What is the statistical rationale behind why this is done two times in order to find a z value?
Answer: Since the test uses $X_k=\pm 1$ as its symbols, it is statistically based on the idea of a simple random walk with unknown bias (if $p=1/2$ then the bias is zero).
By the Central Limit Theorem, for an independent identically distributed sequence $X_k$ we have convergence in distribution, i.e.,
$$
\frac{(X_1+X_2+\cdots+X_n)-n\mathbb{E}(X)}{\sqrt{ n\sigma^2}} \stackrel{\cal D}{\longrightarrow} \cal{N}\mathrm{(0,1)}.
$$
If you do some algebraic manipulation, you can see that the test statistic is exactly the left hand side and the $Z$ value is of course based on a gaussian distribution.
Comment: I figured it out, you are right about the two-tailed. It is just that there are different gaussian distributions in the text and it was hard to make them relate when I was looking at them.
Comment: Your answer is very good. And I believe it is helpful, but do you mind elaborating on why in the paper they divided by $\sqrt{2}$ from the test statistics in the erfc equation?
Comment: Since they use absolute value, I think, going between one sided vs two sided?
Comment: I thought it had something to do with the positive values defined only as well, but what does it mean to be half normal? In particular, why can't they just change the significance level why does dividing by the square root of two and not 2 solve the issue?
Comment: great that you figured it out. you can upvote the answer if it was helpful.

Frequency Monobits Test


How to get top features that contribute to anomalies in Isolation forest

Question: I am using Isolation forest for anomaly detection on multidimensional data. The algorithm is detecting anomalous records with good accuracy. Apart from detecting anomalous records I also need to find out which features are contributing the most for a data point to be anomalous. Is there any way we can get this?
Answer: SHAP values and the shap Python library can be used for this. Shap has built-in support for scikit-learn IsolationForest since October 2019.
<code>import shap
from sklearn.ensemble import IsolationForest

# Load data and train Anomaly Detector as usual
X_train, X_test, ...
est = IsolationForest()
est.fit(...)

# Create shap values and plot them
X_explain = X_test
shap_values = shap.TreeExplainer(est).shap_values(X_explain)
shap.summary_plot(shap_values, X_explain)
</code>
Here is an example of a plot I did for one IsolationForest model that I had, which was time-series.

You can also get partial dependence plots for a particular feature,
or a plot showing the feature contributions for a single X instance. Examples for this is given in the shap project README.
Answer: One possible describing feature importance in unsupervised outlier detecion is described in Contextual Outlier Interpretation. Similar as in the Lime approach, local linearity is assumed and by sampling a data points around the outlier of interest a classification problem is generated. The authors suggest to apply a SVM with linear kernel and use estimeited weights for feature importance.
Comment: I am wondering if you can use LIME to generate local explanations for each of the identified anomalies in IsolationForest?


Is Kalman Filter for LTV systems applicable on Hybrid systems?

Question: As all of us know Kalman Filter is designed for LTV (Linear Time Variant) systems. But nobody in the literature applies that on Hybrid systems. In my opinion Linear Hybrid systems are a subset of Linear Time Variant (LTV) systems, So my question is why don't people use Kalman Filter for Hybrid systems with linear modes and resort to robust estimation approaches?
Comment: I think you're asking "why don't people use Kalman Filter for Hybrid systems with linear modes and **instead** resort to robust estimation approaches?" -- is that what you meant?
Answer: You really have two questions -- one, is the Kalman filter applicable to linear hybrid systems, and the other is why isn't it used.
I can't answer your second question.
As for your first question (is it applicable) -- I think it could be made to be applicable.  In fact, I strongly suspect that there's some fairly obvious combination of a Kalman-Bucy filter for the continuous-time part of the system and a straight Kalman filter for the discrete-time part.
However
I've found that for a lot of real-world problems involving a discrete-time controller and a continuous-time plant, it's easier to just model the continuous-time plant as a discrete-time system as seen by the controller, optimize the control in discrete time, and then just sweep the fact that the plant is actually continuous time under the rug.
This is because if you're going to make a discrete time controller that actually works in practice, the most reliable way of achieving this end is to make sure that the frequencies of any significant plant dynamics are exceeded by the controller sampling rate by a healthy margin.  Do this, and any inaccuracies that you introduce by assuming that the plant responds step-wise to controller commands is less than any inaccuracies from the difference between your best-ever attempt at a plant model and what a real plant is going to do under real circumstances.
However (again)
If you're casting about for a PhD topic, there may be something in here, unless the approach was considered in 1952 and discarded for some good reason.


SCIP JNI (Java Native Interface) installation on Ubuntu 14.04:

Question: I am trying install SCIP on different computers I have. Now trying on a freshly installed Ubuntu 14.04.
So I got the scip suit from here and makeed it. Then I went to scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni and followed the instructions in the README:
1) doxygen jniinterface.dxy
   - generates xml documentation
2) ./createJniInterface.py xml/*
   - uses the xml documentation and creates JNI interface
3) create softlinks to soplex and scip in "lib" folder:
   mkdir ./lib
   cd lib
   ln -s ../../../../soplex-2.0.0 soplex
   ln -s ../../.. scip
   cd ..
4) make soplex
   - creates shared library of Soplex
   - use options (e.g., ZLIB=false GMP=false) as required
5) make scip
   - creates shared library of SCIP
   - use options (e.g., ZIMPL=false READLINE=false ZLIB=false GMP=false)
     as required
6) make
7) test your installation:
   cd examples/JniKnapsack
   make
   make run

Everything is fine until step 6, during which I get the following error. Any idea?
daniel-ubuntu@ubuntu:~/Downloads/scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni$ make
make: *** No rule to make target `classes/de/zib/jscip/nativ/jni/JniScip.class', needed by `all'.  Stop.

Answer: Due to memory limits the steps 1 and 2 don't create the right set of the files and they crash. That's why I don't have the right set of files expected.


Dataset holds different distribution than the real world

Question: My dataset holds two classes, which in the real world are distributed about 95%\5%. I trained a model which performs well when the distribution is 70%\30% in the train set and the test set as well. Are my results reliable?
Note: I have done this because it was easier to extract data creating this kind of distribution. My accuracy is about 96% and precision 98%.
Answer: The best way to determine the reliability of your model is by testing it on a separate test set, with a distribution close to that of the real world. While it may be more work to procure this dataset, the results will allow you to determine the true reliability of your model.
Without the recall it would be difficult to extrapolate into your situation from here, but supposing it sits around 90%, in a real-world dataset of 1000 samples you would expect to find 45 true positive samples (mislabeling 5 as negative) as well as ~19 false positives (based on the 98% precision, 950 * .02 = 19). That would mean that in a real world case, for the positive class you would achieve an approximate 70% accuracy rate (45 / (45 + 19) = ~.70). Whether or not that is reliable enough depends on your use case.


How do I get Kuwait Embassy Attestation in India?

Question: I am looking for business opportunities in Kuwait, I am from India. I heard that if I want to go to Kuwait, I have to complete the Kuwait Embassy Attestation process in India. So can anyone guide me through the procedure?
Comment: It's unclear what you're asking. The title suggests you want to obtain from the Kuwaiti Embassy in India a document called an "Embassy Attestation." The body, on the other hand, says you want to go to Kuwait, which requires a visa. Which do you wish to do?
Answer: The Kuwait Attestation is needed to verify the genuineness of the document in case one wishes to use his personal, educational or commercial documents in Kuwait. Kuwait is one of the well-known countries to welcome immigrants to stay, work or do business in. Certificate Attestation for Kuwait is an important procedure that is to be followed mostly when you are planning to visit Kuwait.
Kuwait Attestation
The process to attest documents from the approved department is known as Certificate Attestation. To recognize the trustworthiness of documents, it is necessary to get an essential seal or signature from the authorized department on your document. There are more than one department and rules present in this process. Each of these authorities gives a stamp of their own on the backside of the document.
Procedure for Kuwait Attestation
Regional Level
It is the primary level of the document verifying process. This step of confirmation can be done by the notary or the University from where the certificates were issued, as per the requirement or from the Chamber of commerce in the case of commercial documents.
State Government
The verification of certificates from the state is carried out by three various companies as per the requirement of the document type. These companies are the State Home Department, Human Resource Department, and the Sub-Divisional Magistrate. SDM is independent of the state government, yet, the attestation performed by this authority is considered on the state level.
MEA Stamp
Ministry of External Affairs is the least level of authentication from the home government after which an MEA sticker is applied to the document. MEA is the central organization that deals with the foreign matters of the nation.
Kuwait Embassy Attestation
It is performed by the administrators of the Kuwait Embassy or consulate to attest the verified certificates. It is the last step in getting certificate attestation for Kuwait after the Ministry of External Affairs stamp.
Usually, the attestation of certificates can turn out to exhausting to be taken place individually. Assistance from specialists can confirm to be very useful. There are certificate attestation services that help in making the method easier for others.
Comment: Hi Ganesh, are you connected to the company you linked to? It's fine if you are but you're supposed to disclose the connection--you've used them, you work for them, or you're the owner.


May a compiler ever generate code to unload parts of the code segment during execution?

Question: Apart from Dll concept that provides ability of loading/unloading methods or functions at run-time, I'm wondering if a compiler may ever say something like, ok as this particular part of the code takes considerable amount of space in code segment and is never gonna be used again after this point during program execution, it'd be good to generate some code to unload that part of code segment after reaching that particular point during program execution so that overall space took by code segment gets smaller. Is it something just fictional or may that happen?
Answer: Sure. There's a technique called overlaying that loads different code into the same bit of address space at different times. Sometimes it was done manually, other times compilers helped. Sometimes the loading is done in software, sometimes in hardware (with address multiplexing, so that e.g. during boot time one bit of address space reads from a ROM chip, but after boot it switches to address RAM or a different ROM instead).
Overlaying was much more common when computers had less memory, e.g. in the early days of DOS where you had 640K at best and often not even that. These days it still has applications for embedded systems where memory and/or address space are at a premium.
Answer: A compiler can do anything it wants to, as long as that doesn't violate the standard. If it can figure out that the code is never called again, it can ditch it completely.
It could even replace it with a smaller stub function that would reload the code, were it required.
But you'll be very unlikely to ever see that in a modern OS since the OS itself provides that capability under the covers.
Operating systems (at least the common ones) will swap out your physical pages when memory runs low, and they won't be reloaded until they're needed (usually by a page fault when trying to access them).
Answer: Yes, Windows Device Drivers use this technique. The LE file format has certain code segments marked as discardable. The OS can also certain times take such a decision to swap out code segments that have not been used for a long time.
Stricly speaking however, this is not the area for compiler to play around with. It is mostly the linker/loader/OS that affect this.
Comment: Discardable code segments also exists in the more common PE format used by EXE's and DLL's. The compiler certainly has a role here; it places functions in specific segments. But there's little point in it, as you noted: an OS can discard all read-only pages that are reloadable, and will discard pages that haven't been touched lately.
Answer: I don't know of a compiler which does this, but there's no rule prohibiting it. If the compiler can prove that doing so won't change the semantics of the program, then it is allowed under the as-if rule.
It is usually not necessary however, because unused code can already get swapped out as part of the pagefile mechanism associated with virtual memory. (and because you'd probably only save a few KB of memory space)


How to create a buffer for catchment area of an historical settlement

Question: I'm looking for a way to create a buffer from a specific point that represents the catchment area in a selected time in QGIS. I've found many tools that allow me to do it using driving time or public transport. I need to do the same only using walking time in a natural environment using the geophysical information of a DTM as criteria.
More in detail, I'm trying to reconstruct the catchment area of some different roman period settlements and to do that I'd like to create some isochrones of different walking times.
I've searched all over the web but I have not been able to find a solution to this specific problem. I've spent time trying to use SAGA algorithm of Accumulated costs but somehow I'm not able to run this tool.
I hope someone could help me or suggest me a proper tutorial.
Answer: you could use the r.walk.coords GRASS algorithm using processing (available in 2.18, may not be available in older versions).
According to the documentation this uses Naithsmith's rule which iant mentioned. It also takes into account the varying cost of uphill versus downhill for different slope ranges.
Not used it myself, but it looks like it'll do what you're after.
You'll need to create an additional friction raster (e.g. you could rasterize polygons for wooded areas to make walking progress slower through forests), although I suspect you could set all the cells to zero if you only have a DEM.
Comment: Thank you and also thank to Iant. I've been able to do that, just neded to spand some time setting properly Grass and understanding how to create a usefull friction raste. Now it works well. Many thanks again
Answer: You need to apply Naismith's rule to your terrain model. Fritz and Carver did something similar in this paper and with See combined it with Dijkstra's algorithm for routing in this paper (pdf).


WebService management

Question: I have a few web-services which all are parts of one application. They all built with Jenkins and builds stored in folders. To run them all I starting few ssh sessions, doing a lot of scp's, and run each with nohup ./start -Dport=.. &
It was ok until is was the only application. But now there are five. And each deploy is like a hell.
So, is there any software to automate this? I want it could copy few files over ssh, run few bash scripts, monitor service activity and expose it over web-ui. It is possible to create something by myself, but I don't want to reinvent a bicycle.
Answer: Kwatee (I'm the developer) is a free tool that does just that. You have a web ui to configure and operate the deployment on any number of servers. You can also automate the whole process in a continuous build environment via ant/maven plugins or python shell commands.

WebService management


Caching Google do not

Question: I'm trying to test the speed of my site with monitoring-transactionnel.com I have an error Vary: Accept-Encoding with Google but I do not know how to settle the problem.
Answer: Those are Google Ads scripts, you can't take control of those scripts nor the way they are served.
You shouldn't worry about them, generally these scripts are really small and Google brings them at Speedlight, and most of the time on your page onload, but if you're still so much concerned about them, you can only remove Google Ads from your page.
Oh also, as I can read here, load show_ads.js once, these scripts are only loaded once, next time they will load from cache.
Comment: Ok I'm not going to take this into account. Too bad because if I did not have this message my site have validated 100%
Comment: Happened the same to me :/ Don't worry about it, it's sth like XHTML/HTML5 validation, normal people visiting your site won't care and won't even know what that is

Caching Google do not


C# automation application

Question: I would like to create an auto email distributor application by C# for my company.
Usually, I would create a console application and set up a schedule to run this program from server task scheduler.
Is there any ways to build this kind of application other than console application? And what is the benefit of it compared to console application.
Answer: It can be done with every application type. Asp.net\Silverlight\WCF\WPF\WinForm...
Console Application is the easiest way because

It doesn't have a UI layer(or almost doesn't have...).
No configurations are required.
Answer: If you have a robust scheduling application (such as task scheduler), there is little point to rebuilding this inside your application. If the scheduling application is not sufficient for your needs, you'll need to embed that logic in your app.
Either way, a console application is fine. The latter scenario will just require more configuration (in the form of a configuration file probably). Still no need for a UI unless the config is complex.
Answer: You may write a Service. Writing a Service in .Net is too easy and straight forward and then you need to use a timer to invoke the operation on schedules.
A service will be executed in the background and can be configured to be executed as soon as the computer turns on.
Because services do not have user interface, you need to feed them with the requests using a database or a messaging system.
Answer: Windows schedule of a console application is ok.
If your schedule is continuous (every minute) you might be better off a Windows service see Here.
See this stackoverflow question for the comparison HERE

C# automation application


Why is the nine tails afraid of Madara?

Question: In a recent episode of the Naruto anime, the reanimated Madara tries to summon the nine tails but fails since it's sealed inside Naruto, later when Madara attacks with his Deep Forest jutsu the nine tails tells Naruto,"I'd rather be controlled by you than by Madara" and shares some of its chakra with Naruto to defeat Madara. Is it really afraid of Madara or is there some other reason?
Comment: I don't read that as _fear_ - possibly loathing or dislike, but I don't know why you think fear is what's behind these statements.
Comment: nice point.. even for sasuke he says that sasuke's chakra is as sinister as Madara. So what is it with Madara and Kurama?
Comment: @Oded yes, but what gives way to that feeling?
Comment: @debal - "I'd rather be controlled by you than by Madara" does not suggest that Kurama is _afraid_ - it isn't an expression of fear. It suggests dislike (anyone would be better than Madara - don't know why, but fear doesn't seem to come into it).
Comment: @Oded, srry for not being clear.. :) I was referring to why Kurama feels that way for Madara.. be it fear or dislike.
Answer: I don't think that it's fear per-se, more like... hate.
The nine-tails prefers to help Naruto voluntarily than be forcefully controlled by Madara (or Tobi, for that matter).
Manga Spoiler:

 The bijuu have feelings, and hate being treated as weapons, ever since the Sage of Six Paths dies, Kurama has known nothing but ignorance from humans. (Like when Madara yells at him to obey, or when Hashirama tells him that he's too dangerous and he must seal him.)

So helping Naruto was the better option.
Comment: I agree with the hate. Hate of being used or controlled.
Comment: And this coming from Uchiha Madara himself.
Answer: I think it was because that Madara was the one that made him destroy something that he didn't want to I mean come on he was basically Madara's mind controlled slave .
Watch harshirama vs Madara  and you'll see why the nine tails or kurama attack the leaf village or at first tried to attack it until harshirama stop Madara by accepting his challenge to fight Madara which harshirama managed to first separate the kurama and Madara  with a contact seal Justsu which freed kurama from Madara's sharingan which made kurama blind and did'nt know what was going on until he woke up and found himself locked away in the hashirama's wife mito uzumaki the first jinchuriki.
kurama was with until she became ill and so they decided to find another what they called vessel for the nine tailed fox  which happened to be kushina Uzumaki the mother naruto uzumaki and the wife of minato namikaze or in other words naruto's dad and the fourth hokage which he stopped the real attack of the nine tailed fox where it was not Madara but it was another uchiha named obito that made the nine tails attack the village and then when he
Lost control of kurama , kurama started attacking because of what they are treating him as but luckily naruto's dad or the fourth hokage managed to stop kurama's attack and planned to seal him in naruto on the break of death he managed to complete the seal and said his last goodbye to naruto until those times where over that's where naruto was kurama's jinchuuriki for already 16 until the attack.
So guess old memories are coming back to kurama of the times of how he was treated and he was not scared of Madara he was very angry at him and managed to help and encourage naruto by giving him some of his power to counter the deep forest Justsu  and write now from naruto and kurama having a lot of issues while naruto was growing up and similar backgrounds on how they were treated they finally became friends , partners for a reason not just because they were alike to each other it's because they both wanted one and that is to protect and save the world they live in and that's why he is not afraid
Answer: Nah, I don't think Kurama is afraid of Madara.
I think what he meant by "I'd rather be controlled by you than by Madara" is that he didnt want to be fully controlled by his user (he wanted to have a say in decision making). Kuruma probably wouldn't like to be manipulated like a puppet.
Answer: 9 tails fears being controlled by Madara because he likes his current host. Plain and simple. The Uchiha have a past with him as well, as depicted in shippuden episode 2 when Sasuke uses his sharingan to explore Naruto's mind.
On a side note, the Jinchuriki (all demons as well) are beings that thrive via personal gain. A demon will not present itself to a human unless it wants or needs something that can be taken or given freely from the human. Perhaps 9 tails believes Madara is just another (1)manipulative asshole with the (2)last name Uchiha. 2 reasons not to go with him. Another reason could be that e believes Madara is weak >:p and unworthy of his acquaintance.
Comment: Nine tails never feared Madara. It only hates to be controlled and misused like a weapon. As an arrogant tailed beast Kurama doesn't appreciate to be controlled exscpecially by The Mangekyō Sharingan. However this method of control seems to be inferior to that of a Perfect Jinchūriki, since it turns the Tailed Beast into a mindless, unthinking animal being unable to use its other abilities as well as being unable to control the power output of the Tailed Beast Ball. [source](http://naruto.wikia.com/wiki/Tailed_Beast_Control#cite_note-18)

Why is the nine tails afraid of Madara?


PHP end tag "?>"

Question: I've had an interesting phenomenon with a PHP end tag. I had a php file that was executed by an Ajax call. In the php file was included a php library file with assorted functions. When this library was included the php response included a bunch of blank lines. When I removed the end tag from the library this stopped happening.
Can anyone explain to me what going on here ?
Comment: You probably had some empty lines after the ?> tag, the empty lines are then interpreted as empty lines. When you remove the php end tag, the lines were seen as php code, and empty php lines aren't written to the output buffer.
Comment: The library PHP file has a bunch of newline characters after its `?>`. Those get sent as output directly to the output buffer since they are not interpreted as PHP code inside ``. That's the most common cause of "headers already sent" errors, and the reason many frameworks omit the `?>`.
Comment: http://php.net/manual/en/language.basic-syntax.phptags.php
"If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag"
Comment: I think that [this response](http://stackoverflow.com/a/4499749/1413922) in another similar question it's a perfect answer.
Answer: This is well documented. From the PHP Manual:

The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

Omitting the closing tag helps you prevent accidental whitespace or newlines from being added to the end of the file.
Answer: That's a core PHP feature: unlike other languages, you need to tag PHP code with a special tag (normally <?php) because everything else is considered literal output:
This is not PHP
<?php

echo 'This is PHP' . PHP_EOL;

?>
This is not PHP either

D:\tmp>php test.php
This is not PHP
This is PHP
This is not PHP either

Although the manual mentions HTML, PHP doesn't really know/care what content-type is outside its tags.
If you forget to close a PHP block when further stuff follows you normally get a syntax error:
This is not PHP
<?php

echo 'This is PHP' . PHP_EOL;

This is not PHP either

D:\tmp>php test.php
PHP Parse error:  syntax error, unexpected 'is' (T_STRING) in D:\tmp\borrame.php on line 6

Blank lines are a sort of special case because they are valid and almost invisible in almost all languages (PHP, HTML, CSS, JavaScript...) so they often unnoticed.
Once you've removed the ?> tag, your literal blank lines have disappeared from the script output because they've become part of the PHP code (and, as such, they've started to get ignored).
Of course, blank lines are ignored by PHP but not necessarily by whatever you are generating which, as I said, does not need to be HTML: it can be a picture, a PDF document, an Excel spreadsheet. Bogus white lines can be easily avoided by not closing the last PHP block when it's the last part of the file.
Comment: today you should not use echo in your php anyways. Pointing to MVC, Template-Systems, Frameworks and so on.

PHP end tag "?>"


Customize document library EditForm.aspx to display Error/Exception

Question: I am writing an ItemUpdating event receiver for a document library in MOSS 2007 (yes, I am still on that version!) and need to bake in some validation. If the validation fails or if an exception is thrown anywhere in that method, SharePoint typically takes me to a less-than-stellar error page. I wish to take a user-friendlier approach, seeking to redirect the user back to the EditForm.aspx page, displaying the form with the submitted values and one or more error message(s) right above the form. How do I achieve this, without involving SharePoint Designer? This needs to be a pure Visual Studio based solution.
Answer: Since I haven't seen MOSS 2007 for a while, I'm not sure if this will work:
properties.ErrorMessage = <ERROR MESSAGE>;
properties.Status = SPEventReceiverStatus.CanceWithRedirectUrl;
properties.RedirectUrl = <YOUR URL WITH QUERY STRING>;

Comment: I have come across this option, but I am not sure it will take me back to the EditForm.aspx page and display all the values submitted by the user, intact. Will it?
Comment: The RedirectUrl property is not in WSS 3 apparently. Without that line, it takes me to an user unfriendly error page displaying the error, but also the stack trace.


Saying bad words to shaytan

Question: I  most of the time abuse and say bad words to satan. When he brings some bad thoughts. Is this permissible?
Answer: Firstly, you shouldn't get into a habit of saying bad words in any case since the Prophet (SAW) said:

"The believer is not one who curses." (Jami al-Tirmidhi)

Secondly, Allah told us in the Quran what to do when Shaitan gives us bad thoughts:

And if there comes to you from Satan an evil suggestion, then seek refuge in Allah . Indeed, He is the Hearing, the Knowing. (Quran 41:36)

Seeking refuge in Allah is to say: أعوذُ بِٱللَّهِ مِنَ ٱلشَّيۡطَٰنِ ٱلرَّجِيمِ (auzubillah minashaitan nirrajeem). "I seek refuge in Allah from Satan the outcast."
Remember, Shaitan is our enemy. He will only become gleeful and happy at us cursing him. It was narrated in a hadith that:

A man said: I was riding on a mount behind the prophet (May peace be upon him). It stumbled. Thereupon I said, "May Shaitan perish!"
He said, "Do not say 'may Shaitan perish' because when you say that, he will swell so much so that he will be like a house, and say, 'That was by my power'. Instead say 'Bismillah (In the name of Allah)' because when you say that, he will diminish so much so that he will be like a fly." (Sunan Abi Dawud)

So, when Shaitan whispers something to you, seek refuge in Allah. If something bad happens to you, say "Bismillah." If you curse Shaitan, he will only become proud of himself and happy.
To read some more you can visit here: IslamQA.

Saying bad words to shaytan


First time F1 visa went wrong and rejected. Help me rectify for 2nd time!

Question: Below is my conversation with the Visa Officer (VO). I tried to recreate the conversation as best as I could remember. I have another appointment for the visa interview in a week. Please help me improve any aspect that I might have done wrong. Thanks a lot!

Me: Hello, Good Morning?
  VO: Good Morning, pass the i20 and Passport please!
  Me: Here you go.
  VO: Georgia Institute of Technology! Personal Funds! So, how are you going to manage this much money?
  Me: I have 134,000 dollars in my accounts. Moreover, my father can provide any further expenses that might occur.
  VO: In which account?
  Me: In multiple accounts.
  VO: How did you get this much money?
  Me: Well most of the money is from my mother's savings, that I got after she passed away from cancer 7 years ago, as I am the only child.
  VO: How did your mother get this money? What did she do?
  Me: Well most of the money is from mother's saving….
  VO: Yeah, I know, but how did she get it?
  Me: Well my mother used to run a private medical school, alongside my father, who is a government doctor and some of his colleagues. There, primary health care was taught to students who enrolled in the program…
  VO: Typing for a while…..
  Me: Waiting
  VO: Typing…..
  Me: Should I show you my account statements?
  VO: uhmm.. No need.
  Me: Okay...
  VO: Typing…..
  Me: waiting
  Me: Can I add something?
  VO: Go ahead.
  Me: My father works as a government doctor. Presently he is posted as Assistant Director, for the Ministry of Health, Government of Bangladesh. He also has a private practice.
  VO: Typing…
  VO: Sir, … how did you get here today?
  Me: By car.
  VO: Is that your car? Do you own that car?
  Me: No, I rented that car.
  VO: Oh! You rented that car! Okay.
  Me: dumbfounded
  VO: Typing for a while again. Hands me the white leaflet.  Sorry Sir, you do not qualify for the visa you have applied for. Have a good day!
  Me: Thank you sir.
Comment: Why do people think this question is unclear? Obviously he's asking (1) why did the officer decide he's not eligible for this visa, and (2) what did he say that led the officer to this decision?
Answer: Others may give other suggestions, and your US university should give you advice as well, but I'll focus on your last line "Thank you sir."  This is understood as gracious acceptance of the officer's decision, but gracious acceptance won't help you much in this or any American legal matters.  You will get better results by being polite but assertive.
To be polite but assertive, you need to prepare ahead of time by learning the rules that the officer is required to follow.  For example, according to the US State Department page on visa denials:

If denied a visa, in most cases the applicant is notified of the section of law which applies. Visa applicants are also advised by the consular officer if they may apply for a waiver of their ineligibility.

Prepared with this and further understanding of the US visa process, at that point you might say something like "Could you tell me the reason?" or even more boldly "I believe I'm well qualified, do I misunderstand?"  Even if the officer still denies the visa, at least you will get some clarification about what went wrong.
Comment: They have handed me a leaflet citing the 214b Law, which says that I am a potential immigrant. There's a range of reason cited under that law. Thing is, all F1 visa denied are handed the 214b leaflet. So, I am not entirely sure about the definite reasons. My guess is because I am having to pay such a large amount for my first year (66k USD)
Comment: Without knowing more, I don't understand why you rented a car to go to your visa interview. My point isn't about the car. My point is that if the officer doesn't clearly understand your story (or any subplot of it) and your ties to your home country, the officer is required by US law to assume you're trying to immigrate to the US, making you ineligible for a nonimmigrant visa like F-1. So you'll want to be assertive in providing answers that make your overall situation clear to the officer.


Double time swing notation

Question: I am arranging a piece for big band, and I want a section that is being played "straight" (no swing) to immediately be followed by a section with double time swing. Is it necessary to include the metric modulation pictured below, or would it be acceptable to simply write "Double-time swing" on the score?
Answer: There's no need for the metric modulation, saying "swing" is all you need, after all, swinging is what big bands do (at least I hope!).
There is a distinction however between double time and double time feel. If you are switching to 8th notes for walking bass and 16ths for swing 8ths, that is double time feel. The pulse stays the same. Pure double time is like going from 4/4 to cut time, or 2/2. The measures go by twice as fast. Experienced jazz players are comfortable with both.
Notation conventions in jazz and pop are not quite as cut and dried as they are in classical music. Different composers and arrangers may take different approaches to notating your particular issue.
If I am reading or writing music I like for it to look like what it sounds like if that makes sense. For example if I'm playing walking bass I want to read quarter notes not eighth notes, even though that is sometimes done like @Aaron says. I know a lot of players feel the same way I do. For that reason I prefer to just use or see "double time swing", preferably with the addition of a metronome marking that reflects that. Some will use a cut time symbol but many arrangers don't do that, they just say "double time" and stay in 4/4.
In the end either solution will work, think about what you would prefer to see if you are sight reading.
Answer: The metric notation is unnecessary, and possibly confusing, since it isn't generally used. Most jazz charts would just say "double time swing" (and, more likely than not, notate the lead parts in eighth notes — see John Belzaguy regarding using quarter notes for the bass).
One option would be to use a [quarter-note] = [twice as fast as previous speed] along with "swing".
Answer: Might be the sheet music I've looked at lately, but I've only ever seen 16th-note swing instead of double-time swing. Both mean the same thing, but the first is a lot more intuitive to figure out (at least IMO).

Double time swing notation


Usage of the w3c media fragment with images

Question: I am looking into responsively loading images for a web page (yes hot topic) I have chosen to use a srcset polyfill to take into account a dpi along with screen widths... The problem is I am choosing to use the image as a background for covering the entire screen (so I would need muliple different crops of the same image to be displayed for even just landscape vs. portrait views and doing this to fit multiple device widths and heights seems like a nightmare) So I am exploring different possibilities on how I can display and Image across multiple screen ratios and resolutions while still not loading massive Images just to only display say a third of it as rest is cropped out in order to not distort. I came across the w3c spec. for Media Fragments which basically allows for the retrieval of certain portion of a jpeg or video in pixel-ed, rectangular dimensions ie. 50% width and height of an image centered horizontally and vertically within an image. here's the link to the w3c spec --> w3c link <-- explaining how to implement this for browser's now my question is with how the http request work do they fetch the entire image and crop client side or is there something the jpeg file format mapping bits of data to pixel locations which can be interpreted and parsed by the server to only return the specific bytes for the portion of the image I requested thus reducing the total number of bytes needed to serve the image?
 The reason I am asking is if so using media-fragmentation would allow me to dynamically crop any image to fit screen dimensions and additionally prevent additional bandwidth overhead needed to download an entire image when only half or third of pixels could be displayed. Anyways can anyone give me some insight into this? and which if any browser nativly support media fragmentation at this time (though this polyfill seems to cover others )
Any insight into the inner-working would be greatly appreciaed I have briefed over the specs but can't quite seem to get the actual way download is pocessed with respect to images
Answer: "can be interpreted and parsed by the server to only return the specific bytes for the portion of the image I requested"
AFAIK most media fragment players are just getting the entire resource from the server. There are media fragment server implementations but these are mainly demonstrative, one is Ninsuna Media Delivery (http://ninsuna.elis.ugent.be/ModelDrivenMediaDelivery)
"which if any browser nativly support media fragmentation at this time"
Firefox since version 9, Safari since Jan 2012 and Chrome since Jan 2012 (at least partially)
Credits to Raphael Troncy for this information I am reporting, from the MediaMixer project. There is a list of media fragment supporting software at http://community.mediamixer.eu/materials/software.


Does Sitecore have a built in email engine?

Question: I know this may sound like a stupid question, but numerous google searches haven't given me the answer I'm looking for. I see a lot of data on how to format emails based on Sitecore Templates etc, but nothing on actually sending mail. Do I need to do this via .net code, or does Sitecore have a component that manages sending mail?
Answer: Take a look at Sitecore.MainUtil.SendMail as a built in function within Sitecore to send email. My understanding is it uses the standard .net mail library, but puts a Sitecore wrapper around it.
Answer: It depends on the volume of mail you want to send. If you just want to send simple emails (ie alert emails or 'thank you for registering' type emails then you would just use the normal built-in .NET email functionality.
For more complicated (campaign/mass) emailing there are add-on modules such as the Email Campaign Manager (ECM) - http://sdn.sitecore.net/Products/ECM.aspx or http://www.sitecore.net/unitedkingdom/Resources/brochures/Sitecore%20Email%20Campaign%20Manager
Sitecore provides some example auto-emailer actions in the 'Sample Workflow' that comes with the default Sitecore install too.
The Web forms for Marketers module also has some emailing actions that are included with the package.
Hope this helps :)
Comment: I'm just looking for basic functionality so I can create a forum users can fill in, which will send out a single email. No mass emails at this stage. I guess I'll be using the .NET email functionality. Thanks :)
Answer: You should probably look into system.mail.net. The best reference site for this can be found here:
http://www.systemnetmail.com/
Answer: Thanks for all of the replies.
As with other Sitecore issues, I found that Sitecore was not necessary to solve this issue. Standard .Net functionality did what I wanted much easier.


why won't my furnace turn off once it reaches the desired temperature

Question: I have a moncrief furnace and replaced the thermostat but the furnace will not cut off once it reaches the desired temperature.  What could be wrong?
Comment: How many degrees over the thermostat setpoint does it get up to?
Comment: so it just keeps heating and the temp keeps increasing?
Comment: In addition to the questions above: Did the problem start happening after replacing the thermostat, or did you replace the thermostat in an attempt to fix? What kind of thermostat was there before and what did you replace it with? Were the terminals/wires labelled and are you sure you reconnected them properly? (This may not be relevant, but:) Does the problem go away if you put the old thermostat back in?
Comment: I'm downvoting until more detail is added to this question. In the current state, it qualifies as "not a real question" since we don't have enough information to provide a proper answer.
Comment: When I removed and replaced the Honeywell thermostat from my boiler to fix the hot water coil I had the same problem. I found that when I pushed the copper probe into the crevice in the boiler it was not in all the way, and did not register the water temp. Once I made sure it was seated in the whole way it shut off at the correct threshold.
Answer: Home thermostats typically operate with a "dead band", a range above and below the set point that the furnace operates over. For example, if the setpoint is 68°F the furnace might turn on at 62°F and off at 71°F.
Comment: **Hysteresis** is a useful term to look up when it comes to thermostats acting this way. There is *usually* an adjustment somewhere.
Answer: Bottom line the thermostat controls the off and on of your heat system thermostat is nothing but a switch that shuts your furnace on or off when the desired heat level is reached, you can actually run a heat system manually with a simple toggle switch and get the same results as a thermostat, so to  simplify your problem first make sure your power supply to the furnace is correct if so then   remove the cover from the thermostat and place a jumper wire from the red terminal to the white terminal or green is your fan yellow is your air condition if nothing starts when you touch all three terminals then you need to check the transformer voltage it should read 24 to 26 volts, if this checks out and still no function then you have other problems and it may require a trained tech.to trouble shoot as it could be a combination of many things, there is no simple one solution to any heat system every problem must be considered, in plain English no one can fix your furnace with one simple answer can only offer a  few quick tests that you can preform yourself before calling in the experts, (NOTE) no person should attempt to probe around in anything electrical  unless your experienced in  heating & air systems you could get electrocuted in short order burn your house down or severely injured, so my advice call in a tech that knows what he's doing


Group By Last Modified Date in XSL or Content Query WebPart

Question: I need to diplay the result of my content query webpart as follows:
Date modified 1
TitleTitle
Date modified 2
Title
Title
Title

I know you can't do a group by on the last modified date in de content query webpart. And to be frank, I really don't want to mess up my content type by using the solution that was given here (no offense, i just like a clean content type).

Is there anyway I can do the same using my custom XSL file?
Answer: You can group your items using Muenchian Method:
Put this line outside of the xsl templates:
<xsl:key name="ByDate" match="Row" use="@YourDateColumn"/>

And draw your items like this:
<xsl:for-each select="//Row[generate-id() = generate-id(key('ByDate', @YourDateColumn)[1])]">
    --- Draw group header ---
    <xsl:for-each select="key('ByDate', @YourDateColumn)">
        --- Draw item ---
    </xsl:for-each>
</xsl:for-each>


Single ended ADC negative voltage protection

Question: How to protect ADC input against the negative voltage?
Answer: Different requirements will require different methods of protecting an ADC input against out of range input voltages. Some may compromise accuracy, some may not fully protect the ADC.
One simple way is to buffer the ADC input with a rail to rail op-amp running from the ADC rails. Although this passes the problem to the op-amp, we can often configure the op-amp gain resistors to tolerate large input voltages.
Another way is to use a shunt diode to ground. This will allow a small negative voltage through to the ADC, which is usually tolerable, especially if the input current is limited. The input resistor R1 limits current into the protection diode. The next resistor R2 limits current into the ADC input when D1 is shunting current. D2 provides protection against large positive voltages.

simulate this circuit – Schematic created using CircuitLab
R1, R2 values should be adjusted for your particular situation. High enough to limit current to safe levels, low enough to preserve ADC accuracy against input current requirements.
If tighter clamping than 0.7 is required, schottky diodes can be used, or a transistor can be used as shown. This will limit the negative excursion to around 0.2v below ground, or 0.1v if it's biassed to 0.6v though with an increasing leakage current as the clamp voltage gets closer to ground.
Answer: Use a diode in series with the ADC. Place the diode in such a way that it will appear to be reverse biased to a negative voltage.
The potential drop will be maximum across the diode in this case, and hence, your ADC will be protected.
Or else, you could just pass your analog input through a full wave rectifier and lose the negative voltage before it even reaches the ADC.
Note:There will be some potential drop across the diode, around 0.7 volts for standard diodes. Use diodes only if you're sure that a drop of 0.7 volts in input will not cause a relatively bad output.
Comment: Damn, I never thought about that. Should probably edit the answer
Comment: does the OP have any requirement for accuracy, does he mind a diode voltage drop in the way?
Comment: Perhaps the OP never considered it either....
Comment: @Neil_UK Yes. Actually I have two OP-AMPs in the inverting configuration.


Should questions asking for one view be asked again but for a different view?

Question: This question originally was asking for the Sunni view, now it is asking for the Shia view.  Would opening a whole new question asking for a different view be ok, or would it be called a duplicate?
Answer: I believe it has merit, especially if most of the answers in the original question have not touched on that view. BTW, SE actually encourages duplicate questions, which should not necessarily be closed. Although it's usually better to consolidate answers into one place, sometimes it's useful to have them divided over a clear borderline.
Comment: @AlUmmat I divided the answers into too to allow people to vote on both answers separately. Some may support the different view option, but may not support the uneducated argument.
Comment: ok I see what you mean.
Answer: The asker should select only one answer as "Accepted". If someone asks some Fiqh question, and is seeking both Sunni and Shia answers, which one should be accepted? Even if there are multiple Fatwa in Sunnah or Shia, which one should be accepted?
The best strategy is to have the same question that asks all views, and the same accepted answer that also lists all different view. However for many cases this would be impractical and very long questions/answers.
So I think it's necessary to permit multiple questions of the similar topic but asking different views.
Answer: There is also the possibility that an old question received a number of uneducated answers, and after months the OP thinks that our community is now more capable of answering that question. I think this case should be permitted too, although the new question should be closed as duplicate if it does not succeed in attracting such educated answers within a few days.
Comment: Drawing attention to the old question by either improving it (insofar as bad answers are often a sign of a poorly-written question) or by offering a bounty is typically better than intentionally posting a duplicate.  Not to say that duplicates don't [have their place](http://blog.stackoverflow.com/2010/11/dr-strangedupe-or-how-i-learned-to-stop-worrying-and-love-duplication/), they just shouldn't be the first (or only) resort.


Migrate apps from Ubuntu to Fedora

Question: Hi
I have Ubuntu on my machine with several apps installed and lots of configurations made, but I want to test fedora 15 (when it comes). the problem is that I dont want (and cant) install same apps on fedora using internet (main problem is bandwidth), and also i dont have the time to make the same configurations to fedora. is there any way to migrate apps to fedora + conf files?
thanx in advance ;-)
Comment: This kind of question goes on http://unix.stackexchange.com
Comment: The question is related to Ubuntu and it is a "practical, answerable questions based on actual problems that you face". So it's completely fine to ask it here.
Comment: Come on @Jorge, just taking a look at fedora doesn't mean that you should become angry! kiddin' ;-)
Answer: To migrate the configuration files you just have to migrate your home folder, it includes all the user specific application configurations, and since both Ubuntu and Fedora use Gnome per default this should work rather well.
Migrating the installed applications without reinstalling them from Fedora is a profoundly bad idea. Time and effort needed left aside, it will likely result in a very suboptimal, unstable system. Just don't do it, reinstall the apps from Fedora.
(Reasons start with different file system trees and configuration methods between distributions, and probably won't stop with differing file and library versions within individual software packages.)
Answer: Not going to happen. You can easily copy over configs without issue but even if you did retain EVERY deb file you ever downloaded (doubtful) then I am not sure they would work. I suggest you post on a Fedora forum as Fedora is not supported here.

Migrate apps from Ubuntu to Fedora


Dictionaries in Python

Question: I have a text file indicating the frequencies like
"read 1 dick 1 john 1 book 1
read 1 different 1 a 1 different 1
"
i also have a dictionary defined for these words dict={'a':1,'book':2}
I would like to replace the words by their dictionary values. Could anyone let me know how is this done ?
Comment: Is this homework?
Comment: This question is really unclear. You want to replace the word `a` in the file with the number 1, and replace the word `book` in the file with the number 2?
Comment: no this is not a homework...some stuff i was doing as experiments
Answer: text = # your text here
dictionary = # your dictionary here (don't call it dict!)
' '.join(str(dictionary.get(word, word)) for word in text.split(' '))

Comment: @RajaSelvaraj, I did that first, but using `join(' ')` would turn any whitespaces to a single space, which may not be desireable
Comment: text.split() instead of text.split(' ') is simpler and will handle whitespace between words better.
Comment: On the other hand, I thought it makes splitting a sentence into words more reliable, for instance if there are two spaces between some words.
Answer: That's easy:
text = # your text here
for word in dictionary:
    text = text.replace(word, str(dictionary[word]))

Edit
For the problems regarding substrings, you can use regular expressions:
import re
text = # your text here
for word in dictionary:
    text = re.sub('^|\s' + word + '\s|$', str(dictionary[word]) + ' ', text)

Comment: This will create/copy a lot of strings
Comment: i tried this before...However the replace has a issue that it replaces it anywhere it finds a substring too...So for example my text is "read 1 dick 1 john 1 moby 1" but it gives :10 1 5 1 7 1 mo3 1". I tried converting the string to a list but did not find anything smart...
Comment: Use replace will cause the following problem: suppose we have text='boo book' dict={'boo':1} Using replace will lead to the result: '1k 1'
Answer: import re
text = # your text here
dictionary = # your dictionary here (don't call it dict!)
re.sub("\\b.+?\\b", lambda x: str(dictionary.get(*[x.group()]*2)), text)

Comment: sorry it does....thanks for that...let me do some tests :) thanks for that gnibbler
Comment: by the way can we just make the entries are entered in a sorted manner ?
Answer: You could also use re.sub, but supplying a function as the replacement argument:
import re

frequencies = {'a': 1, 'book': 2}

input_string = "read 1 dick 1 john 1 book 1 read 1 different 1 a 1 different 1 "

def replace_if_found(m):
    word = m.group(1)
    return str(frequencies.get(word, word)) + m.group(2)

print re.sub(r'(\w+)( \d+)', replace_if_found, input_string)

... which gives you the output:
read 1 dick 1 john 1 2 1 read 1 different 1 1 1 different 1

The advantage there is that it's only replacing where you have one or more word characters followed by one or more digits.

Dictionaries in Python


Checking Time Played - Sea of Thieves

Question: I've searched the internet for months and haven't been able to find any way to view my Total Hours invested into the game.  I'm aware there is a way on XBox but I play on PC so that doesn't concern me.
Answer: According to this and this Reddit thread, and the Sea of Thieves forum, total playing time just isn't available for Sea of Thieves.
Most users suggest extrapolating the time spent playing from the Distance Sailed, or the amount of cargo you have delivered.
Answer: There is one way, but I'm not sure if it's accurate. Open taskmanager then go to App History and look up Sea of Thieves, should tell you for how long it's been up and running
Comment: It probably wouldn't be accurate. App history measures CPU time, not time running. This can also be cleaned up and you'd lose your "total" time.

Checking Time Played - Sea of Thieves


I want to create something which records audio from the user and then allows them to send it to an email, OR save it to the server

Question: I know how to use AS3 to record sound from the user and enable them to save it to their computer. However, I would really like instead to allow them to either send it to an email address right after recording (without them having to save it to their computer first and find the file), OR to let them save it so that the site owner can access it (They would know that it was happening.). How might this be possible?
Answer: These kinds of questions are generally discouraged in the community...the best questions to ask are how to accomplish/fix specific things, but not a general goal like this.
However, this question may help you get started. You will need to research the rest. Feel free to post a new question if you hit any specific problems in your code.