Do arrows count as trinkets for Prestidigitation?

Question: I am playing a ranger and planning to take magic initiate for a few bonuses. I am wondering whether I could create temporary arrows during one turn and use them the next turn, in case I'm out of arrows, and if it works, what would they do?
Comment: Related: [What are the creative limits of Prestidigitation](https://rpg.stackexchange.com/questions/65539/what-are-the-creative-limits-of-prestidigitation)
Comment: Have you talked with your DM about ammunition tracking? This may not be a problem you need to solve for :)
Comment: It looks like the title doesn't match the question actually being asked. There's lots of answers digging into the meaning of 'trinket', but none of them are answering the question 'Can Prestidigitation create usable ammunition', which has very different narrative and mechanical implications.
Answer: Probably not.
Prestidigitation isn't explicit about what a "trinket" is, which means we have to fall back to the general English language.  I would interpret a trinket as something small with artistic or sentimental value but no particular mechanical properties, so if I were the DM I probably wouldn't let it replicate the properties of any specific item.
And then there's the big one - the trinket must fit in your hand.  Arrows are clearly longer than your handspan (they need to be in order to work), so by my interpretation you definitely couldn't create an arrow.  (Perhaps some DMs would consider this clause met if you could wrap your hand around it; that doesn't seem like the natural reading to me but it's defensible.)
But ask anyway.
D&D is ultimately a storytelling game about having fun, and DMs have to adjudicate lots of little things that aren't strictly covered by the rules.  If allowing this makes the game more fun and interesting for your table, and doesn't unbalance things, then there's no real reason to shut it down.
(For my part, I lean towards allowing creative mechanics like this if they're a one-off or strictly worse than the normal case, but look to disallow them if they become standard MO that gets used regularly.  In this case, since you have to give up your action on round X to create the arrow fired on round X+1 - and thus attack half as often as usual - I don't think there would be any issues.)
Comment: Given that in most of the games I'm in, nobody even bother to track ammunition (unless it's special) then even though it's not RAW there's a good chance the GM would allow it.
Comment: The phrasing is *You create a nonmagical trinket or an illusory image that can fit in your hand and that lasts until the end of your next turn.*  I think a natural reading that has the size limit only applying to the illusion, not the trinket.  Being a trinket already has implications for size, and as other answers point out, Sage Advice suggests the trinket table for examples, and all are something you could hold in one hand, but some would stick out.
Comment: @PeterCordes I definitely read it as *You create a `[trinket or image]` that can fit...*  English is ambiguous about delimiting compound clauses though, so it could be either.  (And even under your reading, the duration clause still might or might not apply to the trinket.)  Yet another case of ambiguity for DMs to have to adjudicate on.
Comment: Fair point about duration.  I'd chalk that up to imperfect wording choice by the authors, trying to keep it compact.  I still think the most sensible reading (and one compatible with Sage Advice about trinkets) is *[trinket or (image that fits in your hand)] with 1 round duration*.  The "and that" can collect the two previous clauses, trinket or small image.  (It's also normal phrasing for your reading, so it doesn't rule out that reading.)  The other way to square it with Sage Advice is to read "fit in your hand" as including easily-grippable things like a knife. Possibly not an arrow, though
Answer: Maybe?
For the reasons cited in Adrzej Doyle's and Thomas Markov's answers, chances are, you aren't going to get your DM to agree to it.
However
One of the items in the Trinkets Table is "an ancient arrow of Elven design", which is a fairly good argument that an arrow could maybe be a trinket.  Some old arrow is a far cry from actual battle-ready ammo, though, so it's not unreasonable for a DM to say no, an arrow's not a trinket, it's a weapon.
You should discuss with your DM.  It might be the sort of thing that works in an exceptional circumstance, but that won't work if you try to use it all the time.
Comment: Having an arrow on the trinket list is pretty strong support that you could create an arrow, nice catch.
Comment: @Rekesoft Or an extraordinary piece of master craftwork.  What the rules say is "an ancient arrow of Elven design".
Comment: These "ancient arrow" is most probably a rusty arrowhead, the wood of the shaft having rot away years ago.
Answer: Absolutely
As per sage advice,

What kinds of things count as "nonmagical trinkets" for prestidigitation?
Prestidigitation can create a little bauble, the nature of which is up to the spellcaster and the DM. See the Trinkets table in the Player's Handbook for examples.

The trinkets table includes:

A knife that belonged to a relative

So we know a trinket can be sharp.

An ornate scabbard that fits no blade you have found so far.

So we know a trinket can be quite sizable.

An ancient arrow of elven design

So we know a trinket can be an arrow.
There's every reason to interpret RAW to allow this.
Comment: @Rekesoft if you think knives are useless in a fantasy setting, I don't know what to tell you. The trinket list also contains a variety of clothes and musical instruments, many of which are perfectly functiona. No reason an arrow wouldn't.
Comment: @Rekesoft Nowhere is it indicated that the Trinkets list is 'garbage'. It includes gold coins, multiple intricate and functioning mechanical automatons, various bits of jewelry, and more.

