How can I find my Oracle 10g server version?

Question: I don't have physical access to my Oracle server but I can run some sql command from Toad. Is there a way I can find wich version the server is running, like 10.2.3.1. I know it's 10g but I'd like to know wich patchs and maybe more (memory used, buffers, etc.)
Answer: SELECT * FROM V$VERSION;

More here: http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html
Answer: In addition, to the accepted answer, you can find out the patches that have been applied by querying the registry$history table:
select id,action,comments from registry$history;

This table is normally only visible to the SYS user.
Answer: select * from product_component_version;

will return:


Inversion of a dependent clause

Question: Can one at all say, in trying to bring some color to the style: "it is shown in an, unconnected with previous studies, work, that …", in the stead of the usual: "it is shown in a work, unconnected with previous studies, that …", or that's simply incorrect English?
Answer: It's not really ambiguous (since the meaning can always be worked out) or strictly incorrect, but stylistically the only reason to use this construction is to emphasize an awkward or almost stuttering voice, as though someone were trying to figure out what they wanted to say after they'd mostly said it already. In all other cases, it should be avoided entirely.
Comment: Exactly. It's so unnecessarily awkward that it seems intentionally obtuse.

Inversion of a dependent clause


"continue" inside while is redundant or not?

Question:     while (getchar()!='\n')
    {
        continue;
    }

Is "continue" keyword redundant in this situation?
I am trying to skip the rest of the input such as "noooo"
Comment: Syntactically redundant, yes, though depending on who you ask it could make the intent of the loop clearer.
Comment: here ir's useless. ,now If there's code after the statement, the code is never reached if the continue isn't wrapped in a if statement
Answer: Yes, continue here is redundant since the loop would "continue" by default when it reaches the end of the block. At the end of the block or at a continue, it will re-evaluate the conditional in the while statement. This will call getchar() again to test if the next character is a newline. But this would happen with or without that continue statement, making it unimportant in this particular context.
Comment: @Applik without context it is hard to say why that was included. Maybe the author believed it would help the reader conceptualize the control flow of a `while` loop. But this particular example doesn't add anything to real code that I can see.
Comment: "very redundant" is redundant.
Comment: @stark very true, I adjusted the wording
Comment: I have no idea why the book I am reading now gave this example. Maybe a typo in there. The book I am talking about is C Primer Plus (Stephen Prata) (Chapter 8)(Listing 8.4 Guess.c program)
Comment: In a book, I can see why it would be useful. The alternative is `while (getchar()!='\n') {}` or `while (getchar()!='\n');`, both of which (and especially the latter) seem rather confusing otherwise.
Comment: thank you but the author should have clarified it I think anyways.
Answer: 'continue' is redundant. The while loop executes whatever is inside the body of the loop after checking the condition. Since continue is there, it will simply execute the continue statement and recheck the condition. If there is nothing inside the body it will not execute anything and simply check the condition again.
#include<stdio.h>
int main(){
  while (getchar()!='\n'){
      //continue;
  }
  return 0;
}

You can simply remove the body of while loop and put a semicolon as shown below.
#include<stdio.h>
int main(){
  while (getchar()!='\n');
  return 0;
}

Comment: How about using C code in your answer to a question tagged [c] (and not [c++])?
Answer: Yes, the continue is redundant in this case because it is at the end of the loop.  In fact, you can just put a ; at the end of the while.
Comment: The `continue` *is* redundant but I am against `while(...);` because it is too easily overlooked, or thought to be a mistake (as often done with an `if` clause). An empty `{` braced `}` code block makes the intention more obvious.


Did Ravana have knowledge about Rama being an avatar of Vishnu?

Question: Did Ravana have knowledge about Rama being an avatar of Vishnu before the battle? If he knows that Ram is Vishnu's Avatar and will be killed by him then why didn't he change himself to save his life?
Comment: No one can escape from death. Regardless of whether Ravana was aware of Rama's divinity or not, his death was bound to happen.
Answer: No, he was not aware of this fact. Some of his well wishers tried to say this but he abused them and rejected their advices saying Sri Rama was a human being. Many advised him that Sri Rama was not an ordinary human being. He ignored them too.
As I discuss in this answer, Vibhishana and Malyavan, maternal grandfather of Ravana advised Ravana to make peace with Sri Rama and restore Seetha to him. Especially, Malyavan urges him not to wage a war for the welfare of the demons. He perceived the destruction of demons. He says that he considers Sri Rama as Vishnu dwelling in a human form.

विष्णुम् मन्यामहे रामम् मानुषम् देहम् आस्थितम् |
   न हि मानुष मात्रो असौ राघवो दृढ विक्रमः || ६-३५-३६
I deem Rama of firm fortitude as Vishnu dwelling in human form. This Rama is not a mere human being. [6-35-36].

So, it is clear that someone has advised Ravana that Sri Rama was an incarnation of Vishnu and not a mere Human being. Ravana put a deaf ear to those advices.
To this advice of Malyavan, Ravana arrogantly replies not to exaggerate his foe and a human being in front of him.

हित बुद्ध्या यद् अहितम् वचह् परुषम् उच्यते |
  पर पक्षम् प्रविज़्य एव न एतत् ज़्रोत्र गतम् मम || ६-३६-३
I have closed my ears to the speech you have made, albeit with good intentions and even by taking sides with the enemy. [6-36-3]
मानुषम् कृपणम् रामम् एकम् ज़ाखा मृग आज़्रयम् |
  समर्थम् मन्यसे केन त्यक्तम् पित्रा वन आलयम् || ६-३६-४
How can you hold Rama, who is a mere human being, a small feeble man, taking help from monkeys and dwelling in a forest having been abandoned by his father, to be a competent person? [6-36-4]

It is clear from above verses that he considered Rama as a human being rather than Vishnu.

He did it due to his arrogance and pride that he is the lord of demons and superior to the race of humans. He did it because of his pride that he has defeated celestials, other powerful demons etc.,

रक्षसाम् ईज़्वरम् माम् च देवतानाम् भयम् करम् |
  हीनम् माम् मन्यसे केन;अहीनम् सर्व विक्रमैः || ६-३६-५
How can you hold me, the Lord of demons, terrifying celestials and possessing all powers in full, to be a weaker person? [6-36-6]

This shows his excessive pride and his attitude towards humans. For this reason he fought the war despite of numerous advises and warnings from his well wishers.


How do I protect a canvas photo print after the fact?

Question: I have had a canvas photo print for 7 1/2 years now and it is starting to crack/peel. Is there anything that I can put over it to protect it? I am not sure what the shop did that I got it from. But I would like to protect it from here on out. Thank you!
Answer: If it has already started to crack/peel, there is probably nothing that you can do to save it im afraid.
Some shops will spray a lacquer/sealant onto canvas prints - in the short term they look better as they make the colours "pop", however as the canvas stretches with time, the lacquer cant so it cracks. (this also depends on the quality of the original materials)
You could possibly try re-lacquering it.
Answer: There are different methods of printing onto canvas - Latex is popular now (dries faster, permitting faster workflow in commercial shops). However, previously, it was more usual to get ink jet prints on canvas.
IMHO Latex is not as nice because it sits 'on top' of the canvas - I´ve had prints that are 3 years old show rubbing (e.g. the latex rubs away) on corners from handling and transport. Also, the blacks are not as deep in appearance. I belive this is because, if I rememeber correctly, the ink jet ink soaks a bit more into the canvas (or, sprays, if you like) and so there is more depth to the print. (Canvas as a 3D structure, so colur that sits on top of the canvas, reduces some of the beauty of canvas.) The ink jets take time to dry (24 hours, in the case of my printer), and then one can coat them with a protective varnish (to protect the ink from fading from UV, extending life from decades to a century, at least according to the manufacturer of my printer and inks.)
Among the prints I have, these two types of printing look pretty different - latex more like a thin plasticky layer on top of the canvas, and the ink jet can have lovely deep colours in the shadows. When I've coated some of my ink jet prints with the UV-protectant, which does also improve the colours, one can still see that the colour is not simply on top of the canvas.
The UV-sealant I have, does stretch with the canvas - the workflow is print, dry, cover with sealant, and then stretch the canvas onto the stretchers. But, as said above, it does depend on the quality of materials used.
So, the first question is what is cracking or peeling - the paint making up the colors of the image itself, or a clearish layer that could be the protective varnish?
I'd recommend looking at the edges of the print on the back - usually a bit of color is wrapped around the stretchers.


Standard cycles for virus detection

Question: I would like to know if there is a Standard number of cycles for Virues and Bacterial PCR single and multiple targets
Comment: No, there isn't. It's completely dependent on the sample, how it was prepared, the quality of the template, and the viral or bacterial load in the sample. Try something, if there's no signal run more cycles, if the signal is overwhelming run less. That's science.
Comment: Or, run qPCR and study the amplification curves...
Answer: No, there isn't.
Quantitative PCR (qPCR) uses a specific (e.g. TaqMan) or non-specific (e.g. SYBR Green) dye to detect the point at which the quantity of dsDNA (or a specific template) exceeds a threshold during thermocycling. Assuming you have an appropriate primer, the quantity of target doubles (at most) during each thermal cycle, so the cycle at which the signal exceeds the threshold (the cycle threshold, or Ct value) gives you information about the amount of target initially present.
However, the amount of accessible target in a sample depends on many factors including sample processing, extraction efficiency, sample storage, or the presence of RNases/DNases. The PCR efficiency during cycling also varies depending on conditions. There are also many other sources of variation in qPCR results, for example the platform you're using, the risk of contamination, the cycling program.
In theory, you can keep running a qPCR until you get a signal, but in practice you would stop after about 40 cycles at most unless you were specifically designing an assay to detect extremely low copy numbers since after that the most likely explanation for a positive result is sample contamination. 40 cycles should be enough to detect a template that was only present at 1/1,000,000,000,000 of your detection threshold to begin with. When designing qPCR experiments purely for detection (as opposed to quantification) it is best to include a negative control which helps rule out sample contamination etc. I recommend reading the answer to this previous question to help understand why we stop after a certain number of samples, and see this paper as an example of the risks of not using an appropriate control.
There is some guidance on designing good qPCR experiments at http://www.rdml.org/miqe.php along with a checklist for best practice (although this is specifically aimed at quantitative qPCR studies so not everything on their checklist will be relevant if you are simply thinking about presence/absence).

