Stripping all but specified debug information from executable

Question: I'm developing a shared library for Linux that spawns some threads I want to label in the debugger.
I've read this can be done by writing to /proc/[PID]/tasks/[TID]/comm, but this isn't working (I'm targeting an older libc). I also want to be able to assign names longer than the comm limit.
My plan was to auto-load a Python script to do this by placing it in the .debug_gdb_scripts section.
However I want to strip debug information besides the script and what it needs.
I've tried using the --keep-symbol option but all of the debug sections (include .debug_gdb_scripts) are still removed.
Is there some way to keep these?
Answer: One idea that comes to mind is to strip your program first, and then add the .debug_gdb_scripts afterwards, using objcopy.
Another way might be to put .debug_gdb_scripts inside the mini debug section.  I think this should work ok, though it is a bit weird -- I think the first approach is more sound.
Yet another option is to just do the standard thing and strip all the debuginfo to a separate debuginfo file, which you would then use when debugging.  However from your question I assume there is some reason you don't want to do this.
Comment: I want to distribute a shared library where users can set breakpoints and print argument information on a few functions but strip symbol/debug info for everything else. It sounds like that may be impossible.
Comment: It's definitely difficult, I think, because you'd want to ship the DWARF for the types and some info for those functions but not for others.


What influence would a race of human gods with a lifespan in the tens of thousands of years and devoted to order have on human society?

Question: This idea came from an old video game called mortal kombat, which introduces a very long lived human race that existed in a realm bordering earth. The one it focuses on is a woman who is ten thousand years old, but is regarded as young by her people. Not much is expanded on their culture, and they seemed to be very "human like" for a people with their lifespan. So i tried to imagine what their society would be like.
Gods are vastly powerful beings that represent the pinnacle of the human race. They have a lifespan of 40,000 years and live in a parallel reality that exists side by side with the mortal realm. These gods adhere to a prime directive that was given to them by the universe, which is their creator. The directive tasks them with protecting humanity from threats originating outside reality. They retain their individualism, and have their own personality and egos. However, this directive is superimposed on them, as it is a part of their nature that they cannot turn against. It is helpful to think of them as sentient, self aware programs, or defense mechanisms of the universe itself. Gods view the universe as a larger cosmic entity that they are apart of rather than existing separately from it. They have emotions and experience their full range, but have evolved a very practical mindset. logical solutions take precedent in making decisions. While the gods "love" humanity, they tend to see them as a unit more than individuals, or as part of a bigger whole. This is due to their partial mindset and outlook on reality.
These gods are constantly at war with otherworldly creatures that exist outside of reality and threaten the mortal realm, such as demons, eldritch abominations, and the like. As such, their culture revolves around social order and cohesion, with everyone working towards a common goal. Males are usually the ones sent off to war and fight since they are more "expendable". Females are left behind to run things and keep the world functioning (making sure the sun rises and sets, seasons change, etc). God's don't breed very often, with a woman''s reproductive cycle taking place every 1000 years. They also don't interact with humanity very often, being busy defending it against enemies and running creation from behind the scenes, and seeing one is a big enough event in a human''s life to be memorable.
Included in the directive are a set of cosmic rules that a god abides by. These rules are meant to protect humans for abuse, but are left somewhat open-ended and flexible to situations.

Gods can't harm mortals, unless it's done for self-defence or the greater good (So they can smite a cult that wants to summon cosmic horrors, but can't destroy settlements because of a slight).
Gods must always act in the best interest of humanity and the material plane (adopting an utilitarian philosophy).
Gods are allowed to directly manifest on the material plane only if absolutely needed.
Granting powers and offering guidance to mortals is allowed, but only if these mortals act for the greater good.

Based on this setup, what influence would this race of God's have over humanity? How would they wield this influence?
Comment: How they interact with humanity is totally up to you. The premise and problems are very similar to [What sort of government might very long lived humans form with normal humans?](https://worldbuilding.stackexchange.com/questions/29154/what-sort-of-government-might-very-long-lived-humans-form-with-normal-humans). This question looks very opinion-based to me.
Answer: I imagine that there would be a necessary detachment, and no little amount sadness involved.
Imagine yourself in that position.  If you allowed yourself to care for something relative to your lifespan, lived a very short time, your heart would break.
I imagine that if a god allowed him or herself to become fond of a human, that god would try to keep a connection by caring about/for that one's descendants for at least a few generations.  Many gods, wanting their compatriots to spare their compatriots pain, would discourage such actions.
Eventually, the gods may write laws forbidding anything but platonic relations with humans, and limit even that.  This could end up causing harm if different gods came into conflict over different humans who's families they may have become involved with.
Think of the Greek myths about the Trojan War, where various gods took sides over loyalties or animosities they had towards the participants, and you'll see the reason for the necessary detachment.
The greek myths in general may prove good source material for this.
good luck
Comment: I can think of a handful of stories that touch on this, the ones most prominent in my memory at the moment is *We Are Legion: We Are Bob* and *Doctor Who.*
Answer: You will find one very well worked answer in the works of JRR Tolkien, and particularly The Lord of the Rings. The Elves live thousands of years. Humans envy the Elves' long lives. The wisest or eldest of the Elves, might wish for human mortality, but mostly cannot.
I know this fantasy world is not a direct parallel to the questioner's one, but I've been more convinced by JRRT's working out of the psychology of the situation, than any other author. Arwen's choice and ultimate fate are particularly haunting.


Should high rep users be allowed to choose an answer to an very old unanswered question?

Question: Should users with high enough reputation be allowed to choose an answer to an very old unanswered question ? Only if one of the answer is obviously correct (left to the good judgment of the user) and if the author hasn't shown up in a real long time (this verification could be easily coded).
Comment: Has been asked in several variations, many times. I'm too lazy to look for the most relevant one right now.
Answer: Upvoting is more than fine. An Accepted Answer should stick to the OP's discretion. They are the one asking the question, and it is their decision upon which is the best. Nobody else can really decide that for them (I am not a fan of the auto-accepted answer on bounty questions either).
Comment: @silence - if it has been more than 3 months since the user logged in, then afaik their account gets deleted, so they will *never* be able to accept the answer :(
Comment: Even if it's been 2 years since the user last logged ?
Comment: @Silence: Lies! The site's only been around for a year! And yes, even then :)
Answer: I don't think so. Up-votes should be adequate.
If anything, perhaps SO should routinely email people to let them know they've got a question over 10 days old with x-answers. They can "remind me later" or "don't remind me."
Comment: Probably 2 days after the question is asked. Then they can also notify the user that they could place a bounty on their question.
Answer: I think they should be able to,  ...
... if they were the one that asked the question.


Does data skew matter in classification problem?

Question: I'm working on an image classification problem using a neural network. In the training data set, 90% of the samples fall into 10% of all categories, while 10% of the sample fall into the other 90% categories. So an example is not evenly distributed among all categories. If we assume this distribution reflects the real-world distribution, do I need to filter my dataset before training so that each category has a similar number of samples?
Comment: [8 Tactics to Combat Imbalanced Classes in Your Machine Learning Dataset](https://machinelearningmastery.com/tactics-to-combat-imbalanced-classes-in-your-machine-learning-dataset/)
Comment: [Likely of interest](https://stats.meta.stackexchange.com/q/6349/247274), especially [one particular link contained within](https://stats.stackexchange.com/q/357466/247274)
Answer: Yes. Skewed data is one of the biggest problems in AI applications. As you rightly identified, the real world distribution is skewed. Doing a random sampling results in one major issue of an uneven sampling (like in your case). Even worse could happen, all of the samples may fall into a single class and other classes may not even be recognized by your classifier. This is called as the class imbalance problem.
There are many ways to mitigate this problem. Few of them have been mentioned here. I'll summarize them for you:

Sampling based mitigation (when you try to deal with skewed data)
Cost function based mitigation (when you try to improve the classifier, in case skewed data cannot be avoided)

Sampling based mitigation can be done by oversampling from the minority class(es), or undersampling from the majority class(es) or using a combination of both.
Another fairer method to do this is by doing a stratified sampling. If class A has 1/6th, class B has 2/6th and class C has 3/6th of the total population, then, you should take 1/6th of the samples by random sampling from objects in class A, 2/6th from class B and 3/6th from class C. This way all of the sample may represent the population in the right proportion, and none of the classes will be missed.
In case this doesn't help (say, you dataset is small and sampling doesn't make sense) and the data is skewed too much), the cost function can be modified to make a more sensible classifier. Keep different costs for misclassification and/or correct classification. Misclassification could be given a higher penalty. This could help in reaching to a better classifier with a skewed data.
Answer: Definitely. NNs can learn the data that you teach to them. If you teach them biased, the network will be biased. As you mention, one solution is to reduce the data that you have. However, it is not the best approach as you will be losing the precious data. I would suggest to try data augmentation for remaining dataset to increase missing data type samples and have similar numbers for best, evenly distributed accuracy.


Can I write files with HTML5/JS?

Question: I wonder if there is any way I can write to files from HTML5/JS? In the broswer ...
Comment: Write file on local or remote?
Comment: @WaiLam, local. I guess if I want it remote, PHP/ASP can do it easily (depending on server config)?
Answer: Assuming your end goal is to let the user save your file somewhere where they will find it, as when right-clicking a link and choosing "Save As...", there isn't wide browser coverage for those APIs yet, likely due to security considerations.
What you can do, however – APIs or not – is cheesing it with a link to a data: uri with a download attribute specifying your suggested filename. For instance:
Save

When clicked, at least in Chrome, this will save a file containing the text mostly harmless (and a trailing newline) as earth.txt in your download directory. To set the file contents from javascript instead, call this function first:
function setSaveFile(contents, file_name, mime_type) {
  var a = document.getElementById('save');
  mime_type = mime_type || 'application/octet-stream'; // text/html, image/png, et c
  if (file_name) a.setAttribute('download', file_name);
  a.href = 'data:'+ mime_type +';base64,'+ btoa(contents || '');
}

Answer: Yes, using the new FileWriter API.
http://www.w3.org/TR/file-writer-api/
You can see the current browser support here: http://caniuse.com/#feat=filesystem
Comment: As I found on [this page](http://www.html5rocks.com/en/tutorials/file/filesystem/), the W3C [discontinued](http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0010.html) the API on 2014-04-24 and noted that "[it should not be referenced or used as a basis for implementation](http://www.w3.org/TR/file-system-api/)". So it seems it is implemented on Chrome only.
Comment: FriendFX is correct. There is no standard way to write to disk from a browser. Even chrome may remove support for it in future. None of the answers here should be used - they will break over time even if they seem to work on a specific browser version.
Comment: on that link there is written that firefox and chrome support the file interface, but they don't support `FileWriter` as far as i can see
Answer: Yes it is possible to read & write files using HTML5+JS.
Link to get you started - Exploring FileSystem API
I also wrote an article a while back for SpeckyBoy on the same topic that you might find useful - http://speckyboy.com/2012/10/30/getting-to-grips-with-the-html5-file-api-2/
Answer: As far as I know, you can't write to files from HTML5, because giving a web page access to the user's files would be a security risk.
If you just need to store some data so your page can access it later, HTML5 does have something called Web Storage which can do that.
Or you could store the data in cookies (if it's very small) or on the server.
Comment: Agreed. Downvotes here are failing to read the above comments that indicate the support for the FileWriter API is deprecated and will likely go away entirely.
Answer: Another possibility is to consider creating something like a ClickOnce app in the Windows platform. This would present a link to a downloadable executable that would run in the user's OS but could make web-based callbacks to send and retrieve data. The ClickOnce app could embed a browser control and thus you would have both a web-compatible application with the ability to talk directly to the user's storage.
Answer: The answer to this question depends on your answers to the following questions:

Are you fine with the fact that support for such a capability currently exists only in Chromium-based browsers (Chrome & Opera)?
Are you fine with utilizing an as-of-now proprietary API to take advantage of such a capbility?
Are you fine with the possibility of removal of said API in the future?
Are you fine with the constriction of files created with said API to a sandbox (a location outside of which the files can produce no effect) on disk?

If you answered "yes" to all of the above, then yes, with the FileWriter and FileSystem APIs, you can write files from the context of a browser tab/window using Javascript.
Here is a simple example of how the APIs are used in tandem to do this:
function onQuotaRequestSuccess(grantedQuota)
{

    function saveFile(directoryEntry)
    {

        function createFileWriter(fileEntry)
        {

            function write(fileWriter)
            {
                var dataBlob = new Blob(["Hello world!"], {type: "text/plain"});
                fileWriter.write(dataBlob);
            }

            fileEntry.createWriter(write);
        }

        directoryEntry.getFile(
            "testFile",
            {create: true, exclusive: true},
            createFileWriter
        );
    }

    requestFileSystem(Window.PERSISTENT, grantedQuota, saveFile);
}

var desiredQuota = 1024 * 1024 * 1024;
var quotaManagementObj = navigator.webkitPersistentStorage;
quotaManagementObj.requestQuota(desiredQuota, onQuotaRequestSuccess);

With BakedGoods*, a Javascript library that establishes a uniform interface that can be used to conduct common storage operations in all native (including FileSystem), and some non-native storage facilities, the above is accomplished with this:
bakedGoods.set({
    data: [{key: "testFile", value: "Hello world!", type: "text/plain"}],
    storageTypes: ["fileSystem"],
    options: {fileSystem:{storageType: Window.PERSISTENT}},
    complete: function(byStorageTypeStoredItemRangeDataObj, byStorageTypeErrorObj){}
});

The FileSystem spec defines no guidelines on how directory structures are to appear on disk. In Chromium-based browsers for example, the sandbox has a virtual file system (a directory structure which does not necessarily exist on disk in the same form that it does when accessed from within the browser), within which the directories and files created with the APIs are placed.
So though you may be able to write files to a system with the APIs, locating the files without the APIs (well, without the FileSystem API) could be a non-trivial affair.
*BakedGoods is maintained by none other than this guy right here :)

Can I write files with HTML5/JS?


Reason for $(0,1)$ tensor as a vector?

Question: Assume, we have a finite-dimensional vector space $V = (R^3,+,-)$ over the field $(R,+,-)$ and the dual space is the set of all the linear maps, $V^* = \{f:R^3 \to R| f \text{ is linear}\}$. We define $(r,s)$ tensor as multilinear map: $V \times ... \times V(\text{r times})\times V^* \times ... \times V^*(\text{s times}) \to R$.   I understand that we can view the dual space, $V^{*}$ as a $(1,0)$ tensor since it maps $R^3 \to R$. But how can we view $(0,1)$ tensor as a vector since a $(0,1)$ tensor will be a map between $V^* \to R$.
Answer: As the vector space $V$ is finite-dimensional, there is an isomorphism $\Phi:V\to V^{**}$, given by
$$[\Phi(v)](f)=f(v)$$
for $v\in V$ and $f\in V^*$.
Comment: thanks for the answer. I am new in this, so it is hard for me to grasp at first time. It would be helpful if you can elaborate the answer.
Answer: One can construct maps $V^*\to R$ by evaluation of each linear functional $f$ in a fixed element $v_0$ of $V$, that is
$$f\mapsto f(v_0),$$
such a map is linear, since for a linear combination $Af+Bg$ in $V^*$
one can see
$$(Af+Bg)(v_0)=Af(v_0)+Bg(v_0),$$
where $A,B\in R$.
Taking different $v_0$'s and if you call them $\Phi_{v_0}$ those maps above, you can see that the set
$\{\Phi_{v_0}\}$ is a vector space under the operations

$\Phi_{v_1}+\Phi_{v_2}=\Phi_{v_1+v_2}$ and
$k\Phi_{v_0}=\Phi_{kv_0}$ for $k\in R$.

A basis for this space is got by considering a basis for $V$: If $\{b_1,..., b_n\}$ is such one then
$$\{\Phi_{b_1},..., \Phi_{b_n}\},$$
will give you a basis for this vector space.
Comment: man, I don't use the letter $\Phi$ alone, but I can tell you that $V^{**}$ is our set $\{\Phi_{v}\}$
Comment: Is $\Phi$ isomorphic with the vector space $V$? Is $\Phi = \{f:V \to V^* \}$?
Comment: the isomorphism $V$ to the set $\{\Phi_{v}\}$ is $$v_0\mapsto\Phi_{v_0}$$
Comment: Is it, $\Phi$ is the set of maps from $V \to V^{**}, $$\Phi = \{f: V \to V^{**}\}$ and this $\Phi$ is isomorphic to $V$. So, we say (0,1) tensor is a vector since $\Phi$ is isomorphic to the vector space $V$.
Comment: glad to be helpful... merci beaucoup!
Answer: I'm a bit surprised by the terminology you're using.
In general, a tensor product of vector spaces $A,B$ is a vector space $A \otimes B$ together with a bilinear map $\Phi \colon A \times B \to A \otimes B$ that satisfies the universal property
$$
\forall \ \text{bilinear } \Psi \colon A \times B \to C \quad \exists ! \ \text{linear } \overline{\Psi} \colon A \otimes B \to C
\qquad \text{such that } \Psi = \overline{\Psi} \circ \Phi.
$$
One can check that such a space exists, and all possible choices are isomorphic. In this sense, we can call $A \otimes B$ the tensor product of $A$ and $B$.
In a similar way, one defines the tensor product of any family $A_i$ of vector spaces by considering multilinear maps.

Let $V$ be now a real vector space. The space of all $(r,s)$-tensors - as you describe it - is the space of all multilinear maps
$$
V \times ... \times V(\text{r times})\times V^* \times ... \times V^*(\text{s times}) \to \mathbb{R}.
$$
According to the definition, this is isomorphic to the space of linear maps
$$
V \otimes ... \otimes V(\text{r times})\otimes V^* \otimes ... \otimes V^*(\text{s times}) \to \mathbb{R},
$$
or in other words, to the dual space
$$
(V \otimes ... \otimes V(\text{r times})\otimes V^* \otimes ... \otimes V^*(\text{s times}))^*,
$$
which in turn is isomorphic to
$$
V^* \otimes ... \otimes V^*(\text{r times})\otimes V^{**} \otimes ... \otimes V^{**}(\text{s times}).
$$
In this context, the space of $(0,1)$-tensors is $V^{**}$, which in the special case of finite dimensional spaces is naturally isomorphic to $V$.
However, if we stick to the definition of tensor product, then we see that the tensor product of $V$ is just $V$ ($1$-linear maps are just linear maps). Your definition actually involves taking the dual space twice, which of course makes no difference as long as $V^{**}=V$.
Comment: I think some physics texts (like Wald's GR) that want to be a little more mathy with their discussion of tensors than "something that transforms like a tensor" define them in this way as multilinear maps on the product so as to give a technically correct definition somewhat in the abstract spirit without having to write down the definition of a tensor product.
Comment: Thanks! I suspected something like this but since I only knew differential geometry books, I've never encountered this definition. Indeed, there is a certain pedagogical payoff here.

Reason for $(0,1)$ tensor as a vector?


PhD scholarship applicability for low GPA in Bsc and good grades in Msc

Question: I have done my Bsc.Eng ( civil and environmental engineering). In first 2 semesters i got good GPA 3.64 and ranked 9th from 250 students and selected to civil and environmental engineering program. But after that i lost my track grades went down. ( Because i involved too many society works and political works during study time ). Final result 2.85 ( out of 4). Then i started my Msc Eng program and got good grades 3.42 ( out of 4) in water and environmental engineering and i have one international publication.my work experience 6 years as a civil engineer and planning Engineer. My question is am i eligible to apply
for full scholarship for Phd program in Australia. ?
Comment: @Buzz Are the answers for Australia (which OP asks about) the same as for the US? Anyway, I think this depends too much on individual factors.
Answer: It is impossible to give an exact answer to your question, because one cannot predict how highly the Admissions at one or another university will rate your MS grades as compared to your BS grades. This may vary from school to school, and may even depend on the opinion of a particular person in the Admissions.
I am afraid, though, that you are approaching the problem from a wrong end.  When applying for a PhD programme, the most reliable way is to contact directly the professors who might be interested in working with you. Don't be shy, because you are not asking for a favour, but have something to offer.  Along with practical experience, you have a published paper -- which will add you points in the eyes of any professor whose research area overlaps with the topic of your publication. (Put yourself in the professor's shoes.)
To conclude: wherever you apply, single out a professor (or professors) from that department, who may be interested in your paper -- and send it to them, along with a short letter adumbrating the overlap of interests and indicating your desire to work under this professor. This strategy will boost your chances.


Unbrick Samsung Galaxy Core Prime SM-G360V

Question: I need to know how to un-softbrick the Samsung Galaxy Core Prime. I don't know how it got bricked, I was just asked to fix it. It looks like a bootloop issue. The Product name is SM-G360V. I have already attempted flashing TWRP on it with Odin3, but it fails saying SECURE CHECK FAIL : recovery and the next line is Custom Binary(recovery) Blocked By R/L. I have no idea how to flash a custom ROM (of which I can't find) without a custom recovery.
Comment: Can't you hard reset it?
Comment: @SarpSTA No, It's in a boot loop, and I cant get in (factory) recovery for some reason. Removed battery, tried the following: Volume down, Power, Home = Download mode. Now, Volume _up_ + Power + Home _should_ equal = recovery, but it won't work.
Answer: Turn it off then hold volume up and down and power and wait until it flashes on then flashes off. Next, let go of those buttons then press them again. This should open the maintenance boot menu, and you can factory reset, boot to safe mode, or normal boot, or debug mode I would either boot to safe mode, or reset it. Cheers.
Comment: Jake, Hard reset won't work. My friend tried to install a custom ROM. Hard reset will just reflash the broken ROM.
Answer: Try to reflash an original rom:

Download the correct rom from sammobile.com
Turn off the device
Press volume down+home+power on for 5 seconds
Press volume up(to enter in download mode)
Connect the phone to the PC
Flash the correct firmware with odin

Doing this I unbricked many Samsung devices.
Answer: Use Samsung Smart Switch to Reset to Stock Firmware (I have done this in the past):

Download Samsung Smart Switch for PC
Run it
Remove battery from phone
The device's information is on a label inside the battery compartment at the back of the device. Copy this information into a notepad.
Put the battery back in
Boot to Download Mode (Vol Down + Home + Power)
Connect to PC
Select Emergency Software Recovery
The application will provide instructions from there
Enjoy an unbricked device :D

NOTE: Remove SD card so it doesn't get wiped. I'm not sure if Smart Switch will wipe it but remove it anyway.
Comment: Next time you flash a custom recovery enable OEM unlocking in Developer Options.


What's the best statistical method for comparing perceived versus measured ecological functioning?

Question: I'm comparing survey results of respondents' perceptions of creek environmental health to environmental health as measured by scientists with the city. What's the best way to analyze the difference?
Comment: They are on different scales... I could standardize them. The values for measured health are taken scientifically for different creeks and consolidated into a final number on a 100 point scale. The values for perceived are from surveys. I can compare the perceived to the measured on a creek specific basis.
Comment: Are the scientists' values surveys also, or are they on a different scale? Is there any way to get a correspondence between some sets of responses (eg, survey responses from people who live near a given stream & scientists' values for the same stream)?
Answer: The question is, what / how can your data be compared or related.
If you had measures on the same variables from respondents and scientists, you could compare them with tests like the t-test.  Since yours are different types of variables (e.g., on different scales), it isn't meaningful to compare them.  That is, you cannot "analyze the difference".
To relate variables, you need to be able to say that a given value in one variable(s) corresponds to a specific value in another variable(s).  For the most part that isn't clear with your situation either.  To the extent you can say that different respondents' perceptions correspond to particular streams, you could average those and get a single (mean) value of perception for that stream.  Then you could use the scientifically measured variables for that stream and fit a multiple regression model.
Note that this is probably a large data loss, though.  You may not have enough information left over for a multiple regression model.  One possibility might be to standardize all the measured variables (and reverse some of them, if necessary, so that better is always in the same direction), run a principal components analysis, and use the first principal component as your measure of scientific stream health.
Your only other option, as far as I can see, is just to describe the data (for example, using means, SDs, etc.).


Why are VAL, MET and ALA substitutions commonly used for protein behaviour and function studies?

Question: I have seen that amino acids are commonly replaced with VAL, MET or ALA to study the effects of these specific substitutions.  Why are these specific amino acids used in particular, what are the results of these substitutions expected to show, could substitutions of other amino acids achieve the same results, and what is the source of this technique?
Comment: It highly depends on what you're trying to look for with your mutation as to which substitute you use.
Answer: Substituting a single amino acid and checking the effect this has on a protein is a method to determine what this specific amino acid does in the protein. For example, substituting an amino acid that is part of the catalytic core would almost always make the protein non-functional.
Alanine scanning is a technique that methodically replaces amino acids in a protein with alanine. Alanine is probably the most neutral substitution, you essentially remove the amino acid sidechain. Glycine for example would be problematic because it is more flexible and can adopt secondary structurs other amino acids can't.
If you want to find out what a specific amino acid does, you don't want to introduce any other new effects when mutating it. Depending on what exactly you're looking at, substituting other amino acids is certainly possible. Some changes to alanine might be too drastic and you might want to substitute an amino acid that is more similar to the original one. This all depends on what exactly you are looking at.


Any issues with using US bought iPhone 11 in the UK?

Question: I currently own an iPhone 5s and I'm thinking of upgrading to the 11. I live in the UK but I'm going to the US during the Christmas holidays and was considering purchasing the phone over there, considering it works out to be about £150 cheaper. However I have concerns over whether there's any issues (anything from minor inconveniences to significant problems) with permanently using the US-bought iPhone 11 in the UK? I read that previous models had slight differences in hardware in different countries and that there were also warranty problems if buying the phone internationally. Are there any differences to be aware of with the iPhone 11 or is it exactly the same across all countries?
Answer: I don't recommend purchasing a US phone to be used in the UK. It's not that it "won't work" per se, but there are models specific to your region.

iPhone 11 Tech Specs US
iPhone 11 Tech Specs UK

At first glance, the Mobile and Wireless specification for the US lists the A2160 and A2161 models of the iPhone where as the UK  version lists the A2215 and A2218 models.  Specifically, there are differences in some of the FDD-LTE bands which could affect things like speed or particular service availability.
The best course of action would be to confirm with your carrier as to what the differences of the US vs. the UK models would be in relation to your services.


How do I get two Eclipse sessions running at the same time?

Question: When I used Windows I could simply click the Eclipse icon and run a session, then click it again to run another. This way I could compare 2 different projects.  With Ubuntu 15.04, is there a way to do this?
Answer: I take it you don't want to use tabs to compare the projects, anyway I'd recommend that if you use Eclipse from the Ubuntu repositories-which are very very outdated-to download an updated version from the official website https://www.eclipse.org/downloads/
For the Mars release there is a helpful Eclipse Installer or just download and extract the package you require.
To start open the file "eclipse" within the extracted folder. Opening this file again gives you another Eclipse instance. You can drag the icon into the Unity toolbar for easy access. Generally running more than one instance is only a problem if the same workspace is being used, because when saving modifications one instance would interfere with the other.   So if you want to compare 2 different projects in 2 instances of Eclipse just have them in different workspaces. You could just quickly copy a workspace into the same directory, call it workspace2 and open the other instance using workspace2.
When playing around until you get the setup you need, a backup of your workspace(s) isn't a bad idea
Answer: It's a duplicate question. Btw, you may do as directed here:
https://stackoverflow.com/questions/118243/open-multiple-eclipse-workspaces-on-the-mac
I did exactly same on Ubuntu 14.04LTS and it worked perfectly. Give it a try.
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/591144)
Comment: I thought not to restate the same thing once again, and my answer may be tagged as duplicate if I do that. Sorry about that. What we have to do for this question is go to eclipse directory and run **./eclipse &**. It worked with me.


AWS organizations and Billing

Question: I was using an AWS account with my credit card info and my personal account. Since I'm learning my way around AWS services I am using free tier as much as I can but I still have some small charges sent to my credit card at the end of the month.
Recently I started a freelance project and they sent me a link and I became a part of the organization. Under My Organization I see the organization with the following note: "Organization features enabled... All features enabled...".
My question is how is billing done and if I spin up an instance not in the free tier who will pay for it and how can I manage and define who is paying for what?
Answer: Go to the Billing Dashboard link in your console
If you can see details of your CC then it's you.
If you see something like this message:

Then it's managed by a different account that you do not even have permissions to see.
Comment: So isn't there a way to separate the billing, so I can continue my old instances and pay them myself and have a different bill for the organization?
Also what will happen if another organization invites me?
Comment: Not in a single AWS account.
You can use only a single mode of payment per bill.
See more details here:
- https://aws.amazon.com/answers/account-management/aws-multi-account-billing-strategy/
However, you can use one billing AWS Account for managing multiple other AWS accounts, see here:
- https://aws.amazon.com/premiumsupport/knowledge-center/pay-aws-bill-multiple-payment-methods/

AWS organizations and Billing


Windows application that compare two similar pictures and find the difference

Question: You know the spot the difference puzzles. Is there a app that can do that automatically?
Comment: Do you just want different *pixels* flagged, or do you want software that lets you define what counts as a difference? What price? What input formats? Any output required, or display-only? Please [edit] your question.
Answer: There is an example of using python to do this visually for you here but to reproduce it:

Done on windows - Yes but could be on any of a number of platforms
Free

The code:
<code>from PIL import Image
from PIL import ImageChops

a = Image.open("pict1.jpg")
b = Image.open("pict2.jpg")
diff = ImageChops.difference (a, b)
RED = ('red')
RL = Image.new('RGB', diff.size, RED) # Make a red layer the same size
RedDiff = ImageChops.multiply(RL, diff)
Result = ImageChops.blend(RedDiff, b, 0.7)
Result.show()
</code>
Example:
Inputs:
Output:


JFrame: get size without borders?

Question: In Java, is it possible to get the Width and Height of the JFrame without the title and other borders?
frame.getWidth() and frame.getHeight()1 seems to return the width including the border.
Thanks.
Answer:

frame.getContentPane().getSize();

Comment: Thanks! frame.pack(); should exist before this command. Otherwise, it is going to return (0; 0).
Answer: frame.pack();
System.out.println("frame width : "+getWidth());
System.out.println("frame height: "+getHeight());
System.out.println("content pane width : "+getContentPane().getWidth());
System.out.println("content pane height: "+getContentPane().getHeight());
System.out.println("width  of left + right  borders: "+(getWidth()-getContentPane ().getWidth()));
System.out.println("height of top  + bottom borders: "+(getHeight()-getContentPane().getHeight()));

Answer: This works fine
frame.getContentPane().getSize();

But not if you haven't added content yet.  In my case, I wanted to calculate the inner dimensions of the JFrame before adding content, so I could divide up the content accordingly.  Here's what I came up with.
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

pack(); // Need this, otherwise insets() show as 0.
int scrW = (int)screenSize.getWidth();
int scrH = (int)screenSize.getHeight();
  int innerW = scrW - getInsets().left - getInsets().right;
  int innerH = scrH - getInsets().top - getInsets().bottom;

  // Need to setSize(), otherwise pack() will collapse the empty JFrame
  setSize(scrW, scrH);

Answer: Here is a code snippet which works on JFrame as well as AWT's Frame (which happens to be the super-type of JFrame):
public static Dimension getInnerSize(Frame frame) {
    Dimension size = frame.getSize();
    Insets insets = frame.getInsets();
    if (insets != null) {
        size.height -= insets.top + insets.bottom;
        size.width -= insets.left + insets.right;
    }
    return size;
}

Beware: The insets are only valid once the frame has been shown.
Here is another code snippet to work around this problem:
private static Insets defaultInsets;
public static Insets getInsetsWithDefault(Frame frame) {
    // insets only correct after pack() and setVisible(true) has been
    // called, so we use some fallback strategies
    Insets insets = frame.getInsets();
    if (insets.top == 0) {
        insets = defaultInsets;
        if (insets == null) {
            insets = new Insets(26, 3, 3, 3);
            // usual values for windows as our last resort
            // but only as long as we never saw any real insets
        }
    } else if (defaultInsets == null) {
        defaultInsets = (Insets) insets.clone();
    }
    return insets;
}

This code needs to be called once with a visible Frame. After that it can correctly predict the insets even for invisible frames (due to caching of the defaultInsets), assuming they are always the same.
Of course this only works if all windows get the same window-decorations. But i am not aware of any case where they might differ from window to window.
This might be useful, too:
frame.addWindowListener(new WindowAdapter() {

    @Override
    public void windowOpened(WindowEvent e) {
        MyUtilClass.getInsetsWithDefault(frame); // init the defaultInsets
    }

});

It will call the getInsetsWithDefault() method once the window is visible and initialize the correct defaultInsets.
Comment: It appears that you do not need to show the frame to get the insets; you just need to pack() the frame.

JFrame: get size without borders?


FFC flatline standard line numbering

Question: Is there a standard way to number lines on a FFC (Flexible Flat Cable)? In other words, if you see the FFC end from the side with exposed contacts, do you usually start counting from the left or from the right?
Comment: Which end is left?
Answer: A common solution for determining cable wire numbering is to look at the connector that it is mating with see if the connector manufacturer has assigned a pin 1 to the connector. That works fine in most cases but can fall flat when beginning to use FFC that is a simple straight end to end cable.
As you can see in the image below if you define pin one at the arrow on one end of the cable then the cable routing demands that pin 1 be at the location of the other red arrow at the opposite end. So for your cable one end from the left and the other end it is from the right!!

(image borrowed from here)
So this becomes a careful job of systems engineering to correctly comprehend the signal routing when FFC cabling is in use.
Comment: Yes, you are right. I completely failed at noticing this. Sorry for the stupid question.
Comment: @giomasce - It is not a stupid question at all. You would be amazed at how many times in this industry that board designers have copied the connector pinning schematic from one board (similar to above) and pasted the exact same pinning into the second board schematic. Without comprehending this correctly they have to re-spin their boards. In some cases they get lucky and have used FFC connectors that support both top and bottom contacts. In such case prototype boards can still be used for testing if you put a 180 degree twist into the FFC cable.

FFC flatline standard line numbering


Are bad reviews of the Sony E 16-50mm f/3.5-5.6 pancake kit zoom reason to avoid the system?

Question: I'm thinking about buying the Sony A6000 over a Micro Four Thirds camera because of the sensor size, but I read in many reviews (such as this) that this is one of the worst lenses around. Now, since a common rule says "Invest in glass, not in the camera".
Since in this case, the glass doesn't seem like a good investment, is the camera worth it?
Comment: You've read the review - only you can say whether the price/performance of the system is right for you.
Comment: A typical "kit lens" is not the best piece of glass anyway. It is there so that you can start using the camera right away. A bare camera body alone takes rather dull photos.
Comment: That's almost like asking if one should avoid the Canon EOS system because the EF 75-300mm f/4-5.6 is such a poor lens. Obviously, it is not the only lens in that system. The bad performance of the 75-300 has no bearing whatsoever on the quality of images possible with, say, a Canon 1D X and the EF 300mm f/2.8 L IS II.
Comment: You read the DPReview review 1st of course, didn't you? Didn't you? !!!
http://www.dpreview.com/reviews/sony-alpha-a6000/13
DPR "Gold" rating.
Answer: You're not buying the camera for the lens, nor planning to use only that lens, are you?
And the review is not that bad:

the lens is actually pretty good in the medium to upper range.

Mainly there seems to be two criticisms:

at the wide end, resolution is not good - but still better than not having it at all; other kit zooms just don't go that wide.
there is significant distortion and aberration that needs to be corrected in firmware or post-processing - when your software supports the lens this is a non-issue, otherwise it probably makes the lens unusable.

But top quality isn't what makes this lens worth having - convenience is. The best lens is the one you have with you, as they say, and the small form factor means that your camera will still fit into your pocket. And the range of focal lenghts it covers is really useful as well.
All in all, for some use cases (such as casual city sightseeing) this is a great lens.
Answer: The Sony A6000 is an interchangeable-lens camera. If you were stuck with a poorly-rated lens, that should indeed be a major factor. But you're not stuck with that. You can either buy the camera in a "kit" including the lens or without the lens for $150 less. It sounds like you might want to skip the kit lens and save the money towards something else from the Sony E system — depending on your budget and preferences, maybe some of the prime lenses, or a better regarded (but larger, heavier, and much pricier) zoom like the Zeiss Vario-Tessar T* E 16-70mm f/4.
The general point stands, though: you are right to also consider the lenses available, not just the features and price/performance of the body. Don't get hung up on the kit lens, though. You may be interested in  How do lens lineups vary across Mirrorless camera systems? for an overview of  differences across all mirrorless interchangeable lens systems, before you make your final decision.
Answer: Most kit lenses don't get glowing reviews.
Where you have to take the "invest in the glass not the camera" philosophy to heart is in the overall lens selection for the mount you're about to buy into.  Digital bodies come and go all the time. They depreciate at the rate of most digital electronics: rapidly.  Glass is much slower to lose value or to become obsolete.
So if the sensor size of Sony NEX is what drew you in, next consider the glass in the E-mount system, and see whether it will cover your needs.  Don't base your judgement on a single kit lens.  The Sony systems are unusual in offering autofocusing Zeiss glass for digital cameras, and the selection's good (if you aren't going full frame with an A7).
Micro four-thirds, on the other hand, has a much wider selection of lenses, helped in no small part by the fact that Panasonic and Olympus together have been adding to the lenses, that the micro four-thirds mount electronic communication is part of a standard that's accessible to anyone who's a member of the four-thirds consortium, and that mft is about two years older than NEX as a system.
Sony E-mount has great glass. But you can't find a native autofocusing fisheye. There's no native 24-70/2.8 equivalent to choose from (vs. mft having two).  There's no fast short telephoto for portraiture (e.g., an 85/1.8), etc.  If you don't need these lenses, then no sweat.  But if you do need them, then you may have to learn to adapt lenses to NEX, go with 3rd-party lenses, decide if you're willing to wait on the lens roadmap, or consider a different system that has the lenses you need.
Generally the choice between mft and NEX is a choice of which is more important to you: the glass or the sensor?
Comment: There is 50/1.8 (75 equiv.) lens for APS-C e-mount and manual-focus  samyang 85/1.4
Comment: An 85mm lens would be a 127.5mm film equivalent on APS-C, so not sure what you mean saying it's a 50/1.8 equiv. In addition, that lens is designed for dSLRs, not mirrorless--it's just had an E-mount slapped on it. It's [huge compared to a NEX camera](http://sonyalphalab.com/product-review/rokinon-85mm-f1-4-aspherical-lens-review/). And it's not only manual-focus, but also manual-aperture and does not communicate with the camera. The only Samyang lens that's actually designed for APS-C mirrorless is the 8mm f/2.8 fisheye (similar to the 7.5mm f/3.5 fisheye for mft).
Answer: The A6000 is impressive camera with very sharp sensor. Surely to use it at best you need better lenses than 16-50. The good news is that these lens exist: the Zeiss/Sony, the old MF lenses (Canon FD 50 1.2 1.4) Zeiss Planar and so on.
The little Sony 1650 is not bad in absolute, I can say that it is very good, considering the cost.
 If you use it with lenshood, with intermediate diaphragm, activated SW corrections in camera, you will have very good results. It's almost impossible have better lens at this price, same dimensions.
Don't forget that it is an OSS lens with electric zoom to do good movies too.
A6000 definitely restarts the pleasure to take pictures, using old MF lenses and modern ones.
Answer: The Sony A6000 corrects about 95% of the lens optical problems and for prints less than 12x18 which is about 98% of what most people make you will probably be happy. If you need critical enlargements get a Sigma 30mm or 60mm lens. Both are optically great and relatively inexpensive. I have the A6000 and the kit lens along with the 60mm Sigma and the Sony 18-105 G lens which I really Like. Visited the Air Force museum in Dayton today and loved the compact size and weight while walking around there for 7 hours with the 16-50 kit lens! Just ordered the Hassleblad 18-200mm lens B&H has for $499. Sometimes I want a little extra reach, but I imagine the kit lens and the G lens will be on the camera about 85% of the time.
Answer: No: I love my NEX 5T. The kit lens, and the additional 16mm f/2.8 I purchased, are both unremarkable, (I really mean, they are terrible,) but I have a lot of fun, and have had some success, using an old Canon 50mm f/1.8 and and old Sigma 28mm f/2.8 with an adapter.  The beauty of the NEX is that with a little practice you can get good results with manual focus--something I have yet to be able to claim with my Nikon D5100.
Yes: If you intend to use the kit lens only, then I would avoid the Sony.  Also, walking around with the NEX body and a manual focus lens will limit you to only shots where you can take your time and focus deliberately.
Answer: Depends what you want to use it for. If you've got a good eye and understand the basics of photography, for general non enthusiast casual photos of family, pets etc, it is perfectly good.
I have had that lens with Nex 6, 7 and A6000, as well as legacy lenses and the Zeiss 16-70, and I can say unless you take landscapes and specialist photos in difficult and low light situations, you will not notice the difference.
Some bad reviews measure the optical performance of the lens, which without sonys digital correction does look pretty horrendous. Most of us need never worry about that though as in camera jpegs and RAWs you develop eg in Lightroom, will all be optically corrected.
So I do not agree that the 16-50 is a bad lens. In fact as kit lenses go it's pretty decent for general photography, esp with an A6000.
Now.... If you don't have a good eye.....that's a different story.


How can one easily learn chess board coordinates?

Question: I am relatively new to chess, and I wonder, what is a fast (and hopefully easy) way to learn chess board coordinates? This is so when I am watching a video where the commentator says, for example, "Knight f6," I know to look quickly at f6, and I don't waste time looking for coordinates on the edge of the board or count it.
Comment: To the great answers I may add my own way of emphasizing within my mental image some of the key squares. For example, d5 to me is a white square for my Queen side knight. I play 1.d4 openings, so it happens a lot that the fight is always around occupying or controlling that square. f7 is the white square next to Black king that is only protected by Black king. White's easiest routes to it are Nf3-e5/g5-xf7 or Bc4-xf7+ So, instead of coordinates only, have some association and some story with each square. Or link certain squares with certain pieces that usually end up there.
Comment: I understand chess notation and I can follow a chess game using the notation on a pgn file on a virtual board. What I CANNOT do is "see" the chessboard in my mind because I have aphantasia. I can tell you what colour a square is and which piece is on that square (if any) at the start of the game. Does "visualizatin" necessarily mean "seeing" the board like Beth Harmon in Queen's Gambit? Or can it also refer to "understanding" the board and what's happening in a position?
Answer: Some websites offer "coordinate drills". I'm not sure how effective they are for learning, but you can certainly give them a try. I found it to be surprisingly entertaining to try to beat my personal record number of coordinates per minute (or whatever the time limit is). Here are the two I know of, but maybe there are others (and maybe there are apps, as well):
https://www.chess.com/vision
https://lichess.org/training/coordinate
Personally I've found that studying openings (and to a certain extent, checkmate patterns) helps learn coordinates because you start associating coordinates with certain moves, which gives each square its own "personality". For example, c4 is not just c4 anymore; it is the square where the bishop goes in the Italian game, or where the pawn goes in the queen's gambit.
Answer: Memorize not just squares, but ranks and files. a: Queen's Rook b: Queen's kNight, c: Queen's Bishop, d: Queen, e: King, f: King's Bishop, g: King's kNight, h: King's Rook. 1: White's back rank, 2: White's pawn rank, 3: White one pawn-move, 4: White's two pawn-move. For each square, you should become familiar what role that square in particular play, but also what role its rank and file plays. For instance, since Black usually castles into g8, f6 the square a knight can attack the king, and where a pawn can attack the middle of the three f7, g7, h7 pawns, etc. It's where a bishop can threaten mate when combined with a queen on the g file, etc. The f file is just off the center on the king side. It's where you're likely supporting you e pawn from, and losing control of it means that attack can come into the g file (where you king usually is). Rank 6 is the last rank before Black's pawns.
Start with the edges of the board: a file, h file, rank 1, rank 8. It should be easy to get a1, a8, h1, and h8 down. Then go for the middle: rank 4, rank 5, d file, e file. Memorize d1, e1, d8, e8, then d4, d5, e4, e5, then move on to a4, a5, h4, h5. Every other square is only one King's move away from one of these 16 squares.
Answer: This is something that you gain through experience.  One good way to obtain that kind of experience would be to buy a large game collection - for example, a modern algebraic edition of the 1953 Zurich tournament book by Bronstein - and play through them.  Not only will the experience accustom you to finding each square, you'll undoubtedly learn something from playing through so many master games.
Answer: I see from your profile that you are familiar with programming concepts. As a programmer myself, familiar with hexadecimal and other number base notations, I have found it easier to convert the alphanumeric chess position to two numbers first before locating the position.
So when you see an a, b, c, d, e, f, h convert it to a number in your head first 1, 2, 3, 4, 5, 6, 7, 8.
Then you look for square [3, 4] or [7, 1] remembering that the column is first, then the row.
So all you need to learn is to quickly convert the following:
a=1
b=2
c=3
d=4
e=5
f=6
g=7
h=8

So when you see a position like c3, immediately say [3, 3] in your head before looking for it.
Bear in mind that just like a map of the earth turned upside down where you could still easily point to let's say India, a square like f6 would always be closer to black on the left.
So thinking about squares like this, f6 is a name just like India - is quicker than trying to count alphabet letters from right to left. But like everyone else said - it takes practice before it becomes natural.
Answer: This might disappoint you but the only thing you can do in the beginning when learning coordinates is to count, since you will lack the intuition necessary to identify coordinates immediately. As you gain chess experience the intuition necessary to quickly determine the coordinates of a square will be built up to the point where you know exactly where (for instance) f6 is on the chessboard without having to think about it.
But in the beginning (as with anything else) you will have to spend some mental effort to locate squares on the chessboard by their coordinates. To make the learning process quicker you could try to incorporate identifying the coordinates of squares while playing (for instance by keeping a scoresheet of the games you play) but other than that there isn't really a quick method to just learn this without effort.
Answer: Playing blindfold chess might also help with coordinates a lot, once we have a visual sense of where the squares should be, and how they are related spatially in the mind, we can get really comfortable using the chess algebraic notations.
If you just want to learn notation, its a-h horizontally, and 1-8 vertically on the 8x8 board.
Answer: While specialized training may be useful, you also need to be in a situation where that training can be used.
I'm mainly interested in chess compositions, and had much the same problem following solutions, or setting up problems from notation (i.e. not from diagrams, but from textual description such as "White: K at KR3, Q at KB2, ..." and so on. Descriptive or algebraic notation.)
I found that while I could get the file right pretty easily, the rank required counting.  But after a while, it became obvious that ranks 6, 7 and 8 were easier to count backwards than forwards, (i.e. as 0, 1, 2 from the back rank) and doing that adjustment mentally was quite easy.  Getting ranks 4 and 5 right was a bit more of a problem, and I mixed them up for the longest time.  But persistence pays off. I think it took me about a year of more or less daily use to make errors reasonably rare. (Now I mix up black and white coordinates in descriptive notation instead ...)
But that's me. I suspect it's fairly individual -- I started more or less from zero.
Answer: I feel you. I always struggled with the notation, and never bothered with memorization exercises or drills. There are a lot of great answers here.
But I learned by watching a lot of chess content, like Agadmator, Daniel Naroditsky, Levy Rozman (Gothamchess), Eric Rosen, ChessNetwork, etc. They nearly always state the moves out loud in algebraic notation as they are being played, but also attribute 'character' to certain impressive squares or moves. You may recognize these phrases.

"Never play f3/f6" (Ben Finegold)
"I saw Rook a4, I just didn't like it" (Gothamchess)
"c4 is explosive"
"Knife (knight) on f5 is worth at least a pawn" (Gary Kasparov?)
"Always play b4. The person who uses the b4 square the best wins the game" (Agadmator)
"play h6 or g6 for luft(air) so you don't get back rank checkmated (when you are castled on the kingside)"
"Dragon bishop on g7 in the Sicilian Dragon"
"King knight's natural post on f3 or f6" (ChessNetwork)
"King b1, always a useful prophylaxis when castled queenside to get off the c file" (Agadmator and others)
"The b2 pawn is poisoned"

There are also exceptional moves/squares that can stick with you.

Ba3!! (Botvinnik-Capablanca, AVRO 1938)
Bxc3! (Wojtaszek-Caruana, Tata Steel 2021) While analyzing this game, Daniel Naroditsky said something along the lines of: "If you play a move like this, you would have gotten your hands chopped off in Russia!"

If you consume a large amount of chess content, you might find yourself naturally able to associate squares with certain moves or ideas, all without doing a coordinate training drill.
Answer: Chess coordinates aren't that hard. Basically, every square has a coordinate which is like a name. For example a1 or b5. The coordinate consists of a letter and a number.
Chess.com offers coordinate practice at chess.com/vision.
Lichess.org also offers coordinate practice at lichess.org/training/coordinate
But you can also learn coordinates on your own. If you want to see coordinates in play, you can see the coordinates of your and your opponents moves on the left side of the screen when playing a game.


Iterating through tooltips

Question: Guys, I have a windows form with a panel control and inside the panel control are several other controls with a System.Windows.Forms.Tooltip attached to them. How can I iterate through each tooltip and set the Active property of the tooltip to false? Tooltips, unlike other controls, are not actually controls. So I had this:
foreach (System.Windows.Forms.Control ctrl in this.pnlControl.Controls)
{
    if (ctrl.Name.StartsWith("tt")) // since all my tooltip names start with 'tt'
    {
        System.Windows.Forms.ToolTip TipControl=(System.Windows.Forms.ToolTip)ctrl;

        TipControl.Active=false;
    }
}

This does not work though. It gets an error because the ToolTip control is not inherited from System.Windows.Forms.Control. Any ideas?
EDIT:
Okay Guys. I probably didn't go into enough detail to get the answer I needed. My problem is, I'm taking all the controls in my panel and moving them to a different panel. Once they are switched over, the tooltips are still attached to the controls, which is what I want. However I have no way to deactive or reactivate them once I move them since the form and the original panel no longer exist. However, I found a solution which I will post here.
Answer: How to add tool tips for two buttons? The correct way is NOT creating two instances of ToolTip in this way:
 ToolTip tt1 = new ToolTip();   //or you can create one in the designer
 tt1.ToolTipTitle = "test";
 tt1.SetToolTip(button1, "caption1");
 ToolTip tt2 = new ToolTip();
 tt2.ToolTipTitle = "test2";
 tt2.SetToolTip(button2, "caption2");

Remember that a ToolTip instance and a control are not one-on-one related. The right way for this example is:
ToolTip tt1 = new ToolTip();   //or you can create one in the designer
tt1.ToolTipTitle = "test";
tt1.SetToolTip(button1, "caption1");
tt1.SetToolTip(button2, "caption2");

To remove the tooltip of button2, use:
tt1.SetToolTip(button2,string.Empty);

For your case,we can use
foreach(Control c in this.Controls)
{
   tt.SetToolTip(c,string.Empty);
}

Comment: tt.Active will effect other controls which the ToolTip instance is set to.
Answer: Edit: OK, scrap my previous answer. Yes, ToolTip is a Component, not a Control, so it's not actually in the Panel at all. From your question, it sounds like you have one ToolTip instance and you use it for controls inside this Panel as well as for other controls, right? In that case the solution is simple: create a separate ToolTip instance and use that one for controls in the Panel, then just refer to it directly to deactivate it, eg.
ttPanel.Active = false;

Comment: Problem is, its not. a tooltip is not considered a control apparently
Comment: How do you normally access them or create them? I haven't done WinForms for some time now, so can't remember exactly how tooltips work.
Answer: Typically, you have a single ToolTip instance that handles the displaying of tool tips for all of your controls.  That single ToolTip instance is just a regular member of your form.  Simply set it's Active property to false.
Answer: Okay what I did was create a new class that is inherited from Control, like so:
public class TooltipMaster : System.Windows.Forms.Control
{
    private System.Windows.Forms.ToolTip m_tooltip1;
    private System.Windows.Forms.ToolTip m_tooltip2;
    private System.Windows.Forms.ToolTip m_tooltip3;
    private System.Windows.Forms.ToolTip m_tooltip4;

    public System.Windows.Forms.ToolTip ToolTip1 {
        get { return m_tooltip1; }
        set { m_tooltip1 = value; }
    }
    public System.Windows.Forms.ToolTip ToolTip2 {
        get { return m_tooltip2; }
        set { m_tooltip2 = value; }
    }
    public System.Windows.Forms.ToolTip ToolTip3 {
        get { return m_tooltip3; }
        set { m_tooltip3 = value; }
    }
    public System.Windows.Forms.ToolTip ToolTip4 {
        get { return m_tooltip4; }
        set { m_tooltip4 = value; }
    }
}

Then what I did was create an instance of this class inside my main form's Load event. Then I just assigned each of my 4 tooltips to the 4 tooltips in this class. Finally, I added this control to my panel. After doing all that, I could access the tooltips later by iterating through each control and looking for the TooltipMaster control.
Hope this makes sense!

Iterating through tooltips


Choosing module SIM for pushing data form car-mounted microcontroller to remote server

Question: Assume that I have a box attached into a car and its function is receiving sensors data (GPS, temperature, speed) and push these data onto a remote sever through 2G/3G. Because I need this system be real time, so I need a module SIM to continuously transfer data to remote server. So my criteria for the module Sim is it must be stable, fast enough to push sensors data to sever (maybe twice in a minute).
Can you suggest me some modules Sim can handle well this situation ?
Comment: [Unless your definition of real time is >300ms](https://hpbn.co/mobile-networks/), probably not happening. Beyond that, it's not up to the SIM, but up to the networking equipment on your and the towers' end. Why do you need to push this data over cellular?
Comment: I have researched about other solutions such as LPWAN (lora) but my country still haven't supported it.
About wifi, my city doesnt have whole wifi coverage, too. Just few points.
So I decide to use 2G/3G technology to transfer data.
Comment: My suggestion would just be to research who had the best coverage in your area.
Answer: TL;DR: It doesn't matter, pick a carrier with the best service in your area and get the appropriate SIM.
To understand why it doesn't matter, let's understand what a SIM is.

A subscriber identity module or subscriber identification module (SIM) is an integrated circuit that is intended to securely store the international mobile subscriber identity (IMSI) number and its related key, which are used to identify and authenticate subscribers on mobile telephony devices (such as mobile phones and computers).

The SIM is only being queried occasionally to check your identity on the network. Think of it as your ID when you go to a club: it only gets checked to verify your identity; it has no role in what you do in the club besides that.
All the actual transmission is up to the hardware in your phone and in the cell tower. Since you have no control over the cell towers, all you can do is choose a phone with good hardware and a network with good coverage in your area.
Comment: I mean what module Sim not only Sim. As far as I know, on the market, there are some module Sim support 2G such as module Sim800, Sim900, arduino Shield GSM...
Comment: I see. In that case, we'll need to know more about your intended setup: what existing hardware are you trying to use? How much data are you pushing? Power constraints? Budget?
Comment: Thank for your advice. I will consider them in choosing the best option.


Screenshot utility does not work

Question: When im trying to make a screenshot with the standard screenshot utility on elementary OS (Version: 0.2.1 "Luna" ( 32-bit )) the window flashes and the picture saved is just my desktop background (or the area I grabbed) and not the window I wanted to screenshot. I already tried rebooting etc. Any ideas?
Answer: This community is the wrong place for reporting issues, sorry. If you want to report an issue with the developers, you can do that as described in How can I report an issue with elementary OS to the developers?
Unfortunately, elementary OS Luna is not actively developed anymore. While the operating system is still secure (as the Ubuntu base still delivers security updates), there are very few elementary OS developers still working on delivering bug fixes and updates for elementary OS software on Luna. Therefore, reporting this issue will most likely not result in any fix.

Screenshot utility does not work


Right bottom corner textbox in desktop; what's it for?

Question: A text box appears on the right bottom corner when typing on the desktop.
What is the box used for and what's it called?
Answer: You mean this?

A similar text box appears in the bottom right-hand corner of a Nautilus window if you start typing in it. There it allows you to select files and folders by typing out the first part of their names. Since Nautilus handles files on your desktop, I'd imagine it does the same thing there.
Comment: Yes exactly! but if I type example: home or gedit or firefox and then I press enter it doesn't do anything. any suggestions or is there a way to type in it like with some code?
Comment: @st2011 Essentially, it's just a shortcut for quickly finding files or folders in your current directory (in this case, your `~/Desktop` folder). Try dropping some files on your desktop then typing their names; you'll see it can select them for you once you type enough characters for it to know exactly which file you're trying to find.
Comment: @Warriorlng64 Thanks Got it. I didn't have anything on the desktop thats why it wasn't working. But for other windows I had to select it, then type and it works. Thanks for the reply.
Answer: The desktop is managed by the file browser called Nautilus, which allows you to type in the window to quickly find a file. When you do this, a little box pops up with what you have typed. The same thing is happening on the desktop.
Hope that helped?
edit: Looks like WarriorIng64 beat me to it, so in that case I'll just add that I think this may be a bug - it never used to happen, and personally I think it just looks messy. Perhaps it was left there by accident.
Comment: Thank you for your reply. Now I know what it is and how it works.
Comment: @Farran I'm not so sure if it *is* a bug. On one hand, for some users who simply dump everything onto their desktop to go through later, this could be a handy tool for picking the right file quickly out of a cluttered mess.
Comment: @WarriorIng64 ah yes okay, that's quite a good point. This functionality has always been there though - the box just didn't pop up.
Maybe this could be somewhere for a lens - an automatic (desktop?) search when you start typing, with focus on the desktop?
Answer: In case anyone is looking for how to turn this off, I found the answer here:
How to stop nautilus managing desktop in unity
Basically, install gnome-tweak-tool and turn off "Icons on Desktop" (For later versions such as Ubuntu Xenial, which is what I used it on; the setting has a different name in older versions).


The difference of subdivision surface modifier between 2.7x & 2.80?

Question:
This is a plane with 1 level subdivision surface modifier, it seems that version 2.80 using a new method to subdivide and smooth the mesh. This is almostly different from the version 2.7x and other 3D softwares. Why the developers make this change? Is there any advantages of the new method?
Answer: Yes, 2.8 now uses Pixars OpenSubdiv. So there is a change on how they are computed and behave.
[EDIT]
I actually can't see why there should be a difference here from maya for instance. You may want to discuss this on devtalk.blender.org.


Where could I sell micro BTC and is it possible?

Question: I would like to know if is it ok to sell micro BTC? Like a few decimal places like 0.01 BTC? And where would I sell it to exchange for other currencies? And how do I get the exchange safely?
Answer: The smallest part of a bitcoin is (currently) called 1 satoshi, and it is equal to 0.00000001 BTC. So selling 0.01 BTC is no problem on any exchange, you only have to take into account the fees which are asked by the exchange. If it's a percentage (as it usually is) you're fine.
If you want to sell you can use big sites like bitstamp, coinbase etc.
To trade for other cryptocurrencies you can use btc-e, kraken, cryptsy, ...
Comment: Indeed, 1 million satoshis. Bitstamp.net charges 0.5%, other exchanges do something similar. If you are US-based you'd be better of with a US site, such as coinbase.
Comment: OK, so my 0.01 is actually equal to 1 million satoshis?
Percentage fees? is it a lot?
And I'd like to sell them for USD for example, and not other cryptocurrencies.
Answer: If all you want to do is trade for altcoins, I've found that Crypsy is pretty good.


How do I force YouTube to always use the arrow keys for playback seeking?

Question: If I changed the volume before using the arrow keys, the arrow keys will change the volume instead of seek playback (skip back and forth 5 seconds). How do I remove this behaviour and make it so it always seeks playback? I am aware of the j and l hotkeys for 10 second seek but I want to use the arrow keys.
Answer:
Click on the video at least once to start with (so the up and down keys don't scroll the page)
Use the up and down keys to adjust volume.
Use the left and right keys to seek.
Answer: If you're in full screen, just click the top or bottom of your screen and it won't pause the video and does the job too.


Paging the list of comments, and getting the comment count

Question: I am getting all the comments listed in the same page. How can I do the paging concept for comments?
How do I get the comment count?
Comment: Why are you listing comments in a page? Can [Comments In a View](http://drupal.org/project/comments_in_a_view) help you to use the power of views to paginate, filter, sort comments?
Answer: Paging on comments is provided in Drupal Core without any contribute modules.
If you go to your content type configuration screen:

D6 Path: admin/content/node-type/[node-type-name]
D7 Path: admin/structure/types/manage/[node-type-name]

You will see there's a Comment field-set/tab(d7) with some options. The option you want to check out is the comments per page setting. Select the number you'll like for when a page should break and save your settings. Once you're comment have pass that threshold you will see a pager for your comments.
Now for the comment counts there a variable available to you in both Drupal 6 and 7 in the node template. The name of that variable is $comment_count.
Comment: Thank you very much eric... Got exactly what i need.... :-) +1 for d6 and d7


Substracting attributes of different layers

Question: Can I subtract two attributes belonging  to two different layers? In this case these would be two polygons holding DEPTH attribute (Depth1 - Depth2).

Is this possible and if so how?
Comment: You could `join attributes by location` and then perform the substraction on the joined layer. Or you could create a virtual layer.
Comment: How are the polygons related, do they share some common attribute, do they overlap?
Answer: Another possibility is to use a virtual layer. Let's suppose you have two layers polygon_1 and polygon_2 with fields and values as follows:

Go to Menu Layer / Create layer / New Virtual Layer… and paste this query:
SELECT p1.fid, depth_1-depth_2 as difference, p1.geometry
FROM polygon_1 as p1, polygon_2 as p2
where p1.fid = p2.fid

The features are connected with their common fid. You not not state how the features should be connected, so I guess you have a common identifier in your data. However, you can adapt this to your needs. The attributes table of the new virtual layer looks like this, containing a newly calculated column for the difference depth_1 - depth_2:
Answer: One possibility is to use QGIS expressions. If you are in the attribute table of a layer, open the field calculator and paste the following expression (adapting it to the names of your layers/fields) to get a value from an attribute field of another layer:
attribute (
    get_feature_by_id (
        'Polygon_2',
        $id
    ),
    'depth_2'
)

Let's suppose you have two layers:

Polygon_1 with attribute depth_1 (on this layer, you open the field calculator)
Polygon_2  with attribute depth_2 (this is the value you want to get in the other layer)

You can get the value from one layer to the other one if they have a common field that they can be connected with - here: the same id. Of course, it works also with other conditions. But since in your question you have not stated how the features of the two layers should be related, I suppose for demonstration purpose that they are connected by a commond id. If not, change the expression accordingly.
With the expression above, for each feature on Polygon_1, you get the according value (of the feature with the same id) from Polygon_2, namely value of field depth_2. You can use this to copy values from Polygon_2 to Polygon_1. If you add "depth_1" - before the above expression, you get the difference depth_1  - depth_2 (what you want), see the screenshot:


Examples of rational equivalence.

Question: I have to do a lesson (1 h.) about a very basic introduction to intersection theory. In order to do this I'd like to find a way in order to examplain the concept of rational equivalence giving a lot of examples. Could you suggest me examples of interesting rational equivalences?
Answer: The simplest example of rational equivalence is the linear equivalence of divisors. This is already quite a rich situation. Perhaps you'd want to talk about that a bit. Then, perhaps you could talk about equivalence of correspondences on curves.
However, the interesting thing is usually not to show that two cycles are linearly equivalent, but to show that they are not!

Examples of rational equivalence.


Advanced SQL SERVER 2008 videos

Question: Where do I find advanced SQL SERVER 2008 videos?
Answer: There's a few SS2k8 videos here, otherwise a google search will probably turn up what you are looking for, if it's available.
Answer: A couple places come to mind:
1)  PASS (Professional Organization for SQL Server) has a yearly conference with the best content you can get on SQL Server.  You have to register (for free), but you can watch old recorded sessions there.
http://www.sqlpass.org/LearningCenter/SummitOnDemand.aspx
2)  Microsoft does free SQL 08 webcasts from some of the best SQL trainers (like Kim Tripp).  You need a Windows Live account:
http://www.microsoft.com/events/series/technetsqlserver2008.aspx?tab=webcasts&id=42572
Those are 2 places I would go for webcasts.

Advanced SQL SERVER 2008 videos


Nouns to adjectives: "-ous" vs. "-ful"

Question: When turning nouns to adjectives, what is the rule for using the suffixes -ous or -ful?
Why do pain/harm became painful/harmful and not painous or harmous?
Why do glory/nerve become glorious/nervous and gloryful/nerveful?
Comment: Some words *(beauteous, piteous, wondrous)* can accept either suffix, but I suspect ***-ful*** is currently more "productive". Certainly those I've listed are on the "endangered species" list when pitted against *beautiful, pitiful, wonderful*.
Answer: There are a variety of small differences, but I can't think of any simple ones.
The suffix -ful comes from English's native inherited Germanic vocabulary ("Germanic" here refers to a group of languages; English is not descended from the modern language called "German"), and the suffix -ous comes from Latin through French. There are a lot of words that got established with these affixes before these two sets of vocabulary mixed. For example: glorious can be traced back to Latin gloriosus; Latin did not have the -ful suffix. The adjective glorious entered the English language as an entire word around the same time as the noun glory; it was not created from the English word glory + the English suffix -ous (even though it can be analyzed that way if we ignore the history and look at it in an abstract, timeless sense). The significance of this is that when we already have a derived word for something, we're less likely to coin a new, synonymous derived word. This is called blocking. In this case, it is not absolute, but it still has had an effect.
However, there are also many words that were coined in English after these two suffixes became productive, and in these we quite happily blend Germanic root-words and French/Latin suffixes, or vice versa. Some mixed words are painful, delightful, righteous, thunderous. So in many cases, origin is not useful for determining which suffix to use, even if you can figure out the origin of the root word. I think you'll just have to memorize it; sorry I can't offer better advice!
Answer: A suffix can 'cast' a word from one syntax to another.  Each has a different use (v->n, v->adj, n->adj, ...) and some add a nuance, although there are redundancies. For casting a noun to an adj, you could add 'ful', 'al', 'ic', 'y', or even 'ical'.  It is a quirk of etymology as to which is right.

Nouns to adjectives: "-ous" vs. "-ful"


What is a good clock implementation for a multiplayer game?

Question: In cases where players need to send out their times for game state sync, can everyone send out their default timestamp implementation or should something like NTP be used? http://en.wikipedia.org/wiki/Network_Time_Protocol
Comment: Depends. How exact does the time need to be?
Comment: For an FPS, as an example, I assume to within a few ms would be good.
Answer: Try Event Driven (No timer needed except for scheduled events):
Client side. when client moves or does something. It sents request to server to update itself what's happening.
Server Side. Server updates client if any changes occur on his chat room or when something happens on map where players Range of sight needs to be affected, etc.
If you still insist on timer. Use a singular server time. Players just sync server time for it's own when game starts. Then runs it's own timer. It then syncs only when it communicates again to the server when it needs to.
If your game is not server dependent (or not at network at all), example chess with one of the player (or stand alone player) Use your system time as basis for your timer.


What encryption algorithm does CryptEncrypt in Crypto API use?

Question: I am writing a code to perform encryption and decryption using CryptEncrypt and CryptDecrypt functions, a part of Windows' Crypto API. Can anyone tell me what kind of encryption these two function use? Is it using AES or DES or 3DES or others?
Comment: http://lmgtfy.com/?q=data+protection+API+security&l=1
Comment: @Stephane Thanks for comment. But the provided link link doesn't says about type of encryption used in CryptEncrypt function uses.
Answer: MSDN Data Encryption and Decryption Functions
You choose what algorithm to use.
You have to use CryptAcquireContext to get a handle to the Crypto Service Provider.  Then call CryptGenKey to generate an encryption key object.  This function is where you define the algorithm you want to use.  You need to also call CryptCreateHash to create a handle to a hash object.  Then you call CryptEncrypt with the key object and hash object you just generated.
BOOL WINAPI CryptGenKey(
  _In_   HCRYPTPROV hProv,
  _In_   ALG_ID Algid,
  _In_   DWORD dwFlags,
  _Out_  HCRYPTKEY *phKey
);

Possible ALG_IDs
Most encryption implementations require you to call a final function to finish the encryption.  This will take into account any padding that needs to be added, and probably some other algorithmic cleanup.  Generally what this means is the last block of encrypted data is not output to the buffer until this final function is called.  For example, in OpenSSL (when using the EVP functions) you have EVP_EncryptInit, EVP_EncryptUpdate, and EVP_EncryptFinal.
Microsoft's implementation of CryptEncrypt provides a boolean final argument.  When you're encrypting your last section of data you need to set this value to TRUE.  If you're only encrypting a single block size (or less) of data then you need to set this value to TRUE.  The remarks section of CryptEncrypt explains what they perform when its set to true.

If the key is a block cipher key, the data is padded to a multiple of the block size of the cipher. If the data length equals the block
  size of the cipher, one additional block of padding is appended to the
  data. To find the block size of a cipher, use CryptGetKeyParam to get
  the KP_BLOCKLEN value of the key.
If the cipher is operating in a chaining mode, the next CryptEncrypt operation resets the cipher's feedback register to the
  KP_IV value of the key.
If the cipher is a stream cipher, the next CryptEncrypt resets the cipher to its initial state.

CryptDecrypt provides the same boolean final variable, and the same operation needs to take place when decrypting the data.
Comment: as per your suggestion i developed code. I used CALG_AES_128 as second argument to have AES-128 encryption. As a output of AES encryption, the ciphertext length will be multiple of 16. But here length of the cipher text,  output of CryptEncrypt() function, is equal to the input data length. So think it's not performing AES-128 encryption. I'm able decrypt the cipher text but still confused about type of encryption being used here.
Comment: i developed code for AES encryption, and now imm getting error like: more data available in CryptEncrypt function call. Can you tell me what is it?
Comment: Updated my answer.


Why does it take 2-3 years to build the third IDA?

Question: I am wondering why it takes  two to three years to build this tiny little
international docking adapter IDA 3? Every year 4-6 Soyouz spaceships are built.
Comment: I would imagine it's money-limited.
Answer: The IDA was never meant for mass production: they needed just 2 for the ISS, and they knew long beforehand when they needed them. So they knew they could spend 2 years building them without impacting the schedule.  They built the things by hand, took their time testing them etc. This is labor-intensive, and labor costs money.
To reduce the build time, you have to spend money too: build tools and jigs, design factory processes (e.g. an assembly line), design the IDA for manufacturability, etc.
So you have to decide: spend money on labor, or spend money on R&D so you can make the module cheaply? This decision depends on how many modules you need. In this case, only 2. That's an easy decision to make.
Of course, then the launch of IDA 1 went wrong, and the 2-year production time bit them in the ass.
By the way, the fact the Russians can produce 6 Soyuz per year doesn't say anything about how long it takes to build one Soyuz: it could still take 2 years to build one spaceship, if they build 12 of them in parallel to get the production rate they need.
Comment: It is a common saying in programming that nine women can't make a baby in a month - but they can make nine babies in nine months.
Comment: @JanDvorak - The first part of that saying is from the *Mythical Man-Month*  by Fred Brooks. Closely related is another saying in programming, also from the Mythical Man-Month: "Adding manpower to a late software project makes it later." Both sayings have applicability that extend far beyond programming.
Comment: Don't they need the same docking adapter on the spacecrafts which dock with the ISS too? Some of which will not be reusable. One IDA seems like have the only phone in the world, don't stay up waiting for a call.
Comment: The spacecraft needs a compatible docking ring, yes. But the IDA contains 2 docking rings: an APAS port on one end to connect to the PMAs, and an IDSS port for visiting spacecraft. The APAS port and the module itself (hul, etc.) are unique to the IDA. Only the IDSS port could benefit from series production.


Will a Dutch oven be a good investment in a motor home with a butane gas burner?

Question: I live in a Motorhome and only have a butane gas burner. Cooking over a butane gas burner is all I have and is limiting using just a pan for recipes. Does anyone have experience investing in and using a Dutch oven on this type of little butane gas stove? Any suggestions on recommend cookware is welcomed.
Answer: I don't think that it is a good investment. Without a real oven, you won't be able to bake or roast in the Dutch oven. Unlike historic applications, where the Dutch oven was buried in embers and could warm the food inside from all directions, a Dutch oven on a gas burner functions pretty much like a thick-walled pot.
Using it will let you make stews, soups, and some sauces. If you want to make sweet things, you will able to make cremes and syrups in it, but without an oven, you are limited to only combining these with fried dough and griddle/flatpan items like crepes. Many classic types of pastry require baking in an oven. And for both sweet and savory, there is not that much difference between a Dutch oven and a normal pot. It will give you a more even heating, but it will respond sluggishly to temperature changes in the burner. An advanced cook can use this property well, but if you are limited to a very small selection of cookware, there is no need to get both a pot and a Dutch oven, and out of the two, the pot is cheaper and easier to handle. So, my recommendation: get a pot instead.
If you want to cook more and your budget allows it, consider buying a toaster oven with a 30x30cm cavity. These take up very little space, and are cheap (mine was 50 Eur). They are good for baking practically everything - pizza, cakes, roasts, etc. I have never had a regular oven since I left my parents' home 11 years ago, and have made some pretty advanced stuff in the toaster oven. It is definitely a good investment.
Comment: Hmm...My initial reaction was to poo-poo, even downvote this answer. Then I read it. That should be worth two upvotes.
Comment: I'm more often than not, living off the grid, so would you recommend a thick base pot made from copper or something else oh with a lid and even heat distribution
Comment: @Michelle - Ah! Then what you need is a portable propane oven designed for camping: http://www.campchef.com/stoves/portable-ovens.html
Answer: If you have access to electricity, an inexpensive slow cooker from any discount retailer would be more economical than heating a cast-iron pot with butane, and can easily handle the stews and braises typically associated with the dutch oven. I'd save the butane stove for a small skillet... the local restaurant supply store will have inexpensive models of excellent quality... and use that to sauté and sear the ingredients as required before putting them in the slow cooker.
Answer: Maybe.
It is possible to bake on the stovetop, if that's what you're looking for.  A cast iron dutch oven, which will take a while to heat up and cool down, will likely be pretty helpful in this kind of baking - with the caveat that you would treat it like an actual oven not a pot, and you would be setting your food in a smaller pan or tin, on top of a rack or trivet (very important, so the heat is indirect), inside the preheated dutch oven - so the direct heat doesn't burn the bottom of your food.  Ovens are usually directionally heated anyway, with the food suspended in the middle so it cooks by radiated heat and doesn't burn from direct contact.
You might also want to look at indirect heat or residual heat baking methods, where you preheat your oven, or dutch oven in this case, and when it is hot, turn it off before adding the food (small, individual items; something flat and quick-cooking [like pizza]; or a one person serving of something precooked), and let the residual heat warm up your food - I've used the technique in the oven with a baking stone, but once the heat is off I don't imagine it will be much different from a preheated heavy dutch oven, with the heat off.
And finally, you might have some luck with recipes for campfire baking or other dutch oven recipes - rumstcho is correct that you can't do the kind of campfire cooking that requires surrounding the pot with embers, but there should be plenty of recipes for people that rely on portable gas burners and dutch ovens (I found this post on baking with a dutch oven on a gas burner, with emphasis on upside down cakes, cobblers, and other wet on the bottom foods).
You might consider, alternatively, looking into tagines (with something solid to use as a diffuser, since it looks like you're cooking on a flame).  It will let you do slow cooking, you can roast (generally roasting chunks, not whole ingredients, but the possibility is there), you can make stews, you can bake in it, maybe not full loaves of bread but at least flatter or smaller things like foccacia or stuffed breads, pastries, things like that.  I've had success with focaccia and stuffed breads up to an inch thick, which will give a nice texture more like loaf bread than flat-breads or fry-breads, and can be split for sandwiches.  I will say that tagines are supposed to heat and cool slowly, and so it takes a while to cook in one - that suits me just fine, I can have something cooking in mine while I read, or do other things, and only need to check it occasionally - but you will want a regular pot and pan for when you're looking for quick food.
Answer: Perhaps the "Wonder Pot" is what you're looking for.  I have no personal experience, but it is described on Wikipedia:
https://en.m.wikipedia.org/wiki/Wonder_Pot
It was popular in eastern Europe, Germany, and Israel during periods of austerity when most people couldn't afford ovens. It is described other places as working well on gas cooktops on camping stoves and in RVs. There is a heat diffuser, which apparently comes in different sizes to match the burner, and which funnels heat up through a cooking/baking chamber that looks a little like a bundt pan, and a lid. According to Wikipedia, "A Wonder Pot can be used to bake cakes, casseroles, rice, potatoes, apples, meat, and chicken." It's available online.
Answer: If you love braised, stewed, pot-roasted applications, a good Dutch oven might be the best $30 you'll ever spend (that's Lodge, not Le Creuset). However, if you want more variety, rumtscho's recommendation of a toaster oven is good advice. If I were going to run off in a motor home, I'd hope to take a Dutch Oven (Lodge), a toaster oven, a small non-stick skillet and a large, professional type (all-clad or similar) saute pan. Forks would be optional.
Comment: Very clever,,,maybe I'll just bring a chef with me, honestly I wouldn't know what or how to use all of the above mentioned. But I do like he apron fashion now a days LOL and thanks
Comment: HeeHee The funny thing here is I was being dead serious. I usually get in trouble for joking....I wasn't joking here...If I had to choose 4 pieces of cookware to take with me in a motor home, the four pieces I listed would be my choice. (I realize that your question didn't allow for four, but I just kind of ran with it)
Answer: No a dutch oven won't allow you to try any and all baking recipes like a real oven will, but there are a few things that it can bake with just a gas burner, like bannock and flat breads.  If you come up with one or more good recipes that you make all the time that become staples in your personal cuisine then hell yeah it's very definitely a good thing to have.  Bedouins make the same kind of flat bread all the time and don't seem to mind ;)  It's also awesome for deep frying.  I keep a small dutch oven in my VW van and fry plantains and sweet potatoes all the time.  I'm going to start making more bannock again with it and even try to do somethings with sourdough, just simple stuff like the bannock or a flat bread, nothing like croissants or a boule loaf.  Fry bread is another option.  I hope to try to make deep fried calzone with it if I get the sourdough working.  Ham and ricotta, yum!  And yeah I eat a relatively high fat diet and have lost like 50 lbs since I started 3 or 4 years ago, so don't give me any guff about the frying :)  On the other hand I wouldn't use it for an acidic stew since that would leach a lot of iron into your food.  I suppose that's not so bad if you give blood regularly though....


Grounded conducting sphere with cavity (method of images)

Question: If I have a grounded conducting sphere with a cavity [radius $R$] that has a positive charge inside, using the image method to calculate the electric field I have to use an imaginary charge. My question is where is the charge located and why. The imaginary charge is placed inside the cavity or inside the conducting sphere but outside the cavity?
I know the imaginary charge cant be placed in the region where the electric field is being calculate. I know that because the sphere is grounded, the outer surface potencial is fixed [$V=0$] , but i dont understand what is happening inside. It is a conducting sphere so inside the electric field should be zero, but what happens if I place the charge inside the cavity or outside the cavity?
Answer: The method of images aims to set up charges so that the conductor lies on an equipotential surface. Two unequal point charges create a zero potential sphere that encompasses the smaller in magnitude of the two spheres.
It is hard to see in the picture below, but I made a simulation of equipotentials from point charges that shows the zero potential in green (place charges with left click, pan with right mouse, scroll to change charge magnitude).

This problem is completely discussed in more detail in the FLP here, going into how to calculate the positions of the point charges for a given zero sphere, I provide the picture below so you can see what will be discussed there.

Hopefully this answers you question of where you need to place the image charge - namely, outside the grounded sphere and with a negative charge.


Mass remove a number of tags from a number of posts

Question: i am having a wallpapers site. I was having lots of posts with no tags and i tried some plugins to auto add tags like simple tags where you need to set some tags and it will auto use those tags for posts, then i used auto tag posts option and it added all the 50-60 tags to a number of individual posts,Means it added 50-60 tags to each of the posts in 500 posts. Its very time consuming now for me to edit each post and removing unwanted tags. Is there any way so that i can remove those 50-60 tags via a MySQL query? Any way either a plugin or a mysql query can do this. Please help.
Answer: To change tags on a mass of posts can you use the default mass edit mode of WordPress. This more secure as a sql-statement.
If you are on the edit post page, there you see all posts. Open the options on right top and edit a number of posts, there you will edit, maybe 500.

After this changes switch to the mass edit mode. Active all posts with the checkbox and use Edit in the Bulk Mode. Also a screenshot.

Now you get a textarea with all tags, there are in all posts and you can remove the tags.
A alternative is the plugin Search Replace, that can change tags to each post via sql statement, but is more directly on the database and not secure.
Comment: No that won't help in removing tags from all the selected posts. When i selected the posts with 50-60 tags and tried mass editing, it haven't shown me the tags in the tags box, it was empty for me. Please suggest another way...
Answer: Take a look at WordPress › Bulk Move « WordPress Plugins It works in a different way than the WP bulk edit mode and might be useful.

Bulk Move is a WordPress Plugin which can be used to move posts in
  bulk from one category or tag to another. This Plugin can also be used
  to remove posts from a certain category or tag.