And prestidigitation is certainly not intended to be *useless*, just  *minor.* Starting a fire, cleaning clothes, heating and flavoring food… these are all small, but powerful and useful effects.
Comment: The common property of all those objects is being completely useless. As a DM, I would allow it on the condition that the arrow always fails to hit anything.
Comment: I would say that, RAI, the trinkets list presents a series of objects such as you could find in an abandoned storeroom, commonly known in english as "garbage". The spell is called "prestidigitation" and is clearly intended to impress people with apparent displays of power which are actually useless. Even its lifetime is explicitely capped to prevent any kind of use as tools or weapons.
Comment: trinkets cannot cvount as anything already listed as something else (ammunition, weapons or such are already listed as not being trinkets) the sage advice rules indicated to take the table as EXAMPLES not the verbatim list.  all weapons and ammo need to be removed they are not trinkets.  Downvoted for missing the clarity ofth sage advice RAW writing (exmeple is only that, example not all things in the table are to be taken as such)
Comment: @KilrathiSly The trinket list demonstrably *can* include things listed elsewhere. 1. An *arrow*. 2. A knife (also included in the Scholar's pack) 3. A dice set (listed under tools) 4. A caltrop (listed under Adventuring Gear) 5. A set of bone pipes (listed under Musical Instrument). Do you mind letting me know what your source is for saying trinkets can't count as anything else? I couldn't find it in the DMG or PH, but I might have missed something.
Answer: It's not a good use of an action even if you can.
Prestidigitation has a casting time of 1 action. Casting it takes your first turn. The next turn you get to shoot 1 arrow. Two turns and all you did was shoot one arrow.
If you want a cantrip to use when out of arrows, any of the offensive cantrips will likely provide better bang-for-buck even taking into account potentially lower stat bonuses. This gets stronger at higher levels where you can fire multiple times a turn. Even then, most often closing to melee range or other situationally appropriate actions are going to be a more effective use of your action.
That said, outside of your idea of using it when you run out of ammo, it could have useful applications such as have a vanishing arrow for assassination (hattip: comment by aherocalledFrog) which could make it worth it in some niche situations. Your creativity is the limit.
RAW it's probably not allowed but it's the DM's call
The term trinket, to me, doesn't imply a natural language inclusion of an arrow (which would be ammunition) but the list of trinkets does include an arrow and a knife so it seems fair to allow it. But then it also specifies "fits in your hand" and I'd say an arrow doesn't. This kind of interpretation is down to the DM in your game.
Comment: I think this is the best answer so far because it gets into some of the mechanical implications, and specifically mentions using an arrow for an attack makes it ammunition. I think it could be improved by the possible shenanigans that would normally be beyond the scope of a cantrip like this if allowed; I'm specifically thinking of a lethal but vanishing arrow for assassinations, but I'm sure there's more.
Answer: Ask your DM, but probably not.
The Sage Advice Compendium gives us some guidance here:

What kinds of things count as "nonmagical trinkets" for prestidigitation?
Prestidigitation can create a little bauble, the nature of which is up to the spellcaster and the DM. See the Trinkets table in the Player's Handbook for examples.

To me, it does not seem that an properly crafted arrow capable of wounding fits with the trinkets on the Trinket table, but the official ruling from the SAC leaves it in the hands of the DM.


What does intracluster correlation mean?

Question: I am studying the topic of cluster sampling. I have learnt that intracluster correlation ($\rho$) measures the correlation over all clusters between distinct elements in the same cluster. I do not quite understand what this means. Can someone explain please and give an example if possible?
Answer: In general ICC tells you about the

"degree of similarity in the responses of individuals from the same
  cluster for the outcome" (Eldridge, Ukoumunne and Carlin, 2009)

and it

describes how strongly units in the same group resemble each other (Wikipedia)

So it tells you if the clusters are made of similar individuals versus being a random mixture of individuals. However this measure could be misleading and you should not take it at a face value.


Visual Studio incremental build: XML documentation file is created too late

Question: I have a DLL project for Visual Studio 2005 that has "XML documetation file" turned on.
Whenever I do an incremental build, during post-build event execution there is no XML documentation file in the output directory.
If I pause the build during post-build event (using sleep utility from GnuWin32 CoreUtils), I can see the file in the output directory with a name like vs5BB5.tmp. But this file is not renamed to MyLib.xml until post-build event (and "AfterBuild" target, as I have some customizations there) are finished.
For a clean build in Studio and for MSBuild started from a command line everything works as expected - XML documentation file is created before post-build events.
Why this happens, and how do I fix incremental builds?
Answer: Was just having the same issue. This is a known problem with Visual Studio and incremental builds. See this post on microsoft connect.
I solved it with a conditional xcopy like the one below:

if exist "$(TargetDir)$(TargetName).xml" xcopy $(TargetDir)$(TargetName).xml $(ProjectDir)......\bin\ /C /I /R /Y

SF
Comment: Thanks for a good answer.
Unfortunately, I can't mark it as accepted due to "unresolved bounty" problem (http://meta.stackexchange.com/questions/1413).
Answer: Just having this problem myself....
what I found is that the xml file is named a .tmp file, so you can copy this tmp file to where you want,  its just a bit of a "messy" work around.
I'm also quite tempted to write myself a command line tool thats called something like :-
WaitForThenCopy <source path> <target path> <milliseconds to wait>

only problem is it would have to be non blocking and you wouldn't know if it worked or not.
Answer: I'm using a simple batch file to do the copying instead of the default copy command that detects the tmp file and copies/renames this instead.
REM There is a bug in VS where the xml documentation is written to a tmp file
REM during incremental builds, preventing access during post-build events.
REM See http://connect.microsoft.com/VisualStudio/feedback/details/470485/strange-file-not-found-error-xml-documentation-file-renamed-during-incremental-build
REM As a work around for following script tries to catch this situation and copys/remanes
REM this tmp-file instead.

REM .SYNOPSIS
REM CopyXmlDocumentation "X:\path\to\source.xml" "Y:\target\dir"

if exist "%~1%" (
  REM if the file exists, copy it as-is
  copy /Y "%~1" "%~2"
) else (
  REM else we try to copy the .tmp file and rename it to the desired target name
  REM we assume that the tmp file is named "vsXXXX.tmp" where XXXX is an arbitrary string
  copy /Y "%~d1\%~p1\vs*.tmp" "%~2\%~n1%~x1"
)


What will cause my 2002 dodge grand Caravan to not crank

Question: it will crank when connected to another running car with jumper cables. when you remove the cables it just goes dead and wont crank again until it connected back to the other running car
Comment: Welcome to Motor Vehicle Maintenance & Repair! What is the battery voltage without being attached to another car?
Answer: Sounds like a dead battery that won't hold a charge. The van cranks when it's on jumper cables because the other vehicle's battery is doing all the work.
Take your battery to a local auto parts store and ask them to test it. I'd say there's a 99.9% chance they'll tell you the battery is a goner.
Replace the battery.
If it will start on jumper cables but dies when they're removed, it's also possible/likely that the alternator is shot, too. Put the new battery in your van and drive directly back to the parts store. Have them test the alternator - you may have to replace that as well.
You do not want to drive too far on your brand new battery - you could end up killing it. If it's very far to the store, take both the alternator and battery in and have them bench test both.
It's likely that the alternator died and you were driving off just the battery. Since the battery got little to no charge coming in, running the van completely killed the battery so it'll no longer hold a charge.


Free UK Company Database

Question: I have a company review and rating website but I need a faster way to populate my database with UK Companies. What I need is the full company name, address and telephone number only so I can import it in CSV format. I have tried companies house but does not provide the contact number within their databases. Where could I find a free open up to date database so it can be imported into my website?
Comment: Unfortunately, you do have to pay for the CSV and XLS version, do you know is a way of me being able to download via the API? Is there a way I can import the data somewhere from the API, then download it into CSV or XLS format? Thanks Mark
Answer: Seems like OpenCorporates is exactly what you're looking for. It describes itself as:

The largest open database of companies in the world

https://opencorporates.com/companies/gb is the listing of UK companies from which you can download data via the XML and JSON APIs for free and it seems like you might need to pay to get it in CSV or XLS formats
Comment: There is no way to download anything for free from opencorporates.com.  It's a paid service.
Comment: So does OC have the phone numbers of companies that have no such information on CH? If so, how did you obtain it?
Comment: Why do you say that? It looks open enough to me

Free UK Company Database


"That's my rubber and ruler" Why isn't it "they are" as there are two objects?

Question:
A: That's my pencil case and my pen and pencil.
  B. Oh! That's my rubber and ruler.

Why is it not "they are" as there are two objects?
I found the example in Junior New Concept English for Starters, published by Pearson Longman.
Here is a screenshot of the conversation
Answer: I think the reason it's confusing is because a certain key phrase, that is definitely and clearly implied, is omitted for brevity:
"That's my rubber and [that's my] ruler."
The sentence applies the singular linking verb "is" in two separate cases using two separate singular subject complements.
Answer: The plural of "that" is "those". It would have been more correct to say:

Those are my rubber and ruler.

However, I actually think that sounds wrong though I am certain it is correct.
It is probably more common to say it like this:

Those are mine. (you have to point to make it clear)

OR

That pencil and that eraser are mine.

OR

Those two are mine.

"That's my pencil and eraser" is definitely not correct but native speakers do sometimes speak that way. It sounds like you are considering the pencil and eraser to be "one" thing.
By the way, I can't speak for all English speakers, but we do not call it a "rubber" in America (I would not know what you were talking about if not for context). We call it an "eraser".
Comment: 'That's' as an abbreviation for 'those are' may well be considered acceptable by many nowadays; grammar changes.
Comment: Rubber is the standard name in British English.
Comment: You learn something new every day. Is the term "eraser" in common usage in British English?
Comment: thank you all so much, especially @G-Cam. i think the book uses that instead of those for various reasons including the ones you have mentioned.

and maybe the book thinks "that" is a lot of easier for kids to say and learn before they're introduced "those". does this make sense too?

by the way, new concept English is published by a British company so the book uses words that are more common in British English. another example, in books published by Oxford publishing company, they say somebody is cross instead of mad when he or she is angry. so we always explain both usages at the same time.


Is co author second author in a two author paper

Question: I did post doc in a university where i did experiments. Later after i rejoined job, i worked on it for 2 years, developed analysis methods and together with prof through communication by mail send it to a reputed journal with the prof being the corresponding author. The mail from the journal forwarded by the prof to me says that my prof is the corresponding author and i am the co author. Does it mean that i am the second author? In the manuscript i am the first author and my prof is the corresponding author and second author. Kindly clarify.
Answer: The corresponding author is the author who corresponds with the journal and receives all correspondence regarding the manuscript after it has been published. This role is independent of author order. In some disciplines it's common that the first author has this role and in others it's the last author who does it. But any of the authors can be corresponding author.
Answer: To the best of my knowledge (and at least in the field in which I work), the author order in the manuscript is authoritative -- if you're the first author there, you're the first author. (To put it another way, I would feel entirely happy to defend my first authorship at an academic job interview on such a basis.)
By contrast, the definition of a co-author is somewhat context-dependent -- it can either mean any one of the people who jointly authored a paper (including, potentially, even the first author), or it can mean one of the authors other than the first author, or (as apparently in this case) it can mean one of the authors other than the corresponding author. As such, I would have thought that the journal is entitled to refer to you as a co-author in that sense if it wants to, but it doesn't affect your actual position in the author order.


Are OpenJDK and non-Windows systems vulnerable to the Sept. 25th 2012 Java vulnerability?

Question: I have heard of this vulnerability, but although it was announced on the Full Disclosure list, it does not provide any details (other than a severity assessment). Does anyone have more info than me, and is able to tell whether non-Oracle JREs (OpenJDK's, for instance) and non-Windows systems are vulnerable to it?
Answer: It's been less than 24 hours, and it doesn't seem to have a CVE entry yet, so it's difficult to say. The details are pretty sparse.
All I can give you is my best guess:

Any initial exploits will work on Oracle Java SE only.
A variant of the vulnerability may affect OpenJDK, but it's unlikely to have the exact same problem. This is because it's an entirely different codebase. We may see problems later on with OpenJDK though.
It'll be cross-platform, since the constraint violation is in the JVM, not in anything Windows-specific. It may even work on non-x86 machines, e.g. ARM / PPC.


Bringing my pregnant wife to Austria; I am an EU citizen

Question: I am a student in Austria, I have an EU citizenship. My wife is pregnant and is a third world country resident. Can someone explain what my options to bring my wife to Austria are.
Comment: Are you a citizen of Austria or of a different EU country?
Answer: Assuming that your wife is a citizen of a country whose citizens need visas for short visits to the Schengen area, your wife needs a visa.  Assuming that you are not Austrian, the visa should be free of charge.  She would normally apply for this visa at an Austrian consulate or embassy, but the details could be different depending on the country she's in.
You don't really need to consider other options, because this one is so straightforward.
After she gets to Austria, she'll need to apply for a "residence card" if she plans to stay for longer than three months.
Because you're a student, you may need to show that both you and your wife have health insurance.  If you are a "worker," however, that requirement disappears, including if you are both working and studying.


Getting random second long request time outs when pinging my router

Question: I'm connected to my virgin fibre optic router via tp-link powerline adapter with my ethernet cables. When i ping anywhere e.g google.co.uk or riot.de using the command prompt i get regular normal ping (around 38-42 ms) however constantly get request timeouts every 5-10 seconds. This is a huge pain in the ass when playing online games such as League of Legends as my screen will just freeze and not sure where to go from there.
https://gyazo.com/ca584b9015dbd9d182a654644a15a487
There's a gyazo of a recent ping test
Comment: Try pinging your router to rule out issues with the powerline adapters.
Comment: This is called packet loss. I don't understand why this is happening, but I hope knowing the name of the behavior will help you solve it. Google is your friend :)
Answer: There are a large number of factors that could be causing this packet loss. Unfortunately because.your connection is quite fast its difficult to tell much from the latencies you are seeing.
The next step is to run MTR (winMTR) which combines ping and traceroute. If run for a fair amount of time it will show where the problem is as well as the extent of it.
I would postulate that  your provider is using QoS/bandwidth pooling and dropping packets to slow down TCP connections and limit utilization.


What are the advantages of loading DLLs dynamically?

Question: Looking for the advantages of loading DLLs dynamically as opposed to letting your application load the DLLs by default.
Answer: One advantage is for supporting a plugin architecture.
Suppose for example you want to write a service that performs different types of tasks on a scheduled basis. What those tasks are doing, isn't actually relevant to your core service which is just there to kick them off at the right time. And, it's more than likely you want to add support to do other types of tasks in the future (or another developer might want to). In that scenario, by implementing a plugin approach, it allows you to drop in more (compatible by interface) dlls which can be coded independently of the core service. So, adding in support for a new task does not require a new build/deployment of the whole service. If a particular task needs to change, just that dll needs to be redeployed and then automatically picked up.
It also requires other developers to not be concerned with the service themselves, they just need to know what interface to implement so it can be picked up.
Comment: What if your system is a non-plugin architecture type system. What other advantages would their be?
Comment: The only times I've done it is within a plugin architecture tbh. I can't think of another reason why else I would consider it otherwise. Maybe some sort of security purpose - i.e. only load dlls that give the functionality a certain user is allowed access to. But tbh I'm not even sure that would be a valid approach to take over just controlling other ways in code!
Comment: What about performance? Does it matter that you have a DLL loaded when in actual fact you would only be using it rarely?
Comment: It would only use a bit more memory to have it loaded. If you load it dynamically at the time of use, and then unloaded straight after, then I think that will be a bigger performance overhead - it has the extra steps to perform each time it's used (even if only rarely) - though I have no hard stats to quantify performance.
Comment: Seems to be the only advantage by the looks of it...Thanks.
Comment: May I ask how the new .dll's are deployed? is it a manual copy and paste in the right location? I'm having hard time understanding this part
Answer: We use this architecture for our processing applications to handle differences that our different customers require.  Each DLL has a similar structure and implements the same interface and entry method "Process()".  We have an XML file that defines which class to load based on the customer and whether there are more methods besides process that needs to be called.  Performance should not be an issue until your transaction count gets very high.
Answer: Loading Shared Objects dynamically is the mechanism for allowing plugins ad hoc to running applications. Without plugins a modular application would have to be put together at link-time or compile-time (look at the code of nginx).
Answer: Your question is about C#/.NET so in this world dynamic DLL loading requires advanced programming skills. This could compensate all the potential benefits of dynamic DLL loading. You would simply have to write a lot 'low level' code.
In C++/Win32 I often have to load a DLL dynamically when this DLL has some new API function which is not available on older operating systems. In this case I need to ensure the availability of this API at runtime. I cannot just link against this DLL because it will cause application loading errors on legacy operating systems.
As mentioned, you could also have some benefits in a plugin-based environment. In this case you would have more control on your resources if loading DLLs dynamically. Essentially COM is a good example of dynamic DLL handing.
Answer: If you only load the DLLs you need then the startuptime of the application should be faster.
Answer: Another reason to load DLL's dynamically is for robustness.
It is possible to load a DLL into what is known as an AppDomain. An Appdomain is basically a sand box container that you can put things into (Either portions of DLL's or whole EXEs) to run in isolation, but within your application.
Unless you call into a type contained within an AppDomain, it has no way to interact with your application.
So, if you have a dodgy third party DLL, or a DLL that you don't otherwise have the source code for, you can load it into an AppDomain to keep it isolated from your main application flow.
The end result is that if the third party DLL throws a wobbly, only the appdomain, and not your entire application is affected.


Why is a black body visible?

Question: A black body absorbs all energy. It doesn't reflect or transmit energy. It also absorbs all light and doesn't reflect any light. Why, then, can we see it? For instance, burnt platinum is 98-99% black body and yet is visible.
Comment: stars are near perfect black bodies because they reflect an insignificant amount of energy. how does that fit into your argument?
Comment: @Cursed not "because they reflect an insignificant amount of energy". They are near enough to black body radiation but not due to reflection. They are not in equilibrium with the vacuum around them, so they just emit the  black body of their temperature, while they absorb whatever  small radiation hits them. The +1 votes are for the "stars are near perfect black bodies"
Answer: There are some misconceptions here :

Blackbody absorbs all energy.

So far so good.

It doesn't reflect or transmit energy.

No.  Any object that did that would get hotter and hotter as it absorbed more and more energy and just retained it.  A blackbody, like any object, will radiate energy away as photons - light at many different wavelengths.

In respect of light energy, it also absorbs all light and doesn't reflect any light ray.

See the previous paragraph.

then why can we see it?.....for instance burnt Pt which is 98-99% blackbody

Because a blackbody does not exist in total isolation and it will try to reach thermal equilibrium with the world around it.  To do that it either has to radiate energy away (if it's hotter than the world around it) or absorb energy (if it's cooler).
Even when it absorbs it still radiates some energy, and it simply radiates less than it absorbs.
But when you talk about being "visible" in a human sense, this is a different thing.  If you walk into a room with every object and surface emitting light you can see, and then I pop something into it that actually did not emit light at a visible wavelength you would still detect that visually - it would seem like a "hole" in the scene - a silhouette.
For something to be invisible to a human, i.e. not be detectable visually, it would need to be perfectly transparent (at least at visible wavelengths) - all light would have to pass through it without distortion.  Alternatively, all light would need to go around it.
Comment: "I pop something into it that actually did not emit light at a visible wavelength you would still detect that visually - it would seem like a "hole" in the scene - a silhouette." - Just like [this basketball](https://i.redd.it/b9cpob8p3qny.jpg) coated in Vantablack.
Comment: Your rejection of the statement "It doesn't reflect or transmit energy" is troubling me. Blackbodies indeed do **not** reflect or transmit EM waves, by definition of their being perfect absorbers. They do, however, emit -- as you have correctly gone on to say
Answer: One must know the definition of a black body and its radiation:

"Blackbody radiation" or "cavity radiation" refers to an object or system which absorbs all radiation incident upon it and re-radiates energy which is characteristic of this radiating system only, not dependent upon the type of radiation which is incident upon it

Black, like white, is not a frequency in the electromagnetic spectrum. white is  a combination of the frequencies  of the spectrum that the retina decides as  "white ", and black is the absence of detecting anything in the visible. It is called color perception.
Your example of platinum is interesting, because I am sure you are seeing it with light reflected  from it , even if reflection is only 2% as you say, does it look black?

Normalized response spectra of human cones, to monochromatic spectral stimuli, with wavelength given in nanometers.

Our eyes see the frequencies within the visible spectrum, the other frequencies register as black, if they exist. At night an infrared camera sees, our eyes see black.
A perfect black body in equilibrium with the surrounding temperature will be absorbing incident radiation  and emitting black body radiation according to the temperature scales of this radiation. At temperatures where our eyes can exist we perceive it as black, because these are infrared frequencies. We only see visible light reflections on bodies, not their black body radiation.
Outside equilibrium, if the emission has parts in the visible, our eyes and brain will see it as visible we will see the visible part of its black body radiation, as with the sun, or red hot iron at the blacksmith.
Comment: @MohammadMizanurRahaman Yes. Although we can *also* see something as black simply by contrast with something way brighter. Imagine a projector screen. It's white, smooth and very reflective. Then you turn the projector on and display some black text on a white page. The black text isn't any darker than the white screen you were looking at just before! It's just that with the projector making the area around it *even brighter white* the contrast makes the unlit areas appear as black.
Comment: Soyou are saying," our human eyes detect the absence of visible frequencies as Black? "
Comment: @annav to twist that around to make it more precise... If there are no frequencies that the receptors we have can detect, then we only see black.  (I don't have receptors capable of seeing x-rays, but stick me (and a lamp) inside a lead box and I will still be able to see, despite the lack of X-rays) (this is a response to your comment, your answer has this correct)
Comment: Corrected after comment :Yes, exactly. To sense light our eye cones have to interact with it and then a signal goes to the brain. If there are no receptors for all  the frequencies coming from a certain space we see that space as black. the picture linked in a comment to an answer is indicative. https://nerdist.com/wp-content/uploads/2017/03/Vantablack-Feature-Image-03282017.jpg
Answer: A black body absorbs all electro-magnetic energy it receives and does indeed emit radiation to stay in thermal equilibrium. If it is very hot, it will be visible. As you say, a black body does not reflect energy: It absorbs and emits.
Comment: @MohammadMizanurRahaman [This](https://nerdist.com/wp-content/uploads/2017/03/Vantablack-Feature-Image-03282017.jpg) is what a nearly-perfect blackbody at room temperature looks like. Eerie, isn't it?
Comment: In a lit room, our sense of vision has no problem noticing a black object. People may run into glass doors, but they won't run into a wall of platina-black.
Comment: you are saying if it is very hot, it will be visible.But so for I know in room temperature burnt Pt is visible
Comment: Then it is not a perfect black body. Some light is reflected and this is what you see. A black body at room temperature is invisible to the naked eye.
Comment: @Pieter, I think it would still be easy to run into.  With nothing to see, there's no way to judge depth.  You could see a line on the carpet where the wall was, but you could hold your hand out and not know where the wall was until you poked it.
Answer: You are combining several different issues into one question.

A black body absorbs all energy. It doesn't reflect or transmit energy.

You are treating "reflecting" and "transmitting" as the same. They are not. A perfect black body does not reflect any light, but it does transmit light, in the sense that it radiates light (that is, it glows from the heat of the energy it absorbs).

Why, then, can we see it?

In a steady-state situation, a black body would not be visible. That is, if the amount of light were constant across time and space, then the black body would look like every other part of space, and therefore not be distinguishable. But then, if all parts of space looked the same, then nothing would be distinguishable. If light varies across time and space, then a black body would be detectable as it "averages out" the variation; if a black body is surrounded by some objects that are hot and some that are cold, then the black body will radiate at an intermediate temperature, and therefore look different from the hot and cold objects. If the temperature of the black body's surroundings changes over time, then the temperature of the black body will take time to adjust. If the surrounding are heating up, then the black body will be radiating at a lower temperature than the surrounding, and if the surroundings are cooling down, the black body will be at a higher temperature than its surroundings. (There's a similar concept behind videos showing that areas exposed to moonlight are colder than areas in the shade. While this makes it seem like moonlight makes things colder, what's really going on is that whatever is giving shade is absorbing energy during the day and giving it off at night, and so areas in the shade are cooler than their surrounding during the day, but warmer than their surroundings during the night.)
And that, really, is what it means for something to be "seen": light coming from it is different from light coming from elsewhere. A uniformly yellow object surrounded by objects the exact same shade and intensity of yellow will be just as invisible as a black object surrounded by blackness.

For instance, burnt platinum is 98-99% black body and yet is visible.

And here you are conflating several further ideas. A perfect black body is 100% black, not 99%. The concept is more a theoretical construct for thinking through thermodynamic processes than an actual phenomenon that one encounters in everyday life. The human eye can detect objects at something like a millionth of the intensity of sunlight. So even something that is 99% black will, in direct sunlight, be reflecting enough light for it to be visible. Now, if there are other objects, they will be reflecting even more light, drowning out the light from a "black" object, but then the black object will be detectable by noting that there is a region of space with less light.
Another issue you seem a bit unclear on is that the term "black body" is generally used in the context of objects interacting through radiation. If you put a block of platinum on a table, the amount of heat exchange between the platinum and the table due to conduction will be orders of magnitude larger than the amount of heat that they are exchanging through radiation. Thus, standard black body analysis does not apply to that situation.
Comment: Nitpick: OP clearly treats "reflection" and "transmission" as separate, or he wouldn't be mentioning both. "Emmission" is yet **another** thing, which OP missed and you're grouping under transmission. For reference "absorption" = receive, "emmission" = send, "transmission" = pass through and "reflection" = return to sender.
Answer: Different visible wave lengths make sense of different colors in our brain.If there are no visible wavelengths, it makes sense of black. In respect of black body, it doesn't reflect any visible elecro-magnetic wave as you mention.So it's black and visible
Comment: Are you answering the original question? If so, it at best confusing because the burnt platinum is no black body, as the above answers already pointed out.

Why is a black body visible?


Charge Apple computers bought in USA to use in Europe

Question: I bought an Apple MacBook in the US and would like to use it in Italy. On the cable, it says: 2.5A 125V. What are the possible solutions to charge my computer? Use an adapter, a plug converter or an electric transformer? Someone can explain to me in details? In Italy, the voltage is around 220V, does it damage my pc if I use only a plug adapter?
Comment: All mobile computers (as far as I can tell) for years have been capable of both world voltages since they are designed for travel. Same goes for phone chargers and battery chargers generally. Electrical devices which may not be dual voltage are hair driers and some electric shavers. I work in a backpacker hostel and whenever a circuit breaker goes it invariably turns out to be a travellers hair drier from a 110 volt country in our 240 volt socket.
Answer: Apple makes their power adapters (cables) so that they will work worldwide (100-240V 50-60Hz) which means that you only need an adapter (plug) and not a converter. Apple sells a kit with the interchangable plugs for each country, but this isn't necessary and you can use any standard adapter.
Have another another look at the power adapter from Apple. Are you sure it only says 125V? If in fact it does not support 220V, then you'll need a converter. Buying a general purpose converter is difficult because it must be suitable for the type of appliance and they can be bulky and heavy. I'd recommend buying another power adapter from Apple that does support 220V (e.g. 100-240V 50-60Hz) which can be used worldwide.
Comment: The PC I bought does include the power adapter that you linked to: http://store.apple.com/us/product/MC556LL/B. There is a cable that connects to this power adapter. As I can read from the cable, it says: "Designed by Apple in California. 01 622-0168 2.5A 125V" if I understand correctly, it does not support 220V. This means that the cable that connects to this power adapter must be changed? Or I can just plug this cable to a normal adapter and it should be fine?
Comment: Most electronic equipment these days is designed to function in the 110-220 V and has autosensing to switch between the two. The plug might be rated for the territory it was bought in, but the equipment itself should work elsewhere. Check any manuals or documentation.
Comment: Most menans - not Apple ( which can sell you tho differents adapters for each system or charge for battery replacement etc. )
Comment: Probably the *cord* says 125V.  Apple power adapters are designed to have the cords swapped out.  My experience (last week I charged my Air in five different countries!) is that the adapter works fine but gets hot quickly in 220V countries.


"Did" vs "was" sentence example

Question: Can I use "when did this bridge build" instead of "when this bridge was built" (I think simple past tense is not possible without passive form)
Answer:
Can I use "when did this bridge build" instead of "when this bridge was built"?

No, "when did this bridge build" is neither grammatical nor idiomatic. And the other version, "when this bridge was built", is not syntactically correct if it is meant to be a question.
If you are asking someone for the date when something was built, you say something like this:

When was this bridge built? When did they build this house? When was the Great Wall of China built?

You can use your second version like this:

It was in 1991 when this bridge was built. When this bridge was built, I was sixteen.

I am not sure what you mean by

I think simple past tense is not possible without passive form

This is fine: The Harper government built this bridge in 2008.
The passive construction would be this: This bridge was built by the Harper government in 2008.
Comment: @ManishkumarKumar I don't understand what you are trying to say or ask by your comment.
Answer: It's not about past tense, it's whether the verb can be used intransitively.
I'm trying to find a clear rule for when "build" can be intransitive, and I'm not sure I can explain where the cutoff is.
Tension builds, excitement builds, ocean waves build: these are idiomatic to the point of cliché.
Can a pile of rocks build? Wow, that pile is building, it's taller every day. When did it build to that height? I would consider it pedantry to say, "It's not building, someone is building it".
But bridges and buildings don't build; they get built. Why can a pile of rocks build when a building can't? Somehow when a thing takes a complex form, rather than just amassing substance, we don't use "build" intransitively. We need an agent.

"Did" vs "was" sentence example


Connection pooling in the MySQL .NET Connector

Question: I'm creating a website in asp.net and mysql, I noticed that the performance of connection pooling in the mysql .net connector is horrible to say the least! For example sql server is 10x times faster in connection pooling (the sql server .net provider connecting to sql server), is there anything I could do to speed up connection pooling? Does the mysql .net connector make any checks when the connection is returned to the pool which cause the slowdown?
Thanks
Answer: Make sure that you are using the latest version of MySQL .Net Connector. The current version is 5.2.5.
Also, the Connection String has a property Connection Lifetime (default value 0). You can try changing that value. More information can be found here and here


Entropy of universe for non spontaneous processes

Question: When spontaneous processes are accompanied with an increase in entropy of universe and remains unchanged in a reversible process, what happens to entropy when one process is non spontaneous? Would entropy decrease??
Comment: Yes. Don't take the second law to mean that these non-spontaneous reactions can *never* happen. They *can* happen. They are just statistically speaking extremely *unlikely* to happen.
Comment: What are you referring to when you use the term "non-spontaneous?"  Please define this term so that we are all on the same page.
Comment: @chester miller, this is a question from Brown's Chemistry The central science 13th ed. Page 827. The question is just as simple as that. And the answer is no.
Comment: @orthocresol  Please see my comment on Costa's answer, below.  And just to paint a picture of how large 10^(2 x 10^23) is, consider that there are estimated to be ~10^80 atoms in the observable universe.  If there were one of our universes for every atom, then the total number of atoms in those 10^80 universes would be "only" 10^160.  Now suppose you do it again, where each atom represents 10^80 universes. Then you've only made it to 10^240 atoms.  You would have to repeat this process (of expanding atoms into universes) 8.2 x 10^20 times before you would reach 10^(2 x 10^23) atoms!
Answer: Yes. That is why non-spontaneous reactions do not occur unless you provide some artificial interference. If you were to cause a non-spontaneous reaction to occur in this way, in that single reaction, entropy would decrease.
However, in doing so, the entropy of the universe will still increase or stay the same BECAUSE, in the process of creating such an artificial interference, entropy is created.
For example, if you add energy for a reaction to occur, the energy must be obtained from... well, a non-spontaneous process, where an increase in entropy occurs.
Or more simplistically, if your room is very messy (high entropy), and you clean your room (lower entropy), it may seem like the entropy has just decreased. Actually, the entropy has still increased because in order to clean your room, you do work, which involves multiple other increases in entropy: digesting food which came from a food-processing plant, which was driven to this plant by a truck that adds entropy by burning gasoline, and so on.
Answer: Start by remembering that when we say that a process is spontaneous we mean under certain conditions e.g. at room temperature. The reverse of spontaneous processes are non-spontaneous processes. Non-spontaneous processes do not occur naturally according to classical thermodynamics and it is statistically extremely improbable that they will occur naturally according to Boltzmann thermodynamics.
But non-spontaneous processes can be forced to occur with the continuous expenditure of energy. For example, the expansion of a gas in a piston can be reversed using a heavy weight on the piston. A chemical example of a non-spontaneous process is provided by the electrolysis of water.  In both these cases, the values of the thermodynamic parameters for the non-spontaneous process are equal to those for the spontaneous process but of opposite sign. However, this ignores the source of the consequence of using the energy we use to bring these processes about. As Frank put it (above), 'the process of creating such an artificial interference, entropy is created'. For example, in the electrolysis of water, the entropy change of the H2/O2/H2O system is negative, but because the use of electricity causes the water being electrolysed to warm up, this involves thermal enerfgy transfer to its surroundings, causing a positive entropy change and  the overall entropy of the universe increases. Spontaneous or non-spontaneous, the entropy of the universe always increases.


How to make these type of graph

Question:
How to make this style and which software
Answer: The lower pattern is an artistic creation. It presents nothing measurable because there's shown no connections to any measurement system. We have your word "graph" but I ignore it as long as no numeric nor qualitative measures appear.
The upper one is made to resemble some management or technical thing presentation, but I'm sure it's finally constructed in the same way as the lower one. That's "Draw one rectangular block which is designed so that tiling it creates a repeating pattern with no seams.Then use it as a plane filling pattern". The same method can be used to make other seamless plane filling patterns which divide the plane to equal rectangles (there are infinitely other, mathematically more complex plane filling ideas which cannot be constructed in this way).
This is my attempt to make something which loosely looks the same as your lower image. It's not exact. A better replica could be made by drawing on your image, but hopefully you get the idea. This can be done in Illustrator, Inkscape, Affinity Designer or any other vector drawing or 2D CAD program. I made it in Illustrator.

A) draw a 2 node Bezier curve where the endings are horizontal
B) make a 180 degrees rotated copy, move it downwards and complete to closed shape with 2 exactly vertical line segments.
C) insert a rectangle which meet the curve exactly in the corners and only there.
D) draw the red shape which meets exactly the top and left edges of the rectangle. Make a 180 degrees rotated (green) copy and place it as mirrored against the bottom and right edges.
E) Remove the strokes and give solid fill colors. The rectangle is orange here and the rest shapes are grey.
F) Group the pieces to keep them easily together. Create horizontally, vertically and horizontally+vertically flipped copies.
G) move the groups together so that the edges snap exactly. This shape can be tiled manually or it can be used in vector drawing prograns a plane are filling pattern. In illustrator one simply drags version G to the fill swatches collection.
In the next image the new "fill pattern" is used to fill a rectangle and an irregular shape:

