What literal thing is determining the price of Cryptos / stocks?

Question: Yes, supply and demand I know. But what literal thing is determining the price. When I see the price changing every second on Coinbase or Robinhood, what is controlling that. Is it an algorithm? What information does that algorithm take in? Is it just one algorithm determining this price, or are there different algorithms and it's just an estimation? I have never found an answer to these questions.
What I want to know is what physical place is an app like Coinbase getting this changing price from.
Comment: Does one of these three perhaps answer your question?
[Is there some way to estimate the proper value of one Bitcoin?](https://bitcoin.stackexchange.com/q/101842/5406), [How is the exchange rate for Bitcoin established?](https://bitcoin.stackexchange.com/q/2566/5406), [Where do bitcoins come from and what gives them their value?](https://bitcoin.stackexchange.com/q/182/5406)
Answer: The "current Bitcoin price" from an exchange like Coinbase is simply the last price at which a buyer and seller agreed to trade Bitcoin at that exchange, also known as the "last price". Every time a new trade takes place on that exchange, the price is updated.
The current price from sites that aren't exchanges themselves, like Robinhood or Preev, are generally taken as the averages of the prices of all of the exchanges they connect to. Sometimes these averages are weighted, so that the price from exchanges with higher trade volume is weighted more heavily than the price from a very small exchange.


Problem on Class Specific Shifting distribution

Question: Consider a classification problem where we have 2D data and there are 3 classes. We train a model on the data, and obtain a parameter w. Now, lets consider a target scenario, where we know that the data distributions have shifted. I know that the shifting is such that the class means (i.e. mean of all data in each class) have shifted in different directions in the feature space from mu_i to mu_i' for i=1,2,3. How can I leverage this information to adapt my input, parameter or ouput(which is probabilistic classification) for the target scenario? Is there pertaining literature on such class specific shifting ?
Answer: Considering the shift in the class means, it means that there is a shift in the distribution of the features. We have no information if there is a shift in the distribution of the labels (classes). Since you know the new class-means, then for any new unlabeled instances you could perform a semi-supervised clustering method using for example k-means and getting as initial centroids the new class-means.
About the parameter w that you have obtained from training a model using the old data, probably you could modify it in a way that you are taking into account the shift. For being more precise, we need to know how you have obtained this parameter, which means what kind of learning algorithm you have used.


Reason of use of Product rule of Probability in Predicting Error

Question: P(x,y) = P(y|x)P(x)
Why do we use this in estimating expected prediction error?
i.e. E{(y - f(x))^2}
I researched and I came to know that it helps in figuring out noise but How?
Answer: The general idea is that there is a true joint probability $p(x,y)$ which can be factorized like
$$p(x,y) = p(y|x)p(x)$$
$p(x)$ basically measures the probability of observing the input $x$, while $p(y|x)$ represents the true relationship between $x$ and $y$.
We would like to learn a model distribution $p_\theta(x, y)$ which is factorized accordingly
$$p_\theta(x,y) = p_\theta(y|x)p(x)$$
$p(x)$ can be considered the same in both cases, so what we are trying to find is $p_\theta(y|x)$ as an approximation to $p(y|x)$ by optimizing the model parameters $\theta$.
In the case of regression, we make the assumption that there is a function $f_\theta(x)$ and the observed $y$ is distributed normally around $f_\theta(x)$ with noise variance $\sigma^2$, i.e.
$$p_\theta(y|x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left[-\frac{(y-f_\theta(x))^2}{2\sigma^2} \right]$$
Since $p_\theta(x,y)$ should approximate $p(x,y)$ as closely as possible, we want to minimize the KL-divergence between the two
$$
\begin{align}
&D_{KL} \left[ p(x,y) | p_\theta(x,y) \right] \\
&= \int \int p(x,y) \log\left[ \frac{p(x,y)}{p_\theta(x,y)} \right] dx dy \\
&= \int \int p(x,y) \log p(x,y) dx dy - \int \int p(x,y) \log p_\theta(x,y) dx dy
\end{align}
$$
Note that the first integral does not depend on $\theta$. The second term can be further simplified using the facotization
$$\int \int p(x,y) \log p_\theta(x,y) dx dy = \int \int p(x,y) \log p_\theta(y|x) dx dy + \int \int p(x,y) \log p(x) dx dy$$
Here the second term does not depend on $\theta$. Using all this, we can write the optimization problem for the KL-divergence as
$$
\begin{align}
\theta^* &= \text{argmin}_\theta D_{KL} \left[ p(x,y) | p_\theta(x,y) \right] \\
&= \text{argmin}_\theta \left[ - \int \int p(x,y) \log p_\theta(y|x) dx dy \right]
\end{align}
$$
Plugging in the model assumption about $p_\theta(y|x)$ this gives
$$
\begin{align}
\theta^* &= \text{argmin}_\theta \left[ \int \int p(x,y) \frac{(y-f_\theta(x))^2}{2\sigma^2} dx dy + \log\sqrt{2\pi\sigma^2}\right] \\
&= \text{argmin}_\theta \left[ \int \int p(x,y) (y-f_\theta(x))^2 dx dy \right]
\end{align}
$$
where we use that neither the constant shift nor the constant scale change the solution of the $\text{argmin}_\theta$.
This way we have derived the mean squared error as the loss for regression from probabilties and their factorizations. The final step would be that we use the empirical risk to approximate the expectaion / integral, i.e.
$$
\int \int p(x,y) (y-f_\theta(x))^2 dx dy \approx \frac{1}{N} \sum_{n=1}^N (y_n - f_\theta(x_n))^2
$$
which repsoduces the mean square error as a loss.


Problem downloading large files with Rails, Nginx (with x-accel-redirect) and Apache(x-sendfile)

Question: We have a big problem with downloads when the size is over than 1gb.
We are using Rails 2.3.5, passenger 2.2.9 on Amazon EC2 2gb with 2gb of Ram and Fedora 10.
Files are stored on /mnt/files, project is on /mnt/www/project
We tried to send files with Nginx and x-accel-redirect and also Apache with x-sendfile.
We can download only and always 1.09gb instead of 1.54gb!!
We can download files without problems where size is less than 1gb
If we link same file (that is not corrupted) in rails public dir, we can download without any problem.
X-Accel-Redirect or X-SendFile are configured correctly, tested and checked a lot of time.
So:

Nginx with x-accel-redirect [fail]
Apache with x-send-file [fail]
Send File without x-accel-redirect or x-sendfile on nginx or apache [fail]
Linking file in public and direct download [works]

Any suggestion?
Thanks!!!
Answer: If you're looking to restrict access to these downloads, have you tried the Access Key module?


How can I run my Symbian OS based Mobile phone applications on my computer?

Question: Is it possible to run mobile apps on computer? To be specific, I have a Nokia n95 phone running on Symbian OS
Comment: @Ehsan Mamakani Providing model number of the phone / Symbian OS version would be helpful/
Answer: All of the iPhone, Android, and BlackBerry have simulators for running mobile applications on your PC (well, Mac in the case of the iPhone), but they're designed for debugging applications you're developing not general usage.  Other Mobile OS developers probably provide similar software for their developers.
If you just want to use $hot_iPhone_app on your desktop, then no, not generally speaking.  That's not how it works.  You'll have to look for a desktop-based alternative.
Answer: The short answer is no. You would need cell phone service from your computer to get any use out of them even if you did find a working cell phone emulator, which is highly unlikely unless you're talking about Android. The good thing is that there are usually PC equivalents of mobile applications if you look around for them.
Comment: what is the main problem that they cannot be executed on computers?
Comment: Hardware incompatibility and lack of the correct wireless connections. The basic thing is that they were not meant to be run on a computer!
Answer: There are a few emulators out there that can let you use a certain subset of all J2ME apps on your computer, but native executables are almost impossible to run on a computer short of a manufacturer-provided emulator.
Answer: A symbian emulator might do the trick
Comment: Above link is not working...


Passing parameters from Jenkins to Ansible playbook

Question: How can I pass parameters from Jenkins to my Ansible playbook? Eg. I want to take IP address from users and pass it to the playbook so that it will execute only on those machines.
Answer: You can use -e switch for that purpose:
ansible-playbook -e 'foo=${FOO}'

where the FOO can be defined in the Jenkins envirionment variables. If it is defined within the parameters block of your Jenkinsfile, then you need to use ${params.foo}. Then, the value can be accessed by the Ansible playbook with {{ foo }}.


Can a self-employed person have a Health Savings Account?

Question: Who can establish a Health Savings Account?  I am self-employed with an IRA and SEP accounts.  My health insurance is provided through my Husband's employer.  My husband has a HSA through his employer.  Can I, as a self-employed 1099 person also establish my own HSA?
Answer: Whether you can establish an HSA has nothing to do with your employment status or your retirement plan. It has to do with the type of medical insurance you have.
The insurance company should be able to tell you if your plan is "HSA compatible". To be HSA compatible, a plan must have a "high deductible" -- in 2014, $1250 for an individual plan or $2500 for a family plan. It must not cover any expenses before the deductible, that is, you cannot have any "first dollar" coverage for doctor's visits, prescription drug coverage, etc. (There are some exceptions for services considered "preventive care".) There are also limits on the out-of-pocket max. I think that's it, but the insurance company should know if their plans qualify or not.
If you have a plan that is HSA compatible, but also have another plan that is not HSA compatible, then you don't qualify.
And all that said ... If you are covered under your husband's medical insurance, and your husband already has an HSA, why do you want to open a second one? There's no gain. There is a family limit on contributions to an HSA -- $6,550 in 2014. You don't get double the limit by each opening your own HSA. If you have two HSA's, the combined total of your contributions to both accounts must be within the limit. If you have some administrative reason for wanting to keep separate accounts, yes, you can open your own, and in that case, you and your husband are each allowed to contribute half the limit, or you can agree to some other division.
I suppose you might want to have an account in your own name so that you control it, especially if you and your husband have different ideas about managing finances. (Though how to resolve such problems would be an entirely different question. Personally, I don't think the solution is to get into power struggles over who controls what, but whatever.) Maybe there's some advantage to having assets in your own name if you and your husband were to divorce. (Probably not, though. I think a divorce court pretty much ignores whose name assets are in when dividing up property.)
See IRS publication 969, http://www.irs.gov/publications/p969/index.html for lots and lots of details.
Comment: Among other things, that publication says "Each spouse who is an eligible individual who wants an HSA must open a separate HSA. You cannot have a joint HSA."
Comment: @JeffTrull But you can pay your spouse's medical expenses from your HSA, and there is a combined family limit on contributions.
Answer: IRS Publication 969 gives all the details about HSA accounts and High Deductible plans:
According to your question you are covered by a plan that can have an HSA.
There a few points of interest for you:

Contributions to an HSA
Any eligible individual can contribute to an HSA. For an employee's
  HSA, the employee, the employee's employer, or both may contribute to
  the employee's HSA in the same year. For an HSA established by a
  self-employed (or unemployed) individual, the individual can
  contribute. Family members or any other person may also make
  contributions on behalf of an eligible individual.
Contributions to an HSA must be made in cash. Contributions of stock
  or property are not allowed.

That means that yes you could make a contribution to the HSA. Or if in the future you were the provider of the insurance you could have a HSA.

Limit on Contributions
For 2015, if you have self-only HDHP coverage, you can contribute up
  to $3,350. If you have family HDHP coverage you can contribute up to
  $6,650.

It sounds like you have a family plan.

Additional contribution.   If you are an eligible individual who is
  age 55 or older at the end of your tax year, your contribution limit
  is increased by $1,000.
Rules for married people.   If either spouse has family HDHP coverage, both spouses are treated as having family HDHP coverage. If
  each spouse has family coverage under a separate plan, the
  contribution limit for 2014 is $6,550. You must reduce the limit on
  contributions, before taking into account any additional
  contributions, by the amount contributed to both spouses' Archer MSAs.
  After that reduction, the contribution limit is split equally between
  the spouses unless you agree on a different division.
The rules for married people apply only if both spouses are eligible
  individuals.
If both spouses are 55 or older and not enrolled in Medicare, each
  spouse's contribution limit is increased by the additional
  contribution. If both spouses meet the age requirement, the total
  contributions under family coverage cannot be more than $8,550. Each
  spouse must make the additional contribution to his or her own HSA.

Note: most of the document was written with 2014 numbers, but sometimes they mention 2015 numbers.
If both are covered under a single plan it should be funded by the person that has the plan. They may get money from their employer. They may be able to have the employer cover the monthly fee that most HSA administrators charge. The non employee can make contributions to the account but care must be taken to make ure the annual limits aren't exceeded.
HSA contributions from the employees paycheck may reduce the social security tax paid by the employee. If the non-employee is self employed you will have to see how the contribution impacts the social security situation for the couple.
If the non-employee is 55 or older it can make sense to throw in that extra $1000. The employer may not allow it to come from the paycheck contributions because they wouldn't necessarily know the age of the spouse, they may put a maximum limit based on the age of the employee.


How do I filter user input css?

Question: In my application I am allowing users to upload their css style sheets so they can applied to templates. The css is written as an internal style sheet, because at this time I would not like to expose the css style sheet to other users.
That creates room for users to include malicious code into the css file. Initially my plan was to convert all '<' and '>', but that is needed in the css syntax. I am after a white list solution, since it won't be feasible to exhaustively eliminate unwanted characters.
Any suggestions for implementing security measures to this scenario?
Answer: You should definitely also filter out at least IE expressions and FF -moz-binding properties... both can be used to run (potentionally malicious) javascript using css.
This cheat sheet contains the most obvious XSS tactics, including some CSS ones.
The safest solution would probably be whitelisting as you suggested (if it is acceptable to limit users to only use whitelisted properties).
Comment: Can you please elaborate more on that? Thanks!
Comment: Nice note you made about XSS and embedded Javascript.
Answer: I implemented a filter that replaces all < characters to <. The reason is that CSS does not need the < character; the only character it needs is the > which is used for child selectors.
That way users cannot open tags to write malicious code.
I am more than happy to consider any other/better solutions.
Answer: Dont allow users to upload a CSS FILE, make an interface that generate the CSS files dynamicly based on the options selected by the user. The options you allow. then you can make a fisical CSS file or you can make a dynamic application who writes CSS based on that configuration, this avoid to have lots of CSS files on the server... its another approach and you dont need to check every posible XSS exploit, its more easy to define what is allowed than parsing CSS and rejecting some dangerous code.
Answer: Use CDATA and escape the terminating sequence (]]>).  I'm not sure about browser compatibility, though.
Example (untested):
<?PHP

function strReplaceAll($needle, $replacement, $haystack)
{
    // Check for infinite loop.  (NOT FOOL PROOF!)
    if(strpos($replacement, $needle) === FALSE)
        return;

    $numReplacements = 42;

    while($numReplacements)
    {
        $haystack = str_replace($needle, $replacement, $haystack, &$numReplacements);
    }

    return $haystack;
}

?>

Comment: I think malicious users could have a string like " /*]]>*/ malicious.stuff /**/ " as $userCss. That could be a way around that.
Comment: A user could circumvent that protection easily by typing: ]]]]>>
Comment: @Nick, Good point.  I guess the replace could be done many times until no change to the document is made.

