The viscosity of Natural gas

Question: At low pressures, gas viscosity increases as temperature
increases, which is mainly due to increase in the intermolecular collision that is
caused by an increase in molecular friction. However, at high pressures, gas viscosity
decreases as temperature increases. So at low pressures gas is free to move and the distance between molecules is high but in high pressures it's vice versa. So in the first case intermolecular collision creates friction and that's why it hinders the mobility of the gas. But the same collision in the second case can make molecules to move faster because the molecules are packed and it leads to increase in kinetic energy. Is my understanding relevant to this statement? Or is there another reason for changing viscosity in terms of T and P?
Answer: Your understanding is partially relevant to the statement, but it needs some clarification. The statement is about the effect of pressure on the mobility of gas molecules, not the effect of intermolecular collisions. Intermolecular collisions are a factor that affects the mobility of gas molecules, but they are not the only factor. The statement also mentions kinetic energy, which is related to the speed and direction of gas molecules.
At low pressures, gas molecules are free to move around and collide with each other frequently. This means that they have a high kinetic energy and a high probability of changing their direction and speed with each collision. This also means that they have a low mean free path, which is the average distance that a molecule travels between collisions. A low mean free path means that gas molecules can diffuse quickly through a space.
At high pressures, gas molecules are forced to move closer together (making it simpler for them to pass one another)and collide with each other less frequently. This means that they have a low kinetic energy and a low probability of changing their direction and speed with each collision. This also means that they have a high mean free path, which is the average distance that a molecule travels between collisions. A high mean free path means that gas molecules can diffuse slowly through a space.
Therefore, your understanding is correct in saying that intermolecular collisions create friction and hinder the mobility of gas at low pressures, but it is incorrect in saying that they make molecules move faster at high pressures. In fact, it is the opposite: at high pressures, intermolecular collisions reduce friction and increase the mobility of gas by making molecules move faster.

The viscosity of Natural gas


How to get the count from Publishing Queue

Question: We have implemented Web Deployer in our Tridion 2013 SP1 Environment. Could you please help me to get the count of item(s) from Publishing Queue based on state selection.
Answer: It is difficult to tell from your question exactly what you are trying to achieve.
If you are trying to get the count of items with a particular state from within the Publishing Queue, then you can do this by setting your filtering options within the Filter Publishing Tasks dropdowns and then clicking on one of the 'funnel' icons alongside the header that you want to know the count for:

This will give you the total count (i.e. All), along with the sub-totals for each option.
Alternatively, you could do this using a Core Service client or using a GUI extension. However, both of these would require custom code.
Comment: In that case, please accept Jonathan's answer to indicate that it solved your issue. This will help other people, that have the same question, know what worked for you.
Comment: Thank you Jonathan. You got me correctly and from your answer I got my required information. Thank you once again.
Answer: I've written a Core Service app that polls the Publish Queue and gets items based on a certain state. Please have a look at the Blog Article  and the Core Service Code.
Beware - The 'Show Tasks' button on the Publish Queue screen and also the code above to get the list of items in the Publish Queue is very DB intensive. This is something you do not want to do every second for example. Using it normally is OK, but it is not something you want to do a hundred times in a minute...
An alternative to the Publish Queue Windows Service polling would be to tap into the Event System and listen for finished publish transactions...


Help with Broken battery cables

Question: My daughter recently bought a 2003 Grand Vitara and the positive battery cable appears to have broken off. Would appreciate some assistance with identifying what part we need to purchase/replace.  It really just seems like the connection snapped at the terminal but I am not sure if the cables should be replaced too.
Comment: It corroded off; be sure to cut back to good cable before attaching a new end as @ Solar Mike says.
Answer: If the cable is till in good condition, then new battery terminals can be purchased which will solve the problem. This works as long as there is sufficient length still in the cable.
Other options include replacing the complete cable or fitting a terminal to the cable to bolt to the battery terminal.
Just need to work out what is best, personally I would fit a new battery terminal to the existing cable if it is long enough - it cannot be stretched tight like a guitar string...

Help with Broken battery cables


Code auditing and/or fuzzing - Books and resources

Question: I've read the 'Shellcoder's Handbook' as well as 'The Art of Exploitation', and appreciated both a lot. Now I'm looking for additional resources delving into vulnerability spotting, code auditing, and maybe fuzzing. Any recommendation for a book or must-read online resources of great interest?
Answer: for fuzzing take a look at:

Fuzzing: Brute Force Vulnerability Discovery (ISBN 0321446119)
Fuzzing for Software Security Testing and Quality Assurance (ISBN 1596932147)

for code review:

Peer Reviews in Software: A Practical Guide (ISBN 0201734850)
Answer: For static code analysis I can recommend this:

Secure Programming with Static Analysis (Brian Chess/ Jacob West)
Answer: The web application hackers handbook is good book in web applications security and it is exploits .
A Bug Hunter's Diary: A Guided Tour Through the Wilds of Software Security
this is also very good I didn't complete it though.
Also OWASP/WASC guides are too good for Vulnerability Detection and Testing .
and Google is your best friend always.
Comment: Thanks Ali, I'll have a look at the Bug Hunter's Diary. I've already read the WAHH which is very good indeed, but I'm only looking for system exploits there. Also google can be helpful but there is way too much stuff here, that's why I asked here for only the **best** resources :)
Comment: you mean exploit development/penetration testing related books and materials


Mapping or function

Question: confused about the answer from the given options.
In mapping every element of domain has exactly one image.
But the given options do not make any sense. What will be the answer? I think none of them. Am i right?
Comment: The answer is $(d)$.
Answer: $f$ is a function if and only if to every element $a$ of $A$ is associated a unique element $f(a)$ of $B$, hence none of them.
Answer: Lets look at this answer by answer.
(a) $f$ is a mapping only if it is is one to one (injective). This is not true, becuase we know mappings exist that are not injective. Look at $f:\mathbb N\to\mathbb N$ where $f(x) = 1$ This is clearly not injective but is a mapping. (write out a proof for this if this is  not immediately clear)
(b) Take the same $f$ as above, we know this is map, but it is clearly not onto (surjective) because it only maps to 1. (write out a proof for this if this is  not immediately clear)
(c) The same reasoning above applies here
(d) the answer must be d.

Mapping or function


VMWare Fusion access guest vm (windows) from host (mac)

Question: I am needing to access the localhost of a guest windows 8 vm from my Mac OS (10.9) host.  The windows 8 vm is running in VMWare Fusion.  How can I do this?
I have tried getting the guest ip address with ipconfig, and then typing that IP address into the browser on my mac, but it won't connect, and i can't ping that ip address from the mac either.
I have tried doing this in both NAT and Bridged networking modes in VMWare Fusion.
Answer: I have found what I needed to do here. To connect to localhost of the guest os firstly:

make sure the network settings of the windows vm in vmware fusion are set to: NAT (Share with my mac)
Turn off windows firewall for guest or public networks in windows 8 (just search for windows firewall and select "Turn Windows Firewall on or off")
get the ip address of the windows vm by opening a command prompt and typing "ipconfig"

Once you have done these things, you should be able to switch to the mac os, and navigate the windows ip address in a web browser.
Comment: You don't have to turn the firewall off entirely if you don't want to; you can create an inbound rule in the firewall. E.g. for http access create a rule for port 80. The profile will need to be public.
Comment: Also working fine in bridged mode
Answer: To add a bit of detail to Tyler's answer, where he wrote "make sure the network settings of the windows vm in vmware fusion are set to: NAT (Share with my mac)", in Fusion 5 you do this by going to Fusion's menu Virtual Machine --> Settings, click on Network Adapter, and select Share With My Mac.
Comment: That was not enough. Calling localhost didn't work from mac. Then I went to windows and looked at the IP address of the Ethernet0 adapter. That worked. I also added a firewall rule to allow the request to go through for the port I wanted.


Real DFT Using DCT

Question: In one of my projects I need to do a large number of real FFTs, so I'm looking for the most efficient algorithm. Is it possible to pre/process the N DCT in N operations to produce the real FFT - exactly opposite to the N FFT case in Fast Cosine Transform via FFT? If so, would this be, as I expect, several times as fast as the real FFT given the use of real numbers rather than complex?
Answer: If you have an efficient FFT routine (and there are many out there) the best and easiest approach to compute DFTs of real-valued data is to combine two real-valued signals into one complex valued signal and compute the DFT of the complex-valued signal:
$$x[n]=x_1[n]+jx_2[n]\tag{1}$$
From the DFT $X[k]$ of $(1)$ you can obtain the DFTs of the two individual signals $x_1[n]$ and $x_2[n]$ as follows:
$$X_1[k]=\frac12\left(X[k]+X^*[N-k]\right)\\
X_2[k]=\frac{1}{2j}\left(X[k]-X^*[N-k]\right)\tag{2}$$
In this way you've computed the length $N$ DFTs of two real-valued signals by one length $N$ DFT of a complex-valued signal.
In a similar manner, you can compute the length $N$ DFT of a real-valued signal by computing the length $N/2$ DFT of a complex-valued signal. This is explained in detail in this answer.

Real DFT Using DCT


JavaScript Source Code Analyzer

Question: Does anyone know of a good, extensible source code analyzer that examines JavaScript files?
Comment: What are you looking for as far as analysis?
Comment: Pretty much, the typical errors and compatibility issue analysis but also the ability to examine naming conventions and style as well.
Comment: Can you provide an example code analyzer for a different language?
Comment: An example of what I would like to see is something like MS's StyleCop or FXCop but for JavaScript instead of C# or MSIL bytecode.
Comment: After years of using both JSHint and JSLint, I moved the answer to JSHint. JSLint, in my opinion, is too opinionated and strict.
Answer: In the interest of keeping this question up-to-date, there is a fork of JSLint called JSHint. An explanation of why JSHint was created can be found here, but to summarize:

JSHint is a fork of JSLint, the tool
  written and maintained by Douglas
  Crockford. JSLint served me well for
  quite some time but in the past few
  months it has gotten uncomfortably
  opinionated and hostile towards your
  code. It is quickly transforming from
  a tool that helps developers to
  prevent bugs to a tool that makes sure
  you write your code like Douglas
  Crockford.
Comment: Ha, a down vote :-) Was that you Douglas?
Comment: While this is an older question by now, I moved the answer to JSHint.  I respect both JSLint and JSHint; however, JSLint is way too opinionated and strict for me.  JSHint allows the style freedom that I prefer (namely comma-first) and still provides a lot of power in terms of validation.
Answer: JSLint has historically been the main tool for this, but several more now exist:

