Plagiarism tag to identify plagiarized posts

Question: Is there any way we can introduce a tag in Stack Overflow, where the community can tag any question, answer or comment as plagiarism, so that the poster can take a note of it and correct his post accordingly?
Comment: this question has the `plagiarism` tag.  It must be plagarism
Comment: Plagiarism in answers is a much bigger problem than in questions.
Comment: Tags shouldn't be used in this manner, only to describe the content of the question and/or expect content answers.  But what is the end goal of this request?  Are you trying to prevent people from plagiarizing other sites, other users, other questions?
Comment: A far better idea would be to just leave a (polite) comment asking the OP to include a link to their source, and to use the Block Quote tag for quoted content, so it gets attributed correctly to the author that wrote the content.
Comment: @random that was the fastest [meta-tag:status-declined] tag I recall seeing before.
Answer: The most important thing to do in cases of plagiarism is to edit it and/or flag it for moderator attention.
If your goal is to alert the OP (in case it was a mistake that can be corrected), you should leave a comment, not a tag. Tags aren't used for this purpose, for multiple reasons:

Meta tags are explicitly discouraged on SO
An offended user can edit the question to remove the tag (and could probably start an edit war)
A plagiarism tag gives no information other than an accusation. Which part was plagiarized, and where from?

Beyond that, what usefulness does a tag have that a comment doesn't? Anyone who has enough reputation to retag a post can also comment on it. Any asker who ignores comments about plagiarism would surely also ignore a tag. And we're not encouraging users to follow the plagiarism tag to read all the plagiarized questions on the site.


What is an interaction motif with respect to protein sumoylation?

Question: While am reading about protein sumoylation this morning I got stuck on sumo interaction motifs and consensus motif line. I heard the the word motifs for the first time. What does motifs mean in this context and What does canonical Sumo consensus motif ΨKx(D/E) mean also? Would you please elaborate the formula and thanks in advance.
Answer: A motif means a pattern. Since nucleotides and proteins have a sequence, they can have some patterns of sub-sequence that may serve some kind of function. For example TATA box in DNA serves as a promoter element. Similarly proteins can have some sequence motifs that can serve as recognition sites for binding partners (amongst other functions). Similarly there can be structural motifs in proteins, network motifs in big networks etc.
In this case the motif is a sequence motif.
From Gareau and Lima (2010):

Many SUMO-modified proteins identified contain an acceptor Lys within a ψKX(D/E) consensus motif, where ψ is a large hydrophobic residue

This motif serves as a recognition site for the SUMO-Ligase.
Here,
K=Lysine
X=Any amino acid
D=Aspartic acid
E=Glutamic acid
From the below figures (Rodriguez et al., 2000), you can observe that ψ can be leucine (L) (original residue in Ran GAP1), isoleucine (I), phenylalanine (F) or valine (V).
I am not sure about the effect of double hydrophobic residues on rate of SUMO conjugation.

Comment: @Meti If this answer [addressed your problem](http://biology.stackexchange.com/help/someone-answers), please consider [accepting it](http://meta.stackexchange.com/questions/5234) by clicking on the check mark/tick to the left of the answer, turning it green. This marks the question as resolved to your satisfaction, and awards [reputation](http://biology.stackexchange.com/help/whats-reputation) both to you and the person who answered.
Comment: @WYSIWYG I did not understand what the plus signs mean in the figure. So could you please explain the figures more in detail. Thanks
Comment: @Meti It is just an arbitrary symbol to denote affinity; more plus signs means higher affinity. You can have a look at the paper for more details.


What is the true rule in a situtation like that?

Question: 2 players is in pot.After turn one of goes for all in and other player called his all in.Dealer open the river card without asking players "how many times would you like to open last card?".So there is a dealer mistake here.Other players wins a pot with lucky flush draw with the last card.Was the last card supposed to be discarded?
Comment: Are you asking about running it twice (or more times)?
Comment: Yes , dealer was too quick to open river card.He didnt let them deal.
Answer: In my experience, the dealer did not make a mistake here. The players must ask the dealer to run it more than once (provided that the casino allows the players to run it more than once). If, however, wherever you are this is considered a mistake, usually instead of discarding the last card, the dealer simply deals another card for the second run.
Comment: Dealer was too quick so players coulnt deal each other.And they didnt discard river card.And i need to learn was that correct.
Comment: It is the players obligation to let the dealer know that they want to run it twice. If the dealer dealt the river while the players were discussing, that is just a bad dealer. I dont think they broke any rules.@Texasfish
Answer:
The dealer is not supposed to ask if they want to run it twice!!

If they want to run it twice it is the players obligation to ask. It is one of those things that is totally optional. Not the dealers business to get involved. Some players like to run it twice some do not. If the players are not talking about running it twice, its time for the dealer to tap the table once and burn and turn. It like asking a player if they want to straddle a blind. Some things for dealers are not to be done, asking players if they want to run it twice out of the blue is one of them.


Angular-UI-Calendar TypeError: Cannot read property 'length' of undefined

Question: I'm getting this error repeatedly, although once the app fully initializes, it works fine.
Environment:
liveaddress.js
jquery 1.10.2
jqueryui 1.10.4
angular 1.2.15 (base, -route, -cookies, -resource, -sanitize)
foundation
foundation-tpls-0.1.0
modernizr 5.2.1
fullcalendar 1.6.4
angular-ui-calendar 0.8.0
I've pulled out pieces of this, but no change.
The source JSON looks like this:
[{"title":"A Night in Old Havana","start":"2013-04-21T07:00:00Z","status":"COMPLETED","id":"aa4af241f9c0bc3375921a9c82f33dc6","unix_start":1366527600},{"title":"A Test Event","start":"2014-02-14T08:00:00Z","status":"BID","id":"fe2ce779b1817a56718aa62774f0f58b","unix_start":1392364800},{"title":"A Very Nice Party","start":"2014-04-04T07:00:00Z","status":"ACTIVE","id":"5bf965595ef247a6f922b930220172ad","unix_start":1396594800},{"title":"Birthday Party for Anne Marie","start":"2014-04-06T07:00:00Z","status":"ACTIVE","id":"5cd30308871bd4465fdcf7219707fd12","unix_start":1396767600},{"title":"A test event","start":"2014-05-01T07:00:00Z","status":"BID","id":"fc1cd8ae2d328e948520d5fee695c7e3","unix_start":1398927600}]

The errors are posted when the control is loaded, occur again after the initial data load is received, and whenever the route is changed to show the calendar (which is on a partial).
Any ideas? Like I said, ultimately it works fine - but the errors bother me.
Thanks
Answer: You probably left out the model on the ui-calendar element. From the docs:

An Event Sources objects needs to be created to pass into ng-model. This object will be watched for changes and update the calendar accordingly, giving the calendar some Angular Magic.
...

And here is a link to the FullCalendar eventSources docs.
Comment: That did ultimately resolve the issue. Thank you. When I first added the model reference, I started seeing double entries in the calendar, but now it works.
Comment: Thanks, that fixed my problem!


Why does Jayne remain loyal to the crew?

Question: We see in the series that Jayne came over because of a slight increase of pay, and having his own room. Typically, people who turn for that kind of stuff are willing to turn again. Why has Jayne remained loyal for so long after making the decision to switch who he is working for?
Comment: All things being equal, Jayne is loyal to money first, keeping his skin intact and then to his gentler angels, however infrequently they may show up. Jayne was first motivated by money, particularly when Mal and Crew were hot on the Alliance hit list. As time progressed, he realized Mal was a safer bet than he could expect to get from the Alliance. At least Mal and Crew were as good as their word. Yes, he is a reprehensible fellow, but ultimately his worldview changes as he learns some people CAN be trusted. (Keep an eye open, just in case someone needs shooting, though.)
Comment: @Thaddeus Why post a great answer as a comment?
Comment: Honestly? Personal quality control issues. I try to write a more thorough answer, giving good detail and supporting information. Such answers take time to craft and I did not have that kind of time. The answers I saw were adequate and sure to get the acceptance (unlike many of my answers) so unless I am willing to craft something really good, I don't tend to bother. Nothing I dislike more than to make a great effort to write something worthwhile and have it ignored/not accepted due to political machinations. So I answer with what I consider great answers or not at all. I appreciate the nod.
Comment: Because he doesn't want River to kill him with her brain.
Comment: @Thaddeus Not to stir up old posts, but I have to say, I'm a fan of your answers. Your comment above, though, kind of implies that I (or others) engage in some sort of "political machinations" to keep  "adequate" answers more popular than yours.  I'm not sure that that was what you intended (I hope it isn't!), but it feels a bit harsh as worded.
Comment: @Beofett: I suspect Thadeus means that in comments he can give a good answer with fewer people demanding "citations!"
Answer: Jayne did turn against them.
In the episode Ariel, Jayne betrayed the crew by calling an Alliance officer in an attempt to cash in on the rewards for Simon and River.
Unfortunately for Jayne, the Alliance officer double crosses him, and proceeds to arrest Jayne along with the Tams so that he can keep the reward money for himself.
Once Jayne realizes this, he helps them escape, and tries to pretend like their capture was accidental.
However, neither the Tams nor Mal were fooled.
Mal addressed this by knocking Jayne unconscious, and threatening to dump him out the airlock (pointing out that betraying his crew was the same as betraying him personally).  Jayne appeared honestly repentant, and seemed to accept that Mal was, in fact, about to kill him.
As a result, Mal decided to spare him.
Simon Tam, on the other hand, waits and bides his time until Jayne is injured during the episode Trash.
Once Jayne is brought to the infirmary, Simon paralyzes Jayne, reveals that he knows that Jayne betrayed them, and points out the benefits of not turning against the guy who would be healing up someone in such a dangerous profession:

You're in a dangerous line of work, Jayne. Odds are you'll be under my knife again, often. So I want you to understand one thing very clearly: No matter what you do or say or plot, no matter how you come down on us, I will never, ever harm you. You're on this table, you're safe... 'cause I'm your medic. And however little we may like or trust each other, we're on the same crew. Got the same troubles, same enemies, and more than enough of both. Now, we could circle each other and growl, sleep with one eye open, but that thought wearies me. I don't care what you've done, I don't know what you're planning on doing, but I'm trusting you. I think you should do the same. 'Cause I don't see this working any other way.

Of course, Jayne being Jayne, it is questionable whether the "carrot" would keep him loyal should a sufficiently profitable (and apparently safe) opportunity present itself.
Therefore, River presents the "stick" as further motivation:

Also, I can kill you with my brain.

So between fear of Mal and River, concerns about the possibility of being helpless while Simon performs surgery on him, and, most importantly, the object lesson that Alliance officers can't be trusted, it is unlikely that Jayne would find an opportunity to betray the crew that he would consider safe, profitable and reliable enough to risk again.  Perhaps he could find opportunities among the criminal elements he came from, but those are the same circles Mal is part of, and the deal Mal offers is apparently comparatively good to what other people looking for hired guns might offer.
Sure, Adelei_Niska might offer a pretty sweet deal, but Jayne is probably fully aware of just how much additional risk he'd take on working for Nishka.  Plus Niska demands far more discipline than Mal does, and far more than Jayne seems capable of.
Comment: Small nitpick. As I understood it, Simon learnt about Jayne's (intended) betrayal in the Trash episode, due to something River said. He didn't suspect anything up till this point and was originally convinced Jayne saved them on Ariel.
Comment: In addition to these more obvious instances, I'd argue that there have been glimpses of Jayne being a good guy deep down - wanting to do the right thing despite his tough-guy/mercenary bravado.
Comment: IIRC, what made Mal decide to let Jayne live was that he was begging for his betrayal to be kept secret more than for his life to be spared.
Comment: Like all that money he donated to the poor people of Canton in [*Jaynestown*](http://en.wikipedia.org/wiki/Jaynestown)?  :)  But yeah, Jayne's not quite as mean and evil as he'd like us to believe.
Comment: @Beofett: HAHA, "donated".
Comment: @Beofett You joke about that, but given him tearing down his own statue and being acutely horrified of the idea that they hero-worship him, combined with his later talk about it with Mal, seems to indicate that Jayne has learned an actual lesson from the events of Jaynestown.
Answer: There are some other points in which Jayne would probably not betray the crew of the Serenity. I emphasize on probably, since Jayne is about as draconian as they come.
1) Pilot - As far as we know, Jayne cannot pilot a ship. Any act of betrayal inbetween points A and B will probably not end well for him. Unless he threatens Wash, if he wants...
2) Zoe - We know where her loyalties lie. Between Mal (former war comrade and superior) and Wash (husband and pilot), Zoe will always side with Mal and the ship. And Zoe isn't a push over by any means. And Jayne knows it. Not to mention...
3) Mal - A decorated war veteran himself, Mal is also a crack shot and a quick draw. While Jayne favors violence (sub guns, knives and grenades), Mal is always ready with that gun of his, unless Jayne gets a suckerpunch in.
4) Nowhere to run - Jayne isn't exactly personable. Where would he go? The Alliance probably has a small bounty on his head, and several other locations probably wouldn't mind picking him up. The Serenity is one of the few safe havens Jayne has...
5) Home - It's somewhat suggested that Jayne really has nowhere else to go. It's never mentioned about his origins, save that he never fought for the Independence (browncoats) or for the Alliance. So who does Jayne side with? Obviously, whoever is paying, but Jayne isn't exactly Boba Fett.
Comment: Jayne does have a loving home, somewhere - otherwise he'd never have gotten his magnificent hat.
Comment: They made kinda a big deal about that hat being from his mother, when he got the package.
Comment: @Jeff I always figured he stole that awesome hat. I'd steal it.
Comment: You know, I had totally forgotten about that. MAAAAM! Where's my *Firefly* at! MUST REWATCH!
Comment: He can't go home because there's no work there and his father won't tolerate people sitting around.  "Anyone can't find work isn't looking hard enough."
Answer: Jayne's ethics are pretty strong, just closely defined.  At the start of the show, his loyalty is clear:  Jayne is loyal to Mal alone.  Hardly to the rest of the crew, and not at all to the Passengers.  I assume the loyalty is to a man he considers to be a stronger one, as he pushes at everyone else at times but Mal.
First, he repeatedly expresses this to Mal in exactly this phrasing: "I wouldn't turn on you, Mal"  Mal always has to restate it in terms of the entire crew.  And later, the crew grows to include the Tams, which Jayne is even less likely to credit.
So on Ariel, he betrays the Tams, which Mal treats as a personal betrayal and sets up the kill scene.  Jayne saves himself by telling Mal to lie about why he's dead - showing that he now considers his image to the crew as important, so they are now 'persons' in his eyes.  So Mal relents and the issue is closed.
So by the end of the show, Jayne considers the whole crew as his team and won't betray any of them.