Illustrator is handy because it allows adjusting the pattern size even afterwards without changing the size nor the geometric form of the filled shape.
Drawing this without any obstacles happens only after one has trained properly the basic usage of the drawing program including the Bezier curves, node editing and using snapping and alignment operations to place items exactly.
To stay in truth one can also do the same in raster image drawing programs. Another  good thing to know is that many programs have "mirror drawing modes" which may help the basic construction. I have not used them.

How to make these type of graph


How does the potential difference between two points in an electric field be the work done?

Question: I was learning about electric potential and it was pointed out by my professor that the potential we calculate between two points is the potential difference and not the absolute potential; if potential is defined as the work done per unit charge or test charge,  how does the work done to move it from point b to a (assuming that it took some work to bring the charge to b, against the electric field) give the potential difference and not the potential?
Answer: Electric potential is defined as potential energy per unit charge(i.e how much work is done to move a unit positive charge from infinity to the particular point in electric field).
Now , imagine there are two points
$a$ and $b$ . These two points are seperate from each other , so obviously there must be the difference between the electric potential of these two points.
Let point $a$ be the point of high potential and point $b$ be the point of low potential. If a charge is moved from $a$ to $b$ , there must be change in its potential energy (because electric potential is the potential energy of unit positive charge).
We know that change in energy is equal to work done ($∆E= W.D$)
electric potential is also the potential energy of unit positive charge , so change in electric potential must be equal to work done on unit positive charge.
Hope this helps
Comment: Actually change in energy is equal to work done. The equation should be $∆E = F_c \cdot d$ (where $F_c$ is the force by which work is done)
Comment: @DebanjanBiswas yes, the work must be done by some external agent that's why it's called potential difference, because the workdone by the charge alone has no use. And yes negative of work done by a conservative force is what we call potential difference. Both the things holds true.
Answer:
I was learning about electric potential and it was pointed out by my professor that the potential we calculate between two points is the potential difference and not the absolute potential