JSHint - a fork of JSLint that is said to be a little less opinionated
Closure Linter - a linter that checks against the Google Javascript Style Guide
ESLint - a more flexible tool, but newer, and not yet as stable.
Answer: If you haven't found it yet, you should take a look at Google Closure Compiler. Compiles your JavaScript and finds errors in code. http://code.google.com/closure/compiler/docs/gettingstarted_api.html
Answer: I tried out ESlint and found it good..you can also add custom rules there..Here is the github repo: https://github.com/nzakas/eslint
Answer: JSAnalyse has just been published on codeplex. It is a tool which analyses the dependencies between javascript files. You can even define the allowed dependencies and JSAnalysis checks whether the defined rules are fulfilled or not. That allows to keep track about the javascript dependencies even in big projects and to have a clean architecture.
JSAnalyse can be executed as a command line tool or configured via the Visual Studio Layer Diagramm. It is also easy to integrate into the build. With gated check-ins you can keep the dependencies under control.
Comment: Looks interesting.  The only thing that I don't like from a quick look is that it requires .Net (and Visual Studio?).  I don't know if someone could use this for analyzing their JS in Python, Ruby, Java, etc.

Regardless, it DOES look interesting and will have to check it out.  Thanks for adding the answer.
Answer: There exist a parser called ECMAScript parsing infrastructure for multipurpose analysis (esprima) located at http://esprima.org/ with several example tools that can be used in some analysis
ECMAScript parsing infrastructure for multipurpose analysis
Answer: Apart from JSLint, JSHint, ESLint, Plato, Google Closure-Linter there's another tool named Esprima.
Here is the link for it: http://esprima.org/
Also, this is the github link for the tool Esprima: https://github.com/ariya/esprima
I faced installation issues while trying out Google Closure-Linter for Windows. But, it does mention on the web page that its support for Windows is experimental. All other tools are easy to use.
Answer: I have found JSLint which helps correct a lot of common errors and such; however, I'm hoping to find something that I can add my own rules and such to help automate some coding standards stuff that my company is wanting to implement into JavaScript.
http://www.jslint.com/
I need to look into it's extensibility model more.
Comment: I'd love to see something more powerful too, but I haven't found anything yet...
Answer: There's a few tools on the list of tools for static code analysis at wikipedia that has JavaScript support, you can allso see JavaScript Debugging if any of the tools mentioned would help. There's allso a few good tools at YUI (Yahoo! Developer Network), as well as a lot of helpful components.
I've allways used JSLint myself, and that's the only analysis tool for JS I've tried. I've grown more and more fond of JavaScript, but good tools is still a problem. :(
Answer: I use Aptana for JavaScript file analysis.   It catches alot of goofs (if condition with a single =).   It also describes the class layout.   I believe it has a jslint implementation embedded in it.

JavaScript Source Code Analyzer


Which statistical test should I use to evaluate my hypothesis?

Question: My hypothesis states that "Multiplayer Game is more enjoyable than the single-player game" and lets suppose I have 2 variables one categorical with two categories and the other one is ordinal (Likert scale 1 to 5). Which test should I use to prove my hypothesis?
Comment: (a) It seems you give no data for the variable with two categories. So, we can comment specifically only on the Likert variable. (b) You can 'test' a hypothesis $H_0$ against an alternative $H_a,$ which may give an idea whether to believe the hypothesis or the alternative, but "prove" is not really the right word to use.
Answer: If you have Likert data as below, for
Multi-player and Single-player games,
you might try a Wilcoxon rank sum test in R.
multi = c(5,4,5,4,4,4,4)
singl = c(3,2,2,1,1,1,1)
wilcox.test(multi, singl)

    Wilcoxon rank sum test
    with continuity correction

data:  multi and singl
W = 49, p-value = 0.00147
alternative hypothesis:
 true location shift is not equal to 0

Warning message:
In wilcox.test.default(multi, singl) :
 cannot compute exact p-value with ties

The warning message is because, for small sample sizes,
this test cannot give exact P-values for data with
multiple tied observations (as in your data).
However, in your example all of the Multi-player
Likert scores are 4 and above and all of the Single-player
scores are 3 and below. The probability that out of 14
scores 7 with high values would be in one group and 7 with
low values would be in the other group is $2/{14 \choose 7} =  0.0005827506,$ which is the P-value of an exact permutation test. So you have strong evidence that the Likert ratings
for the Multi-player game are higher.
In R, this can be formalized as a Fisher Exact Test
on the $2\times 2$ data table TAB with rows for Single/Multi
and columns for High/Low scores.
TAB = cbind(c(0,7),c(7,0)); TAB
     [,1] [,2]
[1,]    0    7
[2,]    7    0
fisher.test(TAB)

         Fisher's Exact Test for Count Data

data:  TAB
p-value = 0.0005828
alternative hypothesis:
  true odds ratio is not equal to 1
95 percent confidence interval:
  0.0000000 0.1991716
sample estimates:
odds ratio
         0


Difference between one-way ANOVA with randomised blocks and nested ANOVA?

Question: I'm doing a biology course and am very inexperienced with stats. My supervisor recommended that I go away and try an ANOVA with block design, but I hadn't heard of this. Having looked up about it, I can't tell the difference between that and a nested ANOVA. Please could someone explain? I will be running it in R and have only ever done regular one-way ANOVAs, GLMs and ANCOVAs before, so I'd like to keep my analysis as simple as possible.
Answer: Here is my understanding of the difference. With a randomized block design, you have a characteristic of the units-of-analysis that you stratify (block) and then randomize into your treatment conditions within each block. For example, you could block on sex (male and female) and then randomly assign to a treatment and control condition separately for males and females, ensuring balance across the blocks in the number assigned to each group. In this design, you have one factor (treatment/control) and one block (male/female). This design also controls for any variance associated with the block (you would only want to use a block that you have good reason to believe is associated with the dependent variable)
In a nested design, you have two factors but rather than the factors being fully crossed, they are nested. An example from Snedecor and Cochran (1989) of a nested design has multiple samples taken from individual leaves, with three leaves per plant and four plants. In this design, you have two factors: plants and leaves, and the leaves are nested within the plants.
Statistically, the analysis of these designs is the same. The distinction, as far as I can tell, is either you are simply ensuring balance of a potential nuisance variable via blocking thru block-randomization or whether you simply have two nested factors.
The bottomline is that I don't think the distinction matters much. I'd be interested in what others think, however. The classic book by Kirk on ANOVA addresses both block-randomized and nested ANOVA designs, if I recall, but my copy is at the office and I am not.


How can I change the coordinate system of gpx-points?

Question: I'm working with qgis, v. 2.0.1. I have some points from a gps device (Garmin) and they already are in the .gpx format. Now I have two problems: First, I can't open the gps-Points with the "gpx-tools" plugin by simply choosing "load gpx file". I always have to use the gpx-converter, otherwise the points don't appear in the map window. But actually it should work with "load gpx file", shouldn't it?
The second problem is that I want to change the coordinate reference system of the points from WGS84-EPSG:4326 to CH1903/LV03-EPSG:21781. But as soon as I do this, the points disappear...What can I do?
Thanks.
Answer: For your first problem, make sure the point layer is loaded in WGS84. You can also use Add vector layer to load GPX files.
If you want the points in another CRS, don't use SET CRS for layer. The right way is to save the data with Rightclick -> Save As ... and choose the wanted CRS and another file format like shapefile.
GPX is always treated as WGS84.


Showing that at least one of the equations has two real roots

Question: Let's suppose that $b_1, b_2, c_1, c_2$ are real numbers. We know that $b_1b_2=2(c_1+c_2)$. The task is to prove that at least one of the equations $x^2+b_1x+c_1=0$,   $x^2+b_2x+c_2=0$ has two real roots.
I tried with $b_1^2-4c_1>0$ or $b_2^2-4c_2>0$ but with no success. However, I have access to a solution (which is probably correct but I don't know why). The solution says: $\Delta_1 + \Delta_2 \ge 0$ and the remaining part is easy (solving this inequality proves that at least one of the equations has two real roots according to the solution), but what I don't understand is the inequality $\Delta_1 + \Delta_2 \ge 0$  - how do we know that the sum is going to be positive or zero? Imagine a situation when $\Delta_1$ =18 and $\Delta_2=-20$. In such case $\Delta_1 + \Delta_2 \ge 0$ is false but still one equation has two real roots (because $\Delta_1$ =18).
Comment: if you problem  allow  that if $x^2+bx+c=0 $,and such $\Delta=b^2-4c =0$,then say have two real roots?
Answer: if you problem allow this well know?
we say $x^2+bx+c=0$ such $\Delta=b^2-4c=0$,have two real roots.
I think we can use two case
case 1: if $\Delta_{1}=\Delta_{2} =0$,then it is clear
case 2: WLOG
If $$\Delta_{1}< 0,\Delta_{2}\le 0\Longrightarrow b^2_{1}< 4c_{1},b^2_{2}\le 4c_{2}$$
then we have
$$b^2_{1}+b^2_{2}<4c_{1}+4c_{2}$$
and $$b^2_{1}+b^2_{2}\ge 2b_{1}b_{2}$$
so we have
$$2b_{1}b_{2}< 4(c_{1}+c_{2})$$
impossible


CNOT over a $|+\rangle$ qubit

Question: I want to use the CNOT gate over a qubit $|0+\rangle$, but the definition says that CNOT flips the second qubit if a $1$ is found in the first one (i.e. 0 to 1, and 1 to 0). However, what is is to flip a $|+\rangle$?
Comment: CNOT is an operator so linear
Comment: Write $|+\rangle$ in the $|0\rangle$, $|1\rangle$ basis.
Comment: Hi, thanks. I put it as 0,1 basis and it is a sum. How do a flip a sum?
Answer: Some very basic quantum information:
$$|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$$
therefore
$$|0+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |01\rangle)$$
and
$$\operatorname{CNOT}|0+\rangle = \frac{1}{\sqrt{2}}(\operatorname{CNOT}|00\rangle + \operatorname{CNOT}|01\rangle) = \frac{1}{\sqrt{2}}(|00\rangle + |01\rangle)$$
using the convention that the control qubit of the $\operatorname{CNOT}$ is the first one in the state. If you want the control to be the $|+\rangle$ state, we have
$$\operatorname{CNOT}|{+}0\rangle = \frac{1}{\sqrt{2}}(\operatorname{CNOT}|00\rangle + \operatorname{CNOT}|10\rangle) =\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$$
Answer: Just to add to the answer provided by 'noah' for any Qubit $| \psi \rangle = \alpha|0 \rangle + \beta |1 \rangle $:
$$\text{CNOT}|0 \psi\rangle = \alpha \text{CNOT}|0 0\rangle + \beta \text{CNOT}|0 1\rangle=\alpha |0 0\rangle + \beta |0 1\rangle = |0 \psi\rangle$$
And conversely:
$$\text{CNOT}|1 \psi\rangle = \alpha \text{CNOT}|1 0\rangle + \beta \text{CNOT}|1 1\rangle=\alpha |1 1\rangle + \beta |1 0\rangle = |1 \big(X\psi\big)\rangle$$
You can then use linearity to evaluate any CNOT. Also you could just use the matrix but this is the intuition behind it.
Answer: Note that $|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$. $X$ (or NOT) gate interchange 0 and 1 which means that
$$
X|+\rangle = \frac{1}{\sqrt{2}}(X|0\rangle + X|1\rangle) =\frac{1}{\sqrt{2}}(|1\rangle + |0\rangle) = |+\rangle,
$$
so the state is unchanged.

CNOT over a $|+\rangle$ qubit


Cisco Switch ports and MAC addresses

Question: Good morning,
How do I find out which port on a Cisco switch is connected to a particular MAC address?  I recently took over Network Administrator position and trying to clean up and organize.  Thank you for your help :)
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: On most Cisco switches the command is:
sw1#show mac address-table
Aging time is 300 sec

  Vlan        Mac Address         Port       Type
