What is the number of synaptic vesicles in an axon terminal?

Question: Is there any research as to the average number of synaptic vesicles per axon terminal in a human neuron's axon? On top of that, what percentage of those vesicles are used in a single action potential cycle i.e. membrane depolarization, hyperpolarization and return to resting potential?
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/122697/discussion-between-bryan-krause-and-peter).
Answer: Short answer
Several to thousands of vesicles per synapse. In the cortex, 0-1 are released per typical synapse. At neuromuscular junctions or specialized CNS synapses there can be more.
Longer answer
It doesn't make much sense to talk about an "average", since there are different types of synapses with very different properties, but we can talk about some examples from synapses used as models. In Rosenmund & Stevens, 1996 they estimate about 10 readily releasable vesicles at one synapse in hippocampus. Rizzoli & Betz, 2004 count hundreds at a frog neuromuscular junction.
In hippocampus and neocortex, for a typical synapse there are from 0-1 vesicles released per spike. Higher release probabilities to activation of single cells are achieved by making multiple synaptic contacts; in a typical cortical synapse, there's really just one active site so a max of one vesicle released (Silver et al 2003; Auger & Marty 2000 and Abbott & Regehr, 2004 also discuss this a bit).
Short-term plasticity can strongly influence release probability (Abbott and Regehr 2004 is a good reference to thinking about synaptic computations like this). Multiple action potentials occurring quickly can cause a sustained increase in calcium concentration in the presynaptic cell, increasing release probability at otherwise low-probability synapses (short-term facilitation). Alternatively, many spikes over a longer time period or at higher probability synapses can exhaust the pool (short-term depression). Rosenmund & Stevens used this to estimate the readily releasable pool size of about 10: they triggered a ton of rapid-fire spikes and counted release events, finding only 10. Rizzoli & Betz mention that 10 seconds of 30 Hz stimulation (300 pulses) depleted the available vesicle pool.

Abbott, L. F., & Regehr, W. G. (2004). Synaptic computation. Nature, 431(7010), 796-803.
Auger, C., & Marty, A. (2000). Quantal currents at single‐site central synapses. The Journal of physiology, 526(1), 3-11.
Reyes, A., Lujan, R., Rozov, A., Burnashev, N., Somogyi, P., & Sakmann, B. (1998). Target-cell-specific facilitation and depression in neocortical circuits. Nature neuroscience, 1(4), 279-285.
Rizzoli, S. O., & Betz, W. J. (2004). The structural organization of the readily releasable pool of synaptic vesicles. Science, 303(5666), 2037-2039.
Rosenmund, C., & Stevens, C. F. (1996). Definition of the readily releasable pool of vesicles at hippocampal synapses. Neuron, 16(6), 1197-1207.
Silver, R. A., Lübke, J., Sakmann, B., & Feldmeyer, D. (2003). High-probability uniquantal transmission at excitatory synapses in barrel cortex. Science, 302(5652), 1981-1984.
Comment: Yeah, just seen that. I wrote the comment immediately after reading the first paragraph in second section :D
Comment: Sorry for not being specific. My focus is the neurons in the celebral cortex, will the answer still apply for that?
Comment: @Peter Neocortex and hippocampus are two parts of what is referred to as cerebral cortex.


Something wrong with hands armature orientation/offsets when retargeting animation

Question: I have human model generated with Human Generator addon. Next I import bvh I recorded on Deepmotion and retargeting its bones to my model bones with awesome Renim Node addon. And here is the problem, retargeting is good, except hands part. You can see on the screen it's not even intersection, hands bones of the model clearly don't follow the bvh armature. I've tried set offsets inside Renim bone nodes, but it's impossible to get something good this way. I've tried it on both metarig and rigify, all the same, all good, hands are bad. Rotation on both human and armature is quaternion. Maybe someone faced same problem and can point me to the solution?
Comment: Example with rigify https://imgur.com/a/ZGFe2OB
Answer: I just got rid of bvh import, got fbx from deepmotion then did all bones retargeting as I did before and achieve the exact thing I wanted. So, someone who is strangling with similar behavior and use bvh, try avoid bvh and use fbx instead if you have such an option.


Linking accounts in Dungeon hunter 5?

Question: I have played DH5 on Windows 10 PC. But I recently bought an android device and downloaded DH5 on it. I want my old character and stats on android too, but when I go to link devices on PC win DH5 app, it shows no code and keeps on saying make sure you are connected with Facebook on both accounts, which I am but of no use. How can I solve this problem?
Answer: I am in the exact same situation. I do not have a solution yet, but I've contacted their customer care by email. This is the recommended method for resolution of this conflict. You can access the customer care only from in-game. Login, click the "G" icon on top left, and from there click on Customer Care.

Linking accounts in Dungeon hunter 5?


What is stopping me from replaying an SSL certificate?

Question: Say I have the SSL certificate for google.com. I intercept it, edit the certificate with my own domain name and public key and use it to intercept all traffic to google.com. What mechanisms exist in the SSL certificate to prevent me from doing so?
Comment: Note that while properly designed browsers do verify the validity of SSL certs, some software (especially mobile apps) may not.
Comment: There is a hash that won't match and you can't regenerate a valid hash without the server's private key.
Comment: Does the SSL client detect such a hash mismatch?
Comment: Of course it does, if it didn't that would be a huge security issue.
Comment: Ah Ok. My follow up question sounded silly even in my head :-)
Answer: When a CA signs a certificate they encrypt a hash which includes the host name of the certificate target using their private key. When the client receives the certificate they decrypt the hash using the public key for the CA (which is baked into the client) and check that it matches the hash calculated by the client. If the hashes don't match then validation fails and the connection should be aborted.

If you modify the certificate to change the host name then the hashes won't match
If you try and sign the certificate again (ie. replace the hash with your own) then the client won't trust it because it wasn't signed by one of their trusted CAs.
If you try and present a legitimately signed certificate for another domain then obviously the validation will also fail because the domain doesn't match.

Of course the above assumes the client validates certificates correctly, which is not always the case.


Unique full text index?

Question: Is it possible to create a UNIQUE FULLTEXT index? I am using a mysql diff tool that is complaining that I am using duplicate indexes. I have a column that needs to be unique but also used for full text search.
Answer: Since there is a limit on the length of the index, if you want to guarantee the uniqueness of the whole field's value, you may want to add a hash field of that varchar field.
Steps:

Alter the table to add an MD5 field: alter table table1 add md5_of_column char(32)
Update this field: UPDATE table1 SET md5_of_column=md5(column);
Add the unique index: ALTER TABLE table1 ADD UNIQUE (md5_of_column)
Either create a trigger, or do it at application level, to update this new field after each insert/update operation.

