Sample from an infinite discrete distribution where probabilities are known up to a normalization constant

Question: Let $X$ be a random variable taking values in the set of natural numbers. For each $i >0$ let $p_i = P[X = i]$. Say I don't know $p_1,p_2,...$ but I do know $q_i = ap_i$ for every $i > 0$, where $a$ is a unknown constant. If I were able to compute $a = \sum_i q_i$, then I known how to sample from the distribution of $X$. Otherwise, if $a$ is difficult to compute, is there a method to obtain samples from the distribution of $X$?
Comment: This is an interesting question.  It is usually not computationally prohibitive to sum a series of numbers (particularly since they decreased to zero), so can you give any explanation of the context where this problem arises?  If summing a series of numbers is computationally prohibitive, then presumably there will be other computational limitations on the kinds of methods that can be applied.
Comment: @MGF: Okay, that seems like a very different question to me (and one that has an analytic solution that is well-known).  Anyway, thanks for elaborating.
Comment: Well, that is just the context in which I came up with the question, I was just wondering, in the  general scenario (described in the question) is there a general method to sample from the desired distribution?
Comment: Do you know where the maximum of the $q_i$ values is? Alternatively, is it feasible to idenfify it? Do you know if it's unimodal (where for a discrete with an interval where there's a flat region with $q_i=q_{i+1}=...=q_{i+k}$ which are all the highest q-value, we still call that unimodal). Do you know anything else about it? (e.g. is it strictly monotonic-decreasing away from the mode? Is it decreasing at least as fast as exponential?)
Answer: An exact simulation is possible if you can find another sequence from which you can draw simulations $\{p_i\}_{i>0}$ such that $\max\left\{\frac{q_i}{p_i}\right\}=M<\infty$ by means of rejection sampling.
The algorithm goes as follows:

Obtain a sample $j$ from distribution $Q$ and a sample $u$ from $\mathrm{Unif}(0,M)$.
Check if $u<\frac{q_j}{p_j}$.

If this holds, accept $j$ as a sample drawn from $Q$;
if not, repeat from begining.

