Three dimensional Lie algebras with three dimensional derived algebra

Question: What are the three dimensional Lie algebras with three dimensional derived algebra ($L'=L$)? I saw a proof in the book about Lie algebras by Karel Erdmann and Mark Wildon, but they work over the field $\mathbb{C}$, so over an algebraically closed field. Then all the three dimensional Lie algebras are all isomorphic with the Lie algebra of the $2\times 2$ matrices with trace zero (field = $\mathbb{C}$). But what happen if you work over an arbitrary field that is for example not algebraically closed? Does there change anything in that case?
Comment: But I am asking about the case of also a three dimensional derived algebra.
Comment: Oh, okay! I'll delete my coment.
Comment: Nice question, by the way.
Comment: Okay and thanks :).
Answer: Actually, a three-dimensional Lie algebra $L$ with $[L,L]=L$ has to be simple. Assume that $I$ is a non-trivial proper ideal. Then both $L/I$ and $I$ are at most $2$-dimensional, hence solvable. Then $L$ would be solvable as well, if $I$ and $L/I$ are solvable. This is a contradiction, hence there is no proper ideal.
Now, for an arbitrary field $K$ the classification of simple $3$-dimensional Lie algebras has to be considered. Over $\mathbb{Q}$ we infinitely many such Lie algebras, see this MO-question. Over fields of prime characteristic the result is also different from the characteristic zero case.
Answer: As Dietrich points out this depends on the field. Over the real field there are two, one compact and one split, whereas over the rational field there are infinitely many. You can find more information in http://homepages.warwick.ac.uk/~masdf/research/y4_fowlerwright.pdf.
Answer: To complete the previous answers:
as already mentioned, such a Lie algebra is simple. Its adjoint representation is thus irreducible. Moreover, it maps to the isometry Lie algebra of its adjoint representation, for the Killing form $\mathfrak{so}(\kappa)$. It preserves the kernel of the Killing form, which by irreducibility is nonzero. Thus, at least in char. $\neq 2$ we have two cases:
1) the Killing form is non-degenerate. This is automatic in characteristic zero (and probably large characteristic). Then since $\mathfrak{so}(\kappa)$ is 3-dimensional, we get $\mathfrak{g}$ isomorphic to $\mathfrak{so}(\kappa)$. Thus everything boils down to a classification of nondegenerate quadratic forms in dimension 3, up to scalar multiplication. Also in this case we get that $\mathfrak{g}\otimes C$ is isomorphic to $\mathfrak{sl}_2(C)$, when $C$ is any algebraic closure of the ground field ($C$ closed under taking square roots is enough).
2) The Killing form is zero. There are maybe a few known cases, maybe only in characteristic $\le 3$.


Two different page layout on a single object

Question: I have two objects whose parent is another object. I want to set two different page layout on the parent just by differentiating the record type. How do i do it?
Comment: Are you implying that you want to decide the parent object's page layout based on the Record Type of one of its child objects?
Answer: If you are looking to specify the page layout of an object based on the RecordType of that object per profile - this is done in the org setup.
Assigning Record Types and Page Layouts in the Enhanced Profile User Interface
To specify record types and page layout assignments:

From Setup, click Manage Users | Profiles.
Select a profile.
In the Find Settings... box, enter the name of the object you want and
select it from the list.
Click Edit.
In the Record Types and Page
Layout Assignments section, make changes to the settings as needed.


In Org-Mode, how to export to ASCII, maintaining capitalisation of the heading