How do I filter user input css?


Do Apple stores refuse to repair your iPhone if not purchased directly from Apple?

Question: I am planning to buy an iPhone 6 from an online store. But I have been told that if I buy from anywhere except the Apple store, I won't be able to enjoy the benefits of the warranty and guarantee. Is that true?
Comment: Apple publishes their warranty at http://apple.com/legal - there is no guarantee. Could you edit this to explain more about your doubts? Did some random child on the street tell you this or is there some basis for your uncertainty about what Apple provides? (basically, you are asking a yes/no question so you will basically get one yes answer, one no answer, and lots of opinion and possibly un-needed guesswork)
Answer: You can research Apple's warranty at http://apple.com/legal
You will have consumer law protections if you can prove you purchased product in a certain place. Those trump any warranty.
Apple's warranty is attached to the phone (or any serialized product), so all that matters is what country that serial number was first sold as Apple's records show. They then warrant that one device under that one legal framework.
The warranty doesn't need proof of purchase, but most of the agreements I've read say "Apple or its agents may require that you furnish proof of purchase details" which protects them against stolen or counterfeit serial numbers if there is doubt.
I would recommend you get a written invoice with the business name and the serial number of the iPhone so you are covered in case Apple exercises the "may require" clause, but I've never heard of anyone actually reporting that they needed to provide proof of purchase as Apple typically honors their warranty to the letter and often treats consumers better than the warranty allows.
Comment: Unless you live in Europe. My phone is out of the one year Apple warranty, but within the 2 year warranty period we have in Europe called consumer warranty. For this case, Apple asked me for the purchase proof. Doesn't make sense because they have it in their system when and where the device was bought, but they are still requesting it. If you are inside the 2 year consumer warranty but lost your purchase proof, too bad for you :(
Comment: @Dante I've heard that is the legal framework in Europe from others as well. The responsibility to do certain things shifts from the vendor (often the specific shop where the sale occurred) to the manufacturer and to the end user over time. Hopefully, the store you purchased it has records - I've generally had good luck getting a duplicate from Apple when I have the serial number and approximate date/location of the sale.
Answer: Apple will honor the warranty of any device sold from an authorized dealer. If you buy a second hand device from an individual I believe the original warranty is in effect from the original sale date. EG the warranty starts from the time Apple or the authorized dealer sold it to the person you bought it from.
Your best bet might be to ask someone at an Apple store for a definitive, authoritative answer. Either that or call Apple support.
Comment: Additionally if the device was purchased with AppleCare (and properly enrolled), then the extended warrantee is transferred to the new owner.
Comment: I've never known Apple to care how you acquired product. All serialized products are sold through a channel that establishes which legal entity backs the warranty. I'll provide an answer if that's really what the OP is asking. The warranty is attached to the device, not some reseller or even a person/company so all that matters is what Apple's records say for that product in terms of country of first sale.


How do I use cPanel to redirect subdomain to a static IP with masking?

