How to temporarily remove one hinge on a door with two hinges

Question: I have several interior doors with two hinges, where some of the screw holes are stripped. Using longer screws or toothpicks and glue didn't work, and I would like to fill the holes with epoxy and drill new holes in the epoxy. But I don't want to take the door off the frame. Is it possible to place shims under the door to support it while I remove one hinge at a time?  Details on how to support the door would be helpful.
Comment: If toothpicks and glue didn't work and longer screws didn't work, you might have a bigger problem such as rot.  Your epoxy is only going to be as good as what is holding it.
Comment: @frankc  Your door is 102 years old and is heavy enough to pull out screws?  I'd consider adding one or more hinges, and potentially replace the existing pair as well.  You could even move the top and bottom-most hinges further out, so they're in un-damaged wood in the frame, and fill in the old hinge rebates before painting.   Comment, cos not an answer to question as asked.
Comment: You won't be able to use the door as you are fixing it.  Epoxy or dowels will take time to dry enough/fully before you can replace the screws.  As the answer states, removing the only only takes a few seconds.
Comment: Attempting to prop up the door with one hinge still attached can put significant stresses on the hinge in ways that it wasn't meant for.  For example if the bottom hinge is the one still attached and has three screws, there will be some horizontal force as the door tends to want to fall over.  You can minimize this, but not get rid of it.  In this case the middle screw acts as a point for rotation to occur and the door is a big lever.   The top screw will be pulled one way and the bottom the other.
Comment: Hammer a wooden golf tee into the stripped hole, put some wood glue in the hole before insertion. Cut flush. Reinstall screw.
Answer: Your best bet is to simply remove both hinge pins and remove the door from the frame. Attempting to swing it and prop it open on only one of two hinges will carry a not insignificant risk of the door falling and ripping the other hinge out of the door (most likely for standard, hollow-core interior doors) or frame.
On the rare occasions that the hinge pin isn't removable (for any reason), remove the screws from both hinges and take the door off while repairing the holes in the jamb.
Comment: I have propped up doors while fixing the hinges, and havent ripped one off its hinges yet.
Comment: @SimonB I'm sure you have, and I'm sure others have, too. However, doing so adds a significant _risk_ (not guarantee) of doing more damage. Removing the door completely eliminates that risk and all the other steps others are suggesting in other answers to ensure the door doesn't topple, causing more damage and possibly injuring someone.
Comment: This is the correct and easiest way to remove a door, until you cannot get the hinge pins out; corrosion, wear, position/access, multiple layers of paint, hinge design...
Comment: @7caifyi That's why this answer starts with "your best bet...". It's not always possible to remove the hinge pins (my bathroom door at home, from the 1920s or so, doesn't seem to have removable hinge pins at all...), but, if/when it's possible, that's the "best option".
Answer: Yes, it is possible to hold the weight of the door on shims.  Door wedges would be ideal.  Otherwise, open the door then jam under whatever will fit.
If you're removing the top hinge, the door will want to fall over sideways.  Make sure it's propped up on something sturdy, such as a heavy bit of furniture.
Then avoid doing anything to the door until your filler has dried, and both hinges are back on again.
Comment: Thanks for the suggestions. I ended up 1) opening the door all the way so the hinge-edge of the door was adjacent to the jamb, in the same plane, 2) jamming an object under the door to support its weight (102 yr old, heavy wood door), and 3) screwing a steel mending plate to the door edge and to the jamb , near the top, to prevent the door from tipping over. Then I was able to unscrew the top hinge without the door moving at all.
Comment: A door wedge is good, two works better when one is inverted.  That leaves the top face flat under the door, so its less likely to rotate.
Comment: If possible, I'd open it against a heavy piece of furniture, support it, and put a strap round the door and furniture  before removing the hinge.  That way if something goes wrong (e.g. it turns out the other hinge is barely attached, or someone catches something on the door while squeezing through the work area) it can't start to fall while you're working there
Answer: I agree with the answers suggesting wedging the door and propping it from the side so it can't tip over. Only if the door is particularly heavy might this be unacceptably risky to you.
But definitely use glued dowels rather than epoxy. Obviously, drill out the stripped screw holes in the wood to clean them up and make the dowels fit snugly - don't just hammer a slim dowel into the damaged screw hole! If they are a sufficiently tight fit then you can drill and refit the hinge straightaway without waiting for the glue to dry, though it wouldn't hurt to keep the wedge and prop in place for 24 hours just in case.
I've actually done this without even removing the hinge - one screw at a time - by finding a dowel that was small enough to push through the hinge holes, yet large enough to be a very tight fit in the wood. (The hinge had somewhat large holes.)
Comment: @FreeMan Yes, that often works. But in this case the OP said that they already tried toothpicks and glue.
Comment: I've done similar several times where "Dowel" = "several toothpicks or wooden matchsticks crammed in with lots of glue". Will usually last for several years.
Answer:
Is it possible to place shims under the door to support it while I remove one hinge at a time?

Yes. Should you? Probably not with shims alone.
Epoxy usually has a 24 hour cure time and the risk of you knocking the door over in the meantime is not negligible.
If you have several of these doors then you could fashion some sort of wide-stanced brace to prevent the door from falling forward or backwards while you do your work. Make the bottom plate thin enough to go under all of your doors and shim for the ones further off the ground.
Answer: There are a few possible solutions:

Use a Winbag Air Wedge. This is a bag that can be pumped up with air to support the door. This will not hold the door in place however so the door could still tilt and fall. You would need to combine it with something to hold the door upright
Build a simple jig that fits around and under the door. You would slide this into the open door and it would support it from tipping or drooping. I imagine something similar to a bike rack where the tire is supported


How to Override the OK button in Reminder notification

Question: I use ScheduledActionService to create a reminder with Uri.  I like to know:
1) It is possible override the ok button or to write some code in the OK button which shows inside the reminder notification that pop up when time is due?
2) How to change the project name that display inside this reminder notification?
Thanks.
Answer: 1) No, reminder look is not possible to change. All reminders must be freely recognizable be a user.
2) You can change it in WMAppManifest.xml (Title="") or in project settings: Application - Deployment options - Title.
Comment: Add url to your reminder: `NavigationUri = new Uri("/MainPage.xaml?from_reminder=1", UriKind.Relative)`. Than check in `OnNavigatedTo` if app launched from reminder or not: `(e.NavigationMode == NavigationMode.New && e.Uri.OriginalString.EndsWith("from_reminder=1")) { //Reminder code }`
Comment: Thanks. I am not changing the look or design of the Notification. I want to add some code insie the OK button to perform some tasks. So, can override the OKButton??
Comment: thanks.Understand this step. very helpful. But I want to do something when I click the Okbutton when this notification pop up. I understand by clicking the Title of reminder with Uri will send to the page.
Comment: Where are you see OKButton? On reminder you have Snooze button that shifts reminder to few minutes, Dismiss button that closes the reminder and the Message area above buttons that launches your app. If you want to do something when user clicks on a Message area but don't launch your app, you could try some dirty hack: add very light page (probably even in different assembly) and pass Url to reminder to this page. On this page call something and throw an Exception that closes your app. Probably, your user won't see that what's happening but your code is called.
Comment: Sorry for the confusion. you are right. I am talking about this snooze btn. So, I want to know, it is poosibe to override this snooze button so that user dont cick the messsage area to be transfered to the page indicated by the URI. I want to do some task. The snooze task is to reschedule the reminder. Can I do something else ? thanks
Comment: Thanks. I m you are right. Hope next time they can enhence this feature.
Comment: you could try some dirty hack: add very light page (probably even in different assembly) and pass Url to reminder to this page. On this page call something and throw an Exception that closes your app.
Comment: There is an example project that changed tile when reminder is fired (you must manually pin to start the app):  http://www.fileserve.com/file/7qFbxGm/reminder.zip


Raster to point

Question: I have a raster (5km pixel side) and I want to create a shapefile of points, one point per pixel (like a centroid), each point carring the correspondent pixel value. I run "RasterToPoint"tool in ArcGIS and it generate millions of points (cannot understand why). Does someone have aclue on how to proceed?
Answer: Problem was that the raster was the output of the "zonal statistics tool", where I used a 5x5km vector grid as reference. I thought the raster was automatically resampled at 5x5km pixel size, but it was not. Basically it was 30x30m pixel size and this is why I got such a huge amount of points.

Raster to point


Word choice: An example that is used throughout a thesis

