What do you call a ship that's not in water and therefore cannot be mobilized?

Question: What do you call a ship that's not in water and therefore cannot be mobilized? For example, if a ship is under repair at a port and is on land, what adjective do you use? I thought about landlocked, but I am not sure if it can be used this way. I usually see it used to describe countries without access to the sea, and while it may be used to describe ships, they probably refer to decommissioned ships.
Answer: A ship that has been removed from the water for repair is in dry dock.
https://www.merriam-webster.com/dictionary/dry-dock
To my knowledge, it is not at all common to say that a ship is "landlocked," whether it has been decommissioned or not; as you have noted, "landlocked" commonly describes countries (or states, or what have you) that lack access to the sea. It can also mean "confined to fresh water by some barrier" (as in "landlocked salmon") or "living or located away from the ocean" (as in "a landlocked sailor"), but it would be unusual to use it to describe a ship that has been removed from the water for repair.
https://www.merriam-webster.com/dictionary/landlocked
Comment: A ship could be *landlocked* if it was moored on an inland sea that drained or evaporated away (see https://en.wikipedia.org/wiki/Aral_Sea) but that would be a very specific usage. It could also be 'beached' if pulled out of the sea and up the beach (think smaller boats here).
Answer: If you're asking for a word meaning the ship is not currently on water, perhaps "Ashore" or "Onshore" will do?
https://www.macmillandictionary.com/dictionary/british/ashore#ashore__4
https://www.macmillandictionary.com/dictionary/british/onshore#onshore__1

Onshore / Ashore: on land, and not on the sea


Any way to play an .mkv file in the browser?

Question: Im building an admin interface for a site, and it would be a great benefit if I could play mkv files in the browser, instead of downloading and then playing them. This doesn't have to be a mainstream technology, since only 3 people will be using the interface.
Answer: VLC Media Player can install a plugin for Mozilla, so you can actually play everything VLC can play, but in your browser. Check out the documentation on this plugin:

VLC can also be embedded in a web browser ! For the moment, this function is only available with Mozilla under GNU/Linux. An experimental plugin is also available for Mac OS X and Microsft Windows.
Comment: Won't the plugin still download the file first and then play it? Or does the file actually get streamed to the client (although I think you would need something on the server for that to work)?
Comment: the content of the file has to be streamed to the decoder ALWAYS. if that decoder is vlc or flash doesnt matter. and i think the problem this time is more the 'download the file, save it somewhere, hit the right icon to finally play it' than the transport of the content (intranet maybe?).
Comment: This works.... kind of. Its not very reliable, and it freezes after a few seconds, when playing high def files especially. But I guess it will have to do.


Account Time Settings

Question: I have set up the Marketing Cloud time zones to GMT. Issue is that every other time setting (automations, imports, etc) run on Central Time. Is this a default setting or is there a way to set everything to GMT?
Comment: This really bothers me in file imports and exports, because when running them on short morning in GMT e.g. 4o´clock on date: 21.03.2018  the day parameter is different on GMT (will be 21.03.2018) and CT(20.03.2018) or whatever timezone the servers running on. Is there a way to manipulate these values?
Comment: Unfortunately no. The servers run on cst. You can add an intermediate step that adjusts for time differences with an OFFSET sql function
Comment: But the offset would only be useful when i would extract the values which are stored in dataviews or where i salesforce itself writes the date-values, right? This wouldnt help on the import file or data extract activities with wildcard parameters.
Answer: Server time is in CST. Stack 4 is on Mountain Time. Daylight savings is not observed.
What is the system timezone in Marketing Cloud and does it consider DST?
Comment: TO add clarity Server time is always CST and never CDT, so during DST server time would be MDT/CST and non daylight servertime would be CST/CST

Account Time Settings


I water bath'd my freezer cherry jam

Question: I water bath my freezer jam. I didn't realize I was using freezer pectin. Can I make this jam shelf safe at this point?
Comment: @KateGregory The issue is not the amount of pectin - you don't need pectin for canning at all, it is just there because some people prefer the texture of jam made with pectin. The issue is whether the jam can safely be canned, and this depends on the recipe.
Comment: pectin is pectin, whether for freezer or shelf. The issue is how much of it you use. So you could open the jars, boil it up with more pectin, and re-process it, but I suspect it would be less effort to just freeze it.
Comment: fruit brings its own pectin to the game. Many freezer jams are little more than cooked fruit with some sugar. Shelf stable jams have a gel to them which is made of sugar and pectin, whether that's from the fruit or because you added some. I personally don't add pectin to my jams, but I don't think that means they don't have any.
Answer: If you used a proper cherry jam recipe, made to be water bath canned, but just used the wrong pectin, then your jam will be safe, however your jam may never set.

I water bath’d my freezer cherry jam


How can I enable audio on a raspberry pi 4 running ubuntu 19?

Question: I cant get audio on my raspberry pi 4 running ubuntu 19.Does anyone have a solution.Also I am running the 32 bit version. I cant get audio even though I have a headphone plugged in.
Comment: What audio system do you use? ALSA, Jack, PulseAudio, etc.
Comment: I voted to close this question because the OP failed to provide more info about their setup **for more than two years**, and guessing what could have been wrong with an old Ubuntu is simply not productive.
Answer: Use this command
 amixer cset numid=3 1

This will fix the problem. If it doesn't work then try it with sudo


Relation between work and internal energy in an Isothermal expansion

Question: I don't understand why the change in internal energy in an isothermal expansion is considered to be 0. In an isothermal process is done work, so, shouldn't that imply that the internal energy changed? Isn't it necessary that the work done should result in a change of internal energy? Or, does it mean that internal energy only changes if there is a gain in heat $dQ$?
Comment: "change in internal energy in an isothermal expansion considered to be 0" only for an ideal gas, and was experimentally verified by Joule for low density real gases at high enough temperature.
Comment: For an ideal gas, all the internal energy is kinetic (well, if there's no interaction between particles, there is no potential energy). Kinetic energy only depends on temperature, thus it's energy is conserved during the process. This indeed implies (I think you theorized about something similar in your question), that exactly the amount of work done on the gas will be lost for the gas due to heat exchange (or vice versa).
Answer:
in an isothermal process work is done ryt..then so if work is done dosent it mean that there is a change In internal energy

Remember what internal energy $U$ is. It is the sum:

of atomic vibrations (sensed as the temperature $T$),
of chemical bonds or "binding energy" (this includes phase changes from e.g. liquid to solid, where internal energy is lowered but temperature is constant),
of potential energy (if the object is at a high shelf, it has a "potential" to do work),
of kinetic energy (only if it moves $K=½mv^2$),
and others alike.

But, doing work $W$ on an object could e.g. be displacing it sideways a distance $x$ - that is, putting it somewhere else. This would require some force $F$, and:
$$W=F \cdot x$$
In this new position no changes are done in chemical composition, no changes in potential energy, no kinetic energy (it lies still on the table), and no temperature change (since you want it to be a isothermal process). So this is an example of work done with no changes in internal energy.
For an isothermal process temperature has to be constant. After you have displaced (pushed) the box and done work on it, friction might stop it. This would generate heat. For an isothermal process this heat $Q$ has to be removen right away (maybe you use a cooling system or liquid). Now, conservation of energy from thermodynamics means that:
$$\Delta U = Q-W$$
And since - as discussed above - internal energy is unchanged, $\Delta U=0$ and $W=Q$.
Comment: Another explanation could be given by deriving the formula for change in internal energy to be given by $dU=\frac{f}{2}nRdT$ and then in an isothermal process $dT=0$ and hence the result.


Create record by submitting string for reference field

Question: Is it possible to create an Event record through the rest API by the following;
Say the Event requires a reference field called RecordTypeId of type reference, but I only have the RecordType.Name not the Id. Is it possible to supply a name (string) value when creating an Event for this field without having to query the RecordType to find the Id?
I have only the Name (string) and want to create a record in a single request. Is it possible?
Answer: It appears it is possible by submitting:
RecordType.Name: 'name string'
and salesforce performs the appropriate lookup. The name happens to be unique in my case.


How to separate audio tracks?

Question: There is a movie I like and it has unreleased soundtrack. Because of the way each thing is mixed, it is possible to separate the voices, music and sound effects like car engines using some program. People have done it before, however, what program should I use? Thank you.
Comment: No, they havn't and no, you can't.
Comment: You cannot unscramble an egg....
Comment: The CIA can do it. If you had a few hundred million to throw at it you might be able to do it. The short answer is no you can't do that.
Answer: You are talking about some sophisticated signal analysis.  It would be similar to what the karaoke people do to remove vocals from some songs.  I think it starts with Fourier-based filtering and probably involves some manual manipulation in the time domain.  These days there are probably some AI tools that can help.  For those, I would start by reviewing the plethora of available R packages.  The Python community might be a better place to look, but I'm not a Python person, so I would start with R.
Comment: This is another one - home theatre/movie copying/piracy etc. Off to the fiery pits of hell it goes...

How to separate audio tracks?


SQL Server BigInt vs Decimal

Question: I need to choose a data type for SQL Server( BigInt vs Decimal) on the basis of performance and querying (10 digit number)
Comment: Since you are only concerned with 10 digit number (max), you should go for decimal. Decimal wont loose fraction when doing division.
Comment: Are you pulling this value into app code? If so, what language?
Answer: If you don't need fractions, choose bigint. In your case it will be a byte smaller:
10 digit decimal is 9 byte: https://msdn.microsoft.com/it-it/library/ms187746.aspx
bigint is 8 byte: https://msdn.microsoft.com/it-it/library/ms187745.aspx
Plus, it is faster (it has no variable part, and it is an integer type, much faster processed by cpu).
Comment: Can i get any proper documentation showing BigInt is faster than Decimal?
Comment: Take for example a look here: http://www.mssqltips.com/sqlservertip/3323/comparing-sql-server-datatypes-size-and-performance-for-storing-numbers/
Comment: @user_0, although one would think bigint would be faster than numeric/decimal, I recently ran some performance tests (large multi-million row join queries) to validate this theory for a non-functional user story.  There was no significant difference in performance with our application so we decided not to proceed with the change.  I would use bigint for new development, though.
Answer: If you are only dealing with whole numbers then BIGINT will be a higher performance datatype because it won't have to deal with any rounding.
If you need decimal places you must use decimal

SQL Server BigInt vs Decimal


Collect Values not working as expected in ArcGIS ModelBuilder

Question: I am trying to iterate through a folder of rasters, reclassify each raster, then combine all of the reclassified rasters using Cell Statistics (to get the overall SUM of the reclassified rasters).  I have read countless help forums and my Model should be working, but I am not able to connect the "Cell Statistics" block to the "Output Values" from the "Collect Values."  For some reason, the only variables available to be under the "Cell Statistics" input picker box are "Raster" and "Reclassified Rasters" - I would expect "Output Values" to be listed as well, as that is the link I am trying to make.
Answer: You need to split this into two models. Have everything up to collect values in one model, then make output value of the collects tool a parameter.
Drag this all into a new model that has the cell statistics tool. You only want the cell statistic tool to run once so it should not be in the same model as the iterator.
Answer: In fact, even if it does not show up in your drop down menu, you could connect to the results of your collect tool. Therefore, you can draw a line from your "output values" green ellips to your "cell statistics" tools using the "connector button" (third button from the right)
Answer: I had a similar issue to this, but found if I ran the model first (when it was in the same state as yours above, with Cell Statistics still in white), it iterated the rasters and populated the Output Values. After that I was able to connect the Output Values straight to Cell Statistics (using the connector tool) as the Input Rasters. Then my model worked.
I posted my model in answer to another question


Growth Hormone and diabetes

Question: Growth hormone and insulin like growth factors are diabetogenic, so I assume that people with high growth hormone (say due to pituitary tumor) may be at high risk for diabetes.  Has any correlation been established between these two? I know that diabetes is a multifactorial disorder and so only a correlation may be established.
Comment: Which type of diabetes mellitus are you interested in? Or both?
Comment: @leonardo I think this should not affect diabetes type 1 as dt1 is a mostly autoimmune disorder. So if some papers are available on this, I think, they would mostly be on type 2.
Answer: Yes:

That GH has an effect on glycaemic control is most evident from the abnormal glucose tolerance seen in acromegalics...

acromegaly is defined as abnormal growth of the hands, feet, and face, caused by overproduction of growth hormone by the pituitary gland.
Such an effect has been known for decades, which makes sense given how interrelated the axes are.  Although I think the best evidence is the fact that the side effects of growth hormone therapy says that Some patients have developed diabetes mellitus...

Growth Hormone and diabetes


Do you append 00 or 10 when oversampling

Question: Say I have an 8-bit ADC and I oversample at such a rate as to obtain 2 additional bits. So, before I apply the low-pass filter, I need to append two extra bits to the 8-bit signal of the ADC. Do I append 00 or 10? Does it make any difference?
Comment: To be able to provide a helpful answer some addition information may be needed.  Are you implementing this processing in fixed point, floating point, an FPGA, etc?
Comment: @GrapefruitIsAwesome assume 10-bit fixed point.
Comment: 10-bit fixed point doesn't give you anywhere near enough headroom bits for the intermediate results of the antialiasing filter MACs required for de-oversampling.  So the real issue will be not how to add bits but how to shorten the much wider filter result to only 10 bits.
Answer: The answer is -- neither.
If you have an $n$-bit ADC, then you can usefully oversample it if there's some noise either inside the ADC or before it that makes the average value of the ADC output equal to the actual thing being measured (this is the whole point of a Sigma-Delta ADC -- you intentionally build a circuit that makes that happen with a 1-bit ADC).
The key words there are average and value.
To profitably low-pass filter the output of an oversampled ADC so that you can decimate the result, you need to bit-extend the ADC output so that the value is retained.  This is different for different ADCs.  There's three common cases that I can think of, but if you include early telephone company experimentation, nearly 100 years for clever people to come up with all sorts of ways to make ADCs.  So -- read the data sheet very carefully.
The three common ways to arrange an ADC are:

Unipolar, where the ADC reads a voltage* from $0 \mathrm V$ to its $V_{ref}$, and gives an output from 'b00000000 to 'b11111111.
Signed, where the ADC reads a voltage from $-V_{ref}$ to $+V_{ref}$, and gives an output of 'b10000000 for $-V_{ref}$, up through 'b00000000 for $0\mathrm V$, then to 'b01111111 for $+V_{ref}$.
Offset signed, where the ADC reads a voltage from $-V_{ref}$ to $+V_{ref}$, and gives an output of 'b00000000 (note the leading bit is different) for $-V_{ref}$, up through 'b10000000 for $0\mathrm V$, then to 'b11111111 for $+V_{ref}$.

It is up to you to take these values and make them "right".  There's efficient ways in C to deal with each of these cases (assuming that's what you're doing).  Assuming you want a 16-bit integer, then under the hood you would extend these by:

Unipolar: just make a longer word by setting the most significant bits to 0.  I.e.

result = {'b00000000, raw_val}.

Signed: you need to sign extend the result.  I.e.

if raw_val[bit 7] == 0 then result = {'b00000000, raw_val}.
if raw_val[bit 7] == 1 then result = {'b11111111, raw_val}.

Offset signed: Convert like unipolar, then subtract:

result = {'b00000000, raw_val} - 'b0000000010000000

Then you would take the result and you would filter or average it in a way that preserves the least significant bits.
* Or some other quantity -- I'm just going to say "voltage" here.
Comment: I was thinking about the unipolar case with unsigned fixed point. However, don't you need to set the least significant bits to zero? Adding two zeroes to the MSB will cut the output in 4.
Comment: "Assuming you want a 16 bit integer" -- no, _adding bits_ does not cut the output.  It just adds more headroom.
Comment: I suggest you re-read the part where I say that **value** is a key word.  Any process that retains the **value** of the ADC will do -- don't get wrapped around the axle over what the bit pattern should be.  Instead, grab a pencil and some paper and *try things out*.  Eventually, you'll find a method that works.
Comment: Thanks. I figured it out. I was confused about how to do it initially.


Can emitted electrons in photoelectric effect be called Cathode rays?

Question: When I was learning photoelectric effect, It was told that Photons incident on metallic plate in vacuum causes electron to emit if the energy of photon is greater than work function of metal, In this case to me, The emitted electrons in vacuum seemed like a similar condition like that of cathode ray tube, can these emitted electrons be called cathode rays and will they have all properties similar to cathode rays?
Answer: The name "Cathode Rays" (see https://en.wikipedia.org/wiki/Cathode_ray) was invented in 1876 for the "rays" coming out of a cathode (electrode connected to the negative side of the electric source), before anybody knew what these were. In 1897 Thompson discovered that these "rays" were a stream of negatively charged particles, each about 1800 times lighter than a hydrogen atom (Thomspson received the Nobel prize of this discovery). The name adopted for these particles was electrons, and this is what we call them today.
Today you should stick to the name "electrons", and avoid the name "cathode rays" that was used before scientists understood what they were. In some historic uses, where an actual vacuum tube was involved with an actual cathode, the name "cathode rays" was still used (especially in those old "CRT" televisions and displays - https://en.wikipedia.org/wiki/Cathode-ray_tube). But it shouldn't be used to refer to electrons in other contexts.
Answer: No, emitted electrons in the photoelectric effect can not be reffered to as "cathode rays." Cathode rays are a stream of electrons that are emitted from the cathode of a vacuum tube when it is subjected to a high voltage. These electrons are produced as a result of thermionic emission or other electron-emitting processes from the cathode material.
In the photoelectric effect, electrons are emitted from a material when it is exposed to light or electromagnetic radiation. These emitted electrons are reffered to as "photoelectrons" The photoelectric effect is a different phenomenon from cathode rays and is typically characterized by the interaction of photons (light quanta) with the material's electrons, leading to the ejection of electrons from the material's surface.


I will learn better English -- should it be "I will learn English better."

Question: Somehow, I think "better English" is incorrect, because I think there isn't better English; English is English. But I hear this phrase from other ESL students a lot. Is this correct way of saying it? Or should I say "I will learn English better"? Or if there's any other better way to say it, I would love to know.
Thank you.
Comment: Although I prefer that people should learn English better, there is without question such a thing as good English and bad English, from which it follows there must also be better English and worse English, and even that one could use one's very best English or one's very worst English.
Comment: Both variants sound quite non-native to me. Grammatical, easily comprehensible, and clear enough; but not something a native speaker is likely to say (setting apart the fact that native speakers of English are not likely to say that they want to learn English at all, of course). I would suggest to your fellow ESL students that a much more natural way of phrasing it is, ***I will improve my English*** or (if we're talking about their _desire_ to do so, rather than their absolute certainly that they _will_ do so), ***I want/would like to improve my English***.
Answer: It depends on what you're trying to say.
In learn English better, better is an adverb that modifies learn -- it means you'll improve your learning process.
In learn better English, better is an adjective that modifies English -- it means that you will learn a more proper version of English. For instance, In England, public school English or King's English might be considered "better English"; in America, the English used in major national newspapers or network news broadcasts is typically considered the standard for quality.
Answer: 'I will learn better English' is standard. It is like saying 'My driving is erratic'. In that case, 'my driving' refers to the act of me driving, or to the manner in which I drive. When I say, 'My driving is erratic,' I mean that my acts of driving are erratic. [1]
In the case of 'better English', 'English' refers to my use of English, and 'learning better English' means improving my usage of English. This is gramatically the same thing as saying 'I will develop better usage of English'.
You could say 'I will make my English better'. 'Make' can take two direct objects[2], 'my English' and 'better'. In this usage, I make [the first object] become [the second object], so I make [my English] become [better]. However, there are very few words which do this, and most words only take one direct object. 'Learn' only takes one direct object, in this case [my English], so 'better' can't be another direct object. Since 'better' can also be an adverb, it reverts to acting as an adverb modifying the main verb, 'learn'. That means that if you say 'I will learn English better,' you are describing how you will learn, not what you will improve (for example, you will learn English more quickly, such as taking two years to learn it instead of five).
[1] In this context, 'driving' is technically called a gerund, but most people would think of it as a noun.
[2] https://www.englishforums.com/English/VerbsWith2DirectObjects/plljx/post.htm


Can amorphous solids have energy bands?

Question: One can understand the formation of energy bands from the Kronig-Penny model which assumes a periodic potential. But I heard that even if the potential is aperiodic, for example in amorphous substances (glass, plastic) there also exist bands. If not periodicity what is the fundamental physics that causes band formation?
Answer: In general, one can understand emergence of band structure starting from two extreme scenarios, both not contradicting formation of broadened levels/bands in amorphous solids:

Start with empty space: electronic dispersion is a parabola due to the kinetic energy of a free electron (or really quasi-particle with effective mass). Introducing a perturbing potential, free electron states will start to hybridize which leads to level splittings. If the perturbation has a lattice periodicity, one can define Brillouin zones in (momentum) $k$-space and can see how hybridization at Brillouin zone boundaries leads to formation of bands (also see other answers about Bloch states). These band splittings also occur in an amorphous/aperiodic solid, but there are no Brillouin zones one could fold these bands back into (due to the aperiodicity of the system in real space, also momentum space lacks periodicity: there is no reciprocal lattice).
Start with isolated atoms (tight-binding approach). As also stated in previous comments, bring two atoms together, and the first, still discrete level splittings appear; bring many atoms together, and these splittings will be broadened into bands. If these atoms are arranged periodically on a lattice, there will again be periodicity in $k$-space as well, and the band structure can be folded back into a Brillouin zone. Also here, lack of periodicity doesn't mean lack of broadening of states into bands, it only means lack of reciprocal lattice and Brillouin zones.

A nice real-world example of existence of electron bands in an aperiodic solid is amorphous SiO2, i.e. the major component of common glass. It is transparent to visible light, because corresponding photon energies do not suffice to create electron-hole pairs by overcoming the band gap energy of amorphous SiO2. Photons with energies from the ultraviolet spectrum, however, have enough energy to excite electrons from the valence band to the conduction band of glass (i.e. the photons are absorbed), explaining why glass is (mostly) opaque to ultraviolet light. (Here is an abstract of a medical paper, that summarizes how efficient different types of glass are at blocking UV light.)
Regarding a citation about band structure in amorphous solids: the following article discusses the optical band gap dependence of soda lime borosilicate glass (measured band gap $\Rightarrow$ experimental evidence for electronic energy bands) as a function of TiO2 dopant concentration:
Ruengsri, Kaewkhao, Limsuwan, Procedia Engineering 32, 772 (2012) (open access).
Figures 3 and 4 of the following article: Roth, "Tight-Binding Models of Amorphous Systems: Liquid Metals", Phys. Rev. B 7, 4321 (1973) (behind pay wall) show density of states for a (tight-binding) model of an amorphous solid: the broad density of states reveal bands (i.e. there are no individual discrete "spikes" in the density of states indicative of isolated states).
Answer: As you can see from this paper (just an example among many), it is perfectly possible to speak about band structure even in amorphous or liquid systems. In a way the problem is simply matter of a sloppy terminology: the meaning of bands of energy was the bare fact that only some intervals of energy were allowed in a solid, and the easiest solids to be explored were the crystalline solids where bands are further decomposed into k-dependent eigenvalues. Actually, the correct way of naming things should be:

bands are the allowed interval of energy (in some cases such intervals may be overlapping;
the k-structure of a band in a crystal should be referred to as the dispersion of the band

In classical textbooks like Ascroft&Mermin, you'll find the Bloch wavefunctions labeled with the Bloch wavevector and an integer which is the band index.
Comment: From the point of view of the allowed energies there is no difference. But energy bands can be seen as a modification of the isolated atom energy levels ( particularly clear in a tight binding approximation) and in such a perspective the overlapping nature of some band becomes understandable and provides a clue to understand their shape. This allows to trace back different bands to their atomic stte origin and makes meaningful to speak about $d-$,  $s,p-$electronic bands etc.
Comment: How are multiple overlapping intervals different from a single interval?
Answer: Indeed, the easy way to calculate condensed matter is by using the periodic boundary conditions of crystals. But usually, not much happens with the electronic structure on melting: metals remain metals, the density does not change much. Optical, electrical and thermal properties are generally approximately the same.
The main features of the band structure can often be understood from atomic orbitals and a tight-binding starting point. Generally, melting does not change the local coordination.
Comment: "not much happens with the electronic structure on melting" - sure, but the phononic structure changes a whole lot.
Comment: @MauryMarkowitz But changes are not that large for the short-wavelengths. This is about ionic compounds: http://iopscience.iop.org/article/10.1088/0022-3719/5/16/028/meta
Comment: Be careful. "the easy way to calculate condensed matter " I wouldn't call it easy. "Generally, melting does not change the local coordination" Yet molten silicon is a metal.
Answer: Energy band functions and Bloch waves only exist in periodic models — after all the Bloch-Floquet transform is just a discrete Fourier transform. So when you break periodicity, then energy bands cease to exist.
You can still define notions like the density of states in non-periodic models, though. In case when the disorder is weak, all essential properties are modifications of the properties of the corresponding periodic systems. The density of states, for example, is very similar to the periodic model but has exponential tails in the band gaps.
Comment: From your answer, I could not understand whether periodicity is essential for band formation.
Comment: Yes, periodicity is essential to have energy bands. In disordered or aperiodic systems, you need different mathematical techniques to extract information.
Comment: _"In disordered or aperiodic systems, you need different mathematical techniques to extract information. "_ What does it mean? Amorphous solids don't have bands?
Comment: No, you don't have energy bands when your system lacks periodicity. Amorphous solids are not periodic and hence, do not have energy bands.
Answer: The Bloch part is absolutely true: periodicity is needed in order to apply Bloch's theorem, and then derive the properties we're used to. Even a tiny potential, provided that it is periodic, produces band formation.
But don't get lost in maths, the thing is that there's a bunch of atoms, and Pauli's principle still applies, altough ther's not such periodicity. Electrons cannot have the same quantum numbers, so there must be a level splitting.
Recall the case of helium. You can regard helium as two hydrogen atoms together. If you don't consider the electrno repulsion, you'll have a ssimilar energy-scheme. However, as soon as you consider interaction between electrons, a level splitting appears. What's more, any perturbation can a level splitting.
Weell, now imagine so many atoms. The splitting is so hard that they're eventually overlapping in bands. You just can't calculate them in the same way as in crystals. But you "can consider them to be bands".
Comment: @mithusengupta123 actually it asserts periodicity right at the beginning: `This is
described by N points arranged along a line, each separated by distance a.`. And all further discussion is limited to crystals, Bloch theorem etc..
Comment: What is the upshot of your answer? Do we need a periodic potential for band formation?
Comment: This doesn't really answer the question. Indeed, levels do split, but in periodic potential the splitting is so "nice" that you get smooth permitted bands and completely empty forbidden ones. If you depart from ideal periodicity, you'll get nonzero density of states in the band gaps, and the permitted bands will have not so smooth dispersion relation $E(\vec k)$. I don't think a handwavy explanation would answer the question at hand.
Comment: @Ruslan There is another way of looking at the band formation using Anderson's tight-binding Hamiltonian. The Hamiltonian consists of an on-site energy term plus a hopping term with no trace of periodicity anywhere. But yet it produces energy bands. This emboldens my confidence that even aperiodic amorphous solids can also have energy bands.
Comment: @mithusengupta123 can you show concrete examples of papers presenting such systems?
Comment: @Ruslan See section 2.1.1 of this http://www.damtp.cam.ac.uk/user/tong/aqm/aqmtwo.pdf It discusses band formation using tight-binding Hamiltonian. Nowhere it assumes the existence of a periodic potential.
Answer: Amorphous solids don't have energy bands, mathematically speaking. However, the physics underlying the energy bands may be the same as in a strictly periodic material. For example amorphous silicon and germanium are still semiconductors with similar though not the same, properties. Liquid silicon and germanium are, however, metals. As long as the local coordination is not affected, disorder may not fundamentally change the electronic properties. What is important for the electronic structure is whether electronic orbitals are localized or delocalized. In a simplified model, the Hubbard model, this is determined by the ratio between electron hopping and electron-electron onsite repulsion.

Can amorphous solids have energy bands?


Texture painting logo looks pixelated!

Question: I have tried to stencil painted the logo on the base color which is just a 2K color image. Then I stencil painted something on top. But no matter what size the image is, it still looks pixelated. Can someone help?
Comment: Please add your blend file to your post. (Grab the URL of the question.
Go to https://blend-exchange.com/.
Select the blend file.
Add the url of the question.
Grab the url that results.
Go back to the question and edit it.
Add the new url to the bottom of the post.)
Answer: Two things that can effect this: Either increase the image resolution upto about 5K or 6K or either try painting directly on to the mesh instaed of painting it in the image editor.
Comment: Thanks, that solved the problem :-)

Texture painting logo looks pixelated!


Mac Keyboard Shortcut to Bring Up Finder

Question: How can you create a keyboard shortcut to bring up the Finder, as if you had clicked on the Finder on the Dock?
Answer:
Launch Automator (in Utilities)
Menu: File -> New Window
Choose: Quick Action*
Worflow receives: no input
In Utilities on left, double click: Run Shell Script
Shell: /bin/zsh
Enter for the shell command: open -a Finder
Save the service with whatever name you want
In System Preferences, click on Keyboard
Click on Shortcuts at the top and then on Services at the left
On the right part of the window, scroll down to General
Find the service that you just saved, make sure it is checked, and set a unique hotkey for it
Quit the System Preferences

Enjoy your new hotkey to bring up the Finder.
* In versions of macOS before macOS Mojave, the option was called Service.
Comment: The other option, of course, was just to cycle through CMD + TAB to select the Finder.
Answer: Source:

Open Automator and choose the service template.
Change the input type from selected text to no input.
Add a Launch Application action and drop Finder on the pop-up button from /System/Library/CoreServices/. (The dialog for choosing an application does not allow selecting Finder.)
Save the service and give it a shortcut in System Preferences > Keyboard > Shortcuts > Services.

The service only opens a new window if there is no existing Finder window. To open a new window every time, add a Get Specified Finder Items action, drop the folder you want to open on the list, and then add a Reveal Finder Items action.

Automator is included in OS X: http://support.apple.com/kb/PH14303 (Mavericks), http://support.apple.com/kb/PH11360 (Mountain Lion), etc.
Background: http://en.wikipedia.org/wiki/Automator_(software)
Further reading if you're interested in doing more with Automator: http://www.macosxautomation.com/automator/

or:

It's actually easy. Just press option ⌥+command ⌘+spacebar. That will open a new Smart Finder window. You then can navigate from there. It works on a system level no matter what application you're running.
No need for scripts or complicated setups.

In the future please search for the topic before creating a post :)
Comment: Thanks for taking the time to search for existing solutions. In case of questions which have gotten asked before it is usually better to flag the question for mod attention (or vote to close as a duplicate once you have enough reputation) than to duplicate answers though.


How TCP hole punching works?

Question: Is TCP Hole Punching similar to UDP hole punching?How it is established between "Peer A" and "Peer B" when both the peers are behind NAT? You can use Peer A and Peer B as example to make it easy to understand.
UDP and TCP hole punching are the most common methods used by torrent, skype for P2P connection and VoIP when peers are behind some type of NAT. Torrent and skype use UDP hole punching for P2P. I'm aware how UDP hole punching works from here: http://www.h-online.com/security/features/How-Skype-Co-get-round-firewalls-747197.html but I find TCP hole punching quite confusing.
Comment: Can you add some context?  It's not clear what you're asking.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: The only way to establish a connection between two hosts when they are both behind different NATs is to either configure port-forwarding on the NAT devices, or use a third-party server hosted on a public address externally (in which case there is no direct TCP connection between hosts).
Comment: UDP pin-holing works because there is no requirement for state in the connection - eg: a host behind a NAT can send an arbitrary packet out and a stateful firewall will allow return traffic to the source port.  I have never heard of "TCP hole-punching" before - do you have an example application?
Comment: UDP and TCP hole punching are other ways to establish connection between hosts other than port forwarding. I'm trying to learn about TCP hole punching.
Comment: I don't have any examples but I'll post a link so that you can explain to me in easy language.

How TCP hole punching works?


Quantization of Light

Question: Why Vs will not change with different intensity, I mean why more photoelectrons emitted (at higher light intensity) each with the same max K. E. doesn't require a larger stopping potential to be stopped since the KE added from each e would be larger?
Answer: There is a constant force on every photoelectron emitted because of light when stopping potential is applied. Increasing intensity will only increase the number of photo electrons emitted. When a stopping potential is applied, same amlunt of force is applied on all the electrons irrespective of the no. Of photoelectrons emitted. The extra work will be done by the battery which is the source of voltage to balance the extra kinetic energy. But there is no need to increase the voltage of battery.

Quantization of Light


How can I set LF line endings for local git repository on Windows?

Question: I got one problem with line endings in Git repository.
I want to build my C++ program for Linux using Docker. The host system is Windows 10. But the first problem I got stuck with is line endings. Windows uses CRLF, but Linux uses LF line endings.
How can I set my local repository to make LF line endings? I tried to set "core.autocrlf = false" and "eol = lf" in git config, but it had no effect.
How can I resolve the problem with line endings?
Comment: `core.autocrlf` controls line ending handling of Git when moving files into and out of a Git repository. The problem you are trying to solve is a configuration setting in your code editor.
Answer: Are you pulling the project onto Linux and building it there because if so you want to leave those configuration changes alone as they should convert line endings to lf.
The git configurations are about how line-endings are modified once the changes are committed and pushed to the repository (and then in turn if they're converted when pulling back from the repository). If you've been working on files in CLRF then git won't automatically change files line-endings just because you've changed the config. You should also look at writing new files in lf, most IDEs have ways of doing this.
If you're building on Windows though, provided you committed your files when autoclrf was true, the files within the git project repository should have lf endings, changing autoclrf=false and eol-lf should be enough, you just need to do a hard reset to make git bring your local in sync with the repository.
Look at some of the answers here: How do I force git to use LF instead of CR+LF under windows?


Sharepoint Search Created By field in Search results not consistent

Question: I am using a blog aggregator (CoreResultsWebPart) returning all blog posts from my mysites.
I am trying to retrieve the login name of the user who created the blog post in my xsl.
However I am getting inconsistent results. eg:
User login: mydomain\maggie.smith
Returned data for author : mydomain\maggie.smith (CORRECT!)
Another user login : mydomain\bob.hope
Returned data for author : Bob Hope
Now I am assuming that its because the user profile database fetched the display name of Bob hope because that information exists, however, instead of "Bob Hope", I want to get his login name! If I use sharepoint manager to inspect the blog post for 'Bob Hope', all the Created By and Author fields show 'Bob Hope' and not mydomain\bob.hope.
How do I get it? The reason being is to get the users profile picture to attach to my xsl blog aggregation.
I have added other metadata columns to return and recrawled the content source but I cant get the login name of the original author. Help anyone, please!
Answer: SPUserField has "Show field" setting. Try to change this to show Login instead of DisplayName for your "CreatedBy" field and see if it would help.
Comment: How would I go about setting this in the search?


Practical usage of batteries connected in parallel

Question: Is there any practical usage in real devices for connecting batteries in parallel? Or is it more a theoretical construct? It seems to me that only batteries in series are used nowdays.
Comment: I have two appliances in my home that use batteries connected in parallel; One is an alarm clock, and the other is a camping lantern.  The alarm clock has spaces for two AA cells, but it will run with just a single cell in either space. The alarm is a motor that rings a physical bell. That uses significant battery juice.  It will run longer if you insert two batteries. The camping lantern will run on either four or eight D cells (i.e., either one or two strings of four series cells each). Same deal: It'll run twice as long if you fill all eight slots instead of filling just four of them.
Answer: Of course there is. If you want to ramp up the current from a battery source without increasing the voltage, you connect your batteries in parallel. A series connection increases the voltage but the current stays constant. Just basic Kirchoff's law.
Answer: Batteries placed in series have a higher voltage that is the voltages are summed. Batteries placed in parallel can withstand a higher load. Thus engineers match series parallel configurations to meet voltage and load requirements for everything from the 9 volt in your smoke detector to multi kilowatt uninterruptable power supplies.
Answer: The first consideration is the voltage requirements for the load. Some loads (motors in particular) won't run at all unless there is sufficient voltage.
The next consideration is the demand (magnitude of the load) on the battery. There are two aspects of demand- how much current the load needs to operate and how much energy the load will consume (power x time) for the expected duration of the load.
Connecting identical batteries in series increases the voltage, but not the current delivering capacity of the batteries. Connecting batteries in parallel increases the current available from the batteries, but not the voltage.
If you simply need more voltage, you can connect the batteries in series.
If you need more current but not more voltage (over voltage can damage some loads) you can do several things. You can connect identical batteries in parallel. Or you can use a bigger battery, e.g., replace a AAA battery with a AA battery (both 1.5 volts for alkaline), or replace a C battery with a D battery, in all cases space permitting. The same applies if you need more stored energy (power x time), but not more voltage.
Finally, the reason you don't see too many batteries in parallel is because unless the voltages are perfectly matched, one battery may attempt to charge the other causing damage in the case of a non rechargeable battery.. Instead, you use a bigger single battery (e.g., replace a AAA with a AA).
Hope this helps.
Comment: So, different voltages make one battery charge another one? If not chargeable, just heat up? What is the flow of electrons in parallel schema? thanks!
Comment: I didn't mean "charge" literally. I meant one battery might attempt to charge the other, which for a non rechargeable battery could be dangerous
Comment: Or destructive. See edit


Find $B$ if $AB=BC$ and $A,C$ are invertible

Question: Suppose $A$ and $C$ are known invertible complex matrices of possibly different orders. If $B$ is an unknown matrix of appropriate order such that $AB = BC$, then how could one solve for $B$?
Comment: @NajibIdrissi: Agreed. Notice that this a homogeneous linear system on the unknown coefficients of $B$ so the solutions form a vector space. The case $A=C$ usually implies a higher dimensional solution space. For in that case $B$ can be any polynomial on $A$ (those commute with $A=C$).
Comment: A brute force method: Write down the matrix of the mapping $T:B\mapsto ABC^{-1}$ and find the eigenspace belonging to eigenvalue $\lambda=1$ of $T$ :-)
Comment: http://en.wikipedia.org/wiki/Sylvester_equation
Comment: There isn't always just one solution. $B=0$ is always a solution, and if $A=C$ for example then $B=I$ is also a solution.
Answer: We can solve the problem theoretically and then compute it for low dimensions.
Consider $\phi: M(n, \mathbb{K}) \to M(n, \mathbb{K})$ mapping $X \mapsto AXC^{-1}-X$ and find the kernel.
Comment: Should you have $\phi(X)=AXC^{-1}-X$?
Comment: Oh, ye, scuse me.
Comment: then please correct or delete your answer...


Is "how to do it" grammatically correct?

Question: If it is, then what is the verb?
Answer: How used with an infinitive means in what way or manner, by what means.

He showed me how to adjust the focus.
  He did not know how he ought to behave.
  How does it work?
  —The New Oxford American Dictionary

He showed me how to do it.
Answer: I would assume this is an infinitive phrase turned into a question.
As such, the verb would be "to do" in the phrase "to do it". However, I'm not sure if and how that changes with a "how" in front of it.


Woocommerce - Stop code from running based on product category

Question: I am using a code in my functions.php that displays messages on my store based on weather the user is logged in or not. The code displays a message telling customers to sign up as a member to receive a 10% discount sitewide.
When as user is logged in the message displayed advises that discount is automatically applied at checkout.
The code works great, however, there is one particular product category that the discount is not valid for. I don't want this code to be executed on that particular category.
Can anyone assist with this?
This is a snippet of the code.
if (!is_user_logged_in())

add_filter( 'woocommerce_get_price_html', 'PW_text_after_price');

function PW_text_after_price($price){

    $text_to_add_after_price  = '' . _('

Sign-up for 10% members discount!
').''; //change text in bracket to your preferred text

    return $price .   $text_to_add_after_price;

}

if ( is_user_logged_in() )
add_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart_button_func' );

function add_content_after_addtocart_button_func() {

// Echo content.

echo '' . _('Members discount automatically applied at checkout!').'';

}

Answer: I think that you just need change first line like this:
 if (!is_user_logged_in() && !is_category( '9' );) //change 9 to your category ID

add_filter( 'woocommerce_get_price_html', 'PW_text_after_price');

function PW_text_after_price($price){

    $text_to_add_after_price  = '' . _('

Sign-up for 10% members discount!
').''; //change text in bracket to your preferred text

    return $price .   $text_to_add_after_price;

}

if ( is_user_logged_in() )
add_action( 'woocommerce_after_add_to_cart_button', 'add_content_after_addtocart_button_func' );

function add_content_after_addtocart_button_func() {

// Echo content.

echo '' . _('Members discount automatically applied at checkout!').'';

}


Finding image via ctrl+f via Python

Question: I have collected many unique JPEG files and compiled them into a single ~1000-page PDF file via Python. Each unique image occupies a single page within the PDF file.
Now, I would like to go back and add functionality to my Python script so that each image has an integer stamped onto it and is searchable via ctrl+f after processing. For example, after processing via Python, page 15 within the PDF file has image 345 stamped to it. If I open the PDF file and searched for number 345, page 15 would be found.
What is Pythonic method to accomplish this task?
Answer: You can add a text, or a label to the image in the same page, so you can find it when you search for it using Ctr+F

Finding image via ctrl+f via Python


Laptop fan runs continuously even when not using the application

Question: My laptop fan runs continuously even when not using the application. CPU fan speed is 2300 RPM. Is that normal? This is my first time using elementary OS.
Answer: Use the top command in Terminal and check the %CPU column.
Comment: Good suggestion. I sometimes have one or more `-bash` commands eating up resources. After killing them, CPU usage (and thus fan speeds) return to normal.
Comment: Thanks for answering my question. My CPU is about 40%. When I use windows fans will turn slower when the machine is not working. But in the elementary os, it always rotates at a high speed. Does windows have BIOS, elementary not?
Comment: I think it's some software you installed that keeps running in the backgraound after you close it. That's why I suggested the `top` command to see which app is consuming CPU.
Answer: The  top  command is what was needed. THX alot.
Ad first I tried to find out with gnome system monitor..it showed me 0% CPU usage.
top command

identified high CPU usage of packgagekitd

, which is an update lookup and for the reason my fans where spinning full time.
Just in case you experience the same issue..after using top, type:

sudo killall -KILL packagekitd

and quite time is back again.BTW, I'm new to Elementary Os..I started with Juno..


How to securely transfer password from a registration page to the database

Question:
What steps must be followed to send password securely from the user registration page (i.e. client side) to the server over a non encrypted channel (http) when the user registers for the first time on the website?
(We assume that there exists an intruder in between client and server)
should the password be encrypted with algorithm like AES (requires private key to be shared between client and server which might not be safe) or hashed using SHA2 on the client side before sending it to the server for further hashing using PBKDF2 or bcrypt.
Comment: This really is where TLS is for. Why ain't you using HTTPS? Let's Encrypt for example offers it for free.
Answer: The only safe method for a website to transfer a password to the server is using HTTPS/SSL. If the connection itself is not encrypted, an ManInTheMiddle can modify or strip away any JavaScript sent to the client. So you cannot rely on client side hashing.
You cannot setup a secure connection between client and server on your own, because there is no already shared information. This is like inventing a secret language while the bad guy is listening. That's what SSL is for, if you get an SSL cert for your website from a public CA, then the browsers have built in root certificates for these CA which they use to validate your website. Based on that, the client and server can set up a secure connection.
Comment: "the browsers have built in certificates, which act as an already shared secret" ... uhh, what? Your website needs its own SSL cert, which can be _verified_ using the built-in certificates. But the the build-in root certs do not in any way act as a shared secret.
Comment: @MikeOunsworth - Todays browsers contain a list of root certificates, which are installed together with the browser. Only with those known root certificates, the browser is able to verify a derrived certificate of your website. If the root certificate where not known to the browser before the connection is up, there would be no way to verify the certificate, because you do not have a secure connection (that's why self signed certificates are not trusted).
Comment: Correct, but that's not what you said in your Answer. Your answer says that you _already_ have a shared secret because of the pinned roots, that's .... _misleading_ because you still need to go get yourself a cert.
Comment: @MikeOunsworth - Well i changed it to _information_, maybe that's indeed more understandable.
Comment: ....Making it more generic isn't what I had in mind. I also made an edit. Feel free to revert if you don't like it.
Answer: The answer here is that it shouldn't be.
The password should be hashed (and salted, and any other algorithms to taste) on the client side, and that hash should be passed to the database. The password should not leave the client-side.
If you want to prevent that hash from being intercepted, then HTTPS or similar to encrypt the channel is required.
Comment: Everything client-side (especially in web-applications) can easily be altered. Security mechanisms like hashing shouldn't be relying at the client-side, but at the server-side. TLS should be used. Besides that, when using a bad architecture you have the risk of the client-side hashed password becoming the actual plain-text password.
Comment: The problem is that when you hash client-side (hash("pass")) == e.g "ssap", is what you send to the server instead of "pass". When you then do hashing on the server you actually have: hash(hash("pass")) (-> partly client-&server-side) which equals: hash("sapp"). If the attacker can intercept your client-side hash you still have the same security as when you'd use no client-side hash, because the client-side hash just become your new plain-text. But this depends on your architecture and implementation of course. CHECKING if it was hashed would solve a lot for example.TLS should be used anyhow..
Comment: @O'Niel I am performing hashing on the server side as well but the question is about secure transmission of the password in the absence of https.


Reuse file uploaded via (File|Image|Whatever)Field in another node

Question: I noticed the existence of this file_usage table in D7's database and I was wondering if it's possible to link in a new node the same file I uploaded using a file field in a previously created node. This seems logical to me, yet I can't seem to find a way to do it.
Answer: The FileField Sources module expands the file field widget and allows the user to select new or existing files through additional means, including  re-use files by an auto-complete textfield, attach server-side files uploaded via FTP, transfer files from a remote server (cURL required) and select existing files through the IMCE file browser.
The Media module (2.x) provides and additional file field widget which use its media browser to upload or select a (media) file.
Answer: I know this an old thread, but https://drupal.org/project/media does what you want. (or at least the goal of media is to do what you want.)
If you can use media 2.x (as I write this there are several show stoppers with wysiwyg editors and 2.x) I would go that route.


6 month old cat still nursing

Question: My kitten is now 6 months old but my year old cat is having kittens anyday now and my 6 month old is try to nurse on her and he's been doing that to his older brother who is also a year old. Why is he doing this he eats cat food and brings me dead moles and alive chipmunks.
Answer: It sounds like it's more a habit than to actually nurse at this point, seeing as he also is sucking on his brother. Sucking on things is actually a relatively common habit in cats, similar to the habit of kneading, although not as common as kneading.
If you notice the suckling is causing problems, or if you simply want to prevent the behavior, you can cover your other cats' nipples. An easy way to do this is using a large sock with the end cut off, if your cats are small enough. Or similarly finding some way to wrap up the cat's belly.

6 month old cat still nursing


My car over heat

Question: I have 2002 Chrysler I was driving 75 miles in I-95  white smoke began to came from the engine, I pull in the side of the road, my engine was over heating and the radiator was bowling heat I wait for 40 minutes to cool and y put coolant and water in the radiator I heard clockin sound later my engine car won't star.. It is any solution to this problem? it is expensive to fixt? please I need help and advice, Thank you.
Comment: Sorry you didn't get a response earlier, but smoking+overheating+ clunking sound almost always means major engine repair will be needed.  What color was the smoke?
Comment: Please I need help I have to be at my Job at 6:30 am help!
Answer: The white "smoke" that you saw is almost certainly actually steam from the coolant boiling over. What was the coolant temperature gauge showing both when you saw the steam and in the time leading up to it?
A car's cooling system is quite a complex thing unfortunately and there can be many problems that will result in overheating so tracking down the root cause is often a process of elimination. Some these are going to need a garage but others you can do yourself:
Head Gasket Failure (HGF)
This is generally at the "worse" end of the scale for problems that can cause overheating. Check the oil on the underside of the oil cap and on the dipstick (obviously don't attempt this when the engine is still hot!), if the oil has a creamy aspect to it (like mayonnaise mixed with mud) then this can be an indicator of HGF as it means that coolant is making it's way into the oil. If you find this then it's probably going to be quite an expensive job.
Coolant system leak
There could be a leak somewhere in the cooling system - this could be a split hose or cracked radiator. Unless you can see anything visually the best way to test for these is to pressure test the system. This is something pretty much any mechanic can do for you as it just involves connecting an air pump to the radiator cap opening and trying to "pump up" the system. If it holds pressure then it's not leaking. If it is leaking and it's just a split hose it should be relatively cheap to fix, depending on the model of the car radiators can vary quite wildly in price but it's generally not horrifically expensive.
Stuck thermostat
Most engines have a mechanical thermostat that is supposed to open when the coolant reaches operating temperature. If it doesn't then it will very quickly overheat. Thermostats themselves are generally pretty cheap components, but depending on the engine there can be a lot of labour time involved in getting to them - I just had to have it replaced on one of my cars recently and it involved taking the whole front end of the car off!
Fan failure
Most engines will have one or more fans to cool the radiator, these a generally electrically operated on modern cars but older engines may use a belt from the engine. If the fan fails or if a sensor or fuse or something has failed and prevents the fan starting then the radiator won't be getting fresh air and won't cool very well. This is much more noticeable if you are in traffic, running in clear air substitutes for the fan's action and can mask it.

My car over heat


Hypertrophy detecting machines?

Question: Per my understanding, muscle fibers need to be sufficiently damaged in order for them to later regrow. How does objectively know whether the muscle is sufficiently damaged? Is there an electric machine/sensor tailored for this purpose?
Answer: Muscle fibres do not need to be damaged in order for muscle growth to occur. Mechanical tension (detected by mechanotransductors in the muscle and converted to signals that drive hypertrophy) is the primary driver of muscle protein synthesis (the creation of new muscle filaments, resulting in hypertrophy).
Whether or not a muscle grows after exercise is determined by whether the total amount of muscle protein synthesis that occurs following that bout of exercise exceeds the amount of muscle protein breakdown in the same time period. Because muscle protein breakdown rates depend on a huge number of factors, including training status, nutrition, age, sleep quality, and disease state, there's no fixed amount of protein synthesis required to cause muscle growth. So even if we could accurately predict the amount of muscle protein synthesis that a workout would cause, we still wouldn't know if it was enough to cause muscle growth.
We can measure muscle protein synthesis in exercise science labs, but the procedure involves feeding participants 'labelled' protein containing radioactive isotopes, getting them to exercise, and then stabbing them with a horrifyingly large needle in order to extract muscle tissue for analysis, and measuring how much of the labelled proteins were incorporated into new muscle. It's totally impractical for consumer use.
Realistically, the only reliable ways for a person to determine whether hypertrophy is occurring is to try to detect it after the workout, by:

Whether the limb is increasing in circumference over weeks or months.
Whether you are able to perform more reps at the same weight or lift more weight for the same number of reps compared to previous workouts.
Whether your scale weight is increasing without apparent increases in body fat. (e.g. Looking for increases in weight without increases in waist circumference.)

If you weren't detecting improvements though these metrics, that's when you'd need to look why that was the case, with the most likely causes being insufficient quality or volume or training, or insufficient nutrition.

Hypertrophy detecting machines?


Does the 4 GB Xbox 360 have enough space for 5 gamer profiles and saved games?

Question: I have just recently decided to buy my younger brothers an xbox 360 slim for their birthday. I would like to save as much money as possible so I am looking to get them the 4GB system. I understand there is 246GB difference in the systems, but should I really worry about this if all they are doing is saving gamer profiles on the console and saving games? They will not be adding it to xbox live so there is no need to save downloaded data or anything else from live. Will 4GB be sufficient enough for 5 gamer profiles and saved content?
Comment: Sorry about my close vote, I voted after reading the title.  Shopping recommendations are off-topic, but asking about what will fit on the drive seems reasonable.  I've edited the title to reflect the question body.
Answer: Yes, that should have more than enough space for that. I've had my Xbox 360 for close to two and a half years, and after playing 100 or so games my profile takes up about 10MB. As for save games, I'm not sure how much space mine are taking but most save games are less than 1MB so there should be plenty of room for them as well.
If you do need more room and don't want to spring for the 250GB hard drive (now or later - it is cheaper to buy it with the console, though) you can always use USB drives for storage. The Xbox 360 supports drives up to 16GB.
Note that the vast majority of games don't require a hard drive, but some do. The only ones I'm aware of off hand are Halo 3, Halo 3 ODST, and Halo Reach. In this case, you can play the game but you can't play the campaign or Firefight in co-op mode (at least online - not sure if the same restriction exists for local co-op).
Comment: My gamerscore is 55,555, and my gamer profile is only 30 MB, so I agree with you about profiles. The vast majority of my saved games are under 1 MB; the biggest ones are games like Madden where a lot of info is stored, but even with a Superstar save and a Franchise save and roster update, that's still only about 13 MB. Without Marketplace purchases, I agree that the 4 GB drive will be fine for now.
Comment: I've had a Slim for several years, and I think you'd never have a problem if you don't plan to use Live, as you mention.  Also @Adeese I think your information about the Halo games is incorrect/misleading.  The Slim still has a disk, just a small one.  I don't think there would be any issue playing all of these games. Bungie recommends loading some of them to disk, but it is not required.  Now, Halo 4 on the other hand requires a disk load for online multiplayer - but then, with no Live that is not a problem.
Comment: @EBongo Not sure if this is still the case or not, but at least when Halo Reach shipped it required a hard drive for co-op: http://joystiq.com/2010/09/15/halo-reach-co-op-requires-hard-drive-4gb-xbox-360-slims-have-t/ . The article indicates MS might be working on a fix, but I don't know if that ever happened or not.
Answer: It has enough for a saved games, but a concern would be that it restricts you ability to download updates and DLC for games, which can interfere with your ability to play online. For example, Burnout Paradise's free updates along would use up 1/3 of your space. And while Burnout is an outlier in file size, it's still possible for free updates of an average number of games to fill that drive. On my 360, which I've had for a couple of years now, I have 9GB used up between DLC, updates, saved games and three albums.
Answer: I would think yes becuase my Xbox only uses at least 1 mb to save a game and I've played at least 6 games and its down to 3 gb but if you get a hard drive that will be better for space and  saving your account.sorry for my long sentences and using no periods I'm not from the America's I'm from Japan.


Grid texture in Cycles

Question: How can I make a grid shader from the following picture?
Comment: Do you mean "that looks like the following picture"? Here Anton Neveselov has made a node organization that could help you: Download the file,  append the Grid file that you'll find in the NodeTree folder. Then in your Shade Editor press shift A and search for Grid, plug it in the Principled. Play with the parameters to build a grid. To change the colors, select the node and press tab, you'll have access to a Brick Texture node, change the colors. https://www.youtube.com/watch?v=gsZoJBeAWGc
Answer: Add a brick texture. Set "Offset" to 0. Set "Bias" to 1. Set the height and the width to the same value. Select the colors by "Color2" and "Mortar". Use "Scale" to Scale.
Comment: The grid is warped if the mesh is unwrapped in a non-square shape, would be better if there's a universal solution.
Comment: This is just a texture which is universal. The wrapping is depends on the mapping like at any other textures.

Grid texture in Cycles


Random Material for Each Instance - Geometry Nodes - Blender 3.0.0 - Fields Workflow

Question: I can't figure out how to assign a different material to each instance in the new Blender 3.0 fields workflow. Is it broken? I don't mean using a color ramp, I mean having actual different materials for each instance.
Here's my attempt:
Comment: I still haven't quite figured this out, but I believe one issue is that the realize instances node needs to come before the material manipulation.
Comment: Instances itself doesn't hold whose materials..
Answer: I'm still far from having my head around geometry nodes, but I have a hacky solution. Instead of instancing a no-material cube then setting a material on the instanced geometry, make the instance already come with a material (and have a separate input instance per material).
The Instance on Points node seems to be able to select from a collection of input geometry (IIUC, feed an instance list into the Instance socket, enable the Pick Instances checkbox, and feed a random value into Instance Index). I can't figure out if there is a way to combine mesh-primitives into a collection suitable for this method, or if it only works if we have a standard collection from the Scene.
So a hacky workaround, have three separate Instance on Points, one for each material-cube, and instance on mutually exclusive Selection masks.


Is there a way to compute an Origin-Destination Matrix with multiple start point attributes?

Question: [QGIS 3.16] I am looking to compute an origin-destination matrix. However, from the starting point layer, I need to have multiple attributes within the matrix, opposed to the 1 linking attribute. Is this type of computation possible? I am not familiar with the log-side of coding the matrix.
Answer: I have figured out a way to circumvent my problem - joining the layers I needed works wonderfully.


Low sample size analysis with all effects in same direction

Question: I have multiple tests done on a similar subject (brain activity in different regions of the brain) I have a treatment group and control group. When comparing the two groups, on the 12 different brain regions, the treatment group had less brain activity in every region. However, because my sample size was 8 for treatment and 14 for control only two of them was significant. Is there something I can do to say that overall although 10 of the 12 regions didnt have significant it was likely because of low sample size for those and that there is a difference between the treatment and control overall? I know I could average all of the brain regions for each participant and do a t test on that but the sample size would still be low and this wouldnt be significant.
Comment: "I have multiple tests done on a similar subject"--by "subject" do you mean "topic" or "person/animal"?
Comment: How did you perform the comparison? The most conservative comparison would be calculating a within-subject average and performing the 21 degree of freedom test. Your belief [that the test is anticonservative and findings are a false positive] may be right, but it also may be wrong. For instance, if you killed all 8 in the treatment group, their brain activity is 0 and the design of 8 vs 14 is very well powered.
Comment: By multiple tests I mean topic. For example all 12 tests looked at brain activity but just different regions. I cant do within subjects because it is a between subjects design. I dont believe that the results may be false positive, I believe that there is an effect there, all brain regions had lower activity in the treatment condition. I was hoping there would be some kind of bulk analysis or something where I can analyze everything at once (all 12 brain regions in both the treatment and control participants) to increase the power.
Comment: Not quite an answer to my question... but I gather "subject" means "person". So you did multiple tests for difference in hypothalamus, preoptic nucleus, subhypothalamic region...  etc etc. using the same same sample of 8 vs 14. Correct?
Comment: Subject means topic (brain activity) there were 8 people in the treatment and 14 in the control groups. It is a between subject design. 8 have beeen on the medication (treatment group), 14 have not been. Scans on 12 different brain regions were done in each individual. Thanks for all your help!
Comment: I think you should revise your question. It's not clear what's going on. Use clear and consistent terms. In most experimental research, a subject is a person or an animal. Like the first two paragraphs of "methods section" of manuscript.
Answer: The first thing to know is: what do you want to test ?
Is it: 1/ that the treatment has an effect on all areas of the brain ? 2/ or that the treatment has an effect on at least one area of the brain. 3/that the treatment has some kind of overall effect.
If it is 1/, it seems you cannot show it. Perhaps indeed due to sample size. Imagine the treatment has a true effect of 10 in the 2 areas where you find significant effects, but only a true effect of 3 in the other areas. With the same sample size, it is possible to find significant effects in the 2 areas, and no effect in the other 8 areas.
If it is 2/, you almost got it. You may have however to think to adjust your standard errors to "multiple hypotheses testing".
If it is 3/, why not indeed consider all observations in a same regression. In this case, I would add to the regression area-of-the-brain fixed-effects.
Comment: It is more 1 that I want to test. I want to see essentially if brain activity is slower in the treatment group than the control overall. All effects were in the same direction (slower in the treatment group) and the p values all under .2 with 2 of the regions having a p value of under .05. For example would it be possible to combine all of the data for each region? For example add all 12 regions together for all participants? This would give N = 8*12 = 96 for the treatment group and N = 12*14 = 168 for the control.
Comment: I edited my post. I think you are more interested in 3/ than in 1/ (they differ). Please see above.
Plus: out of curiosity, do you work on Stata ?
Comment: No I don't work on stata. Sorry I'm not kind of new to stats? What kind of regression are you referring to? And what would be the response and predictor variables?
Comment: Area-of-the-brain fixed effect are dummy variables. For instance, for area A, it is 1 for all observations in area A, and 0 otherwise. So it implies adding 12 new variables. Or, more precisely, to estimate a "fixed-effect regression" with the id variable for the fixed-effect being the areas of the brain. Look at "fixed effect regression in your software on the internet or in your software". I hope it helps.
Comment: Note: if you follow such path, you will have to think in a second time to eventual clustering of the standard error per individual or area of the brain I think (it usually increases them a lot). But the design above is not something I already used as such, so I do not know exactly what to say here.


Why is power transmission carried out at low current high voltage?

Question: My textbook states that power is transmitted at high voltage and low current since $P=I^2R$ and as the current has a small magnitude, the heat dissipated across the transmission lines is less than when we carry it out at high current and low voltage. But $P=I^2R$ can also be written as $P=V^2/R$ and hence a discrepancy would occur. Where am I going wrong?
Answer: Here are the possible ways of writing power

Look at how resistance exists in wires. The power is inversely proportional to resistance if one uses the voltage as a criterion, the more resistance in the way the smaller the power transferred for the same voltage. The smaller the current the less power is dissipated by a given resistance on the way  and can be transferred where it is needed.
Answer: As we have $P = I\Delta V $, the same amount of power can be delivered either at high currents and low potential differences or at low currents and high potential differences. In either case, the same amount of internal energy is transferred to the surroundings by heat as you correctly pointed out, so the decision is made primarily based on economic reasons. From the definition of resistance, we have: $$ R = \frac{\Delta V}{I} $$ Hence, if low potential differences and high currents were used, the resistance of the materials would have to be lower in order to deliver the same power. Materials that have low resistances include rare metals like silver and gold that are too expensive to be used commercially. Hence the choice of low currents and high potential differences is made, so that inexpensive copper wires can be used that generally have a high resistance. This high potential can also be conviniently reduced or increased by a transformer.
Hope this helps.
Comment: Oh, alright. Thanks for clearing my doubt!
Answer: When we talk about high voltages we do not mean a high potential difference between the two ends of the wire. In any case we want to minimise the potential difference across the wire as this obviously means a loss of potential in the wire( the thing that is needed to power things)
in the equation
P=v^2/r
v is the potential difference across the wire, and R is the resistance along that stretch of wire. so by using this equation we can minimise the power losses by lowering the potential difference across the wires, Well how do we do this?
in P=IV  the V is the potential at a point(measured against 0 potential)
so if the initial potential is increased at the start of the cable, for the same power, the current must be lower. Which, reduces losses in the wire as per I^2*r.  Which means the potential difference ACROSS the cable is lower as less is being wasted as heat
You're confusing PD across the wire, vs the initial potential.
Which is exactly why "voltage" is such a bad word as it means different things


why does android emulator increase the RAM size automatically and make me fail to launch it?

Question: i'm using win7. To launch android emulator successfully, i set the RAM size 512MB in AVD manager. but when i launch the android emulator, it told me "WARNING: Increasing RAM size to 1GB" and "Cannot set up guest memory 'pc.ram': Invalid argument". Why does it increase the RAM size? What should I do?
Answer: I have found a solution for this problem.
I created a virtual device of API level 23.Then it gives me the error as yours.
Solution:
I download and install Android sdk for API level 19 from SDK manager(SDK Platforms,SDK Tools).
Then deleted my existing emulator device(api 23) and  after downloading system image for i.e. kitkat (api 19) that takes lower memory create a new AVD.

Then Running this one solved the error "Cannot set up guest memory 'pc.ram': Invalid argument". It runs smoothly in my win7
Answer: Probably its a requirement of the Android version that you are running.
RAM mimimun is dependent on architecture (32/64 bits) and screen size.
More info about this can be found here especifically section 7.6 memory and storage.
Hope this helps.
Answer: Increase RAM Size for Your Android Studio from 512 MB to 1 GB or Create new AVD Emulator with low version API (Ex: API 19, Kitkat).
Answer: I search many times for emulator error but every time i found the error emulator not working increase the RAM size...I increase mn RAM 1GB and now its work....try this


With IBM MQ, how can I get the exact time that a message arrived in the queue?

Question: On the receiver side, I need to know how long the message stayed in the queue before I got it for processing.
I'm using Java and JMS.
Answer: Upon further searching, I found a post in this forum with a similar discussion:
http://www.mqseries.net/phpBB2/viewtopic.php?t=71092&sid=97f90533407247be7150d81d550538a1
It's a convoluted solution but it appears to be the only way to know when a certain incoming message was effectively received.
It involves setting up an exit program that process outgoing messages, and if it is a COA, save the current timestamp (with messageId/correlationId) somewhere for later processing.
But the big question is: why don't IBM implemented an "arrival timestamp" property in the first place? It looks a trivial thing to do...
Answer: You can access JMS_IBM_MQMD_PutDate and JMS_IBM_MQMD_PutTime properties - see WMQ documentation. Bear in mind though this is the time when the message was put on the origin queue - when the message travels across queue managers this timestamp doesn't change.
If you can't use these properties directly - either you can't trust them or/and you want to only track the local PUT timestamp - then you don't have too many choices. The simplest recourse in my opinion would be to have a simple intermediate program at the same node, getting the message off the queue and putting it on another queue you will be actually servicing. As long as you care only about the payload and not the message context this simple setup will do. If you do need to carry over some context such as original userid, then you will need to use SET_*_CONTEXT options (and proper authorizations.) If you do not like the idea of an intermediate program I guess your last resort would be a channel exit at the receiving side, but in most cases that's quite an overkill.
In a completely different vein - depending on your actual requirements you may find that instead of tracking the time spent on the queue by every single message you may instead use MQ performance events, specifically queue service interval event to make sure you keep servicing your input queue quickly enough. You can take corrective actions if the service interval gets above your threshold.
Comment: There is similar functionality withing Monitoring, The metric `QTIME` which can display short term and long term average-on-queue in microseconds. It requires `MONQ` to be active.
Comment: In my case, that property can't be used because the sender clock is untrusted. And if the message gets stuck in xtmit queue for any reason, I should not compute that time.


How to sex ID my plant?

Question: I have a cannabis plant in it's 2nd year. It hasn't flowered yet. I live on the west coast & I kept it in a small container & brought it in over winter. I kept it under a small flouresent strip light.
Can I gender ID it before it flowers? It's now mid July.!
Answer: It's easier to tell by watching for formation of the little buds that will grow into flowers - these look like little balls on both sexes, and also on hermaphrodite plants, but the female buds will have little hair like extensions on them. Hermaphrodite plants are treated the same as male plants - unless you're wanting to collect seed, they are removed and disposed of, so you will need to check all the little balls you can find to see if some have no hair like extensions and other ones do.
Male plants tend to produce a thicker stalk with fewer leaves, so it is possible to tell before bud formation, but if you're only growing one plant, you have nothing to compare it with. Step by step guidance here https://www.wikihow.com/Identify-Female-and-Male-Marijuana-Plants
Comment: Thanks. That's useful to have as a ref.

How to sex ID my plant?


To Preheat Or Not

Question: I read a recipe that said don't preheat the oven when baking a pound cake. Why wouldn't you preheat the oven? Every recipe I've ever read said preheat the oven. This is really confusing to me.
Comment: Welcome to the site! Would you please include a recipe you've read that said not to preheat the oven for this particular cake? You can press on the gray word edit, or just on this [edit] and add it right in to your question. We're a bit different from some other sites, so since you're new, we invite you to have a look at the pages of our [help]. I find that [ask] is a good place to start. We're glad you're here and hope to be able to help you! Have fun!
Answer: I have seen (yeast) bread recipes that rely on an un-preheated oven and seem to take advantage of the slow heating process (give the leavener some time to act before incapacitating it by overheating). While pound cake is unlikely to use yeast, there was likely a similar idea on the recipe writers mind. Maybe getting a somewhat denser texture by firming the outer layer before activating the leavener in the core is the goal here. Such recipes tend to be unreliable because they make many assumptions about the bakeware and oven used.
EDIT: Another reason for somebody to develop a recipe that does not use preheating would be simply saving active time, especially for people having slow-to-preheat ovens - mix, put in cold oven, start oven, set a timer and step away.
Answer: One obvious reason is to avoid wasting energy.  A lot of people tend to like recipes which avoid preheating for this reason alone.
But, assuming that there's more than that here, my guess is that the recipe is trying to use the slower heating as a way to achieve a greater rise.  Whether your pound cake recipe relies on leavening (such as baking powder/soda) or whether it's a traditional pound cake recipe that relies only on the air bubbles beaten into the batter while mixing, a gradual temperature rise can in some circumstances result in more expansion.
Basically, baking is a race against time in crust formation vs. internal expansion.  You want to allow enough time for the internal gas bubbles to expand and make the cake (or bread or whatever) lighter, because once the structure starts to harden (with egg coagulation, and then starch gelatinization), you can't expand any more.  On the other hand, as a cake or loaf rises, it becomes increasingly unstable.  If you wait too long to form a crust and then stabilize the internal structure, your whole cake could collapse.
Frequently, the inside portion of a cake or loaf continues to expand even after the crust hardens, resulting in cracking on the top surface (common in pound cakes, perhaps even desirable according to some).  In extreme cases with things like yeast breads, it can even result in a "blow-out" where the pressure from internal expansion literally blows a big hole in the crust.
With pound cakes, this balance can be a particular problem.  As already mentioned, hardening the crust too early can result in excessive cracking.  But hardening the crust later can also be a problem if the internal structure is unevenly heated (and thus unevenly stable).  If the crust hardens while the cake is rising very high (e.g., from rapid expansion under high oven heat), but the internal structure is unstable underneath and collapses a bit, it can result in the "crust separation" where there's an air gap between the top crust and the rest of the cake.  It's possible that heating more slowly can make that less likely by heating the whole batter more evenly and ensuring the internal parts of the cake are closer to setting along with the top crust.
Anyhow, to generalize a bit more, one of the reasons to slowly heat a baked good is to try to allow more time for a gradual expansion.  On the other hand, internal air within batter/dough will eventually "leak out."  It's actually a continuous process, since batter/dough is permeable to air.  With cake batter, you can often actually see bubbles rising and popping on the surface of a cake early in the baking process.  So you need some structure and crust to form to prevent all that air from escaping and collapsing your batter too.  The trick, again, is to balance the time given for bubbles to form/expand vs. how fast the cake sets (i.e., structure hardens).  That's actually one of the primary reasons for different baking temperatures in different leavened baked goods.
While allowing expansion during preheating can sometimes be helpful, it's also hard to manage.  Ovens don't preheat at the same rate.  If your oven preheats too slowly, it could actually cause your batter to rise too much before it stabilizes, thus resulting in collapse.  As pointed out in another answer, some ovens with radiant heat elements (especially electric models) can actually introduce a "broiling" effect on the outer surface during preheating, which could counteract the positive effects if the "broiled" crust hardens early and prevents further expansion.
Since it's less predictable, most recipes tend to recommend preheating for things like cakes and pastry.  And no matter what, you'll have to monitor doneness more frequently the first few times you do a recipe like this in a particular oven, since the time window for being "done" will likely vary much more significantly for recipes that don't preheat.
Answer: Without seeing the recipe and likely experimenting, it is hard to know for sure, but a few thoughts on pre-heating:
The shorter a cooking time, typically the more important it is to preheat. If you are doing a 5 minute cookie bake, you are unlikely to get your desired results if you fail to pre-heat.  If you are doing a 6 hour roast, well, you are probably just wasting energy preheating.
The general idea is, if your recipe calls for a temperature for 30 minutes, then it needs to be up to that temp and stable before you start.  A counter argument is how can it be when you open the oven to put the item in and radically lower the temperature when you do that.
Part of the tradition of most recipes saying to pre-heat was wood stoves especially, but older models in general which heated slowly and one person's might take longer to come to temperature than someone else's.  So, baking for 30 minutes in my stove that comes to temperature in 10 minutes would result in half cooked in someone else's over that took 20 minutes to come to temp, and burnt for someone else who pre-heated, so the pre-heat command put everyone on an even field.  Today, most ovens heat up fairly quickly so it is less of an issue other than for shorter cooking times and things that need precision such as delicate pastries.  BUT, and this is a big but, with many modern ovens which heat to temp quickly, they do so with higher power.  So, if you put things, especially short cooking time items, rather than taking longer to cook, they will burn, but may also be half raw.  While you have you oven set at say 350F, it may actually be pouring 500F heat at your dinner rolls until the full oven temp stabilizes, and you end up burning the surface while not getting the middle cooked.
Now, one reason I can think that a recipe might specifically say not to pre-heat would be to take advantage of this.  That initial higher power while the oven is heating and stabilizing could help form a crisper crust and then allow the bulk of the cooking to occur at an effectively slightly lower temp, similar starting an item at a high temp and then allowing the temperature to fall as is sometimes done for a bread with a crisp shell like crust but delicate interior.  The effect would be a lessor example of this.
Comment: I don't think ovens "overheat" when they're preheating... the heating elements are either on or off... there's no high power boost, afaik... If a recipe really wants to start off at a really high heat and then settle at a lower temp, the most consistent way of doing this is setting the oven for the higher temp (say 450) and then turning the oven down shortly after putting the food into it. This is consistent across all ovens.
Comment: @Catija - they don't "overheat" in the sense that the ambient temp throughout the oven is not going to be greater than the programmed bake temp. But there are plenty of ovens with exposed heating elements (more common in electric models, but also possible in gas oven broiling elements) where radiative heat during preheating is much greater than radiant heat while maintaining temp. And that can trump the smaller amount of heat conducting directly from the air, thus broiling the surface of food during preheating. For more sensitive foods in some ovens, it can potentially burn the surface.

To Preheat Or Not


How would my databse grab the files in my server?

Question: So I was thinking and thinking and couldn't figure it out. So I was following this tutorial which I want to implement on my site https://www.w3schools.com/php/php_file_upload.asp and on the tutorial when the user uploads their image it sends it straight to a folder, which will obviously be in the server files. Now my problem here is, if I want to display their image somewhere on their profile when they upload it, how would I go about grabbing the image from the folder, or do I have to change the code on the tutorial so that it saves in my database? I really have no clue, and I am now officially lost and anxiety is slowly falling down my imaginary tears that are illustrated by my depressed brain, and yeah.
Answer: You save the images in a specific folder, then save the filename in the database. Whenever you want to retrieve this file in your front-end you just take the filename from the database and link to wherever you put the file.
Comment: Could you explain to me what you don't understand? The answer should be pretty self explanatory.
Comment: Yes, after submitting the form, you make your php code get the filename from the uploaded file, then insert it into the database.
Comment: could you elaborate on' save the filename in the database'
Comment: so I think i sound stupid right now but, i dont think i understood correctly, I save the filename in the database by making another column in my users database called 'examplename' and then inside the column i save the file/folder name which is located in my server?
Comment: oh... so when they click 'upload' the image will be saved on my server folders but aswell as that I will have to make my php code grab that file name ( although I am not completely sure how to do this) and store it in the database and then when i want to display it somewhere for them what do I do... sorry.
Comment: Yes, exactly! That's what you do. You'll probably find some a good tutorial [Here](https://stackoverflow.com/questions/28807449/file-upload-php-get-only-file-name)
Comment: but when I want to display that image, what do I do, could you eidt your answer to show me an example plzz


Buffering output stream

Question: I'm looking to toggle a pin on and off in a fast and timing-sensitive manner, and I'm wondering if the Arduino Uno has any built in "buffers" that would be able to hold a set of values and send them sequentially to the output pin at high speed, separately from the rest of the loop. I could then refill the buffer with the next set to be outputted, and so on.
Is this even possible? If anyone has any documentation on what's involved, I'd really appreciate some links (or tips!) :) thanks
Answer: The closest thing to what you describe is DMA (Direct Memory Access). The Arduino doesn't have DMA. More powerful microcontrollers often do, but not little 8 bit ones.
The closest you could do is to use a timer interrupt to run a small function periodically which reads the next value from an array and sets the pin to that state.
The TimerOne or TimerThree libraries can be of help to you here.
Answer: For most Arduino devices, using the USART in SPI mode is about the most effective way to generate a hardware-timed stream of bits out of one pin.  For background, see §21, "USART in SPI Mode", in the ATmega328 data sheet.  For some example code and exposition, see ATmega Arduino USART in SPI Master Mode MSPIM,
Posted on February 17, 2015 by feilipu.
Ordinary SPI output on most Arduinos is single-buffered, hence subject to occasional delay if other interrupts get in the way of the SPIF-SPIE-SPDR interrupt handler.  However, the USART-in-SPI-mode method double-buffers output as well as input, allowing continuous data output.  That is, one can generate a continuous stream of bits clocked out at whatever rate one selects.
The Arduino Due is based on the Atmel SAM3X8E ARM Cortex-M3 CPU, a 32-bit ARM core microcontroller.  It supports DMA (direct memory access) and one can find webpages, eg arduino.cc topic 219291, describing waveform generation using DMA and the 12-bit DAC (digital to analog converter) on the Due.  More notably, the Arduino software compatible Teensy 3 series uses Cortex-M4 and M4F chips on boards running at 48, 72, 120, and 180 MHz, probably more suitable for elaborate waveform generation than are the Due or Zero.

Buffering output stream


Possible to rsync to Amazon Glacier?

Question: I have an Ubuntu 14.04 server that I need to incrementally backup nightly, preferably with rsync. Amazon's Glacier looks like a good option but none of the online tutorials I'm finding do incremental backups. Is this possible? If so, I'd appreciate some steps or being directed to an online guide. (I have the AWS account set up and glacier installed. I just need direction specific to rsync.)
Answer: Not possible with rsync.  Glacier uses its own protocol for uploads, and requires that catalogs/indexes of the backups be retained by the client software that uploads the files.  Once you store an "archive" in a Glacier "vault," the archive is as opaque to you as if you were examining a physical backup tape with your eyeballs to see what content it contained.
Glacier is an excellent service, but not a match for this application by itself -- it requires client software that plays an active role in backup management, since it isn't possible to directly "compare" local files with what was stored in Glacier.
The Glacier interface from S3 comes closer to to this, since when you get to Glacier via S3 you can still see object metadata, but again, purpose-specific software would be needed for such backups.
Answer: Someone has written a python script that allows you to run rsync-like processes to AWS / Amazon Web Services with Glacier. See the GitHub page.

AWS Glacier Rsync Like Utility
Rsync like utility to back up files and folders to AWS Glacier.
Utility can compress files and store on Glacier. Archive ids will be
stored in an sqlite database.
You have to log in to aws with aws cli and create a glacier vault
beforehand.

Possible to rsync to Amazon Glacier?