Question: We have a hosted website, configurable through cPanel. Content that can't be hosted there (because it requires up-to-date PHP, which is "coming soon") is temporarily on another server. That server has a permanent IP address, but no URL.
What are the cPanel options we need to use to get subdomain.example.com to display content from 203.0.113.0, whilst maintaining the original URL? So e.g. if a user types subdomain.example.com/page, they get content from 203.0.113.0/page, but continue to see subdomain.example.com/page in their browser.
Edit for more info:
The original server is viewed at a URL (say example.com). It is hosted with Zen Internet, and my only editing power is through limited cPanel features. I think it's running Apache. I can add new files. I'm struggling to match cPanel documentation with my experience of e.g. hosting an Apache server from a laptop. (Which is something I've only done a couple of times.)
I can ask our admin to edit DNS records / talk to our hosting provider, but his experience is as limited as mine, so I need to pass along specific instructions.
I believe our admin has created a DNS A record which points at the IP address. Unless I add a redirect in cPanel, however, I get sent to a Zen Internet Domain Holding Page. (First I get a "the security certificate is from Zen hosting..." warning, but ignoring that...)
The subdomain server is accessed through a public IP address (say 203.0.113.0:8080). It is an IIS server. It is configured to display the subdomain content if it receives a request from subdomain.example.com, or at port :8080; viewing the site via the IP+port works fine. This server I have full access to.
Comment: Another option might be to use your domain registrar.   For example, Godaddy has free redirection services including framed masking: https://www.godaddy.com/help/manually-forwarding-or-masking-your-domain-name-422
Comment: You can't do this sort of "redirect" through cPanel if you want the _redirect_ to be "masked". cPanel offers a simple redirect module that is a bit [notorious for making a mess](https://webmasters.stackexchange.com/a/106312/1243) at best. What you want is not actually a redirect at all as you'd need to "proxy" the request to the other server - this will require manual changes to your `.htaccess` and/or  server config. OR, you configure an `A` record in the DNS for the subdomain that points the other server - but you'll need to configure the other server and give it this URL.
Comment: A few questions. Does the sub domain exist or are you going to set it up? Are you really trying g to access the second server using a private IP address? Is your current server also available using a private IP address? Do you have shell access to the computer or a way to create files - assuming you know how to manage file level access through cPanel? What web server are you using? If Apache, are you familiar with Htaccess?
Answer: This isn't really a cPanel problem. This is either a problem with your IIS server, or a problem with the amount of access you have.
If your subdomain is being served on port 8080, and you want to view it without having to include the port, then your only option is to either change the port that it is listening on to be port 80, or to redirect traffic through some proxy.
My first thought would be to simply change to port on the IIS server to port 80. If it's serving HTTP content, it should be connecting to the HTTP port, which is port 80. If it's not configured to run on 80, then that host is simply not making your site available as a normal website. (Also, it is assumed that the IIS server will properly access the content by domain name, and if that's not the case, it should be done, too). The obvious answer is simply to modify the IIS server to serve the content from port 80, and then simply change the A record (a DNS record) for subdomain.example.com to be 203.0.113.0. That alone should fix your problem.
If you absolutely cannot modify the IIS server to function over the standard HTTP port, then your next option would be to create a proxy of some sort. One way of doing this is to create a reverse proxy in Apache:
<code>ProxyPass / http://203.0.113.0:8080/
ProxyPassReverse / http://203.0.113.0:8080/
</code>
However, to do that, you'll probably need root access on the server as it can't be included in a .htaccess file. If you should be able to add those lines, this article will tell you where you can create the file to be added into the configuration:
https://documentation.cpanel.net/display/EA/Modify+Virtualhost+Containers+With+Include+Files
There's probably other ways to create a proxy as well, including perhaps checking with your domain registrar, etc. Just remember to make the A record for subdomain.example.com match the IP of the server where the redirect is created.
Comment: As I said, the IIS server is configured to display the subdomain content if it receives a request from subdomain.example.com. I think the setup is correct; if not, the source of the problem will be obvious, as it will serve the wrong website.
Comment: I think you are right that I need to change the A record, but that I simply don't have access to the right options in cPanel. It sounds like all the "user-friendly" subdomain / redirect / etc options are useless, and I can't change the DNS records using them. Is there a full admin version of cPanel which does have DNS record management, or does our website owner need to contact our domain provider (via website or phone) through a different method?
Comment: @Ollyver The IIS server shouldn't just serve content for subdomain.example.com, but also for that from port 80. Port 80 is the important part here, unless you are fine visiting http://subdomain.example.com:8080/. A hostname always resolves to an IP address. Web browses will default to port 80, which is the only reason you don't have to type in domain.com:80. The :80 is assumed. So, if you don't want to type a port number, it would need to listen on port 80.
Comment: @Ollyver Regarding the A records, cPanel makes that pretty simple by default. However, your hosting provider can set any restrictions when they configure your account. Be sure that you don't already have the subdomain added as a subdomain for hosting. You're just creating a new A record. Even the "Simple DNS Zone Editor" should be able to handle that. DNS records are not redirects. You haven't mentioned anything which would require a redirect. A redirect may be helpful once you have your URL working, but not until then. That would be done at the hosting.
Comment: In the end, I got our admin to use the entirely separate Zen hosting management website (at https://portal.zen.co.uk for any later readers) and add a new A record there. I never saw a "Simple DNS Zone Editor" option using my cPanel account; I don't know whether our admin could see it on his.


Can we use shared schema multi tenancy(using tenant_id column to scope) combined with separate schema approach

Question: I am working on a ruby on rails learner project that uses multi-tenancy. This project has states(tenant) and cities(sub-tenants). User can only belong to one city. For first level i.e for states I have decided to go with separate schema approach using the Apartment Gem. Now my question is can I use table level multi-tenancy(using tenant_id column to scope) to implement subtenants(cities) under each schema. Are there any potholes which I am missing to see with this approach?
Answer: I don't know much about Apartment gem and its ramification on your DB design, but I know you can do the table level multi-tenancy and it's perfectly fine.
Adding a tenant_id to your cities table will allow you to fetch all the cities that belong to a particular state without any downside.
If I am right, I assume that is what you want to do?
Answer: Define your requirements.  The answer to your question is the answer to this question:

How bad is it if someone saw data that they were not allowed to see?  (i.e. they saw data that belongs to another tenant).

In other words, the answer is whether it is an acceptable risk to accidentally cross-contaminate data because of a malformed query or not?  The answer isn't always a catastrophic failure.
Bottom line is for some industries, the answer to that question has regulatory impact (i.e. you would be in violation of some law).  For others, you cause your customers to loose faith in the solution.  Neither are great outcomes, but you have to consider the cost.
Here are the risks:

Difference in blast radius: complex queries can affect the performance of other tenants, or if data leaks you can lose customers, or worse be in violation of laws.
Difference in cost: it is always lower cost to keep all your data in as few buckets as possible, but separating it out into one bucket per tenant is always safer.
How good is your testing?:  you need to make sure your automated testing ensures that data is only returned for the calling tenant
Difference in deployment:  the more buckets you split your data in to, the more complex your deployments become.  If your deployments are automated and sure, then that won't be a major issue

Bottom line:

Separate databases are always safer for multi-tenant applications
Separate databases are also almost always more expensive (depending on your hosting solution)

If this is a demonstration just to see the art of the possible: just use one database and use the tenant_id to differentiate the data.  Just understand that might need to change for production.


Teamviewer vpn install?

Question: How can I install Team-viewer program for VPN feature? I dont see that option
I have Ubuntu studio, Here is my screen-shot from Team-Viewer.
Comment: http://www.teamviewer.com/en/download/linux.aspx
Answer: The VPN functionality is not currently supported on Linux. They may have plans for it in the future, however.
You may use windows version of Team Viewer via wine for VPN feature.
Install wine :
Execute following commands in terminal.
<code>sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7
</code>
Then download teamviewer for windows, then run the setup using wine.
Comment: Did anyone try this? Did it work? Did you end up with some alternative?

Teamviewer vpn install?


How can I map a VMS directory on a Windows 2003 Server?

Question: Is this even possible without compromising the server's security?
Comment: Why would this compromise security? VMS (what version) is pretty secure itself.
Comment: the article I was looking at was about 10 years old and it mentioned you can open up your windows system doing it his way...but then it was 10 years ago and certainly NOT with XP.
Answer: Samba is the canonical system used to do this on Unix-like systems and did support VMS at one point.  However I'm not sure that it still does in the main trunk - you could try an older version.  Directories can be shared from the VMS server via the samba server or mounted off a Windows machine via smbmount.
If you don't want to compile your own version, HP maintains a port of Samba for VMS, which can be downloaded here.
Alternatively, you could see if the Pathworks32 client will run in Win 2k3 server.  Lastly, you may be able to just upload/download files via FTP.
Comment: rats...they aren't going to let me install anything on the VMS side.
Answer: Pathworks for OpenVMS (if installed on VMS) provides integration with active directory. Security can be controlled with inter-domain trusts (Windows side) and ACLs with HOSTMAPs that map active directory names to OpenVMS accounts. You could limit the capabilities of the relevant OpenVMS accounts to match any security policy.
OpenVMS files can have varying record formats, and not all of them can be easily translated to Windows files. Pathworks does a reasonable job translating record formats, but for some files the result is not usable.
Care should be taken with file version numbers, as the Windows side can see only the file with the highest version. When a Windows client deletes a file from a shared directory, an older version can appear and confuse the client.
Answer: You could try setting up the OpenVMS system as an NFS server and the Windows 2008 server as an NFS client.  The biggest problems with this approach are the fact that OpenVMS has versioned files (so that deleting a file only deletes the latest version) and the fact that OpenVMS filesystems are case-insensitive.
From what I've read, OpenVMS NFS is also very picky about what it will accept; anything off kilter will cause it to reject the NFS traffic.
With OpenVMS 8.x, HP TCP/IP is included - as is NFS.
Answer: Whether it's Samba or NFS, nothing in the Windows world is likely to compromise the VMS system - the chances of someone leaving malware on the share that could hurt the VMS system are insignificant.
Or did you meant the other way?  That something about the mapping could affect the Windows server?  In that case, there'd be nothing more risky than any other drive you mapped on the Windows server.


How can I find a dog that looks like a wolf?

Question: I've been looking for a new dog, but I want one that looks like a wolf i.e. fur pattern, size. Not necessarily half wolf, and more options other than the Siberian Husky and Alaskan Malamute
Comment: Welcome to Pets! I edited your question slightly to make it easier to read and more likely to draw attention. If I accidentally changed the meaning, please use the edit function to correct any mistakes.
Comment: Part of this depends on what makes a dog look especially wolf-like to you. Some may consider size essential, or coloration, or body shape... And then there's the question of which wolf you'reusing for comparison.
Answer: Please note that most of these breeds, and the breeds you mentioned, require a lot of owner skill. Most are generally not good dogs for beginner dog-owners, and most are poor choices for a sedentary owners who just want a dog that will sleep on the couch all day. As always, a dog's personality and needs matching are advised to be weighted far more heavily than the dog's appearance.
Wolf-Dog Breeds
A wolf-dog is going to be one of the obvious ways to get a wolf-looking dog. Please be extremely cautious as they are disastrous for beginners and many experienced dog owners have trouble with them. Sanctuaries for wolf-dogs are overflowing with abandonded pets for this reason.

Samoyed

Tamaskan

Canadian Eskimo

Nothern Intuit

Utonagan

German Shepard

Finnish Lapphund

Your Local Shelter : Mixbreeds, Mutts, & More!
Your local animal shelter has many animals and some of them may be exactly what you're looking for. Why shell out the big bucks for a designer breed when something better may be waiting for you right where you live? Most shelters have pictures of each animal online, so you can even look at them without leaving your home.

Designer Mix Breeds
There are many other breeds of dogs, especially in the mixed area. Shown below is a husky-golden retriever mix.
Comment: @edrodriguez Glad you've done your research! I can only hope future readers will do theirs, as well.
Comment: Thank you for this amazing and well written answer, thanks for the concern but I do have experience with both sedentary and active dogs, but being that I no longer live at home I have let some time pass for me to be very settled in my new home. And I want a buddy that will keep up with me on my daily jogging and be as active as I am. Probably the only beginner experience I have is with large dogs, but I've been reading and I think I'm up for the challenge.
Comment: btw, whats the breed of the first pic, it looks amazing
Comment: @edrodriguez It's a wolf-dog, not sure on the specifics
Answer: So, as you said, you've always got the Husky and Malamute to fall back on. However, both of these are high energy, cold weather dogs. It's really not fair to get one if you can't exercise them to a degree that most people aren't willing to, or if you live in a hot climate like I do.
You've also got other dogs with a similar body style. There are several, but I think a german shepard that's all white or all black would be fairly close.

VS

If you're just looking for a similar color or a foxy face, you can get something like a keeshound. My grandmother had one and she's pretty cute. However, it's a massive grooming commitment and she's strictly an indoor dog in the summer time.

So, there are a lot of options. I think the GSD is your best bet if you're counting out the two you mentioned
Keeshond Puppy vs Dandelion
On the topic, you can actually buy wolf/dog hybrids. These are dogs where a female dog, like a Husky, is bred by a wolf. It can really be any dog, but the dogs used as sled dogs, are outside most of the year, so these have the highest chance of this unintentional breeding. Different states have different regulations. Some states allow them, but only if you buy ones already in the state. Others allow them only by special permit or not at all.
The problem with a lot of them, and the reason I wouldn't suggest you to get one of these at all is that a) they don't get the looks by percentage, so you could get a 90% wolf that looks like a mongrel dog; and b) you can get the worst of both breeds.
I did some research into these several years back, because I wanted one and they were legal in my state if bought from an instate breeder. I found out that they can be great and loyal dogs. However, you can get genetically unlucky and get one with a bad mix of traits. The reason for this is because dogs have been domesticated and selectively bred to loose a lot of their wild traits and gain others. Wolves are wild and have wild instincts. A good example is that dogs have been bred to be more aggressive and bark and attack intruders. Most people want their dog to alert them to people coming up to or into the house. On the other hand, I read one owner posting about the loyalty of their wolf hybrid. They were talking about a 'for instance' situation and not something that actually occurred, but they said that while a dog will yap, bark, and possibly attack and intruder breaking into your home, the wolf-dog will sit quietly in the corner and watch them walk out with your tv and any other valuables. However, if they sense the person intends to harm you, you'll wake up to find bodies on the floor. So, I read several people talking about the bad mix you can possibly get where you get one with the aggression of a house dog and the silence and lack of warning of a wolf.
I'm not trying to turn anyone off wolf-dogs and you need to study up on your own. I just wanted everyone to be aware of what I read and decide for yourself if it's legitimate. I also read that wolf puppies act like dogs up until they're about 2-3yrs old. At that point, their natural adult instincts come in and they start fearing anything new. You can get this in your wolf-dog as well, and like before, it's not a good thing to have an animal become fearful and have aggressive attitudes toward strangers.
It was also indicated in these reading that you can't handle a wolf-dog like a normal dog. You have to form a very strong bond and they recommend keeping the puppy right beside you for the first 3months or so. This is hard for most people who work jobs. Also, they said you can't just negligently correct a dog with a pop on the butt like you might a regular dog. You have to be more respectful and work harder on the training. So while a wolf-dog might make an excellent pet, you really have to know your stuff. I know my uncle had one when he was younger and said it was one of the best pets he ever had, so you can get a great one, but you have to take the other things into consideration as well.


Differentiate during PAM authentication SSH session vs SSH inline commands

Question: During authentication of SSH user, is there a way we can tell between SSH session vs SSH inline command? I have tried checking tty but they are coming up the same in both cases for me.
In my scenario, I need a way to block user (during authentication) from doing "ssh user@hostname 'some cmd'" but allow the user to log in via SSH otherwise with same user account.
Comment: Why do you need PAM there? Just have a `ForceCommand /bin/bash -il` in sshd_config.
Comment: Why do you even want to do this?  Do you think there's some security benefit? (there isn't). Or do you just hate your users and want to make things difficult for them?
Comment: Do you also want to prevent users from using `scp` or `sftp`?
Answer: It is not possible during the PAM authentication -- the pam does not have any information about commands passed to the ssh. Only the ssh server can distinguish these types. But note that not passing the command argument to ssh means it internally executes the user shell (usually bash).
You can achieve what you describe by using the following in your sshd_config as already proposed by muru:
Match testuser
  ForceCommand /bin/bash -il

This will always run interactive shell for user, even if he specifies the command argument to ssh. If you rather want to show some message in case there is different command passed, you will have to write some simple script, which will be called instead of the bash and will check the SSH_ORIGINAL_COMMAND and if that is set, do appropriate action of your choice.


how can i import the csv file in wordpress woocommerce.?

Question: my client has a Wordpress website and we are facing some issue while importing the products with variations in the website. the website link is https://www.primadonsanddonnas.com. The CSV file uploading some products variations not all and I have tried it with different plugins but couldn't figure it out. What should I do now?
Answer: Haroon,
In the past, I've used this paid extension through the WooCommerce store: https://woocommerce.com/products/product-csv-import-suite/
However, WooCommerce is in the process of phasing that plugin's functionality into their core release: https://docs.woocommerce.com/document/product-csv-importer-exporter/
If the default core option does not yet meet your needs I would recommend checking out their paid extension.
One other tip: I would suggest setting up one product by hand, directly within WooCommerce. Export that option with the same sort of setup (built-in or plugin) you will use to import. Look closely at how it formats each product and format your import this way. Sometimes the documentation just doesn't explain how to format well. But if you look at something you've exported that is set up exactly the way you want it set up, your chances of a successful import go way up.


Running netty application in Amazon Elasticbeanstalk

Question: I have a regular netty application server that runs on port 44080 and is built as a .jar file. I would like to use elastic beanstalk to manage the lifecycle of the application. Is there a way I can deploy the jar or something similar using elastic beanstalk?
Answer: It seems netty is currently not supported by elastic beanstalk. If your application can also run on Tomcat, you could do that - with Tomcat, you just need to enter some basic settings in the webinterface and you´ll get a fully working environment where you can upload jar files to.
If you need netty as a platform, you could try using Amazon OpsWorks. I never worked with it myself, but I know you can create your own "environment configurations" there. You´d basically create a few scripts to setup your server and deploy your application and OpsWorks lets you execute those through the web ui and also provides capabilites for auto-scaling, failover, etc. in OpsWorks environments.
Answer: There's nothing wrong about using Netty. In fact, one of our archetypes for AWS Elastic Beanstalk contains support for Dropwizard (by using Docker as its stack), thus not being dependent on a Java Web Container.
$ mvn archetype:generate -Dfilter=elasticbeanstalk-docker-dropwizard
It might need a few tweaks, but the overall idea is to package all your dependencies into a zip file and deploy it. Also, make sure your Dockerfile EXPOSEs port 44080.


How to set camera to view the whole floorplan?

Question: My floorplan units are set to inches. I added a camera to view from the top as shown but when I hit (0) for camera view, I have a feeling it is view a small portion with no detail in it. I zoomed all the way out and played with camera scale but camera view shows nothing. Any advise? Thanks
Answer: Your camera clipping end value is too small. Try setting it to 15' or more.
The floor plan is 14' 8.58" away from the camera, but the camera end clip value is 8' 4". This means that no objects further than 8' 4" away from the camera will be displayed in the camera view.

Also, make sure that the camera clipping start is smaller than the distance between the object and the camera, for the same reason.
Comment: Ah! That's what S: and End: mean! Thank you.


Cycles: compositing alpha channel

Question: I have rendered an object using hdri and lamp lights.
Using render layers i want to have object and shadows only.
I show you my nodes.
I need to know how to transform white pixels to alpha channel using nodes.
Comment: No it is not. I want to know how to do it using render layers in order to have an alpha channel. Just i need to transform white pixel to alpha.
Comment: Jerryno, I need a pgn image in order to use it as image web site. Just, the object and shadow only.
Comment: You cannot transform white to alpha, you can transform black pixels to alpha but that won't give you shadow. You can transform white pixels for CMYK mode into alpha.
Comment: related:http://blender.stackexchange.com/questions/5158/render-transperent-shadows-in-cycles
Comment: @jagoji3d That question has the answers you want, you just need to output the transparent image and not add it onto the background image.
Answer: One solution would be to enable a shadow pass, invert the colors and use that as alpha using a Set Alpha node.

The Dilate/Erode will help with the antialiasing of the shadow pass.
EDIT
Now... if you hate the previous option and absolutely want to use the layers you have set up, you can try this:
From the background layer you can indeed subtract the shadow layer, creating a black and white image that holds the shadow information only. But use difference instead of subtract (also, you don't need the invert node because you can invert the image with the curves node, but you do need to get rid of the color information). Next, combine that image with the alpha channel of the sphere, and use the resulting image as alpha channel on the mix of the shadow and the sphere...

Cycles: compositing alpha channel


A catalog of online study groups

Question: I need an online catalog of online study groups. A study group is a group of students studying a specific subject together. I need just a catalog, no forums. Forums may be external and maintained by group moderators. The only option I found is OpenStudy. As described in this article, OpenStudy keeps discussions inside. Forums tied to online courses may count as study groups. They have disadvantages: their subjects are confined to that of the course; their content is not accessible to search engines; they are deleted after the course ends.
Comment: Now I am not sure that this catalog would be better then a plain web search service like Google. It is easy for group administrators to include the phrase "study group" or "learning community" into profiles of their groups.
Answer: I would assume that you are looking for something like Moodle. It's an e-learning platform we use at our university. All students and teachers are registered by the management team and then assigned to their courses or "study groups" in your case. Inside these courses teachers provide details and materials for their courses and all assigned students can access the material.
Moodle is free and open source so you can try it without any costs if you own a server. If you do not own a server, there is also hosting available for Moodle.
I'm not completely sure if the software matches your requirements but you may take a look at it. I can recommend it as it's working very well for us.

A catalog of online study groups


iphone racing game in cocos3d

Question: I am working on iPhone racing car game development using cocos3d.In this how can I get detection of boundaries of road in road-map.I have done with load pod file for road-map.I also want to know about how can I implement physics for car accident.Is their any sample code of game from which I get some information or tutorial which I can follow?
Answer: If I were you, I use Unity. Check out their Car Tutorial that's what you need.
Good luck
Answer: There are very few examples and tutorials available for Cocos3D at the moment. Definitely nothing that fits your bill.
Your project sounds like a lot of pioneering you need to do. Particularly physics will be an issue, because both Box2D and Chipmunk are 2D physics engines. You'll need to find an iOS compatible, open source 3D physics engine. I like ODE, and I've heard good things about Newton too. I don't know if they're compatible with iOS though.
To add collision shapes to your POD files would also be a manual process requiring (self-made) tools or a lot of sweat.

iphone racing game in cocos3d


How to override controller?

Question: If I want to override a controller in my custom module am I able to use existing functionality of default controller in magento 2.
If yes then how?
Answer: Use di.xml :
<code><preference for="<core controller path>" type="<module's controller path>" />
</code>
Copy core function and override it, You can use it in your controller.
Comment: I did this. But it is not working. Can I use default execute function of default controller?

How to override controller?


Integral of brownian increments

Question: I'm stuck at a problem and I'm not sure on how to proceed. My question is how would one go about and integrate the following
$$\sigma\int_{t}^{T}\mathrm{e}^{a\cdot u}\cdot (W_{u}-W_{t})du.$$
I've been stuck with this problem for quite some time. Thanks in advanced!
Answer: By the stationarity of the increments of Brownian motion, we have the following equality in law and an almost sure equality coming from a simple change of variable
$$\sigma \int_t^T e^{au} \left(W_u - W_t\right)du \overset{law}{=} \sigma \int_t^T e^{au}W_{u-t}dt = \sigma \int_0^{T-t} e^{a\left(u + t\right)}W_{u}du = \sigma e^{at}\int_0^{T-t}e^{au}W_udu$$
To compute $\int_0^{T-t}e^{au}W_udu$,
Edit: The argument after this point contains key error. $W_{T-t}$ is not independent of $\int_0^{T-t}e^{au}dW_u$. It is still possible to compute $\int_0^{T-t}e^{au}W_udu$ by using the fact that it is a gaussian process. Thank you to LucaMac for the catch and see their answer for details.
we use integration by parts to get
$$\int_0^{T-t}e^{au}W_udu = \frac{1}{a}e^{a\left(T-t\right)}W_{T-t} - \frac{1}{a}\int_0^{T-t}e^{au}dW_u$$
As a Wiener integral, $\int_0^{T-t}e^{au}dW_u \sim \mathcal{N}\left(0, e^{2a\left(T-t\right)} - 1\right)$ and is independent of $W_{T-t}$ . Furthermore $e^{a\left(T-t\right)}W_{T-t} \sim \mathcal{N}\left(0, e^{2a\left(T-t\right)}\left(T-t\right)\right)$, therefore we have
$$\int_0^{T-t}e^{au}W_udu = \frac{1}{a}\left[e^{a\left(T-t\right)}W_{T-t} - \int_0^{T-t}e^{au}dW_u\right] \sim \mathcal{N}\left(0, \frac{e^{2a\left(T-t\right)}\left(T-t + 1\right) - 1}{a^2}\right).$$
Finally multiplying by the $\sigma e^{at}$ factor left off at the beginning we get that your integral has a normal distribution with mean 0 and variance $\sigma^2e^{2at}\frac{e^{2a\left(T-t\right)}\left(T-t + 1\right) - 1}{a^2}$:
$$\sigma \int_t^T e^{au} \left(W_u - W_t\right)du \sim \mathcal{N}\left(0, \sigma^2e^{2at}\frac{e^{2a\left(T-t\right)}\left(T-t + 1\right) - 1}{a^2}\right).$$
Comment: Hello, very sorry to point this out, but they are not independent. Take $a=0$ for example
Comment: @LucaMac Thank you for the catch! I sloppily applied independence of increments. Your computation of $\int_0^{T-t} e^{au} W_u du$ looks correct.
Comment: Thank you a lot for the detailed explanation. I'm very grateful for your answer!
Answer: Once we get to the point of $$\int_0^{T-t} e^{au}W_udu$$ (thanks Shiva), we could conclude in the following way:
it is Gaussian since limit of Gaussians (the step-wise constant approximating functions are clearly Gaussians);
its mean is $$ \mathbb E \Big[\int_0^{T-t} e^{au}W_udu\Big] = \int_0^{T-t} e^{au}\mathbb E[W_u]du = 0;$$
and its variance is $$\mathbb E\Big[\Big(\int_0^{T-t} e^{au}W_udu\Big)^2\Big] = \mathbb E\Big[\Big(\int_0^{T-t} e^{au}W_udu\Big)\Big(\int_0^{T-t} e^{av}W_vdv\Big)\Big] = \mathbb E\Big[\iint_{[0,T-t]^2}e^{a(u+v)}W_uW_vdudv\Big] = \iint_{[0,T-t]^2}e^{a(u+v)}\mathbb E[W_uW_v]dudv = \iint_{[0,T-t]^2}e^{a(u+v)}\min(u,v)dudv = 2\int_0^{T-t}\int_0^ue^{a(u+v)}vdvdu.$$
Let's stop for a second and evaluate $\int_0^u e^{cv}vdv$, we have $$\int_0^u e^{cv}vdv = \frac1ce^{cu}u - \frac1c\int_0^ue^{cv}dv = \frac{cue^{cu} - e^{cu} + 1}{c^2}.$$
This means that the variance is equal to $$\frac2{a^2}\int_0^{T-t}aue^{2au} -e^{2au}+ e^{au}du = \frac2a\int_0^{T-t}ue^{2au}du + \frac2{a^2}\int_0^{T-t}-e^{2au}+e^{au}du = \frac1{2a^3}(2a(T-t)e^{2a(T-t)}-e^{2a(T-t)}+1) - \frac1{a^3}(e^{2a(T-t)}-1)+\frac2{a^3}(e^{a(T-t)}-1) = \frac{2a(T-t)e^{2a(T-t)}-3e^{2a(T-t)}+4e^{a(T-t)}-1}{2a^3}$$
Comment: you are right, the should be a missing "-" sign in my calculations somewhere
Comment: I didn't check all you calculations but I agree with you in your main point.
Comment: I eventually go at the same results as you by using Stochastic Fubini's Theorem. The only thing where we differ is in your final result for the variance is that you have a $-5$ in the numerator, where I have $-1$. Other than that I agree with your addition to Shiva's response.
Comment: Very sorry Marc, but the $-5$ looks correct to me (take the limit $a\to 0$ to see that it needs to be $-5$)
Comment: I'm pretty sure I'm right. Again, correct me if I'm wrong, but I'll leave my calculations in an answer to my main question, since I cannot write it here :)
Answer: This is a response to Luca's answer.
$$
\begin{align}
\frac{2}{a^{2}}\int_{0}^{T-t} au\mathrm{e}^{2au} - \mathrm{e}^{2au} + \mathrm{e}^{au} du &= \frac{2}{a^{2}} \left(\int_{0}^{T-t} au\mathrm{e}^{2au}du - \int_{0}^{T-t}\mathrm{e}^{2au}du + \int_{0}^{T-t}\mathrm{e}^{au} du\right)\\
&= \frac{2}{a^{2}}\left(\left[\frac{(2au - 1)\mathrm{e}^{2au}}{4a}\right]_{0}^{T-t} - \left[\frac{\mathrm{e}^{2au}}{2a}\right]_{0}^{T-t} + \left[\frac{\mathrm{e}^{au}}{a}\right]_{0}^{T-t}\right)\\
&= \frac{2}{a^{2}}\left(\frac{(2a(T-t) - 1)\mathrm{e}^{2a(T-t)} + 1}{4a} - \frac{\mathrm{e}^{2a(T-t)}-1}{2a} + \frac{\mathrm{e}^{a(T-t)} - 1}{a}\right)\\
&= \frac{2}{a^{2}}\left(\frac{(2a(T-t) - 1)\mathrm{e}^{2a(T-t)} + 1}{4a} - \frac{2\mathrm{e}^{2a(T-t)}-2}{4a} + \frac{4\mathrm{e}^{a(T-t)} - 4}{4a}\right)\\
&= \frac{2}{a^{2}}\left(\frac{(2a(T-t) - 1)\mathrm{e}^{2a(T-t)} + 1 - 2\mathrm{e}^{2a(T-t)} + 2 + 4\mathrm{e}^{a(T-t)} - 4}{4a}\right)\\
&= \frac{2}{a^{2}}\left(\frac{2a(T-t)\mathrm{e}^{2a(T-t)} - \mathrm{e}^{2a(T-t)} - 2\mathrm{e}^{2a(T-t)} + 4\mathrm{e}^{a(T-t)} - 1}{4a}\right)\\
&= \frac{2}{a^{2}}\left(\frac{2a(T-t)\mathrm{e}^{2a(T-t)} - 3\mathrm{e}^{2a(T-t)} + 4\mathrm{e}^{a(T-t)} - 1}{4a}\right)\\
&= \frac{2a(T-t)\mathrm{e}^{2a(T-t)} - 3\mathrm{e}^{2a(T-t)} + 4\mathrm{e}^{a(T-t)} - 1}{2a^{3}}\\
\end{align}
$$

Integral of brownian increments


DisplayPort Chip Identification

Question: What is this chip?

Found on the Numato Opsis fpga graphics board.
Comment: You've partly obscured the designator, but it looks like "D11", implying some kind of diode.
Answer: If you zoom in on the image you will see that the element you circled is marked as D11.  The sister element on the other DisplayPort is marked as D3.
If you go to the link you supplied you can download the schematics for the board.  Searching those for D11 takes you to page 6 where you can see that D11 is a diode that is used for reverse power protection of the board from a badly wired display port cable.  D3 provides the same function for the other port.
I can't see where the actual part numbers are specified, but given the wealth of information on that site I am sure they are there somewhere.
Answer: DisplayPort transceivers are part of the FPGA itself, you have to instantiate the respective IP cores in order to be able to use those DisplayPort connectors.

DisplayPort Chip Identification


"50-or-so candles" or "50 or so candles"?

Question: My gut tells me the correct answer is "50-or-so candles," since the "50-or-so" is a modifier of candles -- just how many candles are we talking?
Comment: What does a Google search for "50-or-so" seem to indicate?
Comment: @EdwinAshworth Now and *prior to my posting this question*, that search indicated the opposite of my hypothesis, hence why I'm here, asking you folks.
Comment: That information would have been better given with your question. 'Gut reactions' are almost always trumped by patterns of usage, and the unhyphenated form is far more common. @Karl Hagen's answer explains the current trend towards only hyphenating compound premodifiers / quantifiers etc when necessary to clarify. I won't downvote it as it's so well expressed, but it is by no means the first time it has been given on ELU.
Answer: Hyphenation is one of the slipperiest parts of usage, and style guides differ. A common rule of thumb is that compound modifiers of nouns are hyphenated, but you typically don't see this stricture given as an absolute dictate (see, for example, The Chicago Manual of Style). Rather, you hyphenate when there would otherwise be ambiguity. For example, a "fast-sailing ship" is not necessarily the same as a "fast sailing ship."
In your example, there's no ambiguity in omitting the hyphens, and so if you choose to leave them out, there's no real problem unless you're writing for a publication whose style guide mandates hyphenated modifiers in every instance.
Answer: I think 50-or-so candles is definitely right, but sadly correct hyphenation is falling in disgrace, so most people will probably regard it as wrong, even if it isn't.  Therefore, I would suggest completely avoiding that wording.  In addition to the question of hyphenation, it is ugly and lazy.  "About 50/fifty candles" does the job at least as well, it is shorter, and there are no hyphens.
See this: http://dictionary.cambridge.org/grammar/british-grammar/word-formation/hyphens.  This guide explains when hyphens are "usually employed" and explicitly mentions that hyphens are becoming less common nowadays.  However, the way I learnt it 100 years ago [♣], these rules are not optional, so I would recommend you always follow them, especially in formal writing (for example, in academical publications).
Also worth checking out: http://dictionary.cambridge.org/grammar/british-grammar/about-nouns/nouns-compound-nouns

[♣] Just kidding. I'm 37.  However, the internet sometimes makes me feel very old.  I have the feeling that the English language has deteriorated rapidly since the advent of the internet and mobile messaging.
Comment: Fair point with the "about fifty" phrasing. Hyphenation is basically non-existent online these days.
Comment: As tchrist has posted elsewhere on ELU, "We are looking for more substantial answers with documented references, not merely [statements that may possibly be no more than] personal opinion. Those are just comments, not answers."
Comment: @ Edwin Ashworth. OK. I will try to remember that in the future.  To honour this promise, I added a link to a reliable source.


How do I stop the rubber sweep on my front door from squeaking as it moves against the floor?

Question: The main door into my house has rubber at the base of it and it has started to squeak  against the wooden floor when opened.  How do I fix  this problem?
Answer: It's the same concept are wiper blades on a car. The rubber is either too far gone and need to be replaced or you can rejuvenate it by wetting it. Rubber, when exposed to the elements, will slowly dry out and lose its oils and become, well, dry. It can become brittle, squeak, and streak. If you can save it, then all you have to do it wet it and let it soak up some liquid just like your wipers working better after a few passes in the rains. You could use water, but it won't work well or for as long. Something like gun oil or any petroleum based oil would work well; however, it's also the first to seep out and cause oil streaks on your floor.
So how do you get a result you're happy with.
If you can rub it while dry and it makes your hand dirty or crumbles, it's probably a goner. Otherwise, if you can find an oil you can stand the smell of (because you'll smell it for a while), soak the rubber in it for a few hours then let dry for another few hours. After that, rinse it thoroughly with hot water to get the extra oil sitting near the surface out.
Comment: WD-40 is a solvent, you have a better change dissolving your rubber than fixing your issue.
Comment: Thanks Monso.  I bought some WD-40 (stops squeaks on everything else) today so Im going to try that.  Hopefully this will work otherwise I will try to take the rubber off and replace it...cheers
Answer: I had the same problem and just tried wd40 and it worked!! Remember to wipe up any excess that drips on to your flooring though
Comment: Hello, and welcome to Home Improvement. Thanks for the answer; keep 'em coming. And, you should probably [take our tour](//diy.stackexchange.com/tour) so you'll know how best to contribute here.
Answer: Silicone grease has worked for me.