Question: I am writing a thesis in which there is an example that will be used throughout the thesis (repeatedly) to illustrate various methods or various aspects of the theory. I will introduce the example in the first chapter and want to use an adjective for it to emphasize the fact that it will be used throughout the thesis. But I don't know the word. I'm thinking of "standing example" or "recurring example" but they don't sound right to me. Which word should I use in this case?
Comment: Label the example with a number. Let's say it is labeled with a 6. Then you might say 'As in example 6'. Yes, 'standing' and 'recurring' are logical choices. Can you give a couple sentences where you use 'example', that will help for more substantive synonyms.
Comment: I like the idea of using "recurring," and alerting the readers that they will be seeing that example again throughout the thesis.  Somewhere as you introduce it, say something along the lines of, "This example will be recurring throughout the thesis."
Comment: Could you call it your "key example"? (If it's the only example that recurs and is the most important of your examples, that might work.)
Comment: In the thesis I will have several examples. However this particular example is special because it will be reused many times to illustrate the points discussed in the sections. Thus I will introduce that example in the first chapter of my thesis.  I want to find a suitable adjective to emphasize that fact of this example. For instance, when I introduce the example, I may write e.g. "Let us introduce a *** example..." or "In the next section we present a *** example...", where *** will be the adjective. I think *** could be "standing" or "recurring" but I'm not very happy with these choices.
Comment: A great deal depends on what field this is; they all have their own conventions. And what kind of thing is this example? A word? A sentence? A quotation? A steroid molecule? A Mozart sonata? An algorithm? A tree diagram? You see the problem in generalizing, I hope.
Answer: I guess 'running example' is also an option.
Usage: http://www.gnu.org/software/sather/docs-1.2/tutorial/employee.html
Comment: I think this is a good choice. A quick internet search reveals quite a number of papers and dissertations in my field using "running examples."
Comment: Other suggestions are good too, e.g. "key example", but it seems that "running example" is more popular in my field.
Answer: Though it's difficult to say without knowing a little more, such as the topic, or how the example is to be presented, these are the words that come to my mind
Standard
Definitive
Authoritative
General
Generic
Average
I also like JLG's suggeston "key".
Answer: I suggest referring to it as the principal or primary example, from that sense of primary that means "That which is placed ahead of others".  You'd write, "The primary [or principal] example used in this thesis is ...", and later, "Referring again to our primary [or principal] example ...", etc.
If the example is in some sense standard or definitive, consider calling it

a canonical example, meaning a standard or normal or prototypical presentation of something;
a model example, following the sense "A praiseworthy example to be copied";
a reference example or reference case.

If you want to emphasize that the single example covers or includes aspects from many others, you might refer to it as inclusive, all-inclusive, a catch-all or umbrella, versatile, or overarching.
All that said, if the example contains a distinctive keyword or keywords in its description, for example Westgate, then use it or them in your references.  At the outset, you might say "The principal example used in this thesis is the following Westgate scenario...", and thereafter, "Referring again to Westgate, ..." or "Referring again to the Westgate scenario, ..."


Find largest $k$ such that the diophantine equation $ax+by=k$ does not have nonnegative solution.

Question: It is given that $a$ and $b$ are coprime positive integers. My question is, what is the largest integer $k$ such that the diophantine equation $ax+by=k$ does not have any solution where $x$ and $y$ are nonnegative integers ?
Comment: Does this answer your question? [Largest integer that can't be represented as a non-negative linear combination of $m, n = mn - m - n$? Why?](https://math.stackexchange.com/questions/66963/largest-integer-that-cant-be-represented-as-a-non-negative-linear-combination-o)
Answer: This $k$ is called the Frobenius number and equals $ab-a-b$ (http://en.wikipedia.org/wiki/Frobenius_number#n_.3D_2).
Answer: Let $a,b$ be positive integers with $\gcd(a,b)=1$. Let $S=\langle a,b \rangle=\{ax+by: x, y \in {\mathbb Z}_{\ge 0}$ denote the numerical semigroup generated by $a,b$. Then the gap set of $S$,
$$ G(S) = {\mathbb Z}_{\ge 0} \setminus S $$
is a finite set. The largest element in $G(S)$ is denoted by $F(S)$, and called the Frobenius number of $S$.
It is well known that $F(S)=ab-a-b$. Here is a quick and self-contained proof.
If $ab-a-b \in S$, then $ab-a-b=ax+by$ with $x,y \in {\mathbb Z}_{\ge 0}$. But then $a(x+1)=b(a-1-y)$, so that $b \mid (x+1)$ since $\gcd(a,b)=1$. Analogously, $a \mid (y+1)$ since $\gcd(a,b)=1$.
Since $x,y \ge 0$, $x \ge b-1$ and $y \ge a-1$. But then $ax+by \ge a(b-1)+b(a-1)>ab-a-b$. Thus, $ab-a-b \in G(S)$.
We now show that $n>ab-a-b$ implies $n \notin G(S)$.
Since $\gcd(a,b)=1$, there exist $r,s \in \mathbb Z$ such that $n=ar+bs$. Note that the transformations $r \mapsto r \pm b$, $s \mapsto s \mp a$ lead to another pair of solutions to $ax+by=n$. So if $r \notin \{0,1,2,\ldots,b-1\}$, by repeated simultaneous applications of this pair of transformations, we can ensure $r \in \{0,1,2,\ldots,b-1\}$. So now assume $n=ar_0+bs_0$ with $0 \le r_0<b$. Then
$$ s_0 = \dfrac{n-ar_0}{b} > \dfrac{ab-a-b-ar_0}{b} = \dfrac{a(b-1-r_0)-b}{b} \ge \dfrac{-b}{b} = -1. $$
Thus, $s_0 \ge 0$, and so $n \in S$. $\blacksquare$


What do you call a person who does not take risks (or who does not like taking risks)?

Question: I want one word which best suits a person who does not take risks (or one who does not like taking risks).
Comment: Welcome to ELU. I suggest *cautious; circumspect; risk-averse.* Those may not quite fit, but you can probably look up synonyms which may be better.
Answer: There's the relatively new term, found in psychology, business, economics, politics, etc. risk averse.
If you want to cast the tendency in a very negative light, there is coward and a great many colloquial and slang terms along that line, some of which are offensive (chicken, yellow, pussy, pusillanimous, chicken-shit).
More neutral, and less jargon-ish than risk averse, would be cautious, wary, timid.
More positive would be judicious, prudent.
Comment: Changed "adverse" to "averse".
Comment: @terdon if you ever want to vocally call someone a coward, I strongly recommend using *pusillanimous* and *chicken-shit* in the same noun phrase; there's a quality to the gestalt of "You pusillanimous chicken-shit!" that neither word has on its own.
Comment: **prudent** would get my vote.
Comment: +1 for writing _pusillanimous_ and _chicken shit_ in the same sentence.
Comment: Thanks @RussellMcMahon though you missed where I repeated the mistake (make a mistake once and it's easy to keep doing it), fixed now.
Comment: I think *chicken-shit* alludes to the comparative worthlessness of the substance, rather than the proverbial cowardice of the shitter.
Answer:
pru·dent   /ˈpro͞odnt/ Adjective Acting with or showing care and
  thought for the future. Synonyms cautious - discreet - wary - careful
  - circumspect
cau·tious   /ˈkôSHəs/ Adjective Attentive to potential problems or
  dangers. (of an action) Characterized by such an attitude. Synonyms
  wary - careful - prudent - circumspect - chary - discreet

and my personal favourite

cir·cum·spect   /ˈsərkəmˌspekt/ Adjective Wary and unwilling to take
  risks. Synonyms cautious - wary - prudent - careful - discreet
Comment: +1. I like "cautious". But I haven't heard "circumspect" being used to mean specifically avoiding risks. I thought it was more to do with making well-considered decisions. What dictionary did you use?
Comment: I used the broadest dictionary I know: I googled "circumspect definition", which gave me Web definitions from Dictionary.com, Answers.com, Merriam-Webster, The Free Dictionary, and others.
Answer: If you are referring to someone who does not take risks because they are very careful in making decisions or in dealing with anything, you could consider 'meticulous', too.
Comment: Sky divers tend to be extremely meticulous when it comes to their parachutes, but aren't normally considered disinclined to take risks. Certainly one reason to be meticulous is to reduce certain risks (those caused by carelessness), but it does nothing to reduce other risks, and is not the sole reason for being meticulous (pride in a craft would be a strong reason, not much related to risk, as would sheer enjoyment of a task which would have no connection to risk at all).
Comment: @JonHanna: Point taken. But if one wishes not to take risks, one has to be meticulous. And the one who is meticulous, often avoids risks. So I believe, _'meticulous'_ does have something to do with not taking risks.
Answer: You could call such a person a pussyfooter who would be someone who acts "in a cautious or non-committal way". He/she would also be considered conservative or simply defensive.
Answer: The first answer I thought of (and before reading Andrew Leach's comment) is risk-adverse, which would seem to fit your definition exactly.
Comment: * risk-**averse**
Answer: Scaredy cat n. Informal
One who is excessively fearful.
When I was a girl attending a London school way back in the mid-70s, the kids used to play a game called "Dare" or a similar name, basically you dared your mate to do something really hard and/or shameful. For example, boys were often challenged to go into the girls' toilets, in those day the buildings were adjacent to the school playground, so everyone could see. If they refused, everyone would chant:  "scaredy cat, scaredy cat". I don't remember the tune any more but I remember the scorching humiliation whenever I refused a "dare"...


How to prove that $\lim_{x\to 0+}\left[\frac{1}{x^{3/2}}-\frac{1}{x^{1/2}\sin(x)}\right]=0$?

Question: This exercise $$\lim_{x\to 0+}\left[\frac{1}{x^\frac{3}{2}}-\frac{1}{x^\frac{1}{2}\sin(x)}\right]$$ was in my calculus III test at college, after trying hard to solve it I was not really able to do so, I know intuitively that this limit equals 0 but did not find an appropriate way to prove it, as the limit gives an indeterminate form $\infty - \infty$. I worked out the fractions and got $$\lim_{x\to 0+}\frac{x^\frac{1}{2}\sin(x) - x^\frac{3}{2} }{x^2\sin(x)}$$ which gives me an indeterminate form $\frac{0}{0}$, then using L'hopitals rule, the limit starts getting uglier as more indeterminate forms keep showing up. My college test is over, but, still I want to find out how to solve this limit, any help would be highly appreciated.
Comment: Are you sure you correctly recall it? The reason I ask is that it seems to me that the second term is essentially $1/x^{3/2}$, which blows up faster than the first term, so they can't cancel...
Comment: I'm sorry I had written one of the fractions incorrectly, question edited, now that is the real exercise
Answer: I wouldn't rationalise the denominator. Instead, stick with
$$\frac{\sin x - x}{x^{\frac{3}{2}}\sin x}.$$
Applying L'Hopital's rule,
\begin{align*}
\frac{\cos x - 1}{\frac{3}{2}x^{\frac{1}{2}}\sin x + x^{\frac{3}{2}}\cos x} &= \frac{(\cos x - 1)(\cos x + 1)}{\left(\frac{3}{2}x^{\frac{1}{2}}\sin x + x^{\frac{3}{2}}\cos x\right)(\cos x + 1)} \\
&= \frac{-\sin^2 x}{\left(\frac{3}{2}x^{\frac{1}{2}}\sin x + x^{\frac{3}{2}}\cos x\right)(\cos x + 1)} \\
&= \frac{-x^{\frac{1}{2}}\frac{\sin^2 x}{x^2}}{\left(\frac{3}{2}\frac{\sin x}{x} + \cos x\right)(\cos x + 1)} \\
&\to \frac{-0 \cdot 1}{\left(\frac{3}{2} \cdot 1 + 1\right)(1 + 1)} = 0.
\end{align*}
Comment: oh boy, this is what I was looking for, thank you very much.
Answer: Hint. By the Taylor series expansion, as $x \to 0$, one gets
$$
\sin x=x-\frac{x^3}6+O(x^5)
$$ giving
$$
\frac1{\sin x}=\frac1x+\frac{x}6+O(x^3)
$$ and, as $x \to 0^+$,
$$
\frac1{x^{1/2}\sin x}=\frac1{x^{3/2}}+\frac{\sqrt{x}}6+O(x^{5/2})
$$
Hope you can take it from here.
Comment: Hi, we had not been given Taylor series at college yet, so I guess there has to be another(simpler) way to solve it, anyways, thanks for your time and effort ;)


google app quickstart.php example how to change sheet

Question: So i have run through the guide of how to read data from a google sheet using their API. All works fine until i want to read from any sheet other than the one given in the example.
https://developers.google.com/sheets/api/quickstart/php
is there something else that i need to change as when I update the spreadsheet id to one of mine i just get the following
<code>Fatal error: Uncaught exception 'Google_Service_Exception' with message   '{
  "error": {
"code": 400,
"message": "Unable to parse range: Class Data!A2",
"errors": [
  {
    "message": "Unable to parse range: Class Data!A2",
    "domain": "global",
    "reason": "badRequest"
  }
],
"status": "INVALID_ARGUMENT"
  }
}
</code>
Any help would be greatly appreciated.
Answer: sorry guys the issue was that i was declaring the range wrong problem now sorted.


what is the suitable design Method to the filter?

Question: hi i'm going to design a low pass FIR filter for an EEG signal for the detection of eppileptic siezure and i want to know what is the suitable design Method to the filter? i need this FIR filter just to smooth the signal to use it for discret wavelet transform.
thanks
Comment: Hi! Are there any application specific constraints on the FIR filter to be designed? If so please specify them...
Comment: Low-pass filters  with 3 dB of ripple in the pass-band from 0 to 64 Hz and at least 60 dB of attenuation in the stop-band
Comment: Also the sampling frequency $Fs$ is required to define the cutoff frequency $\omega_c$ of the discrete-time filter, however, as your question states you are looking for a **suitable** design method? This suggests that your filter has some constraints such as minimum length filter ? If this is not the case then **any** method of FIR filter design should work.
Comment: the sampling frequency of the signal is 256  HZ
Answer: For a quick filter design without getting into trouble, I recommend avoiding any IIR structure and design an FIR using either least squares (firls in matlab) or Parks McClellan (firpm in matlab, remez in octave). There are plenty of answers here on how many taps you will need, (such as How many taps does an FIR filter need?) so you start with that for initial guidance and then refer to the specific help for firpm or firls for further design details using those tools.
Below is a slide I have on my typical design path for simple linear phase FIR filters. Starting with the specifications I estimate the number of taps, and then use that estimate to come up with (floating point) coefficients. I then confirm (using freqz in Matlab, Octave or Python typically) passband and stopband performance and adjust number of taps accordingly. Once the number of coefficients and values is settled, I then map to a fixed point implementation if needed using the guidance further given below and again confirm performance specifications. For final verification, especially if I have gone to fixed point, I do actual SNR testing with test waveforms through the filter at the maximum and minimum signal levels I would expect in my application using test waveforms. This is a good way to confirm that there are no disastrous overflow conditions or poor assumptions on quantization levels needed to maintain a target SNR directly at a component level test.

Design Tools:
Matlab: firpm, firls
Octave: remez, firls
Python: scipy.signal remez, firls
Online Tools:
Equiripple (Parks-McClellan): http://cnx.org/content/m12799/latest/
Least squares: http://cnx.org/content/m10577/latest/
Other tips:
Scale the output, let the filter grow the signal!  I think it was fred harris that had the view of analog filters attenuating signals out of band while digital signals grow the signal in band. I found that very insightful. To adjust the output level, scale after the filter; don't be tempted to adjust the output by scaling the input or scaling your coefficients (as it degrades SNR, output noise is accumulated noise from every tap and scaling coefficients increases their own individual error terms), beyond scaling to the proper precision setting as suggested below.  This is the reason for "extended precision accumulators"; they let the accumulated value from every tap grow and then once accumulated truncate the output in one location.
Coefficient bit width: A reasonable rule of thumb is to use at least 2 more bits for your coefficients than your datapath width if your datapath was sized based on SNR (or 2 more bits than your SNR requirement directly if your datapath is much wider than necessary).
You can also size the coefficient width based on your rejection requirement using 6 dB/bit (if you need a filter with 60 dB rejection, use 12 bits for your coefficients, with the coefficients scaled to fill that precision of course). Typically actual rejection achieved if limited by coefficient bit width is on the order of 5 to 6 dB / bit; I like to add at least the extra 2 bits for margin unless my design is severely resource constrained in that area.
Least Squares vs Parks McClellan (equiripple): In most of my design applications related to communications I have been more concerned with overall signal and noise than an absolute limit at any one given frequency, so typically use the Least Squares design method. That is the distinction between the two design choices (LS or P-McC) explained simply: Least Squares will minimize the error in a least squares sense, while Park McClellan minimizes the absolute error. Given the same number of taps, the total noise due to pass-band ripple and finite out of band rejection will be less with the Least Squares design approach when integrated over the entire waveform in time or over all frequencies, while the peak error at specific locations in time or frequency can be worst.
Answer: Given your sampling and cutoff frequencies in Hz, then your discrete time filter's cutoff frequency $\omega_c$ is $\pi /2$ for [0,$\pi$] mapping or 0.5 if you prefer [0,1] mapping.
This FIR filter will be very easy to design with the most classical window method provided by fir1 function of matlab/octave.
Or you can as well use equiripple FIR filter design such as provided by the remez function of matlab/octave (Parks-McClellan equiripple FIR filter design) if you think you need minimum number of taps to meet the specifications.
The window method with a hamming window gives you the coefficients as follows:
$$h_i[n] = \frac{1}{2\pi} \int_{-\pi/2}^{\pi/2} {1 e^{j\omega n} d\omega}$$
$$h_i[n] = \frac{\sin(n\pi/2)}{\pi n}$$
where $h_i[n]$ is the impulse response of the ideal lowpass FIR filter and the actual filter is obtained by windowing as
$$ h[n] = h_i[n] w[n]$$
Where $w[n]$ is a Hamming window of length $2N+1$. For attaining a 60 dB rejection in the stop band, with a small transition band, choose length N about 40. So this makes an FIR filter of about 81 taps. If this is too much computation or signal delay for your application, then you can consider using a Kaiser window instead. If a Kaiser window can still not meet your requirements, then apply an equiripple Remez (Parks McClellan) design.
An example FIR filter frequency response is plotted with 81 coefficients:


Combining Swordsage and Broken One Substitution Levels

Question: I want to be able to offer my DM suggestions about how this can work mechanically. I want to use the Broken One monk substitution levels from Champions of Valor 36-7 but use Tome of Battle's swordsage instead of monk. It seems that exchanging the swordsage class feature detect magic for the Broken One class feature locate creature at level 7 is reasonable, but what would be a fair house rule for the swordsage to acquire also the Broken One class features at levels 3 and 6 when at those levels the swordsage gains no special class features?
Comment: It doesn't really make sense to ask this question -- since it's not part of the existing rules, what should answers be based on?  If a DM agrees to allow this combo, they're probably going to ask you to lose something in return, but that's entirely up to them.
Comment: Roll back the edit if this isn't the question's intent.
Comment: @JackLesnie I don't see the same intent in the original question. What user88995 askes was "what benefits do I get from applying this template to this class?", which can't be done by the rules. HeyICanChan's edit is different enought to require approval by the original querent.
Comment: The intent seems to be pretty clear.. what's the problem?  He's asking how reasonable it is from a game-balance point of view to gain the Broken One Monk class features as a Swordsage.

Given that all it gives is Lay on Hands, Tenacious Tracker, and Locate Creature, it's very easy to weave that in.  Replace Insightful Strikes with Lay on Hands, and Sense Magic with Tenacious Tracker and Locate Creature.EDIT: Given the abilities are minor, you could even replace nothing, and the swordsage would be still basically the same balance level.
Answer: The fact that, lore-wise, a swordsage could be a member of the broken ones does not imply he could take a variant tought for a specific class.
What you need to acknowledge is that monks between the Broken Ones take the Broken One variant and this does not bar vanilla swordsages to be Broken One members.
If you wanted to get a swordsage variant for Broken One swordsage members, you should ask your DM for one. It's not automatic the benefits would be the same as the monk variant, just as there are different prestige classes aimed at differnt classes for memebers of other D&D orders (e.g. Nightsong Enforcer/Infiltrator).
Comment: The question has changed a lot since I answer it. I'm waiting for the querent to confirm the edit before touching anything in my answer.
Comment: -1: Unclear writing 'it's not automatic the benefits''monks between the Broken Ones', talking about lore and fluff in a mechanical question, insulting the asker.


How to use voting results to boost relevance for solr search?

Question: I am using search api with the solr backend to index thousands of nodes. All of them have votes (vote api). Now I am wondering how to boost the relevance of these notes by their vote. I don't want to sort the result completely by votes (this would be easy), but that the votes boost the node's relevance for a certain percentage. Is that possible? How to do this?
Answer: Do you have the voting api results in your apache solr index?
If you do and they are stored under a name ss_votingapi, here is what you need to do:
<code>/*
 * Implements hook_apachesolr_query_alter().
 */
function MYMODULE_apachesolr_query_alter($query) {
  $query->addParam('fl', 'ss_votingapi');
  $query->addParam('bf', "recip(rord(ss_votingapi),1, 1000, 1000)");
}
</code>
More here, here and here
Comment: My problem is, that I do not use Apachesolr module but Search API with Solr extension. Does anybody know what would be the equivalent of $query->addParam for Search API? Can't find it.


Is there an easy way to interface a receiving 457kHz ferrite rod antenna with a microcontroller (BeagleBone Black)?

Question: I have a (actually two crisscrossed) 457kHz ferrite rod antenna from the internals of an avalanche beacon where 196uH <= L < 204uH and C = 560pF. I need to be able to evaluate the data from the receiving antenna's signal to determine the distance between the transmitter and receiver with a BeagleBone Black. Originally I thought I'd be able to wire the antenna up to the input of an ADC on the board, but after spending hours playing around with a beacon set to transmit and the receiving antennas wired up to an oscilloscope I realized that the voltage signal (mean, amplitude, and rms) coming from the antenna really doesn't fluctuate much until the transmitting beacon is within very close range. What parameters of the receiver's signal are used to evaluate distance? Is there any easy way to interface these two parts?
Comment: Interfacing an antenna to an ADC falls under something called "software radio" and not just any old ADC can be used (though it being such a low frequenfy of 457kHz should make things a lot easier).
Comment: I don't know anything about avalanche beacons, but I always thought those beacons only determined direction via an antenna and not distance? Like those animal trackers.
Comment: @DKNguyen a lot of this RF stuff is really new to me. Modern avy beacons give you a distance reading in meters and they indicate the direction of the flux line they're picking up. They all have at least 2 antennas to prevent signal holes if the orientation of a buried victim doesn't line up with their buddy's transceiver. The old school analog beacons operated at 2.275kHz with 1 antenna and guided their users with audio tones.
Comment: *What parameters of the receiver's signal are used to evaluate distance?* none realistically. You can DF the source by using antenna rotation but the amplitude of the signal received is a very poor marker for distance.
Answer: Since you know the frequency, you might try either of these:
1) use an analog multipler such as MC1590
2) use a gated OTA such as CA3080 or (the triple) CA3060
3) build your own synchronous detector using analog multiplexors; remember to implement both Inphase and Quadrature channels.
4) use the NEE602 double-balanced mixer
ohhh you may want some narrowband upfront amplifiers. The standard IF transformers operating at 455+-5KHz should be fine.
In fact, just get an old AM radio, and attach your crossed ferrites to the output of the mixer.
You probably want to pose this as a new question.
Comment: I'll look into those. Thank you!
Answer: Sorry I didn't see this sooner.
With the crossed antennas as described, distance is taken by looking at both antennas (vector sum) and range taken by a smoothed average of the signal strength.
The signal falls off as the inverse cube (not square!) of the distance, so given that your rx is pretty deaf, you won't hear much but noise till your transmitter gets in range.
The BeagleBone likely radiates significant noise at 457kHz, and so this will make life difficult for you. Separate the antennas and the CPU as much as practical, and realize that practically nothing works well as shielding down here.  The frequency was picked for precisely that reason.  Copper faraday cages work at these frequencies about as well as frosted glass does for light.