That being said, if $Q$ is very far from $P$ (in the Lévy-Prokhorov metric (e.g. if $Q$ is an exponential variable shifted to 1e10 and $P$ is a discretised Log-Cauchy) getting a sample with this method will be more computationally intensive that just crawling the sequence $q_i$ up to a certain value, cap it and normalize it.
Here's a sample code using Python
<code>import numpy as np
from scipy.stats import poisson
import matplotlib.pyplot as plt

sim_size=10000000
lam = 10
def seq(n, lam):
    return poisson.pmf((np.ceil(n/5)*5), lam)

def sup(n, lam):
    return poisson.pmf(n, lam)

Y = np.random.poisson(lam=lam, size=sim_size)
U = np.random.uniform(size=sim_size)
X = Y[U<seq(Y, lam)/sup(Y, lam)/84]

gp = np.unique(X, return_counts=True)

gp2 = np.unique(Y, return_counts=True)

plt.plot(gp[0], gp[1]/len(X))
plt.plot(gp2[0], gp2[1]/len(Y))
</code>


How to install ILMerge on 64 bit Windows7

Question: Running the ILMerge.msi (version 2.12.0803) on my 64 bit Windows 7 SP1 machine with .NET 4.0 fails & puts up an error dialog reading "This setup requires the .NET Framework version .  Please install the .NET Framework and run this setup again."  The ILMerge page at Microsoft Research says it should work with .NET 4.0 and Windows 7 but is silent about 64 bit.  Has anyone installed it on 64 bit Windows?
Comment: I presume you also have the .net 2.0 runtime installed?
Answer: Installing via nuget indeed did the trick for me. Note that I do not have the .NET 2 Framework installed.
Answer: Have you tried installing via the nuget package? If that also fails, it might pay to contact Mike Barnett and he'll get you sorted.


IIS 8.5 with Exchange 2013 creates and sends old intermideate certificate to client

Question: I have a problem with strange behavior of IIS 8.5. The server hosts Exchange with configured SSL of course. The problem started when I replaced an intermediate certificate of StartCom from SHA1 to SHA2. It works on all my resources but not only this Exchange server.
What I did: i've removed the old SHA1 intermediate certificate from the cert store, downloaded proper certificate from StartСom, rebinded web sites and rebooted the server. It did not help. When I open the web site on the server it works, but remotely the server has kept sending the old sertficate SHA1.
I checked that there is no any certificate with this serial number on the server.
I dug the internet and found similar problem IIS sends incorrect intermediate SSL certificate
The guy had the same issue. But unfortunately, no one solution didn't help me.
My server returns wrong intermediate certificate which doesn't exist on the server even.
Somebody know if there is a way to get IIS to build cert chain with specific certificates?
Thanks.
Answer: Does the new Certificate have a  intermediate ?
if so make sure you have it import correct.
Go in Exchange Admin Center then Server and Certificates tab then Edit the Services need. (IIS)
Comment: I'm sure that the intermediate certificate was imported correctly. My certificate was not changed because StartSSL re-keyed intermediate certificate. When I open my certificate in mmc I see correct chain with the same new intermediate cert with new expiration date and serial, but when I open certificate which was sent to me by IIS from my site I see old intermediate cert. Exchange works normally but the red shield annoys me.
Answer: Was your SSL certificate actually signed by this new intermediate cert? If you haven't rekeyed the certificate with your CA, it will still have the old intermediate in it's chain.
If you did generate a new certificate you may need to reboot the IIS server. I've seen where IIS cache's the certificate chain and rebooting fixes the issue.
Comment: Is it possible to make sure what intermediate certificate is the proper certificate (serial, thumbprint or something else) for my certificate? Actually, I didn't rekey different certificates from StartSSL and they work properly after replacing intermediate certificate in certification store on all servers.
Reboot doesn't help for my Exchange. But it's correct - I had to reboot every server after replacing intermediate cert.
Comment: Your CA should be able to tell you what Intermediate to use and how to install/configure it. Contact their support.


Re-entering the UK after tier 5 visa expires

Question: I am a Canadian citizen and had a YMS visa that expired on May 10th 2018. I left the UK on September 1st 2017. I plan on going to the UK to visit some friends at the end of November/beginning of December, will I have problems at the border?
Comment: Related https://travel.stackexchange.com/questions/100662/my-tier-5-youth-mobility-expired-2-months-ago-can-i-re-enter-the-uk-as-a-touri
Comment: Possible duplicate of [My Tier 5 youth mobility expired 2 months ago — can I re-enter the UK as a tourist?](https://travel.stackexchange.com/questions/100662/my-tier-5-youth-mobility-expired-2-months-ago-can-i-re-enter-the-uk-as-a-touri)
Comment: Nobody can tell if you will have problems or not because you may have other issues.. However if you are specifically referring to problems related to the fact that you returned from the UK **only** one year ago and going back, you should not have any problems based on that. One year is a long time to be away.
Comment: I disagree this question is off-topic as people who VTC has suggested (or the way SE has automatically summarised in the yellow "put on hold box" below the question), as it ask about _short term visit_ **after** a longer term visa expires. It is at best what @k2moo4 suggested - a duplicate.
Answer: Assuming you are doing nothing more in the UK than a short visit with friends, and unless you have some issue with UK immigration you have not told us about, you will have no problems at all.
Canadians do not need a visa to visit the UK for short visits. Revisiting one year after you have left on another visa is certainly not too short a time.


Azure backend ignoring meas_level=2

Question: I'd like to retrieve from IonQ QPU provided by Azure the  per-shot measurements.
Azure recommends the results are retrieved via Qiskit.
The standard Qiskit command for that is: shots_mem_list=job.result().get_memory(0) which  will deliver a list  of bit-strings: ['101011', '101111', '000100', '111100',...]
But to make it work the job needs to be submitted to the backend with 2 additional flags: meas_level=2 and memory=True.
 backend.run(circ, count=100, meas_level=2, memory=True)

However,  Azure is ignoring meas_level flag:
meas_level is not a known attribute of class <class 'azure.quantum._client.models._models_py3.JobDetails'> and will be ignored

As a consequence  Qiskit result.get_memory(0) command produces an error:
qiskit.exceptions.QiskitError: 'No memory for experiment "0". Please verify that you either ran a measurement level 2 job with the memory flag set, eg., "memory=True", or a measurement level 0/1 job.'

Is it possible to invoke azure.quantum.backend with meas_level=2 argument to be passed to the backend?
Answer: No, Azure Quantum doesn't support setting memory=True on a backend yet. See: https://github.com/microsoft/qdk-python/issues/225
The only workaround is to simulate the individual results by populating the memory on the client using the same probability distribution as the results from the job, something like:
result = backend.run(circuit, count=100).result()
memory = random.choices(list(result.keys()), weights=result.values(), k=100)
print(memory)

the values will be statiscally equivalent, but they are of course not the actual measurements that you got from the device.
Comment: I'm measuring on the real device and it is costly. The reason I want to activate this option is I want to re-analyze the measurements instead of submitting new jobs with smaller number of shots. Since 1+1/2+1/4+...=2 - it would save me 1/2 of the total cost. Would be great (for users) if Azure were to support memory=True.

Azure backend ignoring meas_level=2


Browse LDAP strcuture using Solaris pre-packaged command?

Question: I have used ldapsearch to pull details on accounts but is there a way to browse the different levels in the LDAP directory just like we do with files in a directory?
Comment: Please clarify what you expect. i.e. "just like we do with files in a directory" with what command ? What limitation do you believe ldapsearch has ?
Answer: Maybe this is what you are looking for.
Maybe there is a solaris version out there…,
another one, but webbased could be this.
Comment: Thanks! But I am looking for a way to browse using a pre-packaged command.. Basically I work in an environment where there are restrictions to using outside apps
Answer: Yes, and no.  There is no pre-packaged tool that "comes with" Solaris, that serves as an LDAP browser.  You could do an big giant wild-card ldapsearch, and just read through from end to end using less.
However, if you have Solaris LDAP servers, then there's a possibility that the Solaris (Sun or Oracle) Directory Service Control Center (DSCC) is installed.  This is a web based system based on Apache/Tomcat that centralizes the management of LDAP servers in a Solaris environment.  See: http://docs.oracle.com/cd/E19261-01/820-2763/6nebgu69u/index.html
The DSCC does include LDAP browsers, as well as a convenient way to manage server settings, replication settings, etc, etc. And, it is a packaged product from Oracle, and as such may be allowed in your environment.


Ubuntu gnome terminal freeze

Question: I'm a bit new to linux. using Ubuntu-16.04LTS.
The terminal froze when i trip to open browser using terminal command.
Browser name website
(chromium-browser www.facebook.com)
Terminal resumed after closing the browser
Is there anything I need to know?
Comment: Yes, anything that you run from a terminal window (including GUI apps), will exclusively use that terminal until you close them. You can append `&` after the command to run it in the background, thus letting you use the terminal. `chromium-browser www.facebook.com &`.
Comment: This is normal.
Comment: @JonasCz  so can the website be used via commands? Like login or message via terminal?
Comment: No, chrome(ium) does not support that.
Comment: So does any other browser supports? Can you recommend me to a website or article , where i can find how to operate this?
Answer: Yes .. That's the way it works. As long as a command is running in the terminal, it is blocked from doing other things. Think of chromium-browser as a long running process, just as sleep 60 or similar.
You can put it in the background, freeing your terminal prompt for other work, either by pressing ctrl-z to suspend the process, and then type bg %1 (or the number ctrl-z returned in [] if not 1) to let it run in background.
Or adding a & after the command when you start it:
sleep 60 &

This will send it in the background immediately.

Ubuntu gnome terminal freeze


If I turn into a Gas Spore and use Death Burst, do the other spores count as "me"?

Question: In Circle of the Seedling you can use Wild Shape to turn into plants. If I am a Gas Spore and use Death Burst, assuming the target fails the save and eventually dies from the infection, are the resulting Gas Spores that grow from their corpse considered my character?
Answer: There is absolutely no precedent for this in any other part of the game system. We are definitely in DM ruling territory.
However, I would say these are no more your character than if the story involved you creating progeny any other way. The only difference is the speed in which this is possible. The new gas spores are your character's "children". Sadly they are mindless, highly dangerous, monstrous children, and are unlikely to recognise or respect their relationship to your character as their parent.
Probably the only useful thing they would do is ignore the druid if he/she was currently transformed into something that they could not infect, such as another gas spore.
Comment: @Hunter: Yes I also answered that question. These are fun things to consider, but you do probably want to avoid too weird outcomes, because the game moves away from anything the rules can say about it. My ruling would be that you don't "become the spores" any more than you become the blood of a wolf form that was injured, or a fire that a fire elemental set before dying.
Comment: I see, I can see this being DM territory. If you look at an answer to another question I asked recently, someone made the case that I would die if I used Death Burst as I would BE the spores and could not reform. But if I explode INTO the spores and those spores infect someone and grow into Gas Spores then those would still be made out of me. I guess I'm just making an argument that would have to be approved by my DM...
Answer: No.
Plant Wild Shape refers to and modifies the rules for the general druid feature Wild Shape, which says (PHB 66):

You automatically revert if you fall unconscious, drop to 0 hit points, or die.

The Gas Spore's Death Burst ability says:

The gas spore explodes when it drops to 0 hit points.

Since both rules are triggered by you dropping to 0 hit points in your Gas Spore form, it would be the DM's call as to whether you revert without exploding, or whether you explode, possibly infecting other creatures, and then revert.
But in either case, your reverted natural form is you.
The July 2016 Sage Advice says that a druid in Wild Shape reduced to 0 hit points by a Disintegrate spell turns to dust.  This seems to imply a druid must have some sort of body to revert from.  If the DM ruled you did explode, it's still the DM's call whether a cloud of spores is "enough of a body" to revert from, but this precedent does lean much more toward suggesting you wouldn't reform after all.  So maybe being a Gas Spore was a poor idea.  Unless your character's friends can get a True Resurrection, time to play a different character.
Any spores that grow from an infected corpse are really the offspring of the spore that exploded anyway, not the same spore, which is quite dead.  There are other ways for a character to become a parent, if your DM allows, and there's no reason for your offspring in those situations to be considered you.
Of course, the DM can also specifically permit you to switch to playing as a different creature, related to your original PC or not.
Comment: I can see this as being a solid answer. But since those spores are made of your body, and it's your body that you're transforming, I can see those spores as being "you", part of your form. After all that's why you die, because you explode into those spores. They'd still be your body imo. I think I'll just have to ask my DM. As a counter to it, I could see the argument that if all creatures in that radius succeed on the save, you just die instead without reverting.
Comment: While I understand where you are coming from with the answer, I would say that, while Disintegration reduces a target to pure, inert dust, the Gas Spores are not dust but living cells, and the spores have the ability to rapidly grow into a new being. It isn't too much of a stretch to say that the spores condense on a surface and rapidly grow back into a Mushroom, which then reverts to being a Druid.
Comment: Xanathar introduced a rule that order of things that happened simultaneously is decided by the person who controls the character that has his round at the moment. Thus, it might or might not be the DM. Also, Sage Advice was charged since this answer was posted.
Answer: No
When you revert to your own form, the shapechanged form vanishes. So when you explode and revert there would be no spores left over that could spawn into anything, as they were part of your shapechanged form.
All the spore fragments dissolve and you magically reconstitute into a single, whole body. You certainly would not want to remain in exploded state: apart from being inconsistent with damage done to the shapechanged form vanishing when you revert, it would spell instant death to your character.
I am mostly writing to provide an update on schleper's answer. There are additional, optional rules from Xanathars Guide to Everything on simultaneous effect, on p. 77

In rare cases, effects can happen at the same time, especially at the
start or end of a creature's turn. If two or more things happen at the same time on a character or monster's turn , the person at the game table - whether player or DM- who controls that creature decides the order in
which those things happen.

Based on this, only if you died during your turn, (say due to an opportunity attack) you could determine the order, and decide that you explode first, and revert second.
The Sage Advice ruling on disintegrate also has been reverted. It now reads:

What happens if a druid using Wild Shape is reduced to 0 hit points by disintegrate? Does the druid simply leave beast form? The druid leaves beast form. As usual any leftover damage then applies to the druid's normal hit points. If the leftover damage leaves the druid with 0 hit
points, the druid is disintegrated.

(The older SA ruling said, you are disintegrated in your shapechanged form). This new ruling would support that any effect that renders you unconscious, puts you to 0 hits or kills your wildshape form just makes you revert to your normal form first, and then applies remaining effects.


How to compile a static library in Linux?

Question: I have a question: How to compile a static library in Linux with gcc, i.e. I need to compile my source code into a file named out.a. Is it sufficient to simply compile with the command gcc -o out.a out.c? I'm not quite familiar with gcc, hope anyone can give me a hand.
Comment: check [this](https://medium.com/@meghamohan/all-about-static-libraries-in-c-cea57990c495)
Answer: See Creating a shared and static library with the gnu compiler [gcc]
gcc -c -o out.o out.c

-c means to create an intermediary object file, rather than an executable.
ar rcs libout.a out.o

This creates the static library.  r means to insert with replacement, c means to create a new archive, and s means to write an index.  As always, see the man page for more info.
Comment: `-o` isn't required. The output will be the same (`out.o`)
Answer: Here a full makefile example:
makefile
TARGET = prog

$(TARGET): main.o lib.a
    gcc $^ -o $@

main.o: main.c
    gcc -c $< -o $@

lib.a: lib1.o lib2.o
    ar rcs $@ $^

lib1.o: lib1.c lib1.h
    gcc -c -o $@ $<

lib2.o: lib2.c lib2.h
    gcc -c -o $@ $<

clean:
    rm -f *.o *.a $(TARGET)

explaining the makefile:

target: prerequisites - the rule head
$@ - means the target
$^ - means all prerequisites
$< - means just the first prerequisite
ar - a Linux tool to create, modify, and extract from archives see the man pages for further information. The options in this case mean:

r - replace files existing inside the archive
c - create an archive if not already present
s - create an object-file index into the archive

To conclude: The static library under Linux is nothing more than an archive of object files.
main.c using the lib
#include <stdio.h>

#include "lib.h"

int main ( void )
{
    fun1(10);
    fun2(10);
    return 0;
}

lib.h the libs main header
#ifndef LIB_H_INCLUDED
#define LIB_H_INCLUDED

#include "lib1.h"
#include "lib2.h"

#endif

lib1.c first lib source
#include "lib1.h"

#include <stdio.h>

void fun1 ( int x )
{
    printf("%i\n",x);
}

lib1.h the corresponding header
#ifndef LIB1_H_INCLUDED
#define LIB1_H_INCLUDED

#ifdef __cplusplus
   extern "C" {
#endif

void fun1 ( int x );

#ifdef __cplusplus
   }
#endif

#endif /* LIB1_H_INCLUDED */

lib2.c second lib source
#include "lib2.h"

#include <stdio.h>

void fun2 ( int x )
{
    printf("%i\n",2*x);
}

lib2.h the corresponding header
#ifndef LIB2_H_INCLUDED
#define LIB2_H_INCLUDED

#ifdef __cplusplus
   extern "C" {
#endif

void fun2 ( int x );

#ifdef __cplusplus
   }
#endif

#endif /* LIB2_H_INCLUDED */

Comment: please add following lines to your header to support ```c++``` compiler:

```#ifdef __cplusplus
extern "C" {
#endif
.
.
.

#ifdef __cplusplus
}
#endif```
Comment: it would have helped to point out what the commands do, and what they intend to achieve. especially in this case the `ar` needs explanation, as it is the key to creating the static library.
Comment: The `ar` program creates, modifies, and extracts from archives, which are a single files holding a collection of other files in a structure that makes it possible to retrieve the original individual files. `ar` creates an index to the symbols defined in relocatable object modules in the archive when you specify the modifier s. (see `man ar`)
Comment: This is a brilliant answer, thank you!
Answer: Generate the object files with gcc, then use ar to bundle them into a static library.


Drupal 7 and Views, contextual filters searching through multiple/combined fields. Is it possible?

Question: I've worked with Drupal 7 and Views for a while now and I'm familiar with what Views allow by default and what is available as modular add-ons. Today I've come across an issue with Contextual filters, which allow you to pass in an argument via the URL and use this to filter the returned data.
Normal filters on the other hand can be exposed as a form and also allow for a field combination module which means we can search field{1,2,3} all at once and display the data depending on this input. (views_combined_fields)
Is it possible to tell Views to show me all rows (WHERE field1="test" OR WHERE field2="test" OR WHERE field3="test") but by default, if I add in multiple contextual filters only one of them is being triggered. In this example the "test" value is obtained from the url /data/test.
My problem is that users have a default group, but they also have the option to be added into other groups which are set in the field{1,2,3} fields. My current view shows all users WHERE group = "test" but I want users who have a secondary or tertiary group of "test" to also be displayed in this list.
Answer: As i understood, you are talking about Views Arguments, watch the tutorial video from
MustardSeedMedia.com. And useful video about Views 3 User Interface


Copied a post to move it, and it is now on pastebin?

Question: I asked a question on Stack Overflow earlier but was advised to move it to Super User. I copied and pasted from one to the other. I have just noticed that the exact question I asked (and subsequently copy/pasted) is now on pastebin and was apparently added there by 'A Guest' an hour ago. The same time I copied the question. Only the sections formatted as code blocks appear on pastebin. Can anyone shed some light on this?
Comment: I asked because I wasn't certain 'somebody' was doing just that, I was curious (naively it seems) if there was some sort of relationship/link between Stack Overflow and pastebin.
Comment: Don't be too surprised that code you post to an open web site visited by millions of programmers has a knack for multiplying :)
Comment: No, I get that :) I just found it peculiar that only the code-block sections were copied, as opposed to the whole question.
Comment: How should we know who copied your code for what reasons? Evidently somebody did just that, but as long as the specific user doesn't show up here and shares his reasons, we can only offer baseless speculations.
Answer: Your question on Super User was posted on 2014-09-29 09:44:06Z, the pastebin was posted on Monday 29th of September 2014 04:47:01 AM CDT. So the pastebin was posted 3 minutes later.
Someone who saw your question put the code on pastebin for some reason. There's nothing special going on.


Changing router WAN IP Address

Question: Hi I don't really understand how WAN IPs work, can someone explain how I can change my address to a static one. How can I know if the address I want is taken? How can I see what addresses are available?
Answer: You absolutely need to work with your ISP/WAN provider. Start with their documentation and your contract, and contact their tech support if you're not sure what something means. They may decide that your questions actually need paid professional services, so be prepared for that.

Changing router WAN IP Address


Canonical ensemble heat reservoir

Question: In canonical ensemble we treat the remainder systems as heat reservoir. Ensemble is collection of systems in all possible states of a system under study. Actually they are like mental photo copies of the system in different state. In canonical ensemble we take that energy is moving from remainder systems to the system and vice versa. But I am confused that how energy will transfer from one state of a system to other state of that same system? Thank you .
Answer: It is important to avoid mixing between different approaches. In a pure ensemble picture, there is a set of clones (the ensemble) of the system of interest subject to some individual and global constraints.
In the microcanonical ensemble, each member of the ensemble has the same energy, volume, and number of particles.
In the canonical ensemble, only the volume and number of particles of each member are fixed. The energy of each system can vary, although within the global constraint that the sum of individual system energies is constant.
Such a theoretical construction allows using a max-entropy principle to determine the probability distribution function of the ensemble.
The exact physical mechanism allowing the transfer of energy from a system to another is not important, because the ensemble is not a physical object and what really matters is the theoretical mechanism allowing to introduce the concept of probability of individual microstates.
Notice that the ensemble method is different from the older approach based on the idea of a small system in thermal contact with a real heat reservoir. Both methods allow getting the same conclusions, after taking the proper thermodynamic limits. However, the ensemble method is considered conceptually more powerful.
Comment: In canonical ensemble we've system and reservoir in equilibrium at temperature T but we still say that the system can change its energy. Why do we say that? If system changes its energy, it's temperature will also change? Can you please explain?
Answer: It is not actually the same system. The (sub-)system of interest is a part of a much bigger system. In many cases it is convenient to think of it as a collection of "identical" systems, i.e., the systems of similar size, composition, etc. - but they are not actually the same system.
It might be also useful to remind that even for microcanonical ensemble we assume that all the states of the system with the same energy are equally probable - even though an actual trajectory in the phase space may never pass through all the states of the same energy. When this reasoning is taken to the canonical ensemble, we assume that the other similar systems can be found in any of their states with the required energy.
Finally, there is obviously the energy flow between the system and its surroundings, but this energy flow is usually negligeable compared to the energy of the system. Indeed, the energy flow is proportional to the surface of the system, which scales as a square of the system size, whereas the energy of the system scales as its volume, i.e.,a s the cube of its size.
These points are usually covered in good texts on statistical physics, although easily overlooked in the first reading, when one focuses on equations.
Comment: In canonical ensemble we've system and reservoir in equilibrium at temperature T but we still say that the system can change its energy. Why do we say that? If system changes its energy, it's temperature will also change? Can you please explain?

Canonical ensemble heat reservoir


Console Command to Rename Location?

Question: Is there a console command to rename a building or other marked area? I am going to customize a house using console and put it back onto the xbox (change ownership, add objects, ect.), so I can't use mods.
Comment: I have both the pc version and xbox version- I mainly play on Xbox though. Anything done on console will stay when I transfer the save to xbox. However, playing on Xbox leaves any mods out of the question because they change the game itself, not the save file.
Comment: What do you mean you want to put it back on Xbox? The console versions don't have a console nor can they run mods (currently) so I'm a little confused about what you're asking...
Answer: As far as I can tell, no, none of the place names in the game can be modified (except by changing the locale, which is different). The console commands that affect location are:
GetLocationCleared <id>
SetLocationCleared <id> 1
ResetInterior <id>
coc <cellname>
cow <worldspace> <cell x, cell y>
(The latter two stand for Center on Cell/World.)
None of those provide much control over the properties of a location, just toggling some flags or placing the character.

Console Command to Rename Location?


Woocommerce : Using a third party API to get prices of products after user choosing options

Question: I'm a printer shop reseller, and I have a wordpress/woocommerce store with YITH product add-ons. every product has more or less then 7 options to choose from. The customer can choose the product he wants and then choose from the options.
The problem : is that the prices are very "random", not every option has a specific amount of money. For ex : if you choose a paper size A4, the price of printing the both sides is 1$. but if you choose paper size A5, the price is 5$, and if you choose a specific type of paper the price of printing the both sides is 19$ -_-.
So i must use the API of my supplier to get the prices,
Here is the API doc link : https://media.realisaprint.com/documents/rea-api/2.1/api_realisaprint_com_v2_1.pdf
How to do it : I will get all the options and send them via a post request via an URL and show the results (JSON).
But i don't know how to do it technically, can I use hooks and filters in my functions.php ? if yes which hook ?
can any one make any suggestions to explore ?
Thank you very much.
Comment: Welcome to SO. Please have a look at [tour]. You may also want to check [What topics can I ask about](http://stackoverflow.com/help/on-topic), and [ask], and how to create a [mcve]. Post the code you have tried and the errors you have received. Be as specific as possible as it will lead to better answers.
Answer: There are certain pre-built functions and methods in Wordpress and Woocommerce. There are certain functions you can call to use to pull data directly from an order.
I would recommend installing Woocommerce Cost of Goods Plugin - https://docs.woocommerce.com/document/cost-of-goods-sold
Code Example in your theme's functions.php file
This code example pulls an order and uses the pre-built functions of WP and Woocommerce I mentioned earlier to gather data about the order. I created a function called "wbdc_filter_wc_stripe_payment_metadata".
What happens with this code
When a user makes an order, this function loops through the order (foreach loop) and creates dynamic values for each variable, based on what the customer ordered. It is then stored as "$metadata" and sent to Stripe when the payment-intent object is created.
The full setup includes: Stripe, Woocommerce, and Woocommerce Cost of Goods. You can set the cost of goods individually for each product, and when a customer makes an order, you can pass that data along. to wherever you want.
I hope this helps, as your question is pretty broad. If you want more info on Woocommerce function calls, that would be a great place to start:
https://docs.woocommerce.com/document/bundles/bundles-functions-reference/
As far as any good business goes, you NEED to know your numbers. Whether it's paper or cars, you should know exactly what that product cost, and how much money you make (your margins). Knowing these numbers will also help with programming and grabbing the data on any products a customer orders. Best of luck!
<code>function wbdc_filter_wc_stripe_payment_metadata( $metadata, $order, $source ) {

    /**
     * Get order data
     */
    $order_data = $order->get_data();
    $metadata[ __( 'Billing Company', 'woocommerce-gateway-stripe' ) ] = sanitize_text_field( $order_data['billing']['company'] );
    $metadata[ __( 'Customer Name', 'woocommerce-gateway-stripe' ) ] = sanitize_text_field( $order_data['billing']['first_name'] . ' ' . $order_data['billing']['last_name'] );
    $metadata[ __( 'Customer Phone', 'woocommerce-gateway-stripe' ) ] = sanitize_text_field( $order_data['billing']['phone'] );

    /**
     * List products purchased
     */
    $count = 1;
    $total_cost = 0;

    foreach( $order->get_items() as $item_id => $line_item ){
        $item_data = $line_item->get_data();
        $product = $line_item->get_product();
        $product_name = $product->get_name();
        $item_quantity = $line_item->get_quantity();
        $item_total = $line_item->get_total();
        $productID = $product->get_id();
        $quantity   = (float) $line_item['qty'];

        $COGS = get_post_meta( $productID, '_wc_cog_cost', true);
        $COGS = $COGS * $quantity;
        $metadata['Line Item '.$count] = 'Product name: '.$product_name.' | Quantity: '.$item_quantity.' | Item total: '. number_format( $item_total, 2 ). ' COGS:'.$COGS;

        $count += 1;
    }

    return $metadata;
}
add_filter( 'wc_stripe_payment_metadata', 'wbdc_filter_wc_stripe_payment_metadata', 10, 3 );
</code>
Metadata passed to Stripe


webcam problem with skype on linux

Question: I am runing ubuntu 9.10 and the latest version of skype but I have problem with webcam. When I trie the webcam with cheese it works fine but when I try to use the web on skype , skype crashes. can any body help me
Answer: Skype cannot directly interact with video4linux. You need to load an extra library (v4l1compat.so) for the compatibility layer:
# LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

Maybe you need to adjust the library path for your setup.
To make this permanent just add this variable to /usr/bin/skype: add
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so; export LD_PRELOAD

e.g. on the 2nd line there.
Maybe you also want to report this in your distribution's bugtracker.
Comment: Where do you add this line?  /usr/bin/skype is a binary file, no?
Comment: Thank you man, it works. but please tell me can make this permanent change.
Comment: Man, you are the best! Does this solution works for any video conferencing application?
Comment: Where should i add this lines?
Answer: The question is old but the problem still exists.
As honk says, setting LD_PRELOAD to the v4l1compat.so library works.
On my 64-bit ubuntu 12.04, this worked:
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

I have a 32 bit skype, so the library should match that.
I want to launch skype with a panel icon. I put this in the command field:
bash -c "LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype"

This avoids creating a separate script file. Without bash however, it does not work.
Answer: I couldn't add to the /usr/bin/skype file either (it is a binary file).    Anyhow here is my workaround:
1) in my home folder I made a file (using gedit) that contained -
#! /bin/bash

LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

2) then added an application link to my menus -
bash /home/yourusername/skype_with_video.sh

(the Skype icon should be in the /usr/share/icons/ folder for the link)
Not elegant, but it works.

webcam problem with skype on linux


Web service architecture design

Question: I am aiming to create some API or service which's output must be shown on the website and that needs to access the database of the client. But the code should be on my server thus service.
I thought it liked this, when a page request happens the client lets my server know about the request and it's type. Then my server queries the clients database (which is remote from MY server) and gets the data needed to run the algorithm. Then the algorithm is run and the output is returned to the clients server which is then processed again (adding html tags etc) and shown to the user.
Is this a sane architecture? The output to be shown is not the actual value of the page, I mean it's only like an add-on. So asynchronous loading also wouldn't hurt. I believe in a synchronous manner this will heavily slow the page loading times.
How would you accomplish this kind of task if (your code needs to stay private && client database and your server are remotely connected && output of your code affects the page) :))
The last one is meaning it's not just enough that client sends you some data, it is also interested in the output.
PS: I feel that this kind of question isn't very much liked in SO. But I sometimes have this kind of questions and SO is the real deal where you can get the fastest and mostly exceptional answers. If this needs to be closed, can someone point in a comment where we can discuss such questions on web?
Answer: This is a topic of some depth, and so this is probably not the correct place to go into a lot of detail. Basically, you need to understand asynchronous Javascript/ajax calls. This is  usually made quite straight forward through many of the popular Javascript frameworks, and so that is where I recommend you look next.