Triggering GDM login on a remote machine

Question: I have to briefly describe the situation. We are planning to make a computer classroom with workstations running Ubuntu 10.04. Since making accounts for each student has not been considered reasonable, we decided to make accounts for each student group. We don't want students to share their passwords between groups so the solution would be not to give them passwords at all, but let the teacher log them in instead. Obviously he shouldn't go from one machine to another typing in credentials by hand, so we need some script that will connect to a remote machine by ssh and make GDM (or probably any other login manager if GDM cannot serve this purpose) log in specified user. I couldn't find any solutions, as well as I haven't noticed anybody in similar situation asking for help, so my question will be: can the scheme described be realized and if yes, then how? Thanks in advance.
Answer: In all honesty... you're going to have even more problems if you neglect to create a unique username for each student.  There are many ways to create an authentication server so you only need to create each user-account once... and have each workstation pull from there... which would be the best option.  (you can also use those credentials for many other things.)
As far as remotely logging-in or unlocking a workstation... if you're set on doing it... your best bet is to use VNC to gain control of the remote workstation & login.  As far as I know, there is no script-able way to unlock a workstation.
Comment: Thank you for reply. Unfortunately assigning accounts to each student is really not an option for us even when using LDAP or something similar. We have much less computers than students in an average group so they usually cooperate in pairs while doing their tasks.
Answer: Have you considered using "one-time password" ? (apt-get install opie-server)
or using a Dell Smartcard USB Keyboard ? Give them one smartcard per group and they'll be able to login without you. You keep access to the machines with your own password.


