Equivalence Class Testing vs. Boundary Value Testing

Question: I understand how equivalence testing works.
How is it the same or different from boundary value testing?
Answer: Equivalence Class Testing
EC Testing is when you have a number of test items (e.g. values) that you want to test but because of cost (time/money) you do not have time to test them all. Therefore you group the test item into class where all items in each class are suppose to behave exactly the same. The theory is that you only need to test one of each item to make sure the system works.
Example 1
Children under 2 ride the bus for free. Young people pay $10, Adults $15 and Senior Citizen pay $5.
Classes:
Price:0 -> Age:0-1
Price:10 -> Age:2-14
Price:15 -> Age:15-64
Price:5 -> Age:65-infinity
Example 2 (more than one parameter)
Cellphones K80, J64 and J54 run Java 5. K90 and J99 run Java 6. But there are two possible browsers FireFox and Opera, J models run FF and K models run O.
Classes:
Browser:FF, Java:5 -> Phones:J64,J54
Browser:FF, Java:6 -> Phones:J99
Browser:O, Java:5 -> Phones:K80
Browser:O, Java:6 -> Phones:K90
Dangers Of Equivalence Class Testing
There is a danger of using EC Testing that is rarely mentioned in the testing books but is very important to remember.
Just because two items/values are suppose to be in the same class and behave the same, does not mean they DO behave the same.
That means that just because you test one value in the class that ALL values in the class behave the same. Real world example of mine is with cell phones that all had a certain Java Platform. They were suppose to all work the same but they didn't in reality. So testing just one value in a class is good, but not good enough. EC Testing is a good tool, but it's not fool proof and be careful with it. If test cases are cheap and fast (like automation), test more, or why not test them all!
Boundary Value Testing
BV Testing is when you decide to test the values on the edge of each Class you have identified. The theory is that most defects is around the edges of a class.
Example
Classes:
Price:0 -> Age:0-1 ( Boundary values 0, 1)
Price:10 -> Age:2-14 ( Boundary values 2, 14)
Price:15 -> Age:15-64 ( Boundary values 15, 64)
Price:5 -> Age:65-infinity ( Boundary values 65)
Critique of Boundary Value Testing
1) I, and other test professionals I have taken courses from, are not convinced that most defects are hidden around the edges of each class. And I have never seen any studies that proves this to be the case.
2) The fact that you need to use BV Testing proves that EC Testing is flawed since you test more than one value of each class.
3) It's easy to use when using values like integers. But what is a boundary value of class of phones models or browsers versions?
Hidden Boundary Value Testing
The boundary values of a class is often based on the specification of how the system should work. This is all good and well but most systems contain boundaries that are not explained in any spec and you will need to look for yourself. E.g. 'How many characters can I put into the test field before the system fails and breaks.','How big can the data file become before it so slow to read it gets annoying'.
Real world examples
- Pasting one million characters into a text area in FireFox 3.5 on win 7 crashes it
- ReCaptcha has a limit of 16003 characters, does your system handle the 413 that it passes back to it if somebody puts 16004+ characters in field. Or does it break
Summary
EC Testing and BV Testing are great tools and you should use them but they are not perfect and don't expect to find all defects using them. Use your know-how about the system and your intelligence and intuition to try more items and looks for other ways it could fail. And look for the hidden boundaries!
Answer: Boundary value analysis simply means to select values near the boundaries of the classes. So you are still dividing the input domain according to the classes then instead of selecting values from the middle of the class use values from the boundaries.
For example, if the input condition is a range from 20 to 70 then you have three classes of input

less than 20
between 20 and 70
more than 70

then for boundary value analysis select input = 19, 20, 21, 69, 70, 71. This type of analysis picks up errors on the boundaries.
Answer: The Equivalence testing needs to be supplemented with the Boundary value testing.
For example for equivalent testing of a function that takes values between 1 and 12
(say months of a year) the  partitions would be:
values less than 1 (0,-1,-2), invalid partition
values between 1-12, valid partition
values greater than 12,invalid partition
For equivalence testing it is enough to pick one value as test input from each of these partition classes. That would mean tests with value of -2,6, and 15 would be considered enough to test behavior of the function. But these values doesn't catch Off-by-one error which can occur quite often.
With the boundary value testing the test inputs would be : -1,0,1,11,12,13 (at the boundaries), which would catch off-by-one errors.
I see both these testing methods to be a complement of each other.
Comment: Much better - straightforward and clear! Thank you:)
Answer: Boundary value analysis is part or subset of equivalence partitioning. In boundary values analysis, instead of some random value, only values in the boundary are selected.
Answer: Boundary value analysis overcome the drawback of the Equivalance class partitioning. If a fix length is g9iven for eg. Mobile number (10 digit.)
The lower boundary in this case is - digit - 1 (ie. 10 - 1 =9)
The upper boundary in this case is - digit +1 (ie 10 + 1 =11)
Now we can perform test for the 9 and 11
Answer: Dynamic Testing Types –

Specification Based testing
A.  Equivalance Partitioning
<code>  A1. Boundary value analysis

  A2. Decision Tables

  A3. Use case Testing

  A4. State Transition testing
</code>
Structural Based testing
A.   Test Coverage
B.   Code coverage
C.   Statement coverage
D.   Decision coverage
Experience Based Testing
A.   Error testing
B.   Exploratory Testing

Equivalance Partitioning – It is a technique where tester divide the test conditions into groups and sets. System should handle them equivalently hence called equivalence classes. To test one condition from each partition will work to assume all condition will work in that partition.
EX >> Check addition of the single digit values. i.e. values between 0 and 9.

Values less than -9, i.e. -10,-11, ….  (Invalid partition)
Values less than 0, i.e. -1,-2, …. till -9 (Valid Partition)
Values between 0-9 i.e. 0,1 ….  till 9 (Valid Partition)
Values greater than 9, i.e. 10,11 (Invalid partition)

Testing the addition for any two values of each partition is enough.
Boundary value testing – It is based on testing at the boundaries between partition.
EX >> Consider below combination.

Addition of -9 and -10,
Addition of -10 and -11
Addition of 0 and -1
Addition of 0 and 1
Addition of 9 and 10
Addition of 11 and 10


Can't login to Windows 7 Home Premium even from safe mode and from the command prompt