-------- --------------------- ---------- ----------
   1       00:0b:d6:25:f0:0f      gi23     dynamic
   1       00:13:19:1e:ac:8d      gi28     dynamic
   1       00:18:b9:2f:e3:87      gi12     dynamic
...

If you're tidying up switches, you might also find the Cisco Discovery Protocol (and similar LLDP) very useful:
sw1#show cdp neighbors

    Device ID       Local      Adv  Time To Capability   Platform     Port ID
                    Interface  Ver. Live
------------------ ----------- ---- ------- ---------- ------------ -----------

       sw2            gi28      2     129      S I     Cisco           gi28
                                                       SG300-28PP
                                                       (PID:SG300-2
                                                       8PP-K9)-VSD
...

If you're using a switch by web interface, look on menu for "MAC Address Table > Dynamic Addresses".  For CDP it's under "Administration > Discovery (CDP) > CDP Neighbor Information".  (Or matching LLDP if using that instead of CDP.)
Answer: It depends on the switch model, but on an IOS based switch the command is
show mac address-table address xxxx.xxxx.xxxx
Example:
show mac address-table address 0000.5e00.0102
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0000.5e00.0102    DYNAMIC     Te1/0/2
Total Mac Addresses for this criterion: 1

The command show mac address-table will output the entire mac table.
Answer: Use these:
show cdp neighbor
show mac address-table
show ip arp

show cdp neighbor
This will show you other Cisco devices (Switches/Routers/WAPs/Fibre Switches) connected to the switch, tell you on which port they are connected to the switch, what their remote device name/IP are, and what model they are, and on what interface on the remote device they connect to that port on.
show mac address-table
This will show the MAC addresses to the ports, and is somewhat useful as you can use utilities to find the manufacturers, and you can get that info from the other devices individually.
However if you have portchannels/trunks you'll want to figure out where they connect to and check those devices again.
show ip arp
This will save you a TON of time, so long as you have an IP address configured on the switch for each VLAN that it contains for the local network there you can see what IPs in that network match what MAC addresses from the previous command.
Ie. this spits out a list of IP addresses to MAC addresses to VLANs.
You can easily use Excel to map the ports that have MAC addresses found in show mac address-table to the IPs that match the MAC addresses from show ip arp
Add in that if you're in a domain you can get the dnz zone file and match the IPS.
In a Windows Environment you can easily run DNSCMD on your Domain controller to quickly output a list of FQDNs to IPs and you can list most of your infrastructure by name to port.

Cisco Switch ports and MAC addresses


Will scapular winging effect my lifting performance?

Question: It seems so that I suffer from scapular winging. I would like to ask, would this reduce my strength on the powerlifting exercises of bench, dead, and rows?
Comment: Depends on the mechanism behind it, no way to tell. The scapula winging (scapula alata) can have neurological, purely muscular, and other causes. That's a question for a medical professional who can assess you properly IMHO
Comment: What does "it seems" mean? Have you been diagnosed by a doctor with winged scapula, or are you just guessing because you're able to see your scapula when you look in the mirror?
Answer: Certainly there are quite a few things that can come from this. You will more than likely be a reduction on stability in the shoulder region. When you perform exercises like bench presses, overhead presses, or pull-ups, stability in the shoulder blades is crucial for maintaining proper form and therefore could be dangerous.
You may also find that it limits your shoulder's range of motion. This restriction can make it challenging to perform exercises like shoulder presses or rows. Because of this restriction you might find improper scapular movement can increase the risk of shoulder and back injuries. For instance, bench pressing with scapular winging may strain the shoulder joint or lead to rotator cuff issues.
So get this checked out when you can man.


ASA 5506W AP the wrong image upload

Question: I tried upgrading ASA 5506W AP and upload the wrong image k9w8- full lightweight instead k9w7- autonomus. How to fix it
Comment: Are you going to rommon mode?
Just reupload right image.
Comment: How to do it? You can specify the procedure step by step.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: From the Cisco Documentation:
Recover and Load an Image for the ASA 5506W-X Wireless Access Point
To recover and load a software image onto an ASA 5506W-X using TFTP, perform the following steps.
Procedure

Step 1   Session to the access point (AP) and enter the AP ROMMON (not the ASA ROMMON):

ciscoasa# hw-module module wlan recover image

Step 2   Follow the procedure in the Cisco IOS Software Configuration Guide for Cisco Aironet Access Points.
Comment: How to connect to the ASA 5506W-X Series Access Point Locally?

ASA 5506W AP the wrong image upload


Is there any Form Analytics tool that works behind a login?

Question: I'm looking for a form analytics tool that works on a page after the user has logged in.
I came across some products that support heat map recording after login, but not form analytics.
Is there any tools available on the market?
Answer: All of the analytics tools I have used work on any page, regardless of being logged in or not.
I've used Google Analytics, Adobe Experience Cloud, & Matomo, and they all are capable of recording events before and after login. These tools are all basically JavaScript functions that send IDs and data to specific URLs, so you can track any event on the form by just firing off a line of custom JS. Errors, focus on a field, time on page, etc. can all be tracked depending on what your goals are.
Even if your page is behind a firewall or not connected to the rest of the internet, you can still use tools like Matomo where you install them on your own server instead of needing to reach Google's servers.
If none of those are options, you can also obtain some data using server logs each time the form is submitted. This can be useful if you are mostly interested in error and success rates. You can even get a sense for how long people spend fixing errors by looking at the timestamps between events.
Comment: Thank you Nathan, I thought about Google Analytics but then found out that to enable form analytics (recording how long people spend for each form fields, where they drop etc) it would take time to customize GA & GTM. Meanwhile for specialized tools such as Hotjar or Mouseflow there would be minimum effort to create a beautiful & useful dashboard. I also talked to Mouseflow team and they confirmed that they support form analytics after login with some extra scripts.


How to do this triangular arc warp text in photoshop?

Question: How to do this arc text in Photoshop?
I've tried using arc. but it's a circular. I don't know how to do it in angle like in the picture
Answer: Chances are that a vector-based application was used to create the artwork in your image. Photoshop can be used though. It all really depends upon desired final output. Photoshop doesn't output vector files. That may not be of any consequence for your use though.
In either Photoshop or a most other applications, you would need to create shapes from type (Type > Convert to Shape), then manually move paths and anchors using the Direct Selection Tool (White Arrow).
Very crude example animation....

There is no filter or effect which will add a hard angle to the bottom of text.
Answer: It's possible using a Shape Builder tool and Envelope Distort combination with the outlined text, a die cut shape and the character envelope shapes:

Shape Builder Tool + Alt between P, R, I, I, T, I and the Die Shape

Envelope Distort between M, V, E and the corresponding Envelope Shapes. Select the character and the shape and press Cmd + Alt + C Mac or Ctrl + Alt + C Win

Comment: ermm.. Photoshop `:)`.. but I agree if it were Illustrator `:)`
Comment: yeap, I did't see the tag


Broadcasting a transaction to be included in the next block

Question: Since the merge we have predictable block times of around 12-13 seconds. I want to broadcast my transaction in a way that it is highly likely to get included in the next mined block, e.g. the block 15565595 got mined, i broadcast my transaction right after and it should get included in block 15565596. However, when i look at my confirmation times on etherscan (time first seen and included in block) they are all higher than 13 seconds, despite setting appropriate gas fees (max fee - base fee with overhead + priority fee > 5 gwei and the block mined before being at ~50% gas usage) and the transactions are all included in the block after next block. I am using the go-ethereum client to sign transactions. Is there some parameter i have to specifically set or unset to make this happen?
Answer: The progradation of transactions to the network to be validated and the propagation of newly validated blocks to the network is not instantaneous.
When you send your transaction to a node to be broadcasted to the network, first the node will validate and make sure the transaction is valid, then it will send it to its neighbor nodes, which in turn will do the same until it is broadcasted through the network and reaches validators. At this point, chances are that some validators already gathered transactions to start validating and will not include any more transactions in their blocks, even though they may have plenty of transactions in the mempool but their block may be already full. They validate that block and broadcast it.
Your transaction could get into this block or wait for the next. So, probably there's nothing we can do to make sure that our transaction will certainly be added in the next block. Many things are happening. Sometimes it will, sometimes it won't.
One thing you could try is sending a higher gas price. This will increase the chances of your transaction being included in the next block, but will not ensure it.
Comment: I am aware of the basic process how transactions are included in a block. However, if a transaction is not included in a block that has only 50% gas usage (5 gwei tip), sent 10 seconds ahead of time, leads me to thinking that there is a flaw in block building or a different reason causing this issue.


Change in internal energy if temperature is constant and some moles of the gas dissociate

Question: "Change in internal energy is zero if temperature is constant because, internal energy is a function of temperature only."
Well, this is what I read everytime I study thermodynamics.
I came across a question where some heat (Q) was provided and due this heat supplied, a few moles of the gas dissociate. But, in this process, the temperature remains constant.
If temperature is constant, change in internal energy should be zero.
But, does this rule work even if some molecules dissociate?
Will the internal energy change(although the temperature is constant) due to dissociation?
Answer:
Change in internal energy is zero if temperature is constant because, internal energy is a function of temperature only