It's correct. Absolute potential is defined as the amount of work that needs to be done to bring a positive charge to its current location from a point of infinite distance. On the other hand potential difference is defined as if a positive charge is taken from a point to another point in an electric field then the difference of the electric potential between the two points is called the potential difference.
Let's understand it with an example. Suppose there are two points $a$ and $b$ in an electric field. A positive charge is taken from point $a$ to point $b$ against the electric field. Then we can say that some amount of work is done. Let's assume the work is $W$ and the charge is $q$. Then the electric potential, $V = \frac {W}{q}$
Suppose the electric potential of point $a$ was $V_a$ and the electric potential of $b$ is $V_b$ then the electric potential difference, $V_{ba} = V_b - V_a = V = \frac {W}{q}$ (Note that $b$ has higher electric potential than $a$)
Hope this helps.
Answer: Answer is simple. Because we measure it from infinity, it's also the potential difference I agree, but we take an assumption there that the potential at the infinity might be zero.
So while calculating for $V_r-V_∞$ we put $V_∞=0$ so that's how we only get the value for $V_r$. However, it's not necessary to have zero potential at the infinity, it can be anything. The thing that matters the most is potential difference not the potential.
Answer: . . . . if potential is defined as the work done per unit charge or test charge . . . .
It is not as this definition is incomplete and is the reason for you asking your question.
It can be defined as,
the potential at a point is the work done in taking unit positive charge from a (defined) position of zero potential to the point.
The defined position of zero potential does not have to be infinity as it could be the negative terminal of a voltage source, a plate of a capacitor, the surface of the Earth, . . . . .
Comment: https://physics.stackexchange.com/questions/674743/why-is-it-convenient-to-define-zero-electric-potential-at-infinity — it's important to mention infinite distance in the definition of absolute potential
Answer: Work done against the field in moving a unit charge from a to b : $$\int_{a}^{b} -\vec{E} \cdot \vec{dr}$$
From the fundamental theorem of line integrals
$$V(b)-V(a) = \int_{a}^{b} \nabla V \cdot \vec{dr}$$
Because $-\vec{E}$ Is conservative, we know that this can be written as the gradient of some scalar function, $$-\vec{E} =  \nabla V$$
Substituting this into the fundamental theorem of line integrals
$$V(b)-V(a) = \int_{a}^{b} -\vec{E} \cdot \vec{dr}$$
Thus the potential difference of a and b is the work done per against the field in moving from a to b. This qauntity is independant of the path inbetween as the E field is Conservative
Now it is just a matter of finding the correct V to use, which can be done by the definition of E and V
Edit:
$$V(b)-V(a) = \int_{a}^{b} -\vec{E} \cdot \vec{dr}$$
The right hand side can be split up into 2 integrals
$V(b)-V(a)$= $$(\int_{ref}^{b} -\vec{E} \cdot \vec{dr})-( \int_{ref}^{a} -\vec{E} \cdot \vec{dr})$$
Thus it follows that:
$$V(r) = \int_{ref}^{r} -\vec{E} \cdot \vec{dr}$$
Here it can be shown that potential is non uniquely defined, there can be many references of potential, as the difference  between 2 potential functions is invariant. This is also indicative of the +c when directly solving for the potential. In most situations, the zero of potential is infinity, or the negative plate of a battery
Answer: Assume a test charge (unit positive charge) is placed at a distance of $r_b$ from a point charge having charge $+q$
Now this test charge is moved so that now it is at $r_a$ from the charge $q$
Force on test charge due to $q$ :
$$\vec{F}=q_{\text{t}} \vec{E} = k\frac{q}{r^2}$$
$q_t = \space \text{Charge on test charge = 1C}$
$r=\text{Distance of test charge from q}$
Since Electrostatic force is conservative, it has some potential energy associated with it.
$$W_{\text{Conservative Foce}}=-\Delta U$$
$$\vec{F}.\vec{dr}=-dU$$
$$k\frac{q}{r^2}dr=-dU$$
$$kq\int_b^a \frac{1}{r^2}dr=-\int_b^adU$$
$$kq\frac{1}{r_b} - kq\frac{1}{r_a}=U_b-U_a$$
$k\frac{q}{r_a}$ is potential (or work done in bringing test charge to that point) of position $a$ when charge is brought from infinity to $a$. Similarly for position $b$.
So,
$$\Delta U_{\text{b to a}} = V_a-V_b$$
$$-W_{\text{int. cons. force}}=W_{\text{ext}}=\Delta U = V_a-V_b$$
Above case applies when the test charge is brought very slowly (using external force) so that only potential energy changes and Kinetic energy remains $0$. In such case external force is equal to electrostatic force (internal conservative force) at all points of path.
Thus, $-W_\text{electrostatic force} = W_{\text{external}}$
Comment: I have corrected the errors in my answer ! Please reconsider your vote.


