How do I set a variable in the install profile to enable users to sign up for the website

Question: I am trying to understand about how setting variables works in install profiles. As an example, how would I set the option to enable people to create a website for the account in the install profile? Here is the page on variable_set https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/variable_set but how do I retrieve the value.
Comment: You don't know how to set variables in profile, which one to set, or how to retrieve it?
Comment: I don't know how to set, or how to find out which one to set.
Answer: Variables in install profiles work no differently to variables in a 'normal' bootstrap.
To set a variable use variable_set():
variable_set('var_name', 'value');

To retrieve it, use variable_get():
$var = variable_get('var_name', 'default');

To find the names of variables, the easiest method is to install the Devel module and visit the variable editor at /devel/variable
Comment: How do you know what the var_name is ?
Comment: @AndrewWelch Just updated the answer - you either need to check the variables table (which you can do through the UI with Devel), or go through the code for the various admin forms that set those variables to find the name(s).
Answer: Users can register at your Drupal 7 site by default but you have to disable that. If you want to do this, just put following in your profile.install file:
// Only administrators can create user accounts.
variable_set('user_register', USER_REGISTER_ADMINISTRATORS_ONLY);

It would make sense to copy the standard installation profile to have a good base and then you just could add these two lines from above :)


Synchronize Sharepoint Group to Active Directory Group

Question: How could I synchronize a SharePoint group with an Active Directory Group. It should all the time show the same users from SharePoint Group in Active Directory Group.
Comment: Are we talking here about SharePoint Online or SharePoint Server?  If it's online than the answer is no.
Comment: Sharepoint Enterprise.
Comment: And Sharepoint 2013.
Comment: So you are using on-premises SharePoint, not SharePoint online, right?
Answer: Why not using AD groups directly in SharePoint? They are a lot easier to manage, and you can assign permissions to them, the same way as you were using SharePoint groups.
Comment: They aren't all quite the same. SharePoint can take hours to recognize changes to a user's AD group change. Also, workflows can't expand tasks inside an AD Group. That said, there is no native way to replicate Group Membership changes to the AD, needs to be implemented.
Comment: But how could I add user to AD Group by Javascript ?


Preventing AOO during a charge

Question: A DM ruled that a charge doesnt provoke an AOO because there is a feat that makes jump checks work like tumble. He could not come up with the name or source of the feat. And it was eventually overturned. Does a feat or any ability actually do this?
Answer: Charges, by default, provoke attacks of opportunity as normal for any movement. The core rules are somewhat less than explicit on this—they just say that movement usually provokes, and nothing in the charge rules says otherwise for them, so that default prevails—but Rules Compendium is explicit, stating that the movement for a charge provokes as normal (but the charge attack itself does not), on page 27.
Tumbling can avoid attacks of opportunity, but it is not automatic—the person has to succeed on a Tumble check to do it. Likewise, the existence of a feat means little for someone who does not have that feat.
Core is even more unclear whether or not Jump or Tumble can be used while charging—it simply does not say, and arguments can be made either way. Rules Compendium is again explicit on page 27, but now this might arguably be contradicting the core rules, which might arguably be a problem—see this Q&A.
Anyway, as far as I am aware, the only feat that addresses attacks of opportunity while charging is Ride-by Attack, which makes it so the target does not get provoked. Everyone else still does, though. There is not, that I can find, a feat to use Jump instead of Tumble while charging—closest I can figure is Battle Jump, which lets a jump from a height count as a charge (and has numerous other benefits besides). That doesn't affect attacks of opportunity.
Comment: You use the phrase "might arguably" twice in the same sentence, which... feels tacky.
Comment: @ObliviousSage And, based on the fact that I specifically went back and re-added it after you removed it, you might have gotten the impression that it was entirely deliberate. I want to highlight that we've got a debatable point on top of a debatable point here.
Comment: No mention of the feat [Leap Attack](https://rpg.stackexchange.com/q/38141/8610)?
Comment: @HeyICanChan Despite the fluff intro about combining a charge and a leap, the feat's benefit doesn't seem to have anything in particular to do with charging, for all it is one of the defining feats of the Übercharger. Hence going with Battle Jump as the "closest I can figure."

Preventing AOO during a charge


Whait is the use of the managerId on user

Question: What is the use of the managerId on the user object ? Can it control visibility of data without explicitly generating sharing manually for the manager?
Answer: ManagerId does not control the visibility but has an important role in the approval process inside sfdc .Because of this field you can dynamically assign records to corresponding managers .
Also if you are explicitly writing some sharing rule you can make use of this field .
It is very different than delegated User concept .Infact for delegated Approver there is a separate field on the User record .
Answer: You can also use hierarchies to organize access to records.
Here you assign your manager a role that is higher in the hierarchy than the role you assign to his employees. Then the manager can see every record that is owned by his employees.
For info read here: Salesforce Documentation on hierarchies


Establishing an MQTT connection using Arduino Mega and ESP8266

Question: As the title says, I want to send MQTT messages to a server using ESP8266 with an Arduino Mega as controller, but so far, every library that I have found is based on Ethernet. I don't want Ethernet, I want WiFi, so those solutions don't work for me.
I have tried using PubSubClient library, but the problem is that to create an instance (PubSubClient client(?????)), I have to set a client. What should I put in there? Is there another library I must use?
Answer: You require an ESP8266 library that implements the Arduino standard Client & Server classes (or at minimum the Client class).
Personally I'd program the ESP8266 directly to make it perform the MQTT request itself (using the libraries bundled with the ESP8266 core). Have the Arduino tell it what to send through some protocol you make yourself over UART.
Answer: you have the AT firmware in the esp8266?
use WiFiEsp library
or if you can change the esp8266 firmware, you could try JeeLabs esp-link


How to add a blog filter bar without paying money. (example inside)

Question:
Hello, I saw this type of blog filter on a website and I really liked it. I was hoping I could add something similar on my site but I haven't found a way to do so without a plugin. If anyone has experience in this, please share, thanks! :^)
Answer: The filter that you see is not really a filter, it's just menu links.
Each menu item such as the link that says "Support" will show posts that are in the "Support" category.
First go to WP > Posts > Categories and create a category called "Support". Then add posts to that category.
Go to WP > Appearance > Menus and add the category called "Support" into your menu. Users will now see all posts of "Support" when they click that menu link.
Comment: Hey, thanks for the answer. What I have done is I created a new menu and put in my categories. My question now is, can I make it that the menu doesn't show where the primary menu shows on the header but it shows right above the blog? I am using elementor aswell and I'm wondering if I will have any issues adding the menu because of elementor. Dont know if I can post links but https://gyazo.com/e00c8909ebf5c60e7f1ea31000a8fff1 . I want the menu to show just below the big BLOG, Thanks
Comment: Inside of Elementor you can use the element for the menu. Then insert the menu using elementor. There are different ways to insert menus, one is elementor elements, the other is widgets and the Navigation widget, and third is regular text with links.
Comment: I see I see, thats pretty cool, thank you. I was wondering what you could do with wordpress elements in elementor. Ive created text as my 4 categories, how do I link them so that they dont throw you in a different page but just categorise the posts?
Comment: Each category in WordPress is a page. Therefore when you link a user to click on a category it will go to a different page, the page of that category.
Comment: Alright, sounds good. Thank you alot!
Comment: Please upvote the answer if it has helped you.


What's the component that consumes most power in a computer?

Question: I've never been a serious hardware guy, so I got this question. What's the component that consumes the most in a computer? And more generally, how is distributed (more or less) the consumption among different components (processor, MB, RAM, disks, graphic card, WiFi) ?
Answer: Usually it's the video card and CPU - in that order as far as max consumption goes.
A Core i7 920 is spec'd for a max draw of 130W
An ATI HD4870 is spec'd for 225W max draw.
In reality both consume significantly less power, but the video card still consumes more.
Extreme Power Supply Calculator is a great tool for getting average draws of components in systems.
Comment: Actually hard drives only suck down about 10-15W. After they've spun up, it takes very little power to keep them chugging along.
Comment: A very rough rule of thumb, the more cooling that component has, the more electricity it draws. That electrical energy it draws, must go somewhere (1st law of thermodynamics), except the WiFi, most of that energy is dissipated as heat in the case.
Answer: It depends on the type of system you are looking at;
In a small netbook the main power draw is likley to be the display or hard drive as they have very low powered CPUs and integrated graphics.
In a large gaming PC main power draw is going to be the graphics cards and the CPU and in comparison the HDD and RAM would have relatively low power consumption.
Things that will never draw a lot of power are things like wi-fi cards, bluetooth, USB peripherals and integrated speakers.
Also it depends on what kind of task the PC is doing, when most components are idle they use less power. If you are gaming, most of the components in the PC will be running full power. But if you are just re-encoding a video, it will be primarily the CPU doing the work and most other components will be idle therfore using little power, so the CPU would be the most power hungry.


Modifying search scoring algorithm

Question: Is there any way to tweak the way search score is calculated? For example, I would like words in the title field to be scored higher than the same terms in other fields.
Comment: I can't seem to find anything on the technicals, but how is the whole "best-match to worst-match" thing calculated? For example, if I was to have, an entry with the title "Top Trees" then "Top Trees" I would expect to be a "best-match"?
Comment: Hi Chris, would you mind splitting these into two separate questions? You're more likely to get a good response to your second question that way.
Answer: Seems to be the new standard since version 2.2.2582:
"Entry and category search results now place a 5X weight on search term matches within Title fields."

Modifying search scoring algorithm


Is it possible to driver two parallel MOSFET by using single optocupler (TLP250)?

Question:
I am Using TLP250 to drive IRFP260N MOSFET . If i use separate driver to drive MOSFET i need two power supply . so i am looking for single drive solution for multiple mosfet .
Answer: It is possible. It is advisable to a resistor in series with each gate to help avoid oscillations.
Careful PCB layout is also a must - keep the source inductances matched and as low as possible. Put the MOSFETs as close together as possible, wire the sources together with as short and wide track as possible and connect to your gate driver at the mid point of that track.
Answer: The gate of a MOSFET behaves pretty much like a capacitor. When switching, whatever device is driving the gate must charge or discharge the gate.
Two capacitors (or gates) in parallel behave like a capacitor with double the size. So the worst that can happen is that the switching of the MOSFETs needs double the time; this might become a problem if they switch lots of current, and they stay longer in the active region where they must dissipate lots of power.


Delay reloadData on UITableView

Question: I have a UITableView. On the tap of a button i want to display my custom view, then, once the view is visible, remove a particular item from the tableview. The custom view hides the tableview so i would like the remove to occur after this new view is visible.
Currently, i have this, which adds the custom view and then should remove the item, and reload the table, but the reload is occurring just as the animation ends (i have an animation block, changing the views alpha), so i can see the update.
[self.view addSubview:customView];
[itemArray removeObject:object];
[self.tableView reloadData];

How can i delay the reload until after the view is visible?
Thanks.
Answer: Try adding reloadData to viewDidAppear:
-(void) viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [self.tableView reloadData];
}