Why is "thong" singular?

Question: So the general rule for garments worn over the lower half body, which you put your legs through separate routes, is that they are plural. We have plural-only nouns such as trousers, pants, panties, etc. But the word for the thong which appears to be a much skimpier version of the panties is singular. Why is that?
Comment: That's not a rule. There are plenty of singular nouns: underwear, diaper, pantyhose, skort, and overall. (Note that the last two are also found as plurals.)
Comment: Underwear is uncountable, not singular, though. But +1 for bringing up diaper and pantyhose.
Comment: "A thong" compares to "a pair of pants/trousers"

How do "… underwear, diaper, pantyhose, skort, and overall" match as singular nouns?

Are a/an underwear/diaper/pantyhose/ skort/overall equivalent, or might they follow different rules?

Sorry to say any general rule for "garments worn over the lower half body, which you put your legs through separate routes, is that they are plural" fails in reality, partly because "…the lower half body, which you put your legs through separate routes…" should rather be "… the lower half of the body, through which the legs take separate routes…"
Answer: Its usage to indicate something similar to the lower part of a bikini is recent (1990). Probably the fact that it looks just like a narrow strip of cloth/leather as in its original sense  is the reason why it is used in the singular:
Thong (n.) :

Old English þwong, þwang "narrow strip of leather"*  (used as a cord, band, strip, etc.), from Proto-Germanic *thwang- (source also of Old Norse þvengr), from PIE root *twengh- "to press in on, to restrain" (source also of Old English twengan "to pinch, squeeze"). As a kind of sandal, first attested 1965; as a kind of bikini briefs, 1990.