Modifying erc-721 transfer

Question: Say I want to take a cut of an NFT each time the token is transferred. If I were to change the openzeppelin erc721 transfer function to transfer 1% of the NFTs holding to myself, can that standard still be used in exchanges?
Answer: No.
The quantity of each NFT is one. And the valid quantities are all whole numbers less than two.
So actually, yes. But the only percentage cuts that you are able to take are 0% or 100%.
Comment: i wouldn't be splitting the tokens. just transferring the ETH held inside its contract. I assumed NFT had ETH in them determining its value.
Comment: NFTs do not intrinsically contain ETH. Therefore your question is only applicable to a specific larger application and not the general cases as mentioned.
Answer: I'm currently evaluating the same.
Was thinking if it would be possible to higher the gas transfer price to then cut x percent and send this to a constant wallet.
Still unsure if this would work, but I think what you originally would do is a
Royaltie, that could been integrated like this, but only works on exchanges:
https://eips.ethereum.org/EIPS/eip-2981
If someone has an idea for putting a fee into the transfer action would be nice to hear.
Thanks
Answer: If it implements all functions on the IERC721 interface is not falling from the standard. As @Airwave mentioned there is the EIP2981 standard for royalties and you can see OpenZeppen implementation here, that is still under revision and to be released on their next version but right now is on the open review period.
Your override of the transfer method should just include a call to the EIP2981 royaltyInfo function, and send the returned royaltyAmount to the returned receiver that would be you in your case. And remember to call the method to set the royalty before executing any transfer.
Disclaimer: I do work at OpenZeppelin but this answer was written as a personal contribution.
Answer: Eip 2981 exists, but this is the age old problem of how do you know the amount an nft is being sold for? If exchanges are nice enough to tell you use eip 2981 or whatever system they have, but on a contract level there is not really a way to know. How do you differentiate between a sale and a friend transferring the nft to another friend as a gift? How do you stop payments on the nft from being very small while the actual payment occurs though a side channel of another transaction? Fundamentally this is a problem mostly for exchanges, but also never truely solvable without removing a lot of the freedom for people to use nfts as a transferable asset.

Modifying erc-721 transfer


How do I test differences in reaction times?

Question: I have data from an experiment in which participants had to respond to stimuli in two different conditions in a within-subject design. Obviously, I can fairly easily test for differences in accuracy between the two conditions. However, my initial idea was to check for differences in reaction times. When a subject incorrectly answers, I feel the associated reaction time is meaningless. What is the 'standard' way to do this?
Comment: If I understand your question, it is something like this: I know how to conduct a paired *t* test on *A*. But I want to perform this test on *B*. But *B* is sometimes meaningless. **What is the standard way to do this?** I won't speak for the rest of your audience, but I have no idea what statistical question you are asking. :) Standard way to *do what?* Can you expand a little bit?
Comment: So please edit your question (not comment) to amplify.
Comment: Why is the reaction time meaningless if the answer is incorrect?  Why are you looking at reaction time?
Comment: This would be one suggestion: http://www.psychologicabelgica.com/article/view/53
Comment: I want to compare reaction times for choice. If the wrong choice is made, reaction time seems meaningless. How do other people normally, usually, often, most commonly solve this issue. A reaction measure of choice is a very common (standard) experiment, so there must be prior experience out there.
Comment: Ok, so imagine trying to select the 'correct' image out of a pair, but it's not easy to tell the difference. Under some condition, it may be easier to spot the correct image. This is my hypothesis. I'd like to check this using subjects' accuracy, and also by looking at the time it takes before they make up their mind (believing the condition makes it easier, and faster, to find the correct image).
Answer: The traditional approach here has been to analyse accuracy and speed separately, so you would first compare the two conditions in terms of accuracy (paired-samples t test), and then discard the wrong answers, and compare the reaction times for correct answers from both conditions.
However, as you've said, there are obvious limitations to this approach: speed and accuracy interact in a myriad of ways, including but not limited to the well-known "speed-accuracy trade off": some subjects put more emphasis on accuracy, and respond slowly, some do the opposite.
A huge amount of work has been done on this problem, including the Inverse Efficiency Score referred to by @LGBogaardt. There are alternatives along the same lines - statistical models which take both accuracy and speed into account.
Another option, which I prefer, is to fit a sequential sampling model, such as a diffusion model (there are many other options here, but that paper is a good start). This basically models the process underlying your participants' responses as a simple, semi-random movement over time, which drifts generally towards the right answer, but, because of random noise, sometimes gives the wrong answer instead, and moves less consistently under harder conditions.
The great strength of this method is that it allows you to make more informed inferences about the underlying processes, rather than just identifying one condition as "faster".


Checkout Page Endless Loading Icon

Question: On the checkout page, after entering in credit card information and clicking Place Order the page will show the loading icon and it will never stop. There are no errors in the magento logs or in the server logs. I turned on Paypal debug and the log shows Approved, but the transaction is not going through in paypal or magento.
Answer: I called PayPal again after they said it was a Magento error. The new PayPal rep explained to me that I was using a Legacy version of PayPal Payments Pro that is not supported by Magento 2. I had to create a new PayPal account that included PayPal Manager, and then it began working.
Answer: Open your chrome developer tool by hitting F12 and go to the network tab(Be sure to open it before proceeding the payment info step). After entering the credit card details and clicking the proceed button you will see a request in this tab. Click this request to see the details to debug.
Comment: I added my screenshot to the post. How can I use this to solve my issue?
Comment: There is no visible crash. you have to debug the checkout code specifically  the payment code in js. Might be there is some code that should be executed after getting the response but its not executing.
Comment: How would I go about forcing it to execute? Sorry, I don't know enough to debug the js
Comment: Sorry Josiah I haven't touched specifically this part of magento 2 yet. But I can give you the path of the js file where you can start debugging ("Magento root"/vendor/magento/module-checkout/view/frontend/web/js/view/payment/default.js). Also you might have to check in 3rd party modules that have someone override this js, If yes then you have to debug that file too.
Answer: Josiah, please look into the response tab of that xhr request. Although it gives 200 OK response that request's answer could still contain an error, making js fail to decode the answer and continue. There doesn't seem to be any js error, so my guess it that your answer should be in that response.