Web service architecture design


why does the gap between the energy levels of a hydrogen atom keep decreasing as we move further and further away from nucleus?

Question: why is the gap between the first two orbits greater than the gap between second and third orbit?
shouldn't the gap keep decreasing as the radius keeps increasing? Can someone explain this ?
Answer: Whatever the radius, the allowed energy levels are proportional to $1/n^2$.
The first gap is proportional to $1/1^2 - 1/2^2 = 0.75$.
The second gap is proportional to $1/2^2 - 1/3^2 = 1/4 - 1/9 = 5/36 = 0.139$. This is smaller than $0.75$.
The third gap is proportional to $1/9 - 1/36 = 1/12 = 0.083$. It is still smaller.
Answer: So mathematically speaking, if we look at the equation for the energy levels of the hydrogen atom below,
$E=- \frac{ \mu e^4}{8 \epsilon^2_0 h^2 n^2}$
where n is the principal quantum number, $\mu$ is the reduced mass, and the rest are constants, we see that as the principle quantum number increases to infinity, the energy eigenvalues approach zero and the spacing decreases (1).
This arises from the electrostatic forces of attraction between the nucleus and electron. By consulting Coulomb's law,
$F = \frac{k q_1 q_2}{r^2} $
we see that the magnitude of the electrostatic force is proportional to the square of the distance.
Therefore, as the energy level is closer to the nucleus, the spacing between each quantized level, gets greater because of the $r^2$ term.
Answer: The effect is a consequence of the Coulomb law for the interaction of the proton and electron; potential energy $\displaystyle V(r)=-\frac{e^2}{4\pi\epsilon_o}\frac{1}{ r}$ producing (quantised) energy $\displaystyle E(n)=-hcR\frac{1}{n^2}$, where $n=1,2\cdots$. (That the energy does not depend on angular momentum quantum number $l$ is an accidental effect of the Coulomb potential). If another potential, say linear, quadratic etc.  were to be used a different dependence on energy would be obtained.
The lowest energy is $-hcR$, but why is it not zero? The answer is that the uncertainty principle restricts this because as the energy gets lower the electron is confined into a smaller space, i.e. is closer to the proton, this means that the kinetic energy increases and so does the uncertainty in the momentum. So the energy is a compromise between the kinetic and potential energy and this applies to all levels. The existence of atoms would then seem to be a consequence of the uncertainty principle.


