Would forcing a neuron's ion pumps to open stun someone?

Question: So let's say you can force a neuron, or group of neurons, to open their ion pumps and release an electric signal.  If a neuron suddenly fired off a signal, would this cause a small disruption in the nervous system and stun the victim, or would it cause something like a seizure?
Comment: I mean, which group of neurons? You could get anywhere from no effect to a heart attack to a seizure to curing the victim's depression, etc., heh. Most likely though, if you get enough of them going in the brain, you'd cause a seizure. You might want to try targeting e.g. the lower spinal cord instead, go for the legs, avoid stopping their heart. Btw check out http://www.m.webmd.com/a-to-z-guides/types-of-seizures-their-symptoms.
Comment: For stun, you have to block connection between motor neurons and muscle tissue, it can be done chemically and is done chemically. But I guess you need at least some sort of ranged weapon or affecting huge areas and working immoderately or that all - you mught clarify that moment in your question. Or you might just take look at police stun gun effects - it already is kinda what you asking for.
@Frostfyre as usual, semi scientific explanation of plot device - strange question, stun gun is widely used in different stories.
Comment: I see the biological and/or storytelling aspects of this question, but what's the worldbuilding application?
Comment: The concept was central to a stun spell I was wanting to use, so I thought I'd check the idea's plausibility.
Answer: So from what I can tell, a single neuron, or even a lot of them misfiring would not cause what you want, unless it happened in just the right place.
Neurons actually misfire somewhat regularly, and while they can send mixed messages to your body, they don't usually cause you to be stunned or worse.
There is evidence that frequent heavy misfiring is a contributing factor for OCD, as well as autism, Parkinson's, epilepsy, and other mental diseases, depending on where and how they are happening.
If you were to target a specific site, such as the cerebellum to effect motor control, or the mesial (middle) part of the temporal lobe, which could cause an epileptic seizure, and get a large enough group of them to go off, then it might happen like you want.
Answer: As a medical student:
A single neuron in the brain will go almost completely unnoticed, if you could fire off several neurons in a coordinated fashion you could cause everything from a light twitch of a muscle to weird sensory experiences to a full grown seizure.
A full epileptic seizure is in fact just a chain reaction starting with a small area of the brain firing its neurons uncontrollably then spreading to the rest of the brain resulting in a state referred to as status epilepticus. It would be a very effective method of rendering someone temporarily harmless.
There are also other kinds of seizures which could result from this ability and I would suggest you look into the different kinds of epileptic attacks there is and choose whichever you see fits best for the purpose of your story. :)
Answer: Essentially if you want to immobilize an attacker through neuron attacks you're basically talking about a stun gun or something with similar effects.
If you manage to get a large enough collection of neurons firing in the brain you could get anywhere from no effect to a heart attack to a seizure to curing the victim's depression or making them make a funny face (heh), etc... You'll be taking a gamble. Most likely though, if you get enough of them going in the brain, you'd cause a seizure. There are types of seizures that lead to just momentary unconsciousness, see absence seizures, if you could somehow magically control that.
You might want to try targeting e.g. the lower spinal cord instead, go for the legs. Or target muscles, like the aforementioned stun gun.


ends up getting taken ,why the gerund is being used "getting"?thank you so much

Question: Indecision is a decision. Ignorance, when we know we should act, doesn't suddenly stop the world from spinning. It goes on, and the path with the favorable odds ends up getting taken.
Answer: The passive "it gets taken" means "{an unspecified|absent someone} takes it".

A path gets taken.

To take a path means to choose it or to follow it. But if the path simply "gets taken", there is no chooser or follower involved in the statement. The passive form lacking a "by" phrase eliminates the agent from the choice.
ends up wants as its complement a state or condition, because "ends us" acts like a predicate. The complement of ends up is a subject complement:

It ends up broken.
The marathon runner ends up tired and blistered.

Now let's combine those two ideas: to express the idea of a passively acquired state or condition which is the result of an absent agent or absent actor, we use "being" or "getting" in combination with the past participle:

When played with too roughly, the toy ends up being broken.
When played with too roughly, the toy ends up getting broken.

The -ing form of the verb there expresses the idea that a process is involved in the acquisition of this state.  The toy becomes broken.
Back to your example:
The person who must make a decision is compared to a hiker who is confronted with a fork in the path. If the hiker does not actively decide which path to take, but simply allows current circumstance or mere chance to make that determination for him, the most likely or most probable path "ends up getting taken".
The passive form eliminates the actor from the predicate.


What does it mean? "obtaining the correct papers"

Question: I think it should be an idiom or sth like that. It has been used in the answer of this question:
What is difficult when living in a different country?
Answer: I don't think it's really an idiom, it's just a literal phrase. Perhaps "papers" is a slightly obscure term for non-native speakers, though. "Papers" here is used as a catch-all for various documents, see definition  2.3 in Oxford dictionaries:

2.3 (papers) Documents attesting identity; credentials.
  'two men stopped us and asked us for our papers'

I think the phrase "obtaining the correct papers" is very literal and clear once you understand this usage of the word "papers". In the context of difficulties living in a different country, it refers to getting the various documentation that is required when living in that country. Exactly what that covers will vary depending on the country and various other factors. In general, it might include visas, residency permits, and legally-recognised proof of identity and address.


Can you share a component pouch with another creature?

Question: Can a wizard with a component pouch share their component pouch with another spellcasting player character?
Comment: I've removed the 2nd question, but you can always [roll back](https://rpg.stackexchange.com/posts/142159/edit) the edit.
Comment: I think you may also need to remove the houserule reaction of sharing from this and just ask if you can share components. if it's directly related to the houserule, then it's kind of up to you/your DM. If you separate it, we can answer it within the existing rules.
Comment: Welcome to the site! Take the [tour]. By any chance, is your question answered by [this similar question about material components](/questions/80271)?
Answer: Nothing in the rules says they can't

A character can use a component pouch or a spellcasting focus [...] in place of the components specified for a spell. Basic Rules, Casting a Spell

There is no special requirement that the pouch by magically bound or attuned or otherwise restricted to one person using it. It is just a pouch full of ingredients and there is no rules reason why you cannot share it with another spellcaster.
Location, location, location
However, do note that the pragmatics and action economy of such an arrangement is likely to be tricky.

A spellcaster must have a hand free to access a spell's material components — or to hold a spellcasting focus [...] Basic Rules, Casting a Spell

Firstly, you have to keep the pouch somewhere where you both can access it since you need to physically hold it in order to use it. If one of you goes to cast a spell with material components but can't reach the pouch, that person is going to be in a tricky spot and potentially unable to cast it.
Next, depending on how and where you store it, you might have to use your free object interaction to get to it:

You can also interact with one object or feature of the environment for free, during either your move or your action. Basic Rules, Combat

You may even have to use an action to access it depending on how the DM rules transferring the item between two characters would work in your exact scenario.

The DM might require you to use an action for any of these activities when it needs special care or when it presents an unusual obstacle. Basic Rules, Combat

But all this means is that it isn't an ideal arrangement but it is all fine according to the rules. However, I would highly recommend getting a pouch for each of you at the soonest opportunity.
Answer: There is no reason why components can't be shared. The rules only state that the caster must have a hand free to access the material component (so they must presumably be somewhere easily accessible to both wizards).
See also rules for interacting with objects.
Other Activity on Your Turn
Use an object action


SOQL query to get All the Note of a account

Question:
How can I retrieve all Note records for a particular Account using SOQL?
How can I retrieve all Opportunity records for a particular Contact using SOQL?
Comment: What have you already tried?
Answer: to be more familiar with such queries read next first, second

How to retrieve all the Note of a particular Account using SOQL query

Here are child relationship helps
select Id, (
    select Id, Body
    from Notes
    )
from Account
where Id = :desiredAccountId

How to retrieve all the opportunity of a particular Contact using SOQL Query

select Id
from Opportunity
where AccountId in (
    select AccountId
    from Contact
    where Id = :desiredContactId
    )

Comment: This will only work if there's a relationship established as a field in the outer object... or so it seems.  If there's only a child relationship established (for cascading deletes, for example), and not an explicit named relationship, it's considered an "arbitrary join" and is not supported in SOQL.
Answer: For getting Notes you can use next query:
SELECT Id, Title
FROM Note
WHERE parentid = :account.Id

For Opportunities related to Contact - if you use OpportunityContactRole object for connecting these objects, you can use such query:
SELECT Id, Name,
    (SELECT Contact.Name
     FROM OpportunityContactRoles
     WHERE ContactId = :contact.Id)
FROM Opportunity


Office 365 Developer Account and access to SharePoint

Question: After setup, and accessing my Admin Tab I can see Purchase Services. €4.10 I think stated per month for access to various Apps including SharePoint Plan 1. Is SharePoint also available as a free trial to accompany the Office 365 Developer Account?
Answer: Yes! You have a year in Office Dev tenant, but you don't get a license. But you can work with SharePoint in a Dev tenant
Sign up here for free: https://profile.microsoft.com/RegSysProfileCenter/wizardnp.aspx?wizid=14b845d0-938c-45af-b061-f798fbb4d170&lcid=1033
Comment: Hi, thanks for your reply. I did complete that form with the relevant information. For access to SharePoint under the Office 365 Admin>>Subscriptions I selected the 30 day Free Trial for Microsoft Office 365 Developer. While there is an option to extend this trial which I will look at I am assuming this is for a short time period as well. Question - do I need to commit to paying the €8.10 for continued access to my SharePoint Online environment?


Possible to switch table at runtime using Entity Framework?

Question: I have code to switch between databases when using EF, but now also need to allow the user to choose a particular table. (The tables all use the same schema but may have different names because of the way the client updates datasets). Is there a way to do this? And if it's done can it be done without being broken by updates being made to the Entity data model?
Comment: This is very strange. Why not use views instead of different table names?
Comment: @Emmad Kareem I know. I've asked that question and the answer had something to do with the way other applications generate datasets for various geographic areas.
Comment: Folks, please see note below in response to World Engineer's answer. I've decided we're just not going to pursue this avenue anyway.
Answer: This blog post goes into some detail: Changing Entity Framework model at runtime. It's apparently fairly difficult.