Checkout Page Endless Loading Icon


/dev/sdb1 Device or resource busy

Question: I am testing 2 node drbd cluster in virtualbox . I have attached a virtual disk (/dev/sdb/) and mounted it on /mnt/drbd0 directory. While creating a resource by drbdadm create command I am getting resource (/dev/sdb1) is busy error. there is no active process associate with /mnt/drbd0.
Comment: To add to HBruijn's comment. It does sound like you have /dev/sdb mounted at /mnt/drbd0. You need to first create the DRBD resource. Then DRBD and udev will automatically make a /dev/drbd0 device. You'll then want to mount the /dev/drbd0 device at /mnt/drbd0.
Comment: Depending on what exactly you're doing the problem might simply be that the device  is mounted and that you need to prepare it as DRBD before doing so... (But I haven't touched DRBD in ages...)
Comment: @HBruijn I Followed https://www.theurbanpenguin.com/drbd-pacemaker-ha-cluster-ubuntu-16-04/. I am new to drbd could you please tell me if the workflow is right I am getting the error while I am creating the resource
Answer: You shouldn't mount the attached block device, /dec/sdb. Instead, you should attach it as you already have, and then while unmounted create the DRBD metadata on both nodes, bring up the DRBD device on both nodes, pick a node and promote the DRBD device to Primary on that node, and finally create and mount the resulting /dev/drbdX device there.
To get there from where you currently are, you'll need to first un-mount the block device on both nodes:
# umount /dev/sdb
Then, follow the steps I outlined in the summary above:
On both nodes (substitute  with the name of your DRBD resource):
# drbdadm create-md <res>
# drbdadm up <res>

You may need to wipe or shrink (shrinking is not supported by xfs) the filesystem to make room for DRBD's metadata if the create-md refuses to overwrite the filesystem. If you have no important data since you're just testing, I would just wipe it: # wipefs -a /dev/sdb
You should then see something like this in the output of drbdadm status:
r0 role:Secondary
  disk:Inconsistent
  node-b role:Secondary
    peer-disk:Inconsistent

If the nodes are stuck in a Connecting state, check the IPs in your configuration file and your nodes' firewall rules.
Once you see they are Inconsistent/Inconsistent, you can choose one of your nodes to become Primary and start the initial sync. Then, on that same node, (re)create your filesystem and mount the DRBD device:
# drbdadm primary <res> --force
# mkfs.ext4 /dev/drbd0 # or some other filesystem
# mount /dev/drbd0 /mnt/drbd0

Then anything you write into /mnt/drbd0 will be replicated to the peer. To test that everything is working you could unmount the device from the Primary node, demote the device to secondary (# drbdadm secondary <res>), promote the device toPrimary` and mount it on the peer, and you should see that your filesystem has been replicated.
Note that you shouldn't use the --force flag under any normal circumstances; only when you are creating a new DRBD device or recreating the metadata for an existing device.

/dev/sdb1 Device or resource busy


Where do malloc() and free() store allocated sizes and addresses?

Question: Where do malloc() and free() store the allocated addresses and their sizes (Linux GCC)? I've read that some implementations store them somewhere before the actual allocated memory, but I could not confirm that in my tests.
The background, maybe someone has another tip for this:
I'm experimenting a little bit with analyzing the heap memory of a process in order to determine the current value of a string in the other process.
Accessing the process heap memory and strolling through it is no problem. However, because the value of the string changes and the process allocates a new part of the memory each time, the string's address changes. Because the string has a fixed format it's still easy to find, but after a few changes the old versions of the string are still in the heap memory (probably freed, but still not reused / overwritten) and thus I'm not able to tell which string is the current one.
So, in order to still find the current one I want to check if a string I find in the memory is still used by comparing its address against the addresses malloc() and free() know about.
ciao,
Elmar
Comment: Further to my answer below, this might help a bit http://www.linuxforums.org/forum/linux-programming-scripting/52375-reading-memory-other-processes.html
Comment: You might also want to dig around in the memory mapping portion of the kernel/glibc
Answer: There are lots of ways in which malloc/free can store the size of the memory area. For example, it might be stored just before the area returned by malloc. Or it might be stored in a lookup table elsewhere. Or it might be stored implicitly: some areas might be reserved for specific sizes of allocations.
To find out how the C library in Linux (glibc) does this, get the source code from http://ftp.gnu.org/gnu/glibc/ and look at the malloc/malloc.c file. There is some documentation at the top, and it refers to A Memory Allocator by Doug Lea.
Comment: Nice and succinct, I've got a hard time following Aiden's odd answer, I dont really think he answered it anyhow.
Answer: This is up to the implementation of the standard library, of course. So your best bet would probably be to dig through the source of the library (glibc is the default on Linux) and see if you can figure it out. It is probably not going to be trivial.


I want to set a unique permissions folder inside a drop off library

Question: Our group will use the drop off library.  My concern is if a document is left in the drop off library waiting on meta data to be complete, I do not want everyone to have access to that document.  How do I get around this.  My thought was creating a folder inside the drop off library with unique permissions.
Answer: You can use Out of the Box Content Approval.
Step 1: Enable content approval and specify draft item security for the library
Step 2: Enable major and minor versioning for the library
Step 3: Set up a workflow to manage content approval for a library
More On how to do these activities
http://blogs.technet.com/b/speschka/archive/2009/10/30/sharepoint-2010-content-organizer-part-3-the-rules-engine.aspx
Comment: Can you please add more details to your answer about how the achieve this? Right now it is very dependent on the links, that might break
Answer: You can create 2 views that each turn on or off a filter: the default view activates a filter that hides all documents waiting on meta-data to be complete and the 2nd view (perhaps called "admin view"?) displays all documents.
Here are the specific steps (using SP2010, which is what I use).

In your drop off library, create a new column called "Metadata_Complete". Its type can be single line of text.
For the default view: Select "Modify this view". Scroll down to the FILTER section. Select "Show items only when the following is true". Select the "Metadata_Complete" column IS NOT EQUAL TO. Leave the value blank (because, by default, you want the drop off library to NOT display any documents that are waiting for meta-data to be complete). Click OK to save.
For the 2nd/admin view, or the view you probably have now: No FILTER value is set (because you want the view to display everything).
To test: Upload a document to your drop off library. By default, the document should NOT display. Using your 2nd/admin view, fill in the meta-data. In the Metadata_Complete column, type in YES (etc) and save. Since the filter on the default view only filters out blank values in the Metadata_Complete column, you should now see the document.


How to install (to disk) ChromeOS?

Question: I have a HP Mini laptop that I wish to install ChromeOS. I used hexxen's lime build as my laptop's wireless was not supported by vanilla, and I used a USB stick. It works fine, but I can't figure out how to install it and overwrite my existing Windows installation, as currently it seems to be running as a live USB.
Answer: It seems as though this has been done by others before,
http://aikihomestead.blogspot.com/2010/02/google-chrome-os-on-asus-eeepc-2gb-surf.html

How to install (to disk) ChromeOS?


I have 12 cups of tomatoes, but my recipe calls for 10. What do I add?

Question: I'm making salsa, and the recipe calls for 10. What do I add to make this turn out?
Comment: Welcome to Seasoned Advice! If you can include the full recipe and a brief explanation about why you need to use all 12 cups, that'd likely help us understand the question better. While I could understand confusion if you have too little of an ingredient and need to reduce the recipe, I'm not quite sure why you need to use all 12 cups. Thanks!
Comment: It calls for 10 whole tomatoes, or 10 cups of tomatoes?  If the latter, what's stopping you from just following the recipe, and using the rest of your tomatoes in something else, like a salad.  (Or if they're canned, heuvos rancheros or something else the next day.)
Answer: Without seeing the recipe the only way we can advise you is to give you a few general options:

Don't use all 12 cups of tomatoes.
You say you're making salsa, which generally calls for fresh tomatoes. If that's the case, just don't use them all. Set aside two cups worth and go ahead with the recipe as written. This is likely the simpler option in that it doesn't require math.
Use them but don't change the recipe.
While 20% extra is a good amount, salsa is generally the sort of thing that's pretty flexible and you're going to do a lot of adjusting to get it to taste the way you want anyway. Prepare it to the recipe with the extra tomatoes and adjust the taste at the end.
Scale everything up by 20%
You have two extra cups over 10 cups, which is 20% more tomatoes. If you multiply all of the amounts in the recipe by 1.2, you should get an exactly scaled-up version of the recipe. This can get a bit weird if a recipe calls for things like whole eggs (which I'm assuming this does not) but as noted in point 2, the precision of the recipe amounts is unlikely to matter much.

The key takeaway here is that it's salsa - that's a pretty flexible thing, to be honest. The spice level of the peppers you use will vary drastically based on various factors, even within a single variety. Similarly, the flavor of the tomatoes and onions can be quite different depending on which types you use, so you're never going to get exactly the same thing twice in a row.
The important thing with recipes like this is to recognize that you can just wing it a bit and that you want to get to something you like the taste of, not something that's precisely followed a recipe.
Comment: 4. Prepare the recipe with 10 and then add the extras at the end if you think it can handle more tomatoe.
Comment: "Don't use all 12 cups of tomatoes."  This is so obvious that OP must not have explained enough in her question.
Comment: @RonJohn Sure - which is why I asked for more details to be added to the question... but it's answerable even without them.
Answer: It's all about ratios.
If you want to use your original recipe, note that 12 instead of 10 cups means an increase of 20%, or 1/5. If you increase all other ingredients by the same ratio, you get the same salsa, just more of it.
If you, for example, cut the tomatoes by accident and don't want to make more salsa (or don't have more of the other ingredients at hand), just leave the extra 2 cups out and use them in another dish.
You can even freeze the leftovers. For cooked dishes like pasta sauce, it shouldn't matter whether you use fresh or frozen tomatoes.