This true for an ideal gas, but not true for real gases where we get interactions between the gas particles. The obvious example of this is the Joule expansion. In this process no energy is added an now work is done so the internal energy remains constant. For an ideal gas the temperature does remain constant, but for real gases the temperature can increase or decrease depending on how the gas atoms/molecules interact with each other.
Your example of a dissociating molecule is basically an extension of this where the forces between the gas particles are strong enough to bind them into molecules.
In a Joule expansion some of the gas particles' kinetic energy is converted to potential energy or vice versa. The internal energy is the sum of the kinetic and potential energy while the temperature depends only on the kinetic energy. That's why when when the potential energy is significant the internal energy and the temperature are not simply proportional.
In the specific case of your dissociating molecule, we have to put work in to separate the parts of the molecule from the force binding them together, so the potential energy increases. The heat supplied to the system is going into the increase in the potential energy and leaving the kinetic energy unchanged. So the internal energy is increasing while the kinetic energy, and therefore the temperature, is not changed.
Comment: Due to dissociation, there is an increase in the KINETIC energy, right? So, the temperature will increase which is not get the case here.. Why did you say that POTENTIAL ENERGY increases?
Comment: @user166465 Where did I say the potential energy increases?
Comment: Well sorry. U said potential energy significant. I didn't get the potential energy part. Like, kinetic energy increases due to dissociation right? So why does the temperature not increase??
Comment: @user166465 if you take the example of a dissociating molecule then when the molecules dissociate the potential energy **increases** because we are separating the parts of the molecule against the force binding them together. If we don't add any energy then because the internal energy is constant the kinetic energy must **decrease** so the gas gets **colder**
. So we have to add heat to bring the temperature back to its original value.  That's why in your example we add heat but the temperature stays constant.
Comment: Okayy!!! So, though the temperature is constant, potential energy is increasing and hence there is an increase in internal energy right?!


Turbo System and Method of Installing