Standard cycles for virus detection


How can I get Blender to snap vert using grab command?

Question: So I am taking a short course modeling house on Udemi. I noticed that when I use extrude command it is very easy to snap to another vert. However, at one point we need to subdivide (basically one vert missing) to help with making a wall. The teacher just grabs this vert, constrains it to x and snaps it in-line with another vert.
My blender will not do that, even if I have the same snapping settings on as the teacher's Blender.
Blender seems not to notice the vert I want to snap to while grabbing, but if I extrude from another place it snaps to it with no problem.
Then I tried to move a door opening to have it in-line with another door, but it will not snap. If I extrude from a vert, it snaps where I want it to snap within second.
My settings are: Snap on, vertices, closest, and snap onto itself.
Am I missing some settings or is this a bug?
Comment: Can you post the blender file you are having trouble with so we can have a look at it? http://blend-exchange.giantcowfilms.com/
Comment: The site you asked me to upload to doesn't allow me to update my file. I drag my file to the box, check the "accept terms and conditions" give my link and press upload just to have an error saying "Please accept terms and conditions".
Comment: I have tried several times now, always get the same error. IF I accidentally uploaded the same file multiple times, I am sorry. The site here asks me to accept terms and conditions. I don't know where else I should accept but the box below the drag-n-drop box.
Comment: Just upload it somewhere, google drive is a good choice, I just linked that site because it is the most common site for blend files here.
Comment: I managed to add the file yesterday.
Then I got a "Suggested edit" which I have no idea how to use.
Answer: The problem is that you have proportional editing on, press O, or the blue dot at the bottom of the viewport to turn it off (see circled in red)
You also might have forgotten to turn auto merge on (circled in blue), as you seem to have 4 vertices overlapping. To remove them, select everything (A) and use the Remove Doubles function (Press space and search up Remove Doubles).
Comment: This was too simple, thank you anyway for the time. I feel bit silly for this post now :/
Comment: @ÓlafurVíðirGuðbjargarson Please accept it as the correct answer by clicking on the tick :)


Why is the scale of the model I try to 3D print so small?

Question: I'm trying to do 3D printing with Blender. When I import the object to the printer, it appears very small, I don't understand why... I tried scaling it to the maximum allowed by the printer software, but it is still too small. How can I make sure it's the right size?
Comment: do you use a giant printer ? :)
Comment: Did you export it into STL format first? Blenders scaling doesn't usually agree with Maker-Bots, but the Taz can handle it. I suggest rescaling in the Printer software itself.
Comment: but I can't, in the printersoftware appear scla 200! maximum and remains minimum
Comment: ? so you're saying it comes in too small in the software so that even if you size-up as large as you can it is too small still? if that's the case you may have really scaled it wrong in blender. Blenders default measurement system is Blender Units, which are quite large see [this](http://blender.stackexchange.com/questions/254/how-do-blender-units-and-meters-feet-or-yards-correlate) question to convert. If it is say, 10 BU and you thought that was 10 cm. then there will be a problem.
Comment: heyyy I put the scale in 1km and I did it
Comment: A kilometer???  well if that solves your problem.whoopdeedoo.
Answer: STL doesn't use metric units, if your model is 1BUx1BUx1BU (BU=Blender Unit) it will be 1mm x 1mm x 1mm in size, despite the fact that 1BU is 1m in Blender.
You can fix it in two ways, either by manually scaling your object in the scene and assuming that 1 unit is 1 mm (after exporting to STL) or you can set the scale in the Blender's STL exporter to 1000.
I prefer the first method, as you don't have to fiddle with the scaling settings and you just model in mm.
Also, always make sure you 'apply the scale' of your object before exporting via Ctrl+A > Scale.
Answer: You can change the units in Blender to metric and use mm then scale your model to your needs an will be fiting when exported


what is the point of the maths puzzle?

Question: Instead of a maths puzzle, why can't we have miners collect transactions, then just make them wait 10 minutes before accepting the first block broadcasted?
Answer: Proof of Work (the proof that "maths puzzle" was solved) serves a variety of purposes.  The primary purpose being to determine the "first" miner whose block should rightfully be accepted as the next block in the chain.  If there was no cost to proposing the next block, there would be far too many candidate blocks and the network would split too often.
With Proof of Work, the network can determine which miner has earned the right to mine the next block by having expended the electricity to produce the hash that meets the difficulty level.
Answer: Because, although it would be possible to create a system that worked like this, it would result in a massive amount of orphan blocks and chain splits and, it would not be clear to most nodes which is the longest chain. Think of a blockchain structure like The Ganges river system.

Every ten minutes, 10,000 new blocks would be distributed if there are 10,000 miners. Each of these 10,000 blocks would be at the same blockheight so that it is not possible to determine the longest chain. The longest chain is the block that is next built upon but, after ten more minutes all miners distribut another block building on the block that they prefer. There are now 10,0002 possible blockchains (although less than this will actually be created) and, none of them are yet the longest. This process continues.
Comment: Makes a lot of sense

what is the point of the maths puzzle?


Wireless power within a stainless steel enclosure?

Question: I need to transfer power wirelessly within a small SS tube that is not much larger than the diameters of the Tx and Rx coils. The coils are both inside the tube and are co-axial with it. Coils are 30mm diameter, although I'm also looking at 20mm coils with a max separation of 10mm ideally. Tube is about 40mm. Is this likely to cause a problem?
Comment: You do not make it clear if you are trying to couple power from outside the tube to inside the tube OR if the coupling is between two coils inside the tube. For sure if it is the first case you are likely to have some problems as the metal will shield one coil from the other. For the second case it will really depend upon just how the coils are designed and if you allow them to be on the same magnetic core. This is a problem that you can learn a lot about by experimenting.
Comment: @MichaelKaras I was hoping to avaoid experimenting if someone had already done something similar. Anyway, question is being edited
Comment: Do you have any constrains on the distance between TX and RX coils? Can you vary the diameter of coils? Guess you can not change the diameter of SS tube, right?
Comment: @Master I'm looking at 20mm coils with a max separation of 10mm ideally
Comment: The smaller is the separation - the easier is the task. The optimal diameter of coils is between 20 mm and 25 mm with 40 mm inner diameter of stainless tube.
Comment: You have a trade-off between losses in stainless tube and copper: the smaller are the coils, the larger are copper losses. However, the larger are they, the higher are SS losses.
Comment: This is an optimization task, it can be solved by simulators. What is your frequency?
Comment: And can you use ferrite parts inside the SS tybe?
Comment: @Master Probably solved most quickly by experiment. Time is money
Comment: What about ferrite?
Answer: I had a similar problem which was solved empirically by trimming/shaving off parts of the SS that was not needed. The Rx winding was wound around a SS former but between winding and tube I laid ferrite rubber sheets (about 1mm thick). This largely reduced the problem but there were still some losses - you could feel the heat after a few minutes. This was resolved sufficiently by chamfering off extra bits of SS and it worked fine.
The transmit coil surrounded the RX coil so it's a little different to your set-up. What you might find is that an internal ferrite sheet will largely stop the flux causing significant eddy currents in the SS. I used a sheet from Ferroxcube but i don't think they make it any more but Wurth make one that is dead easy to cut and trim to size.
If the coils are more than (say) 5mm away from the SS, things do get easier. On another job it was end-to-end facing PCBs with spiral coils. The diameter was about 50mm and the SS was 5mm away and didn't pose a problem at all. In all cases I used 600 kHz.
Comment: Thanks. I only want to transfer about 500mW so no danger of the tube heating. Just hoping it won't ruin the efficiency.
Comment: You'd be surprised - I only needed to transfer ~200 mW but you can't stop the SS taking more (if you can drive more) and when this happens it can sap the power needed for the real target. This, in turn means you have to pump in much more power. I ended up pumping in about 1 watt to liberate ~200 mW - most of it was heat in the SS and some of it was copper loss in the windings. I assume you will use coupled coils that are resonant tuned.
Comment: @DirkBruere did this answer help?
Comment: Yes, thanks, but the project on hold for the time being - more important stuff to get working
Comment: @DirkBruere is there any reason not to formally accept this answer dirk other than that I may have created stories about my experiences?
Comment: just forgot about it. Project was postponed indefinitely


Does dividend reinvesting influence the price?

Question: A dividend paying asset pays a dividend on a specific date. When brokerages auto-reinvest these proceeds (DRIP), won't that influence the price (assuming that it's a market order)? In other words, wouldn't there consistently be a spike in price the day after a dividend is paid out?
Comment: @BobBaerker Right that's what I'm asking - a drop on ex-div followed by a spike on payable.
Comment: You may know this, but remember that the price _drops_ by the amount of the dividend. So are you theorizing a "spike" _after_ the drop?
Comment: @D Stanley  - He's referring to the payable date (when dividends are reinvested) rather than the ex-div date.
Answer:
When brokerages auto-reinvest these proceeds (DRIP), won't that influence the price
  (assuming that it's a market order)?

Yes and no.
Yes, in theory. If the mass of buy orders is big enough (i.e. enough dividends are reinvested like that).
No, because they may have stocked up awaiting the gain.
Answer: For reinvestment of dividends, brokers combine the expected cash distributions to be received from dividends and they then purchase  shares at the open on the payable date. Some studies indicate that this creates buying pressure that results in an increased share price  as the dividend payout date approaches. Some authors suggest that share price then drops after the payable date.
OTOH, traditional Dividend Reinvestment Plans (DRIP) with the company, the  dividends purchase the shares directly from the company's treasury stock.  When sold, such shares are sold back to the company. So these DRIPs have no effect on share price.
Comment: I didn't know that about DRIP... what effect might this have on dilution (and later, reversing it)?
Comment: When outstanding stock bought back from shareholders by the company (investor sells DRIP shares), the number of shares on the open market decreases, reducing shareholder equity. Such shares  do not receive  dividends and are not part of the  calculation of earnings per share.  For lack of a better word, it's anti-dilutive.
Comment: DRIP shares don't receive dividends?  I wouldn't expect them to receive dividends as treasury shares (the company would be paying itself) but wouldn't they pay dividends to shareholders that have bought them through DRIP?  It just seems like some funny accounting going on here... (guess I'll have to read up on this some more)