Ask about recommendation

Question: I know that here at SE I cant ask recommendation of products and so. I have a printer that I wanna buy and I want to know if it's good. Where should I post this question in order to get some smart people to take a look?
Answer: Great question! 3DPrinting SE attracts a lot of new Stack Exchange network users, which unfortunately can come with questions that don't always meet the Q&A style for the network that this site tries to uphold.
Questions like this are probably best asked in the Chat room. Currently, it's not very active, but hopefully if we have a few people interested in these more "off-topic" questions the activity will pick up. Pings are going to be a very useful tool if we're going to try and utilize the chat window more. Pinging some of the highly active users may help get quality answers to those off-topic questions.
Answer: Some of your question could be acceptable.  What you want to avoid is "questions which are too broad, unclear, incomplete or primarily opinion-based".  That still leaves lots of other acceptable questions to ask like what printers have a specific feature or whether a specific printer has a specific feature. Note the word "specific".
There is also a Hardware Recommendations SE Beta that may work for you.

Ask about recommendation


Use Lucene as Dbms

Question: In our project our data capacity is high (100Gb of data) and we use sql serve as dbms .
unfortunately  full text search in sql server is rather disappointing so we're using lucene to search our data . but the problem is lucene needs to index data and so the capacity of holding both lucene index and our database would take too much disk space .
so i was wondering can we put sql server aside and just use lucene ? is it stable enough for holding millions of records of data ?
Answer: If you want full text search you need to have full text index, no matter where it's physically located.
But, since you have problems with space, I assume you used stored="true" in your schema fields.
Store it in db (preferably something other than MSSQL) and index it in Solr/Lucene.
Comment: right, the inverted index is rather cheap (often ~30% of the original size of the data)
Answer: You might want to take a look at RavenDB. It's lightning fast, based on Lucene and can function as a stand-alone db. Not to mention the maker likes to put it under all kind of stress.
Only "downside": it's commercial, so it's gonna cost ya :)