Samba group access permissions

Question: I have a file/media server running Samba, Plex and Transmission. However I am having a little trouble with the access permissions of my media folder. This folder needs to grant access to the 'david', 'plex' and the 'debian-transmission user. So I made a group called 'media_users' and added them to the group and added the appropriate permission to the media folder. Now I am unable to access the shared folder from my windows machine and plex does not have a access to the files.
Does someone have an idea what I did wrong?
david@server:/mnt/storagedata$ groupadd media_users
david@server:/mnt/storagedata$ sudo usermod -a -G media_users david
david@server:/mnt/storagedata$ sudo usermod -a -G media_users debian-transmission
david@server:/mnt/storagedata$ sudo usermod -a -G media_users plex

david@server:/mnt/storagedata$ sudo chown -R root:media_users media
david@server:/mnt/storagedata$ sudo chmod 770 -R media
david@server:/mnt/storagedata$ ls -l
drwx------ 10 david david       10 Jul 13 00:54 david
drwxrwx---  6 root  media_users  6 Feb 26 18:12 media

david@server:/mnt/storagedata$ sudo testparm

...SNIP...

[david]
        path = /mnt/storagedata/david
        force user = david
        read only = No

[media]
        path = /mnt/storagedata/media
        read only = No

Answer: Permissions are fixed by adding the group to the smb.conf file
valid users = @media_users

Answer: Samba has a group by default to allow sharing. To add a user to that group just type sudo gpasswd -a david sambashare. Logout and log back in for the changes to take affect. When you map the network drive in Windows you will need to provide the credentials (linux ones) for david. Your samba configuration might need a little tweaking. Here's mine for example:

[Chol]
    comment = Shares
    path = /home/chol
    browseable = yes
    read only = no
    public = yes
    guest ok = no
    valid users = chol
    create mask = 0777
    writeable = yes

Samba group access permissions


How to do a AudioUnitRender with a AudioUnitEffect?

Question: I am trying to do a AudioUnitRender with an audioUnit Effect in the callback of a AudioUnit Mixer but no luck.
My mixer goes into a RemoteIO unit and process AudioData (from a file) in its callback. Works just fine.
I then added a AudioUnit effect node (a Reverb) to my graph and linked it to a AudioUnit. My effect node is not connected to anything in the graph.
AudioComponentDescription auEffectDescription;
auEffectDescription.componentType           = kAudioUnitType_Effect;
auEffectDescription.componentSubType        = kAudioUnitSubType_Reverb2;
auEffectDescription.componentManufacturer   = kAudioUnitManufacturer_Apple;
auEffectDescription.componentFlags          = 0;
auEffectDescription.componentFlagsMask      = 0;

I am aware about the StreamFormat issues as described in the AudioGraph (zerokidz.com/audiograph) example and have set the StreamFormat of my Effect Unit as explained in AudioGraph.
So I know there is an issue of streamformat compatibility (see Bit-shifting audio samples from Float32 to SInt16 results in severe clipping). My ASBD:
[AudioUnitEffect]------------------------------
[AudioUnitEffect] Sample Rate:       44100
[AudioUnitEffect] Format ID:          lpcm
[AudioUnitEffect] Format Flags:         41
[AudioUnitEffect] Bytes per Packet:      4
[AudioUnitEffect] Frames per Packet:     1
[AudioUnitEffect] Bytes per Frame:       4
[AudioUnitEffect] Channels per Frame:    2
[AudioUnitEffect] Bits per Channel:     32
[AudioUnitEffect]------------------------------