That should give you the required delay.
Answer: or you can use the performSelector method :
[self performSelector:@selector(myOtherMethod) withObject:nil afterDelay:1.5];

Answer: You mention you're animating the view yourself; you should call reloadData when the animation completes by using something like:
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(methodThatCallsReloadData)];

// or even
[UIView setAnimationDelegate:self.tableView];
[UIView setAnimationDidStopSelector:@selector(reloadData)];

or if you're using the block-based API:
[UIView animateWithDuration:... completion:^(BOOL finished) {
    [self.tableView reloadData];
}];

Comment: Thanks this works great. I would prefer the blocks API, but since its only 4.0+, my 3.2 users will crash

Delay reloadData on UITableView


How can i show document type in my listview?

Question: I want to show my document types .xls , .png, .doc etc. I did not find it to show. only shows a picture of them. But i want to group them by this type. How can i do that?
Answer: when you create or modify your view then go to Group section and use Type(Icon Linked to Document)

then you will get the results grouped by documenttypes
Comment: How can i use it ? Do you mean sharepoint designer or visual studio ? I trıed to do that in online list view modify . But i did not see this column.
Comment: I updeted my answer @f_gulay
Comment: I trıed this before but it is grouping them with an icon.
Comment: I added a picture of mine.
Answer: Melad's screen capture is for SharePoint Online's "modern UI" while f_gulay's screen capture is from an on-prem version, or from SharePoint Online using the "Classic UI".
To get the file type as text in the Classic UI / On-prem UI will require a workflow. (The file type text is part of the library's data, but not selectable from a View.)
The workflow:

Create a new column in your library (Example: "File Extension").
Create a SP 2010 or SP 2013 style workflow.
Add a "Set Field in Current Item" Action.
Set the "field" to your new column.
Set the "value" to "Current Item:File Type".
Set the workflow to start on Created and on Changed.
Create a view that groups on your new column.
Upload documents. (this will run the workflow on each new document.)

The workflow:

The result:


Unlock and Unistalling the Sample Data - Blog plugin in Joomla 4

Question: I want to Uninstall the Sample Data - Blog plugin, but the plugin can't be remove when it's stil locked. How to unlock the Sample Data - Blog plugin in Joomla 4?
Comment: Thank you for your question.  Please take our [tour].
Answer: Since 4.0 all core extensions are locked and cannot be uninstalled. Their files are re-introduced after updates anyways. But you can still disable most core extensions, including the sample data plugin.


The mystery of coconut tree

Question: Could anyone please explain to me, why the nail which is nailed in a coconut tree is not raised from ground level, when the tree is growing up?
Comment: Could you please expand the informat
Comment: Could you please make me understand what you are asking?
Comment: Thanks, it's clear from the answer. I just wasn't sure which "rising" you mean.
Answer: First it needs to be said that coconut trees are not true trees, but palms, whose trunks are made of stems which grow in a cross woven pattern.
That being said - its true for any plant that no plant grows from the bottom up.  If you make a mark on any plant that mark will not rise much as the plant grows.
Plants grow from buds at the end of their stems.  As the plant grows taller  its because the tissue adds from the ends of its branches/stems.

In this illustration you can see the terminal bud, which is where the plant is growing up and also out into branches.  The palm is more like a bundle of grass stems, so the terminal bud is not obvious, but the leading edge of the grass will grow here.
A tightly wound core of stems in the crown of the palm, called the Heart of Palm is where the palm grows (see "growth point" in picture below).  It is also a terminal bud, but it is not as exposed and is not as obvious.

(figure from The Food and Agriculture Organization of the UN, fao.org)
Comment: "*if you make a mark on any plant that mark will not rise much as the plant grows*". This is not the case for plants with intercalary meristems, e.g. grasses (including bamboo). It should be true for woody plants though, as well as relatively large, established palms (I'm not sure about the growth patterns of palm saplings).

The mystery of coconut tree


ARIMA adjusted $R^2$

Question: I would like to know the variance explained by my ARIMA model. Is there something analogous to the adjusted $R^2$ in multiple regression that I can use to asses explained variance of my ARIMA model?
Answer: You can use adjusted $R^2$ in ARIMA just as you would in a linear regression for cross-sectional data. The interpretation does not change. The same holds true for $R^2$.
Comment: Thanks. I was able to apply this and get exactly what I was looking for.

ARIMA adjusted $R^2$


Why does Microsoft Word create two copies whilst in use?

Question: Why does Microsoft Word create another copy of the same file, but hidden, whilst in use?
And why does the file created whilst in use always have "~$" replacing the first 2 letters of the file name?
For example:
Comment: Its used as a lock file.
Answer: The file you refer to is a temporary file which serves a number of purposes. From Microsoft themselves:

A temporary file is a file that is created to temporarily store information in order to free memory for other purposes, or to act as a safety net to prevent data loss when a program performs certain functions. For example, Word determines automatically where and when it needs to create temporary files. The temporary files only exist during the current session of Word. When Word is shut down in a normal fashion, all temporary files are first closed and then deleted.

Speed
Going on from this; these temporary files help improve speed. If your system is struggling with not enough memory, Word will help it along by shifting non used functionality from memory to disk in the form of a temporary file.
Integrity
In order to ensure the integrity of your file in the event of system error, information is written to temporary and onto the original file. Should you have any error occur it can be restricted/recovered from temporary files rather than your core file.
Locked Files

When you open a file that is locked, either because it is open in another window of Word or because another user on the network has it open, you can work with a copy of the file. Word places this copy in the Windows Temp directory. Likewise, if a template attached to a document is locked, Word automatically makes a copy of the template in the Temp directory. The copy of a locked file does not automatically update the original owner's file.

Owner File <code>~$</code>(Same Directory as Source File)

When a previously saved file is opened for editing, for printing, or for review, Word creates a temporary file that has a .doc file name extension. This file name extension begins with a tilde (~) that is followed by a dollar sign ($) that is followed by the remainder of the original file name. This temporary file holds the logon name of person who opens the file. This temporary file is called the "owner file."

Source - Microsoft
This is a sizable topic. I have provided a number of examples on this files useage, but please use the source provided for a detailed list of reasons from Microsoft. I don't want to copy/paste the entire page here.
Comment: This is incorrect, the files are there to prevent two users from trying to edit the files at once, a situation that causes the `This file is locked for editing by...` message. Word also uses autosave files to allow document recovery but these are not the same thing and are stored in a different location.
Comment: The `~$.docx` files the OP specifically asked about are referred to in the article as **Owner Files**. Your article is right about the use of temporary files in general, I was simply pointing out what those specific ones were used for.
Comment: @James | Apologies this is indeed correct. I have included the piece you mentioned in my answer to address this specific part of the OP. Thanks for pointing out that oversight on my part.
Comment: @James | I have included a bit on locked files. As you can see from the link it is a lengthy topic. I didn't want to copy reams of information and rather provide a couple examples and give reference to the source. For your benefit I have added this bit.
Comment: This only partially explains it. Why doesn't Microsoft just use the standard Windows file locking mechanism instead?
Comment: likely because the standard locking is exclusive. using temp files, that isn't necessary, though it can and will cause update conflicts (last in wins). you also don't get recovery.
Answer: Primarily because of the Autosave features. If you don't tell a document to save your changes, do you expect it to save over the original with no command to or warning that it will happen? It also allows your changes to be recovered if Word crashes and you hadn't saved for 2 hours. By default there will be a 10 minute old version of your changes that can be recovered.
On a more basic level, it allows one user to open a file on a share and read it while another user has it open for modification, though if multiple users are editing it, last-in-wins.
Answer: This file contains state information of your current editing.  You should not bother about it.  The intention is that when Word crashes (what virtually never happens, cough), Word would hopefully be able to recover the changes you have made but not saved yet.
Answer: I believe that they are temporary files. Word deletes them after you save and close your file.


Why don't chips switch to reversible computation model to save energy?

Question: Reversible Computation Models at least do not consume energy, according to physical laws, since no information is erased. And there are also Fredkin Gate and Toffoli Gate which can effective simulate classical irreversible computation circuits. So why don't chips switch to reversible models to save energy consumption? Is it the problem of "noise" that occurs in computation? What kind of "noise" then?
Comment: This does not look like a *theoretical* computer science question. Your question is about computer hardware, it might be suitable for [electronics.se]. Please read the [FAQ] to understand the scope of cstheory.
Answer: there is a lot of interest however it appears there are some early prototypes but overall not commercial chips so far.  see eg Reversible computing is 'the only way' to survive Intel's heat mentioning michael frank at UF, his page here RevComp - The Reversible and Quantum Computing Research Group.
from what I can tell it looks like the reversible designs probably require larger chip area to compute the same problems and current designers would rather pay for mainly minimizing chip area at the expense of "heat". and designers have gotten very adept at minimizing heat in nonreversible designs.
one area of new innovation are energy capturing designs that can capture waste heat and convert it back into electricity. eg see Phononic Devices's Chips Convert Waste Heat into Electricity
the industry is moving toward capturing waste heat for useful purpose eg building heating esp with supercomputers.
of course quantum computation is the "holy grail" for reversible designs but its proving very difficult to create systems due to the issue you mention in qm circuits-- noise or the so called "decoherence problem". the only commercial system so far seems to be dwave which is very expensive & niche right now.
Comment: Thank you. How can chips capture heat to convert it into electricity? Doesn't it conflict with the second law of thermodynamics?
Comment: think, similar principles to solar cells which convert radiant energy into electricity. also you asked about "noise". the main noise in conventional circuits comes from smaller gate widths and indeed [thermal/near-quantum] noise is becoming a problem in shrinking gate widths smaller than say ~30nm or so.


Do I need to patch my tubed-tire if I have a puncture?

Question: I have about a 2 mm gash around the outside of my tire from a piece of brown glass. It gave me a slow leak and while I've patched the tube, do I need to do anything about the tire itself?
Comment: One can't tell from the photo whether the cord under the tread has been substantially damaged.  This would be more obvious looking on the inside.  If the cord is damaged (more than just a nail-sized area) then you need to "boot" the tire or replace it.
Answer: I think thats small enough that I probably wouldn't worry about it too much, but you can fill it in with a dab of super glue or sealants for rubber (like shoe goo) for peace of mind.
You could boot it (a nice boot is the Park Tool TB-2), but I think this is likely too much work.
Answer: It depends. If the threads on the inside of the tyre are not damaged, only check for any left-over glass debris in the gash and leave as-is.
Otherwise, either ditch the tyre or boot it from the inside, like @Batman suggested already.
Comment: The next time I get a flat I'll take a picture of the inside. From what I remember, there wasn't significant damage on the inner surface, but didn't pay it much mind. I actually did 'boot' it (didn't know what that was) with a small square of 3M rubber splice tape because it seemed like maybe a good idea (question was later in the day after I patched my tube)


Unable to transfer files on android 8.0 TV box to the USB

Question: Unable to transfer files on android 8.0 TV box to the USB.
I have tried many file transfer apps but none will transfer to my USB even though it shows my USB connection and any files that are on the USB. Can anyone help?
Answer: Have you tried TotalCommander?  Its possible that the USB drive is mounted as read-only.  In TotalCommander, If you copy to the USB drive and the USB drive is mounted as read-only: TotalCommander will automatically ask if you want to remount the drive as read-write, which is what you want.  Say 'Yes', then it copies whatever files you want to your USB.
Comment: Hi thanks for your help, total commander worked, it transferred the file without asking to remount the drive as read-write. No other programming would let me transfer files. Thanks again Jeff Luyet.


Omitted variable bias in time series

Question: This is a brief question because my lecturer mentioned it today in class but I don't quite understand. Why is omitted variable bias not a major problem in time series analysis?
Comment: Hi there, when you say time series analysis do you mean an analysis like `ARIMA` or do you mean something like a regression with a lag factor?
Comment: I'm actually not sure what you mean... since regression with a lag factor is just a specific case of an ARIMA model (eg ARIMA(p,0,0)), no?
Answer: My guess would be that, in econometrics at least, cross-sectional studies are often trying to get at causal relationships; the causal effect of an additional year of education on earnings, for example.
In time series, we are usually only after a prediction for future values of our outcome. Given some set of factors, what do we expect the GDP growth rate to be next quarter? We don't care if the measure of consumer confidence that we include directly causes growth, but are instead content to use its predictive power (as opposed to true explanatory power) to help with our forecast.
So perhaps positive news stories cause consumer confidence, which leads to economic growth. Leaving out a measure of the positivity of news stories would lead to omitted variables bias in that the coefficient on confidence isn't really a measure of the effect of confidence itself. But we are still able to get useful forecasts despite the omitted variable.
Answer: This is to correct another answer that any observational studies, whether cross-sectional or time-series or panel, do not give you causal relationships! If you run a cross-sectional regression of a group of people you may 'found' that there is a positive association between salary and whether a person wears trousers (as opposed to skirts). Of course what to wear does not cause higher/lower salary. The true omitted factor here is gender!
Comment: This is a fair warning and always worth bearing in mind.  But it's a little harsh to insinuate (via "to correct") that the other answer was wrong: I believe the intention of @Charlie's circumlocution "trying to get at" was to indicate that observational studies do not "give" causation.  (It is clear from the body of Charlie's many excellent replies that he was not making such a mistake.)

Omitted variable bias in time series


Are there any other published quantum factoring algorithms that are simpler or more efficient than Shor's?

Question: How many qubits and what is the minimum number of gate operations needed to factor an n-bit integer? Are there any other published algorithms that are simpler or more efficient?
Comment: Hi wang1908!  Welcome to QCSE!   Your question seems similar to: [How many logical qubits are needed to run Shor's algorithm efficiently on large integers ($n > 2^{1024}$)?](https://quantumcomputing.stackexchange.com/questions/5048/how-many-logical-qubits-are-needed-to-run-shors-algorithm-efficiently-on-large).  Can you consider revising your question in light of the other?
Comment: Mark S, I just rephrased the question in hope to get some more insights. The link answered half of the question.
Answer: Shor's algorithm is based on the gate model of quantum computation.  However, there are alternatives to the gate model, such as quantum walks, etc.  See all of the answers to this question for a nice summary of the different models of computation.
As to what I believe to be the implicit question "is Shor's the only known quantum factoring algorithm, or are there alternatives that use fewer qubits and/or fewer gate operations?" I refer you to "A Quantum Adiabatic Algorithm for Factorization and Its Experimental Implementation" (link) by Peng, Liao, Xu, Zhou, Suter, and Du.
The adiabatic factoring algorithm paper notes that factoring can be recast as an optimization problem.  More specifically, the adiabatic algorithm notes that in order to factor a number $N=p\times q$, it suffices to find an $(x,y)\in\mathbb{N}^2$ such that $f(x,y)=(N-xy)^2$ obtains a minimum.
The paper describes the preparation of a Hamiltonian whose lowest energy corresponds to this minimum.  The first paragraph of the second page of the paper compares the qubit count of the adiabatic algorithm somewhat favorably to that of Shor's.
Because the adiabatic algorithm evolves adiabatically to the ground state, it does not really make sense to talk about the "total number" of gate operations; rather it makes more sense to talk about the length of time the adiabatic evolution takes. As I understand, the runtime of such adiabatic algorithms are notoriously difficult to describe exactly/analytically, or even to a first order, being based on the spectral gap of the problem Hamiltonian.  So we may be left with only numerical simulations.  That is, unlike counting gates in the gate model, in general it's very difficult (nay undecidable) to know how long the adiabatic evolution takes, but the paper claims that numerical simulations indicate that the running time (evolution time) grows only quadratically with the number of qubits.
Thus, to answer the questions, there are other quantum factoring algorithms that don't require the same repeated squaring/QFT/classical post-processing of Shor's algorithm, and that uses fewer qubits.  The runtime may also grow polynomially as in s algorithm, but proving that the runtime is quadratic or even polynomial in the number of qubits (bits of $N$) is difficult.
Comment: I'm going to channel Scott Aaronson (https://scottaaronson.blog/?p=6957 https://scottaaronson.blog/?p=4447). Factoring algorithms based on optimization throw away the useful structure of the problem, so there's no good reason to expect them to work at scale. And there's a nasty tendency for these papers to ignore blatant problems that are going to prevent scaling, such as the number of samples required or the amount of preprocessing required. I don't trust them at all.
Answer: Community Wiki

Oded Regev has an improved algorithm posted on the arXiv here.
The abstract provides:

We show that n-bit integers can be factorized by independently running a quantum circuit with $O~(n^{3/2})$ gates for $\sqrt n+4$ times, and then using polynomial-time classical post-processing. The correctness of the algorithm relies on a number-theoretic heuristic assumption reminiscent of those used in subexponential classical factorization algorithms. It is currently not clear if the algorithm can lead to improved physical implementations in practice.

As explained in this presentation and panel discussion with the Simons institute, Regev's improvement is based on a modification of the repeated-squares portion of the algorithm. Regev uses classical post-processing based on the LLL algorithm.

Are there any other published quantum factoring algorithms that are simpler or more efficient than Shor’s?


In ancient times, was there a specific outfit for assassins? If so, did these garments have technical names?

Question: I need to describe a certain scene from the POV of an assassin, and I'd like to use the terms that she would use. Think ninja assassin, rather than Mata Hari.
Comment: There was never a outfit (dress, clothing, uniform) for assassins. Not in ancient times, not in modern times. On one hand, assassins are not soldiers, and on the other such a visible marking would be rather counterproductive. And BTW, "professional" assassins have always been very very rare, even in those rare time and places where they existed at all.
Comment: Professionals seem to always have names for the special tools they use. Actors have special names for what looks like normal clothing. If you include other equipment than strictly clothes I've heard names for weird looking weapons, and presume assassins would have some other tools.
Comment: Having a standad uniform for an assassin seams counterproductive.
Answer: Traditionally, no. Assassins tend to try to blend into their surroundings. Otherwise, they would get caught. The actual ninja is often presented in modern film/TV as wearing an all-black costume. There's no historical evidence for this.
That makes sense, really. If someone walks into town dressed as a murderer, they're going to be arrested, stopped, or killed by the authorities. You don't want to label yourself as an assassin. You want to blend in, so you can sneak up on your targets and, hopefully, sneak away after killing them. So you'll don whatever garb is most likely to get you close to your target.
You want to be invisible in to the extent possible. That doesn't mean black costumes. That means dressing like the servants no one pays attention to. Or like a homeless person on the street. Or like the palace guards that are everywhere.
Comment: The ninja black suit comes from theater plays, since the full black suit was usually used by stage hands that the public was not supposed to pay attention to. Having one of the stage hands draw a knife and "kill" one of the main characters was a big twist back then.
Comment: This concept was mocked by author terry Pratchett with his depiction of the Patrician, a graduate of the Assassin's Guild, which doesn't have "official clothing."  He states that only amatures would wear pure black, which would stick out at night because nothing in nature actually is pure black.  "Professional" assassins were dark greens and blues for the best camouflage - completely supporting your answer.  I love it when Terry's right!
Answer: The original assassins were a Middle Eastern sect of the Medieval era.

Assassins is the description used to refer to a group of individuals
  of the medieval period known as Nizari Ismailis. Often enough
  described as a secret order led by a mysterious "Old Man of the
  Mountain", the Nizari Ismailis were a sect that formed in the late
  11th century from a split within Ismailism – itself a branch of Shia
  Islam.

The actual assassins in this sect were low-level followers: --

While "Assassins" typically refers to the entire medieval Nizari sect,
  in fact only a class of acolytes known as the fida'i actually engaged
  in assassination work. Lacking their own army, the Nizari relied on
  these warriors to carry out espionage and assassinations of key enemy
  figures, and over the course of 300 years successfully killed two
  caliphs, and many viziers, sultans, and Crusader leaders

This description of the assassins and how they worked clearly demonstrates they worked secretly and as unobtrusively as possible.

Although the "Fida'yin" were the lowest rank in Sabbah's order and
  were only used as expendable pawns to do the Grandmaster's bidding,
  much time and many resources were put into training them. The
  Assassins were generally young in age, giving them the physical
  strength and stamina which would be required to carry out these
  murders. However, physical prowess was not the only trait that was
  required to be a "Fida'i". To get to their targets, the Assassins had
  to be patient, cold, and calculating. They were generally intelligent
  and well-read because they were required to possess not only knowledge
  about their enemy, but his or her culture and their native language.
  They were trained by their masters to disguise themselves and sneak
  into enemy territory to perform the assassinations, instead of simply
  attacking their target outright.

The last thing any assassin needed was an assassin's uniform or distinctive form of clothing. A dress code for assassins would be a dead giveaway.
PS: You might like some background history on the origin story of assassins.
Source: Assassins


Can I use 14 AWG pigtails on a 20 amp 12 AWG circuit with 15 amp receptacles?

Question: It seems like this would be OK for the ground pigtail, and probably OK for the hot and neutral too since the receptacle is ony 15 amp capacity. But I wonder if there are safety issues I'm not considering and what the electrical code has to say about it.
Comment: The pigtail would normally be specified by the equipment manufacturer based on the load. If the appliance was only 10 amps for instance then a 14 ga pigtail would be fine and in line with a 20 amp circuit. If you have a 20 amp circuit everything in that circuit should be rated for 20 amps including the receptacle. If you plug a 19 amp load into a 15 amp receptacle for instance, the circuit breaker may not trip and the plug could melt.
Comment: What happens if you plug in two 9amp loads?
Comment: I'd be willing to bet that your wiring device (outlet) is rated at 20amp but has 2 (duplex) NEMA 5-15 faced outlets.
Answer: You must use a 12 gauge pigtail here
A 14 gauge pigtail on a 20A circuit is a (very short) tap conductor:

Tap Conductors. As used in this article, a tap conductor is
  defined as a conductor, other than a service conductor, that
  has overcurrent protection ahead of its point of supply that
  exceeds the value permitted for similar conductors that are
  protected as described elsewhere in 240.4.

As a result, that 14AWG pigtail violates NEC 210.19(A)(4) Exception 1, which prohibits the use of tap conductors to feed receptacles:

(4) Other Loads. Branch-circuit conductors that supply
  loads other than those specified in 210.2 and other than
  cooking appliances as covered in 210.19(A)(3) shall have
  an ampacity sufficient for the loads served and shall not be
  smaller than 14 AWG.
Exception No.1: Tap conductors shall have an ampacity sufficient for
  the load served. In addition, they shall have
  an ampacity of not less than 15 for circuits rated less
  than 40 amperes and not less than 20 for circuits rated
  at 40 or 50 amperes and only where these tap conductors
  supply any of the following loads:
(a) lndividual lampholders or luminaires with taps extending not longer than 450 mm (18 in.) beyond any portion of the lampholder or luminaire.
(b) A luminaire having tap conductors as provided in
  410.117.
(c) Individual outlets, other than receptacle outlets,
  with taps not over 450 mm (18 in.) long.
(d) Infrared lamp industrial heating appliances.
(e) Nonheating leads of deicing and snow-melting
  cables and mats.


Overlapping Ovals

Question: So I am instantiating 2 ovals/ellipses at runtime with random rotations. The first oval will always be spawned at the center. However, the second oval must be placed in a way that should always intersect/overlap the first oval, something like a Venn Diagram. How would I do so? We are talking 2D and the ovals are sprites
Comment: Can the ovals differ in size or shape or do they only differ in rotation?
Comment: Are there any constraints on the size / aspect ratio / relative orientations of the ovals, or the amount of overlap? Any bit of specificity can help us make simpler answers with more reliably desirable results.
Answer: If you know the length of the distance from the middle of the sprite to the closest point on the outside of the oval (which can either be guessed and then adjusted or produced mathematically), then a reasonable approximation for the second ovals location would be new Vector2(oval1minDist + oval2minDist - offset, 0), where offset is a small but not negligible value. This ensures your ovals will always overlap by at least offset pixels. However, this solution doesn't account for the case where the ovals are long and skinny, in which case the ovals may form a cross.

Overlapping Ovals


Stack resident buffer overflow on 64-bit?

Question: I'm studying some security related things and right now I'm playing around with my own stack. What I'm doing should be very trivial, I'm not even trying to execute the stack, simply to show that I can get control over the instruction pointer on my 64-bit system. I have turned off all protection mechanisms I'm aware of just to be able to play with it (NX-bit, ASLR, also compiling with -fno-stack-protector -z execstack).
I don't have that much experience with 64-bit assembly and after spending some time searching and experimenting myself I'm wondering if anyone could shed some light on an issue I'm experiencing.
I have a program (source code below) which simply copies a string into a stack resident buffer with no bounds checking. However when I overwrite with a series of 0x41 I'm expecting to see the RIP be set to 0x4141414141414141, instead I'm finding that my RBP gets set to this value. I do get a segmentation fault, but RIP does not get updated to this (illegal) value at the execution of the RET instruction, even if RSP is set to a legal value. I have even verified in GDB that there is readlable memory containing a series of 0x41's at RSP immediately prior to the RET instruction.
I was under the impression that the LEAVE instruction did:
MOV (E)SP, (E)BP
POP (E)BP
However on 64-bit, the "LEAVEQ" instruction seems to do (similar to):
MOV RBP, QWORD PTR [RSP]
I'm thinking it does this simply from observing the contents of all registers before and after execution of this instruction. LEAVEQ seems to be just a context dependent name of the RET instruction though (which GDB's disassembler gives it), as it is still just a 0xC9.
And the RET instruction seems to do something with the RBP register, perhaps dereferencing it? I was under the impression that RET did (similar to):
MOV RIP, QWORD PTR [RSP]
However like I mentioned, it seems to dereference RBP, I'm thinking it does this because I get a segmentation fault when no other register seems to contain an illegal value.
Source code for the program:
#include <stdio.h>
#include <string.h>

int vuln_function(int argc,char *argv[])
{
    char buffer[512];

    for(int i = 0; i < 512; i++) {
        buffer[i] = 0x42;
    }

    printf("The buffer is at %p\n",buffer);

    if(argc > 1) {
        strcpy(buffer,argv[1]);
    }

    return 0;
}

int main(int argc,char *argv[])
{
    vuln_function(argc,argv);

    return 0;
}

The for loop is just there to fill the legal part of the buffer with 0x42, which makes it easy to see in the debugger where it is, before the overflow.
Excerpt of debugging session follows:
(gdb) disas vulnerable
Dump of assembler code for function vulnerable:
   0x000000000040056c <+0>:     push   rbp
   0x000000000040056d <+1>:     mov    rbp,rsp
   0x0000000000400570 <+4>:     sub    rsp,0x220
   0x0000000000400577 <+11>:    mov    DWORD PTR [rbp-0x214],edi
   0x000000000040057d <+17>:    mov    QWORD PTR [rbp-0x220],rsi
   0x0000000000400584 <+24>:    mov    DWORD PTR [rbp-0x4],0x0
   0x000000000040058b <+31>:    jmp    0x40059e <vulnerable+50>
   0x000000000040058d <+33>:    mov    eax,DWORD PTR [rbp-0x4]
   0x0000000000400590 <+36>:    cdqe
   0x0000000000400592 <+38>:    mov    BYTE PTR [rbp+rax*1-0x210],0x42
   0x000000000040059a <+46>:    add    DWORD PTR [rbp-0x4],0x1
   0x000000000040059e <+50>:    cmp    DWORD PTR [rbp-0x4],0x1ff
   0x00000000004005a5 <+57>:    jle    0x40058d <vulnerable+33>
   0x00000000004005a7 <+59>:    lea    rax,[rbp-0x210]
   0x00000000004005ae <+66>:    mov    rsi,rax
   0x00000000004005b1 <+69>:    mov    edi,0x40070c
   0x00000000004005b6 <+74>:    mov    eax,0x0
   0x00000000004005bb <+79>:    call   0x4003d8 <printf@plt>
   0x00000000004005c0 <+84>:    cmp    DWORD PTR [rbp-0x214],0x1
   0x00000000004005c7 <+91>:    jle    0x4005e9 <vulnerable+125>
   0x00000000004005c9 <+93>:    mov    rax,QWORD PTR [rbp-0x220]
   0x00000000004005d0 <+100>:   add    rax,0x8
   0x00000000004005d4 <+104>:   mov    rdx,QWORD PTR [rax]
   0x00000000004005d7 <+107>:   lea    rax,[rbp-0x210]
   0x00000000004005de <+114>:   mov    rsi,rdx
   0x00000000004005e1 <+117>:   mov    rdi,rax
   0x00000000004005e4 <+120>:   call   0x4003f8 <strcpy@plt>
   0x00000000004005e9 <+125>:   mov    eax,0x0
   0x00000000004005ee <+130>:   leave
   0x00000000004005ef <+131>:   ret

I break right before the call to strcpy(), but after the buffer has been filled with 0x42's.
(gdb) break *0x00000000004005e1

The program is executed with 650 0x41's as argument, this should be plenty to overwrite the return address on the stack.
(gdb) run `perl -e 'print "A"x650'`

I search the memory for the return address 0x00400610 (which I found from looking at the disassembly of main).
(gdb) find $rsp, +1024, 0x00400610
0x7fffffffda98
1 pattern found.

I examine the memory with x/200x and get a nice overview which I have omitted here because of its size, but I can clearly see the 0x42 that denote the legal size of the buffer, and the return address.
0x7fffffffda90: 0xffffdab0      0x00007fff      0x00400610      0x00000000

New breakpoint just after strcpy():
(gdb) break *0x00000000004005e9
(gdb) set disassemble-next-line on
(gdb) si
19 }
=> 0x00000000004005ee <vulnerable+130>:  c9     leave
   0x00000000004005ef <vulnerable+131>:  c3     ret
(gdb) i r
rax            0x0      0
rbx            0x0      0
rcx            0x4141414141414141       4702111234474983745
rdx            0x414141 4276545
rsi            0x7fffffffe17a   140737488347514
rdi            0x7fffffffdb00   140737488345856
rbp            0x7fffffffda90   0x7fffffffda90
rsp            0x7fffffffd870   0x7fffffffd870
r8             0x1      1
r9             0x270    624
r10            0x6      6
r11            0x7ffff7b9fff0   140737349550064
r12            0x400410 4195344
r13            0x7fffffffdb90   140737488346000
r14            0x0      0
r15            0x0      0
rip            0x4005ee 0x4005ee <vulnerable+130>

   0x00000000004005ee <vulnerable+130>:  c9     leave
=> 0x00000000004005ef <vulnerable+131>:  c3     ret
(gdb) i r
rax            0x0      0
rbx            0x0      0
rcx            0x4141414141414141       4702111234474983745
rdx            0x414141 4276545
rsi            0x7fffffffe17a   140737488347514
rdi            0x7fffffffdb00   140737488345856
rbp            0x4141414141414141       0x4141414141414141
rsp            0x7fffffffda98   0x7fffffffda98
r8             0x1      1
r9             0x270    624
r10            0x6      6
r11            0x7ffff7b9fff0   140737349550064
r12            0x400410 4195344
r13            0x7fffffffdb90   140737488346000
r14            0x0      0
r15            0x0      0
rip            0x4005ef 0x4005ef <vulnerable+131>
(gdb) si

Program received signal SIGSEGV, Segmentation fault.
   0x00000000004005ee <vulnerable+130>:  c9     leave
=> 0x00000000004005ef <vulnerable+131>:  c3     ret
(gdb) i r
rax            0x0      0
rbx            0x0      0
rcx            0x4141414141414141       4702111234474983745
rdx            0x414141 4276545
rsi            0x7fffffffe17a   140737488347514
rdi            0x7fffffffdb00   140737488345856
rbp            0x4141414141414141       0x4141414141414141
rsp            0x7fffffffda98   0x7fffffffda98
r8             0x1      1
r9             0x270    624
r10            0x6      6
r11            0x7ffff7b9fff0   140737349550064
r12            0x400410 4195344
r13            0x7fffffffdb90   140737488346000
r14            0x0      0
r15            0x0      0
rip            0x4005ef 0x4005ef <vulnerable+131>

I verify that the return address has been overwritten and I should have expected to see RIP get set to this address:
(gdb) x/4x 0x7fffffffda90
0x7fffffffda90: 0x41414141      0x41414141      0x41414141      0x41414141
(gdb) x/4x $rsp
0x7fffffffda98: 0x41414141      0x41414141      0x41414141      0x41414141

Yet RIP is clearly:
rip            0x4005ef 0x4005ef <vulnerable+131>

Why has not RIP gotten updated as I'm expecting? What does LEAVEQ and RETQ really do on 64-bit? In short, what am I missing here? I have tried to omit the compiler arguments when compiling just to see if it makes any difference, it doesn't seem to make any difference.
Answer: Those two instructions are doing exactly what you expect them to do. You have overwritten the previous stack frame with 0x41's so when you hit the leaveq, you are doing this:
mov rsp, rbp
pop rpb

Now rsp points to where rbp did before. However, you have overwritten that region of memory, so when you do the pop rbp, the hardware is essentially doing this
mov rbp, [rsp]
add rsp,1

But [rsp] now has 0x41's. So this is why you're seeing rbp get filled with that value.
As for why rip isn't getting set like you expect, it's because ret is setting the rip to 0x41 and then generating an exception (page fault) on the instruction fetch. I wouldn't rely on GDB to show the right thing in this case. You should try overwriting the return value with a valid address within the program's text segment and you likely won't see this weird behavior.
Comment: I found your answer when wondering how leaveq "knows" to free previously-allocated stack space. Your explanation made it clear. The SP is changed to the BP, removing any stack allocation, then a new BP is popped off the stack, where it had been popped on when the function started. Thanks.
Answer: The answers given by "kch" and "import os.boom.headshot" are not quite correct.
What is actually happening is that the value on the stack (0x4141414141414141) which is to be popped into RIP by the RET instruction contains an address which is in the 'non-canonical' address range of the processor. This causes the CPU to generate a general protection fault (GPF) interrupt rather than a fault generated by a kernel pre-check. The GPF in turn triggers the kernel to report a segmentation fault before RIP is actually updated and that is what you're seeing in GDB.
Most modern CPUs only provide a 48-bit address range which is split between a higher and lower half which occupy the address ranges 0x0000000000000000 to 0x00007FFFFFFFFFFF and 0xFFFF800000000 to 0xFFFFFFFFFFFFFFFF respectively. See this wikipedia link for further information.
If the address had been outside the non-canonical range (0x00008FFFFFFFFFFF to 0xFFFF7FFFFFFFFFFF) then RIP would have been updated as expected. Of course, a subsequent fault may have been generated by the kernel if the new address was invalid for any other reason (i.e. outside the process's address range).
Answer: The reason you get a crash of EIP 0×41414141 on x32 is because when the program pops the previously saved EIP value off the stack and back into EIP the CPU then tries to execute the instruction at memory address 0×41414141 which causes a segfault. (it must fetch the page prior to execution of course)
Now, during x64 execution when the program pops the previously saved RIP value back into the RIP register the kernel then tries to execute the instructions at memory address 0×4141414141414141. Firstly, due to canonical form addressing, bits 48 through 63 of any virtual address must be copies of bit 47 (in a manner akin to sign extension), or the processor will raise an exception. If that was not an issue- the kernel does additional checks before invoking the page fault handler since the max user space address is 0x00007FFFFFFFFFF.
To recap, in x32 architecture the address is passed without any "validation" to the page fault handler which attempts to load the page which triggers the kernel to send the program segfault but x64 does not get this far.
Test it, overwrite RIP with 0×0000414141414141 and you will see the expected value is placed in RIP since the prechecks by the kernel pass and then the the page fault handler is invoked like the x32 case (which of course, then causes the program to crash).


Some clarification on nonlinear PDEs

Question: In Strauss' book $\textit{Partial Differential Equations: An Introduction}$, one of the important PDEs listed on p. $2$ is the shock wave equation given by $$u_x + uu_y= 0 \text{.}$$ It is nonlinear, but why? I tried using Strauss' definition of a linear operator to verify the nonlinearity, but each time I tried using the definition, it seems as if $\partial/\partial{x} + u\partial/\partial{y}$ is a linear operator! Does the fact that a $u$ term appears in front of $u_y$ (partial derivative of $u$ w.r.t. $y$) answer my question asking why the PDE is nonlinear? If so, how?
Comment: There must be some mistake in the way you are using Strauss's definition of a linear operator.  Can you give more details about that?  If $L$ is the operator defined by $L(u) = u_x + u u_y$, it's not necessarily true that $L(u_1 + u_2) = L(u_1) + L(u_2)$, or that $L(c u) = c L(u)$ for all scalars $c$.
Answer: $$T=\partial/\partial x + I \partial/\partial y$$ where I is the identity operator.
Applying it to a sum: $$T(u+v)=u_x+v_x+u u_y+uv_y+vu_y+vv_y=T(x)+T(y)+uv_y+vu_y;$$
as you can see you get two terms too many!
Comment: I finally figured it out, thanks!

Some clarification on nonlinear PDEs


Erlang Socket at OS Level

Question: I am so confused about multi-thread networking. Since a Socket is an OS Level structure, handling sockets at Erlang BEAM VM level has an equivalent at OS Level, and there are multi options to handle parallel connections by OS-Threads (select, poll, epoll,....) and that depends of the OS but what i can't understand and I searched a lot about without any answer is: If we have 4 Parallel Erlang processes listen to accept connection on one Socket, what is the equivalent at OS Level? 4 waiting Parallel OS-Threads? N Parallel  OS-Thread?
Comment: You've recently asked multiple variations of essentially the same question. If you're looking for details of the internals of the Erlang virtual machine, my advice is to read [The Beam Book](https://github.com/happi/theBeamBook).
Comment: Thank you for help, i think that's what i search
Comment: sorry but the socket and network chapter is missing
Comment: Yes, that's a bit unfortunate. But you can still use the book to learn more about Erlang VM schedulers. I also encourage you to ask questions on [Erlang Slack](https://erlef.org/slack-invite/erlanger) and even [build your own debuggable Erlang runtime](http://erlang.org/doc/installation_guide/INSTALL.html#Advanced-configuration-and-build-of-ErlangOTP_Building_How-to-Build-a-Debug-Enabled-Erlang-RunTime-System) so you can use a debugger to see what the schedulers are doing.
Comment: all i know about debuggers is that debug your program, it doesn't show internal management, i will try with the Erlang Slack thank you for the link
Answer: It's a difficult correspondence to draw.  Your suggestion 4 Parallel threads is probably the closest equivalent.  Things get a bit harder to pin down because a kernel thread will likely take up more system resources than each process.  Threads typically share memory space while there is memory protection between processes.  So it depends on how far you want to take the  simile, but basically there will be 4 separate lines of processing blocked on I/O.

Erlang Socket at OS Level


Incentive to recruit B2B customers for generative interviews

Question: Together with my team need to recruit participants to run some generative interviews, 15 in total. We have a customer base, but we're not sure if we should offer them an incentive and what kind could be. The relationship between this segment of users (businesses from small to large sizes) and our company, happens mostly through customer assistants, so this will be our first approach to them as part of the UXR team. We have some budget but it is not too much, so it would be nice to hear any suggestions or a similar experience. Thank you!
Answer: The main incentive is being part of the SASS creation process and helping create a product that will eventually help deliver more value to the community of customers. Also, early access to new product concepts, user interfaces, and sneak previews of upcoming roadmap items.
finally, you can add that you will give them an Amazon gift card. but that shouldn't be the main incentive
Answer: If your customer assistants have relationships with the customers (vs. just ticket-based issue resolution), I would start by reaching out to them, describe the project, and ask if they can help connect you with customers who might be especially interested in solving the specific problem you're working on. If they can help you set up the interviews, that's even better, because it will look to the customer like they're going above and beyond to help them. Usually in that case, no incentive is needed.


Why don't photons interfere/interact with one another, as common mechanical waves would?

Question: After all, they are a (self-sustaining) perturbation of the same field, like sound waves or water waves are "energy flow" (except these ones experience dissipation).
And how can our eyes be so clever to perfectly sort and recognize objects if the air is "polluted" with all kinds of photons bouncing all around?
Comment: hint: if you need glasses, then your eyes can't sort it out.
Comment: I'm referring to dr. Feynman [lecture](https://www.youtube.com/watch?v=KbCVlp2vJYg&feature=youtu.be)  "Seeing things"
Answer: You just raised a question about a very important topic, the distinction between interference and interaction. A lot of answers on this site mention interference in connection to the double slit experiment. And you see other phrases like "photons do not interact with each other". I think this needs a little clarification:

Interference, you can see this from the double slit experiment, done by shooting single photons at a time. Emphasis on single photons. What interferes with what? You just shot a single photon. The pattern arises only if you repeat the experiment, and shoot many photons after each other. The boundary conditions are all the same, and each photon that is shot from the same setup laser, the interference will show up, showing an interference between the photons that were actually shot after each other.

https://en.wikipedia.org/wiki/Double-slit_experiment

interaction, this is about the vision question in your example. the photons bouncing off objects do not interfere with each other (visible wavelength and energy level in your example), to the first order. Photon can and do interact, but you need much higher energy levels, and that is called nonlinear optics. We are lucky that at the visible wavelength energy levels there is linear optics, and no photon-photon interaction, because otherwise we would not be able to see.

https://en.wikipedia.org/wiki/Nonlinear_optics

The four electromagnetic vertices make the contribution so small , it can be ignored for visible light frequencies.
The electromagnetic spectrum has higher energy photons though, up to gamma rays, and the probability of photons scattering goes up with energy

Is Light intangible to other Light? And how does all the intersecting light exist in space?
So the answer to your question is, that photons do interact, but that becomes an apparent phenomenon only at high energy levels, much higher then the energy of visible photons, thus we are able to see.
Comment: +1 This answer  makes clear the distinction between interference and interaction, and also that the energy of the photons is important in measurable  interactioneffects.
Comment: @annav thank you so much!
Comment: Photons interact with the vacuum ZPE and its fluctuations guide the single photon to the position hitting the screen on the DS experiment. We call this phenomenon self-interference of the single photon in the DS experiment. Photons of low energy (optical spectrum) can pass right through each other without the one affecting the other. This is characteristic of all Boson particles that can agglomerate with each other and are not limited by the Fermi exclusion. This is actually why we have lasers. But at high intensities (X-rays and up) photons can interact thus colliding can produce pairs.
Answer: Photons do interfere, there are places where you can see the classical interference patterns like in the double slit experiment (or every interferometer) and some places you can see quantum interference (e.g. Hong Ou Mandel experiment).
The "sorting" of photons is an outcome of the lens in our eye, sorting photons coming from different directions to different places on our retina. The sorting by color is due to the different wavelength sensitivity of the detectors in each "pixel" on our retina (read more about the RGB cones)
Comment: Thanks for your answer but.. like at this moment, I'm seeing a variety of distinct objects in front of me (the computer, the pencil case et cetera) without any problem, but if I were at the corner of a swimming pool, I wouldn't know ANYTHING solely from analyzing the waves, and that's because are all intertwined. Why doesn't this happen ordinarily with photons?
Comment: In the ocean, you can learn where the storms are that generated the wave from analyzing them in a small area. You can mathematically determine which components of the waves are coming from which directions. This is much the same thing as the lens in your eye does
Comment: @mmesser314 what do you mean by "small"? I guess you won't be able to tell much from analysis of a 1m×1m area.
Comment: Photons do not interfere.
Comment: @Ruslan - Several meters across is enough. An upward looking Doppler sonar with 4 breams on the bottom can measure current speeds generated by waves. Direction vs wavelength can be calculated. From that you can separate different wave sources. See http://www.teledynemarine.com/workhorse-waves-array?ProductLineID=12 and click on Workhorse Waves Array Datasheet to get a screenshot of some results. You can measure waves over time and watch frequencies change because of dispersion. From this you can get distances to wave sources.
Comment: @riccardosantos Because the lens in your eyes carefully redirects rays coming from different directions to different spots in the retina so that the brain can tell them apart. If the lens doesn't work right, you see blurry.
Answer: Photons of different energy have different wavelengths. When they interfere with each other it isn't done in a linear fashion. Our sensors in our eyes can understand only a few frequencies of light.And the information of each wave is not lost in the collection of waves "polluting your eye".
Answer: Your question is correct, photons do not really interfere.  The DSE taught at the high school level is a convenient theory and it also works well mathematically but 2 photons cancelling is a violation of conservation of energy. In university in quantum optics courses deeper explanations are provided.
Think of 2 tsunamis one from Japan and the other from USA, starting with opposite phase .... when they meet (at say Hawaii) they cancel and Hawaii is saved ... but a second later the waves emerge again and continue on their way to Japan and USA, the energy was only stored temporarily in the elasticity of the water!  The energy will only be absorbed when the wave crashes on the land. For photons we can never really observe the field directly ... we can only see a photon when our eye or camera absorbs it. We assume the photons are interfering in the EM field .... it makes sense .... but every photon is created by an atom and eventually absorbed by an atom.
Comment: Dear PhysicsDave. It is usually frown upon to directly copy-paste [identical answers](https://physics.stackexchange.com/a/602211/2451). (The problem is if everybody start to copy-paste identical answers en mass.)
Comment: "it works mathematically, but 2 photon cancellin is a violation...": Nice. Could you read my answer to: [Wave and particle nature of light during detection in a single-photons double slit experiment](https://physics.stackexchange.com/questions/588002/wave-and-particle-nature-of-light-during-detection-in-a-single-photons-double-sl/588103#588103)? And a question about [Experiment carried out to measure the Huygenian wave behind an opening all over 180°](https://physics.stackexchange.com/questions/589212/experiment-carried-out-to-measure-the-huygenian-wave-behind-an-opening-all-over)
Comment: For answer 2 yes there is a probability of seeing a photon at +/- 90 from the single slit,  The photon has considered many paths the most probable are the ones that are integer wavelength ones. The photon considers the whole EM field including the state of the EM field around all the possible absorbing atoms, the result is all probability also called Quantum Mechanics.
Comment: For q1, attempt at measurement will upset the electron trajectory and no pattern will be observed. The theory of transiting the edge is interesting, an interaction of the slit material with the photon field is required, this explains the spreading of the photon(s) path (diiffraction).  We need to also explain the banding seen, I do not like to use the word interference, it is misleading but very historical.  Feynman provides a good explanation for the banding. Electrons in the edge may be bound or in a conduction band and this can cause effects, like polarizers.
Answer: The waves associated with a single photon can interfere with each other (and contribute to producing an interference pattern). Different photons in a laser beam (all of which have the same wavelength and phase) can also interfere with each other (making holograms possible). Photons from an ordinary light source may have many different wavelengths and no fixed phase relationship. Any interference effects would be fleeting and vary from point to point.
Comment: So interference can be seen macroscopically only with single photons (like in double-slit experiments), or whenever there is a "collision" with different coherent streams of photons all polarized in the same way, right?
Comment: All photons are single photons. The term single photons refers to experiments where one photon is created at any one time, this is done by carefully exciting a quantum dot  or similar structure in a laboratory. Scientists still observe the "interference" pattern after they count like one photon every day for a year! Interference is a very old historical interpretation (still taught today). In the double slit exp dark areas have no photons, bright areas all the photons.
Comment: RW Bird mentions waves associated with a single photon, although technically a single photon is a single wave.  What scientists say (Feynman) is that a photon looks at all possible paths ... and chooses the one that is the shortest that has a path length that is a multiple of the wavelength.  What is also mention is that this initial process is done with virtual (or force carrier) photons. I.E. an excited electron in an atom is able to exert forces and find a high probability path. So we have virtual photons first and then the real photon that transfers energy to another atom like in your eye.
Comment: @PhysicsDave you can also make single photons (or a small number of them) with a gas Cherenkov detector.
Comment: The interference pattern produced by the wave associated with a single photon cannot be observed. It only determines the probability that the photon will be detected at a particular point. It takes many photons (each with an identical pattern) being detected at many different points before the pattern emerges.
Answer: Photons are particles and not to be confused with electromagnetic waves or wave packages. They do not interfere. EM waves do interfere. The EM interference pattern, more precisely$^*$ the value of $E^2$ at a position, gives the probability to detect a photon at that position.
$^*$ This assumes the photon is detected by an electric dipole transition. For a magnetic dipole transition $B^2$ is the relevant quantity.


How to get the result by parsing the log after executing the contract? How can I get the execution result?

Question: How to get the result by parsing the log after executing the contract? How can I get the execution result ?
Answer: The short answer is you don't.
You get what's in the log from the log.
Other contracts can get the result, but you can't sign a transaction that changes the state and also get the result.
Have a look here: https://blog.b9lab.com/calls-vs-transactions-in-ethereum-smart-contracts-62d6b17d0bc2
Hope it helps.
Comment: This is the receipt.                                                                                {
  blockHash: '0x30127276daa98740a2ed0bcbf47f9a345e44e766751ec2889e93482e784064c5',
  blockNumber: 6692373,
  contractAddress: null,
  cumulativeGasUsed: 58199,
  from: '0x8e0f4a1f3c0dbea0c73684b49ae4ad02789b3ec4',
  gasUsed: 27584,
  logs: [],
  logsBloom: '0x.....',
  status: true,
  to: '0xc2500c2a90dc6eece516582caca5b006d425e1ff',
  transactionHash: '0x....',
  transactionIndex: 1
}
Comment: I want to parse the receipt.logs, but it fail when I use this code.                                                                       const abi = _.find(item => (item.name == "LoginEvent") && item.type == "event");
           const eventJsonInterface = _.find(
      contract._jsonInterface,
      o => (o.name === 'LoginEvent' || o.name === 'CreateUser') && o.type === 'event',
     )
     const log = _.find(
      receipt.logs,
      l => l.topics.includes(eventJsonInterface.signature)
     )
     let de = ABI.decodeLog(eventJsonInterface.inputs, log.data, log.topics.slice(1))


Prove that $\Bbb{R}[\cos(\theta),\sin(\theta)]\cong\Bbb{R}[x,y]/(1-x^2-y^2)$

Question: More precisely, given the ring homomorphism $\phi:\Bbb{R}[x,y]\to\Bbb{R}^\Bbb{R}$, with  $\phi(f(x,y)):\Bbb{R}\to\Bbb{R},\,\,\phi(f(x,y))(\theta)=f(\cos(\theta),\sin(\theta))$, where $\Bbb{R}[x,y]$ is the ring of formal polynomials in two variables on $\Bbb{R}$, I wish to show that $\mathrm{ker}(\phi)=(1-x^2-y^2)$. So far the best I can do is to show that $\mathrm{ker}(\phi)\supseteq(1-x^2-y^2)$, which is pretty trivial anyway. In particular, I'm interested in a proof of this statement from the perspective of algebraic geometry.
Comment: Are you willing to use Hilbert's Nullstellensatz, or looking for something more elementary?
Comment: I'm familiar with the Nullstellensatz, so a proof using it would still be useful. However, a more elementary proof would be ideal (provided such a proof exists).
Answer: Let $I=\mathbb R[x,y](1-x^2-y^2)$, and suppose $f\in\ker(\phi)$.
Proof 1
Let $p:\mathbb C\rightarrow\mathbb C^2$ be the map $\theta\mapsto(\cos(\theta),\sin(\theta))$. By assumption, $f\circ p$ vanishes on $\mathbb R$. It's analytic so it vanishes on $\mathbb C$ by the identity theorem. That is, $f$ vanishes on $\mathrm{im}\;p=Z(I)$. By Hilbert's Nullstellensatz, $f^r\in I$ for some $r$. Since $\mathbb R[x,y]$ is a UFD and $(1-x^2-y^2)$ is irreducible over $\mathbb R$, $f\in I$.
Proof 2
By induction on degree wrt $y$, there exist $g(x),\;h(x)\in\mathbb R[x]$ such that $f(x,y)\in g(x)+h(x)y+I$. For any $\theta\in\mathbb R$,
$$
  0=f(\cos\theta,\sin\theta)=g(\cos\theta)+h(\cos\theta)\sin\theta.
$$
Substituting $\theta\mapsto-\theta$,
$$
  0=g(\cos\theta)-h(\cos\theta)\sin\theta.
$$
Thus $g(\cos\theta)=h(\cos\theta)\sin\theta=0$. Allowing $\theta$ to vary, $g(x)$ and $h(x)$ both vanish on $(0,1)$. Since they are polynomials, they are zero, so $f\in I$.
Comment: What exactly is meant by the first definition? Is I an ideal or a quotient ring?
Comment: I meant for I to be the ideal generated by (1-x^2-y^2). In your question you denote this by just (1-x^2-y^2), but I thought that might be ambiguous.


Opencart very slow

Question: I have a problem with my ecommerce. I use opencart 1.5.4, and on my website is a lot of products about 30 000 and my eshop is very slow. I tried different tricks but none of this was successful. This is my shop http://mycomp.sk/. Thank you for replies.
Comment: Consider a caching module which is a full page cache that I have found works quite well http://shop.quinsolutions.net/qcache-full-page-cache-for-opencart
Answer: i guess you also have a lot categories for each product. Let try this
open catalog\controller\module\category.php
Search : $total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id']));
Replace with $total = '';
and
Search : $product_total = $this->model_catalog_product->getTotalProducts($data);
Replace with $product_total = '';
This is what displays the little number next to the category name showing how many products are in the category. It's a pretty small feature, which I don't think adds much to the user experience, but the impact that it is having on page speed is pretty high. On every page load, it is running the getTotalProducts approx 50 odd time
and maybe you need to try this mod(Full Page Cache) and also add indexes to all foreign keys or install this for FREE https://github.com/atomixdesign/opencart-turbo.
Answer: I would recommend using:
Dedicated server for your PHP files.
Dedicated server for mySQL only having phpMyAdmin on it.
On the MySQL and PHP, you can use a number of cache plugins in the extension library. You can use Memcache or another accelerator. Cache is a good idea. For a bonus I would also use a CDN.
If you have say, 30,000 products and getting high volume orders - this is a setup I have seen been used for a site: The site runs 5 opencart stores and other sites/apps on the servers. The total orders per day is around 2800 and sometimes with mailers and marketing up to 4000 per day. We use two PHP servers with Rackspace. We use a single MySQL database server (originally in cluster and slave but now just a master) The two PHP servers are cloned and synced. We just load balance our URLs using Dns and Rackspace. Using a CDN has reduced our costs and load times. It is pretty rapid now.
Answer: Check out my post here: https://stackoverflow.com/a/18063515/2653932.  If you are using product counts on your site you may want to look at this patch.  Can't say for sure if it will work with 1.5.4 but I'll be happy to help modify it if necessary.
Answer: Site speed is dependent on a number of things, the main one being overcrowded servers and poor configuration. If you're unable to pay for top end servers then the best option for smaller stores is something like this pagecache mod - especially when you don't have access to modify apache configurations

Opencart very slow


Reducing INDSET and MAXCUT to 3SAT

Question: Given a graph and an integer $k$ is there an independent set larger than $k$ is INDSET problem and is there a cut larger that $k$ is the MAXCUT problem. Is there standard way to convert to 3SAT from these problems that preserves number of solutions? I have only seen reductions other way in standard texts. Since all these are NPC there should be a way to convert back.
Comment: The standard way is known as the Cook-Levin theorem, and it preserves the number of solutions.
Answer: $\mathcal{INDSET}$ $\leq_p$ $\mathcal{3SAT}$:
For each vertex $v\in V$, create a Boolean variable $x_v$.
For each edge $uv\in E$, create a clause $\lnot x_u \lor \lnot x_v$
Now, to assure that there exist exactly (or more than) $k$ variables assigned to $\mathrm{TRUE}$, we need to sum over all the assigned value ($\mathrm{FALSE}$ as $0$, $\mathrm{TRUE}$ as $1$):
We use half-adder and full-adder. Note that each circuit gate using some Boolean operation like $C = A \oplus B$ can be transformed into $\mathcal{3SAT}$ clauses easily.
To compare the obtained sum and $k$, it is straightforward from their binary representations (as two arrays of Boolean variables), just scan from left to right (in big-endianness fashion).
$\mathcal{MAX-CUT}$ $\leq_p$ $\mathcal{3SAT}$:
For each vertex $v\in V$, create a Boolean variable $s_v$. A cut is then described by a partition of the vertex set $V=S\cup (V\setminus S)$, where $v\in S$ iff. $s_v=\mathrm{TRUE}$.
For each edge $e=uv\in E$, create a Boolean variable $c_e$ and some clauses to force that $c_e=(s_u\neq s_v)$. So, $c_e=\mathrm{TRUE}$ iff. $e$ is crossing $(S, V\setminus S)$.
Then, we use half-adder and full-adder as before to count the number of crossing edges. Lastly, compare as before.

Reducing INDSET and MAXCUT to 3SAT


PnP Provisioning | Create a SharePoint list with rating enabled

Question: We are unable to create a SharePoint list with rating enabled on it.
Can someone help us in creating XML schema for the above requirement.
Thanks in advance.
Answer: If you create a test list and enable ratings. Extract a template containing the list and you will see relevant artifacts. You will need to sure the underlying columns such as ratedby under the site fields element
Answer: For rating enabled list, we need to add 6 column below, 4 for rating and 2 for likes:
Guid RatingsFieldGuid_AverageRating = new Guid("5a14d1ab-1513-48c7-97b3-657a5ba6c742");
             Guid RatingsFieldGuid_RatingCount = new Guid("b1996002-9167-45e5-a4df-b2c41c6723c7");
             Guid RatingsFieldGuid_RatedBy = new Guid("4D64B067-08C3-43DC-A87B-8B8E01673313");
             Guid RatingsFieldGuid_Ratings = new Guid("434F51FB-FFD2-4A0E-A03B-CA3131AC67BA");
             Guid LikeFieldGuid_LikedBy = new Guid("2cdcd5eb-846d-4f4d-9aaf-73e8e73c7312");
             Guid LikeFieldGuid_LikeCount = new Guid("6e4d832b-f610-41a8-b3e0-239608efda41");

Then you could enable the rating settings using PnP C# code like below:
How To Enable Ratings/Likes For A List In SharePoint Office 365 Programmatically Using PNP C#
For list schema definition, you could simply create a list with rating enabled and then get the list schema using PnP PowerShell:
Connect-PnPOnline –Url https://tenant.sharepoint.com/sites/jerrydev/ –Credentials (Get-Credential)
$list = Get-PnPList -Identity "ratinglist" -Includes SchemaXml
$list.SchemaXml

It will return the whole schema definition then you could use to provision.


Get List Title in SharePoint designer workflow

Question: I have a requirement that i need to catch the List title in a sharepoint 2010 designer workflow from list.
Can any one please exlain how to catch the List title
Regards,
Suresh Pydi
Answer: you could define a new variable and save the URL Path of the List within the newly created variable. After that just extract a substring at the position of the Listname.
For instance your URL Path to the List is:
'http://shppage/Lists/NameOfList/AllItems.aspx'
just get the substring after Lists/ up to until /AllItems
In this Case, copy Substring from 20 to 30(Into the Variable:ListName).
Regards
Ben
Answer: The list's Title is not guaranteed to be part of the list's Path.
The OOTB string functions in SPD 2010 Workflows are weak, to say the least. And index based substring methods are only useful for non-reusable workflows.
It's ridiculous that something as simple as the list URL, path or title aren't available from the Workflow Context.
I'm sorry to say that the only way to achieve this is with a 3rd party product or custom workflow actions.
Answer: There is a workaround that accomplishes what you need for an individual list.
Create a new text column with a Default value of the list's Title. This will allow you to access the list title from the "Current Item" context within the workflow.
Note that this value will be incorrect if the title name changes.
Answer: You could create your WF as a Reusable WF based on your list content type, then create an association form parameter, so that you can write list name when you associate your WF to the list. Now you have this parameter available in your WF.
Answer: You could create a custom list which ties an ID number to a List title. Within the workflow, reference the List/ID pair to get your title.
This would work similar to u/henry's answer, but will allow you to change the List title in 2 places instead of for every list item's hidden field.


How to add node modules to cPanel

Question: I am new to web hosting. I am currently hosting my website on Morse Host.  My website has a menu screen that requires node modules. Uploading them from my computer will take a really long time. Is there a way I can include them in my cPanel?
Answer: There are instructions here - https://docs.cpanel.net/knowledge-base/web-services/how-to-install-a-node.js-application/
If you don't have SSH access, maybe your hosting tech support can install it for you.
Comment: This is a link-only answer. It is not appropriate to require that people click a link to get their answer. It would be better to provide an answer here. Please edit this to summarize the instructions. We are trying to build a repository of knowledge here.   Links often change over time or break. Answers written here are very stable and are likely to be available long-term. See [Are answers that just contain links elsewhere really "good answers"? - Meta Stack Exchange](https://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers)
Comment: Node_modules are directories of files I need to upload to my already built website for one specific functionality to work...

How to add node modules to cPanel


What is a good way to catch the Mysterious Stranger?

Question: When ever I hear the music to indicate the Mysterious Stranger has arrived, I can never find him. It is almost like he is not in the vault.
What is a good way to catch the Mysterious Stranger? Where does he usually show up?
Comment: I've caught him in any room, and also saw him disappear into an elevator once.
Answer: He shows up in random places, so there is no place he usually shows up.
One hint is the volume of the music. If the music is louder, he's closer to where you're currently looking. Wearing headphones helps to determine how loud it is.
Answer: Have Less Rooms
As the Mysterious Stranger can appear in any room, you'll increase your chances of spotting him if you decrease the number of places he can spawn. Get rid of excess items and decrease your storage rooms (because you don't really need 100 things of Yarn or those 18 .32's), upgrade your rooms to max so you can run less off them, make your Vault as compact as possible to also get rid of elevators.
Use Color-Clashing Rooms
With the new feature of theme rooms, choose themes for your rooms that are not brownish, so that when he does show up, he will be easier to spot.
Give All Your Dwellers Highly Visible Outfits
Just how it's harder to spot him in a brown room, it will be harder to spot him when all your dwellers are wearing trenchcoats.
Get A Pet
A specific type of tiger-striped cat will increase the chance of him spawning.  I have a cat named Kato that gives a 7.5x bonus to spawns!
Take Screenshots
As @psycho brm has stated, take a screenshot once you know he's there, and play a little game of Where's the Mysterious Stranger before opening up the app again and spotting him.
Other "Strageties"
I'm of the mindset that he usually spawns just outside of the visible space you are currently looking at in-game, but for every time I think I can confirm this hypothesis, there are 2 or more times when this doesn't work.
Answer: Make a screenshot (with HD zoom out disabled), switch to photos application to find him, then come back to get him.
Turn on vibration in settings and you can do this everytime the phone vibrates, while watching movie or something...
Answer: One tactic that helps is to play on a large screen device but fully-zoomed out with "HD graphics zoomed out" turned off.
The trickiest part of the Mysterious Strange is that he can appear behind objects.  In a level 3 Medical Center, he can appear in that tiny room in the back.
By zooming out all the way and the game switching to flat sprites, there is nothing for him to hide behind and it'll be a little easier to find him.
Answer: Best Solution to catch the Mysterious Stranger is wearing Headphones, as the music which plays once he appears comes from his exact place, and you can find him by moving the camera and get the music to the center of the screen, using arrow keys or AWSD makes it easier to move the camera
I can tell that i catch him at least 50% of times he appears


Can I pigtail #10 and #14 wires in my service panel?

Question: I foolishly pulled 60' of 10/2 cable only to open the cover of my panel to find it has no room for the needed 30 amp breaker.  Can I pigtail the two 14 ga wires from two 15 amp breakers with one of the 10 ga wire conductors?
Comment: Is this for an RV, camper, tiny house or other setup using a TT30 socket?  Do you have any other 30A appliances?
Comment: Also a photo of the panel in question may help us identify alternatives.
Comment: Can you post photos of the breaker situation please?
Comment: Welcome. Please revise to elaborate on your plans. It sounds like you want to connect #14 wire to a 30 amp breaker. That's a hard no.
Comment: Is this a 240V device or a 120V device?
Answer: Don't do that!  What you're proposing, using two 15A breakers as a substitute for one 30A breaker, is called Circuit Breakers in Parallel and is the topic of NEC 240.8:

240.8 Fuses or Circuit Breakers in Parallel. Fuses and circuit breakers shall be permitted to be connected in parallel where they are factory assembled in parallel and listed as a unit. Individual fuses, circuit breakers, or combinations thereof shall not otherwise be connected in parallel.

Paralleling is only allowed for really big connections - typically 100s of Amps, where otherwise wires would be so large that installation would be difficult and the wires very expensive.
What you may be able to do is replace the pair of 15A breakers with a double-pole 30A breaker. Why double-pole? Most 30A devices are actually 240V, not 120V. If that's the case, you actually do need breakers, but they need to be 30A, not 15A, and they need to be common-trip, which means a double-breaker rather than 2 separate breakers.
10/2 is black & white. While generally speaking black goes on hot and white goes on neutral, pure 240V circuits are an exception. Black goes on one breaker and white goes on the other breaker. No neutral because neutral (in a US 240/120 system) is only used for 120V circuits.
It sounds like you may be trying to do something extra dodgy!  Don't!
Comment: I haven't been editing for a long time because of "reasons". But I will make an exception here for safety.
Comment: Thanks for the clarification!
Comment: Sorry for the down-vote, but without more explanation this leaves OP open to some serious potential problems.
Comment: Maybe you could suggest an edit to make it read more cautiously?  It was my intention to advise the OP **not to do this** because it's against 240.8.
Comment: I see the confusion. The "listed as a unit" is **not** "anything that is a unit" (like a double-breaker) but rather anything **designed for paralleling**.
Answer: You can't do that.  But that doesn't make any sense.  If you have two 15A breakers unused for anything, why wouldn't you just pull them out and replace with a 30A breaker?
If the circuits are still being used for other things, then again, stop and think. If the other loads on the circuits are so small that the 30A thing can use most of their capacity, then those two 15A breakers could simply be combined onto one.  Pigtail the two #14 wires to another #14 or #12 wire and land that on one 15A breaker.    Now you have an unused breaker; swap that for your 30.
Other than that, I have to say, you are asking an XY problem.  That is, you have a problem, but you're not asking about how to solve the problem, you're focusing on a method - and not surprisingly since you're a novice, it's not well-chosen.  I recommend you re-ask the core question of "I need to add a 30A circuit breaker to may panel for ______ load (do say), but my panel is full, what do I do?"  We answer those all the time.
Comment: +1 for XY Problem identification (and all the rest).


Does Grounded on Xbox One support Mouse and Keyboard?

Question: I just saw this cool game that came out recently and thinking of buying it for Xbox One, but I would prefer playing it with keyboard and mouse and not with controller, but I don't know if it works with it. Does the game work with a mouse and keyboard on Xbox One?
Answer: Keyboard support appears to be available for the game on Xbox, but mouse input does not appear to work.
This forum post on the Obsidian website claims that keyboards appear to work but that is it:

Playing on Xbox One, having the same problem - the game doesn't appear to be detecting the mouse. I can't "sign in" in the beginning of the game by clicking mouse buttons, and I can't turn with in the mouse inside the gameworld.

There are a few other forum posts on the site as well that state the same.
Comment: @Kerk an [Xbox Support Page](https://support.xbox.com/help/hardware-network/accessories/mouse-keyboard) states only select games have mouse support enabled and that you should consult the game to see if it does support it - but I couldn't see anything stating so on the store page for the game.  You would think that because the game is also available on Windows that it would support a mouse, but the Xbox must have some limitation in that sense that must be supported on a per-game basis.


Codec/Hardware Advice on real-time encoding multiple HD streams

Question: Does anyone know of what kind of hardware along with any good codecs that could reasonably encode 3 x 1920x1200 60fps DirectShow streams in real time? Preferably a lossless codec but I know at these massive rates it might not be feasible. I know there are some OpenCL/CUDA based codecs out there but don't know of what kind of hardware would be required to to this in real time. Price is non-issue but we are planning on using epiphan's DVI2PCIE capture cards.
Answer: To do this, you would need real time encoding hardware and some seriously high speed hard drives.  I know devices like the Matrox MX-02 will work for 1080p30, but I'm not sure about resolutions higher than that and at 60p.  I think Black Magic Design has some 4k real time encoders but I'm not sure if they support 60p.  Multiple SSDs would also pretty much be a requirement.  Probably on separate controllers and even then the bus rate might be a bottleneck with that much data.
Comment: @ProfessorFartSparkle - "Preferably a lossless codec but I know at these massive rates it might not be feasible."  Even as H264, it can cover a very wide range of possible data rates, including some that would require extra SSDs to record to in parallel.
Comment: Throughput wouldn't be an issue here if we are talking about live capture and encoding, everything would stay in RAM for this and only the final video would be written to the disk which isn't much with h264 encoded video, a modern SSD would suffice for that.
Comment: I'm faced with that issue at my current job quite often, mostly concerning playback but its the same for writing when it comes to high-end synchronous SSDs.
Lets take a completely lossless approach. An uncompressed full HD frame is 5.93262 MB in size. JPEG2000 can compress a lossless frame at a ratio of 2:1 on average. Ususally even better. At 60 FPS that would mean we would need to write at 177,9786 MB/s per second. Times 3 we are at 533,9358 MB/s. Thats scratching at the limits of SATA3 SSDs but still possible when having a reasonably sized RAM buffer and no issue at all with PCI-E SSDs.
Comment: Though the reason I mentioned h264 is that its one of the few codecs that have full hardware support in many devices. If you dont go for hardware encoding you will need a quite powerfull system, though if money is really not an issue at all you can just go for a crazy system with 64GB of RAM and 12+ cores. That will cost you about 2000-3000$ (self built) but will definitely get the job done if the software can keep up with that, not all capture card drivers are made for having multiple capture devices in the system.


why geth.log too large

Question: geth.log is 84.73GB, so that mobile phone complains no disk space left. Would the geth.log be mandatory to generate?
Answer: Geth client doesn't generate log by default, but you could save logs to a file if you want so which isn't really useful I think.
The size of a fast node is already near 130 Gb to be sync with the Ethereum network
Answer: No, it is not mandatory to write log, moreover there is no log file by default.

why geth.log too large


Setup IIS 6/7 to passthrough to Glassfish v2.x

Question: I need to setup IIS 6 and 7 to pass all request to Glassfish v2.x. Is there a simple tutorial that will get this interaction between IIS and Glassfish working?
Answer: GlassFish supports ajp, so you could use the isapi_redirect.dll from the apache tomcat connectors project to forward all requests.  I wrote a starter HOWTO but being new to ServerFault, I don't know if it is tacky to link to one's own sites.  Google "howto isapi_redirect.dll" and mine is the fourth result.


What is the diffrence between hiragana and katakana?

Question: I am just a begginer. I finished learning Hiragana . Now , I am learning Katakana . I realized that they are same. So that made me worry a little .
How do I decide which one to choose ? Are there any words that you cant use katakana instead of hiragana or hiragana instead of katakana  letters in them ? Also, If  write it like that will Japanese people can understand what I meant ?
Comment: Related: http://japanese.stackexchange.com/q/6113/7810, http://japanese.stackexchange.com/q/362/7810
Comment: I think [this question](http://japanese.stackexchange.com/q/362/1628) answers your question.
Answer: Words of non-Chinese foreign origin are generally written in katakana, for one thing. Besides that, there a few Japanese words it's quite common to write in katakana, such as オシャレ and ダメ. In some works of fiction, a character's dialogue may be written in katakana to project a 'robotic' or 'otherworldly' tone.
Answer: Hiragana is used for spelling out Japanese words, and katakana is for words that were adopted from other languages.
While you could write everything with just hiragana and katakana, using kanji makes your text less vague, as with phonetic spelling, your text could be potentially interpreted in many different ways.
Comment: Well, so katakana is for adopting Japanese words from other languages ?  If so , if I write it with full katakana or hiragana people can understand ? Its still the same word with same meaning right ?


Mistake in equation 5.4 for quantum gravity baryon decay and fermion case

Question: In the paper https://projecteuclid.org/euclid.cmp/1103922050, the equation 5.4 seems to be lacking a minus:
$$\left(\dfrac{m_B}{m_P}\right)^8\dfrac{1}{m_B}\sim 10^{122}yrs$$
seems to be OK only if $n=-8$ (anyway, I am also doubtful about how he computes the 8 factor), since if we plug $\hbar\sim 10^{-34}J\cdot s$, $c^2=10^{17}m^2/s^2$, $m_B\sim 1GeV=10^{-27}kg$ and $m_P\sim 10^{19}GeV$, then
$$(10^{-19})^{-8}\cdot \dfrac{10^{-34}}{10^{-10}}\sim 10^{128}s\sim 10^{122}yrs$$
Am I right? Is the argumenf of the paper also valid about for the fermion case? Should it be
$$\tau=\left(\dfrac{m_f}{m_P}\right)^n\dfrac{1}{m_f}$$
and how to get the thumb rule for guessing the $n$ for fermions?
Answer: Maybe, I think I got partial answer to my confusion...
The RATE of proton decay should be
$$\Gamma=\left(\dfrac{m_B}{m_P}\right)^8m_B\sim 10^{-128}s^{-1}\sim (10^{122}yr)^{-1}$$
However, I do not understand yet how to pick up the $8th$ power (i.e. the power counting is a mystery yet from the paper Feynman rules, but I presume it has to do with the Born rule and the coefficient of the Feynman graphs...). Moreover, I am not sure of how to get a similar result for fermions. Why should the coefficient for fermions be different from baryons? After all, if we allow for B and/or L symmetries, maybe B-L symmetry, how to understand all this?