Use Lucene as Dbms


syncing no block source

Question: Recently synced bitcoinqt fully over around 36 hours or so without problem. I'm now trying to tentatively test it out as a newcomer and when I run it, it says "out of sync" No block source available 37  hours behind and 0 active connections to Bitcoin network. Should it automatically update each time it is run? Should it automatically connect to the network? Can I use only when fully synced? Apologies for the naivety of the questions but would appreciate someone's time with help?
Comment: Update. It has started synchronising again upon restart. I presume the answer to one of my questions above is therefore yes it is automatic? Also I presume the network is not always available?
Comment: Kudos for using bitcoinqt and thus storing the blockchain! The number of copies of it has decreased over time as it grows heavier by the month and most people just install Electrum or Multibit
Answer: Just restart bitcoin qt and wait a while - for me always work
Answer: Although it seems to have resolved itself, there can be other causes of this. Windows firewall will sometimes block my wallets from syncing. (I don't think this is causing your problem, but it may help someone coming to this question via search with the same problem.)
To diagnose this problem, type "firewall" into the start menu and click "Windows firewall with advanced security". You can then click "Monitoring", then "Firewall" on the menu to the left. Sort this list by "Action" and see if your wallet program is being blocked.
If it is, click "Inbound rules" and sort by name, look for your wallet program. If it's being blocked, right click and disable the rule.
Likewise, you should check "Outbound rules" in the same way.

syncing no block source


What finish should I use for concrete on stairs?

Question: I want to remove the carpets on the stairs in my duplex. it is a concrete staircase.
I think I would need to repair it and then I want to coat it and leave it bare.
what would be a good coat to use? Paint? epoxy?
I do not want it to be slippery and if possible I want to allow the concrete to absorb heat during the day in winter when the sun shines on it so that at night it can release the heat.
Comment: I keep pondering adding a stone veneer to my concrete step...
Answer: You don't have to finish them. If you like the look of concrete, you can leave it as-is.
If you do want to finish, I'd suggest a concrete stain. You can then seal it with a variety of clear coat products. Epoxy based clear coats are more durable, though harder to apply. You can even just apply a wax as a final protective coat if you like.
Answer: There are special paints/coatings for outdoor/rugged floors which are usually epoxy based.
You can then put an anti-friction tread on the stairs themselves. These range from simple tapes to high-friction pads that you glue down.
Answer: Look into a product called CHEM-TRETE (and similar) http://www.protectosil.com/product/protectosil/us/products/water-repellents/protectosil-chem-trete-40-voc/pages/default.aspx. I think you have to purchase through a VAR or other licensed service provider, but the stuff penetrates concrete and alters the chemical structure such that it repels water. This would allow you to avoid any coatings or future maintenance hassles.


What can I do in my code today, to prevent the unix time stamp running out in 2038?

Question: For example, I mostly program in PHP. What can I do today to prevent my program from exploding in 2038 due to unix time stamp running out? I would love to see some specific algorithms, functions or logics that can work to prevent this problem. Thanks.
Comment: @Jan - you haven't been programming very long have you :)  I spent the whole of 1998 and 1999 doing Y2K remediation on VAX VMS programs written in the 70s.  I can tell you with certainty that there were thousands of other programmers wasting millions of hours to ensure that "nothing really happened on 1/1/2000".
Comment: do you think the code you write today will still be in use in 2038?
Comment: @Dagon - programmers in the 70s didn't think their code would be in use in 2000 either, but lo and behold..
Comment: use 64bit PCs by then. This should need no extra effort.
Comment: @Dagon In 1970, when I got my first programming job, I did worry about 2000. I only stopped worrying in the late 1990's, when worrying about it, and therefore fixing it, became fashionable.
Comment: @Dagon I'm already retired, but I would still prefer computer programs to go on working. The investments I live off are really just bits in various databases.
Comment: @Dagon, some people who wrote mainframe code in the 70s and 80s didn't expect their code to be in use in 2000. But at least in this case, you can avoid it by using 64 bit systems, which are starting to become the norm.
Comment: @EricPetroelje lo and behold, it wasn't? Nothing really happened 1.1.2000 0:00 AM
Comment: but its php, for the web, i don't think that comparison stacks up.
Comment: You could store the current era (a rolling frame of 138 years) in the config file and roll your own mod-{2^32 ms} corrections.
Comment: @EricPetroelje  You could also say that there were `.. thousands of other programmers being paid to work millions of hours .. `. :D
Comment: @PatriciaShanahan in 2038 i will be retired, and safe from the fallout :-)
Answer: Store the timestamp as a 64bit, or higher, integer. I'm sure MySQL will be updated by then so that TIMESTAMP isn't 32bit. In regards to PHP, I don't see any issues there if you're on a 64 bit server.
Comment: +1 for bringing up external systems like MySQL. External systems and file formats (like the tcpdump packet capture format) that are inflexible and specified to use 32 bits for the time are where the real problem is. For computations on internal representations inside programming languages, the problem will largely be gone well before 2038 by the use of 64 bit types for things like `time_t`.
Comment: Does that mean not using PHP's builting date function? or do you expect the PHP date function to be updated to work after 2038?
Comment: What do you mean? Why do you think the date function wouldn't work after 2038?
Comment: The current PHP date function specifically says: "The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT."
Comment: @KoKo "The valid range of a timestamp is **typically** from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT". FTFY.
Comment: @KoKo don't forget to read the suffix that explains why: *"These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer"*. The language controls the size, not you. And they've got 25 years to turn it into a 64-bit integer. I think they'll manage.
Comment: Thanks for the explanation, I now feel more comfortable using the PHP date function.
Answer: Unless you plan on using a 32-bit server or PHP binary for the next 25 years I don't think it will be a problem.
PHP is an interpreted language, so when you write $stamp = 1358425440; it's just a string of text that PHP reads in, then allocates X bytes of memory to store it according to how PHP was compiled. So if you update your PHP binary to one that supports 64-bit integers then you don't have to change your code. [In theory, at least. We all know how PHP likes to change common functions around and deprecate things.]
The only consideration I can see making is for the storage of integer values outside of PHP, ie. in mySQL. In this case you just need to make sure that you're storing your timestamp as either an UNSIGNED INT, BIGINT, or DATETIME.
SIGNED INTs will conk out Tue, 19 Jan 2038 03:14:07 GMT, but UNSIGNED INTs will last until Sun, 07 Feb 2106 06:28:15 GMT.
Comment: Thanks for the explanation, I now feel more comfortable using the PHP date function.
Comment: Thank you for explaining that UNSIGNED INTs are good for essentially another 100 years.  I always make my INTs in MySQL unsigned-- glad to know it's good for a while!
Answer: Change
 // 32 bit
    int timestampSec