[AudioUnitMixer]------------------------------
[AudioUnitMixer] Sample Rate:       44100
[AudioUnitMixer] Format ID:          lpcm
[AudioUnitMixer] Format Flags:       3116
[AudioUnitMixer] Bytes per Packet:      4
[AudioUnitMixer] Frames per Packet:     1
[AudioUnitMixer] Bytes per Frame:       4
[AudioUnitMixer] Channels per Frame:    2
[AudioUnitMixer] Bits per Channel:     32
[AudioUnitMixer]------------------------------

I have understood (correct me if I am wrong) that my effect is in Float32 while my Mixer uses the AudioUnitSampleType type (SInt32). I have tried various ways of converting the data buffers before and after calling the AudioUnitRender on the effect. I have tried to match the ASBD of my mixer to the AudioUnit Effect, it works but I get some horrible distortion (which would normal if the Effect uses Float32 type (between [-1,+1] I guess?).
The Apple doc says:
*Effect Units Stream format notes
On the input scope, manage stream formats as follows:
 - If the input is fed by an audio unit connection, it acquires its stream format from that connection.
 - If the input is fed by a render callback function, set your complete application stream format on the bus. Use the same stream format as used for the data provided by the callback. On the output scope, set the same full stream format that you used for the input.
*
Which I find is not that helpful..
Anyway there must a way to do a AudioRenderRender with Effect Unit. Has anyone succeded? Thanks.
André

My mixer callback :
static OSStatus mainMixerCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData)
{
SoundEngine* se = (SoundEngine*)inRefCon;

// init buffers with zeros
memset((Byte *)ioData->mBuffers[0].mData, 0, ioData->mBuffers[0].mDataByteSize);
memset((Byte *)ioData->mBuffers[1].mData, 0, ioData->mBuffers[1].mDataByteSize);

// Render the Audio Track (works fine)
AudioUnitRender((AudioUnit)se.auTrack,ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, ioData);

//  Effect (fails when there. Error:-50)
AudioUnitRender((AudioUnit)se.auEffect, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, ioData);
    return noErr;
}

Answer: You probably solved your problem by now, but just for the record: the buffer needs to have one channel, so you need to set up two AudioBuffers of one channel each instead of the 2 channel one you have now.
Comment: Thanks, I'll definitely check that.


What was the reason for Magneto's decision at the end?

Question: In X-Men: Apocalypse, why did Magneto betray Apocalypse? Magneto was very much grieving and angry and seemed very much on board with Apocalypse's plans. All I remember is that Mystique talked to Magneto and the next thing I know Magneto betrays Apocalypse.
Comment: https://marvel.fandom.com/wiki/En_Sabah_Nur_(Earth-TRN414)#Apocalypse states "Choking Mystique also led to Magneto and Storm turning on him, so he had to defend himself against both of them too. " but it's a fan-edited wiki.
Comment: Same question here with no answer: https://scifi.stackexchange.com/questions/156444/why-did-magneto-betray-apocalypse
Comment: @FuzzyBoots but why would magneto turn on apocalypse because of mystique?
Answer: I don't believe there is a canon explanation for it (although I'll admit that I haven't listened to the Director's Commentary), but as noted, some explanations online tie it to Mystique getting choked out, and Magneto's lines suggest this made him realize he was on the wrong side.

Apocalypse: You betray me?
Magneto: No. I betrayed them.

Magneto had allied with Apocalypse with the promise that he would make mutantkind safe by eliminating the human oppressors, but his actions in attacking Mystique, and continuing to choke her even when it's clear that she can't hurt him, makes Magneto realize that he would be trading one oppressor for another.
At the least, that's my interpretation of the scene.
Comment: eh sounds like a good interpretation in lieu of lack of explanation of a really weird or weirdly addressed plot hole. thanks FuzzyBoots


Bluetooth vulnerability on a Raspberry PI running Raspian

Question: Is it possible for someone to exploit a Raspberry PI running Raspian through bluetooth just by having the bluetooth enabled?
Answer: Everything can be vulnerable, and possibly exploited. Whether or not something is presently and publicly vulnerable, your guess/Google search ability is as good as mine.
If there was a current, widely known issue, most likely it would be already fixed or there would be an ongoing rush to fix it.


Is the following doubling and spacing of notes correct in four-part harmony?

Question: In a four-part chord, do the alto tenor and bass notes have to be closer to the soprano.
For example:
Would the F# minor chord (subdominant) be this