Note that this solution might have a light performance hit.
Comment: Good idea about adding a hash. BEFORE trigger or application change should be better as we need to ensure uniqueness based on that.
Answer: Chris,
I don't think it is. You can always try.
(https://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html)
FullText Index are different than other indexes, it is meant for text search using Mysql specific function like MATCH.
It would not make sense to have a unique Index on a full text column where you would store text. I would create a "description" column varchar(200) for example and have this unique. If your text is not too large, you can store it as varchar(5000) or even bigger, but your index will be limited to the first 767 char. (An index key for a single-column index can be up to 767 bytes).
You would need to define the length of your index :
create table table1 (id int, stringCol varchar(5000)
create unique index idx_stringCol on table1(stringCol,760)

You might need to make index length smaller if column is using unicode.
Answer: Yes, it is possible but they will be two different indexes.
create unique index idx_val on table(column);
create fulltext index ftidx_val on table(column);

but as @greenlitmysql has mentioned you might see performance issues later on as the data grows (and length of column)...

Unique full text index?


Reply on same interface as incoming?

Question: I have a system with two interfaces. Both interfaces are connected to the internet. One of them is set as the default route; a side effect of this is that if a packet comes in on the non-default-route interface, the reply is sent back through the default route interface. Is there a way to use iptables (or something else) to track the connection and send the reply back through the interface it came from?
Comment: The keyword to search for this is source-based routing, or policy-based routing (naming used in routers). Source-based because routing is selected based on the source IP of the packet,
Comment: Worth noting if using modern systems with Netplan, see this complete answer:
https://askubuntu.com/questions/1169002/how-to-use-netplan-to-create-two-separate-routing-tables
Answer: echo 200 isp2 >> /etc/iproute2/rt_tables
ip rule add from <interface_IP> table isp2 prio 1
ip route add default via <gateway_IP> dev <interface> table isp2

The above doesn't require any packet marking with ipfilter.  It works because the outgoing (reply) packets will have the IP address that was originally used to connect to the 2nd interface as the source (from) address on the outgoing packet.
Comment: For me it worked only when I left out the `dev` param in the `ip rule` command, so running `ip rule add from  table isp2`
Comment: Wow, this is exactly what I was looking for. In case anyone is looking, for RH-based distros, you can put the relevant rule and route commands in files named 'rule-eth0' or 'route-eth0' (for example) which will be added or removed on ifup/ifdown. Place these files alongside the ifcfg-eth0 file. For IPv6, there is 'route6-eth0' functionality built in, but no 'rule6-eth0' built in (yet).
Comment: I had to remove `dev ` from `ip rule` to get it to work on my box. If I'm understanding right, `dev ` was filtering out packets which were somehow set on the wrong interface which needed to be wrested over to the correct interface by the overridden route but the rule filtering by interface was preventing that from happening.
Comment: You can make these be created when the interface goes up by adding `up ip rule add from  table isp2` and `up ip route add default via  dev ppp0 table isp2` to your /etc/network/interfaces under the relevant interface.
Comment: Like most other people, I had to remove `dev ` from the `ip rule` command for this to work. Please update the answer ! Except for that detail, it worked like a charm. Thanks a lot, @Peter !
Comment: For anyone reading this recently, the `dev ` everybody is talking about has already been removed -- it was the `dev ` on the `rule` line that was problematic, not the one on the `route` line (though I'm not convinced either of them is necessary).
Comment: I was looking for a solution like this for Openvpn, that ended up being this: https://unix.stackexchange.com/questions/522136/how-to-route-all-vpn-traffic-via-specific-hardware-interface
Comment: I've tried this on my home machine and it works perfectly (with dev  removed), but I can't for the life of me get it working on a dedicated server I rent.
Comment: You may want to add "strict arp replies" to your configuration as well with this. that is, set the arp_filter flag to "1" - https://unix.stackexchange.com/questions/31096/sysctl-parameter-for-correct-arp-response - arp_filter - BOOLEAN / 1 - Allows you to have multiple network interfaces on the same subnet, IOW it allows control of which cards (usually 1) will respond to an arp request.
/ 0 - (default) The kernel can respond to arp requests with addresses from other interfaces. This may seem wrong but it usually makes sense, because it increases the chance of successful communication.
Comment: Please correct answer with @cdauth suggestion!
Comment: Thanks for this answer, that's exactly what I needed to get a `curl --interface  ` bash call to work properly, where `` was not the primary one.
Comment: @markasoftware The `dev` specifier on the route is only necessary if you have multiple interfaces with overlapping subnet ranges, which is usually an indication of a badly-designed network environment.
Answer: The following commands create an alternate routing table via eth1 for packets that have the mark 1 (except packets to localhost). The ip command is from the iproute2 suite (Ubuntu: iproute Install iproute http://bit.ly/software-small, iproute-doc Install iproute-doc http://bit.ly/software-small).
ip rule add fwmark 1 table 1
ip route add 127.0.0.0/0 table 1 dev lo
ip route add 0.0.0.0/0 table 1 dev eth1

The other half of the job is recognizing packets that must get the mark 1; then use iptables -t mangle -A OUTPUT … -j MARK --set-mark 1 on these packets to have them routed through routing table 1. I think the following should do it (replace 18.104.22.168 by the address of the non-default-route interface):
iptables -t mangle -A OUTPUT -m conntrack --ctorigdst 126.96.36.199 -j MARK --set-mark 1

I'm not sure if that's enough, maybe another rule is needed on the incoming packets to tell the conntrack module to track them.
Comment: I'm sure you meant `127.0.0.0/8` not `/0`.
Comment: Nice. I forgot all about marking. That should get me there.
Answer: I had issues with the locally generated packets with the solution suggested by Peter, I've found that the following corrects that:
echo 200 isp2 >> /etc/iproute2/rt_tables
ip rule add from <interface_IP> table isp2 priority 900
ip rule add from dev <interface> table isp2 priority 1000
ip route add default via <gateway_IP> dev <interface> table isp2
ip route add <interface_prefix> dev <interface> proto static scope link src <interface_IP> table isp2

NOTE: You may run into syntax issues with the 4th line above. In such cases the syntax for the 4th command may be this now:
ip rule add iif <interface> table isp2 priority 1000

Comment: Tried so much but nothing worked at my scenario, except this.. many thanks.
Answer: I'm assuming you are running Linux and, further, that you are utilising a RedHat/CentOS-based distribution. Other Unix's and distributions will require similar steps - but the details will be different.

Start by testing (note that this is very similar to @Peter's answer. I am assuming the following:

eno0 is isp0 and has the overall default gateway
eno1 is isp1 and has the IP/range 192.168.1.2/24 with gateway 192.168.1.1

The commands are as follows:
$ echo 200 isp1 >> /etc/iproute2/rt_tables
$ ip rule add from eno1 table isp1
$ ip route add default via 192.168.1.1 dev eno1 table isp1

The firewall is not involved in any way. Reply packets would always have been sent from the correct IP - but previously were being sent out via the wrong interface. Now these packets from the correct IP will be sent via the correct interface.

Assuming the above worked, you can now make the rule and route changes permanent. This depends on what version of Unix you are using. As before, I'm assuming a RH/CentOS-based Linux distribution.
$ echo "from eno1 table isp1" > /etc/sysconfig/network-scripts/rule-eno1
$ echo "default via 192.168.1.1 dev eno1 table isp1" > /etc/sysconfig/network-scripts/route-eno1

Test that the network change is permanent:
$ ifdown eno1 ; ifup eno1

If that didn't work, on the later versions of RH/CentOS you also need to go with one of two options:

Don't use the default NetworkManager.service; Use network.service instead. I haven't explored the exact steps needed for this. I would imagine it involves the standard chkconfig or systemctl commands to enable/disable services.

or

Install the NetworkManager-dispatcher-routing-rules package

Personally I prefer installing the rules package as it is the simpler more supported approach:
$ yum install NetworkManager-dispatcher-routing-rules

Another strong recommendation is to enable arp filtering as this prevents other related issues with dual network configurations. With RH/CentOS, add the following content to the /etc/sysctl.conf file:
net.ipv4.conf.default.arp_filter=1
net.ipv4.conf.all.arp_filter=1

Reply on same interface as incoming?


Who played Hedwig?

Question: In the Harry Potter movies, was their a specific owl, or owls that played Hedwig? What are their name/names and in what movies did they appears?
Comment: @theik you know there were multiple owls used right? Much like with almost every animal actor.
Comment: @CandiedMango Yes, in fact, there were 9 according to the article. "He was the more enthusiastic of the 9 owl actors that played Hedwig". My point being that this question shows zero research effort, google has the answers quite easily.
Answer: There were actually at least eight different animal actors used to portray Hedwig throughout the Harry Potter movies, but Gizmo seems to have been the primary animal actor.
This article about animals in the HP movies explains:

Seven were needed to play Hedwig, the owl Hagrid purchased for the young wizard prodigy: named Gizmo, Kasper, Oops, Swoops, Oh Oh, Elmo and Bandit.

This other article mentions an eigth - White Terror Of The North. Why he was not mentioned in the other article is not clear, but he did not appear in The Sorcerer's Stone.

He starred in all the Harry Potter movies but the first

This same article mentions that there were nine owls used, but does not identify the others by name.

He was the more enthusiastic of the 9 owl actors that played Hedwig

The book The Animal Movies Guide mentions that Gizmo was the primary animal actor during The Sorceror's Stone.

Harry's own owl familiar is a snow named Hedwig, who was played mainly by Gizmo (Gizmo was doubled by Kasper, Oops, Swoops, Oh-Oh, Elmo, and Bandit).

This interview with the animal trainer for two of the HP movies backs this up

Q: For Harry's owl—Hedwig#151how many owls played Hedwig, or did you use just one?
Gary: There really is just one Hedwig—his real name is Gizmo. He has a couple of helpers that help him out with the different things. We have a lighting stand-in, so he doesn't have to do all of the lighting. And we have a couple of owls that will help him with his flying shots, so he doesn't have to do all of the flying shots himself.

HP Wikia mentions the possible ninth owl, Sprout, but the linked source does not actually make any mention of an owl by that name.
Comment: Huh. I was just researching all this to answer the other Hedwig question :-)

Who played Hedwig?


Redirecting to setup page problem

Question: I'm trying to access my already existing website that was clone from our repository. Now upon access it keeps on redirecting me to the Setup page. I'm not sure what happen but I already some suggested that the local.xml is missing. Now I'm not sure how to generate it or where to get it.. Also I'm already using our DB so it's not a fresh DB copy. How can I solve this? It keeps on redirecting me to the setup page.
Comment: Are u facing the issue on Magento2? There is no local.xml in m2
Comment: Yes in magento 2.3.1.. What will be the fix for this?
Answer: I've previously only encountered this issue once. On a cpanel server we set the web root as /public_html/pub instead of/public_html as per recommendations in magento guidelines before running install wizard.
The website kept redirecting to the setup wizard page. The solution was to set web root back to default and then install via command line. The install process checks the setup table to work out where it is in terms of versions. Once installed reset it back again to public_html/pub clear cache and it seemed fine.
Install process generates db access files env.php etc which stops the redirection.
Although I'm assuming you've got a db in place and can connect to it.
Answer: You should create the env.php with configs.
env.php reference
Answer: Same problem here on a fresh install.
The issue ocurring because the bin/magento setup:install was not finished properly.
After running again (fixing the errors that crashed the above command), everything worked as expected.

Redirecting to setup page problem


How to prevent users with negative balance of user points from viewing nodes?

Question: I have a rule that deducts 1 point from users viewing a node, however the problem is that users with a negative balance can still view a node. So I would want to prevent this.
I'm using Drupal 7 with modules Rules and User Points.
Any suggestions?
Comment: Do you want the user to still be able to see the content in Views and/or any menus, or should the content be completely unavailable to them?
Answer: Your question actually contains 2 challenges:

Which Rules Event to use?
Check the current balance of user points of the user?

Read on for an answer to address each of those challenges.
1. Rules Event to use
If you'd use Rules event node_view, then you're too late, because the node is already being viewed (which is exactly what you want to prevent). Instead you need to use (System) event "Drupal is initializing" (= init), which is actually BEFORE the node is actually being viewed.
2. Check current balance of user points
However, you also want to disallow viewing nodes for users who have a negative user points balance. The challenge with that is that there is no out-of-the-box Rules Condition to check that balance.
Have a look at this Rules example (in Rules export format):
{ "rules_stop_node_access_for_user_with_negative_points" : {
    "LABEL" : "Disallow node/* access for a user with negative points",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "userpoints_rules", "rules", "rules_conditional" ],
    "ON" : { "init" : [] },
    "IF" : [
      { "text_matches" : {
          "text" : [ "site:current-page:path" ],
          "match" : "node\/\\d+$",
          "operation" : "regex"
        }
      }
    ],
    "DO" : [
      { "userpoints_rules_get_current_points" : {
          "USING" : { "user" : [ "site:current-user" ], "tid" : "all" },
          "PROVIDE" : { "loaded_points" : { "total_points" : "Number of points in all categories together" } }
        }
      },
      { "CONDITIONAL" : [
          {
            "IF" : { "data_is" : { "data" : [ "total-points" ], "op" : "\u003C", "value" : "0" } },
            "DO" : [
              { "drupal_message" : { "message" : "You have insufficient points (you only have [total-points:value] points ...)." } },
              { "redirect" : { "url" : "no_access" } }
            ]
          }
        ]
      }
    ]
  }
}

The Rules Condition added here, is to only perform the Rules Action for attempts to browse a path like node/* (adapt to what fits for your case).
This rule retrieves, as the very first Rules Action (not Rules Condition!) the current amount of user points of a user. If it is negative, it will display an appropriate message starting with "You have insufficient points ...", and it redirects to a relative path like no_access (adapt to what fits for it).
This rule uses the Conditional Rules module, though you could also rework the Rules Action to performing Rules Components (in which you add the appropriate Rules Conditions), so that you don't need this extra module.
The clue to make this rule work is the very first Rules Action "Load user points of a user". Refer to my answer to "How to access current amount of earned userpoints in a Rules Condition?" for more details on this.
Answer: Add rule for node_view with custom php as condition. In condition check for negative points. If negative points, condition returns true. Execute custom php with drupal_access_denied()


Are there any celestial objects which emit radiation with non-blackbody spectra?

Question: Insofar as the blackbody spectrum is a "reasonably" good approximation for the radiation of the sun and presumably every ordinary star, and discounting objects which merely reflect light of some colour, are there any notable astronomical objects which emit radiation but are not well-approximated as blackbodies?
Answer: yes, there are, as follows. I'll list the ones I know and invite others here to add whatever I leave out.
First of all, there are synchrotron sources which comprise fast-moving electron beams interacting with very strong magnetic fields, causing the electrons to orbit the axis of the beam and radiate electromagnetic waves at radio frequencies. their spectrum is distinctly non-thermal, following some form of power law.
Then there is the so-called 21-centimeter line, which is microwave radiation corresponding to an energy transition in neutral intergalactic hydrogen. It is used to map the distribution of hydrogen in space. Redshifts for these clouds allow astronomers to infer their distances and hence their ages.
Then there are sources associated with particle/antiparticle annhilation, often of energy ~0.511MeV (for positron/electron processes) which might take place in the vicinity of supermassive objects.
Answer: Nebula, esp. Emission Nebula. Though there is some source ionizing them, they don't just reflect light--they absorb it and emit different non blackbody radiation according to various spectral lines--and thank God they do, because they really are beautiful.


Lowpass Lanczos filter

Question: I am new to Lanczos filters and trying to figure out how they can be used to generate a zero-phase lowpass filter with good time-domain properties.
This example shows how to implement such a filter in Python but does not give any justification for the choice of window length, despite it determining the filter order, which I would think a relatively important parameter. Also, I am not sure about its phase response.
Does anyone have insights about the uses of Lanczos filters in this sort of context, their pros and cons, and how to choose the window size objectively?
Answer: This is a rather late response, but I just came over this question. So if it could of any help to future problems for anyone, I will post an answer:
Although your question is pretty comprehensive; In my experience with the Lanczos filter, it is a rather versitale filter especially when it comes to image processing. I have mainly used it for scaling images, where the filter is a part of other FIR processes. To use it I would design the Sinc function(which is defined by the Lanczos resampling function) to be dependent of the following parameters: Upscale factor (N) and filter order (a). When I defined the window length it is a simple function of the two parameters which is:
k = (a * 2) + 1

and then the window space results in:
x = np.linspace(-a, a + (N-1), k*N)

where k*N is the length. The Lanczos Sinc function is then multiplied with the interval values.
This was to give a practical example. In other words, you need to know what you want to do with the filter. It is highly dependent on what you want to filter, and you need to define one (or more) parameter, besides the filter order, to define the actual window length to take full use of the filter.
To give a quick overview of the Lanczos:
It is just one of many ways to realize the Sinc function in practical terms, and it is quite good when it comes to image sharpening and interpolating between resampled discrete data points.
It does have some limitations though. If the range of values of the interpolated signal is wider than the range spanned by the discrete sample values, it can cause ringing artifacts which ultimately leads to clipping artifacts. However the effect of this is quite low compared to many other realizations of the Sinc function.
Comment: Thank you @ewol. For those interested in timeseries applications, I ended up implementing this in the [pyleoclim package](https://pyleoclim-util.readthedocs.io/en/latest/utils/filter/lanczos.html#pyleoclim.utils.filter.lanczos). I hope this is useful to whomever lands here.
Answer: Lanczos is a sinc function windowed by another sinc function, commonly used for image scaling.
To put it into a general context, I would view it as the «window method» of creating practical filters from sinc prototypes. The question then is «why does the first lobe of a sinc work particularly well for windowing a sinc when used for image scaling, compared to eg a rect window, a Hann window or something else.

Lowpass Lanczos filter


ps ax | grep java with no wrapping in the terminal?

Question: Is there a way to execute ps ax | grep java without it wrapping on the terminal?
Comment: which OS?  Which terminal app?
Comment: OS X Terminal specifically, but I've bumped into this on other platforms.
Answer: For me, ps doesn't wrap unless I do:
ps axw

However, you can set the screen width like this to truncate the output (but it won't override -w):
ps ax --width=80

You can also use the o (or -o or --format) option to include only columns that you are interested in, change or eliminate column headers and set the width of each column individually*. See man ps and search for "user-defined format" (multiple occurrences).
* setting a column width smaller than normal may change the way the contents or displayed or may not have an affect. For example, "args:20" doesn't truncate the output (unless it's not the last column) and "user:5" causes usernames longer than five characters to be displayed as the UID number.
Answer: I am not able to comment on Dennis Williamson's answer (maybe I have too few points for that); that's why I am writing a new answer.
You can do
ps ax --width=$COLUMNS

to get the output width adjusted according to the current terminal size. If your
favorite shell does not support COLUMNS environmental variable, you can use stty:
ps ax --width=$(stty -a | grep 'columns [0-9]*;' | sed 's|.*columns \([0-9]*\).*|\1|')

or more specifically (using single awk but making stronger assumption on the
stty -a output format):
ps -axw --width=$(stty -a | awk '/columns/ { printf "%d", $7 }')

All this is quite a bit of typing, so you might want to consider making the
above an alias or a shell function... :-) The above maybe needs to be adjusted
for your operating system (I cannot test now, I am not using OS X but Linux).
I have the following output for stty -a:
speed 38400 baud; rows 42; columns 178; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
...

Answer: Appending less -S at the end of any command would unwrap the command output on Linux terminal.
Example: 1 (Your original command appended with less -S)
ps ax | grep java | less -S

16338 ?        Sl   725:52 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.moduleName=/opt/mqm/mq_mount
23137 ?        Sl   498:18 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.moduleName=/opt/mqm/mq_mount
34753 ?        Sl   492:43 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.moduleName=/opt/mqm/mq_mount
39519 ?        Sl   486:47 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.moduleName=/opt/mqm/mq_mount
42071 ?        Sl   494:36 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.moduleName=/opt/mqm/mq_mount

Example: 2. Even better, next command reveals % CPU and Memory consumption of each Java thread/Process ID.
ps aux | egrep 'java|USER' | less -S

USER         PID  %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
Kathpalia   14876  0.0  0.0 103328   864 pts/0    S+   09:31   0:00 egrep java|USER
Kathpalia   16338  2.7  9.4 5932240 953984 ?      Sl   Mar22 726:00 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.
Kathpalia   23137  2.3  5.3 5875976 542084 ?      Sl   Mar25 498:26 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.
Kathpalia   34753  2.3  4.6 5837004 469692 ?      Sl   Mar25 492:51 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.
Kathpalia   39519  2.3  4.2 5824768 429004 ?      Sl   Mar25 486:55 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.
Kathpalia   42071  2.3  4.0 5825876 408612 ?      Sl   Mar25 494:44 /usr/java/jdk1.8.0_60/bin/java -Dinstall4j.jvmDir=/usr/java/jdk1.8.0_60 -Dexe4j.

It's true for any generic process:
ps aux | egrep 'MyGenericProcess|USER' | less -S

PS: For Linux 6.x or higher, grep -E can be used instead of egrep


How many observations needed to reach 90% confidence?

Question: Let's say I have a pool of 1,000 marbles. Most likely they are all red. Maybe a few black. How many marbles do I need to look at (assuming each outcome is red) before I'm 90% confident that 99% of the marbles are red? What is this type of analysis called? Have I defined all the necessary parameters?
Comment: My answer to https://www.quora.com/I-have-burned-200-disks-and-I-want-to-make-sure-that-they-are-all-in-perfect-working-order-What-is-the-smallest-size-sample-I-could-test-in-order-to-be-relatively-confident-that-98-of-all-the-disks-are-fine-burned-correctly doesn't answer your question directly, but should help. Since it's not part of SE, you may want to take it, modify it, and post it as an answer here.
Answer: The way you worded your question sounds a bit off. Taken literally, we never have a confidence that a parameter equals a point value. Usually, we talk about confidence intervals, or the probability that a parameter lies within a given range. As you know, the larger our sample, the smaller that internal will be (the more precise our estimate will be).
So the problem with your working is that we can draw large samples and get a confidence interval from, say [80%-100%], a larger one gives us [90%-100%]. A really large one gives [95%-99%] maybe a huge one [96%-98%] (all using 90% confidence). So only that last draw with a huge sample gives us a range that excludes your query of 99%. But that last example also suggests that you have more than 1% black marbles.
I wasn't sure whether you meant to ask "90% confident that at least 99% of the marbles are red"?
To pursue your analysis (which is known as a statistical power analysis), we do need to make an assumption about the true proportion of black marbles. If we assume it's zero, then the power analysis will simply conclude all samples of any size are 100% red. That does us no good.
So we pick a different starting assumption: 1% black. Any sample we draw has an expected proportion of 99% red, but we have to construct a sampling confidence interval around that that depends on the degree of confidence (90%) and the true proportion of red marbles we're assuming (99%). Again, we use the "true" or asserted proportion because we're asking a hypothetical question.
The usual Normal approximation to the confidence interval would be .99 +/- z(.95)*sqrt(p(1-p)/n), where z(.95) is the inverse normal CDF that leaves 5% in each tail = 1.64. But this leaves you with a confidence interval that will likely exceed 1.0 on one side and that ought to tell you something's fishy.
Turns out the normal approximation isn't great when p is very small or large (near 0 or 1); some people use the Poisson distribution in this case, and there are other approximations to the confidence interval outlined in this Wikipedia article: https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval
My experience is that the Poisson is a better approximation for these "rare event" scenarios. Fix the sample size at, say, 100. If we're assuming 1% of balls are black, then that's 1 ball in our sample. A Poisson(1) distribution has a 37% chance of seeing 0 blacks, 37% seeing 1 black, and 18% seeing 2 blacks. The cumulative probability of those 3 cases is 92%. So if we observe 3 or more balls being black in a sample of 100, we could reject our starting assumption that k=1 with 92% confidence.
The probability of 3 blacks in that distribution is 6%, and the CDF up to 3 blacks is 98%, so if we observe 4 or more balls we can reject the hypothesis of 1% black with 98% confidence.
Bottom line - this all depends on my interpretation of your question being correct, and there are multiple approximations for these "rare event" scenarios. (see the Wikipedia article)
Comment: "99% of marbles are red" is usually understood to mean "at least 99% of marbles are red."  An important part of the question's phrasing, "look at ... before," suggests it is asking for a *sequential sampling* approach, not a power analysis (which could be carried out accurately with a Binomial model in any event).
Comment: Thank you for the correction - I see now the poster meant "continue to sequentially draw red marbles".
Answer: You would have to pick 188 red marbles in a row to be 90% confident that at least 99% (or 990) of the 1000 marbles were red.
This is a Bayesian approach, and is effectively a copy of my answer to
https://www.quora.com/I-have-burned-200-disks-and-I-want-to-make-sure-that-they-are-all-in-perfect-working-order-What-is-the-smallest-size-sample-I-could-test-in-order-to-be-relatively-confident-that-98-of-all-the-disks-are-fine-burned-correctly
Suppose you randomly pick 50 marbles and they are all red.
If there were exactly 100 red marbles (900 black), you could do this
in Binomial[100,50] or 100891344545564193334812497256 ways.
If there were exactly 101 red marbles (899 black), you could do this in
Binomial[101,50] or 199804427433372226016001220056 ways.
In other words, it's
199804427433372226016001220056/100891344545564193334812497256 (which
is 101/51) more likely there are exactly 101 red marbles than there
are exactly 100 red marbles.
In general, there are Binomial[n,50] ways there can be exactly n red
marbles if you picked 50 marbles and all were red.
How many ways can there be at least 990 red marbles (990 = 99% of 1000):
Sum[Binomial[i,50],{i,990,1000}] =
81531993898242794598076623570369772515365019903144264043266969772686950795976808446840
How many ways can there be n red marbles for any value of n?
Sum[Binomial[i,50],{i,0,1000}] =
185684734874564765959015411764819077718596543052359268997222801777737175488143399579280
(which also happens to be Binomial[1001,51])
So the chance we have 990 or more red marbles (if we pick 50 red in a
row) is
81531993898242794598076623570369772515365019903144264043266969772686950795976808446840/185684734874564765959015411764819077718596543052359268997222801777737175488143399579280
or about 43.91%
Now, if we change 50 marbles to k marbles, the chance of 990 or more
red marbles is:
Sum[Binomial[i,k],{i,990,1000}]/Binomial[1001,k+1]
Some results:

To be 50% confident you have 990+ red marbles, pick 60 red marbles.
To be 75% confident, pick 117 red marbles.
To be 90% confident, pick 188 red marbles.  (this is the answer to your question).
To be 95% confident, pick 237 red marbles.
To be 99% confident, pick 340 red marbles.
To be 99.5% confident, pick 380 red marbles.
To be 99.9% confident, pick 464 red marbles.
To be 99.95% confident, pick 496 red marbles.
To be 99.99% confident, pick 564 red marbles.
To be 99.995% confident, pick 591 red marbles.
To be 99.999% confident, pick 646 red marbles.

And, of course, to be 100% confident that 99% of the marbles are red,
pick 990 red marbles.
Given how big these numbers get, using a normal distribution approach
may have been better, though slightly less accurate.


Tightness condition in the case of normally distributed random variables

Question: Let $(X_n)_{n\geq 1}$ be a sequence of random variables such that $X_n\sim N(\mu_n,\sigma_n)$ for all $n\geq 1$. Then i'm trying to deduce that if $(X_n)_{n\geq 1}$ is tight in the sense that
$$
\forall \varepsilon>0\,\exists r>0: \sup_{n\geq 1}P(|X_n|>r)<\varepsilon,
$$
then $\sup_{n\geq 1} (|\mu_n|+\sigma_n^2)<\infty$.
My approach so far has been to assume that $\sup_{n\geq 1} (|\mu_n|+\sigma_n^2)=\infty$ and then try to show that $(X_n)$ cannot be tight. Under this assumption me must have that either $\sup_n |\mu_n|=\infty$ or $\sup_n \sigma_n^2=\infty$. In either case I'm not sure how to show that for $r>0$ the following
$$
P(|X_n|>r)=\int_{(-\infty,-r]\cup [r,\infty)} \frac{1}{\sqrt{2\pi \sigma_n^2}}e^{-(x-\mu_n)^2/\sigma_n^2} dx
$$
is not arbitrarily small. Is this the right approach?
Comment: Your logic is wrong. You are going to prove that if $\sup_n (|\mu_n| + \sigma_n^2) = + \infty$ then $(X_n)$ is not tight, which is true, but not what you want.
Comment: Thanks, I made a mistake writing it up, and i've edited it. I want to show that $(X_n)$ being tight implies $\sup_n (|\mu_n|+\sigma_n^2)<\infty$.
Answer: Event if it is not necessary, I would rather distinguish two cases: the case $\sup_n |\mu_n| = + \infty$, and the case $\sup_n \sigma_n = + \infty$
1) If $\sup_n |\mu_n| = + \infty$: note that $\mu_n$ is the median of $X_n$. Hence, $\mathbb{P} (|X_n| > |\mu_n|) \geq 1/2$. For all $M> 0$, there exists a $n$ such that $|\mu_n| \geq M$, and for this value of $n$ we get $\mathbb{P} (|X_n| > M) \geq 1/2$. hence, for all $M \geq 0$, we have:
$$\sup_n \ \mathbb{P} (|X_n| > M) \geq 1/2,$$
which contradicts the tightness. Actually, one can also prove that, in this case, $\sup_n \ \mathbb{P} (|X_n| > M) = 1$.
2) If $\sup_n \sigma_n = + \infty$: note that the density of the law of a normally distributed random variable of mean deviation $\sigma$ is bounded above by $(\sigma \sqrt{2 \pi})^{-1}$. Hence, for all $m > 0$ and all $n$,
$$\mathbb{P} (|X_n| \leq M) \leq \int_{-M}^M \frac{1}{\sigma_n \sqrt{2 \pi}} \ dx = \frac{M}{\sigma_n} \sqrt{\frac{2}{\pi}},$$
so that:
$$\sup_n \ \mathbb{P} (|X_n| > M) \geq \sup_n \left( 1- \frac{M}{\sigma_n} \sqrt{\frac{2}{\pi}} \right) = 1.$$
Comment: Excellent answer. Thanks alot!
Answer: Let $M:=\sup_{n\geq 1}|\mu_n|+\sigma_n^2$.
Let $n\geq 1$ and $r>0$. Then
\begin{align}
P(|X_n|>r)&=\frac 1{\sqrt{2\pi \sigma_n^2}}\int_r^{+\infty}\exp\left(-\frac{(x-\mu_n)^2}{2\sigma_n^2}\right)dx\\
&=\frac 1{\sqrt{2\pi \sigma_n^2}} \sigma_n\int_{\frac{r-\mu_n}{\sigma_n}}^{+\infty}\exp\left(-\frac{t^2}2\right)dt\mbox{ substitution }t=\frac{x-\mu_n}{\sigma_n}\\
&=\frac 1{\sqrt{2\pi}}\int_{\frac{r-\mu_n}{\sigma_n}}^{+\infty}\exp\left(-\frac{t^2}2\right)dt
\end{align}
and $\frac{r-\mu_n}{\sigma_n}\geq \frac{r-M}{\sigma_n}\geq\frac{r-M}{\sqrt M}$ so
for all $n\geq 1$ and for all $r>0$ $$P(|X_n|>r)\leq \frac 1{\sqrt{2\pi}}\int_{\frac{r-M}{\sqrt M}}^{+\infty}\exp\left(-\frac{t^2}2\right)dt,$$
which gives tightness since the last integral doesn't depend on $n$ and converges to $0$ as $r\to\infty$.
Comment: Thanks for your reply, but unfortunately I wrote by mistake that I was trying to prove $\sup_n |\mu_n|+\sigma_n^2<\infty$ implies $(X_n)$ being tight in the original post. I've now edited the original post, and it's actually the other way around i'm trying to show. Sorry for the inconvenience.
Comment: Yes I realize now you edited your post when I was typing. I will think on your problem now.


What is a 'basic region' in calculus?

Question: What is a 'basic region' in calculus? My friend told me that a basic region is defined as a connected set in which the total boundary consists of a finite number of continuous curve of the form $y=f(x)$ or of the form $x=g(y)$. Is the above definition correct?
Answer: As far as I am aware, "basic region" is not a standard mathematical term in reference to calculus.
However, in this economics text, we find the definition
"A basic region is a connected set in which the total boundary consists of a finite number of continuous arcs of the form $x_2=\phi(x_1),x_1=\psi(x_2)$."
Carefully note that this is not the same as what your friend said, and is actually not even close. It's easy to see that your friend's definition allows for self-intersecting curves, while this one does not. The difference between the "and" and the "or" here it critical.

What is a 'basic region' in calculus?


generate unique mnemonic with password(only)

Question: I am trying to create an exodus like wallet, where for the first time user just need to enter the password to register on wallet.
The method I thought, running PBKDF2 on the password with empty salt and using that as an entropy for entropyToMnemonic() from bip39, which I found here.
But the problem with this method is when two users will have same password then the mnemonic will be same.
How can I get uniqueness using this method. Something like how metamask manages the wallet.
Answer: Entropy implies randomness.
Using deterministic algorithms on a password is not entropy and SHOULD NOT be used!
I would recommend researching how to gather entropic data from whatever programming language you're using.
Comment: Yeah I know entropy should be completely random, but as the password will only belong to the user, I guess there shouldn't be any issue. And again with this method somehow I need some uniqueness such that two same passwords on different systems doesn't generate same entropy.
Answer: To the entropy from the user's password, you need to add the time and date of the password creation, as well as any geolocation. In this case, the entropy will be more universal.


How do I view animation without rendering?

Question: Is there a way to preview the entire clip? The timeline does have another mode where it allows you to see in seconds, but it doesn't help much. It's kind of annoying to wait for it to render everything just to check if things are moving too fast or slow. I just want to know if the flow of movement is going smoothly because when you hit the play button everything moves so slow it's hard to tell.
Answer: You can choose the display mode you want, like Solid, then go into camera view and View > Viewport Render Animation:

It will export the movie or images into the folder and in the dimensions set in the Output panel. To watch the result go into Render > View Animation:

As pointed out by Gordon Brinkmann: Another advantage of this method is you can render any view you like from angles other than the camera view.
Comment: Oh man, be slower!!! Why do I even start answering?
Comment: If I'm awake don't even try!!
Comment: *lol* I was just about to finish my answer by adding, another advantage of this method is you can render any view you like from angles other than the camera view (you don't even need any camera for the viewport render) if this helps to see certain parts of the animation better.
Comment: Sure I'm going to add that, thanks
Comment: You two are funny, but I agree. It is always a race against time when moonboots is awake. :D
Comment: I leave you all the questions about GeoNodes (and Python things)   ^^
Answer: For this, I would usually change the render engine to Workbench, and then render the animation out. I think, you can output file format as  FFmpeg Video in MPEG-4 Container. This way, You have a video output to see all the movement without any lag.


Product in $\mathbb{R}$ vs product in $\mathbb{R^2}$

Question: The set of complex numbers is the set of ordered pairs $\{ (a,b): a,b \in \mathbb{R} \}$ together with the operations of sum and product thus defined: $(a,b)+(c,d)=(a+c, b+d)$, $(a,b) \times (c,d)=(ac-bd,ad+bc)$ (I'm using '$\times$' for product in $\mathbb{R^2}$, '$\cdot$' for product in $\mathbb{R}$). Also, considering the set $\mathbb{C_0}=\{ (a,0): a \in \mathbb{R} \}$ we know that the set of complex numbers can be regarded as an extension of $\mathbb{R}$ since there is a bijective function $\phi: \mathbb{C_0} \rightarrow \mathbb{R}$ such that $\phi[(a,0)]=a$, that allows us to identify $(a,0)$ with $a$. Now, when we introduce the algebraic form of complex numbers, we write $(a,b)=(a,0)+(0,b)=(a,0)+(0,1) \times (b,0)=a+i \cdot b$, but who allows us to turn the operation of product $\times$ in $\mathbb{R^2}$ into the operation $\cdot$ defined in $\mathbb{R}$? (The same question could be asked for $+$)
Comment: That $\cdot$ in $i \cdot b$ is formal.  So is the $+$ in $a+i\cdot b$.
Comment: You should already be asking this about the addition sign, as $a+_{\mathbb c}b\equiv(a,0)+_{\mathbb c}(b,0)=(a+b,0+0)$ is the addition of two complex, which is defined via the ordinary addition of reals. As the two operators enjoy the same group properties, overloading is not a problem.
Comment: See also https://math.stackexchange.com/a/3556451/442
Answer: I think this is a classic case of abuse of notation. If you write $(a,b)+_{\mathbb{R}^2}(c,d)=(a+_{\mathbb{R}}b, c+_{\mathbb{R}}d)$, the confusion disappears. More specifically, this is how we define addition in $\mathbb{R}^2$. Indeed, you add component by component and then write it up as a vector. The same is true for $\mathbb{C}$, indeed $z+_\mathbb{C}w$ = $(z_1+_\mathbb{R}w_1) + i(z_2+_\mathbb{R}w_2)$, where $z=z_1+iz_2$ and $w=w_1 + iw_2$. Thus when we write $+$, we usually have different kinds of addition in mind.
Answer: One could argue that $\phi$ as defined in your question is a group morphism between $\left(\mathbf R,+\raise-1.5ex\mathbf R\right)~\&~\left(\mathbf C^*,+\kern-1pt{\raise-1.5ex{\mathbf C_\left|\mathbf C^*\right.\!}}\right)$,
where $\mathbf C^*$ is the set of complex numbers with a zero imaginary part, which justifies the use of the same symbol ($+$) in both cases

Operator overloading as a computer scientist might say

As rigour was at stake here, I denoted  $+\kern-1pt\raise-1.5ex{\mathbf C_\left|\mathbf C^*\right.\!}$ the restriction of the complex addition mapping to the $\mathbf C^*$ set, as we should technically use it to define a morphism.
This goes to show that sometimes, abuse of notation is desirable.
EDIT
Given this fact, we take
$(a,b)=(a,0)+(0,1) \times (b,0):= a+ib$
as granted, because of the property of sum & $i$.
Comment: Could you please explain in detail how does this apply to the line $(a,b)=(a,0)+(0,1) \times (b,0)=a+ib$?
Comment: I mean, I do understand that for numbers like $(a,0)$, $+_\mathbb{C}$ is the same as $+_\mathbb{R}$, but what happens when we deal with numbers like $(0,b)$?
Comment: @GabrielePrivitera you could do an analogous with the multiplicative operation. I'll develop it in my answer soon


Modern introduction to $C^*$-algebras

Question: Well, I am asking for the references on the subject for those who can't stand the Murphy's book. I have a background in functional analysis (including Banach algebras, functional calculus, Gelfand theorem for commutative $C^*$-algebras and so on) and prefer categorical language. I hope there is something but Murphy which isn't an encyclopedia and I would appreciate any help finding it.
Comment: I haven't read it (partially because I prefer Murphy's book)  but have you taken a look at Kadison and Ringrose vol. 1?
Comment: @Aweygan Kadison-Ringrose cannot really be called "modern", can it? Anyway, they certainly don't use categorical language.
Answer: There is a couple of lecture notes I enjoyed:

Landsman, $C^\ast$-algebras and K-Theory. It's a two-part lecture series. The first part covers the basics of $C^\ast$-algebras (given youur background, it might be to basic for you), while the second focuses on K-theory. It uses categorical language, but I feel not quite to the extent it could in the second part (there is a much nicer proof of Bott periodicity). Unfortunately, I am not sure if you can still find these notes online.
Warner, $C^\ast$-algebras. Does not look too modern, but don't let that shy you away. These notes are far more extensive than the ones by Landsman and probably closer to the level you're looking for (they are explicitly "addressed to those readers who are already familiar with the elements of the theory but wish to go further"). The author not only uses categorical language, but also discusses $C^\ast$-categories. However, I feel that the notes lack a little when it comes to connections to current research (maybe that's just my ignorance showing).
Rieffel, $C^\ast$-algebras and more $C^\ast$-algebras. These are two iterations of the same course at UC Berkeley. At places these notes are rather sketchy, but the students who took the notes are (or were?) regulars on MSE and MO, so you should have a good chance to get all your questions answered. These notes probably go deepest among all the ones mentioned with a special focus on group actions and noncommutative dynamics. As far as I remember, there is no categorical language used here.

Beyond that there are some classics like the three books by Takesaki and the two books by Bratelli and Robinson. I did not use them to learn the basics of C*-algebras, so I don't really know how good they are for that, but they are the best places I know to start learning about von Neumann algebras and the connections to quantum mechanics.
Comment: I guess I have found the first one and it looks good, there are a lot of commutative diagrams. By the way, I really enjoy by my advisor's approach: he says that linear operators should be thought of as a representations of some kind. For example a normal operator  is the same as a representation of $C(X)$ algebra and so on (in his lectures he defines a functional calculus as a suitable algebra homomorphism, not  the usual "we can kind of evaluate $f(T)$ you know"). Unfortunately, I have never seen such a great algebraic point of view in books on the subject.
Comment: [Landsman lecture notes](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.583.483&rep=rep1&type=pdf)

Modern introduction to $C^*$-algebras


Trouble after Resetting Password and Security Token

Question: I reset my password, and then my security token.
But my Mule connector won't connect, and "Force.com Explorer (Beta)" says Login failed: INVALID_LOGIN: Invalid username, password, security token; or user locked out.
I know that for Explorer it's password + token, I did that carefully.  And carefully changed the connector's settings.
Things I've tried:

Logged out and logged back in to the main website with the new password.
Tried the Reset Security Token again
Waited a while (20 mins) after the email to give SF a chance to update its caches or whatever
Fully exited Explorer and went back in
The account isn't locked, I'm able to login
Tried not to test too many times in a row, so as to not lock the account
I'm typing the password carefully and pasting the token, no extra spaces, etc.

Is there some known issue with password or token resets?  Some magic length of time?
Comment: Were you able to resolve the issue?
Comment: @highfive yes, thanks for checking, so I posted the answer.
Answer: If your token gets reset often you can also whitelist your IP by going to
Security Controls -> Session Managment and get your IP ->Then go to Network Access and Add your IP in there`
It gets annoying when your trying to manage your security keys with Force.com explorer, and a IDE esp it changes often..
This will also help you.
Answer: Turns out I was "off by one" in the emails they were sending me with new tokens, some type of delay, and I they sent one more than I expected, so I hadn't noticed the delay.


How do I allow user to select table column they want in Drupal View?

Question: I am trying to create a Human Resources Portal for my organisation.
I have to create a table via View to show all the list of staff of the organisation which is about 500 employees.
My major problem is that not all the column is needed at every situation, sometimes they need to create a table with only few columns at a time, so I need to expose the users (HR Dept) the columns so they can decide which one they need at a time.
I have tried MediaTable module but that does not allow the user to hide columns themselves.
I need like a checkbox of columns to be selected.
Thank you
Comment: You can use https://www.drupal.org/project/flexible_views
Answer: Give a look at Views Dynamic Fields module. I have used it in the past to create selectable table columns to display for views.

The Views Dynamic Fields module provides a filter for use with Views
  module. This filter allows the user to pick and choose which fields to
  display for a rendered instance of a view for that user. This provides
  a customized view instance for each user.
Features

Users can dynamically choose the fields to view in their rendered view instance
Default fields to show when no filtering is applied, can be configured
Possible to always keep certain fields to display to the user
An exclusion mode to allow reverse selection of fields when there are too many
Great for creating and exporting reports from the view
Works great with Fields Embed Views module


How could human behavior and relationships be implemented?

Question: One of the most compelling issues regarding AI would be in behavior and relationships.
What are some of the methods to address this?  For example, friendship, or laughing at joke?  The concept of humor?
Comment: I know they're working on this to some degree in Japan, although I think one of the great insights is that even simulated behavior by an automaton can produce chemical response in humans.  I don't know what's going on re human behavior, but they do have robot animals designed for human interaction: http://www.parorobots.com/
Answer: In general, what you are describing implies a hierarchical sequence model, in which mannerisms adapt to the regime or paradigm in effect.  Expressive modalities are how we recognize the operative context from the behaviors of other agents.  For an artificial agent, avoiding un-canniness would involve clustering the factors underlying the classification of discourse contexts, tagging them with corresponding factor models for manner in a way which closely aligned to the classifications which human agents make.  This involves developing an adequate latent representation for both spaces, which is likely to involve quite a lot of training data, or some clever transfer learning in conjunction with one-shot techniques (generally, taking samples as modes).
When the context becomes one of friendship, for example, the style factors of expression should extend to factors of trust, collaboration, disclosure, sympathy.  In order to implement these, layered abstractions in the representation of behaviors will need to be crafted, presumably by training.  In order to align these learned categories to human categories, which I suppose to be essential to emotional fluency, exploiting the structure of corpus semantics - including distributional characteristics of the linguistic labels and inferences - when estimating loss gradients seems a natural strategy, which exploits cultural learning.
These comments are necessarily speculative, as no such systems are current, to my knowledge.  At least, not in any significant degree of maturity or application.  Certainly other approaches are conceivable. I am just extrapolating plausible strategies, in the context of current technologies, strategies for implementing the kinds of behaviors you describe in a useful way.
More, specifically, I am considering the question as a manifold-learning problem, and hence requiring a representation model in which the inputs and outputs vary over state-spaces, with the behavior being learned as a mapping between those spaces.  Each of those components (the input space representation and its natural topology, the output space representation likewise, the mapping between them, and the sequence model hierarchy which extrapolates from the manifold to a control process emsemble) has its own peculiar challenges, and the challenges to creating an adequate implementation are a confound of those.  Still, it seems more a question of time and money than of notional feasibility.
Answer: Theory of mind
Relationships and normal social behavior require a human to possess a reasonable "theory of mind", a skill in understanding and modeling the thought processes that happen in the minds of others, and making reasonably accurate predictions on how particular actions will be understood by others.
In general, this might be treated as any other machine learning/prediction task - while this skill is quite complex and too hard for our current systems, there doesn't seem to be any obvious qualitative barrier that needs to be breached. Notably, there's no reason to believe that a mind needs to be able to experience a certain "feeling" in order to model that other minds can have it - an AI agent could form a causal model of how friendship works in human relationships and use that to exhibit behavior that's consistent with friendship in all aspects and/or facilitate friendship behavior towards it by particular humans, if it fits the agent's goals. Whether you'd consider that "real friendship" is pretty much just a matter of how you define the word, with some parallels to the "p-zombie" discussion.
Answer: Methodology for a social enabled AI.
Regarding social interactions, I believe that trying to build a copy of human behaviour based on technologies we understand, might not be effective .
Instead, I would start from the roots of how human grows and learn, or better, by what is each human trying to solve from childhood to the end of their life.
In that way we will be able to build artificial beings, able to exploit the best of what technology might provide.
It seems to be based on emotions.
As an example, humour is the kind of social trick a gifted social artificial life could learn and master, first, like a child, then like all of us, in order to empathize with others when this common emotions arise, before to analyse the conditions in witch it arises so that to be able to reproduce it, then eventually if the need become a priority, by theorizing its mechanics, possibly mastering it and using it like a tool.
(I believe that humour is often generated by instigating surprise to others, it requires modelling how others generally think, leading them to be surprised.)
Mastering social interactions require modeling
Humour, friendship as examples of social interaction should be naturally discovered by AI like by Human, and eventually used in order to fit once goal.
On the other hand this require intelligence to be sensible to surprise in a positive way, leading either to laugh, interest, curiosity or fear depending specific conditions. Mastering that process requires to model both the world (how you think) and how others do model it (how they think).
Modeling is greatly accelerated by interactions and communication
Additionaly, Human may trigger others laugh without building a conscious theory,
this help us understand intelligence and build an artificial one:
Language is here used to transmit initially abstract concepts built by intelligence. It helps us accelerate our modeling of the world, that would remain very basic if only based on our own experience.
Most important interdependent skills for Modeling are observation then logic; interactions comes third
Unconscious resolution of problems seems tofirst,  be a characteristic of live-beeings, but also of machine-learning techniques like deep learning that is criticised for that. Because we would like it to be able to explain us the concepts they discovered and used to solve the problems we gave it.
This is because we would like that tools to build abstract and possibly original models, before to give it tha ability

to convert observations into concepts,
to verify concepts by observation or deduction.
to communicate.

A causal and statistical approach backed by hierarchical goals (possibly dynamic) including the hunger for discovery
For this to happen in a complex world made both of physics and though,
a causal statistical approach seems required, backed by, to give the direction to take:
a hierarchical list of goal two of wich

the eager to discover and
the eager for accomplishment itself judged by others against hierarchical list of caracterisitics,

should manage to find their best possible place behind that to survive,
allowed or helped by the conscious to be a finished beeing.
Adaptation strategies
For discovery goal to reach its best level, biological related mechanics involving reproduction, variability, complexity and adaptation to environment, could be involved, but this seems to go beyond the question.
Still some work remains to be done in order to give our reasoning tool the ability to comunicate, that is to master a language, and to use it given the knowledge of what concepts and semantic domains, interlocutors do already master, to then build new concept in a transmissible form like words, images, video or just body-movements, face expression or so.


Composer require got killed

Question: I'm working on a live site and I'm trying to install a module using composer, but the proccess is killed. I found out that is due to server RAM.
So, I am unable to work with composer, is there any solution?
Comment: This problem is not suitable for Drupal answers because it is too specifically for composer, but you can try to significantly increase the memory limit (I run composer with 4GB). If that fails check if the server has enough memory or alternatively run composer locally and FTP the files to the server.
Comment: See this topic https://stackoverflow.com/q/36107400/1293725
Comment: It s not working, the proccess is killed with their solutions
Answer: Composer is a notorious memory hog, and some web hosts will not allow you to run it on a production server. Even if it is allowed, it is not necessarily a good idea to deploy things this way.
The preferred method is to keep your project in version control (e.g., git) and then check out a feature branch in your local development environment.
Install the module using Composer in your feature branch, perform any code review, testing, or QA that you need to do, and then do one of the following:

if you have some form of Continuous Integration / Continuous Delivery set up, you can merge the code into  dev or master branch and use a git hook to automate build and deploy to the target hosting environment
if you don't have any CI/CD tools, build your site in the local environment and use something like rsync (or SFTP) to deploy it to the remote server
Comment: Awesome! `rsync` is a great tool to master. If you can use it manually like this, try writing shell scripts to automate deploy to your target environment and you will be on the road to DevOps automation. In fact, you'll find that CI/CD automation platforms actually use `rsync` under the hood.
Comment: I used rsync and worked locally, thank you!

Composer require got killed


What determines whether two quantum particles will "interact?"

Question: The concept of quantum particles interacting is confusing to me. By "interact" I mean that thing particles do where they become entangled and exchange information and wavefunction collapse occurs. It's why quantum particles often appear to behave classically.
But quantum particles don't have definite borders or definite locations, so they can't touch, and there's no point at which their wavefunctions will start overlapping, since the wavefunctions don't have borders past which the probability density is zero.
Is there some sort of threshold, or is interaction actually a greyscale thing, where the closer they are, the more "intensely" they'll interact? Do the four fundamental interactions have anything to do with it?
Answer: If the two-particle Hamiltonian cannot be written as the sum of one-particle Hamiltonians, then the particles always were and always will be interacting. If the Hamiltonian is
\begin{equation}
H_0(x_1, p_1) + H_0(x_2, p_2) + V(x_1, x_2),
\end{equation}
a sensible initial state (for bosons) to prepare is
\begin{equation}
\Psi(x_1, x_2, 0) = \frac{1}{\sqrt{2}} \left [ \psi_a(x_1) \psi_b(x_2) + \psi_a(x_2) \psi_b(x_1) \right ]
\end{equation}
where the $\psi_i$ are eigenstates of $H_0$. Because of the interaction potential, $\Psi$ is not an eigenstate of the total Hamiltonian. So the moment you let it evolve,the two particles will become entangled. Therefore there is never an open neighbourhood of time for which you could've talked about their separate wavefunctions to begin with.
Indeed, it might be the case that it takes awhile before this interaction is intense enough for us to detect it. This will happen if $\psi_a(x) = \delta(x - x_a)$ where $x_a$ and $x_b$ are much farther apart than the length scale set by $V$.
Comment: I don't understand what these equations mean, because my understanding of quantum mechanics is only conceptual. Please try to answer my question without using them.
Comment: Well then the answer to your question is that everything in the universe is entangled / interacting with everything else at all times. When it's a good or bad approximation to treat a certain part of the universe as its own thing is a grayscale judgment call. The best way to get a feel for how this works is to solve a toy model with two particles. If you don't know the equations that are necessary for this, ask people to teach you instead of tiptoe around them :).
Comment: But if everything is interacting with everything else all the time, then why don't wavefunctions stay collapsed? Does the strength of the interaction determine how much the wavefunctions will collapse?
Comment: In a word, yes. The more entanglement there is between a particle and its surroundings, the more "collapsed" the wavefunction will look to someone who only has access to that particle. In other words, the wavefunction of a large system will always smoothly evolve according to the Schroedinger equation. But the experimental capabilities required to tell that it's doing this will constantly increase because it's evolving towards a more entangled state. Collapse is therefore an illusion caused by our inability to separate ourselves from this process (Copenhagenists might claim otherwise).
Answer: What determines whether two quantum particles will "interact?"
The coupling constants and the quantum numbers that the particle carries will determine how probable an interaction is.

By "interact" I mean that thing particles do where they become entangled and exchange information and wavefunction collapse occurs.

Look at the table of elementary particles for simplicity:

They carry lepton number or baryon number or strangeness or color, all these determine when setting up an experiment of scattering one particle against another, how probable it will be that they will interact. This is done using Feynman diagrams that allow to write down the integrals  on the probability of interaction, the cross section.

It's why quantum particles often appear to behave classically. But quantum particles don't have definite borders or definite locations,

elementary particles are described, when non interacting, by the solution of the appropriate  one of the wave equations that carry the correct quantum numbers for those particles, without any potential.This is plane waves and cannot be used to describe a free particle as one has to have finite probability for the location of the particle. One has to use the wave packet solutions if one wants to model a non interacting particle.

so they can't touch, and there's no point at which their wavefunctions will start overlapping, since the wavefunctions don't have borders past which the probability density is zero.

If two free particles approach each other one uses the formalism of quantum field theory and Feynman diagrams to describe the interaction ( not the cumbersome wave packets).
With Feynman diagrams, each of the four forces has a gauge boson, which may be  exchanged between the particles, example:

This is how one can calculate the repulsion between two electrons in QED. The force can be understood as an exchange of momentum dp/dt before and after the interaction and the calculation gives how probable it is to interact. This means that the experiments have to happen with the exact same boundary conditions, and one has to accumulate data in order to see whether the calculation describes the data (it does)

Do the four fundamental interactions have anything to do with it?

Yes, the couplings give the strength of the interaction, and the first order diagrams exchange the gauge boson.
In general virtual particles in the Feynman diagrams carry the dp/dt, the force of the interaction.
Answer: To get a sort of intuition:
You can think of "forces" in quantum mechanics as acting on the wavefunctions (the probability amplitudes) of the particle. So for instance, a "force" might cause a wavefunction to become broader. A quantum mach-zhender interferometer, for example, causes these waves to interfere with themselves, which ends up changing which way the particle goes.
Likewise, a force that interacts with 2 particles, now there are two separate wavefunctions to consider, and this force will cause the components of each wavefunction to change when there is an overlap between the two particle's wavefunctions.
[Digression: I think in principle nothing stops you from defining a nonlocal force in which a wavefunction at location. A interacts with a wavefunction at location B - but it's generally considered that such "nonlocal" forces don't exist. (A lot of times, we assume from first principles that such nonlocal forces cannot exist.)]
Anyway, if you have a local force, that force will cause an interaction between two states for the component of the wavefunction that is overlapping. (This interaction could create something like entanglement, as discussed in this question. In the end, the components of the wavefunctions that overlap end up having an interaction and might change, while the parts of the wavefunction that do not interact will stay the same.
Comment: Maybe plug in real values for the probability that an electron is an inch away from a nucleus. (that amplitude will be like 1/10^10). Even though particles might technically have a large probability amplitude, in reality 99.9999...9% of it will be in one well-defined spot.
Comment: I understand that, but 1/10^10 is still a non-zero value, and another particle's wavefunction will also have a non-zero magnitude at that point, which means we can say their wavefunctions overlap there. At what point do the values get big enough that you can say can now interact?
Comment: I wasn't asking about forces. That was just an afterthought. I was asking why interaction and wavefunction collapse don't occur immediately by virtue of two particles existing in the same universe, since their wavefunctions should overlap at every point in space.
Comment: Why would their wavefunctions overlap at every point in space?
Comment: Because a wavefunction's probability density is non-zero at every point, with only a few contrived exceptions.
At least that's my understanding.
Comment: You can technically say they interact infinitely far away (ignoring relativity) but if you actually calculate the result of including that interaction you'll see that it is impossibly small. "What cutoff counts as an interaction?" In whatever cause you're working with just pick a reasonable amount of probability to keep track of and then you cut off this infinity problem. Pick 99.9........9% for example.


Publish Tab not visible

Question: I have a Sharepoint Portal with "Sharepoint Server Publishing" feature activated at site collection level. I have few pages in subsite and some page have "Page" and "publish" tabs and for some pages I only get Site Actions menu. Any suggestions?
Answer: Normally, pages created in site/SitePages wont have the Publishing tab because versioning on these Library types are set to "Create major versions" . Major versions do not require Publishing as it creates a new major version when you check-in, save.
Pages created in site/Pages will have the publishing because that Library type is set to create "major and minor (draft) versions".
Anyways, to fix the issue for pages/items created in SitePages, go to the Library Settings > Versioning Settings > Select "Create major and minor(draft) versions.
Go back to any page in that library and you'll now find the Publishing tab.
Comment: You also need to activate the site-level counterpart of the Publishing Infrastructure feature at each site under your site collection
Comment: Hi Fox, I checked the library settings and "create major and minor (draft) versions" is already selected. If a page is not yet published then I get the Page and Publish tab enabled. If n content on the page is published(using the publish tab) then after publishing, page and publish tab is not visible. Does it mean once publishing I cant edit the content again?
Comment: Hi Louis, its already activated.
Comment: I suspect the publish tab will come back once you check out the page/item.
Comment: Thanks Fox,if I edit the page then I get the page and publish tab.

Publish Tab not visible


Is there a way to set my auto upload settings to a default yes, instead of asking me every time I play a game?

Question: Also, is there a way to make the PS3 auto upload all my save data without inserting the game? Basically I want it to upload everything I have saved, and upload every new save automatically.
Answer: Somewhat. On the XMB, if you navigate to GAME then SAVED GAME UTILITY (PS3), you'll get a list of games you have saves for. Press triangle to get the side menu to appear and select COPY MULTIPLE. You'll be able to check all your games and then have them copied to online storage. You have only 1024 MB of online storage, so you might not get them all. At least with this method, you don't have to put in every disc and say yes to the pop-up for games you aren't currently playing.


Signing with Safe using WalletConnect

Question: I'm working on an EIP1271 implementation but have issues with Safe wallet on iOS after connecting to it using WalletConnect (using v2 documentation). The connection establishes successfully, but none of the functionality I need works; attempting to sign once connected throws "Method not found" or similar errors, and sending transactions throws "can't send transactions without a signer". I don't experience this problem using another SC wallet like Argent. Wonder what could be going wrong, or if anyone has done this successfully using Safe?
Answer: The current implementation of WalletConnect in the iOS Safe{Wallet} only supports the eth_sendTransaction method.
Signing is not possible at the moment. It could be implemented via EIP-1271 offline signature collection. Or in case of 1/1 Safe by using the owner key, if imported. But neither is implemented in the iOS client.
Comment: So there's no practical way to do this, if I'm understanding correctly? What is meant by "offline signature collection"?

Signing with Safe using WalletConnect


Database Loading batch job Java

Question: Have a batch job written in Java which truncates and then loads certain table in Oracle database every few minutes. There are reports generated on web pages based on the data in the table. Am wondering of a good way of not affecting the report querying part when the data loading process is happeneing so that the users won't end up with some and/or no data.
Answer: If you process all your SQL statements inside a single transaction there will be always a valid state seen from outside. Beware that TRUNCATE doe not work in transactions, so you have to use DELETE. While this guarantees to always have reasonable data in your table it needs a bigger rollback segment and will be considerably slower.
Comment: Nice to mention the tradeof between TRUNCATE and DELETE.
Answer: you could have 2 tables and a meta table which tracks which table is the main table being used for querying. your batch job will be truncating and loading one of the table and you can switch the main tables once the loading is completed. so the query app will get recent data now and u can load now in the other table
Answer: What I would do is set a flag in a DB table to indicate that that the update is in progress and have the reports look for that flag and display an appropriate message and wait for the update to finish. Once the update is complete clear the flag.

Database Loading batch job Java


Finding the eigenvalues of a matrix intuition

Question: I know that the eigenvalues are $\lambda$ which satisfy $A\vec{v} = \lambda \vec{v}$. I know that to find the eigenvalues of a matrix, we find the characteristic polynomial, set it to zero, and solve for $\lambda$. But I don't understand why this is the 'recipe' for finding eigenvalues -- what is the intuition? Thanks.
Answer: If $v$ is an eigenvector for $\lambda$ then $Av = \lambda v$ or $(A - \lambda I)v = 0$. In other words, $v$ belongs to the kernel or null space of $A - \lambda I$.
The null space of $A - \lambda I$ is non-trivial iff $\det(A - \lambda I) = 0$ iff the characteristic polynomial $p(\lambda) = \det(A - \lambda I) = 0$.
Therefore finding $\lambda$ such $p(\lambda) = 0$ is both a necessary and sufficient condition to there being eigenvectors for such $\lambda$.
That's the theory for the 'recipe'.


Android storage and detection trouble on PC

Question: I have an Android 6.0 phone. Up until recently, I would plug in my phone to my laptop via USB cable and when drag photos/sync music to the micro SD card in the phone with no issues. The USB connection setting on the phone was set to MTP. Now, when I plug in the device, it will charge but nothing will show up. I can access internal storage by changing USB connection settings to PTP and access the microSD in a slower, more of a hassle kind of way by changing the setting to USB storage which has to be turned on/off and the phone has to read every file on the card again each time. I don't know why this happens now. Any help with accessing the SD card the way it used to be, while it's in the phone?
Comment: Try clearing cache and data for "media storage" and "external storage" from app manager, than reboot and wait up to 10 minutes after boot and connect to PC and see if it's allright now.
Answer: Try installing snapPea on your laptop.
snapPea lets you manage your android device from your system. Hope that solves your problem.


Which plant's part is this?

Question:
I found this plant in Rajasthan, India.
This sample is 4-5 cm long.
This is an ornamental plant. It was a potted plant.
I put my fingertip in the photo to give an idea of size of the specimen.
I can't figure out which plant this part belongs to.
Please give the species name if you can.
I would be very thankful to anyone out there who will help me.
Answer: This is a bit hard to say exactly, since there is a number of possibilities. We can be pretty sure that these sample is from a Cypress, belonging to the family of Cupressaceae, but which subfamily or species this is exactly, can't be identified here. Therefore a wider image would be necessary, but since this is a potted plant, even this might not be enough, as a lot of these plants are used in gardening.
Comment: @Anonymous Members of the [Cupressaceae](https://en.wikipedia.org/wiki/Cupressaceae) family are the predominant group with **scale (or *scale-like*) leaves**. See [here](http://woodyplantstutorial.nres.illinois.edu/shape/sha-scale.html) & [Schulz, Knopf, and Stützel (2005)](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.735.160&rep=rep1&type=pdf) for more info.
Comment: Can u explain how one can figure out that this sample belongs to a cypress?
Answer: Those scale-like green structures are likely to be the foliages of Platyclaudus species, they are attached densely on the branches of the plant. Hence the whole thing in your picture shall be the branch with the leaf from some kind of gynosperm tree.
It's common in Gynospermum the foliage is highly abbreviated and deformed(comparing to Angiosperm).
Comment: Welcome to Biology.SE! It isn't clear that this adds anything to the existing answer. In addition, answers are much more likely to receive a favorable response if you include supporting references (primary literature is best). Without that support, your answer is indistinguishable from opinion. ——— Please take the [tour] and then consult the help pages for additional advice on [Answer] effectively on this site and then [edit] your answer accordingly. Thanks!
Answer: It is called Leyland Cypress. For more details, refer the following link. https://en.wikipedia.org/wiki/Leyland_cypress

Which plant's part is this?


InfoPath forms 2010 in SharePoint 2016

Question: What would be the limitations if I am migrating from 2010 to 2016 in terms of InfoPath forms. Initially I have migrated from 2010 to 2016 in my test environment and the forms are showing fine with the workflows are also being working well without any issues. If this is the case what does it mean SP 2016 we cannot work on InfoPath? Does that mean we cannot create new InfoPath any more or we cannot use the existing InfoPath forms from 2010 to 2016? I am really perplexed with no article out is saying clear instructions even MS.
Answer: Everything with InfoPath works in SharePoint 2016 as it did with SharePoint 2010. It's a fully supported product until SharePoint 2016 is end of life.
Comment: does that mean sp2019 won't include infopath?
Comment: We do not know that yet, but it's a good possibility.
Comment: Hi Trevor is there any article that says InfoPath 2016 will continue to work and whatever changes we want to do to forms can be done as same as SP2010? Can I refer to any article on that? Thanks in advance.
Comment: There is no article that states something as explicit as that.
Answer: You should upgrade InfoPath 2010 to 2013 and that should work fine with SharePoint 2016

InfoPath forms 2010 in SharePoint 2016