How does steppenwolf planet generates typhoon?

Question: In a distant future, a spaceship was investigating a gravitational anomaly somewhere within a chartered sector in the Andromeda galaxy. A disaster strikes and the spaceship was found marooned on a nomad planet, there is nothing else except the rogue planet and plasma cloud drifting through space. How do I explains the typhoon wind speed hitting 500km/hr on the steppenwolf planet? The planet is twice the mass of Earth but only have a weak magnetosphere whereby the strength is estimated to be about a third of Earth's? Complement question: establish a connection between the plasma cloud in space and the storm on the planet (assuming both phenomenons aren't of alien origin).
Comment: Can the spaceship have a currently operational force-shield? (I know that the question is not about the ship, but it matters)
Comment: @Agrajag: the force-shield integrity is currently at 30% of maximum output, and falling.
Answer: The planet has massive content of radiocative elements in the rocks. The heat generated by the radioactive decay and the large temperature differential due to the lack of a  star power the winds. As a side effect, the intense volcanism ejects into space radioactive dust, which decaying with alpha and beta particles supply the plasma cloud of it constituents.
Answer: Katabatic wind.
Besides planet and plasma, you have a third player.
/a spaceship was investigating a gravitational anomaly/
Your anomaly can produce winds: on earth these are called fall winds (the wind is falling due to gravity) or katabatic wind

A katabatic wind (named from the Greek word κατάβασις katabasis,
  meaning "descending") is the technical name for a drainage wind, a
  wind that carries high-density air from a higher elevation down a
  slope under the force of gravity. Such winds are sometimes also called
  fall winds.... Katabatic winds can rush down elevated slopes at
  hurricane speeds, but most are not as intense as that, and many are of
  the order of 10 knots (18 km/h) or less.

Your planet eccentrically orbits the gravitational anomaly - maybe it is the same thing as the plasma cloud, with an unaccountably dense plasma?  It is a highly eccentric orbit, and on close approach the anomaly augments the gravity of the planet, producing these periodic hurricane katabatic winds.
Or if you have other things in mind for the anomaly, ok.  Do it the way it happens on Earth in the antarctic.  In the antarctic, these winds are produced by increased radiational cooling at elevation.  The colder denser air falls down the mountain.  You have wind, so you have gas, so your atmosphere is not all frozen, so your planet must be heated somehow.  But I have to think a planet without a star will have some unusual heating going on and it will not be hard for you to explain how at night, gas which has gotten hot during the day and gone up gets very very cold and comes roaring back down.


Combining multiple rows into one entity in Entity Framework 4.1

Question: I've been trying to grow my EF understanding from just querying tables to creating Entities that match my business objects so I can code against my business objects rather than my data objects.  I read articles that suggest this is possible, but all of their examples are rather trivial and involve just combining two tables.  My situation is a little more complicated and I'm not sure how to proceed.
I have two tables (simplified below)
CREATE TABLE [dbo].[BarEvents]
(
[BarGUID]       UNIQUEIDENTIFIER NOT NULL DEFAULT NEWSEQUENTIALID(),
[Bar]               INT              NULL
)

CREATE TABLE [dbo].[BarLog]
(
[BarGUID] UNIQUEIDENTIFIER NOT NULL,
[BarLogGUID] UNIQUEIDENTIFIER NOT NULL DEFAULT NEWSEQUENTIALID(),
[BarEventTime] DATETIME NOT NULL DEFAULT GETUTCDATE()
)

So if I join these tables, for a specific BarGUID, so if I had 1 Bar and 4 bar events logged, I'd have 4 rows, but what I want is just the most recent BarEventTime.  So I would like to join and have just one row:
I can do this trivially in EF:
var query = barEntities.BarEvents.Where( q=> q.BarGUID = '0000-0000-0000-0000')
    .Select(barEvent =>
    new LogItem()
    {
        Bar = barEvent.Bar,
        BarEventTime =     barEvent.BarLog.Max(u => u.BarEventTime)
    });

But from what I've read, I should be able to define a LogItem entity, and place this logic somehow in my LogItem entity, then write queries against that.  My problem is I only see trivial join conditions when I'm trying to join my tables in the entity definitions.  Is there a way to do this?  Or a guide?
Any help would be appreciated.
Thank you.
Answer: Why don't you do the following:

Create a SQL View in the Database that does what you want
Add the view to your EF Context
Use the newly created entity that is based on the view
Comment: That is one option.  I could also write a sproc to do this for me and then use the sproc in EF.  Or just stick with my current query.  I guess I had just hoped there was a way to accomplish this within the entity definition itself. EDIT: to clarify, our DBAs are locking down everything sql server side more every day, so avoiding sprocs/views was part of my goal in swapping to EF.


What can I do about high pressure water noise?