I would play football

Question: I always confuse for using "would". Everywhere write the same things(using with if), but all of them are not clear for me. Logically, would always should be the same meaning. for example if I use "I would play football" this means that "I'm sorry, Actually I play football, but I will not available at that time" or "would be good" means that " it will be good but I will not be ready at that time". is it right? thanks in advance.
Comment: ELL is the English Language Learners site. Good place to get familiar with.
Answer: 'Would' is the past tense of 'will'.  It is also a conditional, when used in conjunction with 'if'.  This may be the part that's confusing you.
Hence,

I would have played football.

Could be used as a response to the question 'would anyone have played football yesterday?' (more likely to be 'I would', which is ellipsis) and implies certainty - the past tense of will.

I would have played football if everyone else did.

In this example, the 'if' causes it to be conditional, meaning 'If everyone else had played, I would (certainly) have played football.  Otherwise I wouldn't.'
The Collins Learner Dictionary has many examples which may help you.
Comment: Yes and does it make things easier or more difficult to introduce 'certainly' or 'otherwise', let alone past tenses to a question about present and future?

Erdal76t 'I would play football' could mean that and don't you think the example is so complicated, it hides what's actually going on?

It should be easier to follow from 'I would play football but (anything that gets in the way…)'

'(Whatever) would be good…' is the same. '(Whatever) would be good but (anything that gets in the way…)'
Answer:
Logically, would always should be the same meaning.

This perspective is going to get you into a lot of trouble when it comes to English modals. "Would" in particular has a lot of different uses, and expecting it to always mean the same thing is going to lead you to misunderstanding it when it's used.
One use of "would" is similar to that you describe -- it's used to describe a conditional. "I would play football, but [some reason I can't]," etc. That sort of thing. You seem to have a handle on this use.
An extension of this use is using "would" for politeness. For example, if I say "I would like a muffin," this doesn't necessarily mean that there's something preventing me from liking a muffin or having a muffin. It's a more indirect (and thus more polite) way of saying "I want a muffin." It also implies that you expect the person you're addressing to do something about it -- for this reason, it's often used with servers at restaurants and the like. For similar reasons, "would" is often used in polite requests (e.g., "Would you please grab me a muffin?").
Another separate use of "would" is its use for the habitual past. For example, take the sentence "When I was a kid, I would play football every day after school." In this sentence, "would" is neither being used for a conditional or for politeness, but instead means something closer to "used to" and is used to mark something that occurred habitually in the past. Luckily, this usage of "would" is frequently accompanied by words and phrases indicating the time being described (like "when I was a kid" and "everyday" in my earlier example), so hopefully those will help you identify when "would" is being used in this way.
These are the main uses of "would" that I can remember offhand, but there may be more. "Would" is very versatile with its various meanings, but because of that it can be difficult to learn. Good luck with it!

I would play football


How to create single page ASP.Net application with Provider hosted apps

Question: I need guidance on single page ASP.Net application with Provider hosted apps.
I heard most of the people are doing this through MVC 5, Knockout.js  along with PFA. In real time situation what is the industry trend i.e. how people are creating single page application with Provider hosted apps? is MVC is must? is Knockout.js is must?
Thank you in advance.
Answer: If you want to create a single page application (SPA) app usually you have to choose a client side framework. Here is very short review of common SPA frameworks:
JavaScript SPA-Frameworks
Technically Knockoutjs is not a SPA framework, but MVVM two way data binding technique for your UI, Durandal JS is a SPA frame work that is built on Knockout JS base. If you look at google trends Angular JS looks like as most popular among all these. But it is quite complicated.
From SharePoint perspective your SPA app can be Provider Hosted App or event SharePoint Hosted app, because SPA behavior is made on client side. Here is a sample how to make SharePoint hosted app using Angular JS.
When you think about back-end side of your SPA app, ASP.NET MVC also is NOT a must to, but is quite common. Usually SPA frameworks "talk" with server using REST web services. It is easiest to make them using ASP.NET Web API/MVC technology. Here are samples how to make ASP.NET MVC app for SharePoint:

ASP.NET MVC based Apps for SharePoint 2013
Walkthrough: Creating a O365 SharePoint 2013 App with ASP.NET MVC 5

And finally here is another sample how to create SPA web application using ASP.NET MVC and Angular JS.
So, SPA app on SharePoint is quite a big MIX of various technologies :)


Blend Saves 2 Files?

Question:
Just wondering what is the purpose of the other file that is created with blender. It takes up the same disk space. Is it ok to delete it? Is it like an autosave file similar to ones Nuke produces?
Answer: You don't show the extensions for the file, that would help explain.
Depending on the settings you are using to save, blender renames the previously saved file as .blend1 and the new saved file as .blend.
So the other file is kind of a backup, it is the last saved version of your project.
Answer: The .blend file is the file that you last saved. The .blend1 file is the saving you did before the last saving. You can have plenty of these files so you can save your previous savings.
Basically when you save you project the .blend turns into .blend1 and .blend1 turns into .blend2 and so on.
You can use them by renaming the extension to .blend

Blend Saves 2 Files?


SDL for 3D game programming?

Question: I have been studying SDL for a few weeks and I have succeeded in making a 2D Ping-Pong game, but  I want to get started in 3D development, and I'd like to know if SDL is capable (and suitable) for 3D game development, or I must use OpenGL?
Comment: Have you done some research on the subject? You can use SDL and OpenGL together.
Comment: @SamHocevar In some forums i have seen that some people use SDL with OpenGL, but do you know any tutorials on that topic?
Comment: We can't recommend tutorial in this SE
Comment: Most relevant questions in this site are closed with "off-topic", what are moderators thinking about???
Answer: SDL isn't a 3D graphics engine. As is stated in its homepage:

Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.