Etymonline
Comment: Right.  Before they were a kind of bikini bottom, a thong was a single sandal with a y-shaped ... uh ... toe-retention mechanism.  In that case, where there were generally two sandals, they would be called thongs.  However, when that style of bikini was named for resembling the sandal, it was singular, because it looked like a thong sandal, not like a pair.  I thought that was a pretty good question, though.  :)
Answer: That is because we don't have trousers, pants, panties, etc… we have pairs of those things.
"A pair of trousers (or anything)" is a pair, which is singular and properly compared to singular thong, whether as Janey-come-lately lingerie or a traditional narrow strip of leather.
(While "thong" or "thong-type"are perfect terms to describe certain kinds of sandal, the thong is never more than a vital part of the sandal; it cannot be the sandal.)
Comment: Except that quite a few old books do call the sandals just "thongs". I remember a particularly vivid moment when I read a book where a kid described another kid as wearing "thongs" and I had to ask my parents why he was going around half naked!

Why is "thong" singular?


Did the New York Stock Exchange ever close on a weekday so they could file paperwork?

Question: I recently heard that the New York Stock Exchange used to close once a week so that they could organize the paper trades. I can't find anything online about it. Does anyone have any insight here?
Answer: Yes, from June 1968 until December 1968, they closed the NYSE every Wednesday so they could catch up on paperwork representing billions of dollars in unprocessed transactions.  Even after the NYSE re-opened on Wednesdays in January 1969, they still had to close it early at 2pm for seven more months.
Forbes has a description of this:

Not to be forgotten, though, is the Paperwork Crunch. In a day of email and the Cloud and trading completed in microseconds, the idea that Wall Street needed Wednesdays off in the late 1960′s to catch up on back-office tasks seems especially quaint.
Yet, in 1968, the NYSE found itself sitting on more than $4 billion in unprocessed transactions. Trading had risen to 21 million shares daily; by contrast, even in the heavy volume days in 1929, trading never went above 16 million shares. Papers stacked on desks. A (now old) joke formed: If a fan blew the wrong way in a Wall Street office, visitors below could expect a ticker-tape parade.
"Everybody agreed that the securities-processing system had virtually broken down, and the only major point of dispute was who was more responsible for the mess: the back offices of the brokerage firms of the stock-transfer agents," Securities and Exchange Commission Commissioner Ray Garrett, Jr. said in 1974. Some 100 broker-dealers failed, crumbling under the pressure of fulfilling those back-orders. The fix: an organization akin to the FDIC, the Securities Investor Protection Corporation. Wall Street would stick to the shortened weeks from June to December; in January, Wednesday trading resumed, though it ended early at 2 for another seven months.
Answer: Yes. To give brokerages the time to process paperwork, the American stock market, did stop trading on Wednesday's during 1968. Industry leaders first implemented the four day week around June 6, 68.
https://www.newspapers.com/clip/75932396/
Interestingly, the four day weeks were out of necessity due to holidays, etc. in Nov 1968.
https://www.newspapers.com/clip/75940046/
In Dec 68, they were planning to go back to full time at the beginning of the year, but decided better of it as the day approached. They then decided to operate on a reduced schedule.
One interesting side effect of being closed Weds to handle the paperwork, was a pattern of record numbers of transactions on the following Thursday. https://www.newspapers.com/clip/75943028/


How to resolve the "Failed to check for updates. Exiting application" message?

Question: When I'm open some games like Crackdown 3 and State of Decay 2, it loads to the main menu but then I get a message saying "Failed to Check for Updates. Exiting Application" and the games is closed automatically.
Answer: For any games that use the Windows Update service to check for and install updates, such as Crackdown 3 and State of Decay 2 in my case, there is likely something stopping the Windows Update service when playing games.
After many hours of research I found that in my case I have an application called Killer Control Centre which is to improve my Wi-Fi and internet connection by monitoring and prioritising network traffic.
This app has a special gaming setting called GameFast Mode.   In it's self this is a good thing but games that use the Windows Update service for their updates, such as Crackdown 3 and State of Decay 2 in my case, fail because this setting disables the Windows Update service when you start playing a game.
To fix this is very simple.  In the list at the bottom of the "GameFast settings screen" is a list called Services to pause.  Scroll through this list until you find "Windows Update" and unselect it.  That's it... it should now work.
Answer: I couldn't be bothered to do this so i just uninstalled it and installed it again, worked fine for me then. Turned out it was a newer version of the game (juggernaut edition) that for some reason didn't download the normal way.
Answer: Go to Microsoft Store and find the downloads and updates, click update all, find State of Decay in the list and prioritise this update.


Should I leave the license plate screws in while the car is unplated?