to
 // 64bit
    long timestampSec

for internal storage.
Comment: Look at the language tag... You can't really choose one.


What did Geralt of Rivia ask for his third wish?

Question: What exactly did Geralt of Rivia ask the genie in the short story "The Last Wish" in "The Last Wish" collection by Andrzej Sapkowski? I know what happened after with Geralt and Yennefer - is it revealed what the exact words were?
P.S. I am still in process of reading the series, so if it is a really big spoiler than by all means let me know of that and not answer :P :D
Answer: Geralt's first wish
The rough translation of what he commanded the djinn to do while holding the sigil was "get out of here and go fuck yourself". He didn't know that was what he was saying, because he didn't speak the language, but the sigil heated up right after he said that, showing that it had activated, and later Geralt insisted that the priest translate the command. At that point he knew it was he who had wished, and that it was that particular phrase, but he had to know its translation to be certain. See pages 280 and 330 of the standard paperback edition.
Geralt's second wish
His second wish was for the sadistic guard to literally 'burst', which he does.

Geralt's third wish
We cannot know for sure what it was; Sapkowski leaves it to our imagination. All we know is that it had the effect of both protecting them from the djinn and binding their fates together, as the priest later said. Yennefer also said it was something so powerful that she doubted there was any force in Nature that could grant it, but that if there was, Geralt had condemned himself to her.
See also this post from the Arqade/Gaming Stack Exchange.
The most commonly cited possibilities are things it couldn't have been, given the evidence:

For Geralt and Yennefer to have a baby together. This is sort of clever, since the djinn after fulfilling this wish wouldn't be able to kill them, at least not for awhile, and whatever his wish was certainly had the effect of preventing the djinn from killing them. But Sapkowski explicitly denied that this was the wish in an interview. Also, Geralt he would never force his offspring on a woman without asking her consent, even if it would save her life.
For Yennefer to fall in love with Geralt. This is very popular, but impossible for two reasons. Firstly, again, Geralt would never force his love on someone else: that would directly conflict with the code of conduct and morality which is the centrepiece of the book. Secondly, this would do absolutely nothing in protecting either of them from the djinn, which at that point was out for Yennefer's blood and possibly Geralt's as well. Had he wished that, the djinn would have granted it and then happily killed her and possibly him too.
For Yennefer to forget that she had ever been a hunchback. A few people think this because it was on his mind shortly before he made the wish, but it's impossible because again it would not have prevented the djinn from killing them. Also (minor spoilers):

 she remembers that she was one in a future book; and she also remembers later on what his wish was, but if it was this she would have had to forget because the very wish would have reminded her of it.

 Answer copied with some modifications from here, where you can also find a longer discussion on the topic. For more details about the story, see here.
Comment: It's a pity the author disproved the first possibility since, IMHO, it matches the scenario the most. Yennefer acted like whatever he asked for was nigh on impossible and since both witchers and sorceresses are unable to have children that would fit the bill perfectly.
Comment: @HamdiDouss Not only Witchers, almost all Sorceresses too. It's one of the main ires of Yennefer in the books.
Comment: Too bad he never reviled what was the wish... Thanks anyway :)
Comment: I think first one is impossible because witchers are sterile (even if many theorists want to prove the contrary). "binding their fates together" is the more reasonable as it could explain the djinn letting Yennefer.
Comment: It is not cool to keep such a cliffhanger! Only the author could tell the correct answer. The rest of us can only guess the most likely one. My favorite guess is Geralt wished to give his everything to Yenefer. As side effect, it also bound their fates together. Since Yenefer got everything from Geralt, she could not get him out of her mind.
Answer: What was the last wish? It is pretty simple, obvious, but tremendously genius. Whether or not he knew it would save her life, Geralt wished to die alongside Yennefer. As they say, death is the only Destiny that exists, and up to that point, Geralt was someone who had an extremely hard time believing in Destiny, which we can notice mainly in the short-story "Something More" in the next book. So when we talk of the wish in terms of "bind their fates together", the only thing it could mean is to "bind their deaths together". For there is no bigger love proof in the world than to be willing to give your life for someone. Nothing is more significative before that than Yennefer's astoundment:

'Wait,' she whispered. 'That wish of yours . . . I heard what you wished for. I was astounded, simply astounded. I'd have expected anything but to . . . What made you do it, Geralt? Why . . . Why me?'

To which Geralt simply answers:

'Don't you know?'

Destiny is, by all means, the end. Destiny is not the beginning. Destiny is not the middle. Destiny isn't but the end. If Yennefer's end was to be in Rinde, by the hands of the Djinn, then by making his wish, Geralt established that his end would also be at that same moment, alongside her. And turns out that because Djinns cannot kill their masters, then that was not what the Djinn could fulfill. Therefore, if he could not fulfill Geralt's end, he would be necessarily forbidden of fulfilling Yennefer's end as well. So all he had left to do was to go away.
However, there is one huge implication in this that most people fail to notice and which is exactly what effectively binds their fates together: If Geralt's wish was not fulfilled, therefore the wish is still active, awaiting to be fulfilled! It's pure logic. The fact that the Djinn could not bind Geralt and Yennefer together in their death does not mean that their death should not be bound anymore, because Geralt didn't wish specifically for the Djinn to kill them, but to both of them die together. And it is this apparent contradiction which makes Yennefer skeptical about the mere possibility of such thing:

'Your wish,' she whispered, her lips very near his ear. 'I don't know whether such a wish can ever be fulfilled. I don't know whether there's such a Force in Nature that could fulfil such a wish. But if there is, then you've condemned yourself. Condemned yourself to me.'

NOW HEAVY SPOILERS FROM LADY OF THE LAKE BELOW, BE WARNED
But nothing is more fully meaningful that the saga ending is the full fulfilling of the last wish. And nothing else consolidates the saga as a brillant and masterful piece of literature and Sapkowski as a genius writer, because, as we can see, the end was in the beginning. Something ends, something begins.
TL;DR: Geralt was too much in love for Yennefer to leave her alone to die, so he just wished to die alongside her. But since Djinns cannot kill their master, he couldn't kill Yennefer as well, so he just ran away. Thus, since Geralt's wish was not fulfilled yet, they still will have to die together at some point. That's what "bind their fates together" is about, because fate ultimately means death.
Comment: The thing is, Geralt is still his master because the wish is yet to be fulfilled, so the Djinn was never set free.
Comment: Interesting... Although I am not sure could Geralt be still considered a genie's master after speaking the third wish (which set the genie free).
Comment: Except if this was actually his wish, they should have avoided each other ever after, rather than spending as much time together as they do following the wish.
Comment: Yeah I think it is interesting way of thinking. You sir made me think :)
Comment: This is nothing but speculation and also clearly wrong, since the djinn would be free and would leave as soon as Geralt made his third wish.
Answer: In The Witcher 3, Geralt tells Yen his wish was for them to always be together.
Answer: Sapkowski gives hints throughout the short story as to what the nature of the wish must have been, but it is never explicitly revealed:

'Genies,' Krepp turned up his nose, 'are spiteful and deceitful beings. They don't like being packed into bottles and ordered to move mountains. They do everything they possibly can to make it impossible for you to express your wishes and then they fulfil them in a way which is hard to control and foresee, sometimes literally, so you have to be careful what you say. To subjugate a genie you need a will of iron, nerves of steel, a strong Force and considerable abilities.

'[...] You've still got one last wish, haven't you? So make it. You'll free the djinn and then I'll bottle it.'
[...]
'No, Yennefer. I can't . . . The djinn might fulfil it, but it won't spare you. It'll kill you when it's free. It'll take its revenge on you . . . You won't manage to catch it and you won't manage to defend yourself against it. You're weakened, you can barely stand. You'll die, Yennefer.'

'But he's . . . 'he groaned suddenly, 'still got one wish in reserve! He could save both her and himself! Mr Krepp!'
'It's not that simple,' the priest pondered. 'But if . . . If he expressed the right wish ... If he somehow tied his fate to the fate . . . No, I don't think it would occur to him. And it's probably better that it doesn't.'

The djinn opened his mouth and stretched his paws towards her. The witcher suddenly understood what it was he wanted. And he made his wish.