Or this
Comment: The conventional "rule" is that the intervals between soprano-alto and alto-tenor should be a maximum of an octave, but tenor-bass can be up to 2 octaves. Of course composers don't get sent to jail for ignoring such so-called "rules", but if you want good marks for your homework then follow them! (Also, don't write incomplete chords unless there is a reason to do so).
Comment: Neither of those look like F# Minor to me. What I think you're asking is if you are to prefer a higher option to a lower option when writing other parts. I'll have to do a little research on that. But please double check your chords... It might be "my bad..."
Comment: Aha! That's what was throwing me off. Your chord only has the third and fifth. I understand that it's best practice (and sounds more normal) to have your root (F#, in this case) as the soprano/bass part. The other notes fill in the middle. I don't know if this is always the case, but it is a general pattern that I notice. Definitely F# Minor, but incomplete, as alephzero said.
Comment: That, I think, is the subdominant chord *OF* F# minor, which would be the key. That makes it a B minor, which, in SATB, should have all three notes featured. There are four places to choose from, so all three can feature, and one will double up, as an octave copy. Then, you can get on with your homework...
Answer: OK.  We're talking about Bm, which is the subdominant chord OF F# minor?  Yes?
You have written just two notes, B and D.  These might imply a Bb chord in context, but until you add an F# it isan't actually a Bm chord.
If this is for SATB voices, your spacing is bad.  The rule is to keep upper parts close, if there must be a big gap put it between tenor and bass.
This rule may be broken of course.  In the context of a melody, harmonised in 3rds, doubled in male and female voices, this voicing might well occur (though I wouldn't stay in that register for too long).  Or, as another example, I've just arranged a version of 'O Holy Night' where a soprano soloist is accompanied by quite a large choir.  I've kept A, T and B rather lower than would be usual, making it easier for solo S to cut through.
Actually, these aren't about breaking a rule, they're about moving away from the 'Four independent voices aiming for a rich harmonic texture' context to which the rule applies.  Outside hymn tunes and harmony exercises, you might be surprised how often music ISN'T in this context.
Answer: The bass and the tenor voices are the only voices in standard four-part harmony that can have an interval of more than an octave. The rest of the voices can at most be an octave from each other.
You also do not want two notes doubled like that. For that chord, you have to have the fifth as well. You sometimes omit the fifth and write three root notes and a third but that is only if you are confronted with a problem you cannot see another solution for. The fifth gives the chord a much fuller sound than what is the case with just three root notes and a third.
You can have the B in the bass another B in the tenor voice an d in the alto and F-sharp in the Soprano' voice. Or you can go from bottom B, D sharp (A tenth above) F sharp and then B. Whatever you do you need one note doubled (The correct one), a third and a fifth.
Answer: It depends on the skill of the singers. If you want to be safe, go with the second.
Also, this isn't a subdom chord. It's (not a full chord) functioning as a vi. D F# A are the notes of the IV (Subdom) chord in the key of A. Unless your defining Subdom as a chord with the 4th degree of the scale but without the 7th. In that case, you just need to replace one of your doubled notes (preferably a D) an A or an F# to make it a ii7 or a ii chord.


How can I use GnuPG with ECDSA keys?

Question: I'd like to generate an ECDSA (rather than RSA, DSA, or ElGamal) key using GnuPG, and use it as I might otherwise use an OpenPGP-compatible master key. I've read that gpg2has support for ECDSA keys, but I haven't been able to use that functionality. What am I missing?
Comment: http://security.stackexchange.com/questions/34567/ecc-in-openpgp is related, no?
Answer: GnuPG 2.1.x does support ECC (including Ed25519); for more info (and examples), see https://www.gnupg.org/faq/whats-new-in-2.1.html#ecc.
FYI, you must add the --expert option to reveal the new options.
Answer: Neither GPG 1.4.x nor GPG 2.0.x currently support ECC or ECDSA keys.  Werner has been working on it for the highly developmental 2.1.x releases, but that's nowhere near ready for production use.  Elliptic Curve may be backported to the current stable releases in the future, but there is no timeframe on that.
Comment: This answer is out of date and should be updated or removed.
Comment: support for this is now in the `modern` branch. So this is *somewhat more near* stable. https://www.gnupg.org/download/

How can I use GnuPG with ECDSA keys?


How do I prompt a user to select an image on the iPhone?

Question: I would like to allow the user to select one of several pre-supplied images.  Is there a standard way to do this?
Answer: The only thing similar to this that is Standard would be the Image Picker control.
However for this to work you would have to add your images to the iPhone's image library and the user would have to pick them from out of all their other pictures.
What you need to do is build something similar.
You can go as easy or complex as you need/want.
I would go simple (as that is the idea of the iPhone) and have a scroll view (depending on the number of pictures you want) and load thumbnails of the images. When they select one, you do something with it. (Look at the view when you are looking in a photo album on the iphone)
I believe I have seen open-source representations of this before.
I would check google code.
Answer: I use a UITableView for this, with a thumbnail and description of the image they're choosing.


Can an analogue voltage be used in place of a PWM signal?

Question: I am having problems with a Ford Ranger not starting. I believe the problem lies within the FMV (Fuel Metering Valve or 'SCV'). As the car is out in the middle of nowhere, I was wondering if I can connect a 3V analogue signal to it and have it operate correctly, as it is only just a solenoid, to see if the car runs. My understanding is the PWM signal just digitally 'flicks' the solenoid on and off @ 351hz - 1.05v to 5.4v, keeping it in a steady position. So would an analogue signal at a steady 3v using a transformer keep it in the same position?
Comment: I would highly suggest against this. As a relatively skilled shade tree mechanic myself, I would *highly recommend* you investigate literally anything else before you start applying external voltage sources to your car. Depending on where you're applying voltage, you might actually be putting power on the CAN bus. CAN is active low, so the devices on that bus try to signal by shorting the signal line. If you're putting more power on that bus than you should, you run the risk of frying **every sensor** in your car.
Comment: If you're insistent on asking the question here, then please post the part number and wiring diagram for the component in question. Some devices do just just filter the PWM signal to approximate an analog signal, but some others (servos specifically) use PWM within a time window as a signal. The output on a multimeter may appear as an analog voltage, but an analog voltage isn't an acceptable substitute. If you don't have the interface spec to the sensor then again I would highly recommend against proceeding because of the potential to total your car if you screw this up.
Comment: @Hypomania - I don't know what kind of voltage source OP has that would provide the signal, but if they're intending on driving an actuator (the valve itself) but instead connect it to the signal bus, the potential exists to provide enough current from the voltage source to damage any component that tries to pull the bus low. All devices will attempt to do this. Maybe OP gets "lucky," all the sensors are slaves, and so they don't report until polled by the ECU, which fries itself on the first bit, so none of the other sensors ever try to pull the bus low.
Comment: I have more than a passing familiarity with the CAN bus, but it's been a long time since I've done any CAN development. My point is more that everything on the CAN bus is connected and the possibility exists to (nearly) simultaneously blow up every sensor on the car. If OP isn't positive they know what they're doing then I would suggest they abandon the project altogether because of the monetary risk. I also sincerely believe there's no failure of a PWM signal making it to the valve, so it's a lot of risk for a probably misguided workaround. If the signal is missing, fix that problem first.
Comment: @Chuck I totally agree with you, I responded under the presumption that there is only a solenoid that's being energized and nothing else.
Comment: are you sure that the valve runs on 3V? .... i would expect it to run from 12V since that is the voltage in the truck's electrical system
Comment: We can give you general information on the operation of robotic components here, but specific automotive advice would be better off on [mechanics.se], if you would like us to migrate it for you.
Comment: @Chuck, CAN bus is a differential bus with quite high voltage and and current tolerances, not to mention CAN transceivers are extremely immune to high power noise. I doubt 3V DC would damage the CAN bus. I develop CAN based systems and 3V noise is absolutely nothing for a car's CAN bus.
Answer: No, that's not how solenoids work. Positional control is not about average power, it's about specific, timed impulses which result in continuous control.
Solenoids only really have open, closed or travelling between. Either your supply enough power to open the valve and it opens, or you don't and it stays closed (or vice versa, depending on whether it's normally closed or normally open).
Solenoids are usually set up so that their time constant allows enough time for the valve to fully open or close in one PWM cycle, thus a 50% PWM will result in the valve opening for 50% of the time and closing for 50%, resulting in an average of the valve being 50% 'open'. It's not quite that simple of course, bit that gives the basic idea.
Comment: @Shibalicious - OP didn't say "positional control" exactly, but the question is with regard to a fuel metering valve, which would imply some degree of positioning capacity. As I hope is clear from the commentary and disparate answers here, the general response should be "maybe, but it depends on the part." OP hasn't posted specific data sheets, application notes, interface specs, etc., and frankly I don't think they will because the automotive stuff is generally not openly documented.
Comment: The OP didn't mention it being a positional control solenoid. A normal solenoid can be compared to a switch with ON / OFF states, I don't see why DC signal would cause different behaviour.
Answer: I would say yes. It's the total power delivered you are looking at, hence 3V of continuous DC voltage should do the same thing as 3V of PWM signal (assuming the current drawn is the same).
On the other hand if it was digital signal processing you were looking at, it wouldn't be the same as PWM is a switching signal, switching between min V and max V, whereas normal DC signal is completely continuous (does not have discrete parts). That would mean if you were trying to read PWM signal and treat it as analogue you wouldn't get the same behaviour or readings.
EDIT: See Mark's answer instead, you have to be COMPLETELY SURE that nothing else connects to the power line apart from the solenoid itself.
Comment: This is **very dangerous advice**, as Chuck suggested, it could end up frying every sensor in the car!
Comment: @MarkBooth, it's just a solenoid, the OP didn't mention it connecting to anything else, AFAIK solenoids operate in only OPEN / CLOSED states. Please let correct me if I am wrong.
Comment: @MarkBooth if you provide me with a solid reason why my answer is incorrect I will accept it and edit the wrong bit out, thank you.
Comment: See Chucks comments on the question itself, if this is a CAN bus attached device, interfering with it could have serious consequences.
Comment: @MarkBooth I see where you are coming from, your answer is more applicable to the question in such case.
Answer: I'm guessing no or it would use DC from the start. It could overheat with constant DC current.
Comment: PWM is DC. With a teensy amount of capacitance in line (even maybe just the wiring), it'll be basically constant-current 3v DC.
Comment: Welcome to *Robotics* user22110. Thanks for your answer but we are looking for comprehensive answers that provide some explanation and context. Very short answers cannot do this, so please edit your answer to explain why it is right, ideally with citations. Answers that don't include explanations may be removed.


SVG Image in UI

Question: I'm using Vector Graphics for my SVG Images,
though when I try to use it as a UI image (for a button)
The image doesn't look as I expect, unless I use a Sprite Renderer.
But unfortunately I can't do that because I need it to be a canvas button.
In the image below:
Left: SVG Image
Right: Sprite Renderer.
Comment: So your question is: How to make an SVG Image react to clicks on a canvas?
Answer: Are you using a Gradient SVG?
(I'm not very familar with SVG, so I'm not sure. But it looks like you are using a Gradient SVG.)
I'm using a Gradient SVG, and the solution here solves my problem.

For a Gradient SVG Image you will need to create a "Gradient" material which has the "Unlit/GradientVector" shader assigned. You can then assign the material to the SVG Image component. You will also have to change the Canvas "Additional Shader Channel" to include "TextCoord2" otherwise the UI system will ignore that data.

It is mainly 2 steps:

Create a Gradient Material and assign it to Component<SVG Image>.
(In url above, the Gradient material shader is "Unlit/GradientVector". The post is in 2018, as time past, the shader is a bit different now. I'm using Unity2020.3 today, the shader is "Unlit/VectorGradientUI".)
Change the Canvas "Additional Shader Channel" to include "TextCoord2".

SVG Image in UI


TypeSafe Activator installation error

Question: I'm having a problem installing Typesafe Activator. I downloaded the latest version from their website, extracted it and then opened activator.bat, it starts the webserver and the keeps spamming an error until it crashes:

It's very weird because it worked before, but I kind of 'deinstalled' it by deleting all my Activator files (inlcuding the .activator directory in C:\Users\wouter). Now I downloaded it again and I keep getting this error, I tried fixing it by deleting the .activator directory but that doesn't work. Maybe there are still files hided from my previous installation.
It is very frustrating since I can't find any similar issues on the internet and just reinstalling does not work...
I hope you guys can help me out!!
Answer: I did exactly the same thing, and here is how I fixed it:
In my username directory (Windows 7 x64) there was a folder named ".sbt". In there was a folder named "boot".
In there were a handful of scala folders, each folder a different version.
I deleted all of them except the latest scala version folder (scala-2.11.1).
Once I did that, Activator booted up successfully (right click on the Activator.bat file).
Comment: This workaround worked for me again today, upgrading from Activator 1.2.11 to 1.2.12.

TypeSafe Activator installation error


Does this manga mentioned in Outbreak Company actually exist?

Question: The show makes many references to existing works, so I'm hoping it's also the case here.  It's mentioned in Episode 2, around 21:30 mark.  I grabbed two relevant screenshots.
The audio is as follows:
"That manga...  It's about a slave girl who's taken in as the Overlord's daughter and falls in love with him... She faces hardship after hardship, and when she and the Overlord finally come to understand each other..."
Answer: According to the Outbreak Company TV Tropes page it's Bastard!!, a still ongoing monthly manga series which started in 1987.


Is there a high-level overview of Cosmology and Prehistory?

Question: Based on The Voice of an Angel and other tales, e.g. Atlantis, Father Wolf, has anyone tried to put together a very high level historical summary for the World of Darkness? Obviously a lot of this stuff is shrouded in myth, but i'm just looking for a  high level overview. It would be amusing of course if such a thing treated certain things as controversy, such as "is the city from Voice of an Angel Atlantis".
Answer: There is a basic and incomplete timeline on the White Wolf wiki. This isn't an easy task, as the new World of Darkness deliberately obfuscates history and refuses to give specific answers to questions in order to allow individual campaigns to provide their own spin.
Compare the old World of Darkness, where we know a great deal of detail thanks to the heavier focus on ongoing "metaplot."
Comment: but if we assume that the few details we've gotten are fact, or are some fractured view of it, then you can kind of start piecing the mirror together. I don't ever expect or want the metaplot. But it might be nice to have a view of it that's similar to what we have of some religions. Basically we conjecture much about our own history based on ancient artifacts, we could do the same for WoD whilst documenting the conflict. (some people think the earth is 6000 years old, and the God-Machine was made by the Soviets)


How do compilers understand recursion?

Question: I've delt with recursion when programming in c and python and I'm guessing it's used in many other languages as well, but how does a compiler actually interpret a recursion function? How can it use the function in it's own definition?
Comment: To the contrary, I think many compilers don't "know" anything about recursion.  That a function happens to keep calling itself is mainly in your eyes only.
Comment: The same way you can use any other function.
Answer:
but how does a compiler actually interpret a recursion function? How can it use the function in it's own definition?

To understand this you just need to under stand how a compiler interpret a function. For C, the function is just a symbol, or a pointer pointing to the entry address in memory. Intuitively but not strictly, the function call would be compile to such assemble instruction:
<code>CALL address_of_function
</code>
See? The compiler does not need to know whether the function is recursive or not. It just make CPU jump to the address of function entry and keep on executing instructions.
And that's why we can use that function even if its definition is not finished. The compiler just need to know a start address, or a symbol, and then it would know where to jump. The body of the function could be generated later.
However, you might want to know the Tail Recursion, that is a special case commonly in functional programming languages. The "tail recursion" means the recursive function call is the last statement in function definition. As @paulsm4 mentioned, when calling a function, the compiler need to push context and parameters into stack, and then recover the context and get return values from it. Thus, if your function calls itself and then itself ..., the stack would be too deep until the memory runs out. But if the function call is the last statement in function definition, then there would be no necessary to save context in the stack, and we can just overwrite it. Thus, the stack would not overflow even if the function calls itself infinitely.
Answer: It's entirely compiler-dependent ... but most compilers in most languages implement recursion by using the stack.
The compiler generates the code that pushes the program arguments, saves the current stack and frame pointers, then simply calls the same function (with the newly updated stack).
Here is a very good article: Understanding the stack
Comment: Actually, that's at runtime, not in the compiler.
Comment: Kudos - you're being both overly pedantic *AND* incorrect.  It's the *compiler* that determines the calls that will be executed at runtime.  And, more to the point, i's the *compiler* (or interpreter) that determines exactly how a "function call" is to be implemented.
Comment: I qualified the answer.  BTW, your reply "The same way you can use any other function" is both technically correct ... and utterly useless an an "explanation"....
Comment: No; I mean the stack exists at runtime.

How do compilers understand recursion?


How does zed Q damage calculation work?

Question: If i have a shadow on the ground and i throw a shuriken at an enemy champion, if the first shuriken passes through minnions (thus its damage is reduced) does the second shuriken deal 50% of the reduced damage or 50% of the original damage?
Answer: Taken from the wiki:

ACTIVE: Zed throws his spinning blades forward, dealing physical damage to the first enemy they pass through and 60% damage to enemies thereafter.
  「 PHYSICAL DAMAGE: 75 / 115 / 155 / 195 / 235 (+ 100% Bonus AD) 」
  LIVING SHADOW: Active shadows also throw a shuriken in the direction of the target point. Additional shuriken striking the same enemy deal 50% damage and restore energy.
  「 ADDITIONAL DAMAGE: 37.5 / 57.5 / 77.5 / 97.5 / 117.5 (+ 50% Bonus AD) 」

Because of:
Additional shuriken striking the same enemy deal 50% damage and restore energy.

It will deal the full damage if the shuriken hits a champion. However if it's hitting the same target, there is a damage reduction. Which is reduced later by enemy resistances.
EX. ( (100 * 0.5)*enemy resistance)
NOTE:
A shadow's shuriken will deal the full damage if hits a target before Zed's. In those cases, Zed's shuriken is the one that deals 50% damage.

SOURCE: http://leagueoflegends.wikia.com/wiki/Zed
Also Zed Main since his launch.
Answer: The shuriken will do 50% of the original damage on the Q - enemy damage reduction

How does zed Q damage calculation work?


On docker volume restore: could not access file "$libdir/timescaledb-1.6.0": No such file or directory

Question: I am trying to restore TimescaleDB data from one ubuntu machine to another ubuntu machine. On the both machines we have deployed TimescaleDB through docker and using the same tag.
Docker image used: timescale/timescaledb:latest-pg11
I am creating a tar file for backup for the docker volume on the old machine, using below command:
docker run --rm -v $VOLUME_NAME:/volume -v /tmp:/backup busybox tar cvf /backup/$VOLUME_NAME.tar -C /volume ./

Also I am restoring using below command on the new machine:
docker run --rm -v $VOLUME_NAME:/volume -v $(pwd):/backup busybox sh -c "rm -rf /volume/* ; tar -C /volume/ -xvf /backup/$VOLUME_BACKUP_FILE"

Database restore was successful but when I see the docker logs I am getting below error:
2021-03-06 06:28:55.064 UTC [239] ERROR:  could not access file "$libdir/timescaledb-1.6.0": No such file or directory
2021-03-06 06:28:55.064 UTC [239] STATEMENT:  CREATE TABLE "__migration_lock" ("id" int NOT NULL, CONSTRAINT "PK_1312144c987e032cce38cfa00a2" PRIMARY KEY ("id"))

Do you know why this error is coming and how to resolve it?
Thanks
Answer: Docker images tagged with latest contain the latest release at the time you retrieve it (this is Docker's convention), thus the image in the source contains different TimescaleDB's version (1.6.0) than in the current latest image (2.1.0 is latest now). This leads into the error of missing binary, since the images are not the same and the current latest image doesn't contain 1.6.0, which was latest some time ago.
The easiest solution is to download the image with the same TimescaleDB version as in the source. I believe timescale/timescaledb:1.6.0-pg11 should work in your case.
You can double check, which TimescaleDB's version is in use, by calling \dx in each database.
Note that a TimescaleDB's image usually contains 5 older versions before the tagged one. So if you use image tagged 1.7.3-pg11 it is likely to work too, since it expected to contain binaries for 1.6.0-pg11. This is important to know if you are going to update TimescaleDB version from 1.6.0 to later, since you will need to use several images to get to the current latest version.
In general to avoid confusion it is better to use an image with specific version tag.
Comment: Thanks @k_rus so far I tried this. It is working.
Answer: After you've done the restoration on the same version of TimescaleDB as the one on which you created the backup, here's how you can update your TimescaleDB extension in Docker.
First ensure you've got the latest Docker image installed:
docker pull timescale/timescaledb:latest-pg11

Start the container as you've done before.
Connect to the running Docker container and start psql immediately:
docker exec -it <container> psql -X -U postgres

Connect to the database you want to update (e.g. for a DB called mydb) to update its TimescaleDB extension:
postgres=# \c mydb
You are now connected to database "mydb" as user "postgres".

Update the extension:
mydb=# ALTER EXTENSION timescaledb UPDATE;
ALTER EXTENSION

Check the version now!
mydb=# SELECT default_version, installed_version FROM pg_available_extensions where name = 'timescaledb';
 default_version | installed_version
-----------------+-------------------
 2.3.0           | 2.3.0
(1 row)


django formset and and initial data

Question: I have a simple model and a simple form. The form looks like this:
class AddForm(forms.Form):
    quantity = forms.IntegerField(label='', widget=forms.TextInput(attrs={'size':'2'}))
    product_id = forms.IntegerField(widget=forms.HiddenInput)

In my template there's a object_list containing all the model-objects.
What I want is: next to each model-object a form to enter the "quantity". The "product_id"-field has to have the id of each model as initial data.
I guess I have to use Formsets for this, but I don't understand how to set the initial data from database-data and how to make Formsets display a form for each model-object.
Thanks in advance
Jacques
Answer: As the form you want to add is so simple, it's easier just to add the product id in the template with something like
<input type="hidden" name="product_id" value="{{ object.id }}" />

rather than adding complicated formsets.

django formset and and initial data


Sequence of subharmonic functions on shrinking domains

Question: Set $G_\eta:=\{(x,y)\in \mathbb{R}^2|-\eta<x<\eta, 0<y<1\}$. If $u_\eta\geq 0$ is a sequence of subharmonic functions defined on $G_\eta$ such that
$$
\int_{G_\eta}|u_\eta|^2dx\wedge dy\leq C\eta,
$$
where $C$ is some constant, then can we show that $u_\eta$ is uniformly bounded on the line $0\times [\frac{1}{3},\frac{2}{3}]\subset \mathbb{R}^2$?
Answer: This is incorrect as stated: it just does not scale correctly. Let $v(z)$ be the harmonic function on the unit square $|x|<1,|y|<1,$ which is zero on the vertical sides and $1$ on the horizontal sides. Then we define the subharmonic function $u$ in your rectangle by setting $u(z)=v(z/\eta)$ when $|x|<\eta,\; |y|<\eta$ and zero otherwise.
Then $u(0)=v(0)$ is a positive constant, while $\| u\|_2=\| v\|_2\eta$, so
$$\int_{G_\eta}u^2\approx c\eta^2.$$
This example suggests the correct inequality:
$$u(x)\leq C\| u\|_2/\eta,$$
with an absolute constant $C$.
This is a simple consequence of the average property of subharmonic functions. Let $x$ be a point on your interval $(1/3,3/2)$. Let $B$ be the disk of radius $\eta$ centered at $x$. Then the average property says that
$$u(x)\leq \int_B u\; dm/(\pi\eta^2),$$
where $dm$ is the Lebesgue area element and $\pi\eta^2$ is the area of the disk.
Applying the Schwarz (Cauchy-Bunyakovski-...) inequality, we obtain
$$\left(\int_B u\; dm\right)^2\leq\pi\eta^2\int_Bu^2dm\leq\pi\eta^2\| u\|_2^2,$$
so
$$\int_Bu\; dm\leq\sqrt{\pi}\eta\| u\|_2,$$ and
combining with the first inequality we obtain the result with constant $\sqrt{\pi}$.
Comment: This doesn't work since the $L^2$ norm of $u$ is bounded by $\sqrt{\eta}$ not $\eta$.
Comment: @foliations: I edited. It is of course incorrect as stated.
Answer: No. A counterexample is (essentially) given by
$$
u(z) = -\log |z+i\delta|, \quad\quad z=x+iy, y\ge 0 .
$$
This function is harmonic and positive near $z=0$, and $|u(x+iy)|\le |u(x)|\in L^2(-1/2,1/2)$, so
$$
\int_{-1/2}^{1/2} dx\int_0^{2\eta} dy\, u^2 \lesssim \eta ,
$$
as required. However, $|u(i\eta)|$ is not bounded as $\delta,\eta\to 0+$.
By rotating and (slightly) rescaling this, we obtain a counterexample in your setting.
Comment: An easy way to see that his inequality cannot be correct is just by scaling: if you multiply all his functions on constants, sup norms multiply on the same constants, but the integral of the square on the square of the constant.
Comment: @AlexandreEremenko: Yes, but I think what I do is natural, too: solve the Dirchlet problem on a thin rectangle with a boundary value that is large only on a small portion of the boundary and check if the area average of $u^2$ can stay bounded.
Comment: Sure. BTW the description in your comment better describes the example in my answer:-)
Comment: @AlexandreEremenko: Well, I tried it with a Poisson kernel first (which fits my description better), but that's too singular after squaring, so switched to a logarithm then... :)
Comment: thanks a lot for all of your answers. I know the point in this question.