Question: I currently have an unplated car sitting outside while I get some administrative tasks done. Should I leave the screws for the license plate in?
Comment: Could you post up a photo showing which screws you're talking about?
Answer: It is my OPINION that you should leave the screws in place, even without plates on the vehicle. If for no other reason so you don't lose them while the vehicle is stationary. They won't rust any more than if they were installed with plates on the vehicle, so that shouldn't be a worry. Depending on the vehicle, most have nylon inserts which the screws go into, so no worries of rusting there. Even if it has metal screw inserts, it will be just as exposed as it would be without the screws in place. Realistically, there is no real reason not to leave them installed. As I said, though, this is my opinion as I don't think you'd get an answer which is not opinion on this one.
Answer: You don't mention what state you're in (and you didn't ask), but in many states you cannot leave an unlicensed vehicle on the street. That said, I would leave the screws in, as that would help prevent them from getting filled with sand, dust, small debris, and oil. It's probably worth mentioning that if you're going to leave the car in the environment for any length of time (> 6 months?), you probably have more to worry about than whether or not you should leave the license plate screws in or not.Like Paulster's answer, this is an opinion-based answer. I'm not sure you could get a fact-based answer.


Rlwrap vi-movement-mode does not work with some programs

Question: With rlwrap cat or rlwrap bash I can use keybinding "jk" to exit from insert mode.
This does not work with rlwrap ghci. Why?
Answer: rlwrap's not very useful with programs which already do (even rudimentary) line-editing.  According to its readme:

Commands that already use readline will always ask for (and get)
  single keypresses, which makes rlwrapping them rather
  pointless. However, if one uses the -a option, rlwrap will use its own
  line editing and history. Unforunately, in this case, rlwrap cannot
  detect whether  asks for a password. This can be remedied by
  giving the password prompt (excluding trailing space and possibly the
  first few letters) as an argument to the -a option.

You might get some use out of rlwrap using the -a option, as suggested.  The first sentence is a little too specific (other programs can ask for "single keypresses" than those using readline).
Comment: It is not the programs that ask for single keypresses for which using `rlwrap` without the `-a` option is pointless, but the programs that _always_ ask for single keypresses. You are right that `readline` is not the only input method that does so ([editline](https://github.com/troglobit/editline), [JLine](https://jline.github.io/) and the `zsh` line editor are other examples). I'll make that clearer in the manpage.


Are all of our hormones synthesized in the same gland that they are secreted from?

Question: For example, growth hormone is secreted from the anterior pituitary; is it also synthesized there?
Answer: For many, yes. But for some, like oxytocin and ADH, which are secreted from posterior pituitary, are synthesised in hypothalamus, the sites are different
Comment: Ah, I remember learning about that for those two, for sure. Thank you.
Answer: Vitamin D is synthesized in multiple sites though classically it is said that final hydroxylation occurs in the kidneys.

Vitamin D is a hormone the kidneys produce that controls blood calcium concentration and impacts the immune system. It is also known as calcitriol, ergocalciferol, calcidiol and cholecalciferol. Of those, calcidiol is the form doctors most commonly focus on when measuring vitamin D levels in the blood.
The body makes vitamin D in a chemical reaction that occurs when sunlight hits the skin. This reaction produces cholecalciferol, and the liver converts it to calcidiol. The kidneys then convert the substance to calcitriol, which is the active form of the hormone in the body.

https://www.hormone.org/hormones-and-health/hormones/vitamin-d


How do I unlock the remaining challenge levels in Peggle for Android?

Question: When I was looking at my Peggle stats on my Android phone, I saw that I'd completed 30 of 100 challenges ... but when I select Challenges from the main menu, I counted only 40 available. How do I unlock the remaining 60 challenge levels, if that's even possible?
Comment: Are the remainder secret? Or perhaps you need to complete the 10 you have available before unlocking the next 10.
Comment: I suppose it's possible, although that isn't how it works on the 360 (all challenges are unlocked once you complete adventure mode). I'm not sure, but I believe all 40 of these became available at once ... hopefully someone with experience can verify (or better yet, with both experience and documentation).
Answer: According to an email I got from PopCap Customer Support, you are right - there are only 40 challenges (and 55 levels) available - the listing on the stats is an error that they are planning to fix in an update.
Comment: That makes sense to me. They probably just copied code from one of the other versions and either left the 100 in place assuming they would eventually release the rest of the challenges, or just didn't fix the part that counts the total number of challenges.


Differential operators in curvilinear coordinates

Question: In the appendix A of Griffith's Electrodynamics text, he cites Spivak's Calculus on Manifolds as a reference more a more complete treatment of taking the gradient, curl, divergence, and Laplacian in general coordinate systems. This appealed to me because I wanted to understand this from the view of differential geometry, instead of the long, ad hoc computations for cylindrical and spherical coordinates. I haven't read Spivak's book, but have I have a little understanding of basic differential geometry (first two chapters of Tu's Intro to Manifolds). Anyway, there's an online version of Spivak's text, but looking through the table of contents, I'm not really sure where I'd find this treatment of differential operators in curvilinear coordinates in his book. If anyone's familiar with it, could you please cite where in the book he treats this topic? Or if anyone is familiar with another reference or could provide a good explanation, that would also be greatly appreciated.
Comment: Related: http://physics.stackexchange.com/q/141373/2451
Answer: I'm not completely sure what you want, but honestly the entirety of Spivak's Calculus on manifolds is devoted to exactly that. If you want something that feels familiar, you can simply find $\nabla$ in various coordinate systems in Wikipedia, but if you want a less coordinate-centric view then you're probably going to need to step outside of your comfort zone.
In particular, you should be aware that the concepts of grad, curl and div are not particularly useful by themselves in an arbitrary manifold with arbitrary coordinates. Instead, functions and vector fields are replaced by differential forms, and div/grad/curl get replaced by the exterior derivative $d$.
With that in mind, the sections of Calculus on manifolds which deal most directly with these things are §4.2 (Fields and forms), §5.2 (Fields and forms on manifolds) and §5.3 (Stokes' theorem on manifolds). Honestly, though, you should read the whole thing: it's very short (137 pages of large type on a small page), and it's delightfully constructed. It's honestly a little jewel! (On the other hand, the compact construction does make it a bit dense at times.)
Beyond this, if you want a more expanded view of what happens to functions, vector fields, and differential operators on more general manifolds, I would really recommend Spivak's A comprehensive introduction to differential geometry (vol I). In particular, §3.4 (The tangent bundle of a manifold) and chapters 7 (Differential forms) and 8 (Integration) deal with (the appropriate generalizations of) $\nabla$ from a general differential geometric perspective.
Comment: I think I know what you're referring to in your second paragraph. On page 42 of the book I've been using: http://im0.p.lodz.pl/~kubarski/AnalizaIV/Wyklady/L-Tu-1441973990.pdf    There is a commutative diagram that basically interprets gradient, curl, and divergence in terms of the differential complex. I was wondering if you could still use this diagram with a change of coordinates.
Comment: The upper half of that diagram is completely independent of the coordinate system, so obviously yes.
Answer: I would say that the Wikipedia page on curvilinear coordinates and the article Mathematical Physics Lessons - Gradient, Divergence and Curl in Curvilinear Coordinates by James Foadi are enough to understand what is going on.


What is Hawking's, "No Boundary Conditions"?

Question:
In his "No Boundary Conditions", is Hawking stating that time is eternal?
And what is the difference between Real Time and Imaginary Time?
Is he saying there are two different arrows of time, and our universe began as a singularity on one of those arrows, while the other arrow already existed independently of the other?
I've also read about a theory that proposes our universe might have two separate time dimensions. Can someone elaborate?
Comment: Number 1 is true or false.  The second question ....many people have wondered the difference between imaginary and real time.   Question 3 and 4 are confusing and ill advised to be placed with the first two but the first two  are reasonable, he seems to be asking for an intuitive feel for what this means concerning time as we experience it.  My guess is  almost everyone who reads a description of the theory wonders the same thing.
Answer: The noboundary condition means there is no boundary that marks the end of space or time. With respect to time one might think of the lines of longitude on a globe as representing the time direction at different point in a spatial manifold modeled as the lines of latitude. As one looks further to the north, which is the big bang that eventually you look north of the north pole. From a physics perspective it means the state of the universe was not determined by any special boundary conditions, but by topology.


How to wrap text in a cell in LibreOffice Calc

Question: How can I wrap text in a single cell in LibreOffice Calc??
Comment: Here's how to add a shortcut button to toggle "Wrap text automatically" on and off: https://askubuntu.com/a/1006919/327339
Answer: An image is worth a thousand words… so I got 2 thousand words (Plus change) right here:

Select in the Menu: Format → Cells…

Select in the Format Cells window: Alignment Tab

Select Wrap Text Automatically from the Properties section.
The end result will be something similar to this:

Note that, at least up to LibreOffice 4.0, this option only works on cells that I written in after the option is activated. It will not automatically wrap cells created before.1 See the following image:

The cell above was written before the option was activated. The bottom cell was written after the option was activated.

1 For those wanting to wrap all of their already existing cells in a spreadsheet, simply execute Ctrl+A, following by Ctrl+C, and finally Ctrl+V.
Comment: @Elysium You can select all the cells then apply the above option to do them all at once.
Comment: Here's how to add a shortcut button to toggle "Wrap text automatically" on and off: https://askubuntu.com/a/1006919/327339
Comment: I use a dutch version so I could not make nice images :( Can you check if when you set this BEFORE typing it changes wrap? Mine did not...
Comment: Mine does not either. For what I can see (Even on LibreOffice 4.0) is that it takes effect on newly written cells. Not one already created ones. Will make an image of this.
Comment: Thanks...that did the magic. :) Do you know if there is a way to add that to the toolbar instead of accessing it all the time thru the menu?
Comment: What if I want to wrap text but I do not want cell height to change automatically?
Comment: @Trismegistos How would you show the content without changing the height? The only other would be changing the row.
Comment: @LuisAlvarado You can show the content by clicking on it. Yust try to wrap then shrink manualy then double click.
Comment: I had initially missed that this applies to the selected cell(s). This is ideal.
Answer: You can use Format > Cells > Alignment to have a variety of effects including Wrap text automatically.
Use Ctrl+Enter to have more than one line of text per cell if that's what you mean.
Answer:
Manually

Type control + enter from inside a cell.

Automatically

Seems bugged if you set it before editing the cell: https://bugs.freedesktop.org/show_bug.cgi?id=57519
Setting the 'wrap' from a column or field in the tab 'alignment' works but you need to do this after inserting text.
Answer: Select the cell, follow the path "Format\Cells\Allignment" and mark "Wrap text automatically".
Comment: @Elysium The option is "Wrap text automatically." It appears near the bottom off the window. Make sure the Alignment tab is up.
Comment: There isnt such a "wrap text automatical" option there.
Answer: This extension for calc create a toolbar which has button for wrap text in selected cell(s), unwrap text in selected cell(s), insert copied row(s) or cell(s), insert copied column(s)or cell(s) and paste value
http://extensions.libreoffice.org/extension-center/wrap-unwrap-insert-copied-row-or-column-and-paste-value/releases/1.0.1
Answer: In case of an imported xlsx file (but I not sure whether the file being xlsx-format is the point), the Wrap Text Automatically simply did not work, until I checked "Optimal Height" in Format/Row/.
Answer: Here's how to add a shortcut icon to toggle "Wrap text automatically" on and off:
Doing it one time through the Format Cells menu is great and all, but I use this operation all the time. Let's add a shortcut button, shall we?
Click View --> Toolbars --> Customize.
In the Toolbar drop down select Formatting. Now in the Toolbar Content section scroll down and click on Justified, since I want to add my cell wrap icon just after that one.
Click Add, then choose Format from the "Category" menu and Automatic Row Break from the "Commands" menu. Here's what those menus look like:

Click Add then Close.
Now click on Modify --> Change Icon... and choose an icon you think looks half-way decent. I chose this one:

when done, click Ok as necessary to exit the menus, then click on View --> Toolbars and ensure the "Formatting" toolbar we just added the icon to is visible. It will have a check mark next to it to indicate it is visible.
Here's what my icons look like now:

Focus in on this area:

Here's the icon I just added right after the "Justify" icon.

Select a cell and click this icon to toggle "Automatic Row Break" (ie: "Wrap text automatically") on and off, just like you can do in Microsoft Excel!
Demo'ed in LibreOffice 184.108.40.206, Ubuntu 14.04 LTS.
Answer: Cell wrapping by "Format->Cells->Allignment->Wrap text automatically" makes it wrap horizontally.
To Wrap it completely, You need to select the cell or all the rows and select "Optimal Row Height" which will automatically increases the row height according to the text within...
Hope this helps:)
Answer: As far as I can make out, you select wherever you want text wrapped, a cell, row, column, or the whole page or document, then click the "wrap" button on the toolbar. It's next to the three "align" buttons. You may now find at least two "sub issues".
The cell and all cells in that row have been extended vertically to hold all the text. The solution is to force the row height back to the same as all the others by Format>Rows>Height and select required height or the default.
Now you may find that when you narrow the column width only the bottom row oftext is displayed, that is, the last word or two and a blank to the end of the line. You probably want to see the first few words, so go to the Align (Top) button on the toolbar.
If you don't see what you want on the toolbar you have to go
Select required>Format>Cells and in the window select the Align tab and work from there, where you can align and also select wrap in the properties section.


what are some creative ways to overcome jekyll's default 'reverse chronological order' listing?

Question: i've got a static content site and I actually don't want articles display in reverse chronological order, using jekyll/liquid, what are some creative ways I can accomplish this without having to revert to reverse ordering the dates on all posts ?
Comment: I would be open to experimenting with any of those options, frankly, forward chronological order would be fine, always looking to know more about how to manipulate the behavior.  thanks.
Comment: Is there are particular order in which you do want them to appear? For instance: alphabetical order by post.name, forward chronological, sorted by category or tags, etc
Answer: With some ugly looking Liquid, it's possible to sort by something else.
Here's an example how to create a tag page, with alphabetically sorted tags.
In this example, I'm sorting the tags (and then the posts per tag are sorted in reverse chronological order - I didn't change that).
But you could use the same technique to order the posts by title or URL, for example.

EDIT:
If you just want to list your posts in forward chronological order instead of the default reverse chronological order, there's a much, much simpler solution - the reversed keyword:
{% for post in site.posts reversed %}

{% endfor %}

Answer: To list your Posts by Category, you could do the following:
  {% for category in site.categories %}

{{ category[0] }}

    {% for post in category[1] %}

{{ post.date | date_to_string }} » {{ post.title }}

    {% endfor %}

  {% endfor %}

This would yield something similar to this:

Note that with this method, Posts are still listed in reverse chronological order within each category. You can see this code in action here.


Relative pointers in memory mapped file using C

Question: Is it possible to use a structure with a pointer to another structure inside a memory mapped file instead of storing the offset in some integral type and calculate the pointer?
e.g. given following struct:
typedef struct _myStruct_t {
  int number;
  struct _myStruct_t *next;
} myStruct_t;
myStruct_t* first = (myStruct_t*)mapViewHandle;
myStruct_t* next = first->next;

instead of this:
typedef struct _myStruct_t {
  int number;
  int next;
} myStruct_t;
myStruct_t* first = (myStruct_t*)mappedFileHandle;
myStruct_t* next = (myStruct_t*)(mappedFileHandle+first->next);

I read about '__based' keyword, but this is Microsoft specific and therefore Windows-bound.
Looking for something working with GCC compiler.
Comment: What is the problem? What have you tried? What errors do you get? The linked list node structure in the first snippet is perfectly normal. A structure in a file sounds a little iffy, so I think you should be a little bit more explicit in what it is that you're trying to achieve.
Comment: @Henrik: There is nothing to try cause I see no way of doing this. Of course I can assign next to the memory mapped base with some offset and use it but as soon as I restart the application the pointer value stored in next is not valid anymore cause the base address of the mapped memory region changes. That's why I use the second snippet. So the question basically is if gcc does support something which could generate this in any way dynamically. It should store the offset instead of the current pointer value.
Comment: I don't know of any way for GCC to help you with this, but assuming you're using `mmap` to create the mapping, maybe using the `MAP_FIXED` flag and specifying a fixed base address might help you.
Comment: @Henrik: Nice idea but "it will cause mmap to unmap anything that may already be mapped at that address which is generally a very bad thing" see http://stackoverflow.com/questions/6446101/how-do-i-choose-a-fixed-address-for-mmap
Answer: I'm pretty sure there's nothing akin to the __based pointer from Visual Studio in GCC. The only time I'd seen anything like that built-in was on some pretty odd hardware. The Visual Studio extension provides an address translation layer around all operations involving the pointer.
So it sounds like you're into roll-your-own territory; although I'm willing to be told otherwise.
The last time I was dealing with something like this it was on the palm platform, where, unless you locked down memory, there was the possibility of it being moved around. You got memory handles from allocations and you had to MemHandleLock before you used it, and MemPtrUnlock it after you were finished using it so the block could be moved around by the OS (which seemed to happen on ARM based palm devices).
If you're insistent on storing pointer-esque values in a memory mapped structure the first recommendation would be to store the value in an intptr_t, which is an int size that can contain a pointer value. While your offsets are unlikely to exceed 4GB, it pays to stay safe.
That said, this is probably easy to implement in C++ using a template class, it's just that marking the question as C makes things a lot messier.
Comment: I don't think that `intptr_t` is a good idea for a file format: it is platform dependent. Worse, it depends on whether the program is compiled as 32 or 64 bit. If you use `intptr_t`, a file written by a 32 bit app cannot be read by a 64 bit app and vice versa. I would opt for `uint64_t`.
Comment: @cmaster all things being equal, that's the least of the problems that would exist with the file. Everything in the structure would have to be coded for size, padding, alignment and capacity if it was to be portable across 32/64bit and endianness if it was to be portable across hardware platforms
Answer: C++: It is very doable and portable (the code, but maybe not the data).
It was a while ago, but I created a template for a self-relative pointer classes.
I had tree structures inside blocks of memory that might move.
Internally, the class had a single intptr_t, but = * . -> operators were overloaded so it appeared like a regular pointer. Handling null took some attention.
I also did versions using int, short and not very useful char for space-saving pointers that were unable to point far away (outside memory block).
In C you could use macros to wrap get and set
// typedef OBJ { int p; } OBJ;
#define OBJPTR(P) ((OBJ*)((P)?(int)&(P)+(P):0))
#define SETOBJPTR(P,V) ((P)=(V)?(int)(V)-(int)&(P):0)

The above C macros are for self-relative pointers that can be slightly more efficient than based pointers.
Here is a working example of a tree in a small block of relocatable memory using 2-byte (short) pointers to save space. int is okay for casting from pointers since it is 32 bit code:
#include <stdio.h>
#include <memory.h>

typedef struct OBJ
{
  int val;
  short left;
  short right;
#define OBJPTR(P) ((OBJ*)((P)?(int)&(P)+(P):0))
#define SETOBJPTR(P,V) ((P)=(V)?(int)(V)-(int)&(P):0)
} OBJ;

typedef struct HEAD
{
  short top; // top of tree
  short available; // index of next available place in data block
  char data[0x7FFF]; // put whole tree here
} HEAD;

HEAD * blk;

OBJ * Add(int val)
{
  short * where = &blk->top; // find pointer to "pointer" to place new node
  OBJ * nd;
  while ( ( nd = OBJPTR(*where) ) != 0 )
    where = val < nd->val ? &nd->left : &nd->right;
  nd = (OBJ*) ( blk->data + blk->available ); // allocate node
  blk->available += sizeof(OBJ); // finish allocation
  nd->val = val;
  nd->left = nd->right = 0;
  SETOBJPTR( *where, nd );
  return nd;
}

void Dump(OBJ*top,int indent)
{
  if ( ! top ) return;
  Dump( OBJPTR(top->left), indent + 3 );
  printf( "%*s %d\n", indent, "", top->val );
  Dump( OBJPTR(top->right), indent + 3 );
}

void main(int argc,char*argv)
{
  blk = (HEAD*) malloc(sizeof(HEAD));
  blk->available = (int) &blk->data - (int) blk;
  blk->top = 0;
  Add(23); Add(2); Add(45); Add(99); Add(0); Add(12);
  Dump( OBJPTR(blk->top), 3 );
  { // PROOF a copy at a different address still has the tree:
  HEAD blk2 = *blk;
  Dump( OBJPTR(blk2.top), 3 );
  }
}

A note about based verses self-relative "*" operator.
Based can involve 2 addresses and 2 memory fetches.
Self-relative involves 1 address and 1 memory fetch.
Pseudo assembly:
load reg1,address of pointer
load reg2,fetch reg1
add reg3,reg2+reg1

load reg1,address of pointer
load reg2,fetch reg1
load reg3,address of base
load reg4,fetch base
add reg5,reg2+reg4

Comment: Your current C macros are bogus, but it's certainly possible to write reasonable ones.
Comment: In `OBJPTR()` I think you should be adding `P` to the base pointer, not to itself.
Comment: I added a complete example, a "proof", and a note about based verses self-relative performance differences.
Answer: The first is extremely unlikely to work.
Remember that a pointer, such as struct _myStruct_t * is a pointer to a location in memory.  Suppose that this structure was located at address 1000 in memory: that would mean that the next structure, located just after it, might be located at address 1008, and that's what's stored in ->next (the numbers don't matter; what matters is that they are memory addresses).  Now you save that structure to a file (or un-map it).  Then you map it again, but this time, it ends up starting at address 2000, but the ->next pointer is still 1008.
You have (generally) no control over where files are mapped in memory, so no control over the actual memory locations of the elements within the mapped structure.  Therefore you can only depend on relative offsets.
Note that your second version may or may not work as you expect, depending on the declared type of mappedFileHandle.  If it's a pointer to myStruct_t, then adding an integer n to it will produce a pointer to an address which is n*sizeof(myStruct_t) bytes higher in memory (as opposed to being n bytes higher).
If you declared mappedFileHandle as
myStruct_t* mappedFileHandle;

then you can subscript it like an array.  If the mapped file is laid out as a sequence of myStruct_t blocks, and the next field refers to other blocks by index within that sequence, then (supposing myStruct_t* b is a block of interest)
mappedFileHandle[b->next].number

is the number field of the b->nextth block in the sequence.
(This is just a consequence of the way that arrays are defined in C: mappedFileHandle[b->next] is defined to be equivalent to *(mappedFileHandle + b->next), which is an object of type myStruct_t, which you can therefore get the number field of).
Comment: Ah, right: No, I don't think that's possible in any sort of portable way.  Looking at [the Windows docs for __based](http://msdn.microsoft.com/en-us/library/sbw639kb.aspx) I see what the goal is, but I'm not _aware_ of anything analogous in GCC, and certainly nothing portable to other compilers.  I'm afraid it's DIY, and some self-managed pool of structs+offsets in an array....
Comment: Your note has nothing to do with the question and I am aware that the + operation on a pointer type will add n times the size of the type. With an array I'm bound to having my structures in sequence which is not what I want to have. This is not a real answer, rather an explanation of the problem, which I thought is clear..
Comment: Then it's not completely clear what your question is.  You know that `mmap` maps at an unpredictable address, so any absolute pointers stored in the mapped file will necessarily be wrong.  `MAP_FIXED` may allow you to play games with the mapping address, but that's probably precarious.  If you want to do this sort of thing, then managing a pool yourself and storing the offsets from the start is probably the only way.  Is that what you're asking?  I don't think the compiler can realistically help out here.
Comment: The question is, if there's any way I can use pointers (like in first example) with a mapped file, so if the pointers are written to file, it writes the offsets instead of runtime addresses.


Saving compositor File Output without rerendering

Question: Is it possible to save a File Output node in the compositor without rerendering the entire scene?
Answer: Best solution I have so far is to add a dummy render layer with nothing in it.  Then, I can re-render just that layer, and the compositor will output all of the File Outputs.
Answer: I don't think there is a way to make the file output node save the files it is configured to save without rendering the scene.
A possible workaround for limited cases is to reroute the image input to a viewer node so that the image data can be viewed in the UV/Image editor. This allows the image data to be manually saved to a file.

Obviously for one frame of a simple multiple image file setup this is fairly easy, if you have configured a multilayerEXR then this will only allow saving one changed layer, one frame at a time. You could then open this file and replace the specific layer contents of the intended target file. The compositor could be used to combine the adjusted layer. Or you could use an empty scene that opens the existing files and composites the alterations into new files.
Answer: Since you don't want to rerender, I am guessing that your scene is already rendered, but complex. I think I may have an alternate solution for you.
I don't think that you can do what you want, but you can open a UV Image Editor and select Render Result from the list of images in the bottom panel.

Paul Gonet's image on BSE here.
From here, you can easily save.
Edit:
You can substitute a Viewer node in basically the same setup as previously described. In the UV Image Editor, select Viewer Node from the menu.

Also make sure that you have Backdrop checked at the bottom of the Node Editor.

From here, you should be able to connect any node to the Viewer node and have it show up in the UV Image Editor.
Comment: It's already rendered, and complex.  My issue is that I have multiple _File Output_ nodes, which I'd like to save all in one shot.
Comment: @ajwood Understood. I have an alternate solution, but it may be a while before I can post (I have to go to bed). It's there, though.
Comment: @ajwood Luckily, I was able to answer your question more quickly. If it helped, please consider accepting it. It would help me greatly!
Answer: It seems it's not possible.
You just have to select and save each pass individually as an image if that's quicker than a re-render.
Answer: I would have thought 'do not overwrite' would achieve this, but nop.
[Or if you turned off the camera icon for 'render' but of course that is it's visibility in the render.]
The only solution I ever found was to have a second file that loads the images files from an Input Image node. Silly really. Scenes are the only way otherwise.
It seemed hinted here that you can force the Viewer node to "Save this Image" in the node inspectors Item panel, which might qualify, but again I just make a separate file for compositing typically.
It seems you are also able to duplicate Scenes and change the settings of things there. I think you can make an empty scene and then the 'render layers' input node in the compositor can be used to select different scenes and render them with a little button on the node.
Answer: you can use turbo tools to do this:
https://3dillusions.gumroad.com/l/turbo_tools


C# mono inter process, inter application cross platform messaging implementation. (How to)

Question: I am developing applications and c#, I at the moment, I work on projects for Windows Platform only. However, I am planning to move into using C# mono to make my programs be able to work with linux, mac-os and windows.
One of the feature I am implementing in my program is the ability to communicate between them (ie. A Console type program that can communicate and interact with GUI Program by sending commands and receiving reply messages, logging messages, signals,.etc). Back in windows dotnet framework, I am looking at anonymous pipes, but now, I am checking if Mono.Unix.UnixPipes will do the job for me and will let me implement inter process messaging with very little to no adjustments at all under linux, mac-os and windows.
I am a little bit new to this kind of feature, and i am now reading into the documentations (however, class and objects documentations are not helping me so much yet). I am also browsing to some of the inter process messaging questions that are posted here in stackoverflow.
If anyone has a link to a tutorial kind of document or example on how to do this, it will be a great help. please help?
thank you.
Answer: I highly recommend running a mongodb (easly scalable from a dev boxes to hundreds of servers) and using the library https://github.com/dominionenterprises/mongo-queue-csharp on top of it for the messaging. It has the ability to query for messages which enables some really nice patterns. Also its compatible with mono ! Also has some other languages if needed down the road.


Where does Java's String constant pool live, the heap or the stack?

Question: I know the concept of a constants pool and the String constant pool used by JVMs to handle String literals. But I don't know which type of memory is used by the JVM to store String constant literals. The stack or the heap? Since its a literal which is not associated with any instance I would assume that it will be stored in stack. But if it's not referred by any instance the literal has to be collected by GC run (correct me if I am wrong), so how is that handled if it is stored in the stack?
Comment: How can a pool be stored on the stack? do you know the concept of a stack?
Comment: Hi Scrum Meister,  I tried to mean it can't be. Sorry for the wrong convention. Regarding GC Just now I came to know. Thanks for that
Answer: The answer is technically neither.  According to the Java Virtual Machine Specification, the area for storing string literals is in the runtime constant pool.  The runtime constant pool memory area is allocated on a per-class or per-interface basis, so it's not tied to any object instances at all.  The runtime constant pool is a subset of the method area which "stores per-class structures such as the runtime constant pool, field and method data, and the code for methods and constructors, including the special methods used in class and instance initialization and interface type initialization".  The VM spec says that although the method area is logically part of the heap, it doesn't dictate that memory allocated in the method area be subject to garbage collection or other behaviors that would be associated with normal data structures allocated to the heap.
Comment: Actually, when the classes are loaded in the VM, the string constants will get copied to the heap, to a VM-wide string pool (in the permgen, as Stephen C said), since equal string literals in different classes have to be the same String object (by the JLS).
Comment: Paŭlo, that is true for Sun's virtual machine, but not necessarily true for all implementations of the JVM.  As the JVM spec mentions, although the runtime constant pool and method area are logically part of the heap, they don't have to have the same behavior.  Just a minor semantic difference, really :)
Comment: Thank you all for your answers. I understood a lot with this discussion. Its nice to know you guys :)
Comment: https://stackoverflow.com/questions/28107739/string-pool-is-created-in-permgen-area-or-object-area-of-heap
Answer: As explained by this answer, the exact location of the string pool is not specified and can vary from one JVM implementation to another.
It is interesting to note that until Java 7, the pool was in the permgen space of the heap on hotspot JVM but it has been moved to the main part of the heap since Java 7:

Area: HotSpot
Synopsis: In JDK 7, interned strings are no longer allocated in the permanent generation of the Java heap, but are instead allocated in the main part of the Java heap (known as the young and old generations), along with the other objects created by the application. This change will result in more data residing in the main Java heap, and less data in the permanent generation, and thus may require heap sizes to be adjusted. Most applications will see only relatively small differences in heap usage due to this change, but larger applications that load many classes or make heavy use of the String.intern() method will see more significant differences.
  RFE: 6962931

And in Java 8 Hotspot, Permanent Generation has been completely removed.
Answer: String literals are not stored on the stack.  Never.  In fact, no objects are stored on the stack.
String literals (or more accurately, the String objects that represent them) are were historically stored in a Heap called the "permgen" heap.  (Permgen is short for permanent generation.)
Under normal circumstances, String literals and much of the other stuff in the permgen heap are "permanently" reachable, and are not garbage collected.  (For instance, String literals are always reachable from the code objects that use them.)  However, you can configure a JVM to attempt to find and collect dynamically loaded classes that are no longer needed, and this may cause String literals to be garbage collected.
CLARIFICATION #1 - I'm not saying that Permgen doesn't get GC'ed.  It does, typically when the JVM decides to run a Full GC.  My point is that String literals will be reachable as long as the code that uses them is reachable, and the code will be reachable as long as the code's classloader is reachable, and for the default classloaders, that means "for ever".
CLARIFICATION #2 - In fact, Java 7 and later uses the regular heap to hold the string pool. Thus, String objects that represent String literals and intern'd strings are actually in the regular heap.  (See @assylias's Answer for details.)

But I am still trying to find out thin line between storage of string literal and string created with new.

There is no "thin line".  It is really very simple:

String objects that represent / correspond to string literals are held in the string pool.
String objects that were created by a String::intern call are held in the string pool.
All other String objects are NOT held in the string pool.

Then there is the separate question of where the string pool is "stored".  Prior to Java 7 it was the permgen heap.  From Java 7 onwards it is the main heap.
Answer: String pooling

String pooling (sometimes also called as string canonicalisation) is a
process of replacing several String objects with equal value but
different identity with a single shared String object. You can achieve
this goal by keeping your own Map<String, String> (with possibly soft
or weak references depending on your requirements) and using map
values as canonicalised values. Or you can use String.intern() method
which is provided to you by JDK.
At times of Java 6 using String.intern() was forbidden by many
standards due to a high possibility to get an OutOfMemoryException if
pooling went out of control. Oracle Java 7 implementation of string
pooling was changed considerably. You can look for details in
https://bugs.java.com/bugdatabase/view_bug?bug_id=6962931 and
https://bugs.java.com/bugdatabase/view_bug?bug_id=6962930.

String.intern() in Java 6

In those good old days all interned strings were stored in the PermGen
– the fixed size part of heap mainly used for storing loaded classes
and string pool. Besides explicitly interned strings, PermGen string
pool also contained all literal strings earlier used in your program
(the important word here is used – if a class or method was never
loaded/called, any constants defined in it will not be loaded).
The biggest issue with such string pool in Java 6 was its location –
the PermGen. PermGen has a fixed size and can not be expanded at
runtime. You can set it using -XX:MaxPermSize=96m option. As far as I
know, the default PermGen size varies between 32M and 96M depending on
the platform. You can increase its size, but its size will still be
fixed. Such limitation required very careful usage of String.intern –
you'd better not intern any uncontrolled user input using this method.
That's why string pooling at times of Java 6 was mostly implemented in
the manually managed maps.

String.intern() in Java 7

Oracle engineers made an extremely important change to the string
pooling logic in Java 7 – the string pool was relocated to the heap.
It means that you are no longer limited by a separate fixed size
memory area. All strings are now located in the heap, as most of other
ordinary objects, which allows you to manage only the heap size while
tuning your application. Technically, this alone could be a sufficient
reason to reconsider using String.intern() in your Java 7 programs.
But there are other reasons.

String pool values are garbage collected

Yes, all strings in the JVM string pool are eligible for garbage
collection if there are no references to them from your program roots.
It applies to all discussed versions of Java. It means that if your
interned string went out of scope and there are no other references to
it – it will be garbage collected from the JVM string pool.
Being eligible for garbage collection and residing in the heap, a JVM
string pool seems to be a right place for all your strings, isn't it?
In theory it is true – non-used strings will be garbage collected from
the pool, used strings will allow you to save memory in case then you
get an equal string from the input. Seems to be a perfect memory
saving strategy? Nearly so. You must know how the string pool is
implemented before making any decisions.

source.
Answer: As other answers explain Memory in Java is divided into two portions
1. Stack: One stack is created per thread and it stores stack frames which again stores local variables and if a variable is a reference type then that variable refers to a memory location in heap for the actual object.
2. Heap: All kinds of objects will be created in heap only.
Heap memory is again divided into 3 portions
1. Young Generation: Stores objects which have a short life, Young Generation itself can be divided into two categories Eden Space and Survivor Space.
2. Old Generation: Store objects which have survived many garbage collection cycles and still being referenced.
3. Permanent Generation: Stores metadata about the program e.g. runtime constant pool.
String constant pool belongs to the permanent generation area of Heap memory.
We can see the runtime constant pool for our code in the bytecode by using javap -verbose class_name which will show us method references (#Methodref), Class objects ( #Class ), string literals ( #String )

You can read more about it on my article How Does JVM Handle Method Overloading and Overriding Internally.
Comment: Please disclose any [affiliations](https://stackoverflow.com/help/promotion) and do not use the site as a way to promote your site through posting. See [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer).
Answer: To the great answers that already included here I want to add something that missing in my perspective - an illustration.
As you already JVM divides the allocated memory to a Java program into two parts. one is stack and another one is heap. Stack is used for execution purpose and heap is used for storage purpose. In that heap memory, JVM allocates some memory specially meant for string literals. This part of the heap memory is called string constants pool.
So for example, if you init the following objects:
String s1 = "abc";
String s2 = "123";
String obj1 = new String("abc");
String obj2 = new String("def");
String obj3 = new String("456);

String literals s1 and s2 will go to string constant pool, objects obj1, obj2, obj3 to the heap. All of them, will be referenced from the Stack.
Also, please note that "abc" will appear in heap and in string constant pool. Why is String s1 = "abc" and String obj1 = new String("abc") will be created this way? It's because String obj1 = new String("abc") explicitly creates a new and referentially distinct instance of a String object and String s1 = "abc" may reuse an instance from the string constant pool if one is available. For a more elaborate explanation: https://stackoverflow.com/a/3298542/2811258
Comment: In the given diagram, where would the literals "def" and "456" exist. And how would these be referenced ?
Comment: Thanks for your comment @Satyendra, I have updated the illustration and the answer.
Comment: @Stas why another String object "abc" is created..it should use the reference obj1 to point the literal right?
Comment: It's because String obj1 = new String("abc") explicitly creates a new and referentially distinct instance of a String object and  String s1 = "abc" may reuse an instance from the string constant pool if one is available. For a more elaborate explanation: https://stackoverflow.com/a/3298542/2811258
Answer: Considering this question asked was many years back. There are recent advancements after that, so sharing the same.
String constant pool(SCP) is now a part of the Java Heap memory(since Java 7) where all the string literals and interned strings reside.
And the GC on the SCP happens like a normal GC should.
Whenever, we create a new variable like this:
var s1 = "year"

The value "year" being a string literal is being stored in SCP and the variable s1 is being stored in Stack as a part of the currently running thread.
As and when, the thread execution completes, s1 is removed from the Stack memory.
When GC runs, it'll see that value "year" is not being referenced by any object/literal, it'll be garbage collected from there.
Now consider, there is one more String object.
var s2 = new String("year")

s1 & s2 ARE NOT GOING TO SHARE ANYTHING among them.
This object(s2) is NOT GOING to be stored in SCP and is going to be treated like a normal Java object and hence going to be stored in the Heap space outside of the SCP.
Unless and until, someone is creating this, it will not/never be stored into SCP.
var s3 = s2.intern()

Now, again the object s2 is going to be garbage collected when it's no longer be referenced by any other part of the program.
I hope this answer, made sense.
Happy to continue the conversation in the comments.
Thank you.


PyOpenGL Drawing a Cube with VBOs

Question: I have a question (well a few actually)
1) How do you render a cube in Python with Vertex Buffer Objects?
2) How could I relocate that cube several times
3) How would I go about not rendering certain faces on it? (I have an Octree to store the positions and I want to not render faces that touch eachother)
Thanks
Answer: 1: I use this module to render cubes in OpenGL 3+
Render Cube with VBO
If you don't have a model view / projection matrix, just pass in 'numpy.identity(4)' which will leave the vertices centred around the origin.
This also means that the camera will appear inside the cube so it may not be visible.
2: You don't 'relocate' objects, you change the model view / projection matrices and render the VBO's again.
The cube's vertices have no knowledge of where the reside in 3D space, they are relative to the origin. When you render it, you apply a matrix (projection * model view) which moves the cube's vertices.
3: There are a number of ways to do this:
A. Create a VAO / VBO per face and only render the faces you want.
B. Assign a vertex attribute to each vertex which corresponds to each face. Then, using a uniform value, pass in enough information for the vertex / fragment shader to know if they should render or not.
You could implement this easily with a single integer, and use a single bit to represent each face.
I would use B, as you aren't changing VAO / VBO state often, just changing 6 values (1 for each face).
Comment: Your link provides a 404 page.

PyOpenGL Drawing a Cube with VBOs


Quasi Fixed Input

Question: What is quasi fixed cost? What is the difference between fixed and quasi-fixed cost? Is capital, land and labour considered a quasi fixed cost for a firm? I have read that when the firm wants to take new labours, it can face a higher wage, then it is a quasi fixed cost but it seems to me that it should come under variable cost as the input cost changes with the quantity of output. Any help is appreciated.
Comment: Can you provide a reference for your question? "I have read" is not very helpful.
Comment: This is the reference where I read it "http://courses.missouristate.edu/reedolsen/courses/eco310/equasi.pdf" It is a paper which I browsed online.
Answer: Quasi-fixed labour costs are typically those associated with the number of workers rather than the number of hours they work, so things like

recruitment costs
training costs

Commonly they are seen as fixed costs in the short run, but marginal costs in the long run.
Other non-labour costs which have the same short run / long run distinction can also be seen as quasi-fixed costs

Quasi Fixed Input


Changing published mobile application developing language from ionic to flutter

Question: I have a mobile application developed using Ionic. Now I want to redevelop it in flutter and publish a new update, would that be possible?  will google play and AppStore allow that?
Answer: There is no constraint on development language. But,

You need to use same certificates/keys for iOS App
You need to use same key-store/keys for Android App
If you are using local database or file storage, then you should follow the same path in your newly created app as well. If you are using any third-party library to manage the db or file paths, then it may be in different location altogether. (This one actually happened to me. When I migrated my app from a cross-platform framework to Native the database path got changed in release version)
Comment: Thanks for the quick response. that make sense. I will do as you say. thanks again
Comment: @KardoAziz You are welcome. Happy Coding!!!
Comment: And if you are using localStorage or Local DB to save any user information i.e: auth token etc then your user need to login again.


Remote message is received but not able to display push notification to user

Question: On verifying salesforce SDK logs, we understood that when we set an anonymous subscriber key to the salesforce SDK profile ID, we received push notifications with the valid SDK log status response with device token, device Id, and push enables were set to true. However, when a user logs in to the application, the device will be updated with a new subscriber key. In this case, we observed the SDK logs that push enabled was showing as false, the device token was null, and with an empty register manager response and we were receiving the remote message like subtitle media url etc when we get push notification but we did not receive any push notification on device. Could you please let us know if there is a delay in the salesforce SDK contact key update as we are using delayRegistrationUntilContactKeyIsSet=true. Though we had multiple SDKs configured, we followed the documentation provided (https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/trouble-shooting/multiple-push-sdks.html), where it says not to set sender ID during SDK initialization and we are not having that.
Comment: Open a support case.
Comment: Hi @BillMote we had support case existing numbered 44358230
Comment: You should upgrade to 8.0.9 -- not that it has anything to do with your issue, but best to keep current :)
Answer: I took a quick peek at the old ticket. There's a lot going on :)
So, first, you have more than 1 push receiver (service) configured. You need to follow the Multiple Push Provider setup instructions (ref. https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/trouble-shooting/multiple-push-sdks.html) It's more than simply removing the senderId -- and those steps will not be BU specific, they are application specific. As long as you have a receiver configured other than ours, you'll need to do these steps.
The app should work regardless of which BU you're testing from given you've completed the steps outlined above.
Here are some troubleshooting steps: https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/trouble-shooting/trouble-shooting-push-setup.html
Beyond that it comes down to 5 simple questions:

Is the device registered (in the BU from which you're sending)?
Is the device opted-in?
Is the device in the audience list?
Was the send successful?
What did the feedback service say for this device?

You can check those things yourself. If the answers are: yes, yes, yes, success/ok, success/ok, then you need to look at the device logs.
Enable logging on the device (ref. https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/trouble-shooting/trouble-shooting-push-setup.html) and review the output. When a push is received you're looking for either onMessageReceived or BEHAVIOR_SDK_PUSH_RECEIVED -- depending on your MPP setup and whether or not you've overridden notification handling.
If those items are not in your logs then your other push provider has intercepted the message.


Canon SL3 and Godox V1

Question: I have searched to find an answer for one of my students and need help. Will the Godox V1 and Godox trigger work with the Canon SL3. Nikon is
Comment: Does this answer your question? [How can I tell which 3rd party flashes are compatible with Canon's SL3 missing pin hot shoe mount?](https://photo.stackexchange.com/questions/129417/how-can-i-tell-which-3rd-party-flashes-are-compatible-with-canons-sl3-missing-p)
Answer: AFAIK, none of the Godox for-Canon speedlights are compatible with the SL3 when used directly on the hotshoe of the camera, (but reports are contradictory and confusing). Unfortunately, the firmware updates that added compatibility with the T7/2000D and T100/4000D hotshoes do not work with the SL3/250D.
The V1-C works fine as an off-camera flash with full compatibility, since all the Godox transmitters have been firmware updated for SL3/250D hotshoe compatibility.
If you need on-camera compatibility with a V1C, you need to get an X2T-C transmitter, and stack that in-between the flash and the camera a hotshoe.
The best option for an SL3 user who needs an on-camera flash is to probably look at the Canon OEM options, such as the EL-100 or a 430EX II, 600EX II-RT or EL-1. Avoid the EL-5, since that only works with EOS R bodies that have the new multifunction hotshoe.

Canon SL3 and Godox V1