That "3D hardware via OpenGL" basically means that SDL contains some helper functions to ease cross-platform usage of OpenGL, but you'd still need to learn and code raw OpenGL (which isn't a bad choice if you want to better understand 3D graphics). If you'd like a higher level approach, you should look at some complete 3D engines, such as Ogre or Irrlicht. They use OpenGL underneath (or Direct3D on Windows), but provide easier API with lots of stuff like model loading and scene graph.
Answer: SDL by itself is not meant for 3D (you can make your own software renderer but you wouldn't get very far with it) however SDL does come with an OpenGL wrapper/addon so you can use SDL's windowing, audio, and input system while using OpenGL. Refer to the link in the other post (SDL + OpenGL) for more info and use nehe.gamedev.net for OpenGL tutorials.
Comment: Team Fortress 2 (on OSX+Linux, Windows is DX) was made with SDL using their OpenGL wrapper (described above)
Comment: TeamFortress 2 was made with SDL
Answer: If you can draw triangles, then you can technically create a 3d engine with it.
However, this involves the same amount of math as you need to do OpenGL if not more.
First, you need to define positions in 3 dimensional space. This is done by using 3d vectors. To render a triangle, you need 3 vectors, one for each vertex of the triangle.
Now, to project a point from 3d to 2d, you just need to divide the x and y positions of the point with the z position. If you done this, then you have a 3d triangle. Congrats.
However, if you render multiple triangles, you notice triangles at the back can overlap the triangles in the front. To solve this you need to sort each triangles based on the distance of it from the camera.
To rotate a model, you need to multiply each vertex of it with a rotation matrix.

SDL for 3D game programming?


How to add/update a file to an existing tar.gz archive?

Question: Is there a way to add/update a file in a tar.gz archive? Basically, I have an archive which contains a file at /data/data/com.myapp.backup/./files/settings.txt and I'd like to pull that file from the archive (already done) and push it back into the archive once the edit has been done. How can I accomplish this? Is it problematic because of the . in the path?
Comment: +1. This would make working on OS X so easy. Currently, I have to hand clean a directory of all the hidden files like `.DS_Store` and then re-tar the directory.
Answer: To pull your file from your archive, you can use tar xzf archive.tar.gz my/path/to/file.txt.  Note that the directories in the file's path will be created as well.  Use tar t (i.e. tar tzf archive.tar.gz) to list the files in the archive.
tar does not support "in-place" updating of files.  However, you can add files to the end of an archive, even if they have the same path as a file already in the archive.  In that case, both copies of the file will be in the archive, and the file added later will override the earlier one.  The command to use for this is tar r (or tar u to only add files that are newer than the archive) is the command to use.  The . in the path should not be a problem.
There is a catch, though: you can't add to a compressed archive.  So you would have to do:
gunzip archive.tar.gz
tar rf archive.tar data/data/com.myapp.backup/./files/settings.txt
gzip archive.tar

Which is probably not what you want to hear, since it means rewriting the entire archive twice over.  If it's not a very large archive, it might be better to untar the whole thing and then re-tar it after editing.  Alternately, you could use an uncompressed archive.
Comment: You could also do this the Unix way: `gzip -dc archive.tar.gz | tar -r data/data/com.myapp.backup/./files/settings.txt | gzip >archive_new.tar.gz`
Comment: tar: Options `-Aru' are incompatible with `-f -'
Comment: IIRC you can simply concatenate two gzip'ed files. The result is a larger gzip'ed file that contains both uncompressed files concatenated.
Comment: This answer is only correct insofar as it deals with the standard `tar` program. Tar as a file format is actually very accessible. You could easily write a script to update the contents yourself, but [there are other tools that already do this](http://unix.stackexchange.com/questions/13093/add-update-a-file-to-an-existing-tar-gz-archive/13097#13097).
Comment: Once the file has been unzipped, isn't it possible to use the --update flag?
Comment: @FUZxxl +1 for mentionning gzip concatenation
Comment: '''tar doesn't support "in place" updating.`` That is the piece of (negative) information missing from the tar man pages. that is essential to understanding tar. The man page is bad that it convey the essence of the tape archive tool insufficiently to surmise that. Is there reluctance to admit that, in view of the fact that zip has that facility?
Answer: The tar file format is just a series of files concatenated together with a few headers. It's not a very complicated job to rip it apart, put your contents in, and put it back together. That being said, Jander described how tar as a program does not have the utility functions to do this and there are additional complications with compression, which has to both before and after making a change.
There are, however, tools for the job! There are at least two system out there which will allow you to to do a loopback mount of a compressed tar archive onto a folder, then make your changes in the file system. When you are done, unmount the folder and your compressed archive is ready to roll.
The one first option would be the archivemount project for FUSE. Here is a tutorial on that. Your system probably already has FUSE and if it doesn't your distribution should have an option for it.
The other option is tarfs. It's simpler to use, but I've heard it has some trouble with corrupting bzip2 archives so you might test that pretty thoroughly  first.
Comment: I use [AVFS](http://avf.sourceforge.net/), which is packaged in Ubuntu and Debian. Do you know how archivemount and tarfs compare to AVFS?
Comment: Honestly no I don't, although I'm curious to look into AVFS now that you mention the alternative. I've used both archivemount and tarfs but it was for a long since decommissioned project and don't know their current state. I kind of decided from that experience that the idea was wrong conceptually even if the implementation worked perfectly.
Comment: I took a look at how archivemount works.  It does not modify the existing .tar.gz file, but when you unmount, it renames the original and creates a brand new tar file in its place.  If you're looking for a good user experience, it's great, but if you're looking to avoid rewriting the entire archive for efficiency reasons, it won't help you.
Comment: @Jander That's for pointing that out. I'm pretty sure it applies to all the compressed archive mounting options though. The problem is the individual parts of the file are not compressed, the overall file internal headers and  all is compressed and in order for other thing to extracti is as expected gzip has to be run over the _whole_ data set. There isn't a way to inject something in the middle of this without extracting it and rerunning the compression and rewriting the whole data file. Hence my previous comment about it being the wrong solution **conceptually**.  Archives are archives.
Answer: Tar was originally meant to be used for tapes, so "replacing" files is not really in the design.
However, you can use --delete to delete the file from the original tar and then -u to update the tar and re-add the file. It may take a bit, as tar needs to reorganize the archive internally.
Comment: I edited my answer a bit. I don't think the other answer mentions --delete
Comment: Welcome to StackExchange!  Your answer only contains a suggestion already made in [another answer](https://unix.stackexchange.com/a/13094/90751).  Please read the other answers to a question before answering, to avoid creating duplicates.
Answer: For tar.gz files, I'm afraid that this is not possible, according to my tests:
$ tar rvf backup.tar.gz db_bkp_today.sql
tar: Cannot update compressed archives
tar: Error is not recoverable: exiting now

But being just Tape Archive (tar), I experimented positive results:
$ gzip -d backup.tar.gz
$ tar uvf backup.tar db_bkp_today.sql
database_bkp_today.sql
$ tar tvf backup.tar | grep sql
-rw-r--r-- ivanleoncz/ivanleoncz 14779319 2020-05-11 13:40 db_bkp_today.sql

Taken from man tar:
>  -r, --append
    Append files to the end of an archive.
    Arguments have the same meaning as for -c (--create).
>  -u, --update
    Append files which are newer than the corresponding copy in the archive.
    Arguments have the same meaning as  with -c and -r options.

Using -u, has the same behavior of using -r, so the file was added to the TAR.
The practical way that I see for adding/updating a compressed Tape Archive (tar.gz), would ironically be:

uncompress the tar.gz : gzip -d backup.tar.gz
add/update a file on the tar file : tar uvf backup.tar db_bkp_today.sql
compress the tar (with maximum compression if you want) : gzip -9 backup.tar
Comment: @MohammadFaisal `-r` will add the file even if the same exists in the archive. `-u` will add the file only when it is not in archive yet or the file in archive is older. Both append the file to the end of the archive.
Comment: what's point of `-r` and `-u` options then if you have to unarchive and then create the archive again? From the `man tar` which you have added I understand that `-u` can be used if you want to replace an existing file present in the archive with the new version and so for the `-r` "Append files to the **end of an archive**". So for adding a new file can't `-r` be used? I could not understand what **end of an archive** meant there.
Answer: What you're looking for is zip. This is where zip shines above tar. The compression is really only slightly better with gzip or bzip2 when you're compressing a large directory structure with all sorts of files in it, i.e. making a running backup of a web server.
Testing on a typical WP install, tar.gz only saved about 4MB over zip in what amounted to about a 660MB archive file (663MB/zip) (559MB/gzip), bzip2 saved another 4MB (555MB), but is considerably slower and still lacks the ability to make incremental backups by simply running the same command to an existing archive.
zip --symlinks -r -FS /path_to_backup_dir/backup_file.zip /path_to_webroot/ -x /exclusions_as_pattern/


401 response for CORS request in IIS with Windows Auth enabled

Question: I'm trying to enable CORS support in my WebAPI project, and if I enable Anonymous Authentication then everything works fine, but with Windows Auth + disabled anonymous authentication, the OPTIONS request sent always returns a 401 unauthorized response. The site requesting it is on the DOMAIN so should be able to make the call, is there any way to get around the issue without disabling Windows Authentication?
Comment: Did you check if Integrated Windows Authentication is actually supported on your machine? [http://technet.microsoft.com/en-us/library/cc754628%28v=WS.10%29.aspx](http://technet.microsoft.com/en-us/library/cc754628%28v=WS.10%29.aspx)
Comment: Yes, running on W7 Ultimate & also on Server 2008. I'll paste in a reply I got from MS, it seems possible, just not easy by any means, we are going to switch to a more oauth style instead and separate our API to allow anonymous auth, but issue tokens for authorization.
Answer: You can allow only OPTIONS verb for anonymous users.
<system.web>
  <authentication mode="Windows" />
    <authorization>
      <allow verbs="OPTIONS" users="*"/>
      <deny users="?" />
  </authorization>
</system.web>

According W3C specifications, browser excludes user credentials from CORS preflight: https://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#preflight-request
Comment: This does NOT WORK!
Comment: Apparently yes. "Anonymous authentication gives users access to the public areas of your Web or FTP site without prompting them for a user name or password." http://bit.ly/1wjLdO9
Comment: Seems like a neat solution. Now, how do I set up this configuration for asp.net core?
Comment: Does this require anonymous auth module enabled in IIS?
Comment: This absolutely does work, but there is a gotcha: the order is significant. You must specify the "allow" tag first and the "deny" tag second. Do it the other way around and you'll be frustrated.
Comment: @AhmadWabbi Works Here (TM)
Comment: @Stuart  Thank You!! I would never have thought I needed to change the order, just saved my Sanity....  That fixed it.
Answer: Several years later, but through the answer from @dariusriggins and @lex-li I have managed to add the following code to my Global.asax:
    public void Application_BeginRequest(object sender, EventArgs e)
    {
        string httpOrigin = Request.Params["HTTP_ORIGIN"];
        if (httpOrigin == null) httpOrigin = "*";
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", httpOrigin);
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, X-Token");
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Credentials", "true");

        if (Request.HttpMethod == "OPTIONS")
        {
            HttpContext.Current.Response.StatusCode = 200;
            var httpApplication = sender as HttpApplication;
            httpApplication.CompleteRequest();
        }
    }

the httpOrigin is actually looked up in a list of allowed hosts but that just complicated things. This means that all other requests are validated but options just returns.
Thanks for this question, I would have been lost without it!
Comment: I've tried many different ways to enable CORS with WebAPI running on IIS for an Angular 2 client, including adding it to web.config, data annotations on my controller actions, and calling 'EnableCors' in WebApiConfig.Register .    This solution is the **only one** which actually worked with Windows Authentication (NTLM), alongside making sure the Angular 2 http client was sending `withCredentials` in the HTTP header.   Thank you!
Comment: This is brilliant!! Works like a charm! You don't even have to put it in Application_BeginRequest. You can even put it in your page load if it's just a single page you want to allow.
Comment: Still awesome in 2020!  After being utterly frustrated trying everything else to get Windows Authentication to work.  This is the one thing that actually worked.  Thank you!!
Comment: The things working for me using Global.asax till March 2021 but now it has stopped working in Chrome browser. GET Request working with CORS but POST are not working and giving 401 UnAuthorization error.  Is there any other header or configuration we need to make it work. I am also using the same Headers in my WCF service which is Windows Authenticated and is being called from a page hosted in different site . Any help will be greateful
Answer: From MS:
If you disable anonymous authentication, it's by design that IIS would return a 401 to any request.  If they have enabled Windows auth, the 401 response in that case would have a WWW-Authenticate header to allow the client to start an authentication handshake.  The question then becomes whether the client that the customer is using can do Windows authentication or not.
Finally, it seems like there might be an underlying question about whether it's possible or not to configure a URL such that anonymous access is allowed for one verb (OPTIONS, in this case), but require Windows authentication for other verbs.  IIS does not support this through simple configuration.  It might be possible to get this behavior by enabling both Anonymous and Windows authentication, setting ACLs on the content that deny access to the anonymous user, and then configuring the handler mapping for the URL in question so that it does not verify the existence of the file associated with the URL.  But it would take some playing with it to confirm this.
Comment: Just noticed that many guys have experienced the 401 errors when their Web API is protected by Windows authentication or such. CORS preflight requests do not contain credentials, so IIS will respond with 401.2 even before ASP.NET touches them. A dirty workaround is to write a HTTP module and hook to IIS pipeline, which registers on `HttpApplication.BeginRequest` event where this module returns the expected 200 response for preflight requests. This workaround only applies to IIS 7+ integrated mode. Sadly Microsoft support might not be aware of this tip.
Comment: Just made a blog post, https://blog.lextudio.com/2014/11/how-to-handle-cors-preflight-requests-in-asp-net-mvcweb-api-with-windows-authentication/ with more info on IIS 6 and classic mode users.
Comment: @ThiagoSilva, I just updated the post to point out which article you should read. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests contains even sample requests/responses so that you can easily follow.
Comment: @LexLi read your blog, but unfortunately, you don't detail the exact implementation of the BeginRequest event, so I'm not clear on what all to include in the 200 response (e.g. headers, etc.).  I understand how to build HttpModules, just would like clarification on what to respond to the preflight request.
Comment: @lex-li: I just posted an answer which uses just the global.asax which I wouldn't have gotten close to without your blog article. Thanks!
Comment: Any example for asp.net core webapi pls?
Comment: @beewest see my answer to your other post http://stackoverflow.com/questions/39609811/angular2-asp-net-core-service-throws-no-access-control-allow-origin-when-wind/41233517#41233517
Answer: The easiest way to fix this is to create a rewrite rule with the condition request_method = ^OPTIONS$. Then set the action to be a custom response, set that to 200 OK. Then all options requests will respond with 200 instead of 401. This will fix the CORS issue.
Of course you still need to make sure you have the correct cross origin request headers.
This will stop options requests (which dont have any credentials) responding with 401 when integrated auth is enabled.
Comment: Do you see any potential security issues with this?
Answer: The accepted answer is correct however I was troubleshooting a rest api with a "node with iisnode and npm cors module" setup for a while and was not comfortable with just enabling anonymous authentication for all users. Since its a node application the system.web tag does not do much. I ended up with the following addition to the web.config:
<system.webServer>
<security>
  <requestFiltering>
    <hiddenSegments>
      <add segment="node_modules" />
    </hiddenSegments>
  </requestFiltering>
  <authorization>
    <add accessType="Allow" verbs="OPTIONS" users="?" />
    <add accessType="Deny" verbs="GET, PUT, POST, DELETE" users="?" />
  </authorization>
</security>
</system.webServer>

Comment: "Worked For Me" in IIS + Basic Auth, which has having the same issue :}
Comment: This solution worked for us in IIS 10 Win 2016. Make sure that the URL Authorization role/feature is installed as a part of IIS Security! Otherwise this rule will not be implemented.
Answer: Extending the answer provided by @dariusriggins. Check this post: Microsoft | Developer: Putting it all together – CORS tutorial
For IIS Configurations:
Authorization rule

Authorization stage (or Authorization event), we need to make sure we only allow the anonymous requests from CORS preflight and require all other incoming requests have authentication credentials supplied. We can achieve this through Authorization Rules. A default authorization rule granting all users access to the site is already in place and supplied by default by IIS. We will start by modifying this rule to only allow anonymous users, if they send requests that are using the OPTIONS http verb. Below is the target configuration in IIS for this authorization rule:
Edit Authorization rule
Answer: Related Question: IIS hijacks CORS Preflight OPTIONS request
Merging info from answers found in multiple places. If you need to enable CORS on a ASP.net page method with Windows Authentication on the intranet, this is what seems to work. Without the changes to web.config, this doesn't work.
You need to add this to Global.asax
    protected void Application_BeginRequest(object sender, EventArgs e)
    {
        string httpOrigin = HttpContext.Current.Request.Params["HTTP_ORIGIN"] ?? HttpContext.Current.Request.Params["ORIGIN"] ?? "*";
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", httpOrigin);
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, X-Token");
        HttpContext.Current.Response.AddHeader("Access-Control-Allow-Credentials", "true");

        if (HttpContext.Current.Request.HttpMethod == "OPTIONS")
        {
            HttpContext.Current.Response.StatusCode = 200;
            var httpApplication = sender as HttpApplication;
            httpApplication.CompleteRequest();
        }
    }

And this to web.config
 <system.webServer>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*."
           verb="*" type="System.Web.Handlers.TransferRequestHandler"
           preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  </system.webServer>

Answer: I've run into same issue today due to bug in IE 10 and 11, I'm using ServiceStack instead of WebApi, but the approach can work for you as well.

Enabled Windows Integrated and Anonymous Authentication on IIS Web Site.
Have a series of filters on the ServiceStack Pipeline,

For handling Cors and OPTIONS request, On Options request, I add necessary headers and end the request,
Filter for checking includng HttpRequest is Authenticated?,
etc filter,

After passing through all the filters, it executes the service.
CorsFeature.cs
AuthenticateFilter
In my AppHost,
appHost.Plugins.Add(new CorsFeature());

appHost.RequestFilters.Add(AuthenticateFilter.Authenticate);

I have modified the CorsFeature to handle OptionsRequest's in addition to adding headers, Authenticate Filter to check for requests authenticated!
Comment: I'm skip checking for Is user authenticated for OPTIONS requests. I'll add code sample.
Comment: Hi, can you give a little bit more detail re what you did? I am facing similar problems and am also using ServiceStack that is deployed via SharePoint 2013
Answer: What worked for me (when working with AngularJS or JQuery) is to add withCredentials:true to each request on client:
$http.get("http://localhost:88/api/tests", {withCredentials :true})

And enabling CORS on server, this was done with Microsoft.Owin.Cors from nuget and adding it in Startup like below:
public void Configuration(IAppBuilder app)
    {
        HttpConfiguration config = new HttpConfiguration();

        ConfigureOAuth(app);

        WebApiConfig.Register(config);
        app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
        app.UseWebApi(config);

    }

References:

CORS on server (see step 11): http://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/
CORS on client: http://brockallen.com/2012/12/15/cors-and-windows-authentication/
Answer: I'm using Web API and OWIN and I tried every suggested solution but the only thing that worked was the following
//use it in your startup class
app.Use((context, next) =>
{
    if (context.Request.Headers.Any(k => k.Key.Contains("Origin")) && context.Request.Method == "OPTIONS")
    {
        context.Response.StatusCode = 200;
        context.Response.Headers.Add("Access-Control-Allow-Origin", new string[1] { "ALLOWED_ORIGIN" });
        context.Response.Headers.Add("Access-Control-Allow-Headers", new string[4] { "Origin", "X-Requested-With", "Content-Type", "Accept" });
        context.Response.Headers.Add("Access-Control-Allow-Methods", new string[5] { "GET", "POST", "PUT", "DELETE", "OPTIONS" });
        context.Response.Headers.Add("Access-Control-Allow-Credentials", new string[1] { "true" });

        return context.Response.WriteAsync("");
    }

    return next.Invoke();
});

//this is important! Without it, it didn't work (probably because the middleware was too late)
app.UseStageMarker(PipelineStage.Authenticate);

you need to insert this code somewhere in one of your OWIN startup classes.
It's important to call app.UseStageMarker(PipelineStage.Authenticate) because otherwise the preflight check failed.
Further infos for UseStageMarker -> https://learn.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/owin-middleware-in-the-iis-integrated-pipeline
It's also important that you need to explicitly define the allowed headers. It will fail if you use * as a placeholder.
Maybe it helps somebody.
Answer: I understand this is an old question with several possible solutions (as well as more questions), but in case anyone else comes across this, IIS CORS 1.0 is available as of Nov '17:
https://blogs.iis.net/iisteam/introducing-iis-cors-1-0
https://learn.microsoft.com/en-us/iis/extensions/cors-module/cors-module-configuration-reference
You can download it through IIS Windows Platform Installer (WPI).  This should resolve many of your CORS authentication issues.  Enjoy!
Comment: great! I used following CORS-config in my web.config: `

`
Answer: This IIS extension (IIS CORS Module) helped me to solve the 401-Unauthorized preflight request to an IIS-hosted app with Windows Authentication enabled. After installing this module I did IISRESET and in the Web.config file of my web-application I added the following:
<configuration>
    <configSections>

    </configSections>
    <system.webServer>
        <cors enabled="true">
            <add origin="http://localhost:3000" allowCredentials="true" maxAge="120">
                <allowHeaders allowAllRequestedHeaders="true"/>

                <allowMethods>
                    <add method="HEAD"/>
                    <add method="GET"/>
                    <add method="POST"/>
                    <add method="PUT"/>
                    <add method="DELETE"/>
                    <add method="OPTIONS"/>
                </allowMethods>
            </add>
        </cors>
    </system.webServer>
</configuration>

Here you can find more information on how to configure the IIS CORS Module:
Getting started with the IIS CORS Module.
Answer:
instal iis cors module on your iis.

in case of WebApi add :

public static void Register(HttpConfiguration config)
{
    var cors = new EnableCorsAttribute("*", "*", "*");
    cors.SupportsCredentials = true;
    config.EnableCors(cors);
}

add this lines to your web.config:

  <configuration>
    <system.webServer>
        <cors enabled="true" failUnlistedOrigins="true">
            <add origin="*">
               <allowHeaders allowAllRequestedHeaders="true">
                    <add header="Access-Control-Allow-Origin" />
                    <add header="Access-Control-Allow-Headers" />
                    <add header="Access-Control-Allow-Methods" />
                </allowHeaders>
            </add>
        </cors>
    </system.webServer>
  </configuration>

more info. in this article.

add xhrFields: {withCredentials: true} to your ajax call.
Answer: Enabling SupportCredentials on EnableCorsAttribute in WebApiConfig.cs did the trick for me:
public static void Register(HttpConfiguration config)
{
    //enable cors request just from localhost:15136
    var cors = new EnableCorsAttribute("http://localhost:15136", "*", "*");
    cors.SupportsCredentials = true;
    config.EnableCors(cors);

    //other stuff
}

https://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
Make sure you send credentials when calling from javascript ({withCredentials :true})
Comment: I'm trying the same but without credentials. No luck even with anonymous auth on
Comment: This doesn't work in Chrome. I'm using withCredentials=true and the preflight OPTIONS request still doesn't send the credentials.


Re-asking Closed Questions

Question: I have seen some good questions on this site though some of them have been worded poorly.  These questions are closed and, even though they are edited appropriately, they are never reopened.  It seems a shame that certain questions are closed and not re-asked again just because of the way that they are worded.
One idea that came to mind was to go through all of the closed questions, reword them, and re-ask them.  However, it seems that this would require me looking through ALL of the asked questions.
Are there better ways for me to search for and re-ask closed questions?
Answer: No, do not re-ask closed questions. If a question is fit for the site, then edit it to be so. It will then enter the queue to be reviewed for re-opening. It is then up to the community to decide whether it should be reopened or not.
Re-asked questions should and will be closed as duplicates.
Comment: It may not always be possible to closed as a duplicate if the first question doesn't have answers. It's a rule which rarely makes sense.
Comment: I understand that, but, unfortunately, that only works in an ideal world.  Once a question is closed, the default is to vote no to reopening.
Comment: For example, look at http://economics.stackexchange.com/questions/1/why-isnt-there-an-ideal-value-for-a-given-currency
This question was marked as off-topic (perhaps rightly so).  This was a good economics question, so I edited it to make it more clear and more narrow.  After editing, this question still remained closed (despite no longer being off-topic).
Comment: @Mathematician : I have some sympathy with your view (and am glad you want to try to improve these questions) but I think is right that re-posting is not a good solution. Having lots of duplicates of bad questions floating around is not going to be a good way to improve the site. If there is a question that you feel should be reopened after you have edited it then you can create a question on Meta to discuss the matter and rally support. Editing and improving bad questions is a really valuable activity for the community, but attempting to circumvent the voting mechanism is not.
Comment: @Mathematician What I had in mind was not to post *the* question itself on meta, but rather to create a question on the meta of the form "Should question XX be reopened?" That would give a space to discuss the issue and let people explain why they still think it should be closed. If the problem is that people are inappropriately voting to keep good closed then the solution is to get them to change their voting behaviour rather than to re-post the question.
Comment: @Ubiquitous I am not attempting to circumvent the voting mechanism. I am merely recognizing that people respond to incentives, and, once a question is closed, the incentive is to leave the question closed. By re-posting the question, I want the question to speak for itself, not some arbitrary label.

As for posting the question on Meta and rallying support, what would be the best way to structure that? If we don't want to clutter the real site with "bad" questions, we aren't really solving the problem by just posting them onto Meta first.
Answer: This url from Cross Validated, https://stats.stackexchange.com/help/searching
has a lot of advanced search options, including your case.
In your case, just type closed:yes to the search box on the right part of the SE bar on the top of the screen.

Re-asking Closed Questions


Meaning of "put it down"

Question: What does "put it down" mean in Brandy's song? I tried googling it, but all I got was the song's lyrics.
Comment: Not everyone knows what a "Brandy" is. May you post a true  link to the song lyrics?
Comment: Lyrics interpretation requests are out of scope for this site. They are a form of literary interpretation or criticism, and that is a very subjective area with no clear right or wrong answers.
Comment: FWIW, the Urban Dictionary has an entry for "put it down".  It's slang for: "Doing what needs to be done, at any given moment. To do the right thing at the right time..."  **Example**, "Are you going to try out for American Idol?"  "Yeah, I'm gonna ***put it down*** at that audition!"
Answer: My take on the phrase is as it is defined by the Urban Dictionary. It's more of a challenge, where Brandy thinks it isn't possible to fall in love, and Breezy is asserting that she will.
Answer: Listening to Brandy's song, I could interpret it as "put it down to experience", it seems to be a short version of the idiom, meaning:

"to decide that instead of being upset about something bad that has
  happened or that you have done, you will learn from it."

Okay, so you made a mistake - you just have to put it down to experience and carry on with your life.
There's nothing we can do about it now, we'll just have to experience.
------//--------
However, researching for "put it down" we get to the conclusion it is an urban slang with similar meaning to that of "put it down to experience". See reference here >
1. put it down
In the process of "doing it"
Im gonna put it down fo real
2. put it down
Doing what needs to be done, at any given moment.To do the right thing at the right time... Can also be used before going out and having a good time.
1.We gone hit the club tonight, you tryina roll?
-Yeah man ima Put it down tonight, trust.
2.Hey man I heard your girl was with some other foo...
-I know man ima put it down right now.
Comment: Sorry, Monecchi, I don't think it means "put it down to experience" at all.  How are you extrapolating that from the Urban Dictionary definition?  It means "I'm going to do something", as in, "I'm putting it down, man!"

Meaning of "put it down"


Is it possible to move broadcast and local routes in the local routing table to custom routing table without creating a name space?

Question: I have a host with two interfaces. ens4 is mgmnt, ens3 is another network.
# ip -br a | sort
ens1             DOWN
ens2             DOWN
ens3 UP          172.16.10.1
ens4 UP          192.168.1.100

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.100   0.0.0.0         UG    0      0        0 ens4
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 ens4
172.16.10.1     0.0.0.0         255.255.255.0   U     0      0        0 ens3

I want to put all traffic going to ens3 in its own routing table so no traffic coming to the interface will touch the local routing table.
I tried the following:

created a new table

echo "100   custom" > /etc/iproute2/rt_table

Add a route and rule to match traffic:

# ip route add 172.16.10.0/24 dev ens3 table custom
# ip rule add from 172.16.10.0/24 table custom

# ip route show table custom
172.16.10.0/24 dev ens3 scope link

# ip rule list
0:      from all lookup local
32765:  from 172.16.10.0/24 lookup custom
32766:  from all lookup main
32767:  from all lookup default

However, I noticed that broadcast and local traffic is still in the main table
# ip route show table all | grep 172.16.10
172.16.10.0/24 dev ens3 scope link
broadcast 172.16.10.0 dev ens3 table local proto kernel scope link src 172.16.10.1
local 172.16.10.1 dev ens3 table local proto kernel scope host src 172.16.10.1
broadcast 172.16.10.255 dev ens3 table local proto kernel scope link src 172.16.10.1

Therefore I am not able to route these directly connected routes.
The work around is to put the interface, and routing table into their our name spaces. Is it possible to move broadcasting and local routes to a different routing table instead?
I think the issue is how I am adding the ip address and ip rule statements but not sure.
Anyone know if what I am trying to do is possible?
Answer: Figured it out. I needed to remove the route rule I added and re-add like this with a via route:
#ip route del 172.16.10.0/24 dev ens3 table custom
#ip route add 172.16.10.0/24 dev ens3 table custom via 172.16.10.1

# ip route show table custom
172.16.10.0/24 dev ens3 scope link
172.16.10.0/24 via 172.16.1 dev ens3


how to hide top bar button on /wp-admin/edit.php

Question: On the page /wp-admin/edit.php there is some buttons on the top bar "website name" "add" and "show post" i want to hide these buttons completely. How would i go about doing that?
Comment: Those do not look like standard WordPress controls. Do you have a page builder of some kind installed?
Answer: So a straight forward way to do this is to use CSS if you want to pick out a few items to not display on the admin. These items you've provided look like the standard menu items with a different style attached, though I can't be sure. If not, you'll need to provide more clearer info
For example, the CSS to use to hide the 'name', 'add', and 'show post' links, is:
#wp-admin-bar-site-name,
#wp-admin-bar-view,
#wp-admin-bar-new-content {
    display: none;
}

There would probably more involved ways to achieve with code snippets, but you can try this for now.
If you don't have a way currently for easily customizing your WP Admin CSS styles, you can simply copy-paste this code below and put it straight into your theme's functions.php file.
        add_action( 'admin_print_styles', function () {
            echo '';
        } );

Each of the lines that begins with wp-admin-bar- represents the ID of an HTML element on the page. To hide other elements you need their IDs. And to get their IDs, you can use your browser's inspect functionality, find the ID, and create a new line in the code for your extra ID.
I've attached a little screenshot that makes this obvious how to do it.


What video output formats are supported on the Nintendo Gamecube?

Question: I have a composite output cable for my Gamecube, but it would be nice if it supported a higher quality output, such as S-Video or Component.  Does the Gamecube have output support for these outputs?
Answer: Some Gamecubes (DOL-001) support Component out with the proper (discontinued) cable.
http://www.nintendo.com/consumer/systems/nintendogamecube/component.jsp
Most will support the (also discontinued) S-Video Cable
http://www.nintendo.com/consumer/systems/nintendogamecube/hook_svideo.jsp
And all should support Coax and Composite.
Answer: Note that most US (NTSC) Gamecube games support up to 480p via component cable (I use an Australian cube with NTSC games via a freeloader disc).
As McKay says, depending which model of gamecube you have, there may be a separate port on the back for the proprietary component cable (some later models were made without one, and I think in Japan there was a different port altogether). If you have the port, you can get one of these cables from eBay (US$50-100). There may even be a chance of still getting one from Nintendo direct in some countries (unlikely, but more like $35, so might be worth the call - I bought mine long after the Gamecube was no longer being sold).
If you don't want to spend the money though (or don't have the special port), the next best thing is a cheap third party S-Video cable (that fits the existing AV port, try eBay - less than $10 shipped).
(I actually use an old (but very high-end) 21 inch CRT computer monitor (set to RGB colour mode) through the component cable and a digital signal transcoder box. The picture quality is fantastic.)
Comment: Just FYI, the current eBay price for original Nintendo GameCube component cables is now running $150 - $200.
Comment: wow, those things sell for $50+ on ebay now? i need to sell mine then... i use the wii if i want to play GC games on the flatscreen...
Comment: also it should be noted that the 480p used by GC is only 4:3. a few games support 16:9 (eternal darkness does, i know), but they aren't actually outputting more pixels--they're just squishing 16:9 into a 4:3 output which gets stretched back to 16:9 by your tv
Answer: I think the Wii uses the same video port, and so you might be able to use the Wii Component cable in a gamecube.
Comment: wrong, the wii and gamecube cables are completely incompatible!


Would the blood wards prevent Dobby harming Harry?

Question: I'm unsure if the mechanics of the blood wards are ever explained, but the idea that Dobby was able to visit Harry disturbs me greatly. Is there anything in any official material that establishes that Harry would've been safe from attack via House Elf? I find it rather hilarious to think that all that Voldemort had to do to win the war was get a Malfoy elf to strap on a suicide vest.
Comment: Does this answer your question? [Could someone explain to me the blood wards of 4 Privet Drive?](https://scifi.stackexchange.com/questions/33965/could-someone-explain-to-me-the-blood-wards-of-4-privet-drive). The answer addresses "_...magical creatures (Dobby, various owls)_"
Comment: Harry's been beaten up by Vernon, Dudley and Petunia more times than he can count throughout his childhood. If they can harm him, then perhaps others can too? I would think that Lily's sacrifice only protects Harry from Voldemort/Evil wizards.
Comment: @Righter In book 7, the Death Eaters are waiting for the protection to expire, no? But the Order of the Phoenix was able to stop by. . . Maybe the Dark Mark flags the baddies?
Comment: The blood wards protect Harry only from Voldemort—I'm pretty sure this was explained in the books, but I can't remember where right now
Comment: Either this . . . or Voldemort never realized House Elves could be so dangerous.
Comment: Come to think of it, neither did I . . .
Comment: The out-of-universe explanation is that HP continuity errors are fairly common. So absent WOJKR, any speculation is just that.
Answer: Harry was apparently only protected from Voldemort, and possibly people acting under Voldemort's orders.  It's not clear if the Death Eaters couldn't get at him because they worked for Voldemort and were covered by the blood ward, or because Voldemort himself forbade it, wanting to kill Harry himself.  Also, the Order was closely guarding Harry after Voldemort's return, and presumably could have prevented an attack or kidnapping by any Death Eaters apart from Voldemort himself (unless Mudungus was on duty...).
So it's quite possible Harry would be shielded by the blood ward from a house elf attack like you suggest.  But even if not:

Voldemort wants to kill Harry personally, and would never risk a scenario where people could claim a house elf accomplished something he could not.

Voldemort was clueless about the powers of House Elves, because he considered them vermin, inferior life forms, utterly beneath his notice. This was part of his downfall, as his use of Kreacher as a test subject for his all-important horcrux defense created a huge vulnerability in it and led to it being stolen. As Hermione tells Harry, Voldemort knew nothing of the ways of House Elves and would never consider that they might have power which he lacks (in this case, ability to defeat the anti-disapparation field he created in his cave).

Also, killing Harry is not the same as "winning the war."  Although Harry's death would have undoubtedly demoralized the wizarding population, it was basically a personal obsession Voldemort had than a necessary goal.  There's a car to be made that if he had dismissed Harry as irrelevant he would have been much more successful.  The real war was lost when all the law abiding wizards and witches finally pulled their heads out of their rear ends and fought back against Voldemort and his followers in the Battle of Hogwarts.  At the point of he and Harry's final duel, even if Voldemort had won or escaped, he had "lost the war" and was reduced to near impotence.  He would have been hunted down or stayed in hiding forever. That's one of the main themes of the book, how the Wizarding society allowed Voldemort to succeed because they were cowardly and "looked the other way," not even daring to say his name while hoping he would just go away. The only thing necessary for evil to succeed is for good men to do nothing.


How to display different number of posts

Question: How do I display different number of posts on the home page and archive pages, the archive pages can use the value set in the admin, but I want a custom number of posts to be displayed on the home page with pagination. Thanks.
Answer: This can be done with a very short plugin.
function posts_on_home_page( $posts_per_page ) {
    if ( is_home() )
        return 5;
    return $posts_per_page;
}

add_filter( 'pre_option_posts_per_page', 'posts_on_home_page' );

This is actually pretty close to the Codex example for pre_option_(option_name).
Comment: But is there a way to distinguish home.com from home.com/page/2/


Ensure torrent client uses openvpn

Question: I recently signed up to a VPN provider and to log in, I use network manager for my normal wireless connection and then start the openvpn connection from network manager.
In my browser I can check that I'm using the tunnel by going to an ip location finder site but how do I ensure that my torrent client actually uses this connection? For example, couldn't it happen that my VPN provider logs me out after some time (intentionally or not) and then my torrent client starts using the still available normal wifi connection?
Comment: what is the name of the torrent client?
Answer: How do I ensure that my torrent client actually uses this connection?
There is a site, CheckMyTorrentIP, that does exactly that. Basically, you download a torrent file generated specifically for you and once you open it in your client it will report the IP address being used. The IP should be displayed directly in your client but you can also revisit the site which will also display it. There is a FAQ on the site where you can get more info.
Couldn't it happen that my VPN provider logs me out after some time (intentionally or not) and then my torrent client starts using the still available normal wifi connection?
Absolutely. The FAQ on CheckMyTorrentIP as well as this article from TorrentFreak explain some options for preventing this, which include using specific firewall rules, changing TCP/IP routes, or using specific apps.
If you happen to use rtorrent you can bind it to a specific IP address (the one given to you by your VPN) and if you lose connection to that interface rtorrent will stop downloading/seeding (TBH, I'm not 100% that statement is true, but it is at least something interesting to look into). If your VPN IP is 0.0.0.0, then just add this to your .rtorrent.rc:
bind = 0.0.0.0

Comment: Thx for the detailed answer! The CheckMyTorrentIP site works great.
Comment: My pleasure, glad it worked out for you.
Answer: Run the command sudo ifconfig. It should return a list of connections, one of them is going to be something like tun0 which is your VPN tunnel.
In the tun0 block,  there will be an inet addr xxx.xxx.xxx.xxx.
Take that inet addr and add it or edit your .rtorrent.rc file (which is probably in your /home directory) such that it reads:
bind = xxx.xxx.xxx.xxx

(Obviously you will fill in numbers, not xxx.xxx.xxx.xxx).
It is tedious to do so each time you connect, but unmasking your actual IP is a real problem if your VPN times out and you get kicked over to your real IP while your rtorrent is still running.
I'm writing a script to do this automagically each time I boot.  If it works I'll try and come back and post it.
as promised here is a script to do this for you. it isnt practical to run it at boot unless youre starting your vpn at boot so you should run it manually as root or with sudo from the directory where your .rtorrent.rc is after you start your vpn and before you start rtorrent.
sorry to post something that needs root privileges, never run anything from a forum asking for root unless you review it yourself for safety.
script will parse your ifconfig output looking for the ip address associated with the string 'tun' and write that as a bind statement on the last line of your .rtorrent.rc file.
meanwhile it first makes a directory called .svrtvpn where it stores up to ten backups of the existing .rtorrent.rc file, then deletes all other bind statements from your .rtorrent.rc file then writes the detected vpn ip address to bind to as the last line in your .rtorrent.rc file
im super lazy so it was easier to take time to write the script and just call it quickly than to take ten extra seconds to manually detect and write the bind every time i run a vpn.
    #!/bin/bash
#svrtvpn.sh ver 0.3  "shadowvision rtorrent vpn" 01-05-2016 @ shadowvision.com/org
#a simple script to set your .rtorrent.rc bind to the ip address your vpn is using so that if your vpn gets disconnected, rtorrent will stop and you wont be unmasked
#WARNING WARNING WARNING WARNING under some circumstances it erases parts or even the entire .rtorrent file, but it makes a backup first so namaste :)
#this seems to happen if there arent any bind addresses to start with so the script will append a bogus one before it does anything else.

#syntax before starting rtorrent, run as root from the directory where your .rtorrent.rc is, follow the prompt and enter your linux user name that you will be running rtorrent as.

#provide help
if [ "$1" = "help" ]; then
echo "  use: before starting rtorrent, run as root from the directory where your .rtorrent.rc is."
echo "  script is dependent on ifconfig returning the vpn connection as 'tun'.  if that isnt what your connection is called you will have to manually change it inside the script"
echo "  svrtvpn.sh saves your existing .rtorrent.rc file in a directory called .svrtvpn with the extension of the epoch time in seconds. the last ten backups are saved."
echo "  if you use this script, the bind = address will always be the last line of your .rtorrent.rc file"
echo "  svrtvpn.sh ver 0.3  "shadowvision rtorrent vpn" 01-05-2016 @ shadowvision.com/org"
echo "  a simple script to set your .rtorrent.rc bind to the ip address your vpn is using so that if your vpn gets disconnected, rtorrent will stop and you wont be unmasked"
echo "  shadowvision makes no claims as to the usability of this script on your system, it was tested on kali linux with network manager and PIA 'private internet access'"
exit
fi

#first check to see if you have a .rtorrent.rc file.  if you dont it tells you so and exits.
RTORRENTFILE=./.rtorrent.rc
if [ ! -f "$RTORRENTFILE" ]; then
    echo "You dont have  .rtorrent.rc in this directory, script will now exit!"
    exit
fi

# set your backup directory variable
SVDIR=.svrtvpn

#tell the user its using a backup directory
if [ -d "$SVDIR" ]; then
  echo "using existing $SVDIR directory for backups.  your your last ten backups will be saved here."

#now make your .svrtvpn directory where your backups are stored if it doesnt already exist
else
mkdir -p $SVDIR
echo "created a directory called $SVDIR, your last ten .rtorrent.rc backups are stored here."
fi

#first find out what user you are running as, the script sets the ownership of .rtorrent.rc to this user at the end

SVUSER=$(ls -ld .rtorrent.rc | awk '{print $3}')
echo "your .rtorrent.rc file is owned by $SVUSER , it should remain read/write by that user and read for everyone else at the end of this script."
#copy your .rtorrent.rc to a backup file with the seconds of epoch time as the extension.
cp .rtorrent.rc ./$SVDIR/.rtorrent.rc.$(date +"%s")

#append a bogus ip bind so that the script wont erase your entire file
echo "bind = 999.999.999.999" >> .rtorrent.rc

#find out what your current vpn ip is, and if you dont have one, exit. as long as you didnt previously have a valid ip entered rtorrent wont start.
if $( ifconfig |grep -q -A1 tun); then
VPNIP=$(ifconfig |grep -A1 tun |grep inet | grep  -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | head -1)

#find any bind addresses in the file so we can delete them
DELINE=$(cat .rtorrent.rc |grep   bind | grep  '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | grep -v \# |grep -v \:)

#delete old bind addresses by tediously copying everything but found addresses to a temp file then back to the original file.
cat .rtorrent.rc |grep -v "$DELINE" > ./$SVDIR/.rtorrent.xx
cat ./$SVDIR/.rtorrent.xx > .rtorrent.rc

#add the vpn ip to the end of your file
echo "bind =" "$VPNIP" >> .rtorrent.rc

#make sure ownerships and read perms are sane
chown $SVUSER .rtorrent.rc
chmod u+rw .rtorrent.rc
chmod a+r .rtorrent.rc
chown -R $SVUSER $SVDIR
chmod -R a+r $SVDIR

#only save last ten backups, note the number is set to 13 because the three files . .. and .xx file arent backups
cd $SVDIR

ls -tra | head -n -13 | xargs --no-run-if-empty rm

cd -
else

#if you got to here it didnt work so set a bogus bind address so rtorrent wont start
VPNIP=999.999.999.999

#just like above find any old bind addresses so we can remove them
DELINE=$(cat .rtorrent.rc |grep   bind | grep  '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | grep -v \# |grep -v \:)
cat .rtorrent.rc |grep -v "$DELINE" > ./$SVDIR/.rtorrent.xx
cat ./$SVDIR/.rtorrent.xx > .rtorrent.rc

#set the bogus address
echo "bind =" "$VPNIP" >> .rtorrent.rc

#reset sane perms
chown $SVUSER .rtorrent.rc
chmod u+rw .rtorrent.rc
chmod a+r .rtorrent.rc
chown -R $SVUSER $SVDIR
chmod -R a+r $SVDIR

#tell us what happened
echo "you are not connected to a vpn, this wont work"
echo "your bind address has been set to 999.999.999.999"
fi

Comment: How is this any different from [jonyamo's answer](http://unix.stackexchange.com/a/61852/6761)?
Comment: my answer is more user friendly as it assumes the user doesnt know how to find the tunnel address and instructs them on how to do it.
Comment: Now that you have added the script, it is useful. Prior to that, it was a candidate for deletion; the "user friendliness" not a sufficient criteria alone.

Ensure torrent client uses openvpn


Money is credited from unknown source

Question: If money is credited from unknown source is it legally binding to inform the bank?
Comment: What do you mean by "legally binding?" Are you trying to determine if you'r required to report the money? Or are you trying to determine if you are bound to some outcome if you do decide to inform them?
Comment: When the bank finds the missing amount, they will ask you to return it. So it is upto you if you can return the money after spending it.They can take you to court to recover the amount, if you don't bother returning.
Comment: So what are your intentions exactly ? Why do you want to take something which is not yours ? Sooner or later the bank will realize the mistake and ask you to return the money, so why don't you return it in the first instance.
Comment: By legally binding I mean if I don't inform the bank on my own and spend the money instead the bank is able to prosecute me.
Comment: I have read similar answers in google search but didn't find anything from credible source like RBI documentation. My confusion is if for a peer to peer transfer the responsibility lies with the payer to give correct account address for the payee and bank cannot initiate return without the consent of payee so why in case of wrong transaction originated by the bank, consent of payee is not enforced?
Comment: How much money? It's different for $10 than it is for $10 million, and different again for $10 trillion.
Comment: Just because you don't know the source doesn't mean the bank won't figure it out in time.
Answer: In a comment you clarified your question:

By legally binding I mean if I don't inform the bank on my own and spend the money instead the bank is able to prosecute me.

It likely depends on the type of transaction that caused the credit, among other factors. In most banking systems, there are a range of ways money can arrive in an account, and they have very different rules associated with them. Ultimately, it probably doesn't matter if you tell the bank or not - if the money is not supposed to be there, and it was deposited via a reversible method, all it takes is any other party involved to inform the bank and remove the money. Even that said, true errors do happen even with non-reversible transactions and banks may simply decide to error correct in that event.
Rather than worry about your liability for reporting the transaction, you should probably be more concerned that someone else will eventually discover the mistake and reverse the transaction. Ultimately, if you have no legitimate claim to the money, it's not yours, regardless of whether you tell anyone or not.
Answer: At the point when a record is credited with a mess of cash originating from an obscure source. Presently it doesn't really make a difference that the sum has originated from any specialized glitch, wrong exchange or unjustifiable methods. It doesn't have a place with you, Even in the event that you move it to another record you will be at risk to take care of it or deal with lawful indictments.
Accepting a sum doesn't make you a convict yet utilizing that cash for your own motivation is a wrongdoing without a doubt. On the off chance that you Google it you will without a doubt part of situations where individuals have dealt with indictments state it isn't right exchange or specialized glitch.

Money is credited from unknown source


What are the advantages of using linear least squares ANOVA?

Question: Via this article http://www.pmean.com/08/RegressionAndAnova.html. It was written that linear least squares ,which is used to calculate regression, is used to calculate ANOVA, but there are other methods to calculate ANOVA. The article referred to this method as the regression algorithm, but, just to be clear I am not so much looking for an algorithm as much as a general concept used to calculate the anova table. I do not consider linear least squares as an algorithm, it is a general concept. Hence, What other general concepts are used to find the ANOVA table? What is the advantages of using the linear least square concept in calculating ANOVA?.
Answer: The standard general concept to find the ANOVA table was method of moments (MM); this approach relied strongly on normality assumptions and it is sub-optimal in comparison with standard least-squares (LS) procedures. In addition if the data are unbalanced a lot of ANOVA's theoretical concepts are seriously perplexed and this makes the estimation even more questionable. The user @Placidia has given two excellent answers on the matter here and here. MM is sometimes still used in one-way and two-way ANOVA because of its ease to code it up conceptually but essentially all $n$-way ANOVA routines now rely on LS. I have seen some  (usually clustering) algorithms using MM because they are easier to code up and faster to converge; they serve as good hot-start points for optimization tasks.
(This post is an over-sized comment.)


Countdown Widget

Question: Can someone recommend me a nice countdown widget plugin for Wordpress?
I've been using the Countdown widget under Blogger and it's exactly what I need. A simple number from now until date or from date.
I can't seem to find a very simple, easy countdown that does the same thing in Wordpress.
Answer: Yes, there's a great widget called the jQuery T-Minus Countdown Widget
Enjoy!
Comment: Wow, that's really easy to use. Can't believe I missed this one. Thanks!

Countdown Widget


Linux that is just a RDP client

Question: Is there any RDP clients i can boot from a pendrive, what I means is have Linux that boots up and is only a RDPclient nothing else, like no desktop etc.
Comment: I don't think any exist like that out of the box.  Are you against rolling your own?
Answer: What you are looking for is a Thin Client, that is what I've seen them refered to across multiple projects and people like HP who sell machines with this.
Any Linux OS that will run / fit on a pen drive will be able to do this. And there are lot of tutorials to do this with your favorite distribution. You can even set it up so that a basic X11 loads with rdesktop already connecting and maximized to the window.
Here is a Linux Pendrive site - Here is a neat project LTSP, it runs a linux over a network machine. And here is a project that seems to do exactly what you want (along with some other remote protocols) Thinstation
Comment: Thanks, thinstation is exactly what I'm looking for. A little bit of a side note, is there a way to browse the internet on the local machine, so that things like videos are normal quality?
Comment: Yes, they have a Firefox 3 package for thinkstation 2.x. It was posted as a news item on May 11,09.
Answer: Why not use any of the many tiny Linuxes (e.g. Puppy Linux) and just run RDP?
If you prefer to roll your own distro, this tutorial may be helpful.
You may also want to look at the highly-customizable Arch Linux.
Answer: I don't think such a distribution currently exists, but you could make one with the numerous tools available. Any one of the tiny distributions such as DSL can be fitted with a remote desktop client.

what I means is have Linux that boots
  up and is only a RDPclient nothing
  else, like no desktop etc.

If you want graphics you'll have to have X installed at minimum.
Check out this other Superuser question "Easiest linux distro creation" for information on how to roll your own.
Answer: Try this:
http://pctsc.ponderworthy.org
It's exactly what you asked for :-)
Comment: That website just goes to some music thing from Kansas...

Linux that is just a RDP client


Applying for a postdoc when you don't have all the necessary skills

Question: I have recently completed my PhD and now looking for a postdoc/research assistant position. I found a few positions that look attractive - but I don't have all the skills listed in the job ad. I have some and I know I can learn the rest quickly; I also know from talking to other postdocs that their current research is not related to their PhD projects.
The question is - should I apply for the jobs I'm not completely qualified for since it's normal to learn on the job, or is it a total waste of time? And how should I answer to selection criteria in this case?
Comment: Small tip for job searches: You have a good chance to get the job if you are better than the competition, even if you don't fulfill the whole list of requirements (which sometimes is not more than a wish list).
Answer: Assuming you believe you can do the job and can make a compelling case in your application, yes you should apply. A person with the exact set of skills listed may not be available, in which case they will have to chose whomever they believe is the best fit of those who apply. Also, the skills you have may be beneficial for the position but may not have been thought of for the job ad.
In answering the selection criteria naturally emphasize the skills that you have which match the job ad. Additionally, highlight the skills which you have that are not listed but you believe would be beneficial and why. Finally, you can also make a case for why you can quickly (and independently) learn the additional skills that you do not already have.
Answer: The original purpose of a post doc was to learn a new skill, technique, literature, etc while engaging in an intense period of discovery and scholarship meant to bolster ones publication record and research toolbox.
Thus, i would argue that the best candidate has a strong foundation in science but seeks to learn the specific skills involved with the job. If that's the case you must sell your passion and ability to quickly adapt and integrate. In fact, many post doc grants (eg NIH NRSA) require you detail your training plan and likely won't find you if you already have all necessary skills.
Labs looking for a fully trained staff member that can be productive immediately are looking for a research scientist.