Question: I have for many years had loud noise that sounds like high pressure water rushing through the pipes. This happens whenever water is turned on in our villa and the duplex next door. The pressure outside our home is 92psi and inside 88psi. Plumbers have tried to fix this problem many times but now the pressure is higher and the noise louder. This has become very distressing and we need help. We live in a retirement village and the manager has refused to try and fix the problem any more. Please help us.
Comment: Well, what are allowed to do? If it's water hammer, you could install air traps all over the place Do you have access to the shutoff valve? Usually you can close it more to reduce pressure (looks like what your hose connects to usually and it works the same). And it is on a lot of water appliances I guess? Turn those down too. Do you have any pipes not firmly fixed to the walls/floors/ceilings?
Answer: Your water pressure is very high - nearly double the average pressure.
The solution is very simple - install a pressure-reducing valve in the water main just after the meter and main shutoff valve. The valves are in the $100-$200 range from any commercial plumbing supplier (Home Depot probably doesn't have them).
However, this involves modifying the house utilities and is therefore definitely in the owner's domain. Both you and the neighbor will likely have to approach him together, unless you can do the job yourself without anyone noticing.
Comment: Home Depot; and likely other big box stores, sell [pressure reducing valves](http://www.homedepot.com/p/Watts-3-4-in-Brass-FPT-x-FPT-Pressure-Reducing-Valve-3-4-LF25AUB-Z3/202922385).
Answer: Shrieking, shaking & rattling pipes & walls, is a very simple fix. It's actually a harmonic imbalance & quite common, though most plumbers don't know about it & try to fool around with the faucets.
Just turn your faucet on fully & then go beneath & slowly turn down the shut-off valve until everything settles down. Do this with the cold water & the hot water separately. You're just capping off the flow & shouldn't notice any flow difference. Some faucets just have a design that's not agreeable & can be quieted down beautifully.


Schengen Tourism Visa Field 20 "Residence in a country other than the country of current nationality"

Question: I am South African, currently living in the United States, working on my F-1 student visa (first year on OPT). I am applying for a Schengen Tourism Visa and I am not sure what to say for part 20, "Residence in a country other than the country of current nationality." Do I tick no or yes? If yes, I am not sure how to fill in the blanks: "Residence permit or equivalent (1)____ No. (2)____ Valid until (3)____" Will I be inputing the details from my F-1 visa? In other words (1) F-1 visa, (2) number in red on my visa and (3) expiry date? Thanks for you help!
Answer:
Do I tick no or yes?

Your residence is in a country other than the country of which you are a citizen.
Therefore, you should tick yes.

If yes, I am not sure how to fill in the blanks: "Residence permit or equivalent (1)____ No. (2)____ Valid until (3)____" Will I be inputing the details from my F-1 visa?

You should read and follow any instructions given by the embassy responsible for your visa application.  For example, if you are applying in New York for a visa to go to Italy:

If you are not a U.S. citizen and you need to apply for a visa, you must provide a copy of the title that allows you to reside legally in the U.S. (U.S. long term visa with exclusion of B1/B2, U.S. permanent resident card, I-20, I-797, resident alien card). The title must have a validity of at least 3 months beyond the last day of your trip in the Schengen Area.

This doesn't much help, unfortunately.  If I were you, and if the country you're applying to is similarly unhelpful, I would put the visa details and the I-20 details, just to be safe.  I would probably also include details of the I-94, just to be safe.
Comment: I'm not sure it's quite this simple.  A F-1 visa holder is considered a NON-Resident Alien by the US for their first 5 years. Only after that time are they considered a Resident Alien. However by other definitions the OP would indeed be a resident.
Comment: @Doc residence for income tax status is irrelevant to the Schengen requirement to apply in the consulate responsible for the place of residence, as it is irrelevant to every purpose other than US income taxation.


Simple interrupted time series analysis

Question: I have a weekly time series representing costs for a cohort. I want to tell whether an intervention on the cohort (we can assume it happened in a single week) has decreased costs for the cohort. I happen to know that the trend over this period for the population from which this cohort was taken was -120 per week per week.
My initial thought was simply to do a linear regression lm(Costs~Weeks,offset=-120*Weeks) but (obviously) the significance is not only a function of the effect of the intervention but also how far back I look (if I look back to $-\infty$ it will of course appear non-significant).
I looked at this website: http://www.r-bloggers.com/time-series-intervention-analysis-wih-r-and-sas/ and tried to replicate the R code with my data, but when I enter the arimax() command, I got the error message
Error in stats:::arima(x=x,order=order,seasonal=seasonal,fixed=par[1:narma], : wrong length for 'fixed'

Now, I'm not sure what to do. Can anyone give me some guidance?
Answer: here's the arima function in R.
http://svn.r-project.org/R/trunk/src/library/stats/R/arima.R
snippet you might be interested in:
if (is.null(fixed)) fixed <- rep(NA_real_, narma + ncxreg)
else if(length(fixed) != narma + ncxreg) stop("wrong length for 'fixed'")
mask <- is.na(fixed)
no.optim <- !any(mask)
if(no.optim) transform.pars <- FALSE
if(transform.pars) {
    ind <- arma[1L] + arma[2L] + seq_len(arma[3L])
    if (any(!mask[seq_len(arma[1L])]) || any(!mask[ind])) {
        warning("some AR parameters were fixed: setting transform.pars = FALSE")
        transform.pars <- FALSE
    }
}

Simple interrupted time series analysis


Does etherum support smart contrast that has many subcontracts that can be executed once they are called by others

Question: Can I have a main smart contrast that has many subcontracts that can be executed once they are called by other people? And the subcontracts can update the status of the main one if some conditions are satisfied?
Answer: I'm not quite sure what you mean by "subcontracts".
A contract can call functions on other contracts, so you can create the "subcontracts" and call their functions from the main contract, and return data if needed. The contracts that you call can also call back into the main contract to change things, and you can add any access control you'd like to this so only the "subcontracts" can update the main contracts state.
Comment: Assume u have a contract that contain list of sellers. Inside this contract, we need to have another child contract that can be initialized with deposit payment from buyers and another function that validate whether the sellers provide an accurate preimage of a certain hash value. If okay, sellers will have the buyers deposit. And the number of payments of the seller can be increased in the main contact.


Today's event component on partner community page

Question: I am trying to include the Standard component to show today's events on partner community home page [Partner Central Template]. Is it possible to get that?
Answer: From what I can see in my DE, it does not look like to be available for Community Home Page. Also refer to this excerpt from the documentation for standard components, which says that not all components may be available for all page types.

The Components panel lists only components that are compatible with the selected page.

You have options of either creating a custom component and adding it to your community home page or you can take a look at this appexchange product, which looks like can solve your use case.


Dimensional equation for measuring logarithm of volume

Question: I have a measure that uses radiation dose (M.U. $Gray$) and $\log(Volume)$. The measure is $[\frac{Dose}{\log(Volume)}]$ that is $[\frac{D}{\log(l^3)}]$ with $D$ as radiation dose (M.U. unit is Gray) and $l$ is length (M.U. in international measure units is meter). What is the correct measure unit for this kind of measure after the following steps $[\frac{D}{\log(l^3)}]\Leftrightarrow [\frac{D}{3\log(l)}]\Rightarrow [\frac{D}{\log(l)}]$ that is, what is the transformation of logarithm of length $\log(l)$?
Comment: Logarithms only make sense on dimensionless quantities. Usually there is an implied unit, in this case $\text{m}^3$.
Comment: Possible duplicates: http://physics.stackexchange.com/q/13060/2451 , http://physics.stackexchange.com/q/109995/2451 and links therein.
Answer: You cannot meaningfully evaluate the logarithm of a dimensionful number. The reason for this should become clear if you attempt to series expand a logarithm with a dimensionful argument.
The usual way to get around this is to write something like:
$$\frac{\frac{D}{1\,{\rm Gray}}}{\log_{10}(\frac{V}{{1\,\rm cm}^3})} = 1.23$$
Some people prefer to omit the $1$'s, but this is a matter of style. Either way, it makes the dimensions of all relevant quantities clear.
Answer: You have to take the log of a dimensionless quantity. I assume you have a model for the relationhship between $D$ and $V$ that looks like $D=m \log V + b$, but since you can only take the log of a dimensionless quantity, this should really be $D=m \log \left(V/V_0\right) + b$. Typically $V_0$ is just $1$ in some choice of units, so for example, $V_0 =  1 m^3$ or $V_0 =  1 cm^3$. Notice that a change in $V_0$ just shifts the log by a constant so it will not affect the value of $m$, only the value of $b$. Thus your value for $m$ does not care about the units of $V$, and it will only contain Grays. So the units for $m$ is Gray.
However, this is not quite the whole story. The value for $m$ will depend on what the base of the logarithm is: if you take the natural log, you will get a different number for $m$ than if you take the base ten log. Therefore it makes sense to indicate the choice that was made when you give a value for $m$. So you could say that $m$ is $5$ Gray/decade of volume, or $1.5$ Gray/octave of volume. But technically, the number of decades is dimensionless because it is just a number, so you do get that the units for $m$ are Grays.


VM in-guest SMB and NFS mounts

Question: This may be more of a physiological question but I am curious what other storage administrators think, and what they are doing at their companies.  I am in a new environment where NFS is the standard storage protocol for VMware.  Nothing wrong with this IMO, as this is a VMware endorsed way of presenting storage to ESX hosts.  My question is about further presenting storage via NFS/SMB mounting in the guest.  It seems to be a huge thing in the environment I am in, as well as in-guest iSCSI. I have always presented storage to ESX, either through FC, iSCSI, or NFS, and let it dole out the storage through datastores. This feels more clean and less complex to me as you aren't mixing and matching storage access. Most VM storage is presented as datastores, but the larger systems (>2TB) have large NFS/SMB mounts to other NAS storage outside of VMware datastores here, which are serving up data to the app the VM is running. Does anyone here present storage this way? I just want to see if anyone has an opinion on this based on their past or present experiences.
Answer: In terms of manageability, it's obviously better to consolidate all external storage devices under single (or multiple if we are talking HA) "head" server.
Direct "NAS to Client" storage provisioning can be considered for small-sized deployments. For example, you can provision SMB shares from your local QNAP box to your office workstations and it's totally fine.
Provisioning NFS shares directly to the virtual machine may not be the best approach in your case. Instead of having one "entry point" which is your ESXi host or HA Cluster, you will get two.
I would recommend you presenting the external NAS to your ESXi as NFS datastore and provisioning storage for your VMs as .vmdk drives instead of creating shares.

VM in-guest SMB and NFS mounts


Silverlight Navigation using Mvvm-light(oobe)+MEF?

Question: What is the best approach for navigating between UserControls/Pages(out of browser experience)?  I'm fairly new to Silverlight and even newer to the mvvm pattern.
How well does the Navigation Framework Integrate with the MVVM Light Toolkit?  A snippet for general application flow control with the two would be great.
The plan was to use the Navigation Framework for general flow or using Jeremy Likeness's approach to region management(http://csharperimage.jeremylikness.com/search/label/regions) and swapping out regions as needed.  I've seen a few places mention replacing the Visual Root, but that sounded like a hack to me.
Any advice, snippets, or a nudge in the general direction would be greatly appreciated.
Thank you.
Comment: good luck :P Navigation API ain't MVVM friendly at all :/
Answer: You may find the following post useful:
SL4 Navigation Template with MVVM Light
Answer: I'm struggling with the same thing, However, I am kinda steered away from the "NavigationService" because allegedly the journal keeps the object reference in memory or something I read somewhere.
I've been trying to utilize a frame in the main window, and using mvvm light to send navigation messages to the window to change the frame.
Edit: I figured it out.
In the main window (code behind, not viewmodel) I added a Messenger.Default.Register(Of NotificationMessage(Of NavMsg))...
Then in ANY view model I do a Messenger.Default.Send(Of Notificationmessage(Of NavMsg))...
And then I created a NavMsg class which accepts a string uri or an object to navigate to.
Here's some T4 code templates to generate you the code for your view/viewmodel to work with mvvmlight and it demonstrated the closing window message above. http://dl.activeaspsoftware.net/dl.aspx?f=MvvmLightCodeTemplates.zip
Comment: Excellent I'm hoping to slice off some time today or tomorrow to take a look.  By the way nice multi-touch table:)
Answer: I had the same problem and found this link (applies to Silverlight too):
Windows Phone 7 — Navigation between pages using MVVM Light Messaging


How can I transfer my money between US/Canada bank accounts with as little loss as possible?

Question: I am currently living in Canada and have funds in a savings account with a Canadian bank. Say I decide to move back to the US, how could I move those funds to a US bank account with as little loss as possible? Is this kind of transfer taxable? FWIW I am a US citizen.
Comment: What currencies are involved. Are you starting with CAD in Canada, and hoping to end up with USD in the US?
Comment: I would recommend TD's cross border banking. Their websites are god awful, but they let you wire money across the border in USD, without wire fees or forced conversion
Comment: The usual answer for USD / CAD is Norbert's gambit.
Answer: My solution when I lived in Singapore was to open an account with HSBC, who at the time also had branches in the US.
When I was home, I used the same debit card, and the bank only charged a nominal currency exchange fee (since it never had to leave their system, it was lower than had it left their system).
Another option, though slightly more costly, is to use Paypal.
A third option is to cash-out in CAD and convert to USD at a "large" institution - the larger your deposit/conversion balance, the better the rate you can get.
To the best of my knowledge, this shouldn't be taxable - presuming you've paid the taxes on it to start with, and you've been filing your IRS returns every year you've been in Canada.
Answer: Hands down, the BEST absolute way is Transferwise.
Google "100 USD to CAD" or the reverse. This will give you the actual, universal exchange rate at the moment.
Now go to transferwise to initiate a transfer. The will use this EXACT rate and only add a very small fee from $3-$5 for ACH, Wire, etc..
If you used a bank, they would charge a percentage based on their exchange rate. You will pay about 4-6%. So a $500 transfer just cost you $20-$30 or MORE. Also if you have a "US Bank Account" with a Canadian bank, you still pay the inflated transfer fee and don't get the universal rate. Debit card use has a fee and a terrible exchange rate.
Transferwise is a revolutionary service and I can assure you there's no cheaper way to transfer. I'm a huge fan!
Comment: Transferwise is an ok service, but other similar services like OFX and XE Trade are cheaper.
Comment: So you have experience with these services, yes?

Can you provide actual transfer rates, vs actual listed exchange rate for OFX and XE where you've transfered USD to CAD?  OFX and XE will not give a rate without signing up but I'm readying fees for OFX in the $10-15 range, 2-3x of Transferwise. And XE hides the rate in the exchange rate.  For instance a 1.29 rate vs. 1.3 rate a difference of .01 on a $500 transfer will already cost me $5.   Transferwise, without registration already tells me, today it's gonna cost me $4.72 to transfer, which is a deal they likely won't match.
Comment: I've posted a comparison in other answers. Transferwise also hides a fee in the exchange rate, but, more deceptively, introduces a fee in the final step whereas XE and OFX do not. Without the fee, Transferwise is the cheapest of the three. With the fee, it is the most expensive. Other users have recently suggested Revolut where it is available or just plain wire transfers in the source currency (I.e. Not letting the sending bank convert) can be extremely close to the spot exchange rate, much better than any of these three services.
Answer: Personally, I've used OFX (previous named USForex/CanadianForex) in the past to move money from USD to CAD. This was on multiple occasions and I had no hassle each time. The amount ranged from about $100USD to upwards of $3500USD. Once you have all the banking information set up correctly in their system and you initiate the transfer, they'll call to confirm the numbers/details so that the transfer can be approved. Typically about a week to transfer everything across and I believe it was a few dollars in fees each time.
I've responded to a similar question about going from CAD to USD (linked here), so I won't copy/paste the same pros/cons list. The only thing to add is this was about a year ago, so I can't affirm that everything is just as simple as when I used it.
Another option that may be cheaper, or at least faster, would be to go through cryptocurrency exchanging. If this isn't something you've done before, it's probably not a viable option due to learning/overhead involved. This may also require multiple steps if the service doesn't let you cash in via CAD and cash out via USD. Plus, it could cause some confusion with taxes since it'd be the same as buying property in CAD and selling it in USD (legally, that's how the government sees it). Again, I'd advise against this if you're not experienced with it.


news functionality in mediaWiki?

Question: i need to add the "add news functionality" to my mediaWiki, where admin AND users will be able to add the news is there any extension to do that? or can someone please help me do that?
i am using mediaWiki 1.16
please help
Answer: You might want to have a look at the News extension : http://www.mediawiki.org/wiki/Extension:News
You will then be able to show news by selecting articles part of a given category :)
Comment: ...or even create a custom namespace like "News:" and only show new pages in that namespace.

news functionality in mediaWiki?


Phagocytosis and bacteria

Question: Invading Bacteria are phagocytosed by phagocytes. Phagocytes are specialised white cells. But, if a non-phagocyte cells are infected with bacteria how those cells handle this situation? Do they succumb to the bacteria?
Answer: For cells to become infected with bacteria, some bacteria will still be present in the blood. These are still engulfed by phagocytes in the same fashion. However once engulfed the antigens on the surface of the Bacteria are placed on the surface of the phagocyte, this is known as an antigen presenting cell (APC). Specialized lymphocytes known as Th Cells bind to these antigens and then divide. These then stimulate Cytotoxic T cells which secrete a chemical known as perforin. The perforin makes holes on the membrane of 'non-phagocyte' infected cells allowing water to enter. This essentially causes the cell and the bacteria to explode, known as cell lysis.
So basically the infected cell is simply destroyed unless hydrolytic enzymes break down the Bacteria.

Phagocytosis and bacteria


Closed form for Chu–Vandermonde identity-like summations

Question: I have been trying to analyze a randomized algorithm I cooked up and have found the need to compute some moments of a random variable modeling an aspect of the algorithm but I am unsure if there is a nice closed form. Suppose the random variable in question is $X$ and it can take a value $i \in \lbrace 0, 1, \cdots, k \rbrace$ with probability
$$\text{Pr}\lbrace X = i \rbrace = \binom{n}{k}^{-1}\binom{M}{i}\binom{n-M}{k-i}$$
where $n \geq M \geq 1$ and $n \geq k \geq 1$. Note that I assume that $\binom{a}{b} = 0$ if $a < b$ since there are $0$ ways to choose size $b$ sets out of a size $a$ set when this inequality holds. It is clear by the Chu-Vandermonde identity that indeed these values are probabilities because
$$\sum_{i=0}^{k} \text{Pr}\lbrace X = i \rbrace = \binom{n}{k}^{-1} \sum_{i=0}^k \binom{M}{i}\binom{n-M}{k-i} = 1$$
The first moment of $X$, namely its expectation, can be computed analytically as
\begin{align}
\mathbb{E}(X) &= \sum_{i=0}^k i \text{Pr}\lbrace X = i \rbrace \\
&= \binom{n}{k}^{-1} \sum_{i=1}^k i \binom{M}{i}\binom{n-M}{k-i} \\
&= M \binom{n}{k}^{-1} \sum_{i=1}^k \binom{M-1}{i-1}\binom{(n-1)-(M-1)}{(k-1)-(i-1)} \\
&= M \binom{n}{k}^{-1} \binom{n-1}{k-1} \\
&= \frac{Mk}{n}
\end{align}
I also need to compute $\mathbb{E}(X^2)$ so I can do a variance calculation but I am not sure how to go about it. One can find a loose upper bound of $Mk^2/n$ but at least empirically, it seems for the valid ranges of $k$, the upper bound can at least be made to be $Mk^{3/2}/n$. If I could find an exact expression to this moment, I would feel a lot better of where I might be able to go with this algorithm.
So does anyone recognize this probability distribution and have insight into the desired moment I want to compute?
Answer: I did some digging and found the probability distribution I was looking for was the Hypergeometric distribution. This gave me all the information I needed to finish the analysis of my randomized algorithm!


Error in Exposed Filter with AJAX in Drupal View

Question: I'm receiving an error when i try to filter a Drupal view using a regular exposed filter with AJAX(autosubmit).
<code>An error occured while attempting to process /views/ajax:
Object [object Window] has no method 'indexOf'
</code>
This is what i've done:

Clear all the cache, run cron and update.php
Views, ctools and drupal core were out-of-date, so i update them and run update.php
Check that the view had Ajax enabled.
Test if using Better Exposed Filters worked, din't work.
Install JQuery Update module and enable it, din't work either.
Create another exposed filters(by date, type, title) same error.

Something important to mention is that the filters works in the View Preview.
The view is very simple, the only thing it does is show a list of events (event content type) and i want to filter the content by the restaurant (wich is a select list of the content type) and that error is been shown.
This is the spects:

Drupal Core: 7.19
Views Module: 7.x-3.5
PHP Version: 5.3.18
Apache2.2.22
MySQL 5.1.66
Using Acquia Dev Desktop stack on Windows.

Thanks in advance
This is the result code when i export the view:
File Code, Click Here
Comment: Could you export your view and paste the code please?
Comment: Hi DnBase, i put the code here https://www.dropbox.com/s/f6sexqb896vm87p/Exported_View.php , thanks in advance
Answer: Try to enable clean URLS. This worked with me.


What causes a partial blackout?

Question: Last night, my neighborhood had a blackout, but for some reason, only half of the electrical circuits in my house went out. I was under the impression that there was only one main electrical feed going into a house. Can someone please explain how this works?
Answer: Check out this post:  http://www.homekb.com/Uwe/Forum.aspx/repair/35373/Service-Entry-Cable-caused-partial-blackout-in-my-house

Your house is fed with two legs at 120
  volts each.  If you look inside your
  breaker box, you see three big wires
  coming in, red, black, white.  The red
  and black are legs of 120V, the white
  is the neutral.  Half your circuits
  are on one leg, half on the other.  A
  220V is on both.   The power company
  lost one of the legs and so did you.

Looks like what happened to you.
Comment: That's baaad. I lost the electronics in a clothes dryer and had a couple of surge protectors literally smoke when that happened to me. I recommend when that happens to shut off your breakers until it's corrected.
Comment: @Dennis : unfortunately when I had it happen last year it was 4 days, and we had already had 2 days of outages.  So I ran the fridge, as I had power ... but you're right, anything 220V was down (stove, clothese dryer, etc)

What causes a partial blackout?


How to use an array that is created in one class in a second class?

Question: I have created an array in the implementation of my class loginController. Now I want to use this array (with its objects) in another class of my project. What is the right way to import it?
Answer: You really need to specify the language.
In general, if the array is a member variable in one class, it's considered bad form to directly use it from another class. This violates the "encapsulation" idea that is quite the thing in object-oriented programming.
The preferred thing to do is often to add methods, called "getters" and "setters", to the class owning the array, or make it available by some other more structural means, which depend on the exact semantics and usage of the array. It might, for instance, not be required that outside users even know that it is an array.
Answer: There is no right way given this information. What is located in the array, only integers or strings/objects etc. Do you store objects of pointers to objects?
Passing the array is the sameway as passing any other object to a function
Answer: The general answer would be: declare it as public
It is not very good thing to do but as a beginner, you can start with that.


I can't load remix neither in the browser nor on my local computer!

Question: I get this error: Worker error: Uncaught SyntaxError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL 'undefined/soljson-v0.8.7+commit.e28d00a7.js' is invalid.
Zoom outZoom in
And for some reason, remix won't load at all on my local conputer!
Answer: Thats wierd.
You should report it to the community, they'll definitely gonna help you IA
Remix Communities https://remix-ide.readthedocs.io/en/latest/community.html


Jordan Canonical Form of complicated Matrix

Question: $$B:=        \left[ \begin{matrix}
        -1 & 9 &0 &0 &0 \\
        0 & -1 & 0 & 0 & 0 \\
        0&3&-1&0&0 \\         0 & 1 & 1 & 1 & 0 \\
        0&-2&-2&0&1 \\
        \end{matrix}\right]$$
 How do I find the Jordan Canonical Form of $B$? Also, I was wondering if there was any way to compute a formula for $B^n$ far all integers $n\geq5$? Or if thats not possible here?
Comment: For computing the Jordan Canonical Form, there is a standard, algorithmic approach. Once you've got this form though, you can express the matrix as $B = SJS^{-1}$ where J denotes the form. Exponentiating is easy, as the inside copies of $S$ and $S^{-1}$ will cancel out.
Answer: Find the eigenvalues first. There are two different eigenvalues: $\lambda=-1$ with algebraic multiplicity 3, and $ \lambda=1$ with algebraic multiplicity 2.
When $\lambda=-1$, two eigenvectors can be found (aka geometric multiplicity=2) using $A-\lambda I=0$. Notice the algebraic multiplicity (3) exceeds geometric multiplicty (2) by 1 for this eigenvalue.
When $\lambda=1$, two eigenvectors can be found (aka geometric multiplicity=2) using $A-\lambda I=0$.
Thus the Jordan Canonical Form of B is:
$$\begin{bmatrix}-1&1&0&0&0\\0&-1&0&0&0\\0&0&-1&0&0\\0&0&0&1&0\\0&0&0&0&1\end{bmatrix}$$
Make sure to double check the calculations.
Comment: this is great. How'd you find the determinate of the 5x5  matrix with the diagonals having the eigenvalues though? I'm stuck at that part
Comment: @user316861 Do you mean the determinant of your initial matrix $B$?


LatexIt alternative for Windows

Question: I use a program in MacOS called latexit to create small pdf files of math text, that I can then put on presentations or open in Illustrator to modify. Is there a program that does this for Windows?
Answer: There's a great thread over at StackOverflow with tons of Windows LaTeX editors.
Comment: Said "great thread" has been deleted.  :(
Answer: There are three alternatives to LaTexIt that I've found:

Laeqed - works well, no drag and drop, though
KLatexFormula - has drag and drop, but tiny GUI text
LatexEqEdit - have not tried

LatexIt alternative for Windows


Is there python packages for training loglinear model?

Question: Does anyone know if there is any existing package in python to train loglinear model? I have a dataset with 2000 variables and 1000 records.  I am looking to use loglinear model to estimate frequencies.
Answer: If you use an old version of SciPy (namely 0.10 or before), you can use scipy.maxentropy (in NLP, MaxEnt = Maximum Entropy Modeling = Log-Linear models). The module got removed it from SciPy when version 0.11.0 got released, the SciPy team then advised to use sklearn.linear_model.LogisticRegression as a replacement (note that both log-linear models and logistic regressions are examples of generalized linear models, in which the relationship between a linear predictor).
Example using SciPy's maxentropy module (removed in SciPy 0.11.0):
#!/usr/bin/env python

""" Example use of the maximum entropy module:

    Machine translation example -- English to French -- from the paper 'A
    maximum entropy approach to natural language processing' by Berger et
    al., 1996.

    Consider the translation of the English word 'in' into French.  We
    notice in a corpus of parallel texts the following facts:

        (1)    p(dans) + p(en) + p(a) + p(au cours de) + p(pendant) = 1
        (2)    p(dans) + p(en) = 3/10
        (3)    p(dans) + p(a)  = 1/2

    This code finds the probability distribution with maximal entropy
    subject to these constraints.
"""

__author__ =  'Ed Schofield'
__version__=  '2.1'

from scipy import maxentropy

a_grave = u'\u00e0'

samplespace = ['dans', 'en', a_grave, 'au cours de', 'pendant']

def f0(x):
    return x in samplespace

def f1(x):
    return x=='dans' or x=='en'

def f2(x):
    return x=='dans' or x==a_grave

f = [f0, f1, f2]

model = maxentropy.model(f, samplespace)

# Now set the desired feature expectations
K = [1.0, 0.3, 0.5]

model.verbose = True

# Fit the model
model.fit(K)

# Output the distribution
print "\nFitted model parameters are:\n" + str(model.params)
print "\nFitted distribution is:"
p = model.probdist()
for j in range(len(model.samplespace)):
    x = model.samplespace[j]
    print ("\tx = %-15s" %(x + ":",) + " p(x) = "+str(p[j])).encode('utf-8')

# Now show how well the constraints are satisfied:
print
print "Desired constraints:"
print "\tp['dans'] + p['en'] = 0.3"
print ("\tp['dans'] + p['" + a_grave + "']  = 0.5").encode('utf-8')
print
print "Actual expectations under the fitted model:"
print "\tp['dans'] + p['en'] =", p[0] + p[1]
print ("\tp['dans'] + p['" + a_grave + "']  = " + str(p[0]+p[2])).encode('utf-8')
# (Or substitute "x.encode('latin-1')" if you have a primitive terminal.)

Other ideas: http://homepages.inf.ed.ac.uk/lzhang10/maxent.html
Answer: I'm not sure if this solves your problem as you mentioned "machine-learning" and it's not clear what kind of data you have. But since you also mentioned "prediction" and "estimate frequencies" I'll guess that interpolation could be helpful. In this case you can have a look at scipy.interpolate.
The Rbf interpolator is "A class for radial basis function approximation/interpolation of n-dimensional scattered data...". It supports the following functions:
'multiquadric': sqrt((r/self.epsilon)**2 + 1)
'inverse':      1.0/sqrt((r/self.epsilon)**2 + 1)
'gaussian':     exp(-(r/self.epsilon)**2)
'linear':       r
'cubic':        r**3
'quintic':      r**5
'thin_plate':   r**2 * log(r)

Comment: Thanks for the reply. I guess I am trying to figure out if there is any easier way to implement the model in this paper http://users.cis.fiu.edu/~lzhen001/activities/KDD_USB_key_2010/docs/p213.pdf


Desktop Sharing Ubuntu 18.04

Question: When I click on Desktop Sharing in System Settings, all that happens is System Settings disappears.  This is a VMWare Virtual Machine, but I don't think that's coming into play. Any suggestions?
Answer: If you use Wayland desktop architecture, then desktop sharing is not implemented yet. It will be using pipewire in the future. Have you tried logging in with x server x11?

Desktop Sharing Ubuntu 18.04


Embed Powershell in notepad ++

Question: after playing about with Ubuntu 10.04, one of the interesting things I noticed was that you could embed a terminal in gedit. Is there a similar plugin that would enable me to embed a Powershell (or a command prompt) window into notepad ++?
Answer: Yes, PowerShell_ISE.exe (which comes with PowerShell), PowerGUI, PowerShell Plus, and Visual Studio all have PowerShell consoles below the editors ... and can use PowerShell to manipulate the IDE.
But what you're asking for is the NppExec plugin http://sourceforge.net/projects/npp-plugins/files/ ... although it cannot manipulate the IDE ;-)
Answer: You should try PowerGUI Editor.
It autocompletes commands and variables and other nice stuff. And it if free.
Answer: No there isn't as far as I can see, why not switch to a Powershell window or use a real IDE?
Eclipse can do this for example...

Edit: Maybe gedit for Windows is a better option! :-D
Comment: Yeah, notepad++ isn't an IDE. It's great for quick tests and text editing/highlighting, but it isn't designed for real development.
Comment: Wasn't happy with the answer, went to search and saw that gedit can be used on Windows. :-)
Answer: If you want to use Powershell you should look at a more powerfull IDE. PowerGui.Org makes a great free system management and script editor.
Answer: NotePad++ comes primed with the NppExec plugin.
One of its many features is a Console Window... It has its quirks, but it may suit your needs.
I've found it most useful when it is associated with a shortcut such as CTRL+~
Tied to the Dialog-Toggle internal-command, CTRL+~ makes the console very accessible.  (of course the choice of shortcut-keys is personal)
You can set the window's properties (size, colour, and more) via
   menu --> Plugins --> NppExec ...
The shortcut-hotkey can be set via
   menu --> Settings --> Shortcut mapper --- Plugin Commands -- Toggle Console Dialog
   The items in the list are displayed  (but not labeled) in per-Plugin-groups, so they seem a bit random...
I haven't quite worked out "what and why", but I've found that I need to shell-out (in the same window) to start some commands.. eg. prompt> cmd /c tr.exe --help
It is not identical to the NotePad++ edit windows; it has copy/paste and its own Find-bar (Firefox-style).
I hope this helps.
Answer: This has become hard to find, so download it!
Link from official source (note that clicking on this link will immediately download the file):
http://community-downloads.quest.com/powergui/Release/3.8/PowerGUI.18.104.22.168.msi
Comment: Is Community Downloads the official source?  Please see the guidance on recommending software here: http://meta.superuser.com/questions/5329/how-do-i-recommend-software-in-my-answers.  Also, it would be better to use a link to a download site where the user can get informed and choose whether to download.  A hot link that immediately downloads an unknown file from an unknown source is a hazardous practice.  Thanks.
Comment: As I stated, The soft is hard to find, not updated since 2014 I think. Last official link point to community-downloads.quest.com. I tried to get to this page with no success, no choice but provide a direct link from the official source. Also Quest is the official developer of this software. My bad, I didn't know about sharing only open-source software, I just wanted to share it.

Embed Powershell in notepad ++


How do you move a set of links from current to global navigation en masse?

Question: I accidentally added all my global navigation (including several subsites inside folders) into the Current Navigation section in the Navigation settings.  I'm so used to working with actual files when I build websites and I would normally just cut and paste the block of link code and be done in 2 minutes.  But it's looking like I'm going to have to manually re-enter all those links individually because I don't know how to access that code in the actual SharePoint files and since I assume they are actually in the content database.  Please tell me there is a way to move all those links en masse up to the global section?
Answer: Using PowerShell, you can access the navigation nodes, including Global and Quick Launch. You won't be able to 'move' the navigation nodes, but you can do a loop to read the nodes from Quick Launch and create those nodes to Global then delete the nodes from Quick Launch.
This article should help you get started: http://techtrainingnotes.blogspot.co.nz/2015/02/working-with-quick-launch-from.html
Comment: What a great idea!  I will give this a shot!  I'm not too experienced writing scripts but I bet this one might be simple enough.  And I like a challenge and to learn new things.  Thank you!


Is there a single word for a person who overreacts?

Question: I'm looking for a single word that describes a person who often overreacts to things.
Comment: I'm guessing that [Histrionic Personality Disorder](http://counsellingresource.com/lib/distress/personality-disorder/foundation/summary/) counts as "too many words".
Comment: Not exactly what I'm looking for, yet a interesting link. Thanks.
Comment: Easy – that's an "overreactor" ;-)
Answer: While the first thing that comes to mind is the two word phrase Drama Queen, I think melodramatic is the best single word. If they tend to overreact by worrying, neurotic is another option.
Answer: You could perhaps try touchy (meaning 1) (American Heritage Dictionary via the Free Dictionary):-

Tending to take offense with slight cause; oversensitive.

or perhaps hysterical (meaning 2) (Random House Dictionary via Dictionary.com):-

uncontrollably emotional.

or possibly histrionic (meaning 2) (Random House Dictionary via Dictionary.com):-

deliberately affected or self-consciously emotional; overly dramatic,
  in behavior or speech.

depending on the reason for the overreaction or the exact shade of meaning you are attempting to convey.
Answer: If you want only a single word instead of a phrase, then "volatile" (easily provoked, intentionally or accidentally, to strong emotions and behavior) and "hysterical" (tending to react in an extremely emotional way) approximate your intended meaning. Both are generally derogatory and have little/no room for being used playfully, and usually refer as much to emotional states as actions.
Idiomatic phrases and compound words are more commonly used by native speakers to communicate the idea that a person tends to overreact, such as "hair-triggered", "flying off the handle", "high strung", "wound up", "tightly wound", "using a cannon to kill a fly", etc.
I'm not aware of any single word in the English language that simply means "a person who often/usually/always overreacts". Most uses are either more specific or more general, or a person would just say "they tend to overreact".
Answer: You could use irascible as a single word option!

irascible
  adjective
  1.  quick-tempered: easily provoked to anger or outbursts of temper
  2.  showing anger: showing or typical of anger
  an irascible gesture

[Mid-16th century. Via French < Latin irascibilis "quick to anger" < irasci "grow angry" < ira "anger"]
Answer: Thinking about acting I would have thought the word 'ham' would fit
Comment: *Overact* is not the same as *overreact*.
Comment: This post would be improved by explaining *why* you suggest this term, for example, by providing a dictionary definition or examples in the wild. I encourage you take the site [tour] and review the [help] for additional guidance.


Append the result of word count to the end of a file

Question: I want to count the number of lines in example.txt and append the result to the end of this file. How can I do this?
I tried:
wc -l > example.txt

Comment: You notice that each time you'll do it, number of line increase ?
Answer: wc -l example.txt >> example.txt

Comment: This will include file name, not the number of lines only.
Answer: As you know, wc -l by default, includes the result number plus the file name. If for some reason it is better to have literally just the result number only, try this:
wc -l example.txt | cut -d' ' -f1 >> example.txt

So if example.txt started with only 3 lines, eg:
a
b
c

After you run the above, use tail to look at the last lines (in this case very few lines so it views the entire file) you see:
$ tail example.txt
a
b
c
3

Explanation

you already know wc -l example.txt which gives default result line count and file name, eg 3 example.txt
the cut command helps extract "fields" from lines
the -d is to set delimiter/field separator, which we specify is ' ' , a space.
the -f1 means choose the first field, so given wc output was 3 example.txt the 3 is the first field
>> appends, so it saves the result 3, to end of the file example.txt
Answer: The following script adds the line count to the end of the file if it is not already there, but deletes and replaces it if there is already a line count.
This allows you to run this script every time your file(s) are
edited without adding multiple 'Line count:' lines.
#! /bin/bash

count=$(wc -l "$1" | cut -d' ' -f1)

tail -1 "$1" | grep -q '^Line count: '
if [ $? ]; then
    count=$(( $count - 1 )) # don't count the 'Line count' line
    sed -i -e '$ d' "$1"
    echo "Line count: $count" >> "$1"
else
    echo "Line count: $count" >> "$1"
fi

Answer: To append only the amount of lines, you can try this
$ cat example.txt | wc -l >> example.txt

This will only display the total amount of lines in the file


How to locate memory address in register $esp

Question: 000011d9 :
11d9:       8d 4c 24 04             lea    0x4(%esp),%ecx
11dd:       83 e4 f0                and    $0xfffffff0,%esp
11e0:       ff 71 fc                push   -0x4(%ecx)
11e3:       55                      push   %ebp
11e4:       89 e5                   mov    %esp,%ebp
11e6:       53                      push   %ebx
11e7:       51                      push   %ecx
11e8:       83 ec 20                sub    $0x20,%esp
11eb:       e8 f0 fe ff ff          call   10e0 <__x86.get_pc_thunk.bx>
11f0:       81 c3 10 2e 00 00       add    $0x2e10,%ebx
11f6:       c7 45 ef 49 41 32 32    movl   $0x32324149,-0x11(%ebp)

Comment: the answer also stated using GDB or any debugger so it is easy to lookup what esp is by querying the register  and it shouldn't matter what the actual address of esp is  it is like a hotel room you pay for the time you stay  and you may get room 102 or room 704  edit your question to state what is the actual problem you are trying to solve or understand
Comment: Hi, I re-wrote my question so it's more clear. Thanks!
Comment: i don't think a compiler will emit -0x11(%ebp) is that a randomly typed instruction  and you are still not clear what calculation you want to perform ? that last instruction is a store instruction it stores the constant "22AI" in some place
Comment: Seriously thank you so much! I tried to explain It better in another comment but I'm new to this website also and I'm not sure where things get posted
Comment: Also would you mind explaining how you determined It was a store instruction and specifically the value 22AI? Really sorry if that is a waste of time for you
Comment: don't have to be sorry it is only expected that you think and formulate a clear query [0x32 = "2" 0x32 ="2" 0x41 = "A" 0x49 ="I"](http://www.csc.villanova.edu/~tway/resources/ascii-table.html)
Comment: Well really thank you for your time :)
Comment: well now you have edited your question so much that it does not make sense it is just a dump of some disassembly without a query either delete it completely or edit it with strike through and update or post a self answer
Comment: Oh I didnt do that on purpose sorry! Ill see if i can get the text back. (Also I'm looking at the table and isnt 32 an R? I'm confused)
Comment: Edit: It was a 2, I'm just dumb. But thats not the right password :(( thanks though :)
Answer: You are approaching it wrong, the problem is the memory of esp can't be known before you run the program because the value is always random at the runtime so you can't know for sure the real register esp value until you run it.
The esp is only need to store the top of your program stack. So i don't think the actual value is neccessary because most of the time we only care about the offset from esp.


The last note in Bach's Chaconne for Solo Violin

Question: When playing the final note in Bach's Chaconne for solo violin, at least the way Arthur Grumiaux performed it during the 1960s (heard on a recording), it's an open D string and then a fingered D on the G string, it's not played with any vibrato on the fingered D.  Is that a pretty much universal practice?
Answer: Well, there is no other way to play these notes on a violin. And about vibrato: In early music reception it is widely accepted that vibrato would have been used similar to some kind of ornament and not in the modern manner of a wide, continuous vibrato. So it is usually considered good practise to use vibrato sparely in baroque music.
Answer: In addition to Lazy's answer: If the question is "why is it played as a unison double-stop," that's because it's notated that way by Bach.

This is less because he necessarily wanted the sound of a double stop and more for reasons of counterpoint. The preceding chord is a double stop of an E above an A, and he wants to show them as two "voices" converging on the D.
Comment: In other words, it's final "notes," not final "note."


Having trouble making a twisting animation more realistic

Question: I am new to animating in blender, and I have been using the curve modifier to create a specific looking circle, but I want to animate it to make it look like it twists from a circle to a figure eight. The problem is, I tried using shape keys with one as the original circle and one as the final figure eight, but then, of course, it just moves in a linear fashion from circle to figure eight, but this isn't realistic. When you take a rubber band and twist it to make a figure eight you don't move it linearly to the eight, you twist the band around. Does anyone have any idea on how to do this? I've tried using intermediate shape keys, but it doesn't flow smoothly it abruptly stops at the intermediate step and continues. I would appreciate any help.
Comment: Possible duplicate of: [animation of cylinder to figure eight](https://blender.stackexchange.com/questions/194255/animation-of-proportional-editing-deformation-cylinder-to-figure-eight)
Comment: Use curves and animate the rotation of the the handles to affect the shape like a rubber band.
Comment: Can you provide some images of the base shape? Is it a mesh or a curve, how it is?
Comment: Sorry, I added  a 2d representation of what I am trying to achieve
Answer: This might be a good place to model the band as a curve (with a rectangular curve Bevel object,) and use the shipped Animall add-on, which enables you to key-frame control-points, and their tilt values.
This animation is of a default Curve > Circle, subdivided once. The three vertices at each end are rotated in opposite directions, while the entire circle rotates through 90 to present the figure-of-eight to the camera. Animall permits the keying of tilts, rotations, locations of the control-points to keep everything more or less in shape.

(v2.91 .blend file)
Answer: Consider at least two options.

Hook Modifier. Rotate along its axis with the appropriate point selection.
Simple deform modifier with twist enabled as shown below.

In the image above are three stages of view.  Shape Keys and Hook Modifier.  With more care the viewer can remove some of the flaws.  You see a twist empty controller for twist of the bottom half and an organizing controller.
The below image is a quick approximation to the question.  Perhaps a better approximation will come.  At the moment you are seeing a view convenient for this candidate answer.
Comment: Hello, I was thinking about using armature, but I'm not sure how to use it for a curve, could you please tell me how I could use it in this situation?


Free electron and compton scattering

Question: For compton scattering, electron needs to be free from any surrounding electric field. But electrons in graphite are bound to graphite. I have two doubts, first, if electrons are free in graphite, why don't they leave graphite, second if there is some force binding them, why do they show Compton scattering?
Answer: If we are doing a calculation based on the equation for the Compton effect we assume that any other interactions with the electron are negligible compared with the energy transferred between the photon and the electron. At visual wavelengths, i.e. energies of a few eV, this requires that the electron be almost completely free so it only works for an isolated electron.
However if we are doing Compton scattering with X-rays then the energies exchanged are in the keV range and vastly greater than typical electron binding energies in atoms. That means that when considering Compton scattering by X-ry photons we can treat even the electrons in atoms as though they were free.
You don't say exactly what is going on in your experiment, but if the electrons involved are the conduction electrons then the binding energy will be about the work function of graphite, which is around 4eV. For Compton scattering by any photon of an energy much greater than 4eV it is a good approximation to treat the electron as free.
Comment: As far as I know, either the photon can be absorbed if it matches binding energy. Even if the energy of incoming radiation is very high, it has to first free the electron from binding forces, otherwise we can't consider it free. I don't think that it can be as if some part is used to eject electron and then that electron shows Compton effect. Please correct me if I am wrong.
Comment: @a.b you are quite correct that with a high energy electron some of the energy is used to free the electron. However for a high energy photon the fraction of the photon energy needed to free the electron is small enough that it can be neglected. To a good approximation the result of the scattering of the bound electron is the same as the result from scattering of a free electron.
Answer: When Compton scattering is exhibited the incoming photons have energies which are much larger than the binding energy of the electrons in the graphite so the electron can be considered to be "free".
Before interacting with an incoming photon the electrons do not have enough energy to escape from the graphite.
Low energy photons can give the electrons in graphite enough energy for them to escape and that is called the photoelectric effect.
Also giving the electron more energy by heating the graphite can induce thermionic emission of electrons.

Free electron and compton scattering


What was so dangerous about the listening device?

Question: Batman has Lucius Fox man a device that monitors all of the cell phones in Gotham to give Batman an edge in his fight against the Joker. Fox is so against using this device that he says he will resign afterwards if Bruce asks him to use it. Why was this device so dangerous in the mind of Mr. Fox?
Comment: I could understand this question if you were a member of the ruling class of North Korea or worked for the NSA. Are you? Do you?
Comment: Who watches the Watchers? Why do you trust the filtering?
Comment: Because it's Batman!
Comment: @MartinSchröder Let's not play games. I'm a man with a certain set of skills. But seriously the device simultaneously spied on everyone to find crime only. Which means the filtering basically made anything else into the equivalent of static noise. So really the privacy of anyone that isn't committing a crime is pretty secure.
Comment: And what if the Joker got access to that device?
Comment: @MartinSchröder The Joker is dead man. The joker is dead.
Answer: Fox believes this device, while in existence, is more evil than the Joker.
This is due to the nature of turning every cell phone, something we can assume every citizen in Gotham owns, into a sonar device capable of mapping the immediate area, spying on every single person in Gotham.
This scene shows Fox's true ideals of being a proponent for individual rights and against spying on people for information.  Bruce, however, is desperate enough to put Fox through this stress in order to catch the madman that is the Joker.
This is alluded to by Alfred when Bruce asked how his platoon caught the thief.  He stated that they simply "Burnt the forest down".  This is Bruce's forest fire, tearing down the walls of Gotham for him to find the Joker.
However, Fox's faith in Bruce gets rewarded, as he enters his name into the console, the machine begins to overheat and self destruct, proving to Fox that Bruce merely needed this cruel and potentially dangerous tool to find the Joker, and for nothing more.
Comment: Imagine if the Joker got his hands on it, or even Bane in the future.  No one would be safe.  While you're right it doesn't pose a direct threat, it's an indirect threat.
Comment: Yet it was a needed and it was a non-destructive device. It also wasn't nearly as invasive as Fox made it seem because it was impossible to isolate one conversation. I can understand the moral ground but I don't see the danger in the device.


Unable to run application on IE while testing with Katalon

Question: Tried all the solutions available on the web, tried configuring to the latest version but still the test cases fail in Katalon Studio while it is tested on Internet Explorer. The same script works perfectly fine in Chrome and Firefox. If someone else faced the same problem and solved it, please let me know how!
Comment: post your error message
Answer: Configure the IE browser like given in the link and try. Make sure your IE version is more than 7.

In Katalon - go to Project -> Settings -> Execution -> Default -> IE – click on Add and add these values {name =
  ignoreProtectedModeSettings, type = Boolean, value = true}
Followed steps here - https://docs.katalon.com/display/KD/Internet+Explorer+Configurations 6
Instead of checking the Protected Mode – just unchecked the protected modes for all zones including in advanced.

Try this....
Comment: Thank you so much for your response. I have already tried all these methods but it didnt work. Though I found a solution by replacing click with Send Keys and placing delay after every small operation and now it works perfectly fine.


Any tool for scanning vulnerabilities in browser extensions?

Question: I am scanning browser extensions of Chrome and Firefox for vulnerabilities. Is there any tool which would help me do this?
Comment: I'm voting to close this question because since the question was asked in 2012, the community has made questions asking for tools off-topic.
Answer: There is one for Chrome, released mid-last year, called XSS ChEF.  Based on some earlier work finding vulnerabilities in Chrome extensions.  Unfortunately it doesn't seem to be about finding new vulnerabilities but rather an easier way of exploiting/demonstrating them once you have found one.
I haven't used it myself but based on the way it works (it's just a web server), I imagine it's possible to use it to exploit Firefox extensions too or at least to extend it to be able to access Firefox internal state once you have found a vulnerable extension.
BeEF might be a good place to start looking too.
Answer: One similar tool is Qualys BrowserCheck but it announces that checks for plugin vulnerabilities and not for extension vulnerabilities. I have tried it and just detects updates for plugins in my case. Remember that, as @Ladadadada has commented, browser plugins and extensions are different elements.

Qualys BrowserCheck will perform a security analysis of your browser and its plugins to identify any security issues.

https://browsercheck.qualys.com/
Comment: Plugins and extensions are different things (at least in Firefox).  For instance, Flash and Java are plugins, Adblock and NoScript are extensions.  I suspect Qualys are only talking about the former.
Answer: 2020 was a bad year for Chrome extension trustworthiness, but it also revealed some of the malicious techniques that are being used in the wild. Most common being loading and executing dynamic scripts or conditionally executing obfuscated code when certain conditions are met.
It's very unlikely that you would find out if the extension is malicious just by performing a static analysis. Otherwise, Chrome Web Store would have flagged the extension at submission time. I would argue that only a security expert-led security audit can truly determine if the extension is secure.


I get taken back to the xeondm login screen after trying to login on OpenBSD

Question: I am trying to start MWM by default. I edited the $HOME/.xsession script to make OpenBSD boot with MWM by default instead of FVWM, After I rebooted OpenBSD. I tried to login with xenodm, and all it did is take me back to the xenodm login display. I tried booting-in into single-user mode and did some tweaks to try to get vi and xterm to work, but am still unable to edit vi files on single-user mode. I tried disabling xenodm on single-user mode as well, but never worked. How can I solve this issue properly?
Answer: Start with $HOME/.xsession-errors, it should show you the errors. BTW your $HOME/.xsession should be executable and if not then it is executed by /bin/sh, see https://github.com/openbsd/xenocara/blob/master/app/xenodm/config/Xsession.in


Where are the term tokens gone?

Question: I have a hard time setting up URL alias patterns when it comes to taxonomy terms. Especially, I'm stunned that in the Replacement under Content Paths, a term reference field shows just one flat item [node:field_term_name], rather than an expandable set of taxonomy-related tokens. This is the way it used to be (as in the screenshot here: Pathauto url of term for node?)
Have things changed or is it a bug?
Answer: Enabling the Entity_Token sub module does help with this issue, however, you need to add a "Term Reference" type field to any of your content types in order to see your taxonomy vocabulary be listed as one of the replacement tokens.
In my case, I had enabled the entity_tokens module but I was still not able to see my vocabulary as one of the replacement tokens.  Then I added a new field to my "basic page" content type.  The field type I added was "term reference" and I selected my custom vocabulary as its default vocabulary.  This resolved my issue.
Answer: After some investigation I found out what was wrong. The key was to enable Entity Token (a submodule of the Entity API package). Following that all the taxonomy reference field's tokens expanded into a subtree and my Pathauto i18n patterns started to work as desired.

Where are the term tokens gone?


What is gravity's relationship with atmospheric pressure?

Question: I'm asking for clarification here. If Earth had the same atmospheric mass per square unit of ground but the Earth had suddenly gained mass so it had twice the gravity at the surface, would the Earth now have twice the atmospheric pressure just because of the doubling of gravity? I know pressure is defined as force per area, but I'm not sure if air pressure works the same way. When I look up gravity and air pressure on the Internet it just has information on air pressure with height, but I'm not looking for that.
Comment: In your scenario, would Earth's mass change without its size changing (i.e. change of its density)? If the size changes, and you don't change the total mass of the atmosphere, there will of course be less atmospheric mass for the same area.
Answer: Atmospheric air pressure occurs because the atmosphere is made of stuff that has mass, and therefore has weight due to gravity. The pressure of an atmosphere on a horizontal surface represents the total mass of a column of atmosphere from that surface all the way up into space. Of course atmospheric pressure works in all directions; considering only the vertical force allows us to understand how that pressure arises. As we travel up that column, pressure decreases because there is less mass above to weigh down on the column below.
As we travel up the column, gravity decreases (inversely proportional to square of distance from Earth's center) but we can ignore this because the atmospheric "column" isn't a uniform section - it is a tapered section (converges to an imaginary point at the Earth's center) which exactly cancels out the decrease due to gravity because the cross-section of our atmospheric slice will increase in area as the square of distance from the Earth's center.
If you double the surface gravity, all other things being equal, you will double the weight of that same mass of air, so you will double the pressure at the surface. Doubling the pressure will double the density - the atmosphere will "crowd" closer to the surface and the pressure vs altitude profile will look somewhat different.
Comment: True, the gravitational acceleration doesn't drop by much over 100 km. But actually we can ignore that small change. As Rob Jeffries noted in [this comment](https://astronomy.stackexchange.com/questions/40047/how-do-we-get-to-know-the-total-mass-of-an-atmosphere#comment81268_40049) on a recent Astronomy answer, "the increase in area compensates for the decrease in gravity", since gravity is proportional to $1/r^2$ and the area of a layer of atmosphere is proportional to $r^2$.
Comment: @PM2Ring That is a cute, but useful, observation. I'll chalk it all up to the divergence of a radial field being $\nabla \cdot (g(r)\hat r) = \frac 1 {r^2}\frac d {dr} (r^2g(r))=0$ The $r^2$ in the derivative forces the $1/r^2$ field, while the $1/r^2$ out front corrects for area of the (atmo)sphere.
Comment: Huh nice never knew it balances out like that
Answer: Air pressure has everything to do with height because it is caused by the force exerted from the volume of air above weighing down.
That said, if Earth had twice the gravitational field strength at the surface, by the inverse square law this would mean that the Earth doubled in mass. This would double the gravitational force on all objects if they remain at the same distance r from the Earth's centre as before:
$$F_{g,earth} = G \frac{M_{earth}m}{r^2}, \space \therefore F_{g,double} = 2F_{g,earth} = G \frac{2M_{earth}m}{r^2} $$
Therefore the force exerted by layers of air above would double. $P \propto F$, therefore atmospheric pressure $P_{atm}$ too would double.
Answer: The phenomenon that determines atmospheric pressure is very similar to Pascal's Law for incompressible liquids. But air isn't an incompressible liquid: as a gas its density is quite dependent on pressure and temperature, for instance.
A doubling of $g$ would nonetheless double also the atmospheric pressure.

I know pressure is defined as force per area, but I'm not sure if air
pressure works the same way.

The definition of pressure isn't dependent on the type of fluid.
Answer: If you double the gravity the air pressure will be doubled.
$F = mg$
we can replace $m$, mass, with density and volume, so,
$F = \rho V g $
Now let's write the volume as area time height.
$F = \rho h A g$
Now we can calculate the pressure
$P = \frac{F}{A} = \rho h g$
You can see that pressure is directly proportional to $g$. Note that $h$ is height of the air above your head.
Comment: +1 Instantaneously, this is true. However, due to the increased $g$, after some time the density of the air would increase while the height of the air column would decrease.
Comment: For the atmosphere the formula $p=\rho gh $does not work.  The density decreases with height so the relationship is not linear but exponential.  And this is an approximation too.
Answer: The atmospheric pressure is directly related to gravity. Double the gravity and you should have double the pressure, at least on average.
Comment: This is only approximately true when the atmosphere is very shallow compared to the radius and gravitational acceleration is nearly equal across the entire atmosphere. On Titan, for example, gravity decreases by about half across an atmosphere that's ~1000 km deep on a body only 2500 km in radius. A higher gravity would compress the atmosphere deeper into the gravity well and cause a greater than linear increase in pressure.
Comment: That's why I said "at least on average" Under the ocean about every 33 feet down is an atmosphere.
Answer: The force per unit area at the surface is the weight of the column of air above the unit area.  If you double gravity, the weight of the column doubles.
Answer: Without gravity the atmospheric pressure would be zero. That is, there would be no atmosphere.


Safety devices like fuses should be connected with the live wire rather than the neutral wire?

Question: So, I was told in my class that Safety devices like fuses should be connected on the live wire. But isn't the conventional current opposite to the direction of the flow of electrons? And what actually happening is that electrons are flowing into the load from the neutral wire? So how does that add up?
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/110950/discussion-on-question-by-user810213-safety-devices-like-fuses-should-be-connect).
Answer: You may want to check out this answer on our sister site: https://electronics.stackexchange.com/questions/189867/ac-why-differentiate-between-ground-and-neutral
In summary here:

"Ground" and "neutral" are both grounded in the sense of being attached to the actual earth somewhere in the vicinity of your house.
Despite both being grounded, they are different.  Under nominal conditions, the neutral wire is carrying significant current and the ground is carrying none.
Wires aren't perfect conductors.  So while ground and neutral are at equal potential somewhere - usually outside of your house - they are at different potentials at arbitrary points inside your house.

The ground is there as a safety only.  If something, say your cloths dryer, shorts into its metal housing and the housing is connected to the safety ground, that's supposed to provide a low-resistance path to ground for just the shorted-out current (vs. all of the current your house is pulling).  In particular, it's hoped to be lower resistance to ground than your body when you touch the metal housing.
The live wire, on the other hand, is being driven +/- hundreds of volts relative to the ground and neutral wires.  Under normal conditions the direction of current through live and neutral reverses many times per second through a completed circuit connecting a load to live and neutral.
And now we get to your question. A short between neutral and ground is not great, but those wires will typically be at relatively similar voltages, so it's not as bad as a short between live and ground.  A short between live and ground allows for much greater voltage difference and therefore greater current.  Greater current, in turn, creates a variety of other hazards:  For example, bad for you if you are part of the short, more heat in wires, etc.  Putting the fuse (or circuit breaker) on the live side will cause it to blow in the more dangerous of the two cases.
This is not the only reason, but it's one good one to get you thinking in the right direction.
Comment: Thank you, still a question: Does the current in our homes change directions once every 1/60th of a second? And if it does, So why does the live wire always remain the same?
Comment: How often it changes depends on where you are, but AC power induces a current that changes direction.  You seem confused by the fact that the "live" wire can be +120 V or -120 V peak to peak. (US - other places different values like 240 V). That causes current to flow in different directions, but the magnitude of the current is the same.  The magnitude of the current, not the direction, is what causes most dangers to you and your house in a faulty circuit.  The neutral is neutral because it's always approximately 0 V (see details above).  In all cases voltage relative to local ground.
Comment: Thank you. One last side question that isn't related to the topic: In my country, the AC varies at 50Hz and the standard voltage is 230V. I have a habit of roaming around the mains and observing the electricity meter. It displays the the power, Current entering my house and the voltage. Is voltage variation a common thing? Sometimes I observe readings as High as 260V and as low as 220V. What are the possible reasons?
Comment: Yes, it's common that voltage is only within a range of the "nominal" value given for your country.  Typical reason is that the wires are not perfect conductors, as in my answer and the link it provides.  Your last side question probably has a full Q&A devoted to it either her or on electronics.SE.
Answer: When an overcurrent protection device like a fuse is placed in the ungrounded (live) circuit conductor it disconnects line voltage from all downstream conductors and electrical components when it opens, making all downstream circuits dead and not a shock hazard.
Hope this helps
Comment: What if we hook the fuse up to the neutral wire?
Comment: @user810213, Then, when the fuse blows, current will stop flowing, but everything in the branch circuit, including the supposed-to-be-neutral wire, still will be connected to "hot." At that point, if you put one hand on a water pipe, and your other hand on the supposed-to-be-neutral wire, current will flow, in a loop, from the transformer's _actually_ neutral wire, through the Earth, through the water pipe, through your heart, through the supposed-to-be-neutral branch circuit wire, through the load, through the "hot" wire, and back to the transformer... And, of course, it will reverse at 60Hz.
Comment: @user810213 I guess Solomon Slow answered the question meant for me. I would add that while the fuse will cut off the power say to an appliance regardless of its location, it will not remove hazardous voltages within the appliance if it is connected to the grounded (neutral) conductor. One might get a false sense of security that the appliance is safe because the fuse opened, whereas the potential for electric shock remains. The same requirement is often also applied to single pole switches- i.e. they should be connected to the ungrounded (live) circuit conductor.
Comment: @BobD Thank you.
Answer: you call it the life wire , so it is an AC current, the second pole than is usually earth.  If you put the fuse on the earth part, and you touch the life wire you still are exposed to the full voltage and you are the best connection to earth.
Comment: Thank you. Got it.


Why does twisting make it easier to remove a lid with a seal?

Question: I have a pot with a lid that has a rubber seal (not a screw cap). When taking the lid off, it is incredibly difficult to lift the lid by pulling straight up on it, but twisting the lid whilst pulling gently upwards, as many people would do instinctively, makes it easy. What about this act of rotation makes it easier to take the lid off?
Comment: @AaronStevens I wasn't familiar with the distinction between those two when I asked the question – it seems that was the issue that prevented me from working it out
Comment: Are you familiar with static vs. kinetic friction?
Answer: When the lid to the pot is "glued on" and you are pulling straight up, you are trying to break the bond in tension all the way around its circumference all at the same time, which is hard to do.
But since the glue joint is weaker in shear than in tension, and since twisting the joint places the glue joint in shear, you have a better chance of breaking the joint while twisting.
When you combine tension with shear, you create the opportunity for the weakest part of the glue joint to debond locally and when it does, the applied stresses in the remainder of the circumferential joint are increased- especially right at the debonded spot, which concentrates the stresses- and the joint "unzips" incrementally (but quickly) all the way around the lid.
Comment: A few other thoughts. Isn't there  also the advantage of applying a torque to overcome the maximum static friction force between the lid and seal than simply pulling up on the lid? Also, depending on the seal/lid interface, only pulling up on the lid could compress, or jamb, the seal making it more difficult.
Comment: Amen to that. Who would of thought that taking the lid off a pot could generate so much scientific interest!
Comment: sounds like a fun series of experiments to perform!
Comment: Thanks very much for the answer. What does it mean to say "the glue joint is weaker in shear than in tension", and why is this the case?
Comment: this is generally true of glued joints- this is what it means: imagine pressing your hands together in front of you with glue between them. now you're stuck. push one hand away from you and pull the other towards you, as if you wanted to rub your hands together. this action places the glue joint in a state of *shear* instead of *tension*, where you are trying to simply pull your hands apart.
Answer:
What about this act of rotation makes it easier to take the lid off?

I don't disagree with @niels nielsen answer, but would like to offer a possible alternative explanation.
In order to get the lid off you need to exert a force parallel to the lid/seal interface that exceeds the maximum static friction force between the lid and the seal. Once it starts moving the friction force is reduced to the kinetic friction force, making it easier to pull the lid up and remove it.
The amount of force you need to apply parallel to the lid/seal interface to overcome static friction is less when you twist the lid than when you simply pull up on the lid. That's because you are taking advantage of torque when you twist the lid. Torque is the rotational analog of force. The torque is equal to the force you apply parallel to the lid/seal interface times the radius of the lid if you are grasping the perimeter of the lid. The greater the radius, the less the force that needs to be applied to achieve the same amount of torque needed overcome static friction. In fact if you were able to use, in addition, a wrench to loosen the lid it would be even easier since the wrench would increase the moment arm further reducing the force you need to apply for the same torque. It's somewhat analogous to using a wrench to free a nut from a rusted bolt, than simply doing it by hand. It is considerably easier using the wrench.
Also, depending on the nature of the seal lid interface, only pulling up on the lid without twisting may result in compressing, or jamming, the rubber seal between the pot and the lid, making it even more difficult to remove.
Hope this helps.
Comment: I mostly agree with this. But this part: "*The amount of force you need to apply parallel to the lid/seal interface to overcome static friction is less when you twist the lid than when you simply pull up on the lid. That's because you are taking advantage of torque when you twist the lid.*" I think needs a stronger argument. You say torque is stronger for a force applied at a larger radius, but that doesn't really explain why in this case the rotation is still better than just pulling up. Are you saying for a smaller lid you wouldn't want to twist?
Comment: @AaronStevens I confess I was thinking more in terms of freeing the lid from a jar with a rubber seal where you grasp the perimeter of the lid. The top knob of a pot is likely to have a much smaller radius than the radius of the lid, in which case the advantage of torque when grasping the knob of the pot would be much less than when grasping the perimeter of the lid. As always, thanks for the insightful input.
Comment: Yeah I figured you were talking about grabbing from the ends. I wasn't asking about lids with a knob.


What if a vertical force acts on a body in pure rolling?

Question: For what max of vertical force acting tangentially upward ,will the cylinder undergo pure rolling in a rough horizontal surface?
In this case ,why can't we put torque equation about the axis touching the ground to find angular acceleration ?
Answer: You can find the angular acceleration about an axes passing through the point  of contact of the cylinder and the ground , in fact you have done it correctly .
I think what you are missing is that the frictional force causes acceleration .
Hence
$f= m(Acm) $
Where the acceleration of the center of mass is given by :
$Acm = r\alpha$
Putting this in your equation :
$F= \frac 12 mr\alpha + uN $
You get :
$F = \frac 32 mr\alpha $
As you have already calculated.


Where do I find other drives on Ubuntu?

Question: On MacOS X I can access other drives under "/Volumes". Where do I have to go for the same under Ubuntu 9.04?
Comment: What kind of File System your drives want to access?
Answer: I believe that Ubuntu places volumes for extra drives under /media/ and not /mnt/ like other linux distributions.
You can type mount from the command line to find out where everything is mounted.
Comment: Actually you might be right - I've got a machine running Intrepid and I can't remember whether this is the case or not.
Comment: It's not just Ubuntu, it's in the FHS: http://www.pathname.com/fhs/pub/fhs-2.3.html#MEDIAMOUNTPOINT
Answer: Mostly under /mnt, (edit: might be /media on Ubuntu as Moshen says) although they could be mounted anywhere in the file system.
As an aside (for those mostly familiar with MS operating systems) Unix doesn't have the concept of a drive in the way that you would see C: or D: on Windows.  The system has a single root, which normally has the root filesystem mounted on it.  Other file systems can be mounted over directories within the file system, e.g. /usr or /home.
Traditionally removable devices such as CD-ROMs or USB drives are mounted on points that live under /mnt but there is no reason other than convention for this.
Look up the man pages for mount and makeXXfs for various file system types for more detail.
Comment: I have one computer where I set up several mounts under /share
Answer: Assuming they are mounted, they can be found under /mnt, if not, you would have to first mount the device.
If it is a hard disk or a cd-rom drive, you have to figure out which device it is, and then mount it.  You could mount it anywhere you want.
For example:
mkdir /storage
mount /dev/sdb1 /storage

Answer: It's worth noting that in addition to /mnt/, where storage volumes sometimes are manually mounted, hal (the hardware abstraction layer daemon) will mount things like usb drives, memory cards and cd/dvd-roms under /media/.
Answer: If the volume isn't mounted typing "sudo fdisk -l" in a terminal will list all the drives and partitions that are connected to the system.  Typing "mount" with no options will show you what partitions are mounted where along with some other information.
To mount an drive that's not automatically mounted you can go to "Places-->Removable Media" or "Places-->Computer" at the top and when you select an unmounted partition it should mount it for you.  If that doesn't work you can type "sudo mount /dev/ /"  As long as the partition is labeled properly that should work.  Otherwise you may need to supply the -t option with the file system that's on the partition.  Check the mount man page for more options and examples.
Answer: A missing point here is what to do if it doesnt automount.
If you are just plugging in a drive (ie usb or firewire), then check dmesg and see which device it showed up as, and which partitions are available.  You may have to manually mount it (ie mount /dev/sd[a-z][1-?] /path/to/mount/ ).

Where do I find other drives on Ubuntu?