Question: I am the owner of SOHO Motorsports and we are in the process of designing a turbo system for a vehicle that is in our shop and I wanted to ask an important question before we begin building this turbo system on this vehicle.  Does this patent (patent # US6745568) include every single turbo system that requires the removal of the existing muffler on a vehicle?  Please let me know as we would like to know before we begin building this turbo system.
Answer: I see a key aspect of the claims as the turbocharger is attached to the exhaust system to sit at a point lower than the existing oil flow and a regulated oiling system is therefore used. One thing you might do is look at the 9 patent documents cited on the front page of this patent. They were all things looked at by the examiner when deciding if these claims were new. Generally speaking, anything taught in any of those documents is not covered by the claims of this patent. And you could do your own quick search in google patents for "turbo charger method remove muffler".
Answer: Claim 1 recites:

A turbocharger system for an internal combustion engine, comprising: a turbocharger having an oil inlet configured for being coupled to a pressure side of an oiling system, an oil outlet, an exhaust inlet, an exhaust outlet, an air charge inlet, and an air charge outlet; an oil pump in fluid communication with the oil outlet and configured for being in fluid communication with the oiling system; a pressure driven check valve in fluid communication with the oil inlet to prevent oil from flowing into the turbocharger when the pressure on the pressure side of the oiling system drops below a predetermined level; and mounting hardware for mounting the turbocharger to an exhaust pipe and away from the internal combustion engine, and at or below the oil level of the oiling system.

This looks narrower and somewhat different than every single turbo system that requires the removal of the existing muffler on a vehicle, would you agree? There are a couple other independent claims, though.

Turbo System and Method of Installing


Can lens coating be reapplied?

Question: If the lens coating is torn or worn of by extended use, is it possible to reapply it? I don't mean a do it yourself repair, but rather a repair performed by the manufacturer. It also may very well not be cheap, I realise that. Are there possibly some optical properties of the lens that are so delicate that they render a repair like this impossible?
Answer: Most likely not.  The lens coating would have to be removed before it could be reapplied in most, if not all cases and that would likely end up deforming the lens itself.  You could always completely replace the element if it is sufficiently damaged to be a problem, but it is unlikely that minor issues with the coating are going to cause significant issues.
Comment: What happens if you remove the coating when it's damaged rather than reapply it? Does removing all the coating is a proper way impact the image quality?
Comment: @micromachine yes, removing a coating would impact image quality as the coating is part of the design of the lens.  How much or little would depend on the coating.  It would also depend on if you could chemically remove the coating or needed to polish it off.  I'm actually not completely sure I still agree with my conclusion on this any more, but I still expect removal of the coating to be the main problem.
Answer: I've had scratched anti-reflective coatings on eyeglass lenses removed in the past. Since the coating had been on the lenses for a few months it did not all come off but left a slight tint over the entire lenses. I chose not to have them re-coated because I figured I would also scratch the new coatings.
It would probably be more economical to replace the front element of the lens than to have the original coating removed and then reapplied. And since the manufacturer would likely not even consider doing such a repair, you would probably have to find a third party lab to do the work.
Whether that would be more economical that just replacing the entire lens would depend to a great extent on the value of the lens in question. It would probably cost more to have a sub $500 lens repaired with a new front element than it would cost to find another used copy for purchase. On the other hand, with a $1,000+ lens it would likely be cheaper to replace the front element.
Answer: There was a time when this service was offered -- even to the point of coating lenses that were originally made without coatings (this was a moderately common service for higher end lenses between about 1948 and 1955 -- the same time frame in which factories were refitting shutters with flash sync contacts).
The cleaning process required before coating (at that time) involved very careful repolishing, which would remove any existing coating, and from what I've read, both Schneider and Carl Zeiss Jena optical factories continued to offer recoating service for their own lenses (at least models still in production) as late as the 1970s, perhaps longer.  This was only possible because they still possessed the figuring laps that had put the original curvatures on the lens surfaces, and the equipment to accurately (to a fraction of a wavelength) measure the final surface before applying the coating.
I've heard of this service being available recently, on a more generic basis, but I'm not certain I'd trust a shop other than the one that made the lens to ensure all the surfaces are correctly figured.  In general, if the lens is expensive enough to be worth this treatment, it's too expensive to trust to an unproven process that still costs nearly as much as finding a good replacement.
It is, however, worth being aware that some pretty bad surface damage (especially on the front element) can have nearly no effect on the images produced.  I've seen examples of lenses with significant chunks broken out of the front element, and the divot coated with black paint (to avoid stray refraction), being perfectly usable with a small exposure compensation for the lost area.
Answer: The effectiveness of lens coatings comes from their exact thickness, and the shared surfaces they have with both the glass (with known optical properties) and the air (with known optical properties), or in case of a multilayer coating, also coating to coating surfaces.
Wavelength/Half wavelength/Quarter wavelength based physickness and mathemagick are at play here. And you are measuring in nanometers.
Imagine the layers being tuned to a certain wavelength by their thickness - simply applying more won't make it more effective, but throw it out of tune. Adding an extra layer on top of an unknown material (if you tried to paint or spray a new coating over a damaged one) would give you unknown results.
In the case of a scratched through coating layer, a layer added on top would both have interfaces with the underlaying glass or layer, depending on the exact spot - this would not improve anything. Also, you would end up with an even more uneven coating-to-air surface which would be optically very disadvantageous.

Can lens coating be reapplied?


I can't activate features while deploying solutions in SPSD(SharePoint Solution Deployer)

Question: I download the SPSD from CodePlex http://spsd.codeplex.com/, Then I dropped the solution files in solution folder,Then I changed the Defaul.xml for deployment configuration,Then eveything deployed successfully, But feature is not activated while deploying the solution. Pls suggest some idea
Answer: I haven't done this but I think you should check this file Scripts/CustomTargets.ps1, there is this function
<code>function AfterDeploy($vars){
        #   Log "AfterDeploy (Custom Event)" -Type $SPSD.LogTypes.Information -Indent
        #     New-SPSite -Url '$vars["SiteUrl"]' -OwnerAlias '$env:USERDOMAIN\$env:USERNAME' -Name 'Test Site' -Template 'STS#0'
        #     Install-SPFeature -Path '[feature name]' -Force
        #     Enable-SPFeature -Identity '[feature name]' -Url '$vars["SiteUrl"]' -Force
        #     Enable-SPFeature -Identity [feature guid] -Url '$vars["SiteUrl"]' -Force
        #activate content type association feature in content web application
     }
</code>
remove the # to un-comment the line.
Comment: I tried that, Then not also it not activated, whether we need to Hardcode the feature id in that?@akbarali


How is voltage exactly created in a citcuit?

Question: I just began studying electricity and concept of voltage and this particular concept of voltage is so confusing. I have searched answer for this question everywhere and every answers stops short at saying that voltage is created by chemicals in a battery and nothing beyond this. You don't need to go deep into explaining chemistry but I just need an idea of how electric potential is created in batter and how it "forces" electrons in circuit to move. Like how is charges spearate in first place. If battery is not one to supply electrons in first place, then how come potential difference is created in battery which would then force electrons in wire to flow. If anyone can shine light on this, I really appreciate it.
Comment: Recharging a rechargeable battery is a bit like using an electric winch to drag a boulder up a hill, and then rolling it back down with the winch line attached to a generator...
Answer: You should start from a physics course. Learn what charge is, what is electric field, what is electric potential.
Basically negatively charged particles are attracted to positively charged particles. So if you have them separately, they will flow one to another and release some energy in the way.
Circuits are just engineering of physics. Chemical reactions in battery separates atoms to ions (positive charge) and electrons (negative charge), while wires allow them to flow.
Answer: Physics won't give you a 'why' answer, but it can give a 'how', or a 'sort of like this', if you're happy to think in terms of lower level things that can't themselves be explained.
Taking your specific case of a chemical battery. A battery is two different conductive materials (electrodes), separated by an ionic fluid (electrolyte). For instance a zinc plated nail and a copper coin pushed into a lemon makes a battery. This battery operates by exactly the same principles as any other.
The electrodes will tend to dissolve in the electrolyte to different extents. Solution involves the movement of some of the electrons on atoms to make ions. Some atoms hold tight to their outer electrons, some less so. This difference makes for a difference in the energy that is released or absorbed when atoms go in or out of solution, and also makes for a difference in the number of excess electrons (charge) that appears on each electrode as it reaches equilibrium with the electrolyte.
You can think of the different charges on the electrodes as causing a different 'pressure' of excess electrons. Some languages in fact use the word 'pressure' for voltage. If the electrodes are connected by a wire, this voltage difference causes electrons to flow along the wire.
More strictly, voltage is a measure of how much energy is involved when charge moves. You can see that this energy is intimately related to the difference in the energy of solution of the different electrode materials.
A lemon battery works, but does not work well. Most of battery technology is about finding electrodes with a large energy difference, that are cheap to make and practical to build into a battery, hence lead, nickel, lithium, and electrloytes that work well with them.
Answer: The voltages in a circuit are (usually) there because the circuit needs to be powered for it to work.
Maybe your question is more like: many circuits generate their own internal voltages. Especially many power supplies generate for example 5 V. How do they "know" what 5 V is ?
Although as explained in the other answers, certain chemical reactions like used in batteries result in a certain voltage. But as batteries wear out and may contain nasty chemicals, this is not a very practical way to generate a specific voltage. Also that voltage changes a lot over temperature and lifetime and charge level of the battery.
So instead most circuits use a special circuit as a reference, that circuit is called a bandgap reference circuit. It uses the physical properties of diodes and/or transistors to generate a (fairly) constant voltage. Such a circuit is used in almost every voltage regulator circuit and other circuits where a reference voltage is needed.
Using voltage divider circuits (consisting of just a couple of resistors) and amplifiers that bandgap reference voltage can be reduced or amplified to practically any value needed.


To whom do I pay capital gains tax on sale of property while residing abroad?

Question: I am a U.S. citizen, residing in Spain, who sold a property last summer in Washington DC. Where do I pay the capital gains tax? In the U.S. or in Spain? Or both (with a credit for tax paid to the country with the lower rate applied to the country with the higher rate)? And finally, do I also have to pay the capital gains tax to Washington DC? (Obviously, I am not a resident of DC).
Answer: As a US citizen you're taxed in the US on your worldwide income. You're also taxed in Spain. Check the tax treaty for specific conditions and avoiding double taxation, and what forms and how you should file in Spain. The US has the priority in this case since that's where the property is located.
Real estate is usually taxed by the jurisdiction in which it is located first. I.e.: even if you were not a US tax resident, you'd be taxed by the US for this transaction, but probably with higher taxation rates.
And yes, you're also taxed by DC, for the same reason, but for DC you may be taxed as a "non-resident". Check the DC laws, physical residency and tax residency may differ so it's not at all obvious. Tax treaties usually do not apply to State taxes, but not sure how DC is treated for tax treaties, you should probably consult with a Spanish tax professional (you may end up being double taxed due to the DC tax).
Comment: following up on this after having finished my federal taxes using TurboTax. Strangely, TT insists that I don't have to file DC taxes because I am a non-resident. The only way to have TT calculate DC taxes is if I change my data and pretend to have lived in DC. Additionally, see [See #44 of FAQs](https://otr.cfo.dc.gov/page/audit-division-frequently-asked-questions) that is specifically about a non-resident taxpayer. Still searching for a definitive answer re Wash DC taxes on capital gains
Comment: @punkish It's not just any capital gains, it's specifically real-estate capital gains (there's a difference). I don't know if DC taxes those for non-residents or not, I suggest you talk to a tax adviser who practices in DC.
Comment: thanks. As it happens, I did talk to a tax adviser practicing in DC (hard to find one from remote) and she basically declined to help since I've already done my federal taxes. So I need to look for another. Yes, I realize that real-estate capgains are different from stocks capgains. But please see the FAQ I linked in the comment above. I will also try and call the Office of Tax and Revenue, DC, and ask them directly.


Where can I buy the microphones that they use the Oscars and Grammys?

Question: Where can I buy the microphones that they use at the Oscars and Grammys?
And what are the microphone mounts and stands called? Do they have a specific name?
I don't necessary need the precise one that the oscars has, but as long at they look similar, a double mounted microphone with a foam cover.
Comment: Never seen before. Usually we se double Schoeps (two tubes). Like to find out as well.
Answer: Shures are often used at these shows for performances: https://www.shure.com/en-US/about-us/press/shure-captures-the-sound-of-music-icons-at-the-65th-grammy-r-awards
More details on the podium Schoeps: https://forums.prosoundweb.com/index.php?topic=84083.0
Answer: All or most of the big name awards shows use Schoeps microphones on custom presenter stands.  Typically there are two capsules, a cardioid and a hypercardioid.  The preamps are remotely mounted at the base and the whole thing mounted into a custom stand made by ATK (Audiotek).  The one we use mostly are wireless.  Two custom battery powered preamps are fitted into the base along with two Senneheiser wireless beltpacks.  This allows us to place these where needed and pull them clear of performances and particular camera shots. Of course the wireless version is easily converted to a hardwire position. This rig is also fitted into a fixed mechanism that allows the mics to disappear into the stage and telescope to match the presenters height perfectly.  This is known as the "pop up mic".  I am currently on an awards show where we have 3 RF setups.


Determination of a wave function

Question: How do you determine the quantum wave function for a specific case ?
I had a course about quantum mechanics, but I believe we never discussed how you get a specified wave function for a specified case. I am really curious about how this is done. I know how to work with wave functions, but where do they come from...
Comment: I'm not sure ai understand your question,  Presumably you would solve the time dependent Schrodinger equation for this specific potential, and its solutions would be the spatial wave functions $\psi(x)$
Comment: Can I suggest a book that explains what you want to know by worked example: Quantum Mechanics Demystified by David McMahon.  Look it up on amazon and read the TOC.
Comment: Course in QM usually include solving the Schrodinger Equation for simple scenarios like a Particle in a Box. Such examples are worked through in elementary QM textbooks - and even in general undergraduate texts.
Answer: In general, the way to find a wavefunction is using the time-dependent Schrodinger equation : $$i\hbar\frac{d\left|\psi\right>}{dt} = H\left|\psi\right>$$
Where H is the hamiltonian operator : it acts on the wavefunction $\left|\psi\right>$. Now, H is what will be the "equivalent" of forces in the Newton equation $\vec{F} = \frac{d\vec{p}}{dt}$, and it is going to depend on the problem you are considering.
I'm assuming you are not familiar with "bra" and "kets", and that you worked only with "$\psi(x,t)$" as is often the case in an introductory course. Although the equation I gave you is more general, we can re-express it in the "x" space as such :
$$i\hbar\frac{d\psi}{dt} = H\psi$$
Not so much different, but now H is a differential operator acting of $\psi(x,t)$. For a free particle, for example, we have $H = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}$
Finally, we often use a separation of variables $\psi(x,t) = T(t)\psi(x)$ to separate time and spatial part. This gives 2 equations :$$i\hbar T'(t) = ET(t)$$ $$-\frac{\hbar^2}{2m}\frac{d^2\psi}{d x^2} = E\psi(x)$$
In the case of the free-particle hamiltonian. Where E is a constant, and also the Energy of the particle !

Determination of a wave function


Can I have the IRS deduct my taxes owed from my stimulus check?

Question: I am filing my 2019 taxes and have never filed before, so I expect to get the $1200 stimulus check in the mail. The amount of federal tax I owe for 2019 is less than $1200. Instead of paying the IRS now and getting $1200 later, is there a way to simply have them deduct my taxes owed from the check?
Answer: While the system is essentially giving people an advance on a tax credit, trying to have the system account for the 2019 tax return balance would have made it too complex, and slowed everything down.
If you had submitted tax returns for several years, and used direct deposit for refunds, then your stimulus many would have already been transferred. If you had paid by check in the past, then sometime in the next few weeks or months you would receive a paper check, unless you filled out the online form to provide your banking information which might speed up the process.  In either of these cases waiting for the check/deposit before submitting your payment is the advice I would give if waiting helps you pay what you owe.
But there is a statement in your question:

I am filing my 2019 taxes and have never filed before

That means that the system has no idea if you will will qualify for the stimulus payment. You may be in the system for your 2018 taxes as a dependent, but unless you have filed in the past they won't send you a payment in the near term. It is possible that you can trigger a stimulus payment soon by submitting your 2019 return. But that would only be true if your 2019 tax situation has you as non-dependent.
But if you could be a  dependent on somebody else's  2019 return, you won't see any stimulus payment until the spring of 2021.
Answer: I don't think there is a way to do this. However, your 2019 tax payment is not due until July 15. So you can file your 2019 tax return now, but wait to send the payment until shortly before July 15, and hopefully you will get your stimulus payment before then.


Replacing entries of dice by average of it neighbours

Question: I am interested in Representation Theory. I came across the following answer while reading this question on Mathoverflow.

An example from Kirillov's book on representation theory: write numbers $1,2,3,4,5,6$ on the faces of a cube, and keep replacing (simultaneously) each number by the average of its neighbours. Describe (approximately) the numbers on the faces after many iterations.

However I do not understand how to approach this problem via representation theory.
Answer: Let the value on each of the six sides of the dice be $x_1, x_2, ... , x_6$
You can create equations for each new value. So for example, the value $x_1$ will be replaced by the average of $x_2, x_3, x_4$ and $x_5$
We can say that $x_{1,n+1} = \frac 1 4 x_{2,n} + \frac 1 4 x_{3,n}+ \frac 1 4 x_{4,n}+ \frac 1 4 x_{5,n} $
You now need to write down the other five equations.
The equation I have given you can be represented by the first row of the matrix below:
$\begin{bmatrix} x_{1,n+1}\\ x_{2,n+1} \\ x_{3,n+1}\\x_{4,n+1}\\x_{5,n+1}\\x_{6,n+1} \end{bmatrix} = \begin{bmatrix} 0 & 0.25 &0.25&0.25 & 0.25 & 0 \\ .&.&.&.&.&. \\.&.&.&.&.&.\\.&.&.&.&.&.\\.&.&.&.&.&.\\.&.&.&.&.&. \end{bmatrix}\begin{bmatrix} x_{1,n}\\ x_{2,n} \\ x_{3,n}\\x_{4,n}\\x_{5,n}\\x_{6,n} \end{bmatrix}$
You can then find out what happens to the matrix when you put it to a large power...
Comment: I am sorry. But I still dont see how.
Comment: If $X(n) = \pmatrix{x_1(n)\cr x_2(n)\cr \ldots\cr x_6(n)\cr}$ is the state after $n$ iterations, then $X(n+1) = A X(n)$ for a certain matrix $A$.
Answer: I don't know how to bring representation theory into the game. But anyway: Here is a solution proposal that simplifies and generalizes this problem at the same time.
Write any real or complex numbers you like on the faces of the cube $[{-1},1]^3$. Denote the average of the two numbers on the opposite  faces  $x_i=\pm 1$ by $z_i$, whereby $i$ is taken modulo $3$. Already after one step the numbers on opposite faces are equal. It therefore suffices to consider the iteration map
$$T: \quad z\mapsto z'$$
defined by
$$z_i':={1\over2}(z_{i-1}+z_{i+1})\ .$$
We now look what happens to the discrete Fourier transform of $z$ under $T$. Put $\omega:=e^{2\pi i/3}$ and
$$c_j:={1\over3}\sum_k z_k\omega^{-jk}\ .$$
Then
$$c_j'={1\over3}\sum_k z_k'\omega^{-jk}={1\over3}\sum_k {z_{k+1}+z_{k-1}\over2}\omega^{-jk}={\omega^j+\omega^{-j}\over2}\>c_j\ .$$
It follows that
$$c_0'=c_0,\qquad c_j'=-{1\over2}c_j \quad(j=\pm1)\ .$$
This shows that the $c_j$  with $j=\pm1$ (these encode the "oscillation" inherent in $z$) converge to $0$ under iteration, whereas the average $c_0={1\over3}(z_1+z_2+z_3)$ stays fixed. Therefore the limiting number on all faces of the cube is $c_0$.


Load postgis database with PK from two fields in QGIS

Question: I have a PostGIS database having a Primary Key from two fields id_cat and id_cdad. When I load this database in QGIS in my computer under Linux there are no problem. I unmark "Select ID" and I can mark more than one field in the combo box of Primary Key because there are a checkbox that let me do that. (QGIS 2.12 under Linux Mint 17.0)
Now I want to install my database in a computer under window, but there aren't the checkboxes close to the name of fields, so I can't to mark more that one field for define the primary key.
(QGIS 2.10 under windows 7)
Any suggestion?
Answer: I have updated the QGIS version to 2.12 on computer under window and I can see and mark the checkboxes so I have solved my problem.


When you buy bitcoin do you get the private key mailed to you?

Question: I'm very confused about how you get your private key and how you can transfer it.
Comment: Private keys generally are *never* transferred. They're created in the wallet software you are using, and never leave your device. Can you explain your setup, what software/sites you're using, what you're trying to accomplish, what you have tried so far, what you see, ...? It's hard to answer vague issues like this.
Answer:
When you buy bitcoin do you get the private key mailed to you?

No
There are lots of ways to buy bitcoin but usually I'd expect they don't involve creating a private key at all. You should ideally already have one before buying Bitcoin.
If you buy Bitcoin on a service that keeps your Bitcoins in some kind of customer account then most likely you don't have any private keys and are not the owner of Bitcoin - just the possessor of a kind of IOU.

I'm very confused about how you get your private key ..

It varies but perhaps the most common way is that you download and install a standalone wallet program and, the first time you run it, it generates a random private key and stores it in a wallet data file. Typically you never see it.

... and how u can transfer it

You rarely need to.
Many wallets have a function to create a backup. You then put that backup somewhere safe that is separate from your computer. That backup will contain the private key. If your wallet (or whole computer) is destroyed or lost, you can re-create your wallet from the backup.
Many wallets will give you a "recovery phrase", sometimes called a "seed phrase". Often of twelve or twenty-four words. You can save that recovery phrase somewhere safe (e.g. stamped onto a sheet of corrosion-resistant metal with a high melting point stored in a safe in another building). That recovery phrase can be used to re-create your private key in a new wallet on a new computer. Don't confuse the recovery phrase with a password or pass-phrase used to open a wallet.
Many wallets let you see the private-key in some form. There is a form called WIF. Again that can be stored somewhere safe and used to recreate a new wallet with the same private key.
If you don't like your current wallet and want to start using a new type of wallet, the safest process is to create a new wallet and, on the old wallet, create a Bitcoin transaction to transfer the money into the new wallet. Some wallets allow you to "sweep" keys into them which is the same process but uses only the new wallet to create the transaction.
Answer:
When you buy bitcoin do you get the private key mailed to you?

No. They generally transfer the BTC you bought to the address you specified.

how you get your private key

You don't get it.

First let's speak about your wallet, that is where you store your BTC assets.
If you are using web wallets like https://www.blockchain.com or hardware wallets like Ledger, you don't have direct access to your private keys. They store your private keys background, for security and accessibility reasons.
For security reasons, a wallet can have multiple private keys. When you received some BTC, the next time you click on "Receive" button, the wallet may show you different address. That's because the wallet generated new private key and new corresponding BTC address. Your wallet has the private key of all these addresses it generated, and your total money in the wallet is the values of all these addresses summed up.
When you send BTC, you just enter the destination, the fee, the transaction value. And the wallet itself will determine from which of your addresses it will send. And your wallet signs the transaction with the corresponding private keys.

Of course you can take a lower-level management, generate the private keys and addresses yourself, sign and broadcast your transaction yourself to send your BTC out to someone, by using Bitcoin Core or with a program you made by yourself. That's technical topic.

When you buy bitcoin somewhere, like https://www.paxful.com they work pretty much the same way. When you bought BTC, you don't directly get the private key. Instead, you can transfer the BTC bought to an address you specified. Then, the wallet of paxful will send the BTC to your address.

and how u can transfer it

You cannot transfer it, when you don't have private key itself. But you've no need to do so. If you want to move your BTC assets, you can just send your BTC to another wallet.

It might take some time to understand how BTC actually works - Fell free to ask me any question


Huge difference between timing of Azan-e-Fajir in normal days and in Ramadan?

Question: As we usually see in Pakistan that In normal days Azan-e-Fajir is recited about 4:30am-5:00am in summers and in winters it ranging 5:45am - 6:00am depending upon the location. But when Ramadan comes, timing of Azan-e-Fajir changes and move back mininum one hour from normal days.Why a huge difference occur in one day?
Why in one day this time moves back too fast?
why?What is the reason behind it?
Comment: in that case only the people who are from that country should answer. I find nothing wrong with the question
Comment: Your question seems unclear to me, you can't expect that other people may explain what happens in a country they don't know. But maybe reading the answer of this post [Can I pray salat  ul layl once fajr time satrts](https://islam.stackexchange.com/questions/47514/can-i-pray-salat-ul-layl-once-fajr-time-starts) might help you.
Answer: The time for Fajr is from dawn till sunrise.
Since fasting must begin at dawn, during Ramazan they hold the congregation closer to its starting time, it is convenient.
During normal days they delay it while remaining within the time limits, and this is a practice of the Hanafi madhab.

" ويستحب الإسفار بالفجر " لقوله عليه الصلاة والسلام " أسفروا بالفجر فإنه أعظم للأجر "

Isfar (appearance of whiteness) is recommended for the fajr prayer,
due to the words of the Prophet (God bless him and grant him peace),
"Delay fajr till whiteness for it fetches the maximum reward."

—   الهداية في شرح بداية المبتدي  ; [English translation]


[VB.NET]How to add a string item, returned from another form, to a list box at a specific spot in place of another?

Question: The idea is that there's a list-box with items, and say you want to modify an item in the middle of the list. You select that item and click "Modify" button and a new form appears with the previously selected item data from first form ready to be modified in a text-box. After modifying and clicking Ok the second form suppose to return that modified string to the first form and insert the modified string into the same spot instead of the originally selected item, so it looks like it was edited to the user.
Comment: So basically, you want to modify the selected item in the list box by opening a new form to input the new value?
Comment: Except, the string gets split() and placed in separate text-boxes on the second form. Then join() the modified values and return them as a single string to the first form and replace it with the original item from the list-box.
Answer: Edit:
Translated the pseudo code to actual VB.NET code to refresh my own memory :D
string = InputBox("Enter text")
// Do whatever you want with the string
x = listBox.SelectedIndex
listBox.Items(x) = string

You can try Content in place of Text too.
Comment: Thanks but this method is only good for a single line of text. It needs to apply to the string bring split with array's Split() and placed into separate text-boxes on the second form and vice versa back right instead of the original item.
Comment: Then you would store the string returned from `InputBox()` to variable, `Split()` it, put them into correct places, modify them if you need to and `Join()` or whatever you want to do to them.
Comment: Okay I see. But there's no Text property for SelectedItem for me.
Comment: I edited the answer with what I think should be more correct.
Answer: Make sure that the form that pops up is Modal.  Here is a simple example of what you can do.  (This assumes your listbox items are strings and is an example for editing up to three listbox items only.  If the list is going to be much larger you will want to pursue a different architecture.)
    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim intTextboxCounter As Integer = 0
    For Each i As Integer In Form1.ListBox1.SelectedIndices

        Select Case intTextboxCounter
            Case 0
                TextBox1.Text = Form1.ListBox1.Items(i)
            Case 1
                TextBox2.Text = Form1.ListBox1.Items(i)
            Case 3
                TextBox3.Text = Form1.ListBox1.Items(i)
        End Select

        intTextboxCounter += 1

    Next

End Sub

When this loads it will spin through the selected list items and put its value in a textbox. To update the values...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim intTextboxCounter As Integer = 0
    For Each i As Integer In Form1.ListBox1.SelectedIndices

        Select Case intTextboxCounter
            Case 0
                Form1.ListBox1.Items(i) = TextBox1.Text
            Case 1
                Form1.ListBox1.Items(i) = TextBox2.Text
            Case 2
                Form1.ListBox1.Items(i) = TextBox3.Text
        End Select

    Next

End Sub


Including sensitive values in PageReference when redirecting

Question: Controller for PageA processes some data, then redirects to PageB along with some sensitive values. How can I safely pass these values to controller for PageB? i.e. cannot put them in PageReference.parameters as they will be visible to users.
Answer: if you have such requirement you can go for visualforce wizard where you can share controller properties between two different pages by defining same controller for both pages.
In that way there will be no need to passing your secure data. Here is the detail tutorial about this.
Visualforce wizard
You can also use the crypto class to encrypt your data and send it through url parameter and decrypt again when required.
<code>// Generate an AES key for the purpose of this sample.
// Normally this key should be stored in a protected custom setting
// or an encrypted field on a custom object
Blob cryptoKey = Crypto.generateAesKey(256);

// Generate the data to be encrypted.
Blob data = Blob.valueOf('Test data to encrypted');
// Encrypt the data and have Salesforce.com generate the initialization vector
Blob encryptedData = Crypto.encryptWithManagedIV('AES256', cryptoKey, data);
</code>
Decrypt data
<code>// Decrypt the data - the first 16 bytes contain the initialization vector
Blob decryptedData = Crypto.decryptWithManagedIV('AES256', cryptoKey,      encryptedData);
// Decode the decrypted data for subsequent use
 String decryptedDataString = decryptedData.toString();
</code>
Comment: read the updated answer and mark it as answer if that work for you. :)


What magnification is required to see detail on Mars / other local bodies?

Question: I have a 125mm Jones Bird newtonian telescope (very shoddy) with 6x lens (2× + 3×) essentially we were able to see a very small O (yeah that's to scale) with varied shades of red.
Is Mars far away from earth right now relative to the average distance or is it just my telescope not powerful enough?
If I wanted to seriously have a chance at picking up significant features on Mars or perhaps pickup the rings of saturn or the red spot of jupiter, whats the minimum setup that I am going to need?

This setup would run me around 3,000 dollars:

Its named...
Celestron CPC 1100 StarBright XLT GPS Schmidt-Cassegrain 2800mm Telescope with Tripo... https://www.amazon.com/dp/B000ARFND2/ref=cm_sw_r_sms_c_api_x7mSBb39EAS9H
Would this be overkill? For $3,000 is this one of the better choices for local planetary observation?
Answer: You have several questions here:

Mars is relatively close to Earth right now (October 2018) - about 90 million km.
Is your telescope powerful enough for you to see detail on Mars?  From what you have said, it's difficult to tell.  You say you have magnification of 6x.  This is almost certainly wrong.  If you state the focal lengths of your telescope and its eyepieces we can work out the correct magnification available.  To see much detail on Mars you would need in excess of 100x magnification (same for Saturn, less for Jupiter), and ideally a lot more.  Your scope should be able to manage 100x.  However the Jones Bird design is known to be difficult to align (collimate) properly, so even with that magnification, you may just see a blur.  How much detail you can see will also be heavily affected by the state of the atmosphere - ideally you need a night when the air is calm. Sometimes a slight mist can indicate a steady atmosphere.
Would the CPC 1100 be overkill etc?  This is much more opinion based, but in short, yes - for a beginner anyway.  For an experienced observer, the answer is much more nuanced, and I'm not going to go into any of that.  The scope is generally regarded as pretty good for what it is.
Comment: If you're asking about Mars, it comes to opposition approximately every 26 months, and therefore it is closest to the Earth every 26 months. September 2019 will not be a good time to look at Mars. Maybe September 2020.
Comment: Ah- fair enough. If it were a beginner looking to become advanced? I know basic orbital mechanics and Im trying to learn to track from observational frames but know nothing of telescopes. I figured i could get the scope then figure a lot more of it out through experience. Would you recommend anything else from experience over that for the price?
Comment: Also thanks for the response. I know its a poor question- but I am severely interested in the hobby after even my first experience and want to get a jumpstart for my buck haha.
Comment: Checked the relative distance on new horizons. 9.8/15 so isnt the next best viewing time around september next year?
Comment: Ahhhh I needed to be looking for when the deldot goes from negative to 0, not from positive to 0. 2020-Oct-07 00:00 seems to be the next closest appearance from my coordinates, you were totally correct :).
Answer: It's a lot easier to see detail on Jupiter, or pick out the rings of Saturn than it is on Mars.
Although Mars is closer to us, Jupiter and Saturn are a LOT bigger - and so appear larger. And because Mars is closer to us, its apparent size changes a lot berween closest approach (opposition) and when it's further away. When it's close to opposition, it's significantly larger than when its further away; From memory, I think there's a least a 3X difference in apparent size.
Even when it's close, it's still pretty small. And unlike Jupiter and Saturn, where the details are easy to see, Mars tends to need more patience and practice. Look at jupiter or Saturn and the details are immediately obvious. Look at Mars, and you really want to keep looking for several minutes. Most of the time you may not see much, but every so often you'll get a bit of good seeing and be able to glimpse some detail. (planets are also best seen when higher above the horizon; when it's low, you're looking through much more atmospheric crud and turbulence).
You should certainly be able to see the rihgs of Saturn and details on Jupiter with your current scope - but even at high magnifications the planets are still going to be small.  We're spoilt by the full page images we see in magazine photos - through the eyepiece things aren't going to be anything like that big. Expect to see a small planet in the middle of the eyepiece - your O is typical :) .it may not be big, but can be nicely detailed.
A bigger aperture scope has more resolution, allowing you to see finer details, and allows more magnification before you get to the point where increasing magnification just makes things bigger and blurrier without showing more detail.
Typical maximum everyday magnification is usually around your aperture in mm, which you get with an eyepiece focal length equal to your scopes f-ratio (so 8mm for an f8 scope, and so on).
With very good seeing (steady atmosphere), which can be rare, you can go to around twice the magnification. This is what manufacturers usually quote as the maximum magnification; what they don't say is that it requires near perfect conditions which may only happen a few times a year.
I have a N11GPS, the model before the CPCs. Views are nice, and it's a good light bucket but it's a bulky and heavy beast that's a pain to move any great distance. Not a problem if you can leave it set up in an observatory, but if you have to take it in and out then you might want to consider some sort of trolley or balance better views with portability - I think the 8" fork mounted SCTS are probably the sweet spot between performance and portability.  I can lift an 8" on its tripod, but I have to move the 11" OTA+Mount and tripod separately.
Although the specs quote 661x as the maximum magnification, I've found that to be optimistic in practice - while I can use a 12mm eyepiece all the time (233x) It's very rare that I've been able to use an 8mm (350x) and I don't remember ever being able to use a 5mm eyepiece (576x). I think the quoted 661x is being wildly optimistic, at least for the seeing conditions where I am,  but those can vary significantly with location.  Just remember that a lot of the time, the atmosphere will limit how much magnification you can use.
But also remember, that for a lot of deep sky objects, it's more about light gathering than it is about high magnifications. Many objects work better at lower magnifications.
(By the way, magnification = focal length of scope / focal length of eyepiece, so a 10 mm eyepiece in a 700mm focal length scope will give you 700/10 = 70x magnification. Adding a 2x barlow doubles that, a 3x triples it, and using both multiplies by six - which is likely to be way over the useful magnification for the scope and won't do wonders for the image quality...)
Comment: Wellp, that last sentence with the mathematics behind magnification definitely helps. But basically, for Mars you need to calculate when it's at is closest, and highest in the sky? Thanks for the explanations on a lot of this stuff, super helpful to just hear someone else talk about what they did and know/have experience with.
Comment: Yes, that's basically it.  Since the geometry changes, some oppositions will have Mars reaching higher above the horizion than others. You might want to have a look at the free planetarium program called "Stellarium" - it'll show you what things look like now, or at any other dates.


How to properly transition from standard PGP keys to using subkeys?

Question: When I initially set up PGP, PGPTools didn't prompt me to create separate subkeys, as explained in the article "Creating the Perfect PGP Keypair". Now that I've learned a bit more about PGP, I'd like to transition to using subkeys properly. But I don't want all of my emails which I signed previously to no longer be valid. What's the proper way to transition to having multiple subkeys under the main key while keeping prior communications valid?
Answer: You should be able to add the additional subkeys to your master key pair, while still leaving the master keys intact. It doesn't matter if the "master keys" have been used for a while, you don't have to generate new master keys to add subkeys to it.
You linked to the article I usually recommend which describes this process, of using gpg --edit-key <key>, and then addkey. Once you have generated the subkeys, hide the private half of the master key in a safe place and just use the subkeys from now on (only bringing them out for "special occasions" such as singing other people's keys, revoking, or adding new UIDs or subkeys).

I don't want all of my emails which I signed previously to no longer be valid.

That won't be a problem; old emails should still show up nice and signed. The only way old emails that you signed previously can become invalid is if your master key that you signed them with gets revoked or expires. So long as the new signing keys are subkeys of your old keys, anything you sign with the subkeys will still show up as being signed by "your" key.
Encryption on the other hand might be a bit trickier. If you have used your master keypair for encryption in the past, you will still be able to decrypt your old messages, but you will have to fish out your master secret key from its safe place every time you do so.
Answer: I would create a separate pair.  The 1st key should be kept offline, or there isn't much use in having subs....though you must go to the offline machine to sign any keys you get from someone else, then bring them back to the online system.
I haven't messed with a personal HSM (Yubikey), but that may be able to ease the pain.


Extra soil near an existing tree

Question: I have a steep hill and in attempting to control erosion I built a small bricked wall (18" tall") and filled behind it with soil.  The wall is within the branches of a 15 year old maple.  Will the extra soil damage or kill the tree?
Answer: So the extra soil is not around the trunk? If several feet away it shroud not be a problem .It is not a recommend practice but my experience is mixed . One house built 20 ft away from a 18" diameter oak, and the tree died. At this house there is an 10 ft space between house and garage with an 18" diameter oak in between ,so foundations roughly 4 ft away on two sides and the tree was not bothered.
Answer: Yes, the additional soil will Very Likely demise the Maple Tree! Maples are exceptionally sensitive to Any weight on their root systems! eg, just driving a vehicle over the side of the root system 1 time can demise an established Maple of any size or age! And a few cm of standing water for a few weeks can also! It may take a couple seasons to become apparent, but its generally unsalvageable by then. The first part to deteriorate tends to be the part over the additional weight, but the deterioration continues to the rest of the tree.
Might be better to set the wall into the eroding soil rather than on top of it, thus it wouldn't be adding weight on top of the roots, yet still be effective at reducing the erosion(if all the soil washed away that would also finish the tree!)
To save the tree, I would recommend immediately removing all the additional soil, and any of the wall within the perimeter that's higher than the original soil level, even if the wall is (as is likely) narrow.
The Maple May survive if all the additional soil & that portion of the wall are removed immediately: Maples have survived having sand eg put over part of their root systems for a few days but then all of the sand immediately removed. Maybe 1 cm(!) total would be ok if After several years the tree is flourishing: But attempting to add more than about 1 cm, or trying to add 1 cm per year would likely demise it: Maples don't seem to ever adjust to the additional weight on their root systems, even if very gradually added over several years!
The deterioration doesn't seem apparent right away, as the effects tend to be gradual, but even if removed after a few weeks, & before any effects show, the trees tend to be finished: very old trees may last longer(maybe even 2 - 3 seasons), but gradually go. In order to preserve the Maple Tree, would suggest removing Every cm of the additional soil And the wall Immediately. Excellent question.

Extra soil near an existing tree


Unable to install unity-webapps in ubuntu 16.04

Question: I'm unable to install unity-webapps after upgrading to 16.04. All began as tweak unity was not launching. Now i'm unable to install it from synaptic package manager also as its indicating broken packages. Help please
Answer: If that's the only dependency then just type --
sudo apt install unity-webapps-service
followed by --
sudo apt install unity-webapps-common
Comment: Thank you for the follow up. But upon doing the above i got the following error: "The following packages have unmet dependencies:
 unity-webapps-service : Depends: webapp-container
E: Unable to correct problems, you have held broken packages" I tried installing webapp-container using synaptics package manager, but in vain. Its prompting to fix broken packages first
Answer: Steps to resolve issue
1- open terminal
2- type -- sudo apt install unity-webapps-common
3- type -- y -- to finish install
The above command should resolve your issue and allow you to install unity web apps and the corresponding dependences, this is due to the packages being replaced by unity-webapps-common.
Comment: When this is tried, response is:"The following packages have unmet dependencies:
 unity-webapps-common : Depends: unity-webapps-service (>= 2.3.8-0ubuntu3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
"
Answer: Finally got it solved. First had to install liboxideqt-qmlplugin; qml-module-ubuntu-web and webbrowser-app. Afterwards webapp-container could be installed. Finally unity-webapps-common and unity-webapps-service could be installed. All done using synaptics package manager. Once again thanking andy for support :)


Large scale analysis of matrix multiplications

Question: Let $\mathbf{A}_{m\times n}$ and $\mathbf{B}_{m\times n}$ be two random i.i.d matrices with zero mean and unit variance. Then, are the following large-scale analysis true (m,n go to infinity with fixed ratio)?
\begin{align}
\mathbf{A}^\mathrm{H}(\mathbf{B}\mathbf{B}^\mathrm{H})^{-1}\mathbf{A}=\frac{1}{m}\mathbf{A}^\mathrm{H}(\frac{1}{m}\mathbf{B}\mathbf{B}^\mathrm{H})^{-1}\mathbf{A},
\end{align}
as $\frac{1}{m}\mathbf{B}\mathbf{B}^\mathrm{H}\rightarrow\mathbf{I}_m$, where $\mathbf{I}_m$ is an identity matrix, we have
\begin{align}
\frac{1}{m}\mathbf{A}^\mathrm{H}(\frac{1}{m}\mathbf{B}\mathbf{B}^\mathrm{H})^{-1}\mathbf{A}&\rightarrow\frac{1}{m}\mathbf{A}^\mathrm{H}\mathbf{A}\\
&=\frac{n}{m}\frac{1}{n}\mathbf{A}^\mathrm{H}\mathbf{A}\\
&\rightarrow \frac{n}{m}\mathbf{I}_n.
\end{align}
Answer: If $m,n \to \infty$ with $\frac{m}n \to \lambda \in (0,\infty)$ (let's suppose that $n$ depends on $m \in\mathbb{N}$), and if you are saying that each $\mathbf{B} = \mathbf{B}_m$ is an $m\times n$ random matrix whose entries are i.i.d. drawn from a fixed (across $n$) probability distribution $\mu$ with zero mean and unit variance, then the behavior of $$ \frac1m \mathbf{B}\mathbf{B}^\dagger $$ is known to be potentially very far from $\mathbf{I}_m$, and even much worse its inverse. This is the content of the Marcenko-Pastur law, https://en.wikipedia.org/wiki/Marchenko%E2%80%93Pastur_distribution
On the other hand, products of matrices of the type you described appear in multivariate Fisher statistics, which is covered in Chapter 2.5 in a great book by Yao et. al., Large sample covariance matrices and high-dimensional data analysis. A revised edition can be found here: https://www.researchgate.net/publication/272093238_Large_Sample_Covariance_Matrices_and_High-Dimensional_Data_Analysis


How can I remove my Google account from my friends phone?

Question: I used my Google account to set up my friend's phone but she gets all my info. How do I stop my information from going to her phone?
Comment: Do you have access to your friends phone? If yes goto Settings->Accounts and select your account and click the three dot  and press remove to remove your account from that phone
Answer: Few things that may work:
Go to Settings->Accounts, select your account, press menu key or three dots and remove your account
If you don't have access to your friend's phone, then you can remote wipe it, but you'll probably want your friend back, so you can also change password of your google account to prevent access of account on phone
You might also be able to remove devices here: https://security.google.com/settings/security/activity


What is this style of design called?

Question:
I like this style and I want tutorials to learn how to do something like this
what should i type????
Comment: Type nothing. General graphic software user skills are needed. Write on the paper what common these cards have. Find, draw or write the same type of details and place them. Take any of those three cards. Think and you find: there's an idea that connects the items in the card. If you make your own, be sure that the idea exists. Its more than the color.
Comment: Technically these icons are pretty basic to copy in Illustrator. Look into basic Illustrator usage (shapes, strokes, fills, gradients). The hard part is to invent the designs. My advice is to go the other way around: Choose an object you want to draw in this style. Construct/draw a sketch of the icon by hand. Get inspired by (steal) details from other designs. Then try to make it in Illustrator. When you run into problems, solve those problems one at a time. If you know what to achieve and can show us what you have tried and what problems you encounter, it is much easier for us to help.
Answer: Terms that might describe it:

flat
line art
icons
trendy

But it doesn't have a particular name. In 20 years it might be called '2010s style'. :)
They are fairly easy to create (at least in terms of mechanically). Basic tutorials for any vector illustration art should get you headed in the right direction.
Answer: I don't think there is a "style" to name.
These are just simple icons, made from a combination of lines, shapes, strokes and fills.  Just basic Illustrator stuff, and nothing complex. The bottom parts of the cards have some gradient fills.
If you are want tutorials then you probably need to search for beginner tutorials that cover using the Pen Tool, the Polygon Tool, the Rectangle and Ellipse tools,  and tutorials that cover applying strokes and fills, and gradient fills.

What is this style of design called?


How to create a managed build in Eclipse Phortran that supports module dependencies?

Question: I have installed the new Phortran 7 as part of the PTP.
I want to develop my code using an OOP approach which requires me to have many modules
I have found that the managed build system doesn't understand dependencies in my .f90 files.
I was working on this problem for a day now. I will explain my problem using a "fake" project
My project have 2 files
main.f90, module1.f90
main.f90 :
program main
    use module1
    implicit none
    .....
    code...
    .....
end program main

module1.f90:
module module1
    implicit none
    contains
     .....
    code...
    .....
end module module1

When I compile this code using the managed make and build command in the IDE I get the following error:
Fatal Error: Can't open module file 'module1.mod' for reading at (1): No such file or directory
make: *** [main.o] Error 1

It seems like that makefile goes in the alphabet order
taken from the subdir file:
F90_SRCS += \
../main.f90 \
../module1.f90

OBJS += \
./main.o \
./module1.o

I did checked this and if the I compile the project in the order of modul1.f90 before main.f90 everything works great.
But I was under the impression that the IDE can automatically take care of this problem, the USE keyword in Fortran needs to tell the IDE what order to link the files.
Can someone help me with this, I have read in other threads that the managed make should understand dependencies.
Thank you very much.
Answer: I've made a little workaround trying to tell the makefile processor to find the dependences.
(Tested on Eclipse for Parallel Application Developers. Version: Juno Release. Build id: 20120614-1722)

Set Module and Include Paths (This numeral is cited)

If your source code contains INCLUDE lines or USE lines referencing
  modules in other files, Photran needs to know where to look in order
  to find these. It will not figure this out automatically. For each
  project in which you plan to use refactoring support,

Right-click on your project's folder in the Fortran Projects view
Click on Properties
Expand Fortran General in the list on the left, and click on Analysis/Refactoring
List the folders in which Photran
  should search for INCLUDE files and modules when refactoring. They will be searched in order from the first folder listed to the last.Subfolders are not searched automatically; you must include them explicitly.
Click OK

. 2.In the eclipse IDE make right click in your project folder then ->refactor->subprogram->introduce call tree. It should show you all the dependences in your modules.
You should be careful with the order of your modules:
with the module
module constants
  implicit none
  real, parameter :: PI=3.14
  real, parameter :: E=2.71828183
  integer, parameter :: answer=42
  real, parameter :: earthRadiusInMeters=6.38e6
end module constants
module constants2
  implicit none
  real, parameter :: PI2=3.14
  real, parameter :: E2=2.71828183
  integer, parameter :: answer2=42
  real, parameter :: earthRadiusInMeters2=6.38e6
end module constants2

it will run with (Code modified from here)
program test
! Option #1:  blanket "use constants"
!  use constants
! Option #2:  Specify EACH variable you wish to use.
  use constants, only : PI,E,answer,earthRadiusInMeters
  use constants2, only : PI2,E2,answer2,earthRadiusInMeters2
  implicit none

  write(6,*) "Hello world.  Here are some constants:"
  write(6,*) PI, E, answer, earthRadiusInMeters
    write(6,*) PI2, E2, answer2, earthRadiusInMeters2
end program test

but if you change
  use constants, only : PI,E,answer,earthRadiusInMeters
  use constants2, only : PI2,E2,answer2,earthRadiusInMeters2
  implicit none

for this
  use constants2, only : PI2,E2,answer2,earthRadiusInMeters2
  use constants, only : PI,E,answer,earthRadiusInMeters
  implicit none

You'll get the same error.
For a bigger program i've used the manual makefile option. But for debugging i've used Intel debugger idb because with the same makefile Photran's debugger did't put the breakpoints.
Best luck pal.


What do I need to do to install and run Code Sourcery on an x86 64-bit Windows host system?

Question: I have seen this question asked for a Linux host system but not for Windows.
I have a Windows 7 64-bit host system.  I am running into a 32 bit issue I think and I see this vague phrase in the Code Sourcery documentation.
"Therefore, even when running on a 64-bit host system, Sourcery CodeBench requires 32-bit host libraries. Consult your operating system documentation for more information about obtaining these libraries."
I can't find any documentation because I don't know what "these" libraries are.
Thanks,
Seth M King
Comment: As a CodeSourcery employee, I apologize for the vagueness of that documentation, and I'll let the right people know we need to fix it.
Answer: That sentence is really only for Linux users; a lot of Linux distributions don't include the basic system libraries (the equivalent of the stuff in c:\Windows\System) needed to run 32-bit applications.
Windows includes everything that's needed as far as this is concerned.