Question: Whenever I export to ASCII, the heading always converts to all capitals. How can I maintain the original capitalisation?
Answer: upcase is hard-coded into org-ascii-template--document-title of Org-version 9.2.6.
The following Elisp code neutralizes that upcase by temporarily setting upcase to identity.
Note that one of the preconditions of the advice is that the source code of ox-ascii is available to Emacs. That is the case if you have installed the Melpa version of Org or you have installed the Elisp source package for Emacs. Under Ubuntu the Emacs Elisp source package is emacs26-el.
^;; -*- lexical-binding:t -*-
;; Lexical binding can become relevant for generalized variables
;; (see doc string of `gv-ref').

(require 'cl-lib)

(defcustom org+-ascii-upcase-title nil
  "Default value for :"
  :type 'boolean
  :group 'org-export-ascii)

(eval-after-load 'ox-ascii
  '(eval ;; Avoid expansion of `cl-pushnew' for place `org-export-backend-options' before ox-ascii is loaded.
    '(cl-pushnew (list :ascii-upcase-title nil "ascii-upcase-title" 'org+-ascii-upcase-title)
         (org-export-backend-options (org-export-get-backend 'ascii))
         :test #'equal :key #'car)))

(defun org+-ascii-ignore-upcase (fun info)
  "Neutralize `upcase' if :ascii-upcase-title is not set when calling FUN with INFO."
  (if (assoc-string (plist-get info :ascii-upcase-title) '(yes t on))
      (funcall fun info)
    (cl-letf (((symbol-function 'upcase) #'identity))
      (funcall fun info))))

(advice-add 'org-ascii-template--document-title :around #'org+-ascii-ignore-upcase)

You can switch on upcasing the title by the following option in your org file:
#+OPTIONS: ascii-upcase-title:t

Instead of t also the values on and yes work. Any other value such as no switches upcasing off.
You can customize the default with the Elisp variable org+-ascii-upcase-title.
Tested with Emacs 26.3 and Org 9.2.6.
Comment: @randouser I have fixed the bug. Nevertheless, I am not sure why the original version did not work. I will post a question about that later this night.
Comment: This gives me the error - let*: Symbol's function definition is void: \(setf\ org-export-backend-options\). I am on version 9.1.9 if that's the issue?
Comment: I no longer get the error, but when I export as ascii, the title is still capitalised. On emacs 26.3.
Comment: @randouser I noticed that the org library is not byte-compiled in my setup. It turns out that the symbol `upcase` is not directly contained in the byte-compiled code but only some reference to the underlying function. So the advice remains without effect for the byte-compiled code. I now enforce the loading of the source of `ox-ascii`. This should work for you if you have the sources for that package installed on your system.
Comment: @randouser I have corrected the code after the cause of the problem has been clarified in [the answer to my question about `with-eval-after-load` and `pushnew`](https://emacs.stackexchange.com/q/55903/2370).
Comment: And it works now! That's great, thanks for your persistence.


Git revert local commit

Question: I have a git repo hooked up in phpstorm on windows. I committed a few change sets then pushed them to our "central repo". After this I have then made a few more commits. I no longer want these commits that have not been pushed to the central repo. How do I clean my working copy to be the same as the central repo (origin)?
Comment: I know this is kind of an "I told you so"-comment, but this is the reason why Git users strongly advocates that you create a new local branch before you do any of your work, because then you can just switch back to master and start a new branch from here without having to worry about removing previous commits (you may want to come back to those later in some cases).
Answer: git reset --hard remotes/origin/HEAD

Answer: git reset --hard remotes/origin/YOUR/BRANCH

better than /HEAD because you won't see this:
$ git status
On branch MY/BRANCH
Your branch and 'origin/MY/BRANCH' have diverged,
and have 1 and 1 different commit each, respectively.

Answer: You can revert local commit by
git reset HEAD~N

where N is used to revert number of commits. An example:
if you have to revert single commit from local, then you can use
git reset HEAD~1

or
    git reset HEAD^
Answer: If you feel sure about that and don't have any local uncommitted changes:
git reset --hard origin/master

where origin/master is the branch you had pushed to.
The ref-log will still contain the reverted bits, until a garbage collect expires them. To revert the revert,
git reset --hard HEAD@{1}

Answer: As per my understading, you create some commit that you have pushed on central repo, after that you have create some more commit, but these are exist on local. These all did not push on central repo.
To remove/revert local commit;
git reset HEAD~{number_of_commit}

simply, you hit git log on your command prompt and get list of commits. Have a look, how many commit you have created now and how many you have to revert.
for example, you have to remove.revert your two last commit then hit
git reset HEAD~2

There is one another way to reset your local repo with central repo. But, in this case your local commit will be removed and if other users push commit on central repo then your repo will be updated with that.
command is :
git reset --hard remotes/origin/HEAD

Git revert local commit


Basic notes of Tanpura

Question: Tanpura has 4 strings which play : Pa/Ma/Ni(1), Sa(2), Sa(3), Sa(4); want to know more about these notes. Such as, "Pa/Ma/Ni" being played on Tanpura are of Mandra or Madhya Saptak, then following "Sa Sa" are of Madhya Saptak (please correct if its not true) and finally "Sa", is that of Taar Saptak.
Answer: The four strings of the tanpura are typically tuned to: 'Pa, Sa, Sa 'Sa, or:

First string: mandra Pa.ncham, or lower fifth
Second string: madhya Sha.Daj or tonic
Third string: madhya Sha.Daj or tonic
Fourth string: mandra Sha.Daj, an octave down from tonic—not up!

From "A Comprehensive Guide to Tanpura: It's [sic] Construction, Significance, and Relevance in Indian Classical Music" at baithak.org:

The two middle strings, called Jod / जोड  are tuned to the Sa (षड्ज). The last string is tuned to the Sa of the lower octave (खर्ज). The first string is usually tuned to Pa (पंचम).  The tuning of first string depends on the Raga and the musical preferences of the musician. Based on these considerations, the first string can also be tuned to Ma (मध्यम) or Ni (निषाद).

As this quote, the question, and the other answers have noted, the first string can be tuned to Ni or ma if the raga omits the perfect fifth but has a major seventh or a perfect fourth. But it is never the case that the fourth string is tuned above the other three, to taar Sha.Daj. It is unmistakably the lowest-pitched of the four and is invariably tuned to mandra Sha.Daj.
Even construction-wise, the fourth string is thicker and made of a different material, so it cannot resonate with a higher frequency than the first three strings. On my tanpura these are the strings and their gauges:

pa.ncham (first string): #8 steel, .020" gauge
jo.D (two middle strings): #7 steel, .018" gauge
kharaj (fourth string): #21 brass, .032 gauge.

So the answer to your question about whether the final Sa is of the taar saptak, is a definite No.
Comment: I realize this question was asked nine years ago, but the accepted answer is incorrect (as is the second, more recent one), so it seemed worthwhile to provide a more accurate answer.
Comment: The website [Carnatica.in](http://carnatica.in/sangeet/tambura.htm) also mentions that the fourth string is tuned to the mandara Sa: "Of the 4 strings that the Tambura usually has, the middle strings are tuned to the tonic note, Sa. The first string is tuned to the fifth perfect, Pa and the last, which is the bass string, to the tonic, Sa, an octave lower."
Answer: Yes, you have it: the first, Pa, string is lower than the others (Mandra).  The next two are tuned to Sa (Madhya), the fourth string is tuned to the Sa an octave above the other strings (Taar).
Comment: The fourth string is ***mandra*** Sa, not *taar*. This answer is wrong.
Answer: First, in response to your main question, the strings of a four-string tanpura are tuned to 1st string: 'Pa  (mandra saptak), 2nd string:  Sa  (madhya saptak), 3rd string:  Sa  (madhya saptak), 4th string:  'Sa (mandra saptak).
Alternatively, the 1st string could be tuned to some other note, such as 'ma or 'Ni, depending on the raga.
Ragas in which Pa plays a strong role are generally tuned to Sa-Pa, and most ragas fall into this category.
Ragas that either omit or sparingly use Pa, but have a strong shuddha ma instead,   are tuned to Sa-ma. Examples are Raag Malkauns (S g m d n S'/S' n d m g m g S), which does not use Pa, and Raag Bageshree (S g m D n S' / S' n D m, P D m g, m g R S), which only uses Pa in some phrases.
Ragas that omit or sparingly use both Pa and shuddha ma, but have a strong tivra ma instead, can be tuned to Sa-Ni. Examples include Raag Marwa ('N r G M D N S' / S' N D M G r S) and Raag Poorvi ('N r G M d N S' / S' N d P M G, m G r S). In these ragas, tuning the tanpura to Sa-tivra Ma would be too distracting, but tuning it to Sa-Ni is less distracting while giving subtle tivra Ma overtones, because Ni and tivra Ma are in a Sa-Pa (1-5) relationship.
The different overtones produced by different tanpura tunings are illustrated here.

Basic notes of Tanpura


PrestShop: Import from XLS?

Question: Is there a possibility to import XLS Files into Prestashop? I would imagine myself a Script where I define which rows (as an Example A1-A300 should be Names of the articles, etc...) are what (Like name, price, Tax, etc...).
How could I realise that? I hope there is a possibility and I would appreciate if anyone could get ma on the right path.
Answer: PrestaShop doesn't support excel files, only simple data tables like .csv. This is because excel files are too complicated, they can by whole programs by themselves.
However, if you're working for a client or your XLS files are just simple data, then surely you can convert XLS to CSV before import.
You just need to make an override for AdminImportController::ajaxProcessUploadCSV
and basically "intercept file upload". Get the uploaded file and convert it to CSV using this library:
https://github.com/PHPOffice/PHPExcel
Then just return are the right values in your override to simulate that "everything is running normal" (basically trick PrestaShop :)) .
It is definitely doable, I've created such module for a client, PHPExcel gave us the ability to work with cells before saving them to CSV.
Answer: If you need to import products form Excel without converting to CSV, there is extension, Store Manager for PrestaShop - https://www.prestashopmanager.com/free-download/
It is paid, but you can do the task with 2-week version without any fees.

PrestShop: Import from XLS?


How to track network file share accesses on workstations

Question: I shared a folder created in my C drive with a colleague over the network and he was able to access it. Is there any log that will track this kind of activity?
I am aware of Windows Security Event ID 5140: A network share object was accessed.
Should this be on the workstation or will there be an AD authentication to the Domain controller to verify the person accessing it is actually the person whi is given permissions.
Any thoughts will be appreciated.
Answer: You need to enable file auditing to accomplish this.
Locate the file or folder you want to audit in Windows Explorer.
Right-click the file or folder and then click Properties --> Security --> Advanced --> Auditing --> Edit -->  Add
Enter the name of a user/group you want to audit for the selected file or folder, and click 'Check Names' to validate your entry. (You can use 'Everyone' too), --> OK
Select 'Success and Failure' next to Full control to audit everything for the selected file or folder
Click OK in each window until you are back at the Windows Explorer window and
Repeat these steps for all files or folders you want to audit


How is the quiescent current and emmiter resistor determined on the driver and pre-drivers of a class-AB audio amplifier output stage

Question: I am reading online about discrete audio amplifiers. I have learned about the input differential pair, the voltage amplifier stage, and now I'm learning about the output stage. I have learned that you want to bias the output to have about 25mV to 26mV drops across the emitter resistors as this will reduce distortion. But I have not found any information on how to bias the drivers and pre-drivers that come before the final output transistor pairs. I'm not refering to using Vbe multipliers, I'm asking how do we select the emitter resistor and current for the driver and pre-driver transistors? I was thinking that maybe the quiescent current through the driver should be the max current of the output divided by the beta of the output transistor but I can't find info on this. Maybe I'm looking in the wrong places or doing the wrong search keywords. I have attached an image I found online as refenrence where you can see the resistors in question. In this case they are 62 ohms for the driver pair and 300 ohms for the pre-driver. Any info would be helpful thank you.
Comment: +1. Good question, generally speaking, I think. The output stage usually should include some kind of short-circuit protection using a foldback method [like this](https://electronics.stackexchange.com/a/517251/38098). That circuit isn't an audio output stage. But it gives the idea I want to suggest you consider, while thinking about the rest. Also, look at Sziklai pairs. They are worth knowing about. Final note -- the output emitter resistors of 0.22 Ohm should be sized to drop a few hundred millivolts rms or more at max rms load current.
Comment: See the [diagram for a good quality 50 W amplifier](https://electronics.stackexchange.com/a/325502/38098) and also look over [this discussion of the LM380 amplifier](https://electronics.stackexchange.com/a/273901/38098). Study what others have done.
Comment: Thank you for the references. I will study those links.
Comment: Some additional reading  https://forum.allaboutcircuits.com/threads/audio-amplifier-design-basic-questions.104719/page-6#post-804580 and this http://www.kennethkuhn.com/students/ee351/power_amplifier1.pdf
Comment: @johnny24 May as well look over [this discussion about foldback](https://electronics.stackexchange.com/a/299444/38098). I could improve it a lot, maybe I will later on, but at least it's something for now. Also, there's a long design discussion that covers a lot of various ills [here](https://electronics.stackexchange.com/a/503581/38098). It's class-A (not what you are looking at), but it discusses limiting bandwidth and has other useful tidbits to put onto your "to do" list.
Comment: Thank you both for the references. I'll be reading them over the weekend.
Answer:
the problem with diodes and transistors is the wide variation that is possible with Rs and hFE respectively.

We know that without a series resistor the negative temperature coefficient of Vf diode or Vbe on BJT's is about -2 to -2.4 mV/'C rise in junction temp.  This can lead to current hogging and if the mismatch is high enough ... thermal runaway for both parallel LED's and parallel transistors.

we also know the linearity of current bias demands the bias voltage of complementary BJT's must be thermally matched to all hot parts so that they track and thus eliminate temperature sensitivity. However thermodynamics of big small parts have different temperature time constants and pulsed loads can react quickly yet there is a large(ish) thermal resistance between heat sink, bodies and junctions so the tracking error can be poor.

therefore the purpose of the small emitter R is to raise the emitter resistance , which is basically the base equivalent source resistance divided by hFE and add 50% which is typical hFE tolerance so that it lowers the sensitivity to hFE variation.

we know the higher the idle current, the higher the risk to thermal runaway and lower efficiency yet lower distortion due to less variation in class AB current.

From AC/AC+DC in lower power operation from crossover distortion.

we know high current power BJT drivers tend to have lower hFE 50~75 but YMMV. So the emitter R ratios between stages ought to be consistent with the hFE ratios, which might not be the case in your example
X also the intrinsic base-emitter bulk resistance depends on the chip power rating

my rule of thumb is the same for diodes which is Rs=k/Pmax where k=0.2 to 1 , where lower is better. So a small diode or BJT is 10 Ohms for 0.1 Watt (pn2222=4 Ohms, and a beefy 100 W transistor will be less than 0.01 Ohms added to the Rb/hFE impedance reduction from current gain

we also know that crossover distortion in high gain Op Amp feed back to 2 or 3 stage darlington's can eliminate all distortion with unity gain due to the error reduced by 1e5 min and distortion with 1MHz BW in that loop can be minimal although transcendental intermodulation distortion is higher for audio "purists" liking but that's another long analysis.

list the hFE and Pmax ratings of all parts

define acceptable THD at each power level say max to - 60dB of max

Then a proper design formula can be created.
But for copying existing designs, 0.1 Ohm on each emitter or was,it 0.05 Ohm in Crown DC300's were used with many parallel BJT's for final stage then , my guess 50x this for each previous stage.

but it all depends if you want 0.001% THD or 1% or in between.

p.s. by matching parts, you can reduce the mismatch compensation emitter resistors. But that requires quality control binning tests to be done properly.
For example ! I have thousands  of LED diodes matched for Rs (or Vf @ __ A or mA) within x or xx mV in big lots so no series R was used sharing 16 power LEDs 16P4S with no series R , no current hogging and no thermal runaway,  it all on the same MCPCB heat sink (essential) but for 5mm parts, none required,  but you cannot buy those, but I did, because I ordered bulk and got them on same wafer, pretested, binned and documented by supplier. ( and if anyone is interested in 250pc bags 5mm LEDs ~16 cd @ 20 mA, I have box full surplus) 10k or more?
Comment: Thank you for your answer. I'm not sure if I understand but I believe you are talking about the emitter resistors of the output transistors. The 0.22 ohms of the picture in the question. I was asking about the resistors of the driver and pre-drivers. Sorry if I misunderstood your answer. Edit: Question: Are you saying that if, for example, the output transistors have a beta of 50 and the driver has a beta of 100. Then, the emitter resistor of the driver should be 50 times larger than the emitter resistor of the output?
Comment: I have to sim this in Falstad to confirm, using an 8 Ohm speaker with back EMF driving the output, but bias currents lower Rpi must be balanced for low Z and compromise on Pd efficiency but if you use any OA rail to rail, with unity gain all the distortion is removed with Zo in the mOhms due to feedback gain. That's what U need not low gain hFE. Then bias Re which reduces hFE but improves linearity can be removed. Then you can tandem output drivers to share Pd dissipation.


How can I drag the first element of a list, to a location on my calendar using selenium ide?

Question: My list is always different, I can't use an id because it will always change, I can't use the xpath of that element. I need to find a way to always take the first element and set it in the location I am telling him to.
I attached a print screen with what I want to do.
Comment: It is close to impossible to give a good answer without having the HTML source code of your page (try to post the relevant parts only). Thanks.
Comment: @Oana see the two 'Linked' on the right for helpful info
Comment: dragAndDropToObject
Target: //html/body/div[1]/section/div[2]/div[4]/table/tbody/tr/td[1]/table/tbody/tr[1]/td/ul/div[1] - it's the first div of an ul, so I can always set my first element from a list.
Value: The location where I want to set it by id: id=165b3d9e-07a9-4c17-95a6-0713ec379f93_0_26
Answer: The question is a dupe of https://sqa.stackexchange.com/a/2622/8992
You can drag with
<code># example is in ruby
driver.action.drag_and_drop(element, target).perform
</code>
http://www.seleniumhq.org/docs/03_webdriver.jsp#drag-and-drop
But not sure if that is available in the seleniumIDE.
Your other question (its better if you only ask 1 thing per question btw) is how to deal with dynamic id's and selecting stuff in a table.
That is a separate question that you could post or you could also see if it is covered by:
How to handle dynamic changing ID's In XPath?
and others under the search https://sqa.stackexchange.com/search?q=dynamic+id
Comment: the drag and drop commands you usually use did not help me in this situation and this was not a drop down :) I found my answer, see above. Thank you.


What kind of oil is used in the TRD in my RUUD water heater?

Question: The Thermal Release Device (TRD) went off in my RUUD™ water heater. I am extremely concerned that the oil released when the TRD went off is now in the water system. I am very afraid that the oil released onto the water heater, and some the even got on the wall of the water heater closet, has created toxic air in my home. I am looking for the specific oil that is released so that I may find out how toxic my home is and how I can get rid of the toxins in the water and in the air. Can someone please tell me the specific oil used? Also a brand would be very helpful. Thank you.
Comment: Why not contact RUUD? They would have all the information. Even down to the specific fluid.
Comment: The liquid doesn't extinguish the flame directly, the liquid is in a vial that holds a spring valve open. If the vial bursts, the valve shuts off the flow of fresh air to the combustion chamber. I've just spent some time looking for the MSDS for the fluid, but so far I haven't had any luck.
Comment: First things first: Have you tried cleaning it off with soap and water?
Answer: According to the answers on this DIY question, the TRD is a Thermal Release Device that goes off if the combustion chamber temperature gets too high and is designed to cut off the flow of air in order to extinguish the flame to prevent any runaway combustion leading to your house burning down.
Since this takes place in the combustion chamber, there's no way for the fluid in the device to enter your drinking water plumbing, so there's nothing to worry about in terms of toxicity in the water.
Since it releases into the air in the combustion chamber to extinguish the fire, it's possible that some has vaporized and got into the general air circulation within your house. However, it's also likely that the vast majority of it burned as the burner in your water heater was extinguished, leaving very little to disperse. It's equally possible that the liquid simply left the vial in which it's stored and is sitting as a little puddle or thin coating on the bottom of the combustion chamber somewhere.
In my estimation, there is little to nothing to worry about, though the only way to be 100% certain would be to contact RUUD and ask them.
If you're concerned about this happening again in the future, you might want to ensure your new water heater doesn't use a liquid for this purpose. Now's a good time to decide since, according to the answers at that other question, you will be shopping for a new water heater now - this doesn't seem to be a replaceable item. Additionally, I'd recommend contacting RUUD about the issue anyway as it seems that they to want to know any time one of these goes so they can investigate why and make future heaters more safe.
Comment: Forgot to mention: RUUD wouldn't be stupid enough to make a water heater that would poison people
Comment: occasionally some products do poison people, but it's very much the exception, so it's not something to worry about unless you have a particular reason to worry about it.
Comment: You'd _really_ like to think that, @user253751, but some companies design products even highly regulated products (I'm looking at you 737-Max) with unintentional serious design flaws. But, in general, I'd agree with you.


Black pine seedling

Question: I just started planting black pine seeds around late August.
The seedling's cotyledons seem to be dying so I google about the seedling diseases and I found that these guys need to be exposed to sunlight to prevent fungi (or whatever, sorry I'm pure beginner).
So I took one out and leave it in the sun for 30 minutes and it turns out to be even worse Dx (The Top pic).
Comment: One obvious "beginner mistake" is that your plant pot presumably doesn't have any drainage holes in the bottom, otherwise it would not have made a very useful coffee cup. Having the seedlings with their roots permanently waterlogged would be worse than lack of direct sunlight.
Answer: When you start seedlings, the main goal is to give them optimal conditions, which usually means mimicking the (best case) conditions in their natural environment.
For black pines, this includes well-draining soil and not too much fertilizer. They grow in coastal areas with little to no frost.
Looking at your seedlings, I am wondering what kind of growth medium you are using? As mentioned before, a closed pot will quickly run into drainage issues and root rot unless you are very careful. I would very carefully transfer them into plant pots with holes - use a saucer or cache-pot if you like, but empty it after watering.
Many plants from coastal areas struggle with low humidity (in the air) and dry tips can be an indicator. However, I suspect sunburn: even plants that thrive in full sun need a transition phase if they spent a certain time indoors, starting with dappled shade and only slowly transitioning to full sun.
If you can (and your climate permits), keeping your pines outdoors will be the best for them in the long term. They need the seasonal change and the winter rest, which they will never get indoors.
Comment: Thanks a lot! I live in a hot climate country so I'm kinda afraid if outdoor will be too hot for the seedling. The medium I used is the akadama soil and pummice.

Black pine seedling


android app to control arduino using usb

Question: I am trying to figure out how i could make an android app like this one, https://www.youtube.com/watch?v=cVj0jqOlGXo but instead of transmitting through bluetooth it would transmit it through a usb cable that plugs from my phone directly into my arduino.
Comment: There are no "good" answers for this, but two classes of possibilities - USB host mode, and "accessory" or "ADK" mode.  Both have a number of issues.  Both have received substantial coverage on the main stackoverflow site which you should read (**do not** simply post a new question there) and elsewhere online.
Answer: I think you may want to look USB Serial port communication in android. Some googling will help
 here's a nice example of such work, described in detail:
http://felhr85.net/2015/01/09/a-dirty-and-quick-example-of-serial-port-communication-in-android/
And in case the codes/that source gets lost, here is the
GitHub link of the developer: https://github.com/felHR85/SerialPortExample


Could diatom blooms affect albedo of an exoplanet?

Question: And perhaps display a seasonal variation if the exoplanet has an axial tilt, providing proof of an Earth-like world supporting at least oceans with microbial life?
Comment: Detecting any albedo change would be a challenge-- we just don't have the capability to pick out the reflected light of an earth-sized planet from the light of its star.
Comment: Could you elaborate your question a bit more: What are diatom blooms? And be aware that we're barely able to measure albedos for giant planets. We're still far away from albedo variations, especially for small, rocky planets.
Comment: Well, yes, they'll affect the albedo unless the non-diatomic surface has the same reflectivity.  There's the question of how much.
Answer: First off, I am rather certain that by diatom bloom you refer to algal bloom which is a seasonal change of sea color, at least here on Earth, the only system we have observed yet. Your question is indeed rather hypothetical, but from a astronomy/ physics points indeed an interesting one.
Next, let me summarize the assumptions I am reading out of your question:

You assume an exoplanet that is mainly covered by water. Such a waterworld is not only existing in movies, but also a common toy system in climate science (of Earth).

The exoplanet is not only habitable, but also has some kind of algae living in its ocean. A strong assumption indeed, but for our calculation, it gives us numbers for how the color and thus the emissivity of the planet changes.

Indirectly, you also assume our hypothetical waterworld has an atmosphere. Why? An waterworld exoplanet would otherwise have already quickly evaoprated evaporated into space. In terms of greenhouse calculation later on, we will assume that the atmosphere consists only of water vapor. This means that our hypothetical exo-algae on waterworld would not necessary be aerobic. After all, we are after the physics here.

Could algae bloom affect the albedo of an exoplanet? Definitivley yes, but the question is, how much. And if we could observe that from Earth would be a whole different question.
What do the assumptions mean in numbers?
The albedo of open ocean water (on Earth) is $\alpha_O = 0.06$. Concerning the algal albedo $\alpha_A$, I found e.g.

a poster "Algal blooms: how are they harming models used for climate management?" by Ian Jenkinson
an article John Raven: The possible roles of algae in restricting the increase in atmospheric CO2 and global temperature
another article by H Gordon, M Jacobs: Albedo of the ocean-atmosphere system: influence of sea foam.

In short: Algae do not only change the color of the ocean (which color depends on the involved species), but also may produce foam (with $\alpha_A \approx 1$). The latter seems to have the largger effect since $\alpha_A \gg \alpha_O$. One of the above mentioned papers suggests a 10% coverage of the ocean with foam, an assumption which sounds appealing to me.
Some calculations
For a planet with radius $r$ in thermal equilibrium, the incident radiation equals the black body radiation:
$$ \pi r^2 E (1- \alpha) = 4 \pi r^2 \sigma T_{\rm eqi}^4 \Longleftrightarrow
T_{\rm eqi} =\sqrt[4]{\frac{E (1-\alpha)}{4 \sigma}}$$
In this formula, $E$ is the solar constant ($E_{\rm Earth} = 1368 {\rm W}/{\rm m^2}$), $\alpha$ is the (overall averaged) albedo ($\alpha_{\rm Earth} = 0.3$) and $\sigma = 5.67 \cdot 10^{-8} {\rm W\cdot m^{-2}K^{-4}}$ the Stefan-Boltzmann constant. For Earth this leads to $T_{\rm Earth,eqi} = -18^\circ {\rm C}$ which shows that we have to include the Greenhouse effect, i.e. that the atmosphere absorbs part of the outgoing radiation. We do that by introducing a  factor $\beta$:
$$T =\sqrt[4]{\frac{E (1-\alpha)}{4 \sigma \beta}}$$
On Earth, all Greenhouse gases (${\rm H_2O, CO_2, CH_4}$) contribute to an average $\beta \approx 0.62$ which leads to a more realistic global average temperature of $T = 15^\circ {\rm C}$ for Earth.
For a water world (without algae) we may use $\alpha = 0.1$ which leads to $T_{\rm WW} = 32^\circ {\rm C}$ which compares to a snowball planet with $\alpha = 0.8$ and $T_{\rm SB} = -63^\circ {\rm C}$.
Comment: Absolutely correct.
Comment: That is fantastic, thanks!   Therefore a bloom could be detected at interstellar distances, if our hypothetical telescope had sufficient optical resolution.
Comment: @sflitman I finally managed to do some calculations. If it helps you, I would continue.
Comment: @sflitman I guess you have to compare the *mean* planetary temperatures for $\alpha_{\rm WW}=0.1$ with those for $\alpha_{\rm bloom} = 0.9\cdot0.1+0.1\cdot 1$, that's much less $\Delta T$ you have to resolve than $(T_{\rm WW}-T_{\rm SB})$ what I calculated. If I have time later, I might add another paragraph to my post.


Is there any way to keep users from saving documents locally?

Question: If users view documents on my website (for example a pdf file that represents some confidential information), is there anyway I can prevent them from saving the document locally?
Answer: In a word - no.
Once you've sent the data to their browser they can do what they want with it.
You could use some Flash Component or Java Applet to make it harder to save the information but they could still take a screenshot of the browser and save that locally.
The only practical approach is to ensure only trusted users can access the information (which you're probably doing already).
Answer: Once the user has downloaded your PDF (to the browser) they can do anything with it. They can save it to elsewhere in their hard drive. Even if you somehow disabled this anyone could intercept the network traffic using a third-party application and save the PDF that way.
Your best bet is some kind of Digital Rights Management tool to stop the user from distributing the PDF even if he or she downloads it. For example, FileOpen or Adobe Content Server. As you can see, such tools can (technically) prevent printing, force the content to expire, etc.
Note that this is most useful for users who are likely to accidentally download or distribute the data. Malicious users may be able to circumvent these restrictions, e.g. bypassing the print restriction by taking a screenshot of each page and printing that instead.
Answer: This is very difficult.  Off hand the most effective thing I can think of would be to deploy a Java applet that displays info by way of downloading it at run-time
But that still won't prevent users from taking screenshots and saving those.
Comment: It's not very difficult.  It's impossible.
Answer: If you are that concerned about it, you should not make the confidential data available or at the very least available in a downloadable format.
Answer: Not a solution, but an anecdote.  Several years ago a friend of mine had compiled a lot of sensitive internal information into a Word document, and had watermarked the pages with "FOR INTERNAL USE ONLY" and locked it.
A couple of days later she got a phone call from the sales manager.
"How do you unlock this Word document?"
"Why?"
"I want to take the watermark off so I can give it to a customer..."
Head -> Desk - Thump!
It's a tough issue.
Answer: A relatively easy way to prevent this from happening by accident is to hide the toolbars and menus when the document opens.  See this question/answer on the Adobe forum.  Of course the user can get around this if they know how and a determined user can circumvent just about any restriction you place on the document if they have rights to view it.
Answer: If it's in a work network, I would suggest you implement Active Directory, if you haven't already. With Active Directory working, you could easily configure user's default profile path, having that path on a file server. That way, all the applications by default will save into that path instead of the local hard drive. Hope it helps.


.NET equivalent of modern Java web architecture

Question: Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring MVC for the web tier, Spring for the "Service"/business-logic-layer and an ORM mapper such as Hibernate for persistence. What is the equivalent in .NET?
I guess ASP.NET is used for the web tier and ADO.NET for persistence but what is the equivalent to Spring, i.e. what is used to wire transactions and components and such.
I am aware of Spring.NET but I'm more interested in the de facto way of building applications in .NET.
Answer: The default approach is ADO.NET/Linq-to-Sql, ASP.NET and custom service layer that reinvents the wheel. Microsoft has Unity for autowiring, but I do not feel dependency injection is mainstream in .NET world yet.
But if you go for the best practices, it is ASP.NET MVC for UI, any DI framework (Castle,Unity,Autofac,...) for wiring, and NHibernate for persistence.
Answer: Something like this?
http://www.asp.net/mvc/
Answer: There is no de facto way for data access in .NET.
Options include:

ADO.NET DataReaders*
ADO.NET DataTables*
LINQ to SQL*
nHibernate
ADO.NET Entity Framework*
Typed DataSets*
Spring.NET
CSLA.Net

Notice the ones with *, these are current offering from Microsoft itself. And I've skipped the ones I don't remember how to spell.
Answer: ASP.NET MVC + The data access that suits your job better.
There are many other frameworks, tools and libs that can help such as Castle ones, Ninject, Nunit, NLog etc.
But i believe that the better response to your question is "It depends".
Answer: Actually, CSLA does not provide any data access.  Data access implementation is left up to you.
Comment: Critics of CSLA tend to try to compare CSLA to an ORM.  CSLA is not an ORM!  An ORM could compliment CSLA, but CSLA does not perform the functions of an ORM layer.
Answer: Note that ASP.NET MVC isn't RTM yet, but we've been using ASP.NET web forms for years (since .NET 1.0).


How do I use sftp to get a directory and all its contents?

Question: When I try to use the command get from sftp, I get the error saying that it is not a normal file.  Is there a way around this?
Comment: I think you're right... it is a duplicate... but the answer given by @uther is more thorough than the answer given before to the other question... Is there a way to post his answer onto the other question.  Since my question is so similarly, feel free to delete my question but please repost his answer on the other question.
Answer: You can connect to the host using sftp -r and then get the directory. If you forget to use -r when you connect, you can use get -r.
sftp -r me@somehost
Or
sftp> get -r tmp/
Fetching /home/me/tmp/ to tmp
Retrieving /home/me/tmp
/home/me/new.orig.dmp            100%  417KB 416.8KB/s   00:00
/home/me/untangle.dmp        100%  398KB 398.3KB/s   00:00
/home/me/repos.orig.dmp          100%  415KB 415.2KB/s   00:00
/home/me/me-untangle.dmp 100%   32KB  32.4KB/s   00:00
sftp>

If you want to always ensure you pass -r to sftp, add it as an alias to your ~/.bashrc or similar.
alias sftp="sftp -r"
From man 1 sftp
 -r      Recursively copy entire directories when uploading and download‐
         ing.  Note that sftp does not follow symbolic links encountered
         in the tree traversal.
         .........

 get [-Ppr] remote-path [local-path]
         ........
         If either the -P or -p flag is specified, then full file permis‐
         sions and access times are copied too.
         If the -r flag is specified then directories will be copied
         recursively.  Note that sftp does not follow symbolic links when
         performing recursive transfers.

Comment: why does not my sftp client didn't has a -r option?

>>>>>sftp: illegal option -- r
Comment: sftp: illegal option -- r on CentOS 6.4 openssh-clients-5.3p1-84.1.el6.x86_64
Comment: in my ubuntu OS , its working.


Example of array.map() in C#?

Question: Consider the following common JavaScript construct
var ages = people.map(person => person.age);
Giving the desired result, which is an array of ages.
What is the equivalent of this in C#? Please include a simple example. The documentation indicates select or possible selectAll but I can't find an example online or any other SO question which can be pasted in and works.
If possible, give an example which turns the following array {1,2,3,4} into the following {'1a','2a','3a','4a'}. For each element, append "a" to the end, turning it from an Integer to a String.
Comment: `(new[]{1,2,3,4}).Select(v => String.Format("{0}a", v))`
Comment: @AlexeiLevenkov You missed the `.ToArray()` on the end.
Answer: This is called projection which is called Select in LINQ. That does not return a new array (like how JavaScript's .map does), but an IEnumerable<T>. You can convert it to an array with .ToArray.
using System.Linq; // Make 'Select' extension available
...
var ages = people.Select(person => person.Age).ToArray();

Select works with all IEnumerable<T> which arrays implement. You just need .NET 3.5 and a using System.Linq; statement.
For your 2nd example use something like this. Notice there are no arrays in use - only sequences.
 var items = Enumerable.Range(1, 4).Select(num => string.Format("{0}a", num));

Comment: on c#6 : `var items = Enumerable.Range(1, 4).Select(num => string.Format($"{num}a"));`
Comment: @BartCalixto - you don't need the string.Format... `var items = Enumerable.Range(1, 4).Select(num => $"{num}a");`
Answer: Only for info, if people is a List<Person>, the ConvertAll method is pretty similar to JS's map, e.g:
var ages = people.ConvertAll<int>(person => person.age);

But if you have an Array and you want to use any List<T> methods, you can easily achieve that by converting your variable into a List from Array, e.g:
var ages = people.ToList().ConvertAll<int>(person => person.age);

And finally, if you really need an Array back, then you could convert it back, e.g:
var ages = people.ToList().ConvertAll<int>(person => person.age).ToArray();

But that last example is not as good as the other answers, and you should use Select if you're working only with Arrays. But if you can, I suggest you to move to List<T>, it's much better!
Comment: convert to List and use ConvertAll allow me to refactor my large Select code that is not allow to have parameter constructor in Linq
Answer: The LINQ extension methods on collections give you a host of really handy utilities. Select is one of them:
int[] arr = { 1, 2, 3 };
IEnumerable<string> list = arr.Select(el => el + "a");
string[] arr2 = list.ToArray();

foreach (var str in arr2)
    Console.Write(str + " ");

This should output:
1a 2a 3a

This can safely be condensed to a 1-liner:
string[] arr2 = arr.Select(el => el + "a").ToArray();

A working example:
https://ideone.com/mxxvfy
Related docs:
Enumerable.Select
Basic LINQ Query Operations (C#)
Comment: How this is different from @Richard Schneider's answer. Also what's the need to do ToList()??
Answer: If you don't want to perform conversion to/from an array Array.ConvertAll can to the work. It is declared in Array class of System namespace (remember to add using System; at the top of the file) as:
public static TOutput[] ConvertAll<TInput,TOutput> (TInput[] array, Converter<TInput,TOutput> converter);

Example:
var items = new[] {"abc", "ab", "abcde"};

var result = Array.ConvertAll(items, p => p.Length);

Console.Out.WriteLine(string.Join(", ", result)); // Outputs 3, 2, 5

Method reference: https://learn.microsoft.com/en-us/dotnet/api/system.array.convertall?view=net-5.0
Check this section to see .NET version compatibility: https://learn.microsoft.com/en-us/dotnet/api/system.array.convertall?view=net-5.0#applies-to
Answer: Linq's .Select is the map equivalent and .Aggregate is the fold equivalent.
var nums = new[] {1,2,3,4};
string[] r = nums.Select(x => x + "a").ToArray();

Answer: You can use the keywords from, select, in and while;
Or for your example:
 var ages = (from person in people select person.age).ToArray();

So essentially the syntax would be:
 <<list-output>> = (from <<var-name>> in <<list-input>> select <<operation>>);

Example of array.map() in C#?


H1b Visa - Any way to save taxes?

Question: I am in the US on H1b visa for a period of 3 years. Are there any ways I can save the income-tax to be paid for the first year? If yes, then how?
Comment: keep in mind that filing a fraudulent tax return may be a good enough reason to deny your green card/naturalization, even retroactively. Also, it may be grounds for deportation, depending on what you're actually charged with.
Comment: It's not about filling a fraudulent tax return. Question is that any possible way? any schemes where we can invest and get exemption from paying whole tax amount. @littleadv
Comment: Though I am not anNRI but I think H1B showing dependent's must have social security number to be dependent and any one living alone in USA cannot show his/her Indian dependent's to avoid tax
Answer: Short answer NO! Long answer,don't try to. Your tax is deducted at source depending upon the number you fill on your W-4. If the number on your W-4 adds up to 3 or higher, your federal tax rate may be relatively less, however you will still need to account for it at the end of the year. On H1b you will be charged medicare and Social Security in addition to federal and state tax and there is no way to avoid that. However, you can get a refund at the end of the year depending upon your total salary and how much you had paid in taxes.
Just an advice:- There are a lot of people who claim dependents and don't fill their W-4 out correctly and also end up saving taxes as a result. There are also a lot of lawyers out there who will gull you into giving you a big refund, but if it doesn't sound correct, it usually isn't! There is a big chance that people can get away with it, but in case they are caught, they will have to pay back every penny along with interest and penalties(Which are really high).

H1b Visa - Any way to save taxes?


VSTO AddIn for Word Only

Question: I've written a VSTO addin for Word 2003 which is working correctly. The only problem is that the addin displays a commandbar which is also appearing when I create a new email in Outlook. How can I prevent the commandbar addin from displaying in the context of Outlook and only in Word?
Comment: Is your copy of Outlook configured to use Word as the editor for email messages?
Answer: Your problem is that Outlook is using Word as the editor for email messages.
You can turn that off from Tools Options Mail Format in Outlook, or you can will need to do detection, for instance the Document.Kind property, will have a value of wdDocumentEmail (=2) if it's an email message
Answer: I haven't tried this, but can you use the Parent property of the Word instance to determine if its parent is Outlook and in that case not display the commandbar?
Answer: The parent property just keeps looping back to Microsoft Word, and never to Outlook. I ended up importing User32.dll and getting the windows name, and then checking to see if that contained Microsoft Word.
The only problem I am still having is that if a user opens Outlook, creates a new message, and then opens Word, the WINWORD.exe process still has what im assuming to be the default template, and therefore the new copy word will not show my plugin.
Answer: There's several properties in Word that should let you detect whether it's being run as a mail editor or not.
App.MailEnvelope
App.Envelope
App.Email
All return email related information. I believe at least one of them will return NOTHING if word is NOT being used as an email editor, but I no longer have access to that code, so I couldn't be sure without trying it out.
That said, I do know that even MS recommends against using Word as email editor. in Office 2007 and 2010, I don't believe that's even an option anymore.

VSTO AddIn for Word Only


What is the origin country of the bicycle brand called Longhorn?

Question: I recently brought a hybrid bicycle from a brand called Longhorn. I have never heard about it. However the quality is quite good. So I am quite curious to know from which country the brand originates and if it has been established for a long time or if it is a newer brand. I brought the bike from India.
Comment: A very quick Google search suggests it's an Indian brand. The actual manufacturing may be outsourced or not.
Comment: There's heaps of useful results if you try a search engine like google.  "longhorn bicycle" returns mostly Indian results, with one exception being a shop in Austin, Texas.
Comment: I had a quick google myself, and the answer certainly didn't leap out at me.  Seems to me like a valid question where the answer is not easy to find.  We certainly happily provide answers on other things that are much easier to google
Comment: I posted the question. I did a google search myself but the answers were too vague thats why I posted it here. Heck I dont even know the well known brands outside India. There are so many of them.
Comment: I'd ask the other way round: can you find any reference to Longhorn branded bikes outside India? BSO brands are usually seller specific, so the exact same bike would be branded Roadmaster or Kent at Walmart and Yosemite at our local equivalent.
Answer: You can find and answer in this article:
https://www.tribuneindia.com/news/archive/features/indian-bicycle-industry-losing-sheen-336950

In fact, a couple of firms here have started manufacturing bicycles abroad. Suneet Syal from Vinsun Enterprises said they were manufacturing bicycles by the name of Longhorn and Chase in China and importing these here*.

*India


What does "Down to 53 days" mean on Blacklist?

Question: Helping a client whose PC was infected with a trojan used to send email via SMTP. I've cleaned their PC and doubled-checked with a few online tools. Their IP was blacklisted and is still listed but says "Down for 53 days". What does this phrase actually mean? That time coincides with me cleaning the PC.
Answer: It means whatever source you chose to check on the IP address hasn't been able to get a response from that IP for 53 days.
However, if that is a PC as you say, it should not be surprising. PCs don't act as servers, which is normal. You must ask yourself why did this PC acted as a server 53 days ago? If the answer is "because the malware that you cleaned had been running malicious server software", then seeing this message is actually a good thing.
Comment: I believe the blacklisting was due to the IP address being reported to the blacklists for sending out spam with a Trojan being the most likely cause. I forgot to add the screenshot earlier. I also blocked port 25 outbound on their windows firewall. They use Google mail so there is no reason for their PC to send any SMTP email.


Can I use 'prior' without 'to'?

Question: Can the word 'prior' be a substitute for 'earlier', that is not followed by any clarifications in expressions like 'four years prior' (and then goes a period, the sentence stops)? Like '[he did this]. [he had done that] four years prior'.
Answer: That is using "prior" as an adverb, a substitute for "before" or "earlier".
This dictionary calls that usage questionable:
American Heritage Dictionary "prior"

adv.  Usage Problem Before.

Usage Note: Though prior usually modifies a noun that comes after it, as in prior approval, it sometimes modifies a noun for a unit of time which precedes it, as in five years prior. These constructions are marginally acceptable when the combination serves as the object of a preposition, as in A gallon of gasoline was $4.29, up 10 cents from the week prior. In our 2014 survey, 51 percent of the Panelists accepted the sentence, with many commenting that they would prefer from the prior week or from the week before. The construction is even less acceptable when it acts as an adverbial modifier: only 29 percent of the Panel approved My cellphone was stolen. I had just bought it two days prior.

It's probably better for a learner to avoid using the word that way.
Answer: There are sentences where that is acceptable, yes.
The word prior must be used in reference to a different time. If the time it is in reference to is not obvious then you need 'to'. "Prior to" is used in the same way as "before".
"The building was demolished prior to my arrival."
If you want to use prior without the 'to', then the time or event you are referencing must be stated immediately beforehand.
"I arrived at the building but it had been demolished one week prior."
In this sentence it is implied that you mean: "I arrived at the building but it had been demolished one week prior to my arrival." but the redudant ending is omitted.
With the word 'earlier', when no other time is referenced, it is implied that the time referenced is now(whenever the word is used).
For example, "I went to the shop earlier."
This does not work with 'prior'. "I went to the shop prior" on its own is not a correct sentence as the listener would be left wondering which time you were referencing with the word prior. It may be easier to think of prior as a synonym of before instead of earlier. "I went to the shop before." is incorrect. Before what?
Answer: The word prior is actually a synonym of earlier (only in meaning). However, prior can not function as a full substitute for earlier according to grammar rules.
A few days earlier, he had assured me that he didn't want to come. In this example earlier functions as an adverb while prior cannot function as an adverb.
The word prior can be used as an adjective before a noun in the meaning previous/preceding.
prior night, prior day, prior knowledge,  prior arrangement.
The course requires no prior knowledge of Spanish.
Or it can be used as a complex preposition with to (prior to) in the meaning before. It is followed by a noun or something functioning as a noun (gerund or substantive clause).
The questions had been asked prior to my arrival.
The plane seemed to catch fire a few seconds prior to taking off.

Can I use 'prior' without 'to'?


What is the current (April 2023) browser support for Ed25519 certificate signatures?

Question: It seems that Firefox and Chrome both support x25519 keys, but they do not accept keys signed using Ed25519. Am I correct?
If so, where can I find the official source of this information?
Comment: The question's title seems to be about accepting certificates that are _signed with_ Ed25519. The body of the questions seems to be about accepting Ed25519 signatures of x25519 ECDH session keys, that is certificates _for_ Ed25519 signature keys, a different thing.
Answer: You are correct, currently neither Chrome nor Firefox support the EdDSA signature scheme (i.e. neither Ed25519 nor Ed448).
For Firefox, there is a Bugzilla ticket open regarding support for Ed25519 in NSS, the crypto library used by Firefox.
Chrome is currently trialing Ed25519 in the Web Cryptography API. See the associated issue for details. Still, this is not the same as support for Ed25519 in certificates/TLS handshakes. I was unable to find an offical ticket tracking Ed25519 support in TLS handshakes for Chrome/Chromium, but the source code indicates that this is definetly not supported.
As noted in the Bugzilla ticket, certificates with Ed25519 keys are currently forbidden by the Baseline Requirements. All public Certificate Authorities have to adhere to the Baseline Requirements, so this key type is likely rarely used in X.509 certificates, as it can only be used for non-public certificates.
X25519 on the other hand, a Diffie-Hellmann key exchange using Curve25519 is well supported in browsers. Firefox has supported X25519 since approximately 2016 (old bugzilla ticket tracking inclusion). Chrome has supported X25519 since Chrome 50 according to Chromestatus.
Comment: If I have Ed25519 public private keypair, is there a way to deterministically generate X25519 keys to sign an X509 certificate that would be accepted by modern browsers?
Comment: X25519 is a Diffie-Hellman function. You cannot sign anything with it. Both X25519 and Ed25519 are based on Curve25519, but otherwise are distinct algorithms with different applications (one is a key exchange method, the other is a signature scheme). As above, currently none of the major browsers supports a signature scheme based on Curve25519 in TLS.


Ubuntu 12.4 VM Change Static IP

Question: I am wondering if you have the option to change the static IP on a Ubuntu VM or if you should just spin a new virtual machine up?  Has anyone out there every attempted this?
Answer: Edit /etc/network/interfaces
Find the config for eth0 (it will look something like below) and change to your preference
auto eth0
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0

Documentation on interfaces file can be found here : http://manpages.ubuntu.com/manpages/lucid/man5/interfaces.5.html
After you have changed the above you will need to restart networking
sudo /etc/init.d/networking restart

or reboot the computer.
Answer:
Has anyone out there every attempted this?

Ummmmm. Yes.
Just change the IP if that's what you want to do. Or don't do that and just spin a new VM if you'd prefer.
Comment: Sorry, never done it, did not know ;-)
Answer: (Since I must not add a comment due to my rep points, I have to add an answer...)
Beyond Sam's answer above, also note that some services on that machine may need to be re-configured. Especially bad when you are running an Oracle db on that machine: the IP address of the machine at the time of installation is buried somewhere in its configuration files, and must be changed manually. Some other programs may show similarly odd behavior.

Ubuntu 12.4 VM Change Static IP


Supremum norm of certain quantity

Question: Is there any easy way of finding supremum of the quantity $$\sum_{i,j=1}^n|z_i-z_j|,$$ where $|z_i|=1$ for $1\leq i\leq n$ ? We are considering complex variables of course.
Comment: @PeterHeinig, what's wrong with the sum notation?  It looks to me like a sum over $n^2$ terms that turns out to be twice the sum you propose.
Comment: @LSpice, You are right. One can interpret the sum as $2\sum_{1\leq i<j\leq n}|z_i-z_j|$ I think may be there is an easy way to calculate it, using geometry of the Euclidean plane and symmetry.
Answer: The following argument appears on p.156 of

L. Fejes Toth, Regular figures, A Pergamon Press Book, The Macmillan
  Co., New York, 1964.

Assume $z_{1},\ldots,z_{n}$ are ordered on the circle and let $S=\sum_{1\leq i<j\leq n}|z_{i}-z_{j}|$. Let also,
$$s_{k}=\sum_{i=1}^{n}|z_{i}-z_{i+k}|=2\sum_{i=1}^{n}\sin\frac12\widehat{z_{i}z}_{i+k},
$$
for $k$ an integer between 1 and $n-1$, and with the convention that $z_{n+j}=z_{j}$.
Since the function $\sin(x)$ is concave for $0\leq x\leq\pi$ and $0\leq\frac12\widehat{z_{i}z}_{i+k}\leq\pi$, we have
$$s_{k}\leq2n\sin\left(\frac{1}{2n}\sum_{i=1}^{n}\widehat{z_{i}z}_{i+k}\right)=
2n\sin\frac{k\pi}{n}.$$
On the other hand, $s_{k}=s_{n-k}$ and if $n$ is even, the sum $s_{n/2}$ contains the distance $|z_{i}-z_{i+\frac{n}{2}}|$ twice. Hence, $2S=\sum_{k=1}^{n-1}s_{k}$, and thus
$$S\leq n\sum_{k=1}^{n-1}\sin\frac{k\pi}{n}=n\cot\frac{\pi}{2n}.$$
By strict concavity of the sine function on $(0,\pi)$, equality can only occur when the $n$ points are regularly distributed on the circle (like the $n$-th roots of unity).
The following reference may also be of interest,

J.S. Brauchart, D.P. Hardin, E.B. Saff, The Riesz Energy of the $N$-th
  Roots of Unity: An Asymptotic Expansion for Large $N$, Bull. London
  Math. Soc. 41 (2009), no. 4, 621-633; arXiv:0808.1291, DOI: 10.1112/blms/bdp034

Supremum norm of certain quantity


Does general relativity entail singularities if there's a positive cosmological constant?

Question: I've heard that Hawking and Penrose proved that general relativity entails singularities.  But it says in the abstract of what seems to be the paper in which they proved it (The Singularities of Gravitational Collapse and Cosmology) that the theorem applies only if certain assumptions are made, one of which is a zero or negative cosmological constant.
Hasn't a positive cosmological constant been favored since the 1998 discovery that the expansion of the universe is accelerating?  If so, is it known (i.e. mathematically proven or clearly established from physical evidence) that general relativity entails singularities in that case?
Answer: I would say the sign of the cosmological constant would certainly play a factor in determining singularity behaviour of the universe. This can be seen from Raychaudhuri's equation, which is precisely obtained from Einstein's field equations, and is given by:
$$\dot{\theta} + \frac{1}{3} \theta^2 + \sigma_{uv}\sigma^{uv} - \omega_{uv} \omega^{uv} + \frac{\kappa}{2} (\mu + 3p) - \Lambda = 0$$
where $\theta$ is the expansion scalar, $\sigma_{uv}$ is the shear tensor, $\omega_{uv}$ is the vorticity, $\mu$ is the energy density, $p$ is the pressure, and $\Lambda$ is the cosmological constant. (This is not the most general form of the Raychaudhuri equation, as I have assumed that the universe model is spatially homogeneous, which has simplified things quite a bit (all partial derivatives are now ordinary time derivatives, however, it will illuminate this discussion slightly). Also, the Raychaudhuri equation was the main motivation behind the Penrose-Hawking singularity theorems.
Now, our universe is understood to be spatially homogeneous and isotropic on the largest scales, and as such, by these symmetries, we must have that the shear and vorticity vanish, such that Raychaudhuri's equation becomes:
$$\dot{\theta} + \frac{1}{3} \theta^2 + \frac{\kappa}{2} (\mu + 3p) - \Lambda = 0$$
There are many ways to get $\theta(t) \to \infty$, and they depend on the curvature of the universe, the sign of the cosmological constant, the pressure/energy density in the universe, the nature of dark energy,etc… Many models exist in the scientific literature which discuss these issues at length. For example, the recollapse theorems of Barrow and Tipler are actually much more general than the Penrose-Hawking singularity theorems, as Barrow and Tipler use the full Einstein equations, while Penrose-Hawking limit their studies to timelike geodesics.
Barrow/Tipler Paper
Comment: Please forgive my stupidity, but I'm unclear whether that's a Yes or a No answer to my question. Can you clarify, in layman's terms?
Comment: I would say an answer to your question is Yes. In the case of a positive cosmological constant, one can still have singularities, where for example $\theta(t) \to \infty$. As a special case of a flat FLRW universe above, consider a de Sitter space time, where $\mu = p = 0$ and $\Lambda > 0$. Raychaudhuri's equation simply becomes $\dot{\theta} + \frac{1}{3}\theta^2 - \Lambda = 0$. This ODE will have "exploding" solutions for all $\Lambda > 0$ as long as the initial condition is chosen such that $\Lambda \neq \theta_{0}^2/3$, where $\theta_{0}$ is the initial condition.
Comment: That shows that you _can_ have singularities with positive cosmological constant, ok. But what I'm getting at is whether it has been proven that _all_ solutions to Einstein's equations with positive cosmological constant _must_ have singularities.
Comment: No such theorem exists. For there are many examples of space times that have no singularities at all. Singularities are not generic, one has to have rather specific conditions to generate them.
Comment: Thank you. Would I be correct in assuming that at least some of these space times without singularities are physically plausible? (As plausible as any, I mean. I know that GR isn't generally regarded as the last word on everything)
Comment: (I think that G.R. is the last word on everything -:), but I am extremely biased, don't tell anyone!) The only one that I can think of off the top of my head (besides the trivial Minkowski spacetime of Special Relativity), is that of a spatially closed de Sitter spacetime. This is a simple example of a bouncing universe. Certainly, closed de Sitter universes can exist as past or future asymptotic states depending if the universe has closed topology or not, so it is very physically plausible (it is simply a vacuum spacetime).
Answer: A singularity involves an infinite amount of negative potential energy in a localized volume.  A nonzero cosmological constant would only yield a finite amount of positive energy in a localized volume.  So the cosmological constant might slow down the rate of singularity production, but it won't stop it.
Comment: Thank you for answering.  If it's that straightforwardly Yes, why do Hawking and Penrose make a point of saying they haven't proven it? (They do give an informal argument in favor of Yes in the 7th paragraph)
Comment: @Anthony: they assumed it because it wasn't expected and it simplified assumptions.  you have manifest singularities in the schwarzschild-de sitter spacetime, so you know that the global statement isn't true.
Comment: @Jerry Schirmer: What do you mean by "the global statement" ?
Comment: That the cosmological constant can stop singularity formation.  There are exact, singular models with a nonzero csomological constant.  I know that this isn't quite what you are saying, but it's worth reading for someone coming through this site in the future.
Comment: Thanks for clarifying.  Do you know if a positive cosmological constant can _ever_ stop (or avoid) singularity formation?
Answer: Singularities are very likely impossible to create in the real universe.
In other words, as a singularity gets close to forming, the incoming random GR waves and other energy will rip the formation apart, keeping it in a state of almost singularity.
As an example, all Black Holes spin in the real world. The size of the singularity in a spinning Kerr geometry is within a hair of being zero:

Thus we reach the conclusion that at timeline or null geodesic or
  orbit cannot   reach the singularity under any circumstances except in
  the case where it is confined to the equator, cos() = 0…..Thus as
  symmetry is progressively reduced, starting from the Schwarchild
  solution, the extent of the class of geodesics reaching the
  singularity is steadily reduced likewise, … which suggests that after
  further reduction in symmetry, incomplete geodesics may cease to exist
  altogether
Kerr Fields, Brandon Carter 1968.

So while General Relativity in theory has singularities, its not likely that any exist in a real noisy universe. The cosmological constant does not I think enter into the problem.
The wikipedia page on the singularity theorems says as much as well.
https://en.wikipedia.org/wiki/Penrose–Hawking_singularity_theorems

It is still an open question whether time-like singularities ever
  occur…
Comment: Thank you for answering.  Eliminating the singularities is often given as one of the motivations for quantum gravity research.  Are you saying that simply applying GR to the real universe can accomplish this just as well?
Comment: I think you are confusing some topics: Your notion of "random GR waves" and other energy is not well-defined. Second, when you say all Black holes spin in the real world, what do you mean? To have a black hole, all you have to do is satisfy Birkhoff's theorem. In a Kerr metric, there IS a singularity at $r^2 + \alpha^2 \cos^2 0$, it is a ring singularity, and it is irremovable, as the Kretcshmann scalar is singular! Further, the quote you provide from Brandon Carter, is about geodesics in an orbit of the Kerr metric, and is separate from the notion of cosmological singularities.
Comment: Continued...The cosmological constant very much enters the problem when it comes to singularities. This can be seen from a simple application of the Raychaudhuri equation, which says that the universe expansion is governed by: $\dot{\theta} = -\frac{\theta^2}{3} - 2 \sigma^2 + 2 \omega^2 + (1/2)(\mu + 3p) + \Lambda$. The terms on the right-hand-side of this equation (including the cosmological constant) may/may not contribute to a singularity. It is NOT an open question whether time-like singularities ever occur, they occur in G.R. all the time. The question exists around their observation.
Comment: The question is not about cosmological singularities.
Comment: The ring singularity has a set of zero measure of geodesics that run into it. In other words its impossible to hit.
Comment: There are no actual Kerr holes in the universe, as the Kerr solution exists only in a perfectly quiet background. There are Kerr - like objects to be sure, but singularities exist only in solutions of GR that have some symmetry about them. The theorems of Penrose and Hawking only apply to unphysical noiseless space.
Comment: @TomAndersen When you say there are no Kerr holes in the universe, you are basing this on the assumption that the universe is spatially homogeneous and isotropic (i.e., FLRW), but there are an increasing # of us in the cosmological community that believe that the universe is actually inhomogeneous, which would actually match observations better, and would do away with the need for dark energy, etc... Such models are the Swiss-Cheese models or LTB.


Getting Apple - Logic X to recognize outputs in mono as opposed to stereo pairs

Question: So I'm pretty new to Mac and Logic X. I'm using a Focusrite Sapphire 40 with this setup and my goal is to have single audio track assigned to a single audio output output in mono.  However, Logic will only recognize each output as a stereo pair.  I am forced to assign each track to a pair, and if I want mono I have to hard pan the audio track.  Just wondering if there's some trick to this, or if I'm forced to do the panning method to get a single track on a single mono output.  Thanks!
Comment: Why are you trying to have it mono?  Usually a mono track will come out of both channels but it sounds more like you are trying to get the main output to be mono, correct?
Answer: Mono tracks can be routed to one single output. Go to the track's output routing options and you'll find mono options (you can do this from the inspector or from the mixer).

Non-mono tracks can't be routed to mono outputs.
The Sapphire series has its own mixer software that you might need to configure too. If you are not seeing mono routing options for mono tracks the issue might be with the sapphire mixer software.
I remember having to tweak something in that sapphire mixer software every time I work with a Sapphire interface. It has its own routing system, so you might need to register the outputs as selectable for mono routing or something like that.


Adventist Movements

Question: How did movements that rejected the theological teachings of Hiram Edson and Ellen White understand the events of what is called the Great Disappointment, and how did they maintain an adherence to adventism if they saw there was no return of Jesus as they expected and predicted, especially without the teachings of Edson and White?
Comment: Suppose someone shows you truths that you can find for yourself in your Bible, and they later tell you about some predictions they themselves have calculated.  Should any of their predictions prove inaccurate, would that cause you to stop believing the truths that you yourself had already found in your Bible?
Answer: I have Mrs White's book, "The Great Controversy" and the massive tome of renowned SDA writer Uriah Smith, "Daniel and the Revelation" (written circa 1908). However, it's mainly from this link that I got information on different groups developing after "the Great Disappointment" - https://whiteestate.org/legacy/issues-faq-unus-html/#unusual-section-d2   From that site I gleaned these points:

"Many former Millerites were setting various dates for the return of
Jesus, with 1850 and 1851 being the latest dates for the end of the
2300-day/year prophecy. Although Sabbatarian Adventists
generally were immune from time-setting, Hiram Edson and Joseph Bates
advocated 1850 and 1851, respectively. James White kept their views
out of Present Truth, the Advent Review, and the Review and
Herald.
With several variations, age-to-come exponents, led by Joseph Marsh,
O. R. L. Crosier, and George Storrs, believed that the Second Advent
would usher in the millennial kingdom on earth during which time the
world would be converted under the reign of Christ, with the Jews
playing a leading role. This group closely related to the
Literalists (British Adventists) who had believed that in the 1840s the literal Jews would welcome their Messiah (Christ) in
Palestine, thus fulfilling Old Testament prophecies with Jerusalem
becoming Christ's capital during the millennium. The majority of the
Millerites had rejected this aspect of their Adventist theology,
calling it Judaism. (See Josiah Litch, "The Rise and Progress of
Adventism," The Advent Shield and Review, May 1844, p. 92, cited in
Seventh-day Adventist Bible Students' Source Book, p. 513.
The first defectors from early Seventh-day Adventists were H. S. Case
and C. P. Russell who had, among other concepts, embraced the
"age-to-come" theory. See The Seventh-day Adventist Encyclopedia,
s.v. "Messenger Party." [Emphases mine]

Because the original SDA group had many doctrines other than the time of Jesus' return, people who still believed those other doctrines could claim to still be SDAs, minus acceptance of the reasons given to get round "the Great Disappointment" problem. That is how I understand it, but ideally SDA people who belong to break-away groups should answer your question.
Answer: I don't see how you can be a Seventh-Day Adventist and maintain Mrs. White is not a prophetess, and she was wrong about the investigative judgment leading to the soon advent of Jesus.  Perhaps SDA's who reject White still want to live under many of the Old Testament dietary laws and Sabbath laws are attached that way.
Its obvious the Millerites mis-interpreted Daniel's prophecy of 2,300 days being years until Jesus returns.  The great disappointment came when Jesus didn't show up in 1850-51.  Many fell away from the movement including the former Baptist Rev. William Miller who came up with the prediction, realizing he was in error.
But out of this movement was born the SDA prophetess Ellen G. White who claimed to have a vision explaining what happened, that the date was indeed correct, but the event was wrong.  She said the date is when Jesus began the "investigative judgment" on everyone's sins, and as soon as Jesus finishes the paperwork, figuratively speaking, on everyone's sins, then Jesus will return.  Thus they are called Adventists due to their belief in the soon advent of Jesus.
But that was the mid-19th century.  The 20th century has come and gone.  And now that we are 1/5 into the 21st century -- how long does it take Jesus to calculate everyone's sins?  There is no scriptural support for an investigative judgment.  SDA adherents who understand Mrs. White is not a prophetess of God should also question the rest of her theology that is unique to Christiandom.

Adventist Movements


Smarty variable problem

Question: Hey, ive a problem with my assigned variable in smarty.
I want to assigns some values to an other template, but it doesn't work correctly. The problematic line is here:
<code>{{include file="lib/topmenu_item.tpl" onclick="load_from_php('pageBody', '{{$base_url}}index.php/datasources/grouping', 'grouping', this);" node="datasources/grouping" text="Grouping"}}
</code>
i want to add the value of the $base_url to the front of the url. How can i do that?
Ps: {{ and }} are my delimiters
Answer: Something like this:
<code>{{include file="lib/topmenu_item.tpl" onclick="load_from_php('pageBody', '{{' . $base_url. '}}index.php/datasources/grouping', 'grouping', this);" node="datasources/grouping" text="Grouping"}}
</code>
Use string concatenation to use the variabele in your string.
Comment: Aah, this would be so trivial under normal conditions :D Thanks!

Smarty variable problem


Add external users to Sharepoint online site collection without sending invitations

Question: Can we add external users to Sharepoint online site collection without sending invitations?  I dont want to enable anonymous access and B2B
Answer: Yes, by using CSOM you can invite external users without sending them an invitation. However, users will only get access to SharePoint after authenticating with a Microsoft or AAD account and accepting the invitation link. As far as I know you can't just give them access.
I know there's a process where you could do so with B2B, but don't know exactly how that works.


Using Native Android Bluetooth Support for Codename

Question: Need help with a working example of native android bluetooth support for codenameone apps. I have one working in android but having a problem integrating with codenameone.Thanks in advance.
Answer: If you have working code in Android already, you just need to create a Native Interface to handle the API calls and callbacks you need. You'll be able to use most of your Android code, a few modifications will be needed to strip out the parts that control the UI. Check the developer guide, it discusses this. I believe that there's also a tutorial video.
There is also a CN1Lib or extension for Bluetooth Low Energy, if that's what you're developing.
Comment: If I could just get an example with the modification and integration
Comment: Is this for Low Energy? There is an example on the page with the CN1 extensions https://github.com/chen-fishbein/bluetoothle-codenameone
Comment: Not for low energy


Field lines of two bar magnets becoming one bar magnet

Question: I have the following conceptual missunderstanding (pressumably). If you have two bar magnets opposing each other separately, then the field lines go from the north- to the southpole of one bar to the other. However, since there are two south- and two-north poles, the field lines seem have opposite direction for the inner two poles. By interpreting these two bar magnets in the elementar magnet picture, combining them leads to a new larger bar magnet with one north- and one southpole. Now the field lines that originally were in opposite direction seem to be going in the same direction as for the outer two poles. Why did they flip? What's happening here?
Comment: The first image should be more like this: https://qph.cf2.quoracdn.net/main-qimg-65c57bb379179f709e6d0ee6a00e7f2b
Comment: True, but that doesn't change my question. When I bring together these to magnets you still seem to have field lines from the left northpole to the left southpole. But that should be impossible, since the left magnet would become the southpole to which the lines from the right magnet go.
Comment: Well, I the reason I posted that was because with a more accurate picture, you can begin to see how the field lines would bunch up together and bend, pinch-off and merge in some parts as you bring the two bars closer.
Comment: I've updated my paint skills. So does it work like this? When the magnets come closer to each other, the individual field lines from each magnets north- to southpole pile up vertically, so that when they come down to the inner right southpole and rise at the inner left northpole they extinct, because they run in opposite direction?
Answer: Every magnet is approximately made up of a zillion tiny dipole magnets. Each tiny dipole magnet has its own dipole magnetic field. The net magnetic field of the entire magnet is simply the linear sum of each tiny dipole magnet's magnetic field.
When you think of it in these terms, you will see that nothing magical or contradictory happens when you put together two magnets, because the same logic would apply to splitting apart one magnet. The picture linked by @Filip in his comment is very important, as it shows the qualitatively correct way of summing the magnetic fields of two dipole magnets.
Answer: The basic answer to your question is that the field lines that, in the top diagram, ran from left to right between the two neighbouring poles of the two magnets are now (when the magnets have been allowed to come together) INSIDE the magnets.
Remember that a magnet's magnetic field lines don't start on its North pole and end on its South; rather they are continuous closed loops, emerging from the magnet at its North end, running through the air, re-entering the magnet at its South Pole, and running from South to North Pole inside the magnet.
Comment: The field lines in between the two magnets will be inside, yes. But there are still field lines outside, that emerge from the northpole of (say) the left magnet and re-enter the southpole of the left magnet; for every finite distance of the two left and right magnets. Yet, when you bring them together (=zero distance), the resulting magnet should only have field lines emerging from the former right magnet (as this one becomes the northpole), that then re-enter the former left magnet (as this one becomes the new southpole).
Comment: (a) "But there are still field lines outside, that emerge from the northpole of (say) the left magnet and re-enter the southpole of the left magnet" I note that you don't show these in your diagrams. (b) "the resulting magnet should only have field lines emerging from the former right magnet (as this one becomes the northpole)" I think the bit in brackets is an oversimplification. Its right hand end is a North Pole; its left hand end won't be a pole at all, or will still be a weak South owing to imperfect contact between the two magnets. (c) Decent diagrams of the field lines will help a lot.
Comment: (a) I'm refering to the graphic by Filip (b) I'm talking about the left hand end of the left magnet. It should be a south pole.
Answer: This picture shows the lines inside the magnets as well as outside. Perhaps it makes things a little more clear.

Image from https://www.reddit.com/r/explainlikeimfive/comments/97fcxr/eli5_why_does_breaking_a_magnet_in_half_result_in/


How to declare a function as real in order to get rid of Conjugate in front of the expressions?

Question: I have a complicated complex function containing some other ones that are real, f=f(A,B,C,...) ,where A=A(r) and it is real, for example. When I do Conjugate[f] I get something like Conjugate[f]=f*=f*(Conjugate[A],Conjugate[B],...), I mean those internal function arent interpreted as real.
I tried ComplexExpand to work with it by assuming that those internal functions are real, but it does not work. I also tried $Assumptions={A,B,...}\[Element] Reals at the beginning of the nb, and nothing.
What I want is to Simplify some expressions like (-I A)(I A)=A^2, but I only get Conjugate[A] A.
Is there some way to declare these internal functions as real, even they are part of a larger more complicated complex function?
Answer: Your assumption should be made on the value of g[_], not of plain g. Otherwise, your assumption can be introduced globally through $Assumptions, or as a second argument to Simplify, or using Assuming, all with the same result.
Clear[f, g, r]
f[arg_] := a - I arg

Conjugate[f[g[r]]]
(* Out: Conjugate[a] + I Conjugate[g[r]] *)

Assuming[g[_] ∈ Reals, Simplify[ Conjugate[f[g[r]]] ] ]
(* Out: Conjugate[a] + I g[r] *)

Comment: You probably meant `$Assumptions`
Comment: @belisarius I certainly did! Thanks for catching that.
Comment: @MarcoB . Thank you.
Answer: Here is another possible solution which doesn't require you to use Simplify:
Clear[f, a, g, r]
f[arg_] := a - I arg

Conjugate[g[r_]] ^:= g[r]

Conjugate[f[g[r]]]

(* ==> Conjugate[a] + I g[r] *)

This uses UpSetDelayed to make the desired assumption part of the definitions associated with g.
Comment: Very elegant! (+1)


SQL query convert rows to columns

Question: I am using Oracle 11g and I have three tables whose structure are as follows
<code>  Main_id   Sub_id  col1   col2
   123       123     blah   blah
</code>
Main_id to Sub_id is a one to one mapping
and in another table I have
<code> id  sub_id type
  1  123    a
  2  123    b
</code>
In this table, a sub_id can contain more than one type and
on the third table, I have each type with an address similar to this
<code>   Type     Name    address state city zip
    a        x1        a1    s1    c1  z1
    b        x2        a2    s2    c2  z2
</code>
I can probably have a maximum of three types a/b/c for any main_id/sub_id.
My question is can I achieve an end result with the following columns like this using pivot/case statements. I basically need a query with just one row given a parameter of sub_id/main_id.
<code>Main_id   Sub_id   a_name a_address a_state a_city a_zip b_name b_address b_city b_zip....c_zip
</code>
Answer: See Oracle SQL - Convert N rows' column values to N columns in 1 row

SQL query convert rows to columns


Negative extrusion

Question: Where is the setting for negative extrusion in Blender. In case I have the name wrong, this extrudes non-existence, ie you extrude back through an object to make a hole. I can make a pit (hole partway into material), but if I go through the other side it just starts to positive extrude from the back. I can't find the option to remove mesh and make holes.
Answer: Maybe your question is not precise enough. For example you can make holes with booleans, or simply with W (Specials) > Bridge Edge Loops:

If you're looking for the same as the Push-Pull tool in Sketchup, it was an addon called Destructive Extrude in 2.7. It looks like it's not ready for 2.8 yet: https://blender.community/c/rightclickselect/Qlcbbc/

How it works: https://www.youtube.com/watch?v=beZau_wpR-U
Addon: https://gumroad.com/l/cQjUX

As explained in the video, once you've installed the addon, shortcut alt E.
Comment: Ok I've edited my answer, maybe give an example of what you want
Comment: while that addon looks promising, there has to be a way to make holes natively.
Answer: In edit mode, select the face that you want to make into a hole, and delete it (X).
If you want the hole to have some depth, extrude the face down and then delete it.

Negative extrusion


The Meaning of the Word "Adversary"

Question: Why is an adversary an opponent or enemy?
Etymologically,shouldn't the word mean "turn toward",giving the sense of an ally or friend?
Consider the word attorney,which seems etymologically similar,and which has the sense of an ally and/or advocate.
Answer: Looking at etymonline, the two words seem indeed to have similar-meaning roots:
Adversary:

[..] or directly from Latin adversarius "an opponent, rival, enemy," noun use of adjective meaning "opposite, hostile, contrary," literally "turned toward one," from adversus "turned against, turned toward, fronting, facing," figuratively "hostile, adverse, unfavorable,"

Attorney:

one appointed by another to act in his place," from Old French atorné "(one) appointed," past participle of aturner "to decree, assign, appoint," from atorner "to assign," literally "to turn to"

But we can see clearly how two different interpretations evolved, and they did quite early on.
Turning towards someone can mean that you oppose them, you turn against them. The figurative interpretation is not difficult, if one imagines a battlefield: the ones turns towards you are not your allies..
Attorney, on the other hand, derives from a completely different interpretation of "turning to": an attorney turns to your side, is added to your "team".
It seems the original situation from where the turning takes place may help to explain: in a peace-situation, someone that turns towards you becomes your enemy, but if you are already being attacked, someone who turns to you(r side) becomes a friend.
The whole point about turning is that the effect depends on one's point of view...

The Meaning of the Word "Adversary"


rolling a coin or a riding a bicycle

Question: Why somebody riding a bicycle keeps balance and doesn't fall left or right, while is prone to falling when the bicycle stops. One force (to front) shouldn't affect in any way balance left/right. I hope that explanation using mathematics and physical concepts should be understandable intuitively. I mean: description is not explanation.
If the model of bicycle is too complicated (too many factors to consider), let's talk about a rolling coin. When it is pushed it rolles for a certain amount of time, if it's put - if falls immediately. Contrary to bicycle, no corrections of the rider can be taken into the consideration
thank you
Zbigniew
Comment: See also http://physics.stackexchange.com/questions/132449/ (also closed as a duplicate of the above)
Answer: It turns out that people have been crazy enough to build bicycles with smaller "spare wheels" alongside their normal wheels that can be "ramped up" to speeds that have the same angular momentum in the opposite direction. When you do this with a unicycle it becomes difficult to balance even at speed, which means that the primary mechanism is gyroscopic. But when you do this with a bicycle, it retains its ability to stay stable.
There has therefore been a lot of research into why bicycles are as stable as they are. It's not merely the feedback loop created by the rider; see here for a video from a research group which just occasionally pushes bicycles around for experimentation. They'll release a bicycle upright without a rider and it will "coast" for a surprising distance before falling.
Basically, the combination of having to "drag around" the rear wheel and the front wheel having a pivot off-center from the wheel-axis itself appears to cause the bicycle to naturally "turn into" any motion that would cause it to fall down, converting those microscopic "falling" actions into a macroscopic bicycle "turning" motion. At higher speeds these "corrections" become self-destabilizing rather than self-stabilizing.
Wikipedia has a lot more information on the general matter.

rolling a coin or a riding a bicycle


$G$ be a group of order $pn$ , where $p$ is a prime and $p>n$ , then is it true that any subgroup of order $p$ is normal in $G$?

Question: Let $G$ be a group of order $pn$ , where $p$ is a prime and $p>n$  , then  is it true that any subgroup of order $p$ is normal in $G$  ? ( I know that any subgroup of index smallest prime dividing order of the group would be normal , but this thing is far away from it . Please help . Thanks in advance )
Comment: Yes, this follows from Sylow's Theorem. The number of Sylow $p$-subgroups is congruent to $1$ mod $p$ and also has to divide $n$. So if $p>n$ then there is a unique Sylow $p$-subgroup which must therefore be normal in $G$.
Answer: Here is a very elementary proof, which uses Lagrange's Theorem, but not Sylow's Theorem.
It is enough to prove that any two subgroups $P,Q$ of order $p$ are equal, because then we must have $gPg^{-1}=P$ for all $g \in G$, so $P$ is normal.
So suppose that $P \ne Q$. Then $P \cap Q = \{1 \}$ by Lagrange. They are both cyclic so $P = \{x^i : 0 \le i < p \}$ and $Q = \{y^i : 0 \le i < p \}$ for some $x,y$.
Since $|G| = pn < p^2$, the elements $x^iy^j$ with $0 \le i,j < p$ cannot all be distinct, so there is an equality $x^iy^j=x^ky^l$ with $(i,j) \ne (k,l)$.
But then $x^{i-k} = y^{l-j}$, contradicting $P \cap Q = \{1 \}$.
Comment: I was about to post a solution considering the product of such subgroups, but then I realized that the counting done here is essentially the same.
Comment: +1, nicely done. You are doing, I believe, a simplified version of the fact that if $H, K \le G$, with $G$ finite, then $\lvert H K \rvert = \lvert H \rvert \cdot \lvert K \rvert / \lvert H \cap K \rvert$, where $H K = \{ h k : h \in H, k \in K \}$ is not necessarily a subgroup.
Answer: The first theorem of Sylow says that there is a subgroup of order $p$.
The second theorem of Sylow says that all subgroups of $G$ of order $p$ are conjugates.
And most important, the third theorem of Sylow says that the number of subgroups of order $p$ divides $n$ and is congruent to $1$ mod $p$.
Since $n<p$ there can be only one subgroup $H$ of order $p$ and the second theorem of Sylow implies that $g^{-1}Hg=H$ for all $g\in G$. Thus, $H$ is normal.
So, not only "every subgroup of order $p$ is normal", but there is exactly one subgroup of order $p$ and it is normal.


How do I create the bookmarks for Project Update Thursday?

Question: It's time for Project Update Thursday, but the moderator who normally kicks it off is off saving the world or something.  What do I do?
Answer:
Don't panic.
Post a "welcome" message:

Welcome to this week's Project Update Thursday (or similar)

Wait two hours.
Post a "thank you" message:

Thanks for joining us for this week's Project Update Thursday (or similar)

Click on the dropdown next to room at the top of the right-hand sidebar, then select create new bookmark.
Click on the "welcome" and "thank you" messages (it doesn't matter which order).
Enter the title for the bookmark.  This should be of the form:

Project Update Thursday - yyyy/mm/dd

Click bookmark to create the bookmark; you should see a notification bar at the top of the screen to confirm that you created it.
Click on info at the top of the right-hand sidebar (which opens a new browser tab) then select the conversations tab.  The bookmark you just created should be at the top of the list.
Right-click on the bookmark, then select Copy link address (or the equivalent for your browser).
Go back to the original browser tab with the Home Improvement chat, and paste the link into the input box and click send
Done!
Comment: For posting the bookmark to the chatroom, you don't even have to go to leave the chatroom, just copy the link in the notification at the top of the window after you create the bookmark and paste it as a chat message.
Comment: And if that's too many steps for anyone, feel free to just post "lets start PUT" and "PUT is over" and I can edit the start/finish messages, add a bookmark, yadda yadda, at any later point.
Answer: Niall C. got the full method pretty well, but here's the easy method for anyone that's worried about doing it wrong:

Have someone say "Welcome to PUT".
When it's over, have someone say "Thanks for joining PUT"

That's all I need, really, two chat messages. I can even edit your messages later on to be bold or whatever, so don't worry about formatting or phrasing. And I can create a bookmark at any point in the future, so if you don't want to deal with that step, feel free to skip it. One of us will do it for you.