'That wish of yours ... I heard what you wished for. I was astounded, simply astounded. I'd have expected anything but to . . . What made you do it, Geralt? Why . . . Why me?'
'Don't you know?'
She leant over him, touched him. He felt her hair, smelling of lilac and gooseberries, brush his face and he suddenly knew that he'd never forget that scent, that soft touch, knew that he'd never be able to compare it to any other scent or touch. Yennefer kissed him and he understood that he'd never desire any lips other than hers, so soft and moist, sweet with lipstick. shoulders and breasts freed from her black dress, her delicate, cool skin, which couldn't be compared to any other he had ever touched. He gazed into her violet eyes, the most beautiful eyes in the world, eyes which he feared would become . . .
Everything. He knew.
'Your wish,' she whispered, her lips very near his ear. 'I don't know whether such a wish can ever be fulfilled. I don't know whether there's such a Force in Nature that could fulfil such a wish. But if there is, then you've condemned yourself. Condemned yourself to me.'

Additionally we have this quote from Philippa Eilhart in Blood is Elves:

Your destiny is in [Yennefer's] hands, witcher. You placed it in those hands yourself.
Answer: I still can't reply/comment others, so this is an "answer" that actually comments the best voted ones.
I find if funnier to think about the phrasing of the wish, instead of just the overall idea, as it is kind of easier to just think about the meaning, while phrasing it can be tricky because it may allow the djinn to do what it really wants to by that moment: to kill both.
So it seems that the best options for Geralt are either binding their deaths together, or wishing something related to a child--because we know he had to find a way to bind his and Yennefer's fates together.
Someone said death is the final destiny. Well, having a child is also a way of binding two people's fates, isn't it?
In any circumstances, the witcher had to wish something as to necessarily bind their fates together, which by definition goes against his 'principle' of never imposing anything at other people, especially on women and especially on matters such as living with or loving him forever. Because he knew she would die otherwise, killed by the djinn, he had to overlook this principle of his at least this time. So, the critics against asking for a child as being something to be ousted because it would mean and imposition on her does not work, as the same critics would be necessarily valid against any other wish binding their fates together. There was no other way.
Let's say it was death then, something like "I wish us to die together". Ok, djinns can't kill their masters--but what if a master wishes the djinn to do so, or phrase their wish in a way that allows the djinn to do so? So this would be the case, a risky and tricky wish to do in such a situation where a djinn is slightly obsessed about destroying its goddamn master who told him to scram and fuck itself. Would you speak such a wish in such a situation and wait to see what would come of it?
Besides, because of other fragments of the story, I believe the wish was around a child. Something close to "I wish Yennefer to be the mother of my child". Please note I didn't word it like 'to bear my child', nor 'give birth', 'have my child' whatsoever--so the child could be someone other than a biological offspring. The child could be, say, a child of destiny who could become, not out of birth but rather out of parental relationship and love, their true child. Even if it was very unlikely for the witcher to think of such an outcome at that moment... You know who I'm talking of if you read the whole saga.
Anyhow, such a wish would oblige the djinn not to kill Yen, nor even allow her to die, which it fulfils by protecting them both from all the debris of the ruined house. And such a wish would beautifully fit with the whole mess that happens after that with the long saga with Ciri, and the way their bonds become so strongly linked together.
It would also be a witty wish to trick the djinn. Why? The witcher knew all too well that both witchers and sorcerers are sterile. By wishing something the djinn could not fulfil, at least not easily nor instantly, the witcher would at least buy themselves some time and at best get themselves rid of the raged djinn, saving both their arses on top of that.
What other possible clues are there? Well, Yen says she was 'completely astounded', yet she's not someone to be easily astounded. What would be more surprising? To wish for them to die together, or to wish the sterile sorceress to be the mother of his child? Even the fact and the precise moment Geralt realises she was a hunchback also may give some clue on this, because he could have realised it earlier in the story, but it only happens at that critical fight against the djinn and is likely related to his final decision on what wish to make. By realising she was a hunchback, one could think of her having a child to compensate her surely difficult childhood or something alike, but what would this hunchback thing have to do with wishing to die together? I can't think of any possible connections to understand why the author would put this hunchback element in that critical moment if not for bringing a reference to childhood...
'Why me?' and 'I don't know whether such a wish can ever be fulfilled. I don't know whether there's such a Force in Nature that could fulfil such a wish. But if there is, then you've condemned yourself. Condemned yourself to me', are both comments that would work well with a wish of being the mother of a child, just as much as they would with a wish binding their demises. Right?
Now, if the wish was for them to die together, how come an intelligent lady would find it hard to imagine if 'such a wish can ever be fulfilled'? The djinn could allow them to die together just by waiting for time to take its toll and arrange for it to happen as so for them to die together whilst avoiding to force the death of its master. But to make a couple of steriles have a child? Well, that could be harder, because it's against nature, and death, you know, is just part of nature and happens to all of us, sooner or later.
So, here goes nothing. I think his last wish was for her to be the mother of his child, and that's that. :)
Answer: I think the last wish was simply for Geralt and Yennefer to 'always be together', for then the Djinn couldn't kill Yen separately from Geralt. This protects her from the Djinn and also binds their fates together.
Comment: Why do you think this? Can you provide any sort of reasoning?
Answer: The Djinn would have killed her shorty after being set free. Although the author does not disclose it, but you may assume it was something like "Be gone and let her live." Also a it bound their fates together, so I think a wish for mutual love was involved.
Comment: Hi fgt, welcome to the site. This answer could be improved by providing quotes from the books that support your assumption. You also may want to take the tour: https://scifi.stackexchange.com/tour


Identity matrix over $\Bbb{Z}_2$

Question: $\Bbb Z_2 = \{1, 0\}.$
I've been told there's only one Identity matrix over all fields except $\Bbb Z_2$, in which there could be more than one.
Could anyone give an example of an Identity matrix over $\Bbb Z_2$ which isn't the standard identity matrix?
Answer: I think you've been told wrong. It's a very standard theorem of abstract algebra that should an identity exists, it is unique. Suppose there exist two different identities for your monoid/group/etc for a given operator, you can show that they are necessarily equal.
Comment: But are there 2 equal matrixes (with different numbers) over Z2?
Comment: If two matrices are equal, they don't have "different numbers". The way you write the numbers down isn't the same thing as the number represented by that symbol. The abstract object, even if it can be written down in different ways, is unique. Check out my answer here for a longer explanation: https://math.stackexchange.com/questions/4074774/why-do-you-we-say-a-is-congruent-to-b-mod-n-and-not-equal/4074831#4074831 , and don't hesitate to ask another question if you still have doubts afterwards.
Answer: Given any set $S$ with a binary operation $\cdot$, there is at most one identity element. ($(S, \cdot)$ needn't be a group. The operation needn't even be associative!)
Indeed, suppose $1$ and $1'$ are identity elements, then $$1 = 1 \cdot 1' = 1',$$
where the left (resp., right) equality uses the fact that $1'$ (resp., $1$) is an identity.

So this means that there is only one identity matrix of size $n \times n$, which is the familiar one.
(By "an identity matrix", I assume you are talking about an $n \times n$ matrix $I_n$ over $\Bbb Z_2$ such that $I_n M = M = M I_n$ for all $n \times n$ matrices $M$ over $\Bbb Z_2$.)

One possible interpretation could be the fact that $-I_n$ is "also" an identity matrix but that is not saying much because the equality $1 = -1$ holds in the field $\Bbb Z_2$.

Identity matrix over $\Bbb{Z}_2$


Checkin staffs at airport were unable to print my boarding pass

Question: I was travelling to Melbourne (MEL) fron Dhaka (DAC) by Malysian Airlines couple of weeks ago. Everything was ok on our side. At check-in counter they were unable to print my boarding pass. They told me its just not there and I can't go. Then I talked with their supervisor and asked for an explanation. At first he was unable to answer any of my questions. He then started making phone calls to their office. After half an hour later he asked me for my old passports. Which was already there anyway. Then they printed my boarding pass and let me go. Both sides immigration and customs were swift. Nobody asked anything special. Never had this kind of problem before. Now I'm wondering what was the actual problem.
Comment: Did you change your passport details after you've applied for an Australian visa and not transferred your visa to the new passport? You may have failed the [Advance Passenger Processing](https://www.abf.gov.au/entering-and-leaving-australia/crossing-the-border/passenger-movement/advance-passenger-processing) check.
Comment: How long before travelling had you booked? Did you book direct or via an agent?
Comment: Was your name spelt identically on your new and old passports?
Comment: 2 weeks before travelling via an agent.
Comment: No, all information is same in new and old passports.
Comment: No passport details was changed any time before or after the visa was issued. Current passport still got three years of validity.  As I've told earlier, never had this sort of trouble before. I've been travelling to Australia 1-2 times a year for last 17 years. It was one hell of a experience.
Answer: While we can never be sure of the exact cause, the issue appears to be related to a failure of the Advance Passenger Processing (APP) system.
All airlines flying to Australia are required by the Australian Government to check all passengers' immigration status at check-in using the APP system.  The check-in agent submits your passport details to the APP system.  The system then checks, among other things, whether a valid visa has been linked to that passport, and returns a Board/Do Not Board response.
It would appear that initially the system returned a Do Not Board response when you were attempting to check in.  This is why a boarding pass cannot be issued.  Normally this is due to the passenger not having a valid visa, or forgetting to transfer the visa across to a new passport when it was renewed.  However, based on your comments, it is possible that an IT issue resulted in a Do Not Board response.
Whenever there is an issue with the APP check, the airline can contact the Border Operations Centre help desk in Australia for help.  This appears to be what happened: they were able to resolve the issue, scanned your passport again, received a OK to Board response from the system, and print your boarding pass accordingly.


H4 visa expiring in a month. Can I travel to the USA?

Question: I am on an H4 visa, and currently in India. My visa is expiring on 25 Oct. I need to travel on 1 Oct. Will there be any issue travelling, as my visa is about to expire?
Answer: The visa's expiration date is just the last day on which you can use the visa to enter. So you can use this visa to enter up to and including on Oct 25.
However, when you are admitted, you will be admitted until the expiry of the H1b petition of the H1b visa holder (the one your H4 is dependent on). Your visa's expiration date probably matches the expiration of the original H1b petition, which means the original H1b petition is expiring soon and the H1b visa holder's company has probably applied for an extension if eligible. If an H1b petition extension has already been approved, you should bring a copy of that petition approval with you when you enter and you will be admitted until the expiration of that new petition. If the extension is only pending or not yet filed, you will be admitted for the short time until the original petition expiration, and then you will have to apply for extension of status once inside the US if you want to stay for longer.