How long should diskpart take?

Question: I am using diskpart to extend a drive that is actually a VHD. I've already extended the VHD. It's on Windows 2003 and the C drive doesn't contain the swap file and the available space is contiguous. However didn't see the Note about the Resource Kit diskpart for download is not for Windows 2003. So I did the extend using the Windows 2000 version. Not sure if this is the reason but Diskpart is sitting there now for about 15 minutes or so and it's only gotta extend by 10GB. Should it be taking this long? Am I asking for trouble now that I've used a Windows 2000 version of diskpart on a Windows 2003 machine (VM)?
Comment: How long is a piece of string? Far too many variables involved to be able to answer. I've seen such an operation take anywhere from a few seconds to several hours.
Answer: In my experience a Diskpart extend is generally nearly instantaneous but I have to admit that I have only used it to extend volumes that are Windows data drives on VMware Windows VM's.
Diskpart for Windows 2003 Extend functionality is only for Data Volumes  with the additional clarification that the volume being extended can't contain the system page file and that system\boot volumes may fail. My understanding is that the "may" in this case refers to versions earlier to Windows 2008.
As far as using the Windows 2000 version of Diskpart on a Windows 2003 server I wouldn't do it but in the situation you find yourself then running chkdsk should identify if it has caused real problems. If you were using the Windows 2003 version, and if by "C" drive you mean the System\Boot drive then I would expect it to fail with the following message:

Diskpart failed to extend the volume. Please make sure the volume is valid for extending
Answer: It depends on how fast the disks are. It will zero out all expanded disk space, so how long it takes to write and verify 10GB of data on your computer/server will be the largest factor.
All VHD files are the same format since MS bought Connectix some years ago (somewhere around 2003).
Comment: Do you have any reference for the zeroing behaviour - or actual experience. I'm just curious as it would be useful to know this for certain but I can't find anything from MS that says this is actually how it works and in my experience with VMware VM's this doesn't happen (or doesn't appear to, hence my query)
Comment: I actually misread the original question. Windows does not zero the drive when it's extending a partition. It only writes data structures necessary for NTFS and updates the partition table.
Answer: I'm formatting a 64GB microSD as FAT32 using built-in windows tool diskpart.exe in Windows 10. The partitions in the SD card were messed up and I needed to fix them using this tool.
Took nearly 3 hours.

How long should diskpart take?


What does "Tone" mean?

Question: I hear "Tone", "Tonal scale/range" in the context of photography. What does it actually mean?
Comment: Somewhat related to "key" as used here: [What does it mean for a photograph to be "high key"?](http://photo.stackexchange.com/questions/10232/what-does-it-mean-for-a-photograph-to-be-high-key)
Answer: It can mean one of two things in colour photography:

the overall lightness or darkness of an area of an image, similar in meaning to "luminosity"; or
the colour of all or part of the image, usually in relation to its warmth (bias towards red, orange and yellow) or coolness (bias towards blue and green).

In black and white photography, the luminosity meaning is the same, but the colour aspect refers to the colour of the paper and the developed image, with "warm tone" prints generally tending towards brown or sepia on a natural fibre base and "cold tone" prints tending towards blue or purple on an artificially whitened ground.
When people talk about a "tonal range", they are talking about the difference between the lightest and darkest areas of the picture. It can refer to either the overall contrast of the image or to the local contrast in parts of the image (with the overall contrast moderated by burning and dodging). A "tone scale", on the other hand, usually refers to an external reference image divided into distinctly different regions of lightness or darkness, like Ansel Adams' Zones 0-X.
Answer: Tone- describes the darkness or lightness of a particular area in an image. Shading is often used to emphasize the form and an object's three dimensionality.
Answer: In photography tone is the range of lightest to darkest part of an image. Human eye can distinguish brightness range from details in the lightest areas to darkest with ratio 1:1,000,000. Film or digital image sensor have tonality range of 1:200. It's 5,000 times less sensitive than our eye.
Comment: Do you have references for these numbers?
Comment: And scientific/mathematic definitions, please :)
Comment: the eye is a dynamic system in that the iris can change size, but so is a camera. a photo is a single image from that complex system you should compare eyes to cameras not eyes to photos.

What does "Tone" mean?


Job Position Changed Before Hire

Question: My new job position just changed because another team is missing more members. I haven't even started the job yet. I'm not quite happy with the change. I'm not sure I would have accepted the job if I knew it would be for this new position. But the pay is still the same. Is there anything I can do about this? Should I try to argue against the job change?
Answer:
Is there anything I can do about this?

Yes.

Should I try to argue against the job change?

No. Do not argue. Even if you dislike the company or the people there, leave a good impression, because some day later those people may come back to you as a member of your team / to deal a business with you.
Instead, I would ask the company more information about this new job change. Treat it as an entirely new job advertisement. What would be my responsibility? What is my expected skill set? Is the working hours and benefits (e.g. annual leaves) still the same as the previous one? Who would be my supervisor? What is the type of business that this team engages?
Action plan
If you have already found out the details of the new position (sounds like you have), you can now decide your next action:

If you like it, go along with it
If you think the previously discussed salary does not justify this new position, you can politely request a salary negotiation
If you don't like it, just reply you don't think this new job position is a good match to you, and thank the company for their interest

Note item #3: have you signed a contract? If no, you have no obligations. If yes, job position and title are usually stated in the contract. If the company now asks you to work in another position, they have to give you another contract. Which means, either way, you can exit the situation.
Do not
Do not just shout to the company or accuse them as being dishonest. Maybe a team desperately needs talent, and the company decided that it is OK to use candidates for another position in another team. Or, maybe some very good candidate suddenly appears, and the company has to relocate someone to another team. Either way, if I am the recruitment manager, I would not be offended if a candidate say "No" in this kind of situation.
Comment: Thanks for the help. I thanked them for them the new position. Asked the reason for the change and asked them if I had the option to choose what position I liked. But looks I didn't have a choice, as that team is short-handed. Pretty disappointed. I most likely will accept the decision and make the best of it. I understand the company's position. Does feel a little bit unfair though.

Job Position Changed Before Hire


Someone is a .... user of a something, to say he is using it daily or a lot?

Question: Is it correct to refer to someone who is using something a lot, by 'a big user of ...'. I'm talking here specially about software usage.
Is there an accurate word ?
Answer: Yes, big can be used to describe a user who uses a program a lot.

1.5 - Doing a specified action very often or on a very large scale

A second choice could be frequent which would be a bit more formal.

1.1 - [attributive] (of a person) doing something often; habitual

A third choice could be heavy which, like big, would be a little less formal.

3.2 - Doing something more, or more deeply, than usual.

If the person is an expert in all functions of the program they may also be called a Super User (hence one of the most popular sites on SE being named that).

A user of a computer system with special privileges needed to administer and maintain the system
Comment: 'Frequent' is different from 'heavy'. If I use the system for 1 minute every day, I'm a 'frequent' user, but possibly not a 'heavy' user. (Assuming that most people use it less frequently.) If I use it for a whole day every month I might be a 'heavy' user but not a 'frequent' user.
Comment: A constant user.  A regular user.
Comment: @GEdgar I think 'regular' is very close to the meaning of what I want to express.
Answer: If someone is a 'big' user of something, it means they use it a lot. There isn't a specific frequency, or amount, of use that defines 'big', any more than there is a specific size that qualifies for the physical description 'big'.
Comment: What I'm looking for should be in professional context.
Comment: Everything I wrote in this answer applies in a professional context. If you need to consider an amount that they use the system, then you have to specify that amount.


In which direction does the Milky Way rotate?

Question: We don't have a photo of our Milky Way the whole, all the pictures are artists' interpretations showing a bulge, a central bar, and several spiral arms. The milky way is spinning. I would like to know:
a) Does it spin with the arms trailing or leading?
b) I read if the direction of spin clockwise or counterclockwise depends on whether the Milky Way is observed from above or below. I don't understand how the direction of spin (clockwise & counterclockwise) depends on the point of view of the observer.
Comment: It's not believed that eventually a black hole will consume all the stars in the galaxy, this is just a myth. Black Holes have a very small [sphere of influence](https://en.wikipedia.org/wiki/Sphere_of_influence_(black_hole)) which means they wont be able to interact with 99% of the stars in the galaxy. And as for the spiral arms, I would encourage you to read up on [spiral density waves](https://en.wikipedia.org/wiki/Density_wave_theory#Galactic_spiral_arms) which are believed to be how spiral arms behave.
Comment: Regarding the comment "why it's believed that eventually the black hole at the centre will consume all the stars in that galaxy" -- That is the bad pop sci version of a black hole. It is not generally believed to be the case.
Comment: @uhoh right, thx. this is bizarre, yeah. my 1st experience with this forum is... uhhhuu
Comment: I dont really understand your question about spinning towards or away from the centre, there are forces going in both directions but generally stars follow circular orbits around the galaxies gravitational potential.
And as far as the direction of spin is concerned, its entirely a matter of perspective, depending on which way you view it, there is no right or wrong answer.
Comment: @Mishu米殊 No. It doesn't mean any similar.
Comment: thx. but if that's not "about spinning towards or away from the centre", why it's believed that eventually the black hole at the centre will consume all the stars in that galaxy? (i assumed it's towards the centre.) if there is no direction as towards or away from the centre, why there are spiral arms?
Comment: @Dean if the characteristics of a black hole included that it exercised gravitational force in contrast to it's size but in proportion to it's mass, i.e., the more mass, the greater "pulling force", whilst, the smaller size, the denser the mass thus smaller but stronger "pull", if there is a black hole in the centre of a glalaxy that all the stars and materials will be consumed by the black hole is just a matter of time, although it doesn't interact with 99% of the stars... no? because the black hole is not constant it keeps growing in mass by consuming stars (more mass)...
Comment: For (b) sub-question: the perceived direction of the rotation will indeed be different depending on your vantage point. For instance, have a look at this video: [Startrail & Timelapse 2015 - Northern vs Southern Hemisphere](https://youtu.be/UNiNJC3UHIo). The video is about earth's poles, but as you'd would probably notice, the basic idea is just the same for any object that's rotating.
Comment: @Bhumishu米殊 as David says your approaching this question with a science fiction type interpretation of black holes, in reality they don't interact with that many stars, as I pointed out previously. Also it is not considered a given that black holes continuously keep amassing more mass indefinitely, there is evidence now that over long periods of time black holes loose mass via Hawking Radiation.
Comment: I've done a rewrite. I think the question is, do the arms trail or lead in the rotation.
Comment: @JamesK Thx a millions! I'm not equipped with the technical terminologies that's hard to communicate accurately here.
Comment: @DhruvSaxena Thx. From your answer I now get to realize all those articles were talking about viewing the Milky Way from the earth, I would like to know if, in imagination the observer is the size of Kobe Bryant and the Milky Way the basket ball, how does it spin? Maybe I shall ask in a new question.
Comment: @Dean Ok. What I think is the Black Hole is a mass behaved in the negative way - negative mass, with a negative mass that means the totality of the mass of a system (a galaxy is a system) will get "lost" due to it's effect. Tiny or large has to be measured in proportion, like the earth is large but compared to the sun it's small, also by when considering the infinite nature of time, the proportion will not stand if an effect is taking place.
Comment: @Mishu米殊 Actually, it's not just about earth. In fact, even for basketball, the idea from the star trails video would apply as is. The direction of rotation is relevant to the _observer_ and not the object that itself is spinning. Imagine Kobe Bryant has held a basketball in his left hand and gives it a _clockwise_ flick to spin the ball atop his finger. From his point of view (north pole of the ball, if you will), it would appear that the ball is spinning clockwise. From the point of view of a kid, looking up at Kobe Bryant, the ball would _appear_ to spin counterclockwise. Does that help? :)
Comment: @DhruvSaxena Ok, got it, thx. The thing bugged me is that the galaxy as a system if it rotates it should go in only one direction, although by observation it appeared in reference to the observer but the direction is only uniquely one on its own. I imagine in the universe there are many galaxies, one goes clockwise, the other goes counterclockwise but they will keep their tendency in constant unless some upheavals caused change of balance.
Comment: The majority of the galaxies rotate with trailing arms, but not all.
Comment: `+1` The OP's question is reasonable, and responsiveness in comments is exemplary. I don't see why it was down voted.
Comment: I understand that the direction of objects' spin is relative to your frame of reference. However, one thing is not relative, and that is whether two objects are spinning in the same direction or not. For example in our solar system, the Sun, Earth, Luna, most planets (except Venus and Uranus), and the planets' satellites spin all spin in approximately the same direction. Likewise, the orbits of these bodies is in the same direction. Does our galaxy rotate in approximately the same direction? I understand that the rotational plane of our solar system is tilted about 60 degrees relative to the g
Comment: @John i think there pull/push force exercised from the centre of the galaxy, the majority of stars in a system should spin in same direction due to the central force influence (a centralized force holding the items to form one system). planet like Venus or Uranus is weirdo, must get some accident to cause it behaved in a different way.
Comment: @peterh trailing arms meant the items getting towards the centre of galaxy, that is the galaxy will increase in mass but decrease in size; leading is opposite. not sure this has any explanation or just my hypothetical imagination
Answer: The Milky Way has arms that form due to density waves. Like the majority of spiral galaxies, the arms are trailing. Individual stars orbit in circles (roughly), neither towards or away from the centre.
If you consider a common map of the Milky way (imagined from a point North of the Earth, Celestial North is not the same as Ecliptic North, which are both about 60 degrees off from Galactic North)

The stars in the galaxy would be moving in a clockwise fashion.
If you were to view from the other side, it would be as if you had made a mirror image of the galaxy, so the motion would be counterclockwise. If you look at the back of a clock, then from the wrong side, the hand would move counterclockwise. However the rotation of the galaxy is still with its arms trailing.
There are some galaxies that rotate with arms leading: NGC 4622 is one example.
Comment: Good answer but I think if your going to use North as a reference point, you should point out that Celestial North is not the same as Ecliptic North, which are both about 60 degrees off from Galactic North. Maybe a diagram like this would help https://www.physicsforums.com/attachments/there-planes-angles_no-earth-09oct2016-jpg.107279/
Comment: Thank you so much! This answers all my puzzles. The question on clockwise/counterclockwise is that when I read those articles they seemed suggesting the galaxy could rotate in both directions. The galaxy rotates only in one direction as a system on it's own, constantly; only the observer got the opposing impression due to the reference point of observing, correct?


Telnet into XP machine

Question: Is it possible for XP to be setup to allow a Linux computer to telnet into it?
Comment: Recommend you use SSH not Telnet as the later is considered insecure.  They are identical in function for your pruposes.
Answer: Yes, it is. I believe it's possible with Cygwin, which I have no experience with and cannot guide you any further than the name. Beyond that, you can install the Subsystem for Unix Applications (SUA) onto your Windows machine, which is something I have had experience with. I've been told that Cygwin is a much lighter solution, and I'm very willing to believe that because SUA is very heavy-handed. If you get the full developer package, you're basically installing all the default directories that comply to the POSIX standard and all the things you'd find in there. There'd be a folder on your hard drive that looks like the base folder of a Unix installation.
I personally ran it for some time, before I realised that in my case, it was easier to build a FreeBSD box and do what I needed to in an actual *nix environment. Because I don't know what you're planning on using this for, you'll have to choose between Cygwin and SUA yourself :)
EDIT: For some reason, I read your question as "ssh" and not "telnet." Windows XP comes with a Telnet Client, and while Vista and 7 both come with the ability to activate both telnet clients and servers, I'm not too sure about XP.
However, it seems there are a few Telnet/SSH server applications out there for Windows. Again, Cygwin and SUA would do it, but there's a boatload of others out there that would probably do what you want, like KpyM and BFTelnet. You might even find that enabling the Telnet port, 23, in your Windows firewall allows one to telnet to the computer. I'm just not certain. If it doesn't, all in all, I'd probably say go with Cygwin. If security isn't an issue, then you probably don't need anything as heavy handed as SUA.
EDIT 2: I don't have the ability to add comments yet, otherwise I would add it to jweede's answer. http://ras52-tech.blogspot.com/2007/01/telnet-on-cygwin.html is a nice introduction to getting telnet working on Cygwin, if you absolutely need telnet and can't use SSH.
Answer: Cygwin is great for SSH access. Can't say I've tried using telnet with it though. Try these two guides for setting it up.
http://chinese-watercolor.com/LRP/printsrv/cygwin-sshd.html
http://www.noah.org/ssh/cygwin-sshd.html
Answer: If you are using XP Professional, a telnet server is included and all you need to do is start the service (manage services by running the command services.msc or go through the Start menu to find it) and punch a hole in the firewall (port 23). Obviously, if untrusted people can get at the port, you are running a rather large risk.
For XP Home, you will have to get hold of a server. The first one that Google foound for me is both a telnet and ssh server.
Comment: Start services.msc, enable telnet, then open port 23 on the firewall. It's that simple.

Telnet into XP machine


Version control for binary files?

Question: Is there a good version control system for binary files? I would like to be able to use VC with things like photos and Word documents. I know some existing systems such as Subversion and Git support binary files, but I've read that they have lots of quirks and performance problems, so I'd rather use something specifically made for this purpose. My only concrete requirement is that it must not make a copy of the file for every revision; the files in question are fairly big, so I can't afford that.
Comment: On SO is question about that - http://stackoverflow.com/questions/104453/version-control-for-binaries
Comment: Non version control solutions: You could try using Dropbox (http://dropbox.com) as it keeps past revisions of files you store with it. The Picasa (http://picasa.com) photo library manager keeps a history of changes made within the program without creating duplices, though you must export the images to share the changes.
Comment: I edited the question to make it broader (all binary files instead of just graphics-related) because I realized I need it for things like Word documents as well.
Comment: @donut Dropbox keeps only few recent versions (or it's limited by date? don't know at the moment), so not all versions are kept
Comment: The Stack Overflow question linked in @MicTech 's comment has been deleted
Answer: Maybe there were performance problems in older versions, but subversion is great when it comes to binary files. I believe it only stores deltas, so you should be fine with the size restriction. Keep in mind that it also depends on the formats used. If it is compressed, making a modification may have an effect on more of the file, creating a larger diff. Binary diffs aren't as optimal as text-based diffs however, but still very usable.
Subversion even claims that their diffing algorithm works equally well on text and binary files:

Note that whether or not a file is
  binary does not affect the amount of
  repository space used to store changes
  to that file, nor does it affect the
  amount of traffic between client and
  server. For storage and transmission
  purposes, Subversion uses a diffing
  method that works equally well on
  binary and text files
Comment: Sorry for replying so late, I totally forgot I left this unanswered... Yes! It looks like it works fine. Performance isn't great but it's good enough.
Comment: Hmm, interesting. I read that is has trouble with large files. Maybe I should try it and see for myself.
Comment: Added a bit more detail. Let me know how it goes!
Answer: You should take a look at Boar, it is a version control system made specifically for large binary files.
Comment: Be aware that Boar is in Beta at time of writing.
Comment: Looks interesting, thanks for posting! I'll take a look.
Answer: Not sure if it fits the price range, but there are specialized asset management systems for Graphics. I think Adobe has one (Version Cue), but there is also Alienbrain.
Comment: I have tried Version Cue, but it requires you to set up an entire server and seems really complicated for what I need. Maybe I'm wrong though. I'll check out Alienbrain too. Thanks.

Version control for binary files?


Why is $PATH used as a variable?

Question: Couldn't there be a config text file instead?
Answer: The PATH variable is used in lots of operations, reading it from a file would have a huge cost. And because every process has its own environmental variables it would mean one file for every process. It is easy to see why it is not stored on the drive.
Answer: PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files. Environmental variables are a class of variables that tell the shell how to behave as the user works at the command line or with shell scripts.
In this way, PATH variable can be changed relatively easily and you can make a lot of operations easily with it. But, if you use instead a config text file for PATH, I think that all these easily things will become a headache.
Anyway, you can set PATH as you wish in a config/initialization file like <code>~/.profile</code>.
Answer: I for instance have my own directory of scripts, under my home $HOME/.scripts where I can put some executables. Since I also added this directory to the $PATH variable, I can call any of my scripts just by the filename, without using the whole route the  scripts are stored.

Why is $PATH used as a variable?


How do flavors like vanilla and hazelnut get into coffee

Question: I was at a local coffee shop today and I noticed for the first time ever that they served vanilla coffee. This surprised me, as I had not yet ever seen coffee with vanilla flavoring, and got me thinking about how that comes to be. Could anybody help me with this?
Answer: In a coffee shop (assuming both places like Starbucks or non-chain versions), flavour syrups are a staple. Some have their own range, others use generic manufacturer's that are also used in other cooking or bartending applications.
I'd assume a dash or two of these are added to your coffee and voilá: Vanilla (hazelnut/caramel/...) coffee.
Another option are flavoured coffee beans, but for a coffee shop, that's pretty unlikely, as they would have to keep various beans at hand and switch between orders.
Comment: For coffee shops that are also roasters, I know of one instance where they sell flavored beans (there is probably many, but this one I've seen). They have a separate grinder for the flavored coffee for folks who buy it pre-ground.
Answer: There are two ways that this is commonly achieved.

Flavoring syrups. These are what you most commonly see at coffee shops. Mostly they are used in flavored lattes and mochas. Some local shops might make their own, but they are commonly purchased from a larger company. They also sweeten the coffee.
Flavored beans. This is what you commonly see at gas stations, truck stops and the store. A flavoring is added to the beans themselves. This usually causes the beans to have an oily look to them. The oils will stay in the grinder for some time after grinding, so a coffee shop is unlikely to use this option.
Comment: "gas stations, truck stops and the store"... Couldn't have said it better myself.  Typically flavored beans are flavored because their own flavor doesn't stand up to scrutiny.  Another side note I haven't seen mentioned is that the flavoring sprayed on the beans also releases diacetyl in the immediate work space which can cause permanent lung damage.
Answer: Here first you would buy your Vanilla beans. It is best to buy 3 or 4 different ones from different farms. As they are smoke dried. Each has a little different flavor. Different wood used to smoke the bean. You place the bean in tall jars. Break off the amount you wish. Place in pot. Make your coffee. Much in America is artificial vanilla flavor. A drop or 2 is added to the coffee. What that is is will can't say here.
Comment: Where is "here"?


How to implement a garbage collector?

Question: Could anyone point me to a good source on how to implement garbage collection? I am making a lisp-like interpreted language. It currently uses reference counting, but of course that fails at freeing circularly dependent objects.
I've been reading of mark and sweep, tricolor marking, moving and nonmoving, incremental and stop-the-world, but... I don't know what the best way to keep the objects neatly separated into sets while keeping per-object memory overhead at a minimum, or how to do things incrementally.
I've read some languages with reference counting use circular reference detection, which I could use. I am aware I could use freely available collectors like Boehm, but I would like to learn how to do it myself.
I would appreciate any online material with some sort of tutorial or help for people with no experience on the topic like myself.
Comment: You shouldn't start with anything more complex than a nigh-braindead stop-the-world mark and sweep collector. Forget about sets, incremental collections and all that stuff for now. Getting the roots, getting a list of all live objects, etc. will be enough of a challenge for your first try.
Comment: I don't agree that this is a duplicate. That one is about theory, this one is about implementation and tutorials.
Comment: https://secure.wikimedia.org/wikipedia/en/wiki/Garbage_collection_%28computer_science%29
Comment: And specifically, the "implementation strategies" section: https://secure.wikimedia.org/wikipedia/en/wiki/Garbage_collection_%28computer_science%29#Implementation_strategies
Comment: possible duplicate of [Learning garbage collection theory](http://stackoverflow.com/questions/1318631/learning-garbage-collection-theory)
Comment: You do want to learn how to do garbage collection, right? Because otherwise you can just use [Boehm-Demers-Weiser excellent conservative garbage collector](http://www.hpl.hp.com/personal/Hans_Boehm/gc/) at least until the language is well established and has some real applications to show it's worth, because until then there are more pressing matters than the tiny bit of performance you can squeeze out with a good gc.
Answer:
Could anyone point me to a good source on how to implement garbage collection?

There's a lot of advanced material about garbage collection out there. The Garbage Collection Handbook is great. But I found there was precious little basic introductory information so I wrote some articles about it. Prototyping a mark-sweep garbage collector describes a minimal mark-sweep GC written in F#. The Very Concurrent Garbage Collector describes a more advanced concurrent collector. HLVM is a virtual machine I wrote that includes a stop-the-world collector that handles threading.
The simplest way to implement a garbage collector is:

Make sure you can collate the global roots. These are the local and global variables that contain references into the heap. For local variables, push them on to a shadow stack for the duration of their scope.
Make sure you can traverse the heap, e.g. every value in the heap is an object that implements a Visit method that returns all of the references from that object.
Keep the set of all allocated values.
Allocate by calling malloc and inserting the pointer into the set of all allocated values.
When the total size of all allocated values exceeds a quota, kick off the mark and then sweep phases. This recursively traverses the heap accumulating the set of all reachable values.
The set difference of the allocated values minus the reachable values is the set of unreachable values. Iterate over them calling free and removing them from the set of allocated values.
Set the quota to twice the total size of all allocated values.
Comment: Hi Jon, i would like to read through your Prototyping a mark-sweep garbage collector article but it asks for subscription. Is that the only way to read it
Answer: Check out the following page.  It has many links.  http://lua-users.org/wiki/GarbageCollection
Answer: As suggested by delnan, I started with a very naïve stop-the-world tri-color mark and sweep algorithm.  I managed to keep the objects in the sets by making them linked-list nodes, but it does add a lot of data to each object (the virtual pointer, two pointers to nodes, one enum to hold the color). It works perfectly, no memory lost on valgrind :) From here I might try to add a free list for recycling, or some sort of thing that detects when it is convenient to stop the world, or an incremental approach, or a special allocator to avoid fragmentation, or something else. If you can point me where to find info or advice (I don't know whether you can comment on an answered question) on how to do these things or what to do, I'd be very thankful. I'll be checking Lua's GC in the meantime.
Answer: I have implemented a Cheney-style copying garbage collector in C in about 400 SLOC.  I did it for a statically-typed language and, to my surprise, the harder part was actually communicating the information which things are pointers and which things aren't.  In a dynamically typed language this is probably easier since you must already use some form of tagging scheme.
There also is a new version of the standard book on garbage collection coming out:  "The Garbage Collection Handbook: The Art of Automatic Memory Management" by Jones, Hosking, Moss.  (The Amazon UK site says 19 Aug 2011.)
Answer: One thing I haven't yet seen mentioned is the use of memory handles.  One may avoid the need to double-up on memory (as would be needed with the Cheney-style copying algorithm) if each object reference is a pointer to a structure which contains the real address of the object in question.  Using handles for memory objects will make certain routines a little slower (one must reread the memory address of an object any time something might have happened that would move it) but for single-threaded systems where garbage collection will only happen at predictable times, this isn't too much of a problem and doesn't require special compiler support (multi-threaded GC systems will are likely to require compiler-generated metadata whether they use handles or direct pointers).
If one uses handles, and uses one linked list for live handles (the same storage can be used to hold a linked list for dead handles needing reallocation), one can, after marking the master record for each handle, proceed through the list of handles, in allocation order, and copy the block referred to by that handle to the beginning of the heap.  Because handles will be copied in order, there will be no need to use a second heap area.  Further, generations may be supported by keeping track of some top-of-heap pointers.  When compactifying memory, start by just compactifying items added since the last GC.  If that doesn't free up enough space, compactify items added since the last level 1 GC.  If that doesn't free up enough space, compactify everything.  The marking phase would probably have to act upon objects of all generations, but the expensive compactifying stage would not.
Actually, using a handle-based approach, if one is marking things of all generations, one could if desired compute on each GC pass the amount of space that could be freed in each generation.  If half the objects in Gen2 are dead, it may be worthwhile to do a Gen2 collection so as to reduce the frequency of Gen1 collections.
Comment: Yes, the IBM APL interpreter uses handles, to pretty good effect.
Answer: Garbage collection implementation in Lisp
Building LISP | http://www.lwh.jp/lisp/
Arcadia | https://github.com/kimtg/arcadia
Comment: Wow! I think I'm going to throw out all the disorganized crap I've written trying to implement my own LISP-like language and start with that Building LISP tutorial you linked to. The main thing I like about is it's actually written in C - most tutorials on making LISP-like languages are written in LISP-like languages - nice for academia but pointless in reality.
Comment: A similar recommendation from [Build Your Own Lisp](http://www.buildyourownlisp.com/contents) is the article [Baby's First Garbage Collector](http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/)
Answer: Read Memory Management: Algorithms and Implementations in C/C++. It's a good place to start.
Answer: I'm doing similar work for my postscript interpreter. more info via my question. I agree with Delnan's comment that a simple mark-sweep algorithm is a good place to start. You'll need functions to set-mark, check-mark, clear-mark, and iterators for all your containers. One easy optimization is to clear-mark whenever allocating a new object, and clear-mark during the sweep; otherwise you'll need an entire pass to clear marks before you start setting them.

How to implement a garbage collector?


Use of "Drop me a line"

Question: One person with whom I've emailed before said to "drop me [them] a line". I always thought the intention of this phrase is to call the person, specifically by phone (via telephone line). It seems this person means to email them. I do think it's possible they mean to call them. Is it a widely accepted use of this phrase to mean "contact me" in general? Is this usage common among certain groups of people? Am I wrong in associating this with phones in particular?
Comment: Originally *a line* meant a line of written text that you'd *drop* in a mailbox.  It very well could be used more generally today to mean contact me, but email seems a more likely medium than telephone- IF they wanted you to call, they'd have said, "Call me sometime."
Comment: "Is it a widely accepted use of this phrase to mean 'contact me' in general?"  Yes.
Answer: In the U.S., I think I'm safe in stating that, in the vast majority of cases, 'drop me a line' implies written communication, and never implies calling via telephone or any other means. Before the Internet was invented, 'drop me a line' always meant 'write me a note/postcard/letter'. Nowadays, the phrase could also imply emailing.
I can't speak for British English, or for speakers from other parts of the world.
Edit:
I also just discovered that this is a duplicate:
'Drop us a line' - letter or phone call?

Use of "Drop me a line"


Baby dragon doesn't eat many roaches

Question: My baby (2-3 months) bearded dragon only eats about 6-9 dubia roaches a day. I add dehydrated meal worms to "her" (still not totally sure yet) salad every day. Is this normal behaviour?
Answer: How much does she weigh?
Can you tell me about your setup (temps, humidity, substrate etc.)
How much weight is she gaining every week?
Is she eating her veggies?
If the dubia roaches are large they could just be filling her up much faster than small crickets.
Comment: I just started to weigh her this week, due to my concerns, so I don't have enough data yet on this front. Set up: Basking temps-D105, N95; Cool end temps-D85, N75; Humidity is 40 to 50%; UV lamp- ExoTerra Repti-glo 10.0; Substrate: vinyl tile; Bath: W, Sn; Food dusted M,W,F,Sn with Cal+D3 and Multivitamins; Dusted T, Th, St with just Cal(no D3); Veg this week: bok choy, endive, kale, and carrots. Fruit offered Sn. Up until today I had been offering the roaches 3x a day, 5-6 per offering and she has been eating 2 each time. Plans to offer 4 crickets tonight as well to see if it is pref.
Comment: Temps are good, I would however switch your UVB light. Sunglo emit very little UVB, I highly recommend going for a mercury vapor bulb. These lights blast out UV lighting which, for beardies, is fantastic.
Another good lighting source are the tube lights as well, coil bulbs in general should be avoided.

For powders you will not need to add the D3 once you switch on over to a MVB, large amounts of oral D3 can be toxic. Once that is switched over stick to calcium every other day and multivitamin once a week.
Comment: ~continuation~

If the dubia roaches are large they could just be filling her up much faster than small crickets.

How often is she having a bowel movement?

As a side note, I've tried tile before and the amount of sludge that accumulated under there was awful. Keep a note to check under the tiles during the cleanings :)
Comment: In switching to an MVB, do I just ditch the standard basking light? And will this give sufficient light for the entire tank? Also, you might be right about the roaches being bigger... this morning I put both roaches and crickets in her feeding bin and she went for the roaches first.
Comment: Not necessarily, in the winter time I need to use my MVB plus a basking bulb to keep good temperatures. In the summer I use my MVB basking bulb and the temps stay in the 95F +. Feel free to post a picture of your setup.

Baby dragon doesn't eat many roaches


Best way to create an array of objects in Illustrator?

Question: I often find myself needing to create an array of objects, either in a straight line, rotated around a centre point, or angled along a path. At the moment I'm using all sorts of different and no-doubt stupid ways to do it, usually one at a time with a little head-math and the transform palette- And I know it's the dumb way to do it. Can anybody point me to the correct way, or to a plugin if it's not possible in Illustrator?
Comment: I think it's ok - it's a question about "computer software" as per the faq, not much different than asking about excel tricks or video editing.
Comment: grrrr.  one of these days i'll learn to read the question before voting to close.  no, don't send this to stackoverflow....
Comment: ain't this a question for StackOverFlow?
Comment: Hrm... I don't think this questions really fits into the scope of SuperUser, as it is more of an arty, photoshoppy kind of question.
Answer: Go to Effects -> Distort/Trasnform -> Transform... Add amount of copies you want then play with the array controls
Comment: This won't do mapping along a curve by the look of it, but it's pretty useful, cheers :)
Answer: There are a few ways to achieve this...

The quickest method is to translate, scale, or rotate an object while duplicating it. To duplicate an object in Windows, hold down the 'alt' key*.  The transformation and duplication can then be repeated by pressing CTRL + D.
For greater precision, select a transformation tool from the toolbox and press enter.  A dialogue should then appear, allowing you to enter numerical values, and has a 'copy' button.  Again, once the dialogue has closed, you can press CTRL + D to repeat.
The Blend tool can 'step' objects, which also has an option for rotating objects to match a path.
The 'Actions' palette can record and playback multiple transformations.
Illustrator supports a number of languages for scripting, and this offers the most flexible solution but is generally more time consuming to learn and set up.

*Mac key combinations may differ slightly.
Comment: I suspect you're right. It's possible to set the point of rotation visually by holding down the ALT key, then clicking. The rotation dialogue will then appear, enabling you to specify the rotation angle.
Comment: Transform works for simple cases, but you can't rotate around a custom point using any of the transform dialogs (as far as I know) and it's no use at all when you want the new objects to follow a path. I'll look into the Blend tool though, cheers.
Answer: You can also use scripting. For example, this is how you can create 20 path items with random rotation and position from center.
<code>// creating a document
var doc = app.documents.add();
// adding a new layer
var layer = doc.layers.add();

// variable declarations
var i, ray, displacement, dx, dy;

// creating 20 path items in a loop and setting their parameters
for (i = 0; i < 20; i++) {
    // adding a path item and saving it to the "ray" variable
    ray = layer.pathItems.add();
    // defining path points
    ray.setEntirePath([ [0, 0], [0, 10]]);

    // generating a random angle for rotation
    // note: rotation in Illustrator is counter-clockwise
    ray.rotation = Math.round(Math.random() * 360);
    // applying rotation to the path, using its bottom as the origin point
    ray.rotate(ray.rotation, true, true, true, true, Transformation.BOTTOM);

    // moving the path away from the center of the document by "displacement" amount
    displacement = 10 + Math.random() * 10;
    // calculating x and y coordinates from "displacement"
    // (which is basically a hypotenuse)
    dx =   displacement * Math.sin( (180 + ray.rotation) * Math.PI / 180 );
    dy = - displacement * Math.cos( (180 + ray.rotation) * Math.PI / 180 );
    // translating the path
    ray.translate(dx, dy);
}
</code>
You can then save this as "somefile.js" and execute by File->Scripts->Other script...
Or paste it into the ExtendScript toolkit and run it from there.
Comment: Never thought of that, cheers.
Answer: I find using a technical vector based programs to be the best.
I have Illustrator and AutoCAD open at the same time and can copy clip vector lines into Illustrator. If you know how to use both, you can fly through geometric design work.
Answer: Easiest way I found:

With the select tool (black arrow icon or V in keyboard), select the thing you want to array.
Click the rotate tool (rotating arrow icon or R in keyboard), hold Alt and select the center of rotation.
Pop up box will appear. Enter the angle of rotation (example: if you want three of the things to array in a circle, then divide 360 by three). Click Copy.
You will notice that only one of the things appeared. Click Ctrl+D to duplicate the thing with the number of copies you want.

Hope this helped!


In The Walking Dead, what did Dr. Jenner tell Rick?

Question: In the episode "TS-19", Dr. Jenner whispers something into Rick's ear before they leave the CDC which leaves Rick visibly shaken.
What exactly does he tell him?
Answer: It is revealed in Season 2, Episode #13 "Beside the Dying Fire". Jenner tells Rick that

 No matter how you die, you always come back as a walker - in other words, everyone is already infected. This comes after other survivors ask how Randall turned without being bitten and after we see Shane come back without being bitten. However he did have a scratch on his stomach.
Comment: Its revealed at minute 32 of S02E13: https://www.youtube.com/watch?v=221utkUgeJc
Comment: That's not true otherwise Rick would have mentioned that to Shane in the episode where they found the two guards with no bite marks on them. Its not explained that you turn even if not bitten until season three.
Answer: He basically tells Rick that the infection is air born therefore everyone is infected. Which enhances the meaning of the shows title, since they're all infected that means when they die they'll turn, which also means they are technically the walking dead.
Comment: What are you basing this on? The original scene has Jenner whispering inaudibly (to the viewer). Rick only says that Jenner told him that they were all already infected - never saying *anything* about how the infection was spread.
Answer: I think he told him that its a virus that's in the air and everyone is infected and one of the members of his group has a rare blood type that could be used as a cure.
Comment: This directly contradicts what Rick says to the group in Season 2, and Jenner does not exist in the comics (yet).This supposed rare blood type would have prevented Shane changing into a walker without being bit.  So, what are you basing this on?
Comment: Could you site a reference to this?


Issues with intersecting faces and how to unwrap a maze created from svg file

Question: I'm pretty new to this field.I have used a svg file from maze generator to create a maze. On extruding (and applying solidify modifier), I found that several faces are overlapping and intersecting with each other, which is messing up with the textures. Is there a way to fix this? Can the 2 intersecting objects be merged as 1? and how to unwrap the image?
Comment: Related: https://blender.stackexchange.com/questions/60660/cut-intersect-edges
Answer: The problem you are facing is, that the svg from maze generator is not well suited to be imported in blender. Here the problem is, that the maze is made out of lines and not of shapes. Basically you want to convert the outline of the lines into a shape. This means you have to "clean" it before you can use it.
I tried it with Inkscape (Download-page), which is free to use. But basically you can use any advanced vector-image-editor to do this, I guess.
Using Inkscape, these are the steps which lead me success:

go to Path>Object to Path (or press Shift+Ctrl+C). This will put every line into it's own object.
First select a line in the objects viewer and then press Ctrl+A to select everything else, since it does not seem to select all the lines if not one is selected in the first place. Then go to Path>Stroke to Path (or press Ctrl+Alt+C). This will convert the stroke, drawn by each line into a shape.

With everything selected go to Path>Union (or press Ctrl++). This will combine all created shapes into one.
Now you can save the svg and import it into blender
In Blender you can set the thickness of the walls by changing the "offset"-value in the curve-properties

Then select the curve and press Alt+C to convert it into a mesh
Go into Edit-Mode, select all, press delete and select "Dissolve faces". This will delete all the unneeded triangle-shaped faces.

To delete all unused point keep selected all, press delete and select "Limited Dissolve"

If you have some ugly connections between points, just select all, press Delete and select "Only Faces", then select everything again and press F to fill the faces again.

Now you can extrude your mesh and have a clean maze

I hope I could help!
Comment: Thank you so much this solved the above problem. I used a 10x10 maze and i noticed that when we imported the svg it came as two curves and even after completing the steps the maze has two faces on top. is this how it should be?
Comment: Yes, (if I understood you correctly), since there are two separated meshes. You can see it if you select one point and then press Ctrl+L to select all connected points.
Comment: Hey the method works amazing when I follow it step by step. I have a few doubts though

1) Since I require a closed maze I added two paths just to close the maze . if i add this step then when I import into blender and convert to mesh. I notice that the dissolve faces doesnt work. If i do a limited dissolve a single face gets divided into 2 triads . I believe the issue rises cause of the extra paths i added just to close the maze. If I delete that extra edge a large part of my maze lose their faces and I have to recreate all the faces by adding vertices and edges at different bends.
Comment: 2) this is just my inexperience but when it comes to UV unwrapping the maze is it alright if the  faces dont come as perfect rectangles. assuming I want to add image texture to the maze walls . what would be the correct way to proceed.


how do I transfer from watch only wallet to my other wallets

Question: I have a watch only wallet with BTC in there how do I transfer to another wallet. I don't seem to have a key is that possible? I can find it on blockchain but can't seem to do any transfers.
Answer: That's what "watch-only" means. You are only watching the balance and can't spend it. You've likely added only the address to the wallet—which anybody else could have done as well since the address is public information.
If the address is your own, check the wallet that you created the address with. That's the one that can spend it. To spend the coins, you have to have the private key.
If you actually don't have the private key, you don't have the ability to spend the coins. If nobody else has it either, the coins are lost.


Are PCIe switches "real" switches?

Question: I'm reading PCIe specification, which mentions that the communication between the root/end points are through switches instead of buses as for PCI, and this structure improves throughput as the traffic doesn't have to share media with others. However, many pictures of th structure of PCIe switches show that the ports (upstream/downstream) are internally connected using buses. So, is this structure still a switch?
Comment: You turn the PCIe serial transmissions into parallel busses to lower the internal frequency and allow multiplexing several flows. For example, a 4x 5GHz PCIe link will occupy half the bandwidth of an internal 625MHz 64bits bus.
Comment: So they are actually buses, but as fast as, or even faster than line speed switches, right?
Answer: All PCIe connections are point-to-point.
A PCIe switch has more than two ports, so its internal connections could be described as a bus.
However, this is not necessarily how it's actually implemented.
When the switch receives, for example, a packet on its upstream port, it puts it into a buffer, and uses the destination in the packet header to determine on which downstream port to re-transmit the packet.
This implies that all ports can be somehow connected to the same buffer, but not that there is an actual bus on which the packet is transmitted and to which all output ports listen.
Comment: In nvme, the host(CPU) creates queues. So, when host writes to a submission queue(present in the host), will PCIe be responsible for taking that data and forwarding it to the queue of the nvme device?
Comment: @AkshayImmanuelD NVMe is just a protocol running on top of PCIe.
Comment: @AkshayImmanuelD No.  The NVMe device is responsible for reading the data via DMA by issuing PCIe read requests.  NVMe is just a specification for how the device operates over PCIe so NVMe devices from different manufacturers can all share the same NVMe device driver; I wouldn't even call it a "protocol."

Are PCIe switches "real" switches?


Is it permissible to connect water softener drain(s) to tub/shower unit overflow drain? How?

Question: My A.O. Smith water softener system (6-month sediment pre-filter, 6-year whole-house filter tank, 6-year descaler tank, and 6-month sediment post-filter) seems not up to the job of softening the local water. I got this system to avoid running electrical and putting a drain in the corner of the downstairs bath where water supply enters the house.
The system did not make it six months - much less six years (it seems seriously over-hyped). Since I now need to do what I should have done the first time (salt system with electric and drain), I am looking for easiest way to drain it (I have figured the electric out). The installation area (same place salt-less system is, where the water enters house) is in an alcove in that bathroom. The bathroom inexplicably (to me) does not have a floor drain.
If looking at the foundation wall (basement is fully complete as far as drywall, etc.) from entrance point into bathroom, tub/shower unit is on viewers left side of foundation wall with plumbing (drain, handles, etc.) on right ride of unit. Plumbing is inside a stub wall. The "U" shaped alcove with the water current softener in it is just the other side of the stub wall. Stub wall is about 30 inches deep and 30 inches wide - right side is the bathroom wall. To help hide the system, the alcove seems sized to be a good place for a door?
The house - built in 2014 - did not have a water shutoff at the entry point (in that bathroom) for some reason (am told it should have). It does have a shut-off now (installed as part of installing the saltless water softener system six months ago). The utility room that is 30 feet and several rooms away has a drain - but is not the water entry point.
Anyway, it seems to me (but am guessing it may be more complicated than I believe) that the closest drain (literally inches away from where the saltwater softener will be installed) is inside that stub wall for the tub/shower unit.
So, can I connect the (two) water softener drains to the of the tub/shower unit overflow drain inside the stub wall, and if so, how difficult would it be?
Comment: Your two questions (can I and how difficult) are both quite subjective. (Sure, and who knows?) You should revise to ask something more specific about the project. Also, it's very likely to be a code violation. Tub overflows are not designed, vented, or sized for additional loads, and you'll probably see blowback in your tub, along with noise.
Answer: Why does it needs to be a permanent installation.
When draining the filers use a hose to the tub/shower drain.
Do not use/block the overflow, since it has an emergency function preventing the tub/shower overflow.
Permanent installation might have problem with code, while using hose does not.