Question: I use Windows 7 Home Premium 64-bit on my computer. Previously there was no problem. I have a new computer that I bought less than a year ago. I used it as usual, but when I opened it again the next day, I couldn't login to Windows, I wasn't recognized as an administrator, the password failed and access was denied.
Then I tried to get in through safe mode, deleted the password, opened Regedit, and I saw that there was a .bak file in the profile. After searching the internet, I tried to create a new profile and remove the duplicate file, but I still couldn't login. Then I returned it back to its original position from safe mode again. I could login to my computer in safe mode. I didn't find all the data I had stored on the computer. Then I opened the local disk [ C ] -> users -> homepremium  where I found all my files without any loss. But in the users folder, I saw my profile had duplicated up to 7 profiles >> user.temp.001 - 007.
I used my computer as usual while backing up my data. The Windows Update updated automatically (I didn't change any settings), The next day I couldn't login anymore. It said the group policy client service failed the logon. Access denied. I tried to get in through safe mode as before, but I couldn't, just login and then log out, and repeat. I tried to get in through safe mode from the command prompt to open System Restore, but I also couldn't, just login and then log out.
What should I do? I haven't finished backing up all the data that is stored in my computer because my external hard drive was damaged (I backed up the data to a DVD). I can't lose my data again (with my external hard drive broken) because I have important files. Please help.
Comment: You really shouldn't modify the Hive if you don't understand what you are doing, and removing your password by hand, is a great way to prevent any access to the account.  If your unable to enable the default Administrator account there isn't much hope for that particular installation of Windows.
Answer: One way of getting your files out could be to use a Linux LiveCD to copy copy your files from the windows disk to a USB disk. I have used Ubuntu for this. Then you can reinstall windows. Then you start doing proper backups.
Comment: Okayy~ I'll try that.. Thanks a lot :)


How to read XML data in salesforce?

Question: I get data in XML from a web service from a connector URL, the xml contains data about people, now I have to read the names, emailids from that xml and compare with my org's contacts and so some operations. So how do I read it?
Answer: You need either Dom or XmlStreamReader class to parse your xml response. You can find sample code in the below links.
Xml parsing using XmlStreamReader:-
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_xml_streaming_reading.htm
Xml parsing using Dom:-
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_xml_dom.htm
Comment: Please do not post link only answers as they can lose their value if the links break, include a bit of relevant information from the linked site.
Answer: I did a similar thing in the past.
I fixed it fist by parsing the XML retrieved from connect into JSON using xml2js library
const parser = new xml2js.Parser();
const message = await parser.parseStringPromise(xml);

The fields that you add to a DocuSign document are included deep into the json structure
const tabStatus = message.DocuSignEnvelopeInformation.EnvelopeStatus[0].RecipientStatuses[0].RecipientStatus[0].TabStatuses[0];

Then, you just need to find the element of the value that you want. In this example, I search for a field with tab label amount, and extract the value using TabValue[0]
const amount = tabStatus.TabStatus.find(field => field.TabLabel[0] == 'amount')
subscription.amount = amount.TabValue[0];

hope it helps.

How to read XML data in salesforce?


Why does the Sun appear larger during the sunrise and sunset?

Question: Why does the Sun appear larger during sunrise and sunset compared to its size during midday even though its distance from the Earth remains fixed all the day? It is only during the Winter when the Sun is away from the Earth and that too is due to the motion of Earth around the Sun, not due to the diurnal motion of the Earth. So is it some optical effect? If yes, what is it really? I apologize if the question has already been asked.
Comment: Related: https://physics.stackexchange.com/q/43023/2451 , https://physics.stackexchange.com/q/20844/2451 and links therein.
Comment: I think this is basically a duplicate of https://physics.stackexchange.com/q/20844/
Comment: If you are in the northern hemisphere, e.g. India, then the Sun is actually closer in the winter.  Our distance from the Sun is not the dominant factor in the seasons.  If it was then the whole world would have winter at the same time.  See https://en.m.wikipedia.org/wiki/Perihelion_and_aphelion
Comment: have a read  https://en.wikipedia.org/wiki/Moon_illusion
Answer: The previous answer is not wrong per se, but it only explains a distortion of bodies on the  celestial sphere, not the effect you are describing.  Edited: Refraction does not reduce the size of objects on the horizon, but it is not the reason for the perceived size.
What you are referring to is often called the Moon Illusion and there are multiple perceptive effects at play.
What is important to understand is that our brain is only capable of deducing distance, that is, perceiving three dimensions, up two a certain and very limited range. So everything that happens on the celestial sphere has no depth for us at all: The brain does not have any information about celestial distances at all, and has to fill in the blanks. There are some really interesting phenomena resulting from this.
So the most plausible explanations are:

Apparent Distance:
When viewing clouds at shallow angles on the sky, they appear noticeably smaller, compared to when viewed directly above, because they are, of course, farther away. The real, measurable, angular size is smaller. The moon or the sun on the other hand do not appear noticeably smaller, because their real distance does not change much when they move to the horizon. But the brain would expect them to be smaller, much as the clouds, or a plane, and hence perceives them as larger than they 'should be'.
Relative Size:
Since the Sun is surrounded by nothing but sky when above, there is nothing to compare it to. When viewed at the horizon, there is actually things to compare the size with, which are all smaller, and hence the brain corrects for this.
Answer: I spent over 30 years at sea, and I can tell you that when you're out in the middle of the ocean the setting and rising sun sometimes seems to be much larger.  Atmospheric conditions seem to influence this.  If you wake up to a red sky and the sun looks huge on the horizon you can expect some nasty weather.
I think that the water vapor in the atmosphere, coupled with the oblique angle of the radiation from the rising sun, magnifies the apparent size.
Comment: That's very interesting. Isn't there someone that has calculated that? I wouldn't know where to start, honestly. But to your point, wouldn't the effect be highly variant, depending on the actual location of moist air pockets (distance, size, actual humidity and so on)? Also, there is actual calculations concerning the oblique angle, and what you get is really a deformation.
Comment: Just one addition: I think it may also be plausible that due to the sun rising, the atmospheric scattering does not disperse as much light, so that the sun's corona is highly contrasted against everything. What you may get then, is something like an overexposed photography, where light sources shining directly into the lens appear much bigger. That would be a combination between refractive effects and the workings of our optical nerve system.
Answer: Yesterday we had a super moon full moon. At moonrise I held a transparent ruler at arm's length and measured the size of the moon against the ruler. It was 7.5 mm. At 11 pm I held the same ruler at arm's length against the moon which was now high in the sky. It was only 4 mm. This is not imaginary. It is real and observable. The larger size is caused by a refraction of light when the moon is at the horizon because the light has to pass through greater amounts of atmosphere to reach you compared to when it is overhead. The same is true of the setting sun. In fact, I recall reading years ago (I believe in my daughter's physics book) that we are actually seeing below the horizon at sunset because of light is being bent by the atmosphere. This phenomenon is worldwide. It is not imaginary. As far as I know it is sound science.
Comment: I think the reason is not the thicker air, but the form of the border. This makes it working more like a lens.


Override Spark log4j configurations

Question: I'm running Spark on a Yarn cluster and having log4j.properties configured such that all logs by default go to a log file. However, for some spark jobs I want the logs to go to console without changing the log4j file and the code of the actual job. What is the best way to achieve this? Thanks, all.
Comment: Hi Holden. Sorry for the confusion. I'm running Spark on a Yarn cluster with a bunch of other people. Since log4j is global, I don't want to modify it. Some of the jobs are not mine so I don't want to change the source code.
Comment: So I'm a bit confused, is your goal to do this for general jobs or just jobs that you write yourself? If its your own jobs is there a reason you don't want to modify any of these files? Also which type of cluster are you running on (yarn, mesos, standalone)?
Comment: Ah that makes it a bit more complicated, thanks for the clarification.
Answer: Per the documentation: upload a custom log4j.properties using spark-submit, by adding it to the --files list of files to be uploaded with the application.
I just tried with a log4j.properties file on a Yarn cluster and it works just fine.
spark-submit --class com.foo.Bar \
  --master yarn-cluster \
  --files path_to_my_log4j.properties \
  my.jar

Comment: The file can be `hdfs://path/to/my/log4j.properties`
Answer: I know there have at least 4 solutions for solving this problem.

You could modify your log4j.properties in your Spark machines
When you running the job on spark you better to attach the log4j file as configuration file submit to spark example
bin/spark-submit --class com.viaplay.log4jtest.log4jtest --conf "spark.driver.extraJavaOptions=-Dlog4j.configuration=file:/Users/feng/SparkLog4j/SparkLog4jTest/target/log4j2.properties" --master local[*] /Users/feng/SparkLog4j/SparkLog4jTest/target/SparkLog4jTest-1.0-jar-with-dependencies.jar
Try to import log4j to your logic code.
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
put those logger to your SparkContext() function
        Logger.getLogger("org").setLevel(Level.INFO);
        Logger.getLogger("akka").setLevel(Level.INFO);
Spark use spark.sql.SparkSession
import org.apache.spark.sql.SparkSession;
spark = SparkSession.builder.getOrCreate()
spark.sparkContext.setLogLevel('ERROR')

Override Spark log4j configurations


Must one fulfill a promise to another? What if circumstances change the initial reasoning behind the proposal?

Question: If one states that they will do something to another person (e.g "I'll give you my favorite necklace"), and then that person no longer wants to fulfil the "promise" due to unforeseen circumstances, is that forbidden? What if the statement was only written and not verbally uttered?
Comment: related: [Does saying "I promise…" constitute any halachic obligation?](https://judaism.stackexchange.com/q/44725/11501)
Comment: ~simular Mishnah Nedarim 66a
Answer: It appears indeed one should keep his promises in the context of a small gift. The Rambam writes (MT Mechira 7:9) (based on the gemara in Baba Metzia 49a)

Similarly, if a person promised to give a colleague a gift and failed to do so, he is considered to be faithless. When does the above
  apply? With regard to a small gift, because the recipient will depend
  on the promise that he was given. With regard to a large gift, by
  contrast, the giver is not considered to be faithless if he retracts,
  because the recipient does not believe that he will give him these
  articles until he transfers ownership through a formal kinyan.

The Shulchan Aruch codifies this in CM 204:8
dinonline (here) writes

The precise definition of which gift is considered small and which is
  large depends on the circumstances of the giver: For a poor individual
  a gift of $50 may be large, whereas for a millionaire a gift of $1,000
  can be considered small.

See there at length, particularly the end section "Keeping One's Word in Transactions".
As always, treat the above as sources, but don't make real-life decisions without speaking to your rav. There might be mitigating factors one way or another that will impact the final ruling
Comment: FWIW I'm not convinced that this Gemara extends to the more general case beyond the OP's question, i.e. if one has to fulfill *any* promise. After all, the Gemara makes several references which limit it strictly to monetary matters (application of Mi Shepara, source from balanced scales, etc.).
Comment: @DonielF it certainly does **not** extend to business transactions (the case here is a gift) so I agree with you one cannot extrapolate from it to other situations
Comment: What are you talking about? The Gemara explicitly discusses הין צדק, that one shouldn't go against one's word in business and cannot do so if there's been money put down. A gift, discussed in that Gemara, is just a special case of a business transaction.
Comment: There is a difference between a large gift and a business transaction. Compare MT Mechira 7:8 and 7:9. I understand your first comment to mean that the halacha on gifts and transactions is not exactly the same - and I meant to write that I agree - but maybe I misunderstood you
Comment: Correct, it's not exactly the same, but certainly if I say I'm going to, I dunno, walk five blocks today without anything classifying it as a Neder, nothing is binding me to that.
Comment: Does this apply if the indented recipient did something that would make the giver change their mind? for example they are no longer on speaking terms.
Comment: @YosefGavriel as I wrote in the end, for specifics like this, one would need to ask a rav to balance the obligation vs. new facts that might have occured


Pressure Increase in stone and in water

Question: Why does the pressure increase only by 0,3-0,4bar per km in stone but 1bar per 10m in water while stone has the higher density?
Comment: Because the numbers are piffle (should cite a source, possibly confused units, or m and km ?) and things are bit more complicated. Overall, pressure gradient is not linear, as isn't density and gravity with depth. For the crust this can be simplified. Pls. tell us where you've searched, and maybe you can limit your question to the earth's crust. Pressure gradient in the crust ~330bar/km (but people use GPa), which rougly corresponds to the density difference to water (100bar/km).
Comment: It's been a long time since I was involved with this, but look at co-efficient of earth pressure & how a proportion of vertical stresses dissipates into horizontal stresses. As I recall it has something to do with how grains of minerals with the rocks (& soil) transfer stresses.
Comment: @Fred [tell me more](https://earthscience.stackexchange.com/a/19822/6031)!
Answer:
Why does the pressure increase only by 0,3-0,4bar per km in stone but 1bar per 10m in water while stone has the higher density?

Because it doesn't!
Plots in this Physics SE answer and here and here show about 0.4 or 0.5 $\times 10^6$ bar at 1000 km depth, which is 0.4 or 0.5 bar per meter compared to your 0.1 bar per meter for water. If rock is 4 to 5 times denser than water, then all is well.

Pressure Increase in stone and in water


Wondering how to make an iridescent and slightly translucent object?

Question:
So I am trying to make a crystal in blender that has this kind of light translucency as well as iridescence within a certain color range. I'm pretty new to Blender so I'm sure it's something I'm just not very familiar with but I tried to kind of modify this video's method to not much success at dialing in the color of the iridescent range. This type of crystal is called Sunset Aura Quartz if you'd like to see other examples.
Answer: Here is a try (that works with both Eevee and Cycles), it's a mix between a Diffuse and a Translucent node, mixed with a Glossy that has a greenish color to get greenish reflects. Use a texture to get the streaks effect.

The image texture I've used:
Comment: Yes I've edited my answer to show what kind of image I've used, I've just searched for "streaks" in a search engine
Comment: This is great, thank you! So the mix shader goes directly into the surface of the material output, I'm assuming. Is that an image texture that you have attached to the bumps? It's slightly cut off so I can't fully see that node and that seems to be potentially the last piece that I'm missing with my attempt to recreate this. Thanks!
Comment: Thanks so much!


Bonding (solid 6ga bare) wire from supplemental grounding electrode to main GEC -- can they not be spliced?

Question: This is just a hypothetical....If you have a 6ga solid copper from the bar in the panel to an outside ground rod, can you or not splice another pc of 6ga solid copper from the current 6ga wire to go to another rod? Why is it said that is has to be one single run of wire? Are connections just not safe when splices are installed on 6ga bare copper ground, or what am I missing?  Thanks!
Comment: They can be spliced, but the splices must be of a type that cannot be undone, welding/non-removable splice.  Usually just easier to use or replace with a single wire long enough.  Might be cheaper also.
Answer: They can be spliced if the splice is "irreversible" which is either Cadweld or compression/crimp.
The compression splices are not expensive, the crimping tool is, but you might be able to rent one.
A cadweld "one-shot" (non-reusable mold) might or might not come out cheaper then renting the crimper. A really well-stocked rental might have reusable (graphite) cadweld molds and clamps to rent.
Comment: They are looking for "utterly reliable connection for 100 years or more" on this specific conductor run. All other grounds can be normally spliced, this specific one code is looking for a higher standard.
Comment: So things like split bolts won't hold, I guess.....mine is a single solid run, but when doing it, I just wondered why people were saying that it couldn't be spliced, etc...Appreciate the info.
Comment: @Brad  It is more that regular run of the mill removable splices that homeowners have handy are not allowed.
Comment: See Harper's answer - a split bolt to bond a wire from a second rod, that doesn't require the GEC to be cut seems like it may be OK.
Answer: What you can't do is cut the wire in order to put all 3 into a splice.  The run to the first rod must be continuous.
The run to the 2nd rod can go to the first rod (usually easy) or to the panel.
Feel free to swap "1st rod" and "2nd rod" in my meaning if your topology is different.
As a general rule, one can splice a Grounding Electrode Conductor without cutting it, using a split bolt.  However I don't think that's allowed on the run to the 2nd ground rod.
(Armand edit) From a Feb 2022 Mike Holt's Forum answer:

250.53(A)(2) Supplemental Electrode Required. A single rod, pipe, or plate electrode shall be supplemented by an additional electrode of a type specified in 250.52(A)(2) through (A)(8).
The supplemental electrode shall be permitted to be bonded to one of the following:
(1) Rod, pipe, or plate electrode
(2) Grounding electrode conductor
(3) Grounded service-entrance conductor
(4) Nonflexible grounded service raceway
(5) Any grounded service enclosure


OVH - Dedi 14.04 Server - Raid Reconfiguration Help for a Total Noob

Question: I am a linux noob and have been saddled with a problem far beyond my abilities.
My situation is this:

This box: http://www.soyoustart.com/us/offers/bk-24t.xml (6x4TB
drives)
OVH image based install of Ubuntu 14.04 server - I do not have access to installation as I would if I were installing from DVD. I tell the CP what OS I want installed and it returns an installed system based on their configuration. I do have some options, one of which is use distribution kernel. I can also choose a partition scheme via the web but it only exposes the first drive. I can choose to install all on one disk which would put /, /swap and /home all on that first disk.
RAID info after their OS install: http://pastebin.com/hGnK9Znp (Asking in the official #ubuntu channel I am told that: "that's 1 disk with 5 mirrors and zero spares. It has 5 allocated mirrors - it's a very bad config".) Edit: Is it possible they have just screwed up when setting up the raid? Could it just be down to human error on their part?

Desired Outcome:

Raid1 system and swap disk  Do I have to allocate a whole disk to this or can I use part of one? Sys and swap will never need 4TB will they? As I understand it, and if a whole disk is used, this would be 4Tb storage and 1 drive redundancy (eg a mirror of that drive).
Raid5 for the remaining 4 drives as one big volume on which /home lives.  As I understand it, with raid5 this would provide 12TB of storage and single drive redundancy.

Obstacles

I am not a linux geek
I am unable to alter the way the OS is installed. I do have a 'recovery mode' which loads an image via the net and allows me to work with the various systems on the installed OS. I can, for example, run parted but apt-get doesn't work.
I have no idea how to get from the RAID array listed above to the config I have described.
I am stuck with this server and this provider.

Complete loss of data is fine if I end up where I need to be.
I have looked at some official documentation but it seems out of date or is otherwise inapplicable. Specifically these resources:

help.ubuntu.com/community/Installation/SoftwareRAID
help.ubuntu.com/community/FakeRaidHowto
www.tldp.org/HOWTO/LVM-HOWTO/

Edit 2: The advice I got from #Ubuntu is: "basically, break the 5 mirrors, create new raid 5/6 array out of them, that is it (if you don't want to touch the root disk). Once thats done, remove the remaining 1 disk raid 1 out of raid configuration as there are no more mirrors for it, you need to remove it. I advise you to mark the 5 mirrors as "failed" before removing them so it thinks the disks have failed before you disable them.
While that makes sense conceptually, the practical application of that advice is beyond my current understanding.
I've tried to be comprehensive in describing my problem, but I am sure I have left salient details out. Please ask for clarification where needed.
Thanks :D

Update 2014.09.05
I have re installed the OS using the Custom Installation option and the Install Entirely On First Disk option in the partition scheme dialogue.  This leaves the remaining drives completely untouched. This means I should be able to set them up as a new raid array instead of having to undo the default raid array as installed.
Answer: The short answer:
Using ovh's CP choose reinstall and tick custom install.
Select Install all on first disk.
Install.
Log in as root and the other drives are completely unallocated. You can act on them as you would any other drives and there is no pre-installed raid to overcome.
Also, I decided to go with backups over raid 5 or 6 after reading about the odds of a volume failure after a drive failure. See:  http://www.datamation.com/storage/data-storage-the-myth-of-redundancy-1.html


What is the primary energy source for sprouting plants?

Question: To what extent are young plants powered by the potential energy stored in the seeds and when does solar energy take over? Are there other energy sources involved?
I was observing sprouts in a germinator [is this a word?], pushing up the lid after being left alone over three-four days. As this is a considerable amount of work (for such young plants) I wondered how long the plant can access the original energy stored in the bean/seed and how it compares to the amount of energy it can get. As you can see in the picture, the sprouts have only access to water and some sunlight.
I suspect the potential energy it draws somehow decreases monotonically (perhaps linearly, quadratically, exponentially?) over time, while the solar energy pics up.
Is this mental model correct?
I'd appreciate an answer that a non-expert can understand.

I think these were radish sprouts, but my question is more general.
Answer: This depends largely on the plant, some seed stores can last a very long time, but a few general trends can be discussed.
sprouting plants run off stored carbohydrates in the seed, they are using respiration, photosynthesis begins as soon as they are able and they will switch over to it as quickly as possible it is however gradual as the plant never stops using respiration it just starts using photosynthetically produced sugars instead of stored ones. The stored energy will run out so the faster a plant can stop relying on it the better, so even a small production is helpful, you yest it is a gradual process, even if it is a fast gradual process ins some plants.
Answer: Your first question has an easy answer.
Q: "when does solar energy take over?"
A: as soon as a green part of the plant receives sunlight. Chlorophyll is the main light-harvesting pigment, and responsible for the green color of the plant.
Comment: Clearly. But is it the primary power source for the early development? The surface area of the plant is comparably small and it's just beginning to develop leaves.


SFTP Passwordless connection

Question: there is sftp user for which password less connectivity is established long back however we are trying to connect from other sources\server and I forgot the passwd of the user so if I reset the password will it affect the existing passwordless connectivity ?
Answer: No, it won't affect passwordless connectivity because you're using public keys authentication.
Answer: Usually passwordless authorisation uses ~/.ssh/authorized_keys. So, if you have a private key and its pub key in ~/.ssh/authorized_keys (it's already in, if you can log in now) then you can do with the password whatever you like.
Of course there are other storages for authorized_keys.

SFTP Passwordless connection


How to prune this peach tree?

Question: I have this peach tree of unknown age, pictured below. It produces a lot of fruit, but all the branches need to be supported by tripods and thinned heavily. Is there any reasonable strategy for pruning it? All the guides I've seen recommend removing entire branches at junctions, but here removing any main branch would be a significant loss of mass
Comment: I suspect that taking the "significant loss of mass" will be required to recover this to any reasonable shape, given the state it's in from past pruning. If you are looking to have less need of tripods, etc. you might consider setting up to espalier on heavy wire supported by sturdy posts, and training new growth onto that structure.
Comment: No, I think it is feasible, but it will take some intermediate setbacks to get there from where it is The structure behind the tree seems a bit small (width-wise) for an effective espalier of a tree that size, and wires are invisible to me in the photo if present.
Comment: @Ecnerwal, you should make it an answer.
Comment: @Ecnerwal "espalier on heavy wire supported by sturdy posts" - Like, that mysterious structure immediately behind the tree? Thank you, maybe that should have been obvious but it was not.

Also "without significant loss of mass" really meant "without killing it or rendering it unproductive for the rest of its life" - Assume your opinion is still that it's not feasible
Answer: When you are advised to take whole branches, the idea is to avoid leaving dead tips. That goes a little something like so. In the picture you see the cut is happening at the join with another branch. The result is you don't leave a dead tip.

Dead tips are a problem because they tend not to grow. So you get this unattractive and non-contributing stub with bark only on the towards-the-tree end. This leaves a place for fungus or insects to get in. And in locations with winter, it forms a place that ice can build up, possibly increasing the winter load and maybe breaking branches that could have avoided it.
If you trim back to the join with another branch, the bark will grow over the cut. If it's a larger branch it may leave a big scar. You may need to think about treating these to help the tree stay healthy. Your garden center may have advice on how to do that.
Contrast that with how some people trim a tree. They get the electric trimmer and basically do a "bowl cut" across the bottom of the tree. You often see this on mulberry trees. And it often means there are a bunch of dead tips poking out the bottom of the tree.

It does not mean you have to take any particular size of branch. You should do this right down to the smallest twig you remove. Always leave a growing tip on the parts you don't remove, and no dead tips on the part you cut. So there should be some leaf buds or leaves, depending on the time of year you are doing the trimming.
Start with removing any dead branches, as before right back to the living branch. Think about getting rid of tangled or overlapping branches that shade each other. Get an image in your mind how you want the tree to look. Decide which parts you want to remove.
Most trees will want to be pruned only during good strong growth so they can recover. And my own rule is to try not to take more than about 1/4 of the total "mass" of the tree. Your mileage may vary.
Answer: The "open center" is common method. Remove large branches in the center ( a few each year). This gets more light in the center and gives "a lower tree". I generally don't want to use a ladder to pick, so remove high branches. Also easier for any spraying.  Remove "water sprouts" , vigorous new branches ; often growing straight up with few side branches. I found the state Ag department had many pamphlets on home gardening, etc ( IL.)

How to prune this peach tree?


How can I remember my dreams?

Question: I do dream in the sleep but the moment I wake up I only remember a very little of thing and after some minutes, I don't actually remember any of my dreams. Why is it so? Can someone suggest me how to remember my dreams.
Answer: Keep a notepad by the bed. As soon as you wake up, write the dream down before it fades.
At first you may only be able to remember key items, but it gets easier the more you do it.
Comment: The important thing is to start writing while you are still in a state of half-sleep. As soon as you begin to wake, grab the notepad and start writing. Do not wait until you are fully awake, as the dreams will fade in proportion to your wakefulness. – Also, do not censor or try to write "beautifully", just jot down whatever comes to your mind as quickly as you can.  – And Rory is right: You get better at remembering your dreams with practice. If you want, you can go so far as to train yourself to remain conscious while you sleep. Search for "lucid dreaming" to learn more about this.
Comment: a voice recorder might be eiaser to use in the dark, plus the vocal tone can refresh memory.
Comment: that may work for some people - I found it woke me up too much, and disturbed my partner...
Answer: To remember your dreams, the minute you wake up, get out of bed and start doing whatever you do first thing in the morning.
There's something about laying in bed half awake, or hitting the snooze alarm, that makes the dreams fade.  I can't explain it but this makes a difference.
Comment: When I think about my average weekday morning, this sounds like a recipe to *certainly* forget about the dream.

How can I remember my dreams?


I need to know what format can be used on my kindle Oasis 2019 to save up the most space?

Question: I have files in .txt with the total weight of 457 mb. I need to save it in 170 mb of space of the kindle oasis 2019.
Comment: what kind of content is this? A directory? A novel?  a dictionary? A csv file?
Comment: 4 documents made of multiple merged nonfiction ebook files.
Answer: I haven't tested this, but my first guess is just dumping it into a DOCX file and then using Calibre or Kindle Previewer to make a mobi file. That compresses the files significantly. Docx is a very efficient binary file -- much more efficient than txt or even html.
Incidentally when you create a mobi file, the file size of the created file is twice what Kindle actually uses. So a 200MB Mobi file will probably only appear to the Kindle app to be 100 MB.
Practically speaking, larger files take a while to load, so there's value in splitting them up into separate files.  But I think if the source docx file is 100 MB, then the created mobi file will be 200 mb, but the Kindle app will only download 100mb from the cloud.
I am assuming that you are uploading the file to Kindle Cloud via email and then downloading the ebook onto your Kindle device? If you are sideloading, then the file size will still be 2x of what it needs to be.
To summarize: use DOCX for the source and upload to your Kindle account and then have Kindle cloud send it to your device.
Comment: Surely dumping txt into a mobi file provides smaller files then via docx. docx and html had extra formatting dtat,
Comment: I think that the overhead of docx (or html) for large files is negligible. Anyway, mobi is basically compressed xtml.


How to get flavours to infuse into rice

Question: When I try cooking some asian rice dishes, Nasi Lemak, or Hainanese Chicken rice, I always add the "active ingredient" straight into the water used for boiling the rice (Coconut milk and sesame oil respectively in these cases) When cooking they smell really good, however when the rice is done and I taste it tastes bland like normal white rice. How can I make the flavours "go into" the rice?
Comment: Are you boiling & draining the rice, or measuring it out so the rice absorbs all of the liquid being used?  (even in the second case, sometimes the high heat to cook the rice changes the flavors)
Comment: I make sure the rice absorbs all the liquid, boiling and draining is actually a technique i have never heard of in asia
Comment: @ZhanfengLim it's common in India. More common with basmati rice. https://www.youtube.com/watch?v=y8ovvxPbxQo
Comment: Did you "blast" the rice? For Hainanese chicken rice, you really need to blast the rice in chicken fat to get the flavors in.
Answer: Nasi lemak means fat rice. The fat is from the coconut milk, which is up to 20% fat depending on how you make it. The fat will change the flavour and mouth feel of the rice but it is not particularly going to give a strong flavour .
The nasi lemak needs aromatics in the rice. These would be lemongrass, ginger and pandan leaf. Pandan leaf is particularly important. The lemongrass and pandan are whole and don't disappear in cooking so will continue to impart aroma to the surrounding rice even after it is cooked.
Nasi lemak is mainly about the condiments so the rice is not supposed to be too strong since you have fried fish, sambal, etc. But with the herbs you will get a good aroma in the rice.
You could also try adding shallots lightly fried before cooking (in addition to the aromatics)
Rice is not really boiled but steamed in SE Asian cooking. Just use a rice cooker. The other ingredients are optional, but coconut milk and pandan leaf are the only 100% essentials.
If making Hainan rice then you should start by frying ginger/garlic paste, then add star anise, cinnamon, cardamom (I am not sure all of these are required), then coat the rice in that. The rice should not be cooked in water but in chicken stock from poaching the chicken. Sesame oil is not for cooking, it is a garnish, so always add it at the end of whatever you are cooking. Again you need pandan leaf in the rice cooker, and lemongrass is unlikely to be a bad idea either. You can add sesame oil when serving.
Comment: Great advice! One of the reasons that it was bland was the lack of salt, the salt in the stock will address that.
Comment: When you say steamed, not boiled, does boiling until all the water is gone count? That is how a rice cooker works right? but im frequently moving so i dont really want to invest in one.

I did fry ginger paste and lemon grass before adding the rice and water. Some other recipes seem to call for frying the uncooked rice before boiling/steaming, which sounds rather unusual to me
Comment: Boiled rice is boiled in water. Like you would boil carrots. There is water left at the end, and you drain it. Steaming implies that there is no water left at the end.
Answer: Fat is the powerhouse of the taste. When preparing rice put some fat (stock, oil, butter) first, then add spices/herbs, wait till they start sizzling and add rice.
Mix well until rice begin to look transparent and then add water.
When you add ingredient to rice with water you make "ingredient flavoured water" as there is nothing that can stick to the rice itself.

How to get flavours to infuse into rice


What score should i put in boost field of elasticsearch

Question: In my doc, I have a field called Tag and SuperTag. Whenever a Tag matches it will boost some score, but if a match on SuperTag it will boost significantly to make it 1st choice. In your opinion, what value should I put in boost field for Tag and SuperTag? Thanks.
Comment: Are Tag and SuperTag arrays or strings?
Comment: a string but will be tokenize on index.
Answer: That's quite difficult to be answered, It depends so much in the data that both field contains and the analyzers that they have.
Obviously if the data is going to be pretty much the same for both I would set a boost in supertag field to 2.0.
In case they don't hold the same data we can imagine scenarios like this:
{tag: 'tagnice tagnice tagnice'}

{supertag: 'tagnice'}

even with the boosted supertag, tag could be more relevant just because tf-idf gives it bigger score.
To solve that for example, an analyzer setted to both with filter unique will help.
So as said, it depends so much in the data and how you store it in lucene. At first sight, without knowing that much, doubling the boost would work.


Should my question be CW? I have not received any answers yet.

Question: I am trying to get answers for my question using the standard MSE way, which is letting users receive a reputation award if they post a quality answer. But by making it a CW within minutes, it appears that my question is destined to be swept under the rug. I flagged it but it has not received any attention yet.
Lecture Notes in Real Analysis
Comment: Maybe instead of complaining about the CW stamp, you should explain what you expect your thread to contain that the linked general lecture note collection thread could not.
Answer: Your question was made CW because it is a request for a list of sources and thus is not definitively answerable.  Making a post CW is a judgement on the content and format of a question, not a disincentive to answer it.  If people are interested in your question, they will answer it whether it is worth reputation or not.
Comment: @grayQuant: you're new around here, aren't you?
Comment: @grayQuant Rep is an incentive, but CW questions are [certainly not](http://math.stackexchange.com/questions/tagged/big-list?sort=votes&pageSize=15) less likely to receive attention.  If you want more answers, try focusing your efforts on improving your question, rather than blaming the system.  Even if your question is already good, you can always make it better, anywhere from refining what you're asking for, including more research, or just editing your tone to be more interesting to read.  Take a look at some of the highly upvoted questions within the tags that interest you as examples.
Comment: don't mean to be disrespectful but rep rewards good answers and is an incentive. non cw answers are more likely to be given attention
Comment: @AlexanderGruber I would point out that quite a few questions on that list were converted to CW automatically *because* they received so much attention (i.e. 31 answers); but the point still stands.
Comment: @AsafKaragila I have been here for over a year but there's a lot of site mechanics I still don't know about.
Answer: You asked the question yesterday. It's way too early to call your question "swept under the rug". If you feel it does not get the attention it needs after 2 days pass you will be able to add a bounty in order to increase incentive.
In the mean time you ought to consider other potential issues with the question. For example on SE sites it is usually more productive to ask a question about the subject matter yourself that you know could only come from the kind of sources you are trying to trace. This sort of question is much more interesting to experts, more likely to be of use to future visitors, and good answers to such questions will reference the material you were looking for in the first place.
Comment: I am looking for study material for a course, real analysis in this case. I am sure a collection will be useful to many other people, esp after seeing the other reference request questions. But I am done with this issue, obviously no mod will reverse the decision.
Comment: @grayQuant Perhaps you are asking on the wrong site. SE sites are not equally good for all kinds of questions, and resource requests are not something it caters to. If you still think it fits, an effort to make the system work with and for you rather than trying to fight it would be the most productive. Try answering some other questions so you have a chunk of rep to dish out in a bounty.


Can a Kerberos application server offer to proxy connections to the KDC?

Question: As I understand it, when a client wants to authenticate to an application server using Kerberos it must first request a service ticket from the KDC (and possibly a ticket-granting-ticket if it does not already have one). For scenarios where the client cannot directly connect to the KDC but can connect to the application server (for example when an employee brings a laptop home and wants to authenticate with a company website) is there any way the application server can offer to proxy messages to the KDC? It seems like this would not pose any added risk, since Kerberos already doesn't trust the network. Also, is there any reason this is not how things work by default? Is it just that Kerberos was designed in a time when NAT was less common?
Answer: There exists this protocol called IAKerb. It is very much intended to allow clients to proxy messages through application servers when the clients don't have line of sight to a KDC.
It's about as simple as any Kerberos extension protocol goes. When the client can't find a KDC, the GSS-API stack will attempt to bundle up the original Kerberos messages and stuff them into an SPNego message and fire them off the to the application. The Kerberos dance occurs inside the encapsulated message flow and is opaque to the application itself. Once the user gets everything they needed out the protocol flow the client returns to normal and issues tickets for the application.
The trick here is finding compatible clients and applications. MIT supports it. I don't think Heimdal supports it. Windows definitely doesn't support it. Apple supports it.
You can find the spec in the IETF working group: https://datatracker.ietf.org/doc/html/draft-ietf-kitten-iakerb-03
Comment: And I actually thought it came _from_ Windows... MS-KKDCP always seemed a bit more elegant approach.
Comment: One of the original IAKerb authors worked at Microsoft at the time of writing. IAKerb isn't currently implemented in Windows for non-technical reasons, so KDC Proxy is what's left.
Answer: I'm not aware of any way to do this.  For most installations, Kerberos KDCs are looked up via DNS.  While it's possible to specify a list of KDCs in the configuration file on the system, this is less robust against changes than DNS.
Normally one wants to be able to obtain a ticket before an application server is even seen.  For example, I have a PAM module on my system to automatically fetch a ticket-granting ticket when I log in, and I suspect most Windows systems work similarly.  In order to fetch a TGT from the application server, the password would have to be persisted in memory until a user opted to connect to a server that needed a Kerberos request, which might be much later or never.
Additionally, most organizations would either (a) expose the Kerberos server to the Internet, which is how many universities work, or (b) force all users to connect to a VPN to access organizational resources (including the KDC), which is more common among corporations.  NAT is not typically a concern in the latter case, since there's ample private network space for all but the largest organizations.
Kerberos is also primarily a UDP-based protocol, which is generally hard to proxy.  (For example, SSH proxies TCP and Unix sockets, but not UDP.)  Because no connection is established, and it's hard to distinguish between a dropped packet, a firewalled port, and a protocol with no response, proxying wouldn't be very robust, since in the vast majority of cases the packet would be firewalled and therefore the user would have to wait for a timeout before trying with the KDC.  While this might not be a problem for some interactive connections, it could be burdensome for automated services or scripts.  It's also a lot of extra code for what is a relative edge case.
Even if the packets were sent over the main transport connection, not all protocols are capable of proxying that kind of data.  For example, HTTP is poorly suited to such a case due to its single-request, single-response paradigm, where each request is authenticated individually.  Even the way that SPNEGO is bolted onto HTTP right now is kind of a hack, and I'm pretty sure the HTTP folks at the IETF would scream pretty loudly at this kind of approach.  I sure would if I were them.
Comment: Nah, there's this thing called IAKerb that does it.


Is telling children Santa is real and other similar stories ethical? If so, why?

Question: Is telling children Santa is real and other similar stories ethical? If so, why? If we as a society are taught not to lie, why are we telling our children magical stories and building up these characters as myths only to break their hearts once they are a certain age?
Comment: Welcome to Philosophy SE. Your question is well formed but I suspect that it will be considered opinion based. The morality of Santa Claus stories is a matter for the ages and delves into the space of the difference between truth and fact. Perhaps the simplest answer is that it depends on the detail; if Santa is merely a metaphor or an idea, it can be used to introduce concepts to a young mind not ready for a complete answer; like the stork myth about where babies come from. Ultimately, I don't think it's about ethics; it's a moral question that you can only answer for yourself.
Comment: "telling children that Santa is **not** real" is a very very bad action indeed ! Children needs fairy tales and any other stuff nourishing their brain. You have to read about the role of such tales; see [Propp](https://en.wikipedia.org/wiki/Vladimir_Propp) and [Bettelheim](https://en.wikipedia.org/wiki/Bruno_Bettelheim).
Comment: @TimB I would accept that as an answer if you posted it as one.
Comment: @TimB There's a difference between truth and fact?
Comment: https://philosophy.stackexchange.com/questions/8053/what-is-the-difference-between-fact-and-truth gives a good description of this concept.
Comment: Stories are important and their truth is not always the point. One can learn a great deal from fiction, myth, allegory and fairy tales where they are not just entertainment. They are not supposed to be true but are teaching stories. If you want your young daughter to be careful out in the woods without having to tell them about the real dangers of men then tell them about Little Red Riding Hood. They can delve into the real meaning of these stories when they're older. As for Santa, I suspect these days he's got more to do with Coca Cola than with ethics. . . .   .
Answer: I'm going to expand on my comment given that there are no other furnished answers to this question.
Children are born intelligent and capable of reason; they are not however born with the knowledge that will allow them to reason using that intelligence.
What that means in practical terms is that their ability to reason about the world in which they live, and about the choices of those who share their environment (most relevant to this question) forms cumulatively as they gather knowledge, information and concepts that can all be integrated into their world view.
You can't teach Quantum Physics to a 2 year old because that knowledge is based on a massive foundation of cumulative knowledge and specific language (including mathematics) that the 2 year old doesn't possess yet. You CAN teach basic Newtonian mechanics because it's not so far beyond the existing knowledge foundation in the mind that the reasoning will sound like non-sense. This is part of the reason why we still teach Newtonian Mechanics in schools, even though they are completely replaced by relativity; they're simple enough for young minds to understand, and they give good enough answers that they can be seen to 'work'. It's only later that we teach children that Newton isn't 'real'; that his work has been superceded by Einstein and others as Special and General Relativity.
Add to that, there are some concepts we want to introduce to children when they're more ready for them; like human reproduction. This has a lot more to do with social mores than ethics, but it's become an quasi-ethical position over time because we all universally accept the need to do this. In this case, when questions like 'where to babies come from?' we end up using myths like Storks as a placeholder or metaphor that we can build upon later.
In these two examples, one can say we've 'lied' to the child if you want to take a literal interpretation. I prefer (and this is my opinion) to think of it as the introduction of metaphors that allow the introduction of complex concepts gently to a young mind that has to be nourished rather stifled, and can build these metaphors into its world-view in a manner that can be refined (not corrected) later.
Santa (in a similar vein) is a concept or metaphor for life that a young mind can understand. It's not about whether Santa Claus is real or not, or even whether there was ever a historical figure on which he is based. It's not even about whether Christmas is even a legitimate Christian holiday and where Santa would fit into that. I see Santa as a metaphor for the benefits of integrating with society.
What the Santa 'myth' effectively teaches children at a subliminal level is that if you're good, good things happen. If you're bad, bad things happen. This is not about being good once a year; Santa is watching ALL year. The point of this (before a child can understand it) is that behaviour is integral to acceptance in a society that needs him or her to conform to a basic set of rules.
You can't go around hitting other people. You can't go around smashing other people's things. You have to obey the directions of those with responsibility (parents, police, etc.) when they need you to. Beyond that, your life is your own to live.
Explaining that all to a young child is incredibly difficult without a fun, bright metaphor to dress it up in. Children need imagination and enriched stories to make sense of these things first up, and can then (once their world-view is sufficiently developed) synthesise the real intent behind these metaphors.
Sure, you can screw it up by INSISTING that Santa is real when a child brings you the logic that shows he can't be real; the devil is always in the detail but the key point here is that if you introduce it correctly and work with a child's individual level of development, it can be a very powerful tool in directing a child's correct development.
In that sense, teaching about Santa is only different to teaching about the Stork or even Isaac Newton by degrees. Look at every child individually, make sure you only introduce the metaphor in a way that can be built upon later (rather than contradicted) and be true to your own morality in doing so, and I don't see that it violates the ethics of not lying to children.
As in all things of this type however, the matter is subjective and one should make up one's own mind on the morality of this kind of decision.


Why isn't it possible to switch between header and cpp in Visual Studio?

Question: For the last eight years I wait for Microsoft to add the basic C++ functionality of switching back and forth between .h and .cpp files, and it keeps astonishing me it is still not supported in Visual Studio 2010. Does anyone know why they refuse to add this essential feature?
Comment: This question is asking for pure speculation, you would need to ask the authoritative body which made the decision to know.
Answer: Visual Assist does it, but also offers you to open any file in your solution which has a name that includes the substrings you give.  Extremely useful in my opinion: I always use it, but very hardly use the 'jump to header/source' command...
Comment: You are right. I loved the feature and finally discovered [Quick Open File](http://visualstudiogallery.msdn.microsoft.com/en-us/3eb2f230-2728-4d5f-b448-4c0b64154da7), a free plugin that offers the same functionality.
Answer: It's easy to write a macro that does it: Switch between Header and CPP File for Visual Studio .NET by Pavel Sokolov, Pierre Arnaud

Pavel Sokolov's Solution
A simple macro that allows you to quickly switch between the associated header and implementation files. This is a modification for Visual Studio .NET of the macro by Nooruddin Kapasi.
This macro simply switches between a *.h file and a *.cpp file, without any errors (if the *.h or the *.cpp file does not exist)...
Pierre Arnaud's Solution
The Switch_H_CPP macro switches between the active document (either source file or header file) and its counterpart (either header file or source file). Whereas simpler macros get this job done more efficiently (see the above), they do not work if the header files and source files are not stored in the same directory...
Switch_H_CPP looks for a matching counterpart by walking through all the loaded project files. It can, therefore, deduce the full path of the file and open it even if it is in a different directory as the active document...
Comment: Of course, but my point is that it is an absolutely essential feature that would take 5 minutes to implement, but for some reason Microsoft doesn't choose to. I suspect political reasons, hence my question.
Comment: Why do it yourself when others have. :) Nice find, +1
Comment: @Dimitri: Why include something in the base installation when it takes 30 seconds of searching to find? People complain that Visual Studio is too bloated as it is...
Answer: I've not used Visual Studio for a few years, but IIRC the "Go To Definition" and  "Go To Declaration" functions do this (albeit badly, particularly when it comes to constructors)
I imagine that one reason for them not implementing it on a filename basis is that there is nothing about C++ that enforces a convention on the arrangement of classes in files.
e.g.  The "obvious" way to arrange a class called "MyClass" in a C++ project is to put the class in MyClass.h and the methods in MyClass.cpp.
Another, totally plausible way is to put the class definition in "elephant.h" and the methods in "mouse.cpp"
You could put all of your classes in one "classes.h" file and define all of your methods in one method per file.
I'm not saying that you should arrange your projects in this way, just that you could, and that's why jumping between .cpp and .h files is implausible, unless done in the same manner in which it is already implemented.
Answer: As discussions on Visual Assist shows, this feature is far from simple: which extensions are included (.c, .cpp, .cxx, .h, .hpp, .nothingatall, .inl, ...), which way you cycle through them when there are more than two, etc.
I agree it's still a rather simple feature to implement, but it's not as simple as you think.
Comment: disagree: back in VC6 days there was a tool called WndTabs that added tabs to the interface, and had a lot of useful features, including the .cpp/.h switch, they managed it very well. Wish MS had put all this into later versions of VS :(


Does M theory have open strings?

Question: M theory combines all string theories, however, some contain open strings but other do not. So what does M theory have to say about this?
Answer: M-theory
M-theory is a theory that shows that the many different string theories people have come up with are connected by underlying dualities.

Each of the different theories it compromises are useful in different situations, and each of the different theories allow different types of strings. For example, type I theory includes both open and closed strings while types IIA and IIB only include closed strings. The point of M-theory is not that one form of string theory is right or wrong but that each is a special limiting case.
An analogy of this is light. It can be described as both a wave and a particle. Neither view is wrong, rather, using both views gives a more complete picture even though at first glance these seem contradictory. The same is true of M-theory - at first glance, all of the types of string theory seem radically different, but at a closer look at the mathematics, each are connected by dualities. More information about M-theory can be found here.
Reconciliation of string types
M-theory is based off of branes. A zero dimensional brane is representative of a point particle, and a one dimensional brane is representative of a string. Branes of higher dimensions are known as p-branes (if a two dimensional p-brane, p = 2). M-theory is also 11-dimensional (as opposed to string theory, which is 10 dimensional).
The fact that there is one more dimension in M-theory means that branes in M-theory appear one dimensional from the perspective of string theories, resulting in strings. Whether or not the strings appear as open or closed results from the mathematics of each of the individual theories, and how the reduction to one dimension is gone about.
Hope this helps!
(Thanks to CuriousOne for pointing out that I hadn't originally properly answered the question.)
Comment: The question asks how the existence of various types of strings in the string theories are reconciled with M-theory. There is an actual answer to this - strings arise from M2-branes and since the limiting process to obtain each of the string theories from M-theory is different for each theory it sometimes produces open string and sometimes not. But you do not give that answer, instead you hide behind the generality that M-theory doesn't say either string theory is correct. That is *true*, but I don't see how it answers the question.
Comment: While this may help someone, I'm not sure how it's an answer to the question of how strings arise from M-theory.
Comment: @ACuriousMind, this (I think) fairly clearly explains that m-theory doesn't say that either idea (just closed strings vs open and closed) is "correct" just that each is useful in different situations. What do you think I haven't explained? I'd like to improve my answer wherever possible.
Comment: Perhaps I misunderstood the question - I thought it was asking which view was correct according to m-theory. It never crossed my mind for it to be interpreted the way you describe. I can update my answer.
Answer: First, what objects M-theory actually contains is not finally settled because we don't know the full extent of the conjectural theory that is M-theory.
Second, M-theory does so far not contain any strings - instead, it contains two-dimensional branes, the M2-branes, that reduce to the strings of the various string theories by having one of their two dimensions lie in the eleventh dimension of M-theory, so that they appear one-dimensional from the perspective of the ten-dimensional string theories. That sometimes these may manifest as open strings and other times not depends on the details of how the dimensional reduction to a particular string theory is achieved.

Does M theory have open strings?


How to enable notifications in Force.com IDE that file was modified on server?

Question: How to enable notifications in Force.com IDE that file was modified on server?
Now several people in the project work with one class and we just simply overwriting each other code..
Answer: I believe there is no such notification available. But you can avoid overwriting. Before saving the file to server,right click on the file and do Force.com>Synchronize with server.

It will open the "Team Synchronizing" perspective. Then click on the down arrow in navigation panel (Shown below).

This will open a comparison view of your local file and remote file. Copy all the changes (Except your local changes) from server to your local file. Then save your file to server.

In this way you can avoid overwrite. Hope this will help.
Comment: Thank you for the answer. Some months ago there was notifications, so everything was ok. But now it's not working.
Answer: I think there is no such feature available from salesforce to work for a same class and notified if changes occur so working on a same class at     same time is not possible for two developers.
Force.com Eclipse IDE itself provide an Error Message telling that Apex/VFpage File on server is updated and your current file is not in synch. You can try testing this out with simple experiment
Step 1: Synch a salesforce project in Force.com Eclipse IDE
Step 2: Update a VFpage/trigger/apex class in salesforce directly from browser.
Step 3: open the file in Eclipse IDE and try editing and saving it again. you will get a small yellow error with the message.
Comment: Thank you for the answer. I've tried to repeat actions you wrote, but I haven't received any errors or warnings -my class was saved on server and overwrote version from Step 2.


Landing Currency for Type Rating Airplanes

Question: When discussing landing currency, we need three takeoffs and landings within the preceding 90 days in the same category, class, and type of aircraft to be flown. Type meaning type rating and not just 172 vs PA28. I understand if you do your landings in a Piper Seminole (AMEL) you're not current in a 737. However, if you're type rated in the 737 and do your 3 landings in the 737, does that also count for your currency for the Piper Seminole. Like would the currency for a plane with a type rating count for the plane without a type rating given they're the same category and class? It feels silly to ask but just want to make sure.
Answer: Yes.  If you are landing current a B737, you will also be landing current in a non-type rating AMEL aircraft as well.


kubuntu grub console at startup

Question: I neweblie linux user. I have installed kubuntu on my laptopn. Every time I see grub console at the startup. Console does not exit by timeout. I must to input "exit". How to disable grub console on startup?
Answer: In order to adjust grub 2 's behaviour, you can edit this configuration file /etc/default/grub and commit your changes using this command : sudo update-grub.

The GRUB documentation is here :
http://www.gnu.org/software/grub/manual/grub/grub.html

Beware !
Before disabling the grub menu and console at boot, you need to ensure that your system can boot automatically on your preferred system ! If you have installed linux over (after) windows as a dual boot, you can adjust the default boot option in /etc/default/grub thru the key GRUB_DEFAULT (the default is GRUB_DEFAULT=0 then you can set GRUB_DEFAULT=1 )
and commit your changes by sudo update-grub.
When you are sure that your system is able to boot automatically, you can decide to remove the menu and/or the console or change their behaviours.
In order to shorten the menu's display duration you can adjust this option : GRUB_TIMEOUT=10
and commit your changes by sudo update-grub.
In order to hide the menu you need to change this option : GRUB_TIMEOUT_STYLE=menu
by : GRUB_TIMEOUT_STYLE=hidden
In order to remove the console you need to comment this line : GRUB_TERMINAL=console
by inserting # at the beginning of the line : #GRUB_TERMINAL=console
PS :
If you have 2 systems and still need to choose your boot, consider also the usage of GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT=true
If you want to see the linux kernel messages when it boots (instead of the splash screen logo) you can switch the option GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="".

kubuntu grub console at startup


Integration by substitution problem $x = C \sin(t)$.

Question: For solving the integral:
$$
\int_a^b \sqrt{\alpha^2 - \beta^2 x^2} \, dx
$$
I've been taught to use $x = \frac{\alpha}{\beta} \sin(t)$ in order to get
$$
\frac{\alpha^2}{\beta} \int_{\arcsin(a \beta/\alpha)}^{\arcsin(b \beta/\alpha)} \sqrt{1-\sin(t)^2} \cos(t) \,dt
$$
which is easier since it is $\int\cos^2$ and by the identity $\cos(t)^2 = \frac{1}{2}(1 + \cos(2t))$ it's done. But what if $x \geq \alpha/\beta$? Am I missing something? Thanks and sorry if I am asking something obvious.
Answer: If $x > \alpha/\beta$ (assuming that $\alpha,\beta > 0$), then the integrand $\sqrt{\alpha^2 - \beta^2x^2}$ will be complex, since $\alpha^2 - \beta^2 x^2 < \alpha^2 - \beta^2\cdot\frac{\alpha^2}{\beta^2} = 0$. The function can still be integrated, but I assume your domain of integration will avoid such problems, because you would need knowledge of integration of complex functions to deal with the integral if that ever happens.
If $x = \alpha/\beta$ on the nose for some $x$ in the domain of integration, then you're still fine using ordinary methods to evaluate the integral, because $\sqrt{\alpha^2 - \beta^2x^2} = \sqrt{\alpha^2 - \beta^2\cdot\frac{\alpha^2}{\beta^2}} = \sqrt{0} = 0$.
Hence, if you want your integral to end up being a real number, your $a$ and $b$ will have to satisfy
$$
a,b\in\left[-\left|\frac{\alpha}{\beta}\right|,\left|\frac{\alpha}{\beta}\right|\right].
$$
You can also see that you can only consider the substitution above when $a$ and $b$ are as above by looking at what happens to the limits under the substitution: $\arcsin x$ is only defined on $\left[-1,1\right]$, so we need $a\beta/\alpha \geq -1$ and $b\beta/\alpha\leq 1$ (here I'm again assuming you're taking $\alpha,\beta > 0$) in order for the second equation to even make sense! But you can see that the conditions just stated are the same as $a$ and $b$ being in the interval $\left[-\left|\frac{\alpha}{\beta}\right|,\left|\frac{\alpha}{\beta}\right|\right]$. So, we see that the substitution $x = \frac{\alpha}{\beta}\sin t$ is only valid when $-\left|\frac{\alpha}{\beta}\right|\leq a\leq x\leq b\leq \left|\frac{\alpha}{\beta}\right|$.


Why off-line power supplies are called so, like they are "off the line"?

Question: My understanding is that "off the line" means "not on the line". For example an internet user is offline, meaning "not connected". However "Off-line power supplies" are directly connected to the grid (without line frequency transformer). Who coined this strange term?
Comment: OK, I get it, "off-line" (power supply) is actually short for "directly off the line". Thank you!
Comment: This is simply the multiple meanings of the "off" preposition. "off" means "not on" (get off my lawn!); "from" (I got that off E-bay); "from a level or departure point" (50% off sale; 5 millmeters off centre); "from a source" (you can copy off me, if you can't solve it by yourself); "from a direction" (ship veering off course), "away from/toward" (I'm off to the mall);  "attached to something, emanating from something" (leaves shooting off the vine; devices hanging off a network) and others: not to mention various phrasal verbs involving "off".
Comment: There is a difference between offline and off-line. It's perfect English.
Comment: Show the context you see this term used in.
Comment: In terms of computers, it means a PC or network is down, or off-line. For power supplies and certain IC's, it means the power is taken off the mains AC power line. Please don't trip over you own brain on the different context possible with that expression. In this case 'off-line' is a contraction of several words.
Comment: @Kaz "...not to mention various phrasal verbs involving 'off'." Heh. Thanks for _showing off_ some great humor (as is suggested by the StackExchange guidelines). I almost _fell off_ my chair when another, commonly used combination of _[verb] off_ came to mind immediately (hint: synonymous for _go away_, and, yes, better "... not to mention").
Answer: For me, who are not native English speakers, the terminology is a bit mysterious.
However here I found this definition:

Off-line power supply: a PSU that processes electric power from AC line without using line frequency transformer. Such supply can still be isolating if it uses high-frequency transformer in one of its power conversion stages. A typical off-line SMPS rectifies input AC line voltage, produces high-frequency pulses by using semiconductor power switches, changes the voltage level by using inductors and/or transformers, then rectifies it again and filters for DC output. An example of isolating off-line PSU is a switching power supply of a computer.
Comment: Well, -1, but can't downvote myself: the question had nothing to do with UPS-es (*uninterruptible* power supplies). Instead, given the generic context, OP must have been concerned with [this classification](https://en.wikipedia.org/wiki/Off_line_regulator) of topologies instead. Quote from there: 'This ... terminology has no relationship to the use of "online and offline" for computers and networking, and no relationship with uninterruptible power supplies that provide power while disconnected from the electrical grid.'
Comment: @Sz. you are right. I read _uninterruptible_ but i don't know where... :-)
I modified the answer.
Answer: Offline UPS and Offline Power Supplies both are different things. A switcher which can work directly on high voltage without a line transformer is offline power supply. A common controller for offline design is NCP1126. But the question here is who coined the term, i dont know the answer but the above answers are misleading they are confusing with online UPS.
Comment: +1 for "Offline UPS and Offline Power Supplies both are different things.", compensating the gross mistake of the most upvoted answer.
Answer: From a tutorial:

In off-line converters the ac voltage is rectified to dc directly off
  the ac power line and filtered with no isolation transformer and then
  processed with a dc-dc converter that provides isolation at the
  switching frequency. Since the switching frequency is much higher than
  the line frequency the isolation transformer and output filter are
  greatly reduced in size and weight. The switching frequency is usually
  20 kHz or higher to place any audio noise from the switching beyond
  the range of human hearing. Regulation of output voltage, current, or
  power is assumed, because that's where the fun begins. Also the
  rectification process may or may not include power factor correction
  or harmonic current suppression techniques.
Comment: This does not answer the question of why offline supplies are called so. This explains what they are - but not why they are called so.
Comment: ... off the ac power line ...


How do I tell when an eggplant is ready to be picked?

Question: In the past I've had eggplant in my garden but my parents had always taken care of harvesting them since I don't eat it. This year I'm growing a couple for them and have some fairly large fruit on the plants. The problem though is they look the same now as when they first came out on the plants. How do you tell when an eggplant is ripe and ready to be picked? The variety I'm growing is Listada de Gandia if it helps.
Answer: Usual way of testing for ripe eggplant is to try to dent it with the end of your thumb. If it gives way with as much pressure as you would dint a tomato then it's ready. I've grown that variety, very nice flesh and no bitterness. The white streaks will also go a bit off white. I can't locate my flickr page, which has a nice photo of those eggplants just about ready.
Comment: Picked the first of these over the weekend and you're right on the flavor. I've never liked eggplant but these just might convert me.
Answer: I usually go by size when picking eggplant. Once the fruit gets to be about the size it is supposed to be and still has lovely shiny skin, I pick it. I see your variety is supposed to get to 7" long. It won't hurt to pick them a little early - they'll still be good to use - so if it is somewhere in the 5-7 inch range, I'd go ahead and pick it and try it. You'll know you've waited too long when the skin becomes dull.
Comment: I was going to mention that is should sound and feel "right" when you thump it.  But now that I think about it, that pretty much correlates to the size.
Answer: Bit of a late response, but you can harvest them whenever you like.  Generally the larger the fruit the better the value (ie it takes less then twice the time to grow a fruit twice as large).    We grew eggplants commercially, and sold very small ones as gourmet at a high premium - from the same plants we sold larger-then-normal fruit !
I've little doubt it depends on the exact cultivar, but generally the older the fruit the more likely to be bitter.


Mullvad vpn won't connect on ubuntu 18.04

Question: Mullvad vpn won't connect and I keep receiving this error of no server found. any suggestions that would help
Comment: More details please...
Comment: Could you please add a little more detail? What *exactly* did you do, what did you expect to happen and what happened instead? Did you encounter any warning or error messages? Please reproduce them *in their entirety* in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. Please **[edit]** your post to add information instead of posting a comment. (see [How do I ask a good question?](/help/how-to-ask))
Answer: I made a client version using WireGuard some time ago.
The developers behind Mullvad have previously stated that: "WireGuard is the future". Which made me invest time into actualizing a user friendly version of WireGuard with Mullvad.
If you're interested have a look!
Answer: I reached out to Mullvad support because I had the same issue. They told me to use OpenVPN or wireguard while they work on a brand new client.
Here's the link they pointed me to: https://mullvad.net/en/guides/linux-openvpn-installation/
Make sure you use the Android config file and not the linux one (seems backwards to me too but it works).
Also the dns setting in /etc/NetworkManager/NetworkManager.conf wasn't there for me so I just ignored that step and it worked for me. Hopefully the client gets released soon.


What editor is as good as TextPad for compiling and running Java programs?

Question: I want an editor that is as good as TextPad (for Windows) for compiling and running Java programs on Ubuntu 12.04. Please suggest one.
Comment: Please write a bit more about what features you need and maybe what you don't like in other editors you have seen so far. That would make it much easier to suggest programs that fit your needs, even for people not knowing Textpad.
Comment: i want features like:-  1> compile and run from the editor  2> Syntax highlighting  3> want to see the actual errors notifications from JVM.  Currently i am using eclipse but it's very user friendly (ctrl + k ) does all the job.
Comment: As mentioned by @Yems, NetBeans is as powerful as Eclipse, and it covers exactly your needs on 1> Compiling and running from the editor, 2> Syntax errors highligting, 3> JVM actual errors notifications. I was about to suggest you the NetBeans but Yems did it already.
Comment: thanks for the information; but i want a lightweight text editor with same functionality and some keyboard shortcuts would be very helpful.  Like if could configure vi/vim to recognize java syntax and compile and run the programs with some keyboard shortcuts.
Answer: Geany
From the official site:

Geany is a text editor using the GTK2 toolkit with basic features of
  an integrated development environment. It was developed to provide a
  small and fast IDE, which has only a few dependencies from other
  packages. It supports many filetypes and has some nice features.

jEdit
Additionally, jEdit (man page) seems to be another excellent option for your tasks.
From the man site:

jEdit   is  a  cross-platform  text  editor  written in Java. It has
  an extensive feature set that includes syntax highlighting,  auto
  indent, folding,   word  wrap,  abbreviation  expansion,  multiple
  clipboards, powerful search and replace and much more.
Furthermore, jEdit is extremely  customizable,  and  extensible,
  using either  macros  written in the BeanShell scripting language, or
  plugins written  in  Java.  With  plugins,  you  can  create  a  very
  powerful development environment for HTML, XML, C/C++, Python, Perl,
  Ruby, Lisp, Scheme, and many others.
jEdit Requires Sun Java 2 version 1.5.
jEdit is released under the GNU General Public License,  which  can
  be found in the online help.
Answer: I suggest Eclipse!
It have a lot of documentation in diferent languages and it's a wonderfull IDE
Comment: I use Eclipse everything for work, and i haven't found a better IDE to date.
Comment: Don't use Mars if you are into Android development though. It [crashes terribly](https://www.prahladyeri.com/blog/2015/12/eclipse-mars-not-ready-for-linux.html) on my ubuntu 14.04.
Answer: IntelliJ IDEA, a fully fledged Java IDE by Jetbrains, has gained a lot of traction during the recent years. It provides integration with many common frameworks and tools like Git, Web development, Java application servers and Android.

I consider it to be a worthy successor to Eclipse, which has become slow and collected a lot of cruft and asinine behaviour.
IntelliJ IDEA "Community Edition" is free, open-source software (and the base for the "Ultimate Edition" which includes a bunch of features based on closed-source, proprietary extensions geared towards professional collaborative software development with larger code bases).
Answer: Look, there is an IDE called NetBeans in which you can edit, compile and run Java programs. This program is for editing in java. I've tried it on Ubuntu 11.10 without any complication for University homework and I have read that it runs natively on 12.04

NetBeans includes its own editor which has several features useful for programming, download it in: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Sorry my English, I am using a translator since my native language is the Spanish. Best regards
Answer: Notepad ++ is a better notepad.  You could also look for eclipse or Netbeans for java editting.
Here are links for eclipse which is what I use:
http://www.eclipse.org/downloads/
I use the classic version but have the EE installed as well
Comment: @Web-E It runs well in Ubuntu [with Wine](http://appdb.winehq.org/objectManager.php?sClass=application&iId=2983). I still prefer a native editor, but I haven't had any problems with Notepad++ via Wine (though apparently [some features don't work](http://appdb.winehq.org/objectManager.php?sClass=version&iId=25722)).
Comment: isn't it only for windows?
Comment: WINE is a second-class citizen in linux world, and should only be resorted to if NO other alternative is available. In this case, there are a plethora of native editors in linux world. I used to be a Notepad++ fan earlier, but found that with a [little bit of tweaking](https://www.prahladyeri.com/blog/2015/11/how-to-add-html-tag-highlighting-geany.html), Geany can surpass Notepad++.
Answer: Emacs, of course.
Install with:
<code>sudo apt install emacs
</code>


How to specify -? option with GNU getopt

Question: When parsing command line arguments with GNU getopt command, how do I (if possible) do recognize -? as another option? Is there a way to escape it in the opstring?
Answer: The GNU getopt command uses the GNU getopt() library function to
do the parsing of the arguments and options.
The man page getopt(3) states:

If getopt() does not recognize an option character, it prints an error
  message to stderr, stores the character in optopt, and returns ?.
  The calling program may prevent the error message by setting opterr to
  0.

Therefore ? is used to signal "unknown option" and cannot be used as
an option value. (It would be impossible to tell the option -? from
an unknown option.)
Comment: At the C level, you can find out if the `?` was real by checking the original string. But apparently GNU `getopt(1)` just eats up the `-?` and returns 1. `getopts` is less confused (except, oddly, in ATT ksh), but doesn't expose the index of the character in the `$OPTIND`th parameter, which means you have to redo a lot of the work if you get a parameter like `-a?b`.
Answer: Even if you could recognize that as an option string, it would be a really bad idea to use the question mark character as a real argument because most shells use this as part of their glob syntax (representing that the character before it is optionally use or not in the match). Passing a litteral ? would be difficult for users because they would have to escape it.
If you are creating a help option of some kind the usual syntax is to look for short and long options of -h and --help.
Comment: If you're using GNU getopt, you should support `--help`.
Comment: Actually, most of the time, `-?` wouldn't match anything and so would be passed literally to the command. But that's fragile (fails if you do have a file called `-a`, or under csh or zsh configured to complain on non-matching globs).
Comment: @cjm: yes. I already do.
Answer: To get the effect of using the question mark for help, try simply checking to see if the unknown option is indead the question mark character.
For example, I want to print out a message "Unknown option" whenever the unknown option is NOT the question mark.  Next I always call my usage function.
\?) if [ "$OPTARG" != "?" ] ; then echo "Unknown option \"$OPTARG\"" ; fi
        usage

In general, I would agree and use the h option for help and the u option for usage, but I had already used those for host and user and I liked it that way.
PS.  I'm using bash on Solaris 10.


Hedge ratio with future contract

Question: I want to buy some stocks  and short future contract instead. I wonder whether I can calculate the hedge ratio?
Answer: Assuming that CAPM works, for each stock $s$ in your portfolio, you need to find this stock's "beta" $\beta_{s,I}$ to the index $I$ (such as the S&P 500 if these are U.S. stocks). Assume that an N% index change causes the price of stock $S$ to change by $\beta_{s,I}×$N%. If the value of each stock position is $V_s$, then an N% index change will cause $\sum_s V_s \beta_{s,I}$ change in the stocks in your portfolio. This is exactly the amount of the index that you need to short in order to obtain a portfolio that will not react to index moves, but whose return would come only from the idiosyncratic changes in your stock prices not caused by the index movement (and you hope that you picked stocks that would outperform the index). In order to short index futures, you will need to round to a whole number of contracts.

Hedge ratio with future contract


How to focus or change point on child frame

Question: I am trying to use lsp-ui package to display some documentation for Rust. When I put the cursor on a type for example, a popup child frame is created but the focus is still on the main window. If I use the mouse to click inside the child frame, I can then scroll with the keyboard but I would like to use the keyboard to change focus inside the child frame and NOT the mouse. Is there any way to do this?
Answer: Bind a key (or keys) to run the lsp-ui-doc-focus-frame command:
(use-package lsp-ui
  :bind (("C-h ." . lsp-ui-doc-focus-frame)))


Fatal error: Call to a member function setActive() on a non-object

Question: I am getting the following error on the backend of Magento:
Fatal error: Call to a member function setActive() on a non-object in /var/www/vhosts/pro-pin.ca/httpdocs/app/code/core/Mage/Adminhtml/Controller/Action.php on line 82

I've gone through the community forum, but found out that this was due to the magic slider or lightbox extensions. I haven't had this problem on any other server.
Any help please..
Answer: I removed all the extension and tried but no success, but when i replaced the adminhtml layout files it worked.
The layout files directory was adminhtml/default/default/layout/
Answer: Based on line number I'm primarily running a different version of Magento than you, but if you look at Action.php, you'll see something like this
protected function _setActiveMenu($menuPath)
{
    $this->getLayout()->getBlock('menu')->setActive($menuPath);
    return $this;
}

The call to
$this->getLayout()->getBlock('menu')

is supposed to return a block object, but if your system it isn't.  The most likely culprit here in one of your extensions is removing the block named menu from your layout, or one of your developers fiddled with some layout and/or Core files.
In your development environment remove all your modules.  If the problem goes away, re-enable until it starts again and you'll know which module is causing you a problem.  If the problem doesn't go away, grab a fresh copy of Magento and start diffing files.
Answer: Before deleting you module, try manually clearing the cache files.
go to var/cache and delete all the directories in the folder (if prompted with any denied messages, skip those items). Be patient there may be a few thousand cache files. When finished, try and login again, 9 out of 10 times you will be able to.
Answer: you will need to remove local.xml file and to re-install your store(no data loss -This installs the magento engine without removing your data.
Hope this helps.
Answer: Try:
ini_set('memory_limit', '256M');

in index.php or increase memory to your php.ini.


php with mysql support from the command line on Android

Question: Is there a terminal emulator for Android which allows to use vi and php with mysql support?
PS. Termux unfortunately doesn't allow to connect php to the mysql.
Answer: Late to the party, however, if I install the php package:
pkg install php

then navigate to my directory containing my php files,
cd storage/<php directory>/

I can then prefix commands with 'php'. So, to run a file in my php directory:
php -f php_file.php

There is more information in the 'man' doc - "man php".
I use DroidEdit, which works well; I have not tried using vim, but I see no reason why it would not work, so long as your current directory is the one containing the php files.
As to whether you can configure the application to use Lavarel, I'm sorry, but I do not know.
Comment: what terminal emulator are you talking about? If termux, then there was no mysql support for php supplied by termux.
Comment: I am using Termux; I am also using Mariadb and php, both from the Termux pkg mngr. I also installed Adminer (from its site), which gives a GUI for the database. All wotk, but currently, my Adminer installation has a problem, so I have no connection to the localhost.
Comment: When I was tried php on termux, there was no compiled mysql library for php.
Comment: The closest I've got to MySQL is MariaDB, which you can install from Termux. In conjunction with Adminer https://www.adminer.org/ you will have a working database. There are instructions available for set up of both utilities; I used this: https://youtu.be/AYLy2kWGN_I; set the subtitles to your language. The follow-on video deals with Adminer.
Answer: In order to do this you will need to have su or root on your phone,
Because in the Android OS each app runs under its own user, (not to mention selinux) which is why you need root to change a apps data manually (commonly known as "cracking" or "hacking").
You can easily find php/mysql binaries to install after you get root.
Which should be moved under /system/bin
Comment: I don't want to root my phablet. I'm looking for alternatives such as `termux`. It has a bunch of packages such as php and sqlite. But I need mysql...
Answer: What you want is more than a terminal emulator. The way PHP scripts connect to a database server is entirely outside the control of the terminal. There are a couple of "server pack" apps in the Play Store that include services like MySQL and SSH. I can't recommend a particular one, but if you search for MySQL on Play Store you'll get a lot of results.
Comment: I have such packs. There is no problem in running php server or mysql on android. I want to use Laravel php framework. To use it I need php in command line.