For all other options, like altering your recipe, we'd need more details.


Why are gnosis safe contracts not optimized when compiled?

Question: this is a question about Safe Contract. Compiling the GnosisSafeL2.sol contract confirmed that it was close to the EVM contract max size of 24.5KiB. And when I run the hardhat optimizer 200 times, I saw that the byte code size was reduced by almost half.
Looking at the singletons distributed on each mainnet, optimizing was not carried out. Is there a reason for this?
Answer: The reason for not using the Optimizer is that it is an unaudited piece of software which may introduce unwanted bugs like "Optimizer Bug Regarding Memory Side Effects of Inline Assembly". You can find other occurrences on Google too.
Also, the contracts are already pretty well optimized; the difference is negligible if you compare the gas usage with and without the optimizer.
Answer: The focus is easy debugging and development, not optimization.
Comment: Welcome to the Ethereum Stack Exchange! Usually better to include a reference for the answer, or your affiliation if for example you wrote the contracts being asked about.
Answer: As this question is very specific for one or two developers, who compiled this contract, it is unlikely that you get an answer on a public forum. The only way to get an answer is to ask directly from Gnosis Safe devs what was in their mind when they did it.


Can I just phone an editor if he never answered back via email?

Question: Last year, I submitted a book manuscript to Springer. The academic editor told me that it looked great and that he would send it for peer review and would contact me in due course. Both the publisher editor and a production person were also involved. I even sent the index for the book. But I haven't heard of the project for 10 months now. Not a pip. I don't even know if it's under peer review, since it's not an article and therefore I don't have the journal's progress bar to check on. I sent emails to both the academic and the publisher editors on the 7-month mark and one per month since then asking about status. I have never received an answer from anyone since March of 2023. I found phone numbers for the academic editor at his university. Is it OK if I phone him out of the blue? I have never before phoned a person I don't personally know to inquire on academic matters, but I'd really like an answer. What do you all advice? Since I signed a contract, should I just assume that they didn't like the manuscript and tell them that if they won't answer in a reasonable period I will explore other publishers? Thanks!
Answer: Try phoning the person who works at Springer first. They will not mind being phoned. If there is no phone number on their emails, phone the office and ask for them. If the receptionist tells you to send an email, tell them you have already done that several times.
If that doesn't work, phone the academic editor.
When you phone, be very gentle and polite and say you would just like to know the status of the publication.
Note that peer review can sometimes take a long time and a book takes longer to review than an article. But I think it was reasonable to contact them after 7 months.
Comment: The Springer editor works in a business and is less likely to be irritated by a phone call out of the blue, which is what you seem to be concerned about. (Of course it is not actually out of the blue as you have emailed them several times. )
Comment: Why the Springer editor first? Last time I heard the ball was with the academic editor instead…
Comment: I will, thanks. The problem is that if a book takes a year to be reviewed, then by the time they finish reviewing it the author could already need to update the book! Which is my case. And it could lead to an infinite loop!!
Comment: Yes, academic publishing can be very slow. If you are able to talk to the Springer person, you could gently ask them about this too - will it be possible to make some updates, or is it too late for that? They might say that for minor things that is fine but for major things it is too late. It won't lead to an infinite loop.


Thermal noise from circuit transfer function

Question: Is it possible to compute the thermal noise of an electronic system given only it's transfer function (phase + magnitude)? In my case I have a black box circuit of passive elements. I can't measure the thermal noise directly as any amplifier used to take the measurement would include current, voltage and thermal noise.
Comment: In case you have a known input and you can measure the output, you can extract the noise by subtracting the expected output from the measured one, right?
Answer: General, such measurements can be made by applying multiple inputs.
For example, you say the box is full of passives, so it's a linear device: scale the input a factor $a$, you get the same output, but also scaled by $a$, whilst additive noise (which thermal noise is) adds power independent of the input amplitude.
$$ U_{out} \propto U_{in}$$
For a signal of a single frequency, your system will have a fixed gain/attenuation $A$. So,
$$ U_{out} = A\cdot U_{in}.$$
So, apply a sine at any given frequency with one amplitude, measure the output power. Apply the same frequency, twice the amplitude (i.e., four times the power), measure the output power.
\begin{align}
P_{out,1} &= A^2 P_{in,1} + P_{noise}\\
P_{out,2} &= A^2 P_{in,2} + P_{noise}\\
&= A^2 4P_{in,1} + P_{noise}\\
P_{out,2}-P_{out,1} &= A^2 4P_{in,1} + P_{noise}- A^2 P_{in,1} - P_{noise}\\
&=A^2(4-1)P_{in,1}\\
&=3A^2P_{in,1}
\end{align}
Great! Since you set $P_{in}$, and measured $P_{out,2}-P_{out,1}$, you can now calculate $A$. The difference between $A\cdot P_{in,k}$ and $P_{out,k}$ is $P_{noise}$. (Of course, the measured noise power is a stochastic thing – you need to measure / average long enough to get a good estimate!) Note that you can also get $A$ as the magnitude of your transfer function, but a) where's the fun in that, and b) if you actually knew that, you'd probably just be throwing $k_BTR$ at the problem, as you could, based on knowledge of the characteristic impedance of your measurement system, calculate both an equivalent noise bandwidth and an effective resistance.
Sadly, that noise power is the sum of both your device's noise and your measurement setup's noise. But that's not too bad! You can take a resistor that properly terminates your measurement device, measure its temperature, and thus calculate the Johnson-Nyquist Noise power that it has. Measure only the resistive terminator, and you get the noise your measurement setup adds. (This also works with passive attenuators between your device under test and your measurement setup etc.; there's many ways to do such measurements, and what I draft is but a very naive one.)
The powers you'll have to measure are pretty low. Thermally isolating (i.e., foam, non-electrostatic blankets, making sure there's not an air draft) the devices under test is a good idea to get repeatable measurements.


Can you use the D&D 5e Player's Handbook in a 3.5e game?

Question: I'm new to D&D so I got the 5e Player's Handbook, but my friend and his pals only play 3.5e. Can I use my book and character sheet to play in their game?
Comment: Similar question, but in reverse: [Can a D&D 3.5e character be used without changes in 5e?](https://rpg.stackexchange.com/questions/119382/can-a-dd-3-5e-character-be-used-without-changes-in-5e)
Answer: No, they're very different games. Anything you try to use out of the D&D 5e Player's Handbook will be nonsense to the "game engine" that a D&D 3.5e game uses. It would be like trying to put a Blu-ray disc into a CD-ROM drive: it will superficially look like it fits, but it will not function.
To play in their 3.5e game, ask them what you need. They may lend you a 3.5e PHB, or they may just point you to the d20 System Reference Document and give you some guidance on how to build a character (which is missing from the d20 SRD on purpose), or they may have a different set of information to use for making characters in their particular campaign. Ask and find out.
Comment: Nice analogy with the discs!
Answer: D&D 5e is a completely different game from 3.5e.  While the two have superficial similarities, the rules are so far apart from one another that you can't really use one set of rule with the other.  Your 5e books will not do.

If the people you're playing with already have the 3.5e games, you don't need any books - they already have all the books you need.  Just borrow them from those players/the DM.
You can get the D&D 3.5e player's handbook if you want to read the rules on your own without borrowing a copy or referencing from the internet, but any group that wants to play the game really needs only one copy of the books.
You will need a Character Sheet of your own though - that's something each individual player will need - but fortunately, those are incredibly easy to find online just by searching for "D&D 3.5e Character sheet".  Different groups use different sheets, so ask your fellow players which sheet they're using.  For the most part though, the differences for each sheet are superficial - any sheet will do as long as it's for 3.5e.
Technically you don't even need the sheet if you're good at writing down and organizing statistics on your own, but it's highly encouraged if you want to organize your character stats in an easy-to-read way, and for two sheets of paper and a bit of printer ink, is easily the cheapest thing to get.
Or if you have a tablet or smartphone, you can use one of the many online tools that exist for keeping track of character stats - many of which are free - and just keep your tablet/phone on hand at the table.
Comment: @thedarkwanderer True, there's a number of different special character sheets you can use for more advanced character-making, but for a first 3.5e session, the standard one should be enough.
Comment: Note that there are certain special classes - like psionics - that add a few new things that you'd need a special character sheet for, but it's unlikely you'll need a sheet like that if this is your first game, and if you did, your GM would let you know about those special rules.
Comment: If you take a non-standard race, you may also need to make up your own sheet, as you will if you play an optimised Cleric, Wizard, Druid, or other spellcaster, or any class from the Tome of Battle, or rely extensively on situational bonuses that are normally overlooked, or buy a fair quantity of complex starting equipment, or livestock you intend to use in battle or whose stats are otherwise important.
Comment: "for two sheets of paper and a bit of printer ink" Really that's "a bit of printer ink" as you need the two sheets of paper in any case
Comment: @Caleth Actually thinking on it, even those are superficial if you have a tablet and access to a character-tracking site, so I'm adding that to my answer too.
Answer: Yes With Flailsnails, No without
If your table is playing a strict RAW game, then no, you will not be able to use 5e books in a 3.5 game.
However, if your group is like my group, it is entirely possible to mix the systems together and have fun doing so.   This basically requires a few requirements.

Players don't mind that their options don't match other player's options.
The GM is proficient enough in both systems to be able to make judgement calls on the fly without consulting any books.
You have no or lenient rules lawyers at your table.

In one of the games I'm currently DMing, we have characters/races/abilities from Dungeon Crawl Classics, Warhammer Fantasy RPG v1., D&D 3.5 and D&D 5.0 all mixed together.
Because 3.5, DCC, and 5.0 are mostly D20 based, they meld together nicely.  WFRPG however has a dice system that is too dissimilar and so we had to make custom classes which reflected those characters instead.
If your group doesn't find the merging of systems too difficult, and finds that they actually enjoy mixing the systems, then I would recommend looking into the Flailsnails Convention which gives guidelines on how to mix characters from one game system into another. It also makes it a bit easier for those who need to follow the rules as closely as possible to adjust.
Comment: Given the votes on this answer, I feel I have to point out that, while it's a reasonable answer to the general question here, this is terrible advice to give a new player. They're going to be confused enough as it is without trying to mix editions.
Comment: The question states that his friends 'only play  3.5e'.  Using flailsnail to blend 5e with 3.5e would be making an entirely new system - and if his friends are only willing to play 3.5e, they're probably not willing to play a blend of one system they do play and one system they don't.  The answer is technically correct for the question title, but doesn't work for the asker's specific situation.
Comment: @GMNoob it doesn't matter, because FLAILSNAILS describes itself as inappropriate. One of the preconditions there is a DM who is expert at both systems. Unless you have some inside knowledge that this is the case there, FLAILSNAILS is not an answer.
Comment: @miniman the 12 year old at our table disagrees. He finds it fun and fascinating.
Comment: @zibbobz that may be true and it may not be true.  The reason my table started with flailsnails is because somebody bought the DCC book and wanted to try it out. We had never used that game before, nor did any of the rest of us want to play it, but flailsnails did catch our interest.  Better to give all options than assume what people will or will not be willing to do.


Software for AI generated pictures

Question: Where can I get Android software that generates AI pictures that can be used as profile pictures in antonymous accounts? I've heard this is possible, but I'm not sure where I can get such an app.
Answer: The original is a website called This person does not exist (Website).
Someone wrote an Android app around that website with the same name This person does not exist (Google Store). Since the website does not provide any options, neither does the app. So you have no choice for sex or age, you can just try the next generated photo.

Software for AI generated pictures


When I touch an object that I'm meant to pass through I spin randomly out of control

Question: So I have a very thin cube and I've put it in my environment, I've told this cube to let people pass through it using logic bricks. I'm using it to count your score, but when I pass through it I spin randomly out of control. If it helps you have to be in the air to pass through it.
Answer: First, make sure that "Ghost" is checked and "obstacle" and "collision bounds" are unchecked in physics. Check that the base and top face are far enough up apart on the Z axis so they do not collide with the avatar. You may want to change the cube into a plane to prevent this from becoming a problem.
It would help to know what version of blender, it may be a bug, and what your logic bricks look like.
Answer: I suggest to use the Physics type "Sensor".
It is specifically designed to sense other physics objects without getting sensed itself and without affecting physics (= Ghost).


Implementing a hierarchical bayesian graphical model in R

Question: The shorter version:
1. Bayesian graphical models are new to me.
2. I want to use R to model spatial variation in county level crime using a BGN. I have been working with bnlearn, and would ideally like to continue using bnlearn.
3. My data is hierarchical, such that county level variables are nested in state level variables.
4. I would like to account for this hierarchical structure in my BGN.
5. I have not been able to find any worked examples of how to do this.
6. I am wondering if I could make each county level variable the descendent of a node that indicated state membership. Thus, variable X would be dependent on the state membership, for each variable X that is a county level variable.
7. Is this an acceptable approach? Are there better approaches? If there are better approaches, how can they be implemented in R?
The longer version:
I have a pretty strong background in traditional frequentist statistics and hierarchical modeling, and I have a weaker but extant familiarity with bayesian methods for parameter estimation. However, do to what seem to be some discourse differences, the transfer this knowledge to BGNs has been less fluid than I anticipated.
Currently, I am working on a project that involves predicting spatial variation in crime at the county level. In order to better understand BGNs and to exploit their strengths, I would like to represent my model as a BGN. However, I am having trouble figuring out how to account for the hierarchical structure in my data.
I have read several papers on hierarchical bayesian networks (this was a particularly clear one: http://www.cs.bris.ac.uk/Publications/Papers/1000650.pdf). However, I do not know and have been unable to find any examples or tutorials regarding how to build one in R.
My request, here, is for any information that will help me represent the hierarchical structure of my data in a BGN using R. Further, while theory is always helpful, what I am really looking for is practical examples of how to do this.
A few side notes:
My suspicion is that I am just not thinking about this problem properly.
I faced a similar issue when trying to decide how to account for the spatial autocorrelation in my data. While doing so within a regression framework generally requires (statistically) non-trivial model adaptations; I eventually found a number of papers that model spatial autocorrelation in a BGN by specifying nodes representing the neighbor mean on variable X as the parent of the node for X for every X that might have autocorrelation.
I am honestly not sure how sufficient this relatively simple approach is, but I am wondering whether representing hierarchical structure, at least to get started, might not be accomplished similarly.
For example, I want to reflect the fact that counties are nested in states in my data. For each county node, could I then declare a parent node indicating which state that county was in? Could this be at least a starting place? Or, are their principles or assumptions that this might risk violating?
Thanks in advance for your thoughts.
Answer: I am also relatively new to Bayesian Belief Networks (BBNs) and have tried to answer this myself. Without having data to work with, I thought it was worthwhile to mention M Lappenschaar et al. as a useful reference. Although you may have already come across this article, it has a great overview of the need for multilevel considerations in BBNs, with good examples.
Based upon this paper, I believe you answered your own question, which is the structure of the DAG is important to ensure the multilevel aspect is considered. From the paper: "the BN is constrained in the sense that no edges exist from a lower-level variable to a higher-level variable", which you can see in the images below. Based upon this information, I believe you can likely implement the BBN of your choosing using bnlearn (in fact, the authors of this paper used bnlearn), you just need to constrain the arcs as is specific to your application.


Identify a story about the last dwarf warrior / berserker

Question: A novel I read at least 15 years ago was about a dwarf who was visiting a human woman he had known for years.  He referred to her as Sif, I think.  At the time of the visit he was one of the last dwarves left.  He told her about a time when dwarves were common and he was a member of a mixed group of dwarf and human fighters.  A large amount of time was spent describing berserk  warriors and a period in his life where he was out of control and was a berserker himself.  I remember the novel was fairly short ~ 250 pages or so and was not a series.  I wish I could remember more but that is it.
Comment: Sif is the [wife of Thor](https://en.wikipedia.org/wiki/Sif) in Norse mythology, which also features dwarves.  I can't find any novels that fit your description, but does that sound at all familiar?
Answer: I've read the Dwarves books by Markus Heitz and agree that they do fit the description well. However, I also recently read the Nameless Dwarf books by D.P Prior and they have a lot of berserk dwarves in them...

For more than a thousand years, the dwarves have hidden away from the world in their ravine city of Arx Gravis. Governed by an inflexible council whose sole aim is to avoid the errors of the past, the defining virtue of their society is that nothing should ever change.
But when the Scriptorium is broken into, and Ravine Guard Carnifex Thane sees a homunculus fleeing the scene of the crime, events are set in motion that will ensure nothing will ever be the same again. Deception and death are coming to Arx Gravis. The riddles that preceded Carnifex's birth crystalize into a horrifying fate that inexorably closes in.
But it is in blood that legends are born, and redemption is sometimes seeded in the gravest of sins. For Carnifex is destined to become the Ravine Butcher, before even that grim appellation is forever lost, along with everything that once defined him.
Answer: Markus Heitz's novel, Die Zwerge, published in English translation as The Dwarves has some element of this description.

In particular

The protagonist is a dwarf raised by a human wizard---and was said to be the last of his clan.
One of the (many) important characters is a Dwarf berserker--and there is a tragedy wrapped up in that tale.

I don't think its the one you are looking for however as it

Is more than 600 pages long in trade paperback
Features a world with five large clans of dwarves living in the mountains surrounding a large (continent sized) valley inhabited by elves and men.

There is now at least four sequels.
Comment: Two sequels, now.
Comment: Mmmm...I wouldn't know. I enjoyed the first one, but when it came time to start the second I couldn't muster the enthusiasm. Too many names, too many backstories, too many sub-plots: it couldn't recall what had happened, and hadn't the energy to re-read the first one. My better half *did* re-read the first one to prepare for the second, but I don't think the finished.


Can I uninstall and re-install Jetpack Joyride without losing everything?

Question: So with the latest update, Jetpack Joyride will not get past the loading screen. I am afraid to uninstall and re-install the app because there is the possibility of losing all of my progress and purchases. Does anyone know if I will indeed lose everything or if it will save like some apps do?
Comment: I have the latest version. I've also done some research and cannot really find anyone who has had the same problem.
Comment: When you say purchases are you referring to in-game purchases or real money purchases. Typically real money purchases can be restored either within the game or by emailing the developers.
Comment: I'm not sure about that, but I also don't think uninstalling it will help much.  Maybe the game is no longer compatible with your version of iOS?
Answer: Yes and no.
If you delete it, you will lose all your game data, but things you achieved with Game Centre (eg a new hiscore or an achievement) will be kept on your Game Centre account.
An option will appear when you delete the app to keep the app on Game Centre. Enabling this will keep your achievements and such.
I believe there's no way to keep game data: That will get erased.
Answer: As long as your save game is not what causing the crash, you should be able to backup your save to a PC/Mac, delete and reinstall the game, then copy back your backed-up save.
I've done this method with an PC/OSX tool called PhoneDisk, now discontinued and repackged as iExplorer. This is the guide I've used, which I've linked in an answer to a somewhat similar question of mine.
Answer: I recently uninstalled an re-installed jetpack. All my in game purchases, S.A.M. rewards and coins where still there. The only thing that happened for me, is I lost all my medals and was back at level one.
P.S. This all happened on an Android device.


Add visualforce page to a Page Layout using REST API access

Question: is it possible creating a Visualforce page (containing APEX code) and add it to a Page Layout using the REST API? I couldn't find any information about that.
Answer: You cannot manipulate your org's metadata from the regular REST API. To make changes to the org's configuration or metadata, you must use either the Tooling API or the Metadata API, which would allow you to construct and deploy those entities.
Note that you cannot deploy Apex code to a production Salesforce org without addressing unit tests. You should include those tests in your deployment and run them.
There is some access to the Metadata API available from Apex, but not enough to do what you are aiming at. You could do it within Apex via the apex-mdapi wrapper library.


DataGrid with Picture

Question: I have a DataGrid in Visual Basic 6. This DataGrid displays a list of product just like what see below:

I want to change image in the Image control whenever the user selects a product from the DataGrid. I am doing this thru the code below:
Private Sub txtBarcode_Change()
On Error GoTo nosuchfile
    picture.picture = App.Path & "Images\products\" & txtBarcode.Text & ".jpg"
nosuchfile:
picture.picture = App.Path & "Images\products\no_image.jpg"
End Sub

txtBarcode is a hidden textbox that contains the barcode/id that is currently selected in the DataGrid.
MY PROBLEM: The image doesn't seems to change.
Answer: to load a picture you need to call LoadPicture()
Picture1.Picture = LoadPicture("c:\temp\pic.bmp")

DataGrid with Picture


Error in DirectX example from Microsoft

Question: I'm trying to learn C++ and DirectX, got VS 2012 Express Desktop today for Windows 7.  I should probably mention I already had DirectX SDK for VS 2010 installed.
The first of the 7 tutorials will compile fine, the rest are giving errors.  Because the first one runs I think my include and library directories are set up fine.
Source is here, I put the .fx file in at the bottom as well as the compiler errors.  If you don't want to click megafileupload it's just the DirectX draw a triangle tutorial (2) from Microsoft.
Tutorial files on megaupload
<code>Warning 1   warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification    C:\cpp\DirectX_Tutorial\C++\Tutorial02\Tutorial02.obj   Tutorial02

Error   2   error LNK2019: unresolved external symbol _D3DCompileFromFile@36 referenced in function "long __cdecl CompileShaderFromFile(wchar_t *,char const *,char const *,struct ID3D10Blob * *)" (?CompileShaderFromFile@@YAJPA_WPBD1PAPAUID3D10Blob@@@Z)    C:\cpp\DirectX_Tutorial\C++\Tutorial02\Tutorial02.obj   Tutorial02

Error   3   error LNK1120: 1 unresolved externals   C:\cpp\DirectX_Tutorial\C++\Debug\Tutorial02.exe    Tutorial02
</code>
Also is there a forum here I can rant on?  C++, the Windows API, DirectX, and Visual Studio are all just so unnecessarily difficult to use.
Comment: Right from the docs on `D3DCompileFromFile`: *Library
D3dcompiler.lib or D3dcompiler_nn.dll*
Comment: Rant away on http://chat.stackoverflow.com/
Answer: Recheck if your import libraries are correct and if you're importing from the folder corresponding to your processor architecture.
Also, double check project's encoding, directx doesnt usually work well on encodings other than Unicode.

Error in DirectX example from Microsoft


Difference between class methods and instance methods?

Question: I always confusing to when i used of instance method and class method in programming. Please tell me difference between instance method and class methods and advantages of one another.
Comment: Are you really talking about C++? We don't use the terms "instance method" and "class method"; we use the terms "(non-static) member function" and "static member function".
Comment: Talking about objective-c now???
Comment: @Karl Knechtel, thanks. Your comment helpful to explain differentiation in C++ and objective-C.
Comment: @RRB there is clear explanation for instance method and class method     http://stackoverflow.com/questions/1053592/objective-c-class-vs-instance-methods/1053722#1053722
Answer: All the other answers seem to have been caught out by the incorrect tag that has now been fixed.
In Objective-C, an instance method is a method that is invoked when a message is sent to an instance of a class.  So, for instance:
id foo = [[MyClass alloc] init];
[foo someMethod];
//   ^^^^^^^^^^   This message invokes an instance method.

In Objective-C, classes are themselves objects and a class method is simply a method that is invoked when a message is sent to a class object.  i.e.
[MyClass someMethod];
//       ^^^^^^^^^^   This message invokes a class method.

Note that, in the above examples the selector is the same, but because in one case it is sent to an instance of MyClass and in the other case it is sent to MyClass, different methods are invoked.  In the interface declaration, you might see:
@interface MyClass : NSObject
{
}

+(id) someMethod;  // declaration of class method
-(id) someMethod;  // declaration of instance method

@end

and in the implementation
@implementation MyClass

+(id) someMethod
{
    // Here self is the class object
}
-(id) someMethod
{
    // here self is an instance of the class
}

@end

Edit
Sorry, missed out the second part.  There are no advantages or disadvantages as such.  It would be like asking what is the difference between while and if and what are the advantages of one over the other.  It's sort of meaningless because they are designed for different purposes.
The most common use of class methods is to obtain an instance when you need one.  +alloc is a class method which gives you a new uninitialised instance.  NSString has loads of class methods to give you new strings, e.g. +stringWithForma
Another common use is to obtain a singleton e.g.
+(MyClass*) myUniqueObject
{
    static MyUniqueObject* theObject = nil;
    if (theObject == nil)
    {
        theObject  = [[MyClass alloc] init];
    }
    return theObject;
}

The above method would also work as an instance method, since theObject is static.  However, the semantics are clearer if you make it a class method and you don't have to first create an instance.
Answer: If we don't want to create the object of class then we use the class method
if we want call the method through object of a class then we use the instance method
Answer: I don't know if we can talk of any advantage, this is rather a matter of what you are implementing.
Instance methods apply on instances of classes, so they need an object to be applied on and can access their caller's members:
Foo bar;
bar.instanceMethod();

On the other hand class methods apply on the whole class, they don't rely on any object:
Foo::classMethod();

Answer: Static member functions are informally called class methods (incorrectly). In C++ there are no methods, there are member functions.
Answer: Read up on the static keyword, that pretty much covers it.
MSDN:
http://msdn.microsoft.com/en-us/library/s1sb61xd.aspx
Google search:
http://www.google.ch/search?aq=f&sourceid=chrome&ie=UTF-8&q=static+keyword+c%2B%2B
Answer: Class methods are used with classes but instance methods are used with objects of that class i.e instance
//Class method example
className *objectName = [[className alloc]init];
[objectName methodName];

//Instance method example
[className methodName];

Answer: instance methods use an instance of a class, whereas a class method can be used with just the class name. + sign is used before the Class Method where as single desh (-) is used before the instance variable.
@interface MyClass : NSObject

+ (void)aClassMethod;
- (void)anInstanceMethod;

@end

They could also be used like so,
[MyClass aClassMethod];

MyClass *object = [[MyClass alloc] init];
[object anInstanceMethod];

or another example is:
[
NSString string]; //class method

NSString *mystring = [NSString alloc]init];
[mystring changeText]; //instance Method

Answer: Like most of the other answers have said, instance methods use an instance of a class, whereas a class method can be used with just the class name.  In Objective-C they are defined thusly:
@interface MyClass : NSObject

+ (void)aClassMethod;
- (void)anInstanceMethod;

@end

They could then be used like so:
// class methods must be called on the class itself
[MyClass aClassMethod];

// instance method require an instance of the class
MyClass *object = [[MyClass alloc] init];
[object anInstanceMethod];

Some real world examples of class methods are the convenience methods on many Foundation classes like NSString's +stringWithFormat: or NSArray's +arrayWithArray:.  An instance method would be NSArray's -count method.


Cutting scene results in choppy transition

Question: I used the Razor tool in Openshot to remove a scene from a movie. However, the transition between the two surrounding scenes is now very choppy. The movie is now simply two separate clips. Is there a way to "fuse" the two clips together, so the transition is smooth?
Answer: The two most common approaches, if you don't have B-roll coverage, is either a dissolve (usually a cross-dissolve) or a fade-out/fade-in (usually dip-to-black).  Garish effects (essentially all the others offered in a typical NLE) can also be used (but are usually avoided).
IF the clip you are cutting out means joining what looks like a single take (with a discontinuity in the middle), the dip is your friend.  If the clip you are cutting out takes you from one scene to another, the cross dissolve can also work.  A series of cross-dissolves can work to show the passage of time (where the camera stays fixed and the subject is seen doing on thing, fading into doing another, etc.).
Comment: can these functions be found on openshot?
Comment: Yes, openshot does have transitions, and they have both dissolves and fades.  They also have a plethora of garish effects if you really want to call attention to the transition instead of letting the story and the video imagery speak for itself.


What is fusel alcohol, and does it cause hangovers?

Question: I'd recently heard of fusel alcohol in a reference that it causes headaches/hangovers.  First what is fusel alcohol, and what creates it (can I avoid it)?  Secondly, is fusel alcohol really the main culprit behind hangovers? I know I stopped making/drinking mead as it was a guaranteed hangover for me the next day.
Comment: A high pH and higher temperature contributes to its production during fermentation.
Answer: Fusel alcohols refer to alcohols that contain more than two carbons.  Ethanol (the good stuff) is a two carbon atom molecule.  They happen naturally during all fermentations, with higher concentrations occurring when the yeast are under stress (including high temps).  Keep in mind stress is a relative term biochemically speaking.
Fusels contribute to the severity of a hangover for certain.  However, hangovers are mostly still a function of dehydrated after consuming ethanol alone.  The fusels just amplify the effect.  Consuming too much pure ethanol will still give you a hangover, if ones hydration isn't taken care of too.
Comment: Can you add sources for the hangover claim?
Comment: https://en.wikipedia.org/wiki/Fusel_alcohol

Whether fusel alcohols have an influence on hangovers is apparently still debated and researched.
Comment: Dehydration being the cause of a hangover is also mainly a pub-myth.  The cause is currently unknown and likely to be multiple things.  The current leading theory is that a metabolic byproduct of breaking down ethanol (acetaldehyde) is responsible for many of the symptoms.  If you breathe even a tiny amount of  acetaldehyde (a poison) from a bottle, you get an instant hangover.  More reading: https://www.iflscience.com/health-and-medicine/why-do-we-get-hangovers/
Answer: Fusel Alcohol
I think it's generally accepted that fusels are produced when fermentation temperature is not
properly controlled, or nutrients are not at the proper concentration.  Essentially, stressed yeast produce fusel alcohols.   Apparently, most people believe that fusels promote headaches, but it's not scientifically proven.

In general, fermentation conditions that promote cell growth, such as temperature, aeration, and nitrogen, result in higher levels of fusel alcohols.

--Yeast, The Practical Guide to Beer Fermentation: White & Zainasheff,  pp36-37
Comment: +1 for a good answer, but molecular answer wins
Answer: Yeast produce higher alcohol during fermentation as side product of metabolic pathway from certain amino acid i.e. Leucine, valine, serine etc. The fusel oil produced in fermented wash depends on the number of factors such as yeast strain used, nitrogen content and temperature. Fusel oil gives the pungent taste. It is less vita tile than the ethanol.
Answer: Ingested methanol (wood alcohol) is metabolized to formaldehyde which is a pretty nasty toxin to the human body. Too much methanol/formaldehyde can cause blindness because it messes with the retina...among other things.
Ethanol on the other hand metabolizes to acetaldehyde and then to acids which the human body can handle relatively well compared to formaldehyde.
Keep in mind that all alcohols are "poisonous" to the human body but some are more "poisonous" then others. Much of a hangover is your body's reaction to these "poisons".


Digits in squares

Question: I made a puzzle. I don't think it should be too hard.
Comment: Even without the last rule, this still has a unique solution.
Comment: Fixed! For future reference, the last rule was that two edge adjacent squares must have product less than 50.
Comment: What is the definition of a digit with a loop?
Answer:
 2   9   5
 6   1   8
 7   4   3

Here's my reasoning:

 1 is not prime and has no loop so must go in the centre. The corners are the primes 2357, the edge cells are the rest, 4689. The rows must add to 16, 15, and 14 because the total of all three rows is 1+2+..+8+9=45. The only possibilities for a 15 sum in the middle row is 816 or 618. This leaves as the only possibility for the 16 sum in the top row 295. The bottom row is then 743 or 347. A column of 567, 278, or 578 would sum to more than 16, leaving only one possibility.

As Kruga pointed out, the last rule (about adjacent squares multiplying to less than 50) is unnecessary. I have edited my explanation to avoid needing that rule.

Digits in squares


What is the nature of feathering in an ATR type aircraft?

Question: If the engines fail for some reason midflight, does the ATR aircraft automatically feather the affected engine? In rare cases if both engines fail, does the automatic feathering happen for both propellers? If automatic feathering happens (if there's an automatic behaviour), is the pilot notified in any way?
Comment: You must've watched the Mayday episode of the ATR that ditched in the Med after both engines quit from the wrong fuel quantity computer?
Answer: Depends when the power loss happens and the status of the opposite engine. Airplanes like ATRs and Dash 8s have Autofeather Systems, but they are only active during takeoff and climb and are inactive during cruise.
When the system is armed for takeoff, Autofeather happens when one engine's torque is below some threshold, say 20%-25%, and the other engine is above some threshold, say 50%. If the torque is lost, a solenoid valve in the propeller control system opens to dump fine pitch oil pressure in the prop of the low torque engine and force it to the feather position.
Once the system is disarmed during the climbout, an engine failure will not trigger Autofeather and the crew has to select START/FEATHER on the propeller control levers to feather the props. If that doesn't work, there is normally a backup "Alternate Feather" system that powers up a dedicated electric oil pump in each engine (powered off the battery) to drive the prop to feather even if there is no oil pressure remaining.
Autofeather systems apply another risk level, that of feathering spontaneously when you don't want them to, to the airplane, so they are only armed for the most critical performance case, takeoff and initial climb. The rest of the time, you want that possibility excluded because an engine failure without immediate feathering is not critical to flight, and the crew following its normal procedures to secure the failed engine will feather the engine the propeller then.
If both engines fail at the same time, Autofeather, even if armed, won't activate because you need the power differential between the two engines, one high and one low, for it to trigger when armed. In any case, the double engine failure case is not accounted for in the design, the probability of simultaneous internal mechanical failures being too low to have to be accounted for in the mathematically derived risk analysis that drives system architecture and design (actual double engine failure cases are almost always due to an external cause, like fuel exhaustion or some weather phenomenon).
Answer: Short answer: If the ATPCS is armed, it can auto-feather upto one engine. Both engines will never be auto-feathered.
(Disclaimer: This answer is based on the ATR 72 FCOM. That being said, the systems on ATR 42 would work in a similar way.)

ATPCS
In case of engine failure, the Automatic Takeoff Power Control System feathers the propeller of failed engine and increases power on the remaining engine; doing so is crucial in order to continue the takeoff.
However, this system only works during the takeoff and initial climb. The following are the arming conditions for ATPCS:

Power management selector at TO detent
ATPCS push button - ON
Both power levels above 49°
Both torques above 46%.

Provided that all arming conditions are met, the arming of ATPCS will be denoted by an $\small \color{green} {ARM}$ light on the engine control panel.

Engine failure during takeoff
The ATPCS provides facility to perform takeoffs with a derated power setting of 90% (100% RPM and 90% torque). If an engine fails with ATPCS armed, the following changes will take place:
On ground: An uptrim will be immediately applied on the remaining engine, which increases it's power by 10% (upto a maximum of 100%). Following a delay of 2.15 seconds, the auto-feather sequence will initiate, which includes the following items:

A valve lift solenoid will be energized, which enables the flow of feathering oil

The electric feathering pump will be energized

The failed engine will be feathered

Auto-feather will be inhibited on the remaining engine

The ATPCS $\small \color{green} {ARM}$ light extinguishes, indicating the completion of ATPCS sequence.

In flight: The feathering sequence remains same; the only difference is that 10% uptrim will not be applied in flight.
Reason for 2.15 second delay: This is in case the takeoff is rejected - the windmilling propeller will assist in slowing down the aircraft. The ATPCS does not know if the aircraft has/hasn't exceeded $V_1$, so it will always apply this delay - even in flight. If the power levers are retarded during this time period, the ATPCS will automatically disarm.

Engine failure after takeoff
During the initial climb-out, the ATPCS remains armed, and so the failed engine will feather normally. The uptrim will not be applied however, and so the pilot must manually move the power levers to the ramp.
However, soon after takeoff (at the acceleration altitude), the power management selector will be set to CLB detent, which disarms the ATPCS. Beyond this point, should an engine failure occur at any point in flight, the auto-feather will not occur, and the propeller of the failed engine will be windmilling.
In fact, the governer of the failed engine fine-out the propeller in an attempt to maintain the selected RPM, which will further increase the drag. In this case, the pilot must manually move the appropriate condition lever to FTR - to feather the propeller, and then to FUEL S.O. - to stop fuel supply to the failed engine.

Duel engine failure
With ATPCS armed: There is a possibility that one engine will auto-feather - that is, if both engines do not fail simultaneously. Provided that the torque of one engine drops below 18% while that of the other is still above 46%, the ATPCS will feather the propeller with lower torque. And again, this is possible only during takeoff and initial climb - when the ATPCS is armed.
If both engines were to fail simultaneously, none will auto-feather, since the ATPCS would automatically disarm as soon as both torques drop below 46%. The pilot must manually feather the props by moving condition levers to FTR detent.
With ATPCS disarmed: Now the auto-feather is completely disabled - none of the engines can auto-feather. Should one or both engines fail, the pilot must manually feather them.

is the pilot notified in any way?

The notification that feathering is complete is that the RPM of affected engine will rapidly drop down to zero. This is also indicated by an "auto-feather" text below the RPM indicator on the Engine Warning Display (EWD). A similar notification will be given for uptrim, displayed above the torque indicator.

 Note: Please refer to ATR 72 FCOM for more details on ATPCS and other ATR systems.


Latinism to say "everyone knows"

Question: Is there a common phrase to say "everyone knows x"? I always thought it would be "x is vox populi", but the way I understand from Wikipedia is that vox populi has an opinion content to it.
Comment: Are you looking for an established Latinism in English?
Comment: Well, in that case you're out of luck. All the suggestions here are Latin expressions intended to be integrated into a full Latin sentence. They require actual knowledge of the language from the reader and won't be comprehensible to most.
Comment: @Unbrutal_Russian that would have been preferable.
Comment: Yes, I realized. In any case all the answers are super interesting. :)
Answer: There are many constructions that might be appropriate.
Basic structures:

certum est (with accusative and infinitive) -- it is certain
constat inter omnes (with accusative and infinitive) -- it is agreed upon by everyone
omnibus patet (with subject) -- [x] is plain to everyone
omnibus lucet (with subject) -- [x] is clear to everyone

More rhetorical options:

Quis est qui neget? -- who is there who would deny [x]? i.e., everybody agrees on [x]
Quis est qui nesciat? -- who is there who doesn't know [x]? i.e., everybody knows [x]
Nemo est tam stultus qui non intellegat -- there is nobody so stupid as to not understand [x]
Comment: I chose your answer by vox populi. :)
Answer: Vox populi literally means "the voice of the people," so it does indeed not seem very appropriate.
In Latin, a common expression for "everybody knows" is omnibus notum est, e.g. Omnibus notum est Sergium virum sapientissimum esse = "Everbody knows that Sergius is a very wise man"; or: Sergius ceteros sapientia praestat, ut omnibus notum est = "Sergius surpasses the others in wisdom, as everybody knows." You can also make the generally-known thing the subject, e.g. Sapientia Sergii omnibus nota est (note gender) = "Sergius' wisdom is known to all." In medieval legal documents you will also sometimes read Notum sit omnibus (let everybody know), usually followed by a quod clause, a typical feature of medieval Latin.
How to use this in English?
You could perhaps say: "X is an omnibus notum." But that is not an established expression. I'm not aware of an established English expression -- Latinate or not -- for this idea.
Comment: Aquinas (following a pretty long tradition) refers to certain truths as "self-evident": *per se notum*. He also talks about a given proposition can be *omnibus per se nota* (self-evident to all) or "per se nota tantum apud sapientes* (self-evident only to the wise).
Comment: An established English expression for this idea is 'common knowledge'. But unfortunately that's not Latin.
Answer: One option is certum est ... literally: it is certain/fixed/established. Though it can be somewhat wider in meaning and/or pertain to the individual rather than general knowledge (especially when attached with a dative).
Usually it comes with acc+inf stracture. or with quod

certum est [canes] iuxta Nilum amnem currentes lambere, ne crocodilorum aviditati occasionem praebeant (Pliny the Elder, Naturalis Historia, 8.149) [It is known that the dogs by the Nile lap up water from the river as they run, so as not to give the greed of the crocodiles its chance (Loeb translation)].
Comment: I wonder how certum that anecdote est.
Answer: A fun possibility is "lippis et tonsoribus" (Horace, Sat. 1.7.1-3), which literally means "to the bleary-eyed and to the barbers" and figuratively means "to everyone". It is mainly used to talk about something which is known to everyone.
The interpretation of the second term is quite obvious, barbers still being a gossip center in many cultures. The first term is of more difficult interpretation: possibly bleary-eyed people in Rome had to apply a particular ointment and to stay still for some time, giving them time to gossip.
This is for sure not a common phrase, but I thought it might be interesting...
Comment: As for *lippis* a footnote in the Loeb edition of the text reads: "The shops of apothecaries and barbers were favourite places of gossip." .
Answer: My latin isn't (nearly) good enough to lay this out more directly myself, but I had previously understood that "everyone knows" is usually written most idiomatically as
"omnes sciunt"
(which dictionary translates fairly literally as "everyone knows")
It's possible, however, that this is a specific turn of phrase used more in legal related wording such as around the concept of notorium, since that's where I've mostly seen it personally.

Notorium est, quod omnes sciunt

is translated by the German wikipedia page for the legal word of art "Notoriety" as, roughly (aka using Google translate from "notorisch ist eine Tatsache, die allen bekannt ist"), "notorious is a fact known to all".
And from Bartolus' In ius universum civile commentaria, Dig. 11.7.4 no. 2, when discussing the concept of notorium:

Sed quid arbitrabitur iudex? Dicas quod verum notorium est quando factum est tale de sua natura quod omnes sciunt vel scire eos verisimile sit, sic quod non possit allegare ignorantiam, quin sit supina, sicut si quis gerat se pro episcopo in aliqua civitate, vel si quis in veritate toto populo aspiciente occidit hominem.

Which "Conviction According to Conscience: The Medieval Jurists' Debate Concerning Judicial Discretion and the Law of Proof" (full article is paywalled or requires institutional access) explains with

Bartolus asked, "What is there for a judge to determine?" The only fact that is genuinely notorious is one that, by its very nature, everybody knows or ought to know, so that one cannot claim to be ignorant of it without admitting that one's ignorance amounts to negligence.

Latinism to say "everyone knows"


How can we be sure that the equation of SHM that works for one dimension of an object moving in circular motion works for all SHM?

Question: I have learned that a component of a uniform circular motion is an example of SHM. And I have no question about it, I  totally understand that. I also understand how we can derive formulas like $\vec{a} = - \omega^2 x$ and more. But my question is how can we use this formulas we derived for this one example of SHM to all other harmonic motions say a block attached to a horizontal spring. Is this because of the definition of SHM? (I mean in that case if all SHM's have the same definitions and you can drive an equation for one I think it is possible to argue it will hold for other too) or is there a mathematical proof that show SHM in a uniform circular motion and SHM in a block attached to a horizontal spring are equivalent?
Answer: Simply harmonic motion occurs when the restoring force is proportional to the displacement from equilibrium. Mathematically, you get this whenever you have a differential equation of the form
$$\ddot x=-\omega^2 x$$
where $\omega^2$ is some constant (this is your $a=-\omega^2 x$).
There are many physical systems whose equation of motion has this form: masses on springs, pendulums with small angle oscillations, LC circuits, etc. As long as this equation pops up, you can describe the "motion" as "simple harmonic".
Comment: I am currently learning calculus, so a non calculus answer would be great. Though any answer is great. I am currently at differential equations, so I should be able to understand most of what you will say. I get the this idea of $\ddot x=-\omega^2 x$ as it is the basic definition of SHM, but to arrive to this defination and use angular frequency($\omega$) the idea came from observing uniform circular motions  (or didn't it?) Did people came up with this using calculus at first and then tried to explain this without using calculus for hischool students using uniform circular motions?
Comment: And where do I go after this differential equation. recommand me somre resources
Comment: @EHM I'm not sure about the exact order of things. My answer is essentially non-calculus except notation-wise, which is why I said the differential equation is your equation you have in your own question. I'm my experience I've only seen the circle example in algebra based highschool physics though. I've never been satisfied with it though in the same way you are: the motion is identical but the physical similarly is not as obvious. If I have time later I'll try to update my answer to talk more about the circle stuff.
Comment: Ya the circle explanation isn't satisfying. it doesnt show why all the drived equations using the circle work for all simple harmonic motions. I will try to read about the calculus explanations. Thank you so much for your time
Answer: In other to answer your question, i will let you know that simple harmonic motion follows a particular definition (which i believe you know). When ever we study systems or we wish to model a system and it conforms to our real definition of simple harmonic motion,  we immediately use the equations that relate.
For a mass spring system,  we observe its motion,  we measure our quantities (such as Accelaration, distance, time etc) we study the numbers and we find that it conforms to what we had define as simple harmonic motion.
For a projection of a particle in circular motion. We study its charateristics and it is so similar to that of a mass spring system hence instead of going into the complications which are offered by circular motion we prefer to go directly to the simplicity of simple harmonic motion.
So the answer to your question is Yes! Everything is based on how we define simple harmonic motion
Answer: To make it easy, if you consider a spring, the equation of motion is:
\begin{equation}
M a = - k l,
\end{equation}
where M is the mass of the object, l the length of the spring, k the spring constant, and $a$ the acceleration. This is the equation of motion of a spring.
If you take a particle undergoing a uniform circular motion, the projection of its position over one diameter follows the law:
\begin{equation}
a = - \omega^2 l.
\end{equation}
The two equations above are the same, this means that the projection undergoes a simple harmonic motion.
Comment: That is exactly my question, why are the two equations the same? We derived both those using different examples of SHM (the first with springs and a block, the second a projection of a uniform circular motion in one of its dimentinos). Is it possible to claim that the two equations are equal and go on to drive more equations like $T = 2 * \pi * \sqrt{\frac{m}{k}}$. It feels like there must be some mathicamical proof to relate the two.
Comment: What do you mean? One equation in $a = - \omega^2 l$, the other one is $a = -(k/M) l$. The two equations are equal because you write the same thing with different letters, what Mathematica proof do you need?


How do I remove the automatic updates from Dota2 Workshop?

Question: I've already unchecked the DLC stuff on Dota2 page and disabled download DLC on Steam options in Dota2. I don't have any arcade games installed on it. Why does it keep downloading?
Comment: The vanilla game itself Dota 2 has many updates, often weekly, that need to be downloaded before play. Is that what you're referring to?
Comment: Are you sure it's not just a regular update?
Answer: You've subscribed to workshop items, and the game is keeping them up-to-date as a result.
Custom games including overthrow and 10vs10 are also updated as workshop items.
You can view 'subscribed' workshop items by going to This Page
Or by going via your profile by choosing 'Workshop Items'

and clicking the 'Subscribed Items' button in the lower right.

you will then be able to Unsubscribe from anything you don't want to play.
Answer: *use this at your own risk
RENAME or move THE DOTA 2 FOLDER
Then uninstall Dota 2. When you want it again rename/move the folder back. You will still have to validate all files but at least you will not have to download everything again.
(also works for all games if you rename or move the steamapps folder)(you can then move the games you want updated to the steamapps/common folder)


Android - What is the difference between getArguments and Bundle received in the onCreate

Question: What is the difference between getArguments Bundle and Bundle received in the onCreate?
Answer: TL;DR:
Fragment.getArguments() is for initially creating a Fragment.
onCreate(Bundle) is for retrieving the Bundle from a previous instance.
In detail:
I've been scouring the web for this and asked a seasoned Android developer, so here's a decent explanation:
The Bundle passed as a parameter in the onCreate function is for if there was a previous instance of the Fragment, which is updated when the onSaveInstanceState function is called.
(You can read up more on this in the official docs here: https://developer.android.com/training/basics/activity-lifecycle/recreating.html)
The Fragment.getArguments() function however, is used when initially creating your fragment. You're going to navigate to a Fragment for the first time, and a previous instance of that Fragment won't exist. In this instance, you can set your local variables within your Fragment that was shared by using the setArguments() & getArguments() functions.
(More on that here: https://developer.android.com/reference/android/app/Fragment.html)
Therefore:
Robust code could look like this:
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                            Bundle savedInstanceState)
{
    super.onCreateView(inflater, container, savedInstanceState);

    mView = inflater.inflate(R.layout.fragment_name, container, false);
    mContext = getActivity();

    if(savedInstanceState != null){
        Log.d("yourapp", "A SavedInstanceState exists, using past values");
        mValue = savedInstanceState.getString("valueString");
    }else{
        Log.d("yourapp", "A SavedInstanceState doesn't exist");
        Bundle bundle = getArguments();
        mValue = bundle.getString("valueString");
    }
}

which handles both cases in your onCreate state.
Hope this helps!
Comment: so what happens, If I don't use `setArgument`, or `getArguments`, I pass the object directly to the fragment, and when the fragment destroyed I save that object.
Answer: I would like to add to N15M0_jk's answer.
Sometimes there's no need to save fragment state (for static fragments) and you could use only getArguments() for re-creation since the arguments set with setArguments() are retained even after destroy.
See the reference on setArguments()
Comment: Thanks, you've solved my headache, i didn't know why onSaveInstanceState was useless !
Answer: Bundle received in the onCreate contains the data it most recently supplied in if the activity is recreated and getArguments Bundle returns the bundle which was supplied as argument.
Answer: The arguments bundle used for fragment creation and once set cannot be set again. The bundle in onCreate/onCreateView/onActivityCreated/onViewStateRestored is the savedInstanceState.  You may use this get persisted values you persist via onSaveInstanceState overrides.  Upon fragment creation the savedInstanceState bundle is usually null so you may want to use getArguments.
One other thing about the getArguments,  you dont have to persist these values.  They will get recreated for you by the fragment code.  If you try to setArguments on a fragment that already has them you will run into a IllegalStateException


Problem with bcp

Question: I am trying to load my table with some data using bcp. Below is the bcp command that I am using
bcp Job.DBO.FileWatch in ABC.txt -C -t\t -S server\rept -T -f bcp1.fmt

The schema of the FileWatch table is like this. It is just a dummy table

And the ABC.txt file from where I am reading the data is like this

And the format file looks like this.

But when I run my bcp command, it is not throwing any error and at the same time no rows are copied. I read every link on Google's first and second page and tried every switch they mentioned but still it was not working. Any idea why this could be happening?
Answer: What is -C (upper case)? That's for the code page.
You should have -C { ACP | OEM | RAW | *code_page* } according to MSDN.
I think you mean -c (lower case), which is for the character data type.

Problem with bcp