Out of the box there is no way, or at least not an easy one, to change table or schema names used by the Entity Framework at runtime...
On CodePlex however you can find an adapter for your Entity Framework model to change it at runtime. You can change the connection to the database, change table names or use different schemas...
So we're all set to support multi tenancy? Not quite...
For a multi tenant application we need a different model for each of our customers so we need to make another change to the code as available in the CodePlex project. If you don't mind taking the performance hit to rewrite the mapping every single time an object context is created you can just open the ConnectionAdapter class and change the static variables which hold the model information to instance variables...
Comment: Link only answers are bad answers. While it may be difficult is there any information you can include in the answer?
Comment: @World Engineer Thanks for the link. I had come across that in my own research earlier. My thoughts were that it wasn't worth it. Incidentally, since some of our code base relies on ADO.NET and it supports async and await now (unlike EF), I've decided to just leave EF out of the project.
Comment: @Stonetip: Not using EF for this scenario was the best and IMHO the only correct solution for this case. You should post it as an answer to your question.


What is the dimension of a figure eight Hausdorff space?

Question: As a metric space, the figure eight is a subset of the plane.  I think that means it's 2D.  This person I'm arguing with says it is 1D.  I think that must be wrong because a disc containing the intersection point is not an interval which is a requirement for a 1D (connected) metric space, as far as I know.  The counter argument is that the figure eight can be parameterized in $t$ and the interval $t\in[0,1]$ is 1D so the countable union of its diffeomorphisms (the figure eight) must also be 1D.  Who is right?  Why?
Comment: There are a number of definitions of "dimension" in topology, even one which is called [Hausdorff dimension](https://en.wikipedia.org/wiki/Hausdorff_dimension) and allows for fractional values.  So the right answer may depend on whose definition is used.
Comment: I am puzzled by this.  You give an argument that the dimension is one, then give a "counter argument" that then concludes that the dimension is one!  So how is that a **counter** argument?  The dimension is one!
Comment: @user247327 He means it's an argument countering his argument that the dimension is not $1$.
Answer: Judging by what you wrote, you are trying to apply the definition of the dimension of a manifold, while your friend is talking about Hausdorff dimension.

Definition of a 1-dimensional manifold: Every point has a neighborhood homeomorphic to an (open) interval.

Definition of Hausdorff dimension: Hausdorff dimension of a metric space $X$ is $\le \alpha$ if an only if for each $\beta>\alpha$, the $\beta$-dimensional Hausdorff measure of $X$ is zero.

The trouble with your attempt on computing the dimension of the figure 8 is that the definition of dimension used for manifolds  simply does not work when you try to apply it to spaces which are not manifolds, and figure 8 is not a manifold. In contrast, what your friend explained is that the standard drawing of figure 8 in the plane results in a space which is a countable (actually, finite) union of subsets each of which is diffeomorphic to an interval. From this, with a bit of work, it follows that Hausdorff dimension is exactly 1, when one uses the restriction of the Euclidean metric from the plane to the figure 8.
There are many other definitions of dimension in geometry and topology, so, before trying to argue about dimensions one should settle on the precise definition. The most commonly used definition of dimension for topological spaces is the Lebesgue covering dimension. My suggestion is to read the definition and then verify that figure 8 is indeed 1-dimensional in this sense.
Edit. One more thing: The terminology "Hausdorff space" used in the title of your question normally means "Hausdorff topological space." In the context of the figure 8 embedded in the plane, Hausdorfness is automatic. What you should specify instead is if you consider a topological space or a metric space. This (while insufficient) would indicate different notions of dimension. In the case of the usual drawing of the figure 8, however, both notions give you the same answer.
Comment: Thanks for taking the time to write up such a nice exposition.  I suspect the OP has a genuine interest in the conflicting notions of dimension, but informed more by the limited intuition they can bring to bear, and so giving them more than they know how to ask for is a good approach.


How is the relationship between two variables $X$ and $Y$ supposed to "explain" $R^2\text%$ of the variation of the data?

Question: Suppose we have a linear regression and we calculate $R^2 = 0.81$. What do we mean when we say "the relationship between two variables $X$ and $Y$ explains $81\text%$ of the variation of the data"? Especially this word "explains" confuses me, since the linear regression just reduces the variance in the observed data $Y$ by $81\text%$. It doesn't explain anything.
Comment: Statistics educators have recently noted that many students attempt, to their detriment, to interpret technical terms in familiar colloquial senses. (Think, for instance, of the many misinterpretations of "independent.")  As an ostensible math person (judging from your user name) you probably know well that the *only* valid interpretation of a technical term comes through its *definition* and not through what the commonplace meaning of the word might be.  The discipline of seeking out clear definitions will continue to serve you well in statistics.
Answer: It's an expression that is often used as short-hand or conventional jargon.
Anyone who finds it puzzling should feel that way! Some people say "accounts for" instead as a usage supposedly a little softer.
What is meant by explanation any way? This is a long-standing topic in philosophy (epistemology and philosophy of science) going back at least to Aristotle. Most disciplines have their own literature around the topic. There continue to be entire books published on that.
At a statistical end of the subject even introductory texts often emphasise that there can be nonsense correlations (e.g. when variables change over time in the same way, for quite different reasons), which alone underline that high correlations don't necessarily point to anything substantive and so aren't themselves explanatory. Or, rather there is an explanation, but it is not interesting: Ministers' salaries and the consumption of alcohol are both increasing over time, so a correlation is unsurprising, but it's still a coincidence.
Often an explanation to be satisfying would depend also on evidence on cause, process, mechanism or behaviour: choose wording to taste.
At this point it is customary to assert that "correlation doesn't prove causation", which also and fairly is often mentioned in introductory accounts. But although bang on, that put-down can be a little cheap. The truth is that proof of causation is often very difficult; meanwhile, correlations are often what we have, and what we start from. It often took centuries of hard science before sound explanations emerged for simple phenomena. Many diseases weren't explained until bacteria and viruses were identified, and many still remain mysterious at least in part. Although the behaviour was familiar to early humans, a framework for understanding the path of a dropped or thrown stone awaited Galileo and Newton.
Also, why single out correlation? The popularity of this saying depends on assonance as well as appropriateness. Generalized linear models are not causation. Support vector machines are not causation. Don't trip off the tongue so easily, do they?
To the main point: there is no implication that a formula, even one that fits the pattern of variation well, has explanatory content in any subject-matter sense. But as people say near where I live "Owt's better than nowt" (Something's better than nothing). $R^2$ with a certain number is more precise than "there is a strong relationship", just as $R^2$ with a low number and a claim of a strong relationship gives you guidance on what to think. In some areas of physics $R^2$ that isn't very high indicates incompetent experimenters; in some areas of social science a very high $R^2$ indicates faking of data or a silly question.
More subtly, the converse can be true. A formula can be derived in theory and then found to fit the data and that's first-rate science. But in some fields theory is weaker than the existence of equations may appear to imply. For example, a linear relation may be postulated on the grounds that variables are known or presumed to change together, a linear relation is the simplest we can think of, and we don't have good reason to suggest a different functional form. (This can be true in several fields, but somehow it seems common in econometrics.)
Other way round, if you say $R^2 =0.81$, then that can be quite enough for many readers who know about it. The "explains" or "accounts for" wording is for people who ask for more comment on what you're measuring, which can be reasonable and unreasonable at the same time. It's the old business of explaining in "plain English" what you''re doing, to which a riposte is that you would not need statistics if plain English would do. (Or any other language, naturally.)
As for whether it is good jargon to use, look and ask around you. Practices vary!

Some fields or groups just avoid "explains" altogether. Commentary might run that $R^2$ is whatever number, and encouraging, surprising, disappointing, whatever, but writers know what $R^2$ is and consider that to be covered in texts and courses, so no need to explain further.

Some use "explains" as a term of art, and if you object that the equation is not an explanation in any other sense, people may reply "Indeed" or "Of course not. Everyone knows that".

Some would regard any use of "explains" as obfuscating technical jargon manifesting lack of insight or empathy into what is going on underneath the data. This is most common in some social sciences in which there are groups of researchers whose attitude to statistical analysis varies between suspicion and hostility.  If so, or if your readers feel uncomfortable or puzzled by the usage for any other reason, it is really better avoided.

There is a different debate about whether and how far  $R^2$ is useful at all, which I will leave on one side.
Comment: Thank you so much for such a great answer! So it would be absolutely right to claim that your brand new model with $R^2 = 0,81$ doesn't explain anything about the observed variable $Y$, it just ***describes*** $Y$ better in the sense that the average distance of $Y$ from your model's plot is now smaller by $81\text%$. So your model just fits the data better by $81\text%$ in this sense and this is what we interpret as an "explanation", right?
Comment: "average distance" isn't quite right as we're measuring in terms of squared distances.  We can perhaps epitomize in this way: $R^2$ is a descriptive measure; how far the relationship being described is also explanatory is in the mind of the beholder given what the variables are and what the context is.  Or even shorter: "explains" is a term of art, not a philosophical claim.
Comment: Yes, but "explains" here precisely means "fits better in the sense that average squared distance is less", right? That's how you interpret "explains $81\text%$ of the variation of the data". I mean, when you use the word "explain" that's what you think about, right?
Comment: I don't think I want to try yet another rewording.  You're now focusing on what I  customarily say and think, and so now the question shifts. First, in my own work I try to avoid "explains" for all the reasons stated, that it seems to imply more than is defensible and is likely to be misunderstood. Second, when I think about a relationship I try always to think about whether it makes sense (is interesting, informative, trivial, whatever)  as well as how close it is. If it's other people's data and I don't know the context I encourage them similarly.
Answer: Say you fit the model:
$$
Y_i=\beta_0+\beta_1X_i
$$
and you get:
$$
R^2=0.81
$$
This means that your independent variable $X$ accounts for 81% of the variability in your dependent variable $Y$. Or, in other words, 81% of the variability in $Y$ is explained by the variability in $X$.
This is easy to see if you look at how $R^2$ is calculated:
$$
R^2=1-\frac{SS_{residuals}}{SS_{total}}
$$
where $SS_{total}$ is the total sum of squares, which represents the total variability of your data (in particular, the total variability of your dependent variable $Y$); and $SS_{residuals}$ is the residual sum of squares, which is a measure of the discrepancy between your data and the model. You can see how the lower $SS_{residuals}$, the better i.e. the higher $R^2$ will be.
Finally, recall that the total sum of squares can be partitioned as follows:
$$
SS_{total}=SS_{regression}+SS_{residuals}
$$
You can see how $SS_{residuals}$ represents the variability that's left after you remove the variability explained by the model, because $SS_{residuals}=SS_{total}-SS_{regression}$.
Hence, $\frac{SS_{residuals}}{SS_{total}}$ is the proportion of the total variability that isn't explained by the model, and therefore $1-\frac{SS_{residuals}}{SS_{total}}$ is the proportion of the total variability that is explained by the model.
Comment: Thank you for such a detailed answer! But a lot of what you said I already knew. I just asked about the meaning of this word "explain" in terms of $R^2$. And in your explanation you used the phrase "account for" which is just a synonym for "explain" and it didn't clarify much. Is it just a shorthand for saying "linear regression just reduces the variance in the observed data $Y$ by $81\text%$"?
Answer: $R^2$ is a comparison of the variance of the error terms of two models. One model is naïve and always makes the same guess of $\bar y$ each time; this is how we get the "total sum of squares". The other model uses some features in an attempt to have less variance in the error term; this is how we get the "residual sum of squares".
In that regard, $R^2$ is a measure of the extent to which the error term variance is reduced. Some proportion of the original variance (from the naïve model) remains, but some proportion is explained by considering features.
Let's do an example. You want to know the height of a person you select from your family. Knowing nothing about the person you select, the best guess (in terms of minimizing square loss) is the mean height of people in your family; this is the naïve model. However, you know that adults tend to be taller than children. By considering age, you reduce the variability in the heights; this is the regression model of interest. Some of the reason the raw height values vary is because the subjects have different ages; age explains some of the variability in heights.
In math, and (shamelessly) taking some of a previous post of mine...
Notation
$y_i$ is observation $i$ of some response variable $Y$.
$\hat{y}_i$ is the value of $y_i$ predicted by the regression.
$\bar{y}$ is the average of all observations of the response variable.
$$ y_i-\bar{y} = (y_i - \hat{y_i} + \hat{y_i} - \bar{y}) = (y_i - \hat{y_i}) + (\hat{y_i} - \bar{y}) $$
$$( y_i-\bar{y})^2 = \Big[ (y_i - \hat{y_i}) + (\hat{y_i} - \bar{y}) \Big]^2  =
(y_i - \hat{y_i})^2 + (\hat{y_i} - \bar{y})^2 + 2(y_i - \hat{y_i})(\hat{y_i} - \bar{y})
$$
$$SSTotal := \sum_i ( y_i-\bar{y})^2 = \sum_i(y_i - \hat{y_i})^2 + \sum_i(\hat{y_i} - \bar{y})^2 + 2\sum_i\Big[ (y_i - \hat{y_i})(\hat{y_i} - \bar{y}) \Big]$$
$$ :=SSRes + SSReg + Other $$
In OLS regression, $Other = 0$.
$$R^2= 1-\dfrac{SSRes}{SSTotal}\\
= \dfrac{SSTotal -SSRes-Other}{SSTotal} \\
= \dfrac{SSReg}{SSTotal} \\
=\dfrac{SSReg/n}{SSTotal/n} \\
=\dfrac{
\mathbb Var(\epsilon_{model})
}{
\mathbb Var(\epsilon_{naïve})
}$$
The claim about "proportion of variance explained" only applies in-sample (related to the $Other$ term not being zero), so if we consider the sample to be a population, then dividing by $n$ gives the exact variance.
Comment: Why the claim about "proportion of variance explained" only applies in-sample is a topic for a separate question, one for which I would like to post an answer (and I might even post a question and a self-answer) that I would then link here.
Comment: I read this and was reminded of https://stats.stackexchange.com/a/551916/9330 -- ah, no wonder it felt familiar, you linked to it in your answer!


Removing cabinets and matching Ceiling knockdown underneath

Question: My husband and I recently pulled out some upper cabinets in our kitchen. I want to DIY spray texture the knockdown but the problem I ran into after priming the area is there is a ridge in the ceiling texture where the cabinets used to be. I tried spraying over the ridge but it shows right through. What can I do to make it not look like there was cabinetry there? (I tried to add a picture but it won't let me :/ )
Comment: Hello, and welcome to Stack Exchange. If you post the URL of your picture, someone will be along to edit into your question.
Answer: One way to reduce the visible ridge effect is to use sandpaper to taper down the old knock down material along the ridge to smooth it out some. This job will be a bit harder if the old material has coats of paint on it. When I have sanded like this in a similar situation I used 120 weight sandpaper on a hand sanding block.
Note that there will be the urging desire to perform this sanding with a power sander but this is generally not recommended because it is so easy to sand too far and end up tearing up the paper covering of the drywall.


Frequency upconversion of pulses shorter than 1 IF period

Question: I have a rather elementary frequency upconversion/mixer question, perhaps so simple that it does not warrant a real question but rather just a reference to a website/tutorial (that I have not been able to find). If that is the case, feel free to comment that and we can resolve the question that way.
My question is as follows. Say I send in a 10ns duration square pulse at an intermediate frequency (IF) of 10 MHz (ideal, for the sake of the question? If that leads to issues we can make it Gaussian), along with an local oscillator (LO) frequency at 4 GHz, into a mixer . The mixer has an appropriate IF bandwidth (something broadband), and the LO an appropriate power.
Now, the result of this, as I understand it, should be a 10ns square pulse of a 4.01 GHz signal. But how was the mixer able to 'tell' that it had a 10 MHz signal coming in, if it only received 1/10th of a period of that signal? In the sense that 10 MHz has a period of 100ns, and the signal was only 'on' for 10ns.
How is it able to (passively) reconstruct the IF, only being able to 'sample' it for less than a full period? Is this indeed possible? And what kind of limitations does one run into here? What if it is a 1ns signal?
At this point I've asked my question. I can speculate a bit more/elaborate on my thought process, but feel free to skip that if you prefer. As far as I can guess, what goes on as something to do with the bandwidth of the mixer, and also the sampling rate of the instrument/entity producing the 10ns pulse to begin with. That is to say, if I have a 1 GS/s instrument, that 10ns pulse will have 10 points. That should certainly lead to a different effect than sending in a single point, or 100.
That makes me think it is related to how many cycles one needs to perform a Fourier transform. In a way, what we are doing is sending in some $\sin{(2\pi f_{\rm LO} t)}$ multiplied by some square impulse, which needs to be reconstructed. That again either brings me to the sampling rate of the instrument, or the bandwidth of the mixer.. Somehow also the fact that a 'square' 10ns pulse produces frequency components far in excess of 10 MHz should be factored in, I suppose.
Would it be possible to write down what goes on here mathematically? I suppose it must be. Maybe that makes it easier to spot the limitations and distortions that arise in various cases.
Comment: Please explain the abbreviations (IF, LO) before you use them, so that the question is understandable for a broader audience.
Comment: I've added that, thanks
Answer:
a 'square' 10ns pulse produces frequency components far in excess of 10 MHz should be factored in, I suppose.

Yes. A 50 ns square pulse (50% duty cycle) at 10 MHz would also have components exceeding 10 MHz. The only 10 MHz waveform that doesn't have components at higher frequencies is a sine wave.
A 10 MHz signal with 10% duty cycle includes a 10 MHz sine wave component, and components at higher frequencies. If your whole system has bandwidth of 10 MHz, you will reconstruct a 10 MHz sine wave. If the bandwidth is higher, the output will more resemble the input 10 ns pulses.

how many cycles one needs to perform a Fourier transform.

If you'd like to learn the frequency spectrum of a waveform (e.g. a square wave with 10% duty cycle) you need just one cycle (providing you know the cycle length). If you want to do it using digital Fourier transform (rather than analytically), the higher sampling frequency (the more points per cycle), the larger bandwidth the transform will output.


How do I give an answer?

Question: On this website I'd like to answer people's requests but I'm not sure how xD.. Is there like an answer button or something or am I just blind.. Probably both honestly ^-^
Basically just how do I ask questions on arcade?
Comment: Welcome! I suggest reading through the [Tour] page, there's a lot of information about how we handle Q&A here and getting yourself familiar with the site. There is also a [Help] and a [Answer] page that will assist you too.
Comment: Sorry for wasting your time :(
Answer: While looking at any question, scroll down and you will see a text box labeled "Your Answer."  From here, you can fill in the text box with your answer, and press the "Post Your Answer" button once you are finished.
The help pages don't have anywhere that I was able to find that actually discuses how to actually answer a question, but I encourage you to take a look at our rules about answering questions and the guidelines for answering posts.
If a post is protected, you will need a minimum of 10 reputation to post an answer to it.  This is a mechanism in place to prevent spam answers or "thank you" answers on posts. There are also posts that can be locked by site moderators, which means that nobody can post any new answers, vote on the post, or even leave a comment.  Very few posts are locked, so the chances that you'll come across one are slim.
Comment: The question is likely protected and requires OP to have 10 rep to answer

How do I give an answer?


how do I convert a base ten representation to its equivalent two's complement in 7 bit?

Question: how do I convert a base ten representation to its equivalent two's complement in 7 bit?
I am learning applications of discrete mathematics and this is one of the questions, being new to this, I just don't understand
Answer: your question lacks some details, especially concerning the environment in which you are working. Do you want to do it by hand or in a specific programming language? What steps did you take to solve the problem by yourself? If you did so, why didn't they answer your question?
Please read more about asking question at https://stackoverflow.com/help/how-to-ask
Furthermore you are asking two separable questions.
All of this contributes to your negative score.
To convert from 10-base to 2-base 2-complement, convert 10-base to 2-base 1-complement and from there to 2-base 2-complement.
From your second question I deduct you have been working on your problem. So I think you already know http://en.wikipedia.org/wiki/Two%27s_complement#From_the_ones.27_complement. There is also a nice example.
Flipping a bit means using the NOT-operation on the bit, simply said: turn a 0 into 1 and vice versa. Adding one means increasing the value of the numer by one.


How can I determine the order of HTML elements read by a screen reader?

Question: Is it possible to determine the order of HTML elements read by a screen reader (like TalkBack or VoiceOver) regardless of their position in the DOM? I'm wondering if there is an id, an HTML attribute like "voiceindex" (analogous to tabindex) or another option to control the sequence. The corresponding webpage is embedded as webview inside the app. Therefore I don't have access to native Android or iOS code.
Comment: I don't think this answers your question. However generally screen readers use the structure of a HTML page to establish the order of reading. Users can also customise the order, e.g. 'Read all of the links'. So in terms of accessibility the best thing you can do is is to design a page with a sensible structure. You can review this structure using an [HTML5 Outliner](https://gsnedders.html5.org/outliner/).  Every section should have a header. Prefer tags like `nav`, `main` and `section` over `div`. If the outline of your page makes sense, the screen reader will be able to infer order.
Comment: Have a look at "aria-flowto". It might work for your use case.
Answer: No, there is no attribute or anything like you describe to control the reading order of a web page.
Something like this exists in PDF and it's a big mess; for sure it was a very bad idea, making PDF accessibility quite complex.
A web page is read in the same order as elements appear in the DOM and this is always so, regardless of your CSS.
It ahs a great advantage over having to manually specifiy an order: it's simple, you just have to structure your web page using structural elements appropriately; then, to verify that it makes sense for a screen reader user, just read your HTML code from top to bottom and completely forget about visual placement.
This later exercise is widely known as linearization; that's basicly what screen readers do and how screen reader users perceive web pages
If the exercise isn't convaincing enough, imagine that you have recorded your page on an audio CD. You can listen to each title one after the other, or jump directly to the beginning of a track, but not easily jump directly to the middle of a song.
Jumping to the beginning of a track is a metaphore for the jump to next heading or next section of screen readers. Selecting a track from the tracklist is also possible with screen readers as most of them provide a list of sections or headings to jump to.
With the hope that this image will help you structure your page well for screen reader users, and why you should carefully think about it. This was in fact certainly your foundamental problem when you posted your question.


Part of quotation used for book title

Question: I am using part of a quote for a book title. Do I need to put quotation marks around the book title and if so, do I need to include anything else to show that only part of the quotation is being used in the book title.
Comment: It would be more helpful if you could include one or more examples of where you think speech/quotation marks are placed.
Answer: No, you do not need to add punctuation. There are numerous book titles that utilize parts of quotations without either quotation marks or ellipses.  Consider the following:

The Sound and the Fury
For Whom the Bell Tolls
The Rains Came

Here is a list of dozens of books whose titles are based on biblical quotes. There are undoubtedly many, perhaps hundreds, more.
This site suggests that there are thousands of literary titles based on Shakespearean quotes.
In virtually all of these examples, quotation marks and ellipses are not used.
Answer: Here is a link to one editor/publisher who felt it necessary to use both quotation marks and an ellipsis in a book title:
Surely You're joking Mr. Feynman....
The title quote was stated during Feynman's introduction tea at Princeton after his absent-minded response of "Both please." to the question "Cream or Lemon in your tea Mr. Feynman?"

Part of quotation used for book title


Could this be a cosmic ray hit on my cameras sensor (CMOS, DSLR)?

Question: While taking pictures of the bubble nebula I noticed a very strange artifact on only one of my pictures. It can't be a satellite since its not a straight line and this is a 90s exposure that should make a line much longer. Also I doubt this is just readout noise from the camera (image is unstretched, unedited) since hot pixels don't form lines. So could this be a cosmic ray hit? If not does anyone have an idea what this could be?
The image was taken with my Canon 7D Mark II @ISO1600, 90s exposure.
Celestron C8 SGT (XLT), Celestron Advanced VX
Comment: Since it is very narrow, i think it must be something inside the camera, as an thing outdide would be blurred by imperfection of the lens. Some kind of stray elecron seems most likely
Comment: @iMerchant I highly doubt that, since it looks like something that was smaller than 1 pixel and still extremly sharp (compare it to the stars in the background). From this I concluded it must be something on the sensor of the camera, not something that came through the optics
Comment: I'll let others give definitive answer to this, but cosmic rays can leave tracks on ccd.  The fact it is not straight suggests a rather loe energy electron, rather than a high speed muon or similar.
Comment: The word you are looking for is "meteor", and I hardly think that's what it looks like on the picture.
Comment: Could it be something closer to earth like dust/speck of dirt/pollen/bug eyeball/sap/water droplet/etc that was on the lens and shifted during the exposure?
Comment: @RononDex: You could test the hypothesis that it's a cosmic, if you manage to repeat the same observation in the same field with the same parameters as given.
Comment: @AtmosphericPrisonEscape Aren't cosmic ray hits kind of random? If so how would a repeat of the same show its validity?
Comment: @RononDex: If it's not there the second time, it was a cosmic. That's at least the usual assumption. Of course it could be also any other kind of non-repeatable event on your lens, but cosmics are the most frequent.
Comment: To me it looks like an airplane taking a curve (red-green-red).
Comment: @ott-- it seems unlikely that it has been something that I saw through the telescope, because it is completly sharp and not washed out like the stars in the background.
Comment: Possibly a grain of dust burning up as it entered the atmosphere.
Answer: It's a track about 50 pixels long, at 4.1 $\mu m$ per pixel that's 200 $\mu m$ in the plane of the sensor.
It's about 1 pixel wide, quite lumpy, and seems to change direction a bit. It really fits the description of an ionizing particle. There are multiple possible sources,
I'm pretty sure @JamesK has nailed it as an electron, but what else can we learn? There must be some way to get a very rough idea of how many $e^- h^+$ pairs correspond to a fully exposed pixel at "@ISO1600", then we could convert it to a dE/dx and see if it's minimum ionizing or if it's much higher.
Going diagonally, with a density of 2.3 g/cm${}^3$ that's about 1.3 mg/cm${}^2$ areal density per pixel. A [minimum ionizing particle] at 1.5 MeV / g cm${}^2$ would deposit only about 2000 eV which would make less than 1000 $e^- h^+$ pairs. That might correspond to a bright pixel. It's not out of the question that it's a minimum ionizing particle.
Comment: That's a very interesting read. If it might help you for further analysis, this is a page that analysis the sensor of my camera really deeply (with all the different read noise, gain, etc for each iso setting): http://www.clarkvision.com/reviews/evaluation-canon-7dii/

Alternatively this is another page with some more info: http://www.sensorgen.info/CanonEOS-7D-Mark-II.html

**Note that this image was taken while the sensor was at a temperature of around 34°C**
Comment: @RononDex looks like 2230 $e^-$ is the maximum value at ISO 1600 so indeed it could be a minimum ionizing particle! Thanks!


Principled BSDF and Glass BSDF black in GPU Cycles viewport rendering

Question: When I use CPU everything works fine, but when I switch to GPU all materials using Principled BSDF or Glass BSDF shaders go completely black in the viewport rendered view; all other shaders seem to work fine. I am using Cycles in blender 2.83 and my graphics card is a GeForce RTX 2060, which I just updated.
Comment: No info about render engines and shading modes the issue appears in. Try to set materials blend mode to Alpha Blend instead of Opaque in the material settings. Render engine should be set to Eevee for this option to appear, but those settings should also affect Material Preview shading mode back in Cycles. Also if you use Cycles try to increase Transparency samples in Render Settings -> Light Paths.
Comment: @AndreySokolov my apologies. The problem only appears in Cycles; works fine in Eevee. Increasing the transparency samples didn't help, and the Material Preview shading mode gives the best results with the Opaque blend mode with both engines.
Answer: I don't know if you solved this, but I had a similar issue until I realised that I had Transmission Bounces set to zero (not Transparency bounces as mentioned in your comment above) ...
Comment: It's been a while since I posted this, and I don't remember how I solved it. However, the exact same problem appeared just a few days ago, and a simple PC restart solved it. I'm assuming the same thing happened last time.


Difference Between Private Memory Limit and Virtual Memory Limit in IIS

Question: I want to set the max limit on the physical memory an application can use in IIS 7.
Should I set a limit on Private Memory Limit or Virtual Memory Limit?
Can some one point me to documentation of all settings in IIS 7
Answer: Limit the Private Memory (Committed bytes) this is what corresponds to your actual Memory usage.
Virtual Memory isn't shared across applications and on x64 worker processes will generally reserve much much, more than they actually end up using.  Forcing limits on this really only makes sense on x86.
Comment: The worker process will recycle once a memory limit is hit.  One thing to keep in mind if your application relies heavily on session state is that on recycles you'll lose that session state information if you're storing it inProc (default), you will want to move to SQL based session state if you have an app thats recycling often and is dependent on session data or else your users may have to re-login every time the worker process recycles.
Comment: Thanks, Dominic. If we limit the private memory, what happens when the limit is reached? Does it starts using virtual memory on the disc or does the application pool recycles?


Modify thermal trip points

Question: Can you please instruct me on how to modify critical trip points. My computer keeps shutting down and my sensors are telling me that I am running hot when utilizing demanding programs. I am utilizing Ubuntu 12.10. Thank you.
Answer: From my understanding, you can't modify the critical trip point - if you were to increase it to stop your machine shutting down then you risk damaging the silicon.  The sole reason for the critical trip point is to avoid permanent damage of the system due to thermal overrun.
Answer: I know this an old question, but...
Critical trip point is defined in BIOS and communicated to the OS via ACPI. Assuming the trip-point is set to some reasonable value and the OS is reading it correctly: maybe the computer is trying to tell you it's overheating.
Check to see if the fans (if any) are still working and the heatsink is not plugged up with dust. Failing that, you can try to get the CPU to run at a lower maximum speed. Research P-states: maybe Ubuntu has a a way to modify/limit those.

Modify thermal trip points


Multiplicative even and odd functions?

Question: An even function satisfies
$$
f_e(x) = f_e(-x)
$$
and a odd function
$$
f_o(x) = -f_o(-x)
$$
Every function can be split into an even and an odd part
$$
f(x) = f_e(x) + f_o(x) = \frac{1}{2}(f(x)+f(-x)) + \frac{1}{2}(f(x)-f(-x))
$$
Now even and odd functions are basically related to the operation of addition and the inverse of addition. I wonder if it would make sense to define even and odd functions related to multiplication and the inverse of multiplication. So I imagine a multiplicative even function would satisfy
$$
f_{me}(x)=f_{me}\left(\frac{1}{x}\right)
$$
and a multiplicative odd function
$$
f_{mo}(x)=\frac{1}{f_{mo}\left(\frac{1}{x}\right)}
$$
Are these functional equations the correct generalizations of even and off functions to the operation of multiplication? If so, what functions can fulfill these equations? Is it possible to split each function into a multiplicative even and odd part?
Comment: Do you know what a group is?
Comment: For functions $\mathbb{R}^*_+ \rightarrow \mathbb{R}^*_+$ it makes sense, and you would get $f_{me}(x) = \sqrt{f(x)f(1/x)}$ and $f_{mo}(x) = \sqrt{f(x)/f(1/x)}$, but I have never seen anyone use such notions.
Comment: I haven't gone into the details but i would think you can split a function into the product of m-odd and m-even functions, where the m-even function is the geometric mean if f(x) and f(1/x), and the m-odd is the GM of f(x) and 1/f(1/x). How usefil this would be, i don't know, and certainly there would be several divide-by-zero gotchas to look out for.
Comment: Hang on, does this mean a m-even function is one whose logarithm is additively-even?
Answer: You can generalize even and odd functions $\mathbb{R}\to\mathbb{R}$ in a natural way in the setting of functions $G_1\to G_2$ between groups. If $f:G_1\to G_2$, then $f$ would be "even" if $f(x^{-1})=f(x)$ for all $x\in G_1$ and $f$ would be "odd" if $f(x^{-1})=f(x)^{-1}$ for all $x\in G_1$.
Your example is precisely this construction with $G_1=G_2=\mathbb{R}^\times$, the group of nonzero real numbers under multiplication, or $G_1=G_2=(0,\infty)$, the multiplicative group of positive real numbers. Note that this avoids the problem of potentially dividing by zero.
I think that in this generality, it is probably not possible to split every function into a product (or sum, if you like, if $G_2$ is additive) of "even" and "odd" parts. In order to do this for functions $\mathbb{R}\to\mathbb{R}$, we have to take advantage of some extra multiplicative structure to divide $f(x)+f(-x)$ and $f(x)-f(-x)$ by $2$. The most obvious way to symmetrize $f$, $f(x)f(x^{-1})$, does not even work if $G_2$ is not abelian.
In analogy with the $G_1=G_2=\mathbb{R}$ example, if we assume that $G_2$ is abelian, then $E(x):=f(x)f(x^{-1})$ is an "even" function and $O(x)=f(x)f(x^{-1})^{-1}$ is an "odd" function. We have $E(x)O(x)=f(x)^2$. So in your $\mathbb{R}^\times$ example, you can at least write the square of any function as the product of an even and odd function. This further implies that if $f:(0,\infty)\to(0,\infty)$, then $f$ can be written as the product of an "even" and an "odd" function by setting $g=\sqrt{f}$, $E(x)=g(x)g(x^{-1})$, and $O(x)=g(x)g(x^{-1})^{-1}$, so that $f(x)=g(x)^2=E(x)O(x)$.

Multiplicative even and odd functions?


Show Active Directory users email

Question: I'm creating some forms to internal company use.
I'd like to list the usernames just like outlook does, after typing the beginning of the username i'd like to have the suggestions of the names.
Furthermore, I'd like to send an custom email to the user that was selected.
Answer: You can use SharePoint client picker control in your form. It does have functionalities to show suggestions. You can write anything i.e. User Name, Display Name or email of user and it will show suggestions based on input.
You can go through this article.
Hope it will help to you.
Thanks

Show Active Directory users email


MSI Installer fails without removing a previous install

Question: I have built an MSI that I would like to deploy, and update frequently. Unfortunately, when you install the MSI, and then try to install a newer version of the same MSI, it fails with a message like "Another version of this product is already installed. Installation of this version cannot continue..." appears. The MSI was built with a Visual Studio 2008 Setup Project. I have tried setting the "Remove Previous Versions" property to both true and false, in an effort to just make newer versions overwrite the older install, but nothing has worked. At a previous company I know I did not have this problem with installers built by Wise and Advanced Installer. Is there a setting I am missing? Or is my desired functionality not supported by the VS 2008 Setup Project?
Answer: I have built numerous MSIs with VS 2005 Pro that do this correctly.
Are you sure that the 'Version' property of the deployment project has been incremented? This property is independent of the version of the assemblies in the application, and this is the error message you will see if the Version property of the MSI is the same as it was for the one you are trying to overwrite.
Comment: How do I get to the 'Version' property of the deployment project? What are the exact steps?
Answer: Increment the version number on your project.
In VS, select the node for your setup app and hit F4 to view the properties.  Find the version field, and increment it.
Answer: You need to change the ProductCode between each version, if you don't do this you will get the behavior you are seeing.  The ProductCode is seen in the project properties.  Check out the MSDN Online Help for ProductCode to understand better.
Comment: Only change the product code for Major upgrades, small frequent updates should retain the same product code and just increase the version.

Changing the product code is effectively a new application in the eyes of windows installer.
Answer: This is little more complex:
To automatically remove previous versions of installed application in Setup Project, it is needed to:

Increment the Version property (e.g. from 1.0.0 to 1.0.1 ... also change on 3rd position works)

Version is the property of installer project that identifies, which version of application is installed

Change the ProductCode property, so installer knows that it is not the same installer executed twice

ProductCode is the property of installer project, Visual Studio offers to automatically change it, when Version property is changed

Keep the value of "UpgradeCode" property.

UpgradeCode is also the property of installer project
it needs to stay the same among entire "upgrade line", so installer knows what to upgrade

If you also want to remove old application versions from Control Panel's list of software, set RemovePreviousVersions to true
Comment: I do all but previous versions not uninstall by .msi. I have vb script to change version and product code on successfull build. and RemovePrevious Version property set to true, as well. please help any idea ? how to overcome.
Answer: Had the same problem when going from XP to Win7. To solve it I had to set DetectNewerInstalledVersion to False. Also, as mentioned by others, you need to inc the version of the setup project.
Good luck.


Android play raw Audio from C++ side

Question: I need to be able to stream audio from a custom file format on the C++ side of the Android system.  I am working on porting a custom media player and need to be able to open a custom file and stream audio from it.  This is important as I do not think porting the whole player to JAVA is feasible from a performance stand point and moving the audio buffers through the JNI interface I believe will be too slow to keep a decent frame rate.  I can handle the video on the NDK side through OpenGL ES, but the Audio I have no idea how to make this happen.
Answer: I recommend you pass the audio through the JNI and see how it actually performs. I've found that the JNI is actually quite efficient (if implemented correctly) and wouldn't be surprised if it is more than fast enough for what you need.
Just a note on implementation, don't get Java to create a buffer each time you want to pass audio through, simply create a buffer in Java (or via the JNI) and then memcpy into it each time you need to update.
Also, you should note that ALL of the audio classes on the Android are currently written in c++ and run through the JNI. If its fast enough to go one way (I'm currently working on a game where we may submit over 0.5mb of audio data from Java to AudioTrack in on some frames without a problem), then it probably won't be too bad to go the other as its basically the same operation, i.e. lock buffer, write, unlock going to the audio, and lock buffer, read, unlock within the audio classes.
Answer: The NDK does not support playing audio frames currently. You have to use the java AudioTrack API to achieve this.

Android play raw Audio from C++ side


Are the 8 principal sugars in glycoproteins "essential sugars"?

Question: Are there "essential sugars"? Some have suggested that the 8 principal sugars found in glycoproteins are "essential sugars":

Galactose
Glucose
Mannose
N-Acetylneuraminic acid
Fucose
N-Acetylgalactosamine
N-Acetylglucosamine
Xylose

I realize the liver can convert glucose to many different sugars, so by "essential sugar" I mean a sugar that is difficult to obtain from diet or that the liver requires much energy to convert from glucose.
How difficult is it for the liver to convert glucose to the other sugars listed above?
Comment: Your main question can be answered by simply copy/pasting it into google. Did you try to research this before posting? I assume you did, so what is it that was unclear to you?
Comment: that wasn't so classy changing the question when we tried to answer your original one. oh well.
Comment: @shigeta: Well, the question was about to be deleted anyways…
Answer: There are no essential sugars.
In the context of nutrition "essential" usually means "must be obtained from the diet". So for example the amino acid methionine is an essential amino acid (for humans).
Within this definition there are zero essential sugars. A Google search for essential sugars reveals lots of sites like this one. The site lists glucose as the first "essential sugar". In fact we can make glucose from a range of other nutrients including amino acids, lactic acid and glycerol. The second sugar on the list is galactose - we can make that from glucose. And so on...
Comment: To put it in hard words: Its pseudoscientific bullsh*t.
Comment: By "essential" I mean "difficult to synthesize of not obtained from the diet."
Comment: I think you will have to define "difficult". But really, now that you have edited your question, you are asking for an entire chapter from a biochemistry textbook.
Answer: @AlanBoyd is right that the term 'essential sugar' is not a scientific or biologically defined term and is not true given the meaning of the word essential that is in use in biology.
In alternative health and diet circles, the term 'essential sugars' refers to a set of simple carbohydrates which are hypothesized to be important for good health and nutrition in people.
Even if this were a valid approach in humans its very unlikely to be the same specific sugars and proportions for other animals and living things.
So given all these caveats the reference I found for 'essential sugars' lists these 8: glucose, galactose, fucose, mannose, glucosamine, galactosamine, neuraminic acid, and xylose.
As far as whether this really helps us, I personally don't think this is the key to good health in and of itself.  It really oversimplifies all of the biomachinery we have to break down and utilize carbohydrates.
As the diet recommends the eating of vegetables which aren't too green, avoiding fructose, it doesn't seem to hurt.  Carbohydrates from food are often the product of breaking down complex carbohydrates.  I feel as if watching the glycemic index of your food and avoiding soft drinks and too much fruit juice will get you further in terms of health.  Avoiding simple carbohydrates entirely in your diet also has advocates and there is some medical research that backs it up.
Comment: thanks for mentioning.  I take it you mean fructose?  That part about not taking in high fructose has some pretty good science behind it.  In humans (and rats etc) fructose is only metabolized in the liver so when you have a large ingestion  of fructose the local concentration in the liver becomes very high and it manufactures fat as opposed to breaking down to other carbohydrates.  http://www.sciencedirect.com/science/article/pii/S0168827808001645
Comment: Yeah, I mean fructose, damn typos. But it doesn't make too much sense to worry only about one carbohydrate. Nutrition has to be balanced, so if we avoid fructose, but live otherwise unhealthy (meaning too much fat and so on) this will change nothing.
Comment: I don't even see reason to avoid frucose, since the body can make frucose-6-phosphate from glucose-6-phosphate. Frucose, which the cells take up also get phosphorylated, so this doesn't make any difference.
Comment: hey @Chris - that's biochemistry for ya  - the devil's in the details :)   in general engineered foods are suspect as far as i'm concerned and probably aren't healthy as they are not a product of the environment we evolved from - my soapbox...
Comment: I am a biochemist :-) And I don't worry too much about food - but I try to avoid a few things.


Sql Server Large amount of unused database users and logins

Question: Pardon asking what may be considered an opinion based question, but what are the benefits of removing unused database users and logins? I have a database with > 50k sql users which map to sql logins. I have years of login activity audits, only 100 are used. It comes from a legacy issue where every new customer gets a sql user and sql login created but they are not used.
I wish to know the disadvantages of having these users and logins, if there are any. Thanks in advance
Comment: Plan was to disable the logins, after a grace period drop the login and associated users. We occasionally get blocking with security caches, I wasn't able to find much online about it, wasn't sure if it could be related to this
Answer: If you're not disabling these LOGINs afterwards, it gives someone malicious more avenues for access. – Larnu
Also we have found that the more logins that exist, the longer login creation takes. Which isn't a big deal for a single CREATE LOGIN but it can be a bigger deal if you have automation in place that tries to create 1,000 or 10,000 at a time. – Aaron Bertrand
There are also the basic UI symptoms involved with large numbers of anything, where expanding nodes in Object Explorer or right-clicking for properties can take a long time and block other users and/or time out. – Aaron Bertrand
You wont have perf issues as the logins you identified are dormant. You will have issues in terms of manageability and UI experience as Aaron mentioned. Better disable them and if no one shouts .. drop them when you feel comfortable. – Kin Shah


Help on a batch file

Question: Ok I made this batch file that looks for a file on computers backs it up and replaces it. We can call the file we are looking for file.a and the file that is going to replace it file.b (they share the same name) So right now when the batch script finds file.a it makes a copy of file.a in the same director named its file.a.old then copys file.b over file.a. What I would like to do is add an if statement to this batch file that check the size of the original file.a. If file.a size is = 2.69MB or 2,826,240 bytes then make a backup file.a.old and replace file.a with file.b. if not leave file.a alone and do nothing.
There is my code right now that just searches, backups and replace file.a
<code>for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
    for /f "tokens=* delims= " %%a in ('dir/b/s/a-d %%i:\file.a 2^>nul') do (
    move /y %%a %%~DPa\file.a.old
    move /y file.b %%a
    )
)
</code>
It would be great if some one could help me add this if statement into this patch file.
Thanks
Answer: <code> for /f "tokens=* delims= " %%a in ('dir/b/s/a-d %%i:\file.a 2^>nul') do (
   if %%~za gtr xxxxxx  .....
  )
</code>

Help on a batch file


Query to find out duplicate records on two fields

Question: I need to figure out the list of duplicate records based on two fields. That means suppose we have two duplicate records a and b, a.field_a__c = b.field_a__c and a.field_b__c = b.field_b__c and a.id != b.id. Is there anyway I can query this?
Answer: See my answer for information on how to catch multiple fields as duplicates (the answer mentioned uses three fields, but this can be expanded to any number of fields as you need). While this answer is not technically a duplicate, the answers you seek are already here on SFSE.
For a recap, basically, one solution is to use a wrapper class to mark duplicates. First, aggregate all possible values together, then query for them and place them into the wrapper class, then process the results. I've included the original code from the other example for you to peruse.
trigger BlockDupeLeadConvert on Lead (after update) {
    class UniqueKey {
        UniqueKey(string Firstname, String lastName, String email) {
            this.firstname = firstname;
            this.lastname = lastname;
            this.email = email;
        }
        string FirstName, LastName, Email;
        integer hashCode() {
            return toString().hashCode();
        }
        boolean equals(Object o) {
            return toString() == ((UniqueKey)o).toString();
        }
        public override string toString() {
            return String.format(
                'FirstName = \'\'{0}\'\' AND LastName = \'\'{1}\'\' AND Email = \'\'{2}\'\'',
                new String[] {
                    FirstName==null?'':String.escapeSingleQuotes(FirstName.tolowercase()),
                    LastName==null?'':String.escapeSingleQuotes(LastName.tolowercase()),
                    Email==null?'':String.escapeSingleQuotes(Email.tolowercase())
                }
            );
        }
    }

    Map<UniqueKey, Lead> leads = new Map<UniqueKey, Lead>();
    for(Lead record:Trigger.new) {
        if(record.isconverted) {
            UniqueKey key = new UniqueKey(record.firstname, record.lastname, record.email);
            if(leads.containskey(key)) {
                record.addError('Duplicate lead conversion.');
            } else {
                leads.put(key, record);
            }
        }
    }
    String[] keys = new String[0];
    for(UniqueKey key:leads.keyset()) {
        keys.add(key.tostring());
    }
    String query = string.format(
        'SELECT Id,FirstName,LastName,Email FROM Contact WHERE {0}',
        new String[] {
            String.join(keys, ' OR ')
        }
    );
    if(!leads.isempty()) {
        for(Contact record:Database.query(query)) {
            UniqueKey key = new UniqueKey(record.firstname, record.lastname, record.email);
            if(leads.containskey(key)) {
                leads.get(key).addError('Duplicate lead conversion.');
            }
        }
    }
}

The reason why this is necessary is because unlike normal SQL, you can't simply write select ... left join on a.field_a__c = b.field_a__c and a.field_b__c = b.field_b__c and a.id != b.id. It doesn't work that way. The way around it is rather unfortunate, as you're likely to query many more records than you intend to in most cases. If you have very few values to choose from, you may even be forced to use extreme measures, like a formula field or even a batch class to flag the records as duplicate after the fact.
Comment: Thank you for the detailed answer. But this seems to query the whole table which in my case means 170k+ records. I am trying to narrow down the query to make it a little bit more reasonable. Making it a batch job doesn't seem to be an option.
Comment: @LanceShi No, it's only looking for records that might possibly be a duplicate. This specific example builds a query like `select id, firstname, lastname, email from contact where (firstname='John' and lastname='Doe' and firstname.lastname@example.com') or (firstname='Jane' and lastname='Smith' and email@example.com')`. Only query what you need to find, and you should be okay.
Comment: thank you for pointing that out. But the map is built on Trigger.new. In my case, it is not a trigger, it is a query which will query the whole table - Anyway, I have figured out how to narrow it down now. And your example is of great help.
Comment: As the string length increases as the number of records increase , will this have any impact on the SOQL query character limit. SOQL Characted limit is: 20000 per soql statement.  Please let me know if I am getting something wrong about the character limit
Comment: as I assume if a single record requires ~50 character then a list having nearly 500 records can easily cross the limit..
Comment: @karti Yes. The alternative is the slightly less accurate binding solution, something like: `Set fn = new Set(), ln = new Set(), email = new Set(); ... for(Contact record: [SELECT firstname, lastname, email FROM Contact WHERE FirstName IN :fn AND LastName IN :fn AND Email IN :email]) { ... }` As you can see, it'll pull in records that don't match, but using binding this way circumvents the 20k character limit.


Wifi suddenly going off periodically

Question: My wifi connection is connection is being interrupted constantly on my Ubuntu laptop.
It still keeps connected to the network but isn't able to reach the internet.
This happens both with the internal network card (Intel Corporation Wireless 7265 (rev 59)) and my USB external wifi card (Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]).
This is the relevant error found when running dmesg:
<code>[ 9017.742536] iwlwifi 0000:04:00.0: Failed to wake NIC for hcmd
[ 9017.742560] iwlwifi 0000:04:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
[ 9017.742561] iwlwifi 0000:04:00.0: Scan failed! ret -5
</code>
I have tried everything I've found Googling (mostly on the Arch Linux forums) but nothing has worked for me at this point.
Is anyone else having this issue?
Answer: One possible source of the problem is excessive heat, because of Summer air temperature... Try turning off the computer and only turning on at night, when the air temperature is lower. If does not work the same, forget the temperature issue!

Wifi suddenly going off periodically


Pressure exerted by a liquid on the bottom of a submerged object

Question: I understand that pressure increases with depth in a liquid and that it is the difference in pressures at the top and bottom of an object submerged in a liquid that provides the buoyant force. What I do not understand is how the liquid exerts a pressure on the bottom of a completely submerged object. Isn't all the liquid displaced at this point? (No liquid remains underneath the object???) And if the pressures exerted horizontally are equal and opposite, it seems there is a net pressure directed downward. How then is the buoyant force still dependent on pressure differences and directed upward?
Comment: See also [Does an object need fluid under it to float?](https://physics.stackexchange.com/q/365887)
Answer: An object being completely submerged does not mean that there is no liquid underneath it - it means that no part of the object is poking out above the liquid.
If you push the object all the way down so it is in contact with the bottom of the container, you still might have some liquid underneath it because rigid objects tend to have variations in shape and surface texture which may make it impossible to remove all of the liquid below.
If your object is sufficiently soft and pliable to push out all of the liquid underneath it, then you are correct - there will be no liquid pressure pushing the object upward, which means there will be a net force holding the object to the bottom of the container.  What you are describing is a suction cup, which works both in liquids and in the air by exactly the same mechanism.


Undelegating on Galleon wallet

Question: I want to un-delegate so that I can send XTZ to another wallet address. On Galleon Wallet, it seems that the only option is to "change" delegates, because when I leave the "new delegate" address blank, it will not let me complete the operation. Can someone help?
Answer: You don't need to « undelegate » prior to « redelegate ». Just point your contract to the new baker and this will work. Similarly, you do not need to undelegate to transfert the tokens. You are in control of funds you can just transfert them.
Comment: No, I want to un-delegate so that I can transfer all XTZ to another address.
Comment: @Tri you do not need to undelegate to transfert the tokens. You are in control of funds you can just transfert them.
Answer: Everything is quite simple - this is good Tezos! Start a new delegation with a new address and transfer tokens from the old address to the new one. Everything will happen without loss of rewards!
Answer: did you manage to do this? I want to do the same thing, move all my Tezos to my Ledger and delegate to the same baker if possible. I don't understand these answers:
@Ezy What does "Just point your contract to the new baker" mean? I want the same baker but I want to store my XTZ on a different wallet, i.e. Ledger instead of galleon or tezbox. Its like the XTZ is stuck.
@Tezosbakes What do you mean "Start a new delegation with a new address"? What new address? New baker? 'New' as in 'other' address? Like my ledger address or? "transfer tokens from the old address to the new one", ok, are we talking about from the baker or from the galleon address or?
The answers here do not explain it properly. I setup a stupid tezbox, which i've imported into Galleon, so when I try send the tokens to my ledger wallet from Galleon Wallet, I get this error:
<code>cannot read property 'signOperation' of null
</code>
Why is there no simple: Stop delegating / withdraw delegation / pause and move funds functionality? They've tried to make it so simple, they've actually made it complicated.
Pls halp
Comment: @Ezy is saying that you don't need to transfer your Tezos to delegate to another baker, you also don't have to cancel your delegation when you want to move your Tezos!
Comment: IF you want to move your coins to a ledger, just do the following: 1. transfer coins to ledger, but leave 0,0001 Tezos in your old wallet. 2. delegate your ledger address to the baker of your choice. 3. After 30-40 days or so, check your old address to transfer the baking rewards that accumulated there to your ledger wallet. (your old address will accumulate staking rewards for the coins you had delegated in the last 7-12 cycles since there is a delay between delegating and receiving rewards!
Answer: I was having the same problem, trying to empty an address that was delegated. The error was:

Emptying an implicit delegated account is not allowed.

Although not ideal, a quick workaround was to leave some dust (0.01 XTZ) behind in the address.

Undelegating on Galleon wallet


Excessive noise/vibration in the cabin of 2009 toyota camry

Question: I just bought a used 2009 Toyota Camry LE from Ontario, Canada. I have only driven the car for 1 month in Nigeria and I am still using the Pirelli Winter tyres the car came with. While driving, I observe there is a lot of strange noise in the cabin of the car, and it increases with speed especially on the highway. I always have to increase the volume of my sound system in order to  hear what is on radio or CD player. At speeds above 100 km/hr, I observe additional hum sound/impact similar to friction between 2 metal surfaces. My mechanic inspected and showed me that 2 of the mounts are due for change - one is at the vertical shaft that connects to the front left wheel and the second is behind the engine block inside the bonnet.
Please, help provide guidance on what to do to fix this problem.
Answer: Well at the risk of sounding crass, I think you already know what you have to do. The winter tires will cause an excess of road noise on dry pavement. I doubt you will ever need them in the area of the world you are in, so would highly suggest you replace them with some good summer tires. The first bushing you are describing sounds like the strut mount at the strut tower. If this is worn out, it to will cause excessive road noise. The second bushing you are describing sounds like an engine mount or torque bar. Again, this is another item, if worn significantly, will cause an excessive amount of engine vibration to enter the cabin. Getting all three of these things replaced should greatly reduce the amount of road noise/vibration you are hearing when you drive.


How to find Bretta?

Question: How can I get to Bretta in Hollow Knight? I can't seem to find a secret passage to get to her.
Answer:
Make sure you have the air dash, double jump and wall climb abilities. The double jump is optional but makes things much easier.

Go to the very bottom right room of the Fungal Wastes, where there is an entrance to the Royal Waterways. Do not enter the waterways.

Look at the map. There is an icon at the bottom of the room you are in. It shows a small statue. Go to the statue. This is where the Dashmaster Charm can be found if you haven't picked it up already.

Walk through the wall to the left of the statue. If you can't walk through it directly, try attacking it first.

Go as far left as you can in the room you just uncovered and climb the wall up as high as you can. There is a hole in the roof that you can get into with some tricky jumping and dashing. If you have the double jump, this is much easier.

Follow the linear path after this. There will be a lot of spikes to avoid.

Bretta is sitting at the end.

How to find Bretta?


How to find DOS Header and PE Header with an entry point in Radare2?

Question: I am currently doing byte extraction from PE files using Radare2. I know how to find the byte sequence for DOS Header and PE Header when there is no entry point and the start is defaulted to 0x0. But some of them have an entry point at 0x4#####.
I can retrieve the vaddr (virtual address), paddr (physical address), and haddr  (e_entry\AddressOfEntryPoint in the binary header) of a certain file with an entry point.
How do I use that to find the byte sequence for the DOS Header and PE Header?
Answer: You can load the file as raw, using -n or -nn option and then you will have those structures available at 0x0.
r2 -n ./open-wsl.exe

It also contains some function to operate and print on those structures in a nicer form. Check the pf? group for more info.


Synology NAS can only be mounted (as nfs) when connected by cable

Question: I bought a Synology NAS DS216se on Wed. Dec. 26th. After first tests with samba, which were very slow, I mounted it as nfs.
It got better. But during a huge rsync it came to my mind that probably using a cable instead of Wifi, might help speeding up...
It did (slightly) and I got no complaints during rsync switching to a wired connection.
After some more test yesterday(Dec. 30th) I restarted my computer. After that I was unable to mount the NAS as nfs.
Always getting: "mount.nfs: access denied by server while mounting"
I completely reinitialized the NAS (RESET) and tried and searched the web ... to no avail
After 10 hours of desperate search I remembered that my first mount used Wifi. Unplugged the cable and I could mount it.
Anyone knows a reason for that? And probably a solution?
I've tried several types of entries in /etc/fstab like:
NASServer://volume1/Directory /media/NAS-mount-point nfs auto 0 0
Comment: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/File_Sharing/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS
Answer: Linux:
If you are using named hosts (NASServer) make certain that they are defined in your /etc/hosts file, otherwise use the IP address.
Then fstab can be (one backslash, not two as you have used):
NASServer:/volume1/Directory /media/NAS-mount-point nfs auto,defaults,nofail 0 0

Plex Forum - "How to mount media from your NAS shares on Linux using NFS"
Unix & Linux - "How to edit /etc/fstab properly for network drive?"
AskUbuntu - "NFS Shares - one IP Read/Write, rest Read-Only"
Comment: Thanks, but it obviously doesn't matter if there are 2 backslashes or one (tried it)


What algorithm for solving a set of stiff ODEs would be easiest to port to high precision floating point arithmetic?

Question: I want to solve a relatively small system of stiff ODEs (< 10 first-order equations) using high precision floating point arithmetic (using MPFR or alike). What would be the easiest algorithm to implement/port? I'm not only interested in the "stepper" algorithm, but in the combination of stepper/error estimation/step size control.
Answer: This may be a bit outdated, but Hairer and Wanner's book recommends their own radau5 code. In my own experience, this code is both extremely robust and efficient. It is also a rather straight-forward Runge-Kutta scheme, and thus not too difficult to implement.
There's a Matlab implementation of radau5 by Christian Engstler somewhere out there.
Comment: `radau5` is a fully implicit Runge-Kutta method using 3-point Radau quadrature to provide fifth order accuracy. Hairer also wrote a variable-order code named `radau` that can provide much higher order. SDC is also not a bad choice if you need extremely high order accuracy.
Comment: Thanks Pedro. The RADAU code by H&W is my "reference" code now :-) I've been very happy using it but I wasn't sure I was up to porting it...
Comment: Pedro, since the ODE's are stiff, wouldn't this require an extremely small time step?  Mightn't it be more advisable to use an implicit method instead?
Comment: @Paul: `radau5` uses, if I recall correctly, an implicit Runge-Kutta scheme. In any case, we were using it quite successfully for stiff ODEs.
Comment: I know people who have had success hacking DASSL and DVODE, and of course, DVODE was ported to C to become CVODE, but I don't know that it makes those codes "simple" to port. Since I work with extremely stiff systems in combustion, I tend to be partial to BDF methods over IRK methods, because that's what that community uses.
Answer: Obviously, using multiple precision data types like those in MPFR only makes sense if numerical roundoff is at least around the same order of magnitude as the discretization error. You can only achieve this with high order integrators, so anything that has less than, say, 4th order will not be a useful candidate, and even higher order is better.
I'm not an expert in ODEs to recommend an integration package, but the considerations above may narrow your choice.
Answer: I prefer to always take a benchmark-informed approach to this. Look at the SciML Benchmarks:

https://benchmarks.sciml.ai/html/StiffODE/VanDerPol.html
https://benchmarks.sciml.ai/html/StiffODE/ROBER.html
https://benchmarks.sciml.ai/html/StiffODE/Orego.html
https://benchmarks.sciml.ai/html/StiffODE/Hires.html
https://benchmarks.sciml.ai/html/StiffODE/Orego.html

Generally, the Rodas5 in Julia's OrdinaryDiffEq.jl algorithm (mixed with automatic differentiation for the Jacobian) performs best in this territory (or Rodas5P). Note it already allows for MPFR bigfloats for arbitrary precision, so it could be used for this without modification just by changing the initial condition and time span to big. For example:
using OrdinaryDiffEq
function lorenz(du,u,p,t) # just for show
 du[1] = 10.0(u[2]-u[1])
 du[2] = u[1]*(28.0-u[3]) - u[2]
 du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = [1.0;0.0;0.0]
tspan = (0.0,100.0)
prob = ODEProblem(lorenz,big.(u0),big.(tspan))
sol = solve(prob,Rodas5())

MPFR bigfloats are slower than things like ArbFloats and 128-bit floats, both of which are compatible as well, so I'd suggest looking into some of these alternative extended float types if you really want to optimize it.
BDF methods like SUNDIALS CVODE, DASSL, etc. have difficulty scaling down to there (for DASSL, see the DAE benchmarks like this one.
Radau is the only other one that comes close in benchmarks, because it has a pretty good convergence rate.

Note that only the adaptive order one is competitive, radau5 is not. There is currently a pure Julia RadauIIA5 which outperforms the Fortran one and is compatible with high precision arithmetic (in the same way as above). You'll see it in the benchmarks, but the benchmarks show that RadauIIA5 > radau5 but scaling needs adaptive radau, which we don't currently have but wouldn't be too hard to implement. If you need it sooner, we could look into it.
The implicit extrapolation methods (like ImplicitEulerBarycentricExtrapolation) have very good scaling to low tolerances because they can make use of multithreading as the problem gets harder and the order increases. You'll see they start to do very well at the edge of the benchmark, and benchmarking at lower tolerances might reveal them to be the most efficient in that category. So they are worth a shot, but note you will need to do things like tweak the initial and upper bound on the orders to really get them right. I think they can also receive a few general code optimizations to boost them still too: they are quite new.

I don't know if your problem would be tractable using a high order Taylor series method

Generally Taylor methods are not stable for highly stiff equations. At least, I haven't seen one that has a large stability region, the simple idea is a simple explicit extrapolation which has a not so fantastic stability region (on par with RK methods).
Answer: There are existing implementations, though I don't know of any that are publicly available.  You could ask Glaser and Rohklin for their implementation of the methods described in this paper.
Answer: I don't know if your problem would be tractable using a high order Taylor series method, but if so, and you're comfortable with implementing a solution to your problem in Python, then you could try a combination of mpmath, SymPy, and possibly pytaylor (which is not as well-established as the first two Python modules, but does implement 4th order RK in addition to Taylor series methods). Based on a quick read of a paper by Nedialkov in BIT, it seems as though a sufficiently high Taylor series (of order 20-30) could be used for highly accurate, efficient numerical integration of mildly to moderately stiff problems. (Nedialkov studies the differential-algebraic case; presumably, these results must also apply to ODEs.)
Whatever solution method you choose, I encourage you open-source your work, since it sounds like it'd be a useful contribution to the ODE software landscape.
Comment: I've decided to look into the Taylor methods; probably using mpmath. Thanks to all for the quick and good answers.
Comment: The link to the paper by Nedialkov at `springerlink.com` is broken. I'm also unable to find any copy saved on the Wayback Machine.
Answer:
Is DLSODE an option?
Is the system linear? If so, DGPADM is probably the best.

They are relatively self-contained, so not too torturous to re-code if that's what you need to do.


Why do bread companies add sugar to bread?

Question: I have a client who is on a sugar detox/diet. She can't eat any bread because all the bread companies added sugar. Why do bread companies add sugar to their breads?
Answer: Regardless of the ... awkward title of the question: Adding sugar instead of other sweeting agents to bread can have several reasons:

flavour (caramelization)
texture of the crumb (substituting sugar with another sweetening agent has a big impact on the chewiness of some chocolate cookies. I'm not sure whether the effect of adding sugar to bread has such a great effect)
texture of the crust (caramelization)
appearance (caramelization makes the crust look browner)
"food" for the yeast that makes the dough rise (if yeast is used as a baking agent at all)

Or - in case that the bread is really, really sweet: shelf life.
Comment: The sugar can only caramelize in any significant quantity when the temperature well exceeds 212 F / 100 C, which *only* happens in the crust.  While it may contribute flavor throughout the loaf, that flavor is simply sweetness, not caramel notes except in the crust.   Sugar can affect the structure of baked goods, but is unlikely to be used in sufficient quantities in a yeast raised bread.  So really, only your last two bullet points apply.


How to display images formula fields in LWC datatable not AURA

Question: How to display image formula fields in lightning datatable ?
Comment: See this https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation specifically `Creating Custom Data Types`
Comment: Just create a subclass of the data table and provide custom component implementing this?
Comment: @zaitsman can you give some more details and point towards some examples
Answer: As author have stated, we can use this link to learn how to create custom type:
https://salesforcecodex.com/2019/10/show-image-in-lightning-web-component-data-table/
Afterwards, in the HTML of your custom type, create a lightning-formatted-rich-text which takes the variable string as literal HTML - so it displays correctly:
<template>

        <lightning-formatted-rich-text value={value} ></lightning-formatted-rich-text>

</template>

Answer: Thank you @zaitsman thats helpful.
And also found this example online
https://salesforcecodex.com/2019/10/show-image-in-lightning-web-component-data-table/
Thank you Dhanik Lal Sahni for the detailed example.
Comment: hi, how did you solve this? because, the link you sent is intented for urls, and what you have (and me too) is an html markup... how does that work?


Permissions with partner communities

Question: I'm working with partner communities, I intend to give permissions to a report to a partner user and I get the following error "Insufficient Privileges You do not have access to run this report. Contact your administrator if you need access." I'm sure I gave permissions to the folder and the dashboard, but does not allow me to see the detail of the report, someone has any idea that I might be missing? how to fix this?
Answer: Obviously the problem was totally permissions on the user's profile of communities to solve the problem, I got to download the xml files of the profiles and take the one I need and a very similar profile and start comparing field by field, class by class and page by page, the differences and add the missing permissions profile, as there were custom objects that could not see from the home page.

Permissions with partner communities


How to find actual hex value of color opacity in GIMP

Question: I have a layer of color Red. It is a little transparent. I want to find actual RGBA value of it. The opacity is in percentage an I want the hex value of it. Is there any way, thanks.
Answer: If you have a background layer or any layers underneath the colour you wish to sample, hide them in the layers panel by unchecking the Eye icon, so that you can see the transparency grid through the colour. You can unhide them later.

Do Windows > Dockable dialogs > Sample points

Hold down Ctrl and click and drag from the ruler to drop a sample point on the colour you wish to sample.

The RGBA values will be displayed in the Sample Points Panel.

Example

Convert the decimal numbers to hexadecimal using an online converter. For example the above sampled values would be #ff00006d
Comment: I am not used to using alpha values on hexadecimal notation. This is a good reminder that can be done.
Comment: @Rafael - yeah, I sometimes use the full RGBa hex code in Inkscape where you can [type it directly into the fill/stroke dialog](https://imgur.com/LzRLHvc).
Comment: @Rafael and obviously in SVGs, where e.g: **style="fill:#ff00006d"** is valid.
Comment: Thank you, it helped me alot.
Answer: Use the pointer dialog (Windows > Dockable dialog > Pointer). It will show you the pixel value (in many forms, RGBA, RGBA as percent.., HSV...) and with the hex notation, at the pointer position, for the active layer or for the whole image ("Sample merged" option).


Transferring apps to new phone

Question: Applications
I updated my phone from Samsung s4 to Samsung a8. I transferred all my info with smart switch. Some app's  appeared and the rest are "in progress". It has been several days now, why are the apps still in progress please help. Btw I do not have WiFi
Answer: So I believe you used a USB cable with a USB/microUSB adapter ?
If so, you may want to check the quality of your cable and/or use a better one (USB cables are NOT "all the same" : some are excellent, some are utter sh*t).
Unfortunately, the only tool I know for that goal is the QooPow qualMeter : http://www.qoopow.com/. It's a physical tool (= not an app) and a bit pricey, but if you find yourself lost in your cables, it might be a good investment for the future (your friends may find it useful too. Why not pool some money to get one for the lot of you ?).
Answer: Use ApowerManager , not only the applications but also videos,
 photos,contacts, messages, notes, books can be traferred from one phone to PC. Then import the files to your new phones. It gives you free choice to pick out the files you want.
Comment: A number of questions to fulfill here: 1. What is your connection to this software - do you have an affiliation with this company and its software? 2. Why do you link directly to the company download vs. the apk on Google Play? 3. Are the versions different, and in what aspects?
Comment: Apowersoft is mostly known for spamming this site, which really doesn't say much for the quality of their software.

Transferring apps to new phone