help related to frequency of schmitt oscillator

Question: I have seen the CMOS Schmitt waveform generator circuit (i.e. figure 2nd) from the following link http://www.electronics-tutorials.ws/waveforms/generators.html
I tried to simulate the circuit in MULTISIM using 40106BD to get different frequencies by varying capacitor.
It is given that the formula to calculate the frequency is 1/(1.2*R*C) but I am not getting the frequencies correct using these formula. I am using range of R as 100K and capacitor range 1pf to 1nf . I want to know why I am getting different frequency than calculated. Also how does this circuit works and how do we get the expression for frequency.
Comment: Don't expect the formula to spot-on regarding the frequency. In the linked articel they are using an 74LS14 which is quite different from the 40106. I suggest that you try with a 10 nF capacitor and a 10 kohm resistor, do you then get the frequency you expect ? If that works, then stepwise change the values to what you want and see where it deviates from the formula. How the circuit works is explained in the link you provided !
Comment: Please your linked article more closely. In the CMOS section it specifically states, "The frequency of oscillation may not be the same as: ( 1/1.2RC ) as CMOS input characteristics are different to TTL."
Comment: @IC_designer_Rimpelbekkie I tried it with 10nF and 10Kohm but still not getting the frequency according to formula. And one more thing for less values like 1p to 20pf I am getting equal frequencies for say 11pf tp 14pf and 4pf to 5pf. I used same 100K resistor. Is it because of the accuracy of simulation. If I make the circuit and then take the readings will I be able to make the correct formula for the oscillation frequency ?
Comment: don't say 'I'm not getting the frequency I expect'. Do say 'I expect this frequency, but am getting that frequency'. Why? It tells us what *is* happening, rather than what's not. It gives us an idea of whether you're slightly out or a long way out, high or low, which might give us a clue as to what's wrong.
Answer: Short explanation:
The \$C_T\$ is charged more or less slowly via \$R_T\$ until it reaches the OFF level of the Schmitt-Trigger-Inverter. Then the output turns low and \$C_T\$ is discharged via \$R_T\$ until the lower ON-level is reached and the whole process start over again.
This kind of osciallator is called Relaxation Oscillator, see e.g. at Wikipedia (paragraph about comparator based relaxation oscillator).
The frequency may differ depending on the actual levels of the ON and OFF thresholds of the 40106 Schmitt-Trigger-Inverter (see datasheet. As much as I know those values are not very precicely specified and may vary quite a bit. Probably your simulation used different threshold levels as the experiment description you linked). If you build this circuit in reality there will be another deviation from theory/simulation if you use small \$C_T\$s (just a few pF): the wiring itself represents a capacitance (maybe 5..20pF) wich inrceases the total capacitance.
EDIT:
Calculating the frequency:
Either see example from Wikipedia article and adapt or see e.g. here:
\$f = 1 / T\$ and
\$T = t_1 + t_2\$ (where \$t_1\$ is time for charging up and \$t_2\$ is time for charging down)
\$t_1 = τ \ln [((V_u - V_1) / (V_u - V_2)] \$ (time for charging up) and
\$t_2 = τ \ln[(V_2 - V_d) / (V_1 - V_d)]\$ (time for charging down)
(where \$V_u\$ is upper supply voltage, \$V_d\$ is lower supply voltage (in your case = 0V) and \$V_1\$ and \$V_2\$ are lower and upper thresholds, \$τ\$ is the time constant \$R_T C_T\$)
EDIT:
Determining frequency dependency by experiment:
From theoretical consideration above you know that frequency will be a function of capacitance of the following form:
\$f(C) = \frac{k}{C_{stray} + C}\$
Where \$k\$ and \$C_{stray}\$ are constants (but yet unknown).
If you measure the frequency of the real circuit for two different known capacitances \$C\$ you'll get two equations you can solve for both constants simultaneously (or you can do more measurements and do a least square fit).
Comment: Thank you so much for the help. If I know the ON and OFF thresholds of the Inverter will I be able to derive the formula for oscillations? If yes, How to do that? I have one more doubt as I mentioned in the previous comment I am getting same values for 11pf to 14pf like that. Practically will I get different frequency. I want to measure the capacitance between 1pf to 100pf range using this circuit. So according to whatever u said I am assuming this won't be a accurate method to do so even if I know the formula. Please correct me if I am wrong.
Comment: The Wikipedia article shows the calculation (last line in paragraph "Example: Differential Equation Analysis of comparator-based Relaxation Oscillator"). Be aware that you also have to take into account that you always will have stray capacitances and that the thresholds may vary from 40106 device to device. So the best is to measure the frequency of your circuit with some known capacitances and derive parameters for your frquency formula (which will be valid only for your particular circuit).
Comment: Thank you again. This was a great help. Will it be better to derive formula by implementing the circuit practically taking into consideration the actual parameters rather than depending on the simulation results ?
Comment: Yes, because for simulation you need precise values for thresholds and stray capacitance (and probably also inductance). Since you don't know them it's easiest to  measure frequency of the real circuit with at least two different known capacitances C and derive a fit for the model function f(C) = k / (Cs + C) where k and Cs are fitting parameters and C is the variable capacitance.
Comment: Using the equation given in the answer I got the formula keeping the lower and upper threshold values as 1.5 and 3.5V from the datasheet . when I did simulation in multisim the frequency values was quite similar to values from formula only for capacitance in nf range. It doesn't give correct values for capacitances in pf range. Why is this problem occurring ? How can I get correct values as I got from formula.


Options being exercised

Question: I know that shorting a call option that ends up in-the-money makes you obligated to buy 100 stock shares for the buyer and that the brokerage firm does it automatically for you. My question is, will you have an open position of -100 shares of that stock afterwards? Or will the brokerage firm also buy back 100 shares to close that new position? Thank you :-)
Answer: Selling a call obligates you to sell the underlying at the terms of the contract.  If the call is in-the-money at expiration, the OCC will automatically exercise it and your broker will receive  notice of  assignment  Your broker will then sell 100 shares on your behalf.  If you do not own the shares then you will be short the shares, eg. -100 shares.
As long as you have approval for short selling as well as sufficient funds to meet the margin requirement then your broker will take no subsequent action.  If you do not, the broker will buy to close the short position and that can be at an inferior price (it could occur during after hours when B/A spreads are wide).  In addition, your account could be restricted.
Comment: Can I make it  that my broker buys back 100 shares automatically to close the new position?
Comment: Why subject yourself to the additional B/A slippage and  commissions from additional transactions as well as  market risk (share price moves before you can buy to cover the shares)?  Buy to close the call before expiration.

Options being exercised


mansions of madness using a non-action equipment requires evade?

Question: In Mansions of Madness, the rules say that "an investigator must make an evade test before moving or performing non-attack actions."
What if the investigator uses an equipment card which does not have the word "Action" on it. Does that require an evade test ?
Answer: You have already quoted all the relevant rules.
Does this equipment require you move?
Does this equipment require you to take a non-attack action?
If yes, make an evade test first.
If no, You don't make the evade test.
Comment: @CristianMocanu Can you provide an example of an ability about which you aren't sure whether it requires an action?
Comment: There are many examples, but the one I encountered in play is the "Tonic of Inspiration" artifact card from The Yellow Sign expansion story. The card reads: Artifact. You may discard this card on your turn to roll a die. 1-6: Heal 2 damage or 2 horror. 7-10: Gain 1 random Kings Court card from the supply.
Comment: This is not an action. Otherwise it would be "Action: Roll a die." et cetera. Eventually it could be "You may discard this card as an action to roll a die"
Comment: Yes, that's right..
Comment: Well, the question is: the equipment which doesn't have the word "Action" in it, is it still considered an action or not ? The rules say that if the equipment doesn't have the word "Action" then it doesn't require you to spend an action point. But it doesn't say if it is still considered as an action for the purposes of evading.
Comment: The rules for the investigator turn also say that on his turn, the investigator may either move or perform an action. So it could be interpreted that everything is considered either a move or an action. So using the above mentioned equipment would qualify as an action, since it is not a move.
Comment: So you would conclude that it doesn't need an evade test, right ?


How to get source code of .so file in android

Question: I want to see source code of shared object library (so) file in android. how can i convert .so binary file to native c/c++ code.
Comment: In general you can't.
Comment: http://stackoverflow.com/questions/2306972/is-there-any-way-to-decompile-linux-so
Comment: The source is not part of binary files. You can *decompile* the binary code, but it will not be the original source code, and will not really be readable.
Comment: You may not know that Android is built on top of Linux.  So you're, in effect, asking to decompile a Linux so file.  That's why link by @iosdude is relevant.  You might also check this answer: http://stackoverflow.com/questions/205059/is-there-a-c-decompiler
Comment: a dis-assembler application would give you assembly code, but nothing will go back to the original c (or c++) code
Answer: The purpose of making an so file is to NOT share the source code, no matter if it is android or not.
This is intentionally designed this way so as not to open the design.
Following this, many firms share .so file (machine instructions) keeping their design confidential.
However, if you are keen to know what the .so file contains, you may read the ELF (Executable and Linkable Format) of the library.
command
readelf -a yourLibraryName.so > yourLibraryName_elf.txt
The output contains symbol table. You may search for the function names, global variables etc from the generated text file.
More details of the contects here http://www.skyfree.org/linux/references/ELF_Format.pdf


Wifi drop out on macbook pro retina late 2013 with El Capitan

Question: Constant wi fi drop out only on my Macbook pro retina (late 2013) with el capitan installed. My imac is not affected, nor any other appliance using the wifi in our house. Can anyone help? Will the solution posted previously about similar problem with Yosemite work for El Capitan? Thanks in adavance
Answer: Change your security from wpa2 to wpa. Helped me solving this problems.


Rapids in a River

Question: Can I expect to have bigger or smaller rapids in a river that has a water level that is higher than average?  I am not sure which way this would go.  With the lower water, one is closer to the rocks, which, I think, generally are the things that create the rapids.  But perhaps a higher water level is associated with a faster current, which would seem to make rapids greater.
Comment: You can make a handwaving argument either way, but the whitewater folks I know say unequivocally that high water makes for a more exciting and more dangerous trip.
Answer: Most (natural) rivers contain different sizes of rocks. The smaller rocks will be closer to the ground and the larger rocks will by definition also be taller. So different water levels will allow different sizes of rocks to form different kinds of rapids.
For example at lower levels smaller rocks will form smaller waves and holes and the river will flow around large rocks.
As levels rise, the effects of those small rocks will become smaller and at some point the water will no longer flow around the larger rocks, but start to flow over them, forming large holes.
So if your river only contains small rocks, rising levels will increase the velocity on the water surface but will make the river smoother.
If the river contains small and large rocks, they will have completely different effects at different water levels and might form new river features as the water level rises.

Rapids in a River


How to make custom tab visible to only one user in lightning?

Question: I have created a custom tab "Pricing Approval" beside "Details" tab on the record page of opportunity. I want to visible this tab to only User. Please suggest any salesforce out of box functionality for this.
Answer: Hey This can be easily achieved using salesforce out of the box "Set Component Visibility Feature"

Navigate to the record where the tab should be made available conditionally (In this case "Pricing Approval")
On the top Right "Click on the Gear Icon and choose "Edit Page"
Click on the tab that has to be conditionally rendered (In this case "Pricing Approval" tab)
Click on the tab content and set the component visibility on the bottom right (Advanced -- Field User> Username EQUALS

Image for Reference
Comment: Yep true!! if you trying to hide the tab completely I don't think there is way there is an idea posted here: https://success.salesforce.com/ideaView?id=0873A0000003dfmQAA

However, you can still hide the entire tab by creating a replica of the entire Page without "Pricing Approval" Tab and conditionally showing the page only to the specified user... Also, the page with "Pricing Approval" Tab should also be made conditonally available to all users except the one user
Comment: Hi Abhijith, Thanks for the reply. But in this way we can only hide content under Tab not tab itself.
Comment: Thanks, Abhijit this way we can do this. thanks again!
Comment: Glad could help! Please don't forget to mark this answer if it helped you


Finding the conditional expected value of the sum of independent random variables.

Question: Let $$Y=\sum_{i=1}^{15}X_i\text{ , } Z=\sum_{i=6}^{20}X_i,$$ where $X_1,...,X_{20}$ are $iid$ with normal distribution $N(\mu,\sigma^2)$. Find $$\Bbb E(Z|Y=y).$$
My doubtful solution goes as following:
$$\Bbb E(Z|Y=y)=\Bbb E(y-(X_1+...+X_5)+X_{16}+...+X_{20})=y.$$
I'm worried about the first equality, since I'm not sure if that's how the conditional expected value works. However, the second equality comes from the properties of the expected value. May I get any tips on how to solve this problem properly?
Comment: Perhaps an argument by symmetry works.
Comment: You are right to be worried. Your approach is as follows: $Z = Y + W$, where $W$ is a linear combination of some of the $Xi$, so $\mathbb{E}[Z|Y=y] = \mathbb{E}[Y+W|Y=y] = y + \mathbb{E}[W|Y=y] = y + \mathbb{E}[W] = y$. The reason this breaks down is that $W$ is not independent of $Y$, implying $\mathbb{E}[W|Y=y] \neq \mathbb{E}[W]$. The reason $W$ is not independent of $Y$ is that they both contain contributions from $X_1, \;..., \; X_5$.
Answer: That is correct because $\Bbb E[y]=y$ and $\Bbb E[X_1+\cdots+X_5]=\Bbb E[X_{16}+\cdots+X_{20}]=5\mu$ due to $X_i$ being $\textsf{iid}$ so you have that $$\Bbb E[Z\mid Y=y]=y-5\mu+5\mu=y.$$
Answer: It is evident that since $X_i \sim N(\mu, \sigma^2)$ and are independent, $Y \sim N(15\mu, 15\sigma^2)$ and $Z \sim N(15\mu, 15\sigma^2)$. You will have to convince yourself that $Y$ and $Z$ are not just individually Gaussian, but also jointly Gaussian.
Now we can use a standard result. If $Y$ and $Z$ are jointly Gaussian,
$\mathbb{E}[Z | Y=y]  = \mathbb{E}[Z] + \frac{Cov(Y,Z)}{Var(Y)}(y-\mathbb{E}[Y])$. We know that:

$\mathbb{E}[Y] = \mathbb{E}[Z] = 15 \mu$
$Var(Y) = 15 \sigma^2$
$Cov(Y,Z) = \mathbb{E}[YZ] - \mathbb{E}[Y]\mathbb{E}[Z] = 225 \mu^2 + 10 \sigma^2 - 225\mu^2 = 10 \sigma^2$ (skipped some algebra here)

Putting this all together:
$\mathbb{E}[Z | Y=y] = 15\mu + 10\sigma^2/15\sigma^2(y-15\mu) = 2y/3 + 5\mu$
Comment: could you please give me any hint how to prove that they are jointly Gaussian?
Comment: @R.K.There is a theorem which says that random variables $Y$ and $Z$ are jointly Gaussian iff any linear combination of Y and Z is Gaussian. Since both $Y$ and $Z$ are sums of Gaussian RVs ${X_i}$, you can easily prove that the condition holds and hence conclude that $Y$ and $Z$ are jointly Gaussian. You can also try it from first principles, though that could be a bit tedious.


Ubuntu 20.04 RST Issue with no access to Advanced BIOS options

Question: Installing Ubuntu 20.04 on dual boot windows HP Envy consumer laptop. Got the error to disable RST. Consumer HP lap with insyde bios f.47 which does not allow "Advanced option" to disable RST and change to AHCI. Dont want to mod the BIOS. I disabled optane memory via Windows APP. but no luck. same laptop was running Ubuntu 18.04 without any issue. is there a way to bypass the RST check by Unbuntu installer. Thanks
Comment: No, sorry, Ubuntu cannot handle this. You need AHCI.
Answer: I have Win 10 and wanted to do the same. What I did was logged into BIOS and switched RAID ON to AHCI. Then I made sure and booted to the USB, and installed 20.04 to replace 18.04 (the first option). Reboot into your new install of Ubuntu (still in AHCI) and go to 'Drives'. Set your windows drive/partitions not to automatically mount on system startup. Then you can reboot, go into BIOS and switch back to RAID ON. Now windows will boot fine and so will Ubuntu. If you don't set your windows drives to NOT boot automatically in Ubuntu then with RAID ON Ubuntu will spend a minute at the spash screen trying to find the hidden drives. Works fine, just a little awkward that you can't just install 20.04 with RSK enabled.
Comment: Thanks Paul, I dont have access to advanced options in the BIOS, hence unable to change to AHCI. its consumer HP Envy Laptop


Ender 3 S1 Pro – Z offset keeps changing

Question: I have recently bought an Ender 3 S1 Pro and it has been a bit of a hit and miss so far. My main problem has been the Z offset. It keeps changing between prints. The first print turns out okay and then when I print the same thing again it just breaks.
I followed the steps for method one from

to level the X axis gantry which made things much better. For a while. But just recently a print failed after about half an hour. It seemed like the printer got the Z-offset wrong because the layers just wouldn't stick any more. I aborted the print and did a height map calibration:

And this how it went. The printer also made some stuttering sounds when probing the plate at the far right.
I'm using Klipper with MainsailOS instead of the stock firmware. I have updated everything to the latest available version.
It seems like I need to make some adjustments, but I'm not sure what to do. Should I try to adjust the X-gantry again? I have levelled the bed and the four corners are pretty much level. I'm also using this model to get a good enough first layer. And that works, but only for one print. Then I have to redo the Z-offset calibration as well as perform the height map calibration. I don't think I should have to do that every time? The printer is placed in a stable location and I'm not moving it between prints. I also clean the bed with IPA before each print. And I have a PEI plate.
So I'm wondering what I should try to to adjust/tweak/calibrate to get the printer to work reliably?
Answer: Try tightening the eccentric nuts on the Y carriage, they were lose on mine from factory which was causing it to rock side-to-side so made bed leveling impossible.


Optimal lag length in VAR/VECM: IC or Residual test?

Question: I read so many answers in here that I should use IC(information criteria) to determine the optimal lag length in VAR/VECM.
But also it is important to check the residual of VAR/VECM has no-autocorrelation and no-heteroskedasticity.
I use trial and error to find the optimal lag length that makes residual stationary.
So IC is useless to me in some ways.
I wonder I'm doing wrong or not.
I need your advice.
Answer: The choice depends on what you want to do with the model. Different goals justify different selection criteria. Ignoring IC and going for well-behaved residuals may work fine for inference from the model. At the same time, this may be a poor way of finding a model that does well in forecasting (as it will likely be overfitted) or identifying the true data generating process if it happens to be among the candidate models (though this is hardly realistic in practice), and this is where ICs could come in handy.
Comment: Then if I want to make a model for prediction I can ignore the residual test? I mean, even though the residual is not normal, autocorrelated and heteroskedasticity I can proceed the model and make a prediction? (For simplicity, is it okay to understand that residual test is for inference and IC is for forecasting?)
Comment: @guest, it is not that you can ignore these but that if you want to choose a model (among a given set of candidate models) that maximizes the expected likelihood (a measure of forecast accuracy) for a new data point from the same data generating process, then AIC is a principled way of doing so. It does not say how good the set of candidate models is or that there will be no systematic errors, among other things.
Answer: Normally, you must run a function like varselect in R, with sqrt(T) max number of lags, and then stick to the BIC (SIC) selected lags. However, if your data is seasonal, you must include at least the number of seasons selected, so as to reduce the correlation of your errors. This should be enough.
Comment: What objective does this strategy serve? (Why BIC, not another IC? Why make an exception in the seasonal case but not in the nonseasonal case?) (Frankly, I doubt there is a justification that this serves any standard purpose.)
Comment: BIC is more conservative than AIC, and tends to select more simple models; furthermore it chooses the true model if provided on the choices. In time series data, BIC works better empirically. The reason to include at least the number of lags of your seasonal data, is because you want to include this information on your model, so excluding the lag of seasonal, would introduce correlation on the errors.
Comment: While in some narrower context it might be approximately true, the claim *In time series data, BIC works better empirically* in its general form is clearly wrong. But more importantly, what objective does this strategy serve? I see a conflict between BIC and inclusion of the seasonal number of lags, as BIC serves one purpose (and is optimal with respect to it, given certain assumptions -- there is a well developed theory for it) while the latter must serve another (I do not know what it is, but it might be possible to define).


Can ferrite beads turn high frequency noise into heat?

Question: I understand that ferrite beads provide high impedance for high frequency signals. However, I am very confused on what that actually means. I've been reading in multiple posts and articles that ferrite beads turns high frequency noise into heat. Is that actually true? I don't understand how high impedance relates to turn noise into heat.
My suspicion is that it's actually false and our interest in using ferrite beads is to increase the impedance in our main path, and so we should provide a lower impedance path to ground for high frequency signals. I mean, in other kind of filters (like bypass capacitors) we don't actually try to vanish noise from our PCB, but lead it into a not important low impedance path.
Answer: Yes, it is true, ferrite beads do convert noise into heat.
However, it is simply because it becomes resistive at the frequency of interest.
So it has resistance. And high resistance means high impedance too. And even high is relative. Ferrite beads are rated to have few tens to few hundred ohms of impedance at 100 MHz, where part of it is resistive and the rest is inductive. It's just higher impedance in series than say a bypass cap can shunt to ground, from milliohms to few ohms.
Also everything else that has resistance turns any current into heat, even wires and PCB traces.
So it is not false, but a ferrite beads also have inductance. And so if you put bypass caps on both sides of a ferrite bead, you have a pi filter construction, which has low impedance to ground from both sides and high impedance between both sides.
Comment: What would happen if we forced the high frequency noise to go through the ferrite bead (by not providing a lower impedance path)? Would it just turn into heat, or would it still exist in the output?
Comment: @GabrielCorrales Like I said, the ferrite has resistance and inductance, so any high frequency AC current passing throgh it would see some impedance and would also dissipate power into heat in the resistive part of the impedance. You can simplify a ferrite bead to be an inductor with wiring resistance.
Answer: Ferrite beads are resistive at high frequencies so they do dissipate power as a result of impeding high frequency noise, just as a series resistor would.
At low frequencies they are inductive, so there is a significant reactance component to the impedance. See the below curve from a datasheet.

The DC resistance of this part is only 120mΩ, but of course that will dissipate heat as well, depending on the DC component of the current passing through it.
Comment: @glen_geek You are completely right. The reactance will go capacitive above 100MHz, so the reactance will become negative, and thus be outside of this graph. That's why the line doesn't continue.
Comment: Spehro, These graphs  I've seen before, and seem suspicious - could "X" reactance (green) really dive to zero @ 100 MHz, and not become capacitive at higher frequency? That red "Z" curve looks like a resonant peak @ 100 MHz. Do you know why the green curve doesn't continue above 100 MHz?
Answer: Well, yes, but that's not typically an application of a ferrite bead, to provide a heating solution. They dissipate current for high frequency noise. That dissipation does technically generate heat due to characteristic impedances.
Answer: It's both, and it depends on the frequency, the ferrite material, and the geometry of the winding. The choke will usually have an impedance that's both resistive and reactive (normally inductive).
The resistive part represents an opportunity for energy at that frequency to be turned into heat in the choke, while the overall magnitude of the impedance represents the choke's ability to "block", i.e. reflect, that frequency. Energy that's reflected may just end up dissipated somewhere else, or it may take another path, e.g. finding its way to ground through a bypass capacitor. That's a broader design question. Burning noise as heat in a ferrite is generally not a bad thing, anyhow, unless there's enough of it to cause thermal issues.


MongoDB: enable sharding automatically

Question: If we add any new data/collection to the existing(running) shard cluster. Is there any way that the data/collection gets sharded automatically.
If yes, How to achieve that?.
Comment: Are you adding data to sharded collection or a new collection?
Comment: @SqlWorldWide I am adding a new collection to the database.
Answer: No it is not possible to automatically shard the collection. This is what you have to do per collection.
Ref:

https://docs.mongodb.com/manual/reference/command/shardCollection/
https://docs.mongodb.com/manual/sharding/
https://docs.mongodb.com/manual/reference/command/shardCollection/#dbcmd.shardCollection

You will need to run shardCollection command in order to shard a new collection.  The collection must have an index whose prefix is the shard key.
The following operation enables sharding for the people collection in the records database and uses the zipcode field as the shard key:
use admin
db.runCommand( { shardCollection: "records.people", key: { zipcode: 1 } } )

Shards a collection to distribute its documents across shards. You
  must run enableSharding on a database before running the
  shardCollection command. The shardCollection command must be run
  against the admin database.

A database can have a mixture of sharded and unsharded collections. Sharded collections are partitioned and distributed across the shards in the cluster. Unsharded collections are stored on a primary shard. Each database has its own primary shard.
Comment: the question was "Is there any way that the data/collection gets sharded automatically." and answer to that is no. It's not possible.
Answer: You mean, when you create new collection to sharded database.
Answer is simple. NO! Every DB and collection in them, must be shard individually. Just because all collections are not created as equal and earlier used sharding key is not best solution to everything (every collection).

MongoDB: enable sharding automatically


Why can unissued capital stock exist?

Question: Unissued capital stock allows a company to issue shares at any given time, diluting the ownership of current shareholders. This does not seem logical nor fair. At any given time, shouldn't 100% of the company be owned by the shareholders? Because by nature of unissued capital stock, not 100% of a company is owned at a given time (unless all unissued capital stock are issued).
Answer: It's not really true to say that having unissued stock means that the company is not 100% owned. It'd be more accurate to say that the unissued shares are assets of the company (and therefore, indirectly, of the current shareholders). The company can issue the stock to others in exchange for something that increases the value of the company by a comparable amount (e.g. cash or work). This makes it a fair trade which should not decrease the value of existing shareholders' stock.
For example, suppose company X has 10 issued shares of stock and a total of 20 authorized shares, (leaving 10 unissued). The valuation of the company is $10, meaning each owned share is worth $1. Now someone comes and gives the company $1 for a new share of stock. Now the company has an extra dollar it didn't have before so it's now worth $11. There are also now 11 issued shares of stock, so each one is still worth a dollar. The original shareholders have been "diluted" in that they now own a smaller percentage of the company, but due to the increase in the company's value, they're just as well-off as they were before. Company X can do this 9 more times before it's out of authorized shares and needs to ask the shareholders for permission to increase the number.
Comment: It's worth pointing out that while the value of the stock doesn't go down, the voting power that shareholders will have *has* gone down... it's hard to say what's better out of owning 1/10 of a $10 company and owning 1/11 of an $11 company, but I can see people being potentially upset about it.
Comment: @Ben for sure. That's part of why the shareholders have to authorize more stock. Also, presumably shareholders own the company because they think it will eventually be worth more than it is today per share. If that's the case, diluting their percentage of ownership also dilutes their share of the value of the company's growth.
Comment: Hmm. Sort of. If you think the company will grow by $X then yes, your share of that has been diluted. If you think the company will grow by Y% then the stock issuance doesn't affect that. So it depends what you think the bottleneck on growth will be.
Comment: @BenMillwood Presumably, the company would only do that if it could do something useful with the $1 it got.

Why can unissued capital stock exist?


Apache 2.4 Heartbeat Flow

Question: I have recently upgraded from Apache 2.2 to 2.4 and am looking into changing the proxy method used by the server from the basic mod_proxy to mod_lbmethod_heartbeat in mod_proxy_balancer. I am using an Apache Server as a proxy to send the requests to a number of Tomcat servers, and am unsure of the flow of how the heartbeat method is supposed to work.
My current understanding of the process is the Apache Server should have a HeartMonitor listening for heartbeat info that will be sent to it by each of the other servers. These servers will have mod_heartbeat so they will know to send the information to the specified port. The Apache Server will then use this information to distribute the requests as best it can. Does this sound like the correct flow for how this method is supposed to work?
If so, how would the mod_heartbeat be loaded onto and used by Tomcat? Both are Apache, but I have not been able to find any documentation on a method like this in Tomcat and that doesn't seem surprising to me since they are different servers and I imagine are implemented very differently. Is there some sort of connector that would let the two communicate in this way, or is mod_lbmethod_heartbeat supposed to only be used between multiple Apache Servers?
Answer: After some more searching I found the following thread which seems to indicate that the heartbeat load balancing method was designed only to be used to balance traffic among multiple httpd servers. The correct way to communicate information like this between httpd and tomcat servers seems to be by using mod_jk.

Apache 2.4 Heartbeat Flow


I can't install it

Question: I downloaded it to a USB and used Rufus to make it an ISO. I put it in another computer and when I choose install, there are no options to download the OS, then it crashes and opens the tryal version.
Answer: The question is not clear but I assume that you downloaded elementary OS and wrote a bootable USB using Rufus.
In the process Rufus might have asked you two option to write in iso or dd.Use both and. Finally check the USB by ticking the check option in Rufus.
I think the iso image might be corrupted due to incomplete download.

I can't install it


What is the most important exercise one would do for Vertical Leap Improvements?

Question: What fundamental exercises are done in order to develop a good vertical leap?
Is there one exercise that is the base foundation in maximizing your overall vertical leap?
Answer: There are two main factors which influence your leaping ability: maximal force production (MFP) and explosiveness (EXP). MFP denotes how much weight you can lift. EXP denotes how quickly that force can be produced.
Maximal force production is increased by doing heavy lifts. (Also, in accordance with periodization, and depending on your current fitness status, it would be wise to start of with a phase of hypertrophy. The bigger the crossection of the muscle, the more force can be produced) Heavy lifts implies lifting heavier than 80% of your one repetition maximum (1RM) for 1-4 reps.
For maximal transferral of force gains to vertical leaping, it is important to do axial exercises. They are the ones in which the feet are planted, and the torso moves vertically. Examples include squats, half squats, dead lifts, romanian dead lifts etc.
Explosiveness is trained by doing quick movements with lighter loads. Plyometrics and ballistic training are the prime examples. However there are more complicated types of training, such as Maxex and the french contrast method, that possibly yield better results, but are not advisable unless you are perfectly healthy and a professional athlete due to the high intensity and risk of injury.
Plyometrics involves hopping and jumping over, and from, various heights. Examples include standing vertical jump, standing long jump, drop jumps, hurdle hops. The higher the weight (of you and your gear) and the higher the jump, the higher the intensity of the training and the better the results.
Ballistics involves doing fast movements while accelerating throughout the whole movement. Examples include front and back medicine ball throws, squat jumps and half squat jumps (with up to 40% 1RM).
If you are an experienced athlete, then you can incorporate these two types of training at the same time, even during the same practice. However, if you have less than 2-3 years of training experience, then i suggest you start of with basic strength training, then move on to maximal force training and finally do explosive training. That progression is needed in order for your connective tissue (tendons and ligaments) to adapt and strengthen so it can endure the high stress of plyometrics and ballistics.
As for your second question, I would suggest the half squat. Biomechanically it is the most similar movement to vertical leaping, and thus has the highest transferability of force production.
Comment: great answer ! with good details - the "french contrast method" it's also known as Russian method. I can do all with no problm is just my body weight that keeps my vert from growing :) 100kg for a 185 guy - to bulky
Comment: If you have extra padding, then you know how to increase your vert; its all relative power :) If you are pure muscle, then you have a good hypertrophic foundation for a high vert. Try doing a "strength deficit test" :)
Here is one example, with a calculator: http://www.xlathlete.com/view_formula.jsp?formula_id=27&browse_sport_id=0
Comment: need to loose some body weight! Maybe like 7-8 kg get around 90kg !! my sprinting routines are getting to stressful with all this weight!
Answer: I'd rec'm Plyrometrics / Jump Training.  And to also be in the most optimum shape possible (cardio + weights).  Something like P90X would be a good program because you're getting the complete body workout as well as doing Plyrometrics every week.
Comment: i would have to disagree with you ! vertica jump is now an overall or complete body workout !


Causal non-causal sequences

Question: This answer says that $Y = zX$ is a simplest example of non-causal system because it corresponds to $y_n = x_{n+1}$ and current output depends on future input. Yet, it is causal because both $x_n$ and $y_n$ are 0 for $n < 0.$ How causal can be non-causal? I am struggling to resolve this absurd and want to ask about the relationship between these two notions of causality and also the 3rd one, which seems to be related to pole values and ROC rather than number of poles?
Answer: First, we can speak of a causal filter or a causal function (or sequence, or signal).
In general, a filter is causal if its output at present time ($n$) never depends on the input at future times ($n+m$, with $m>0$). Let us restrict to  LTI filters (and we assume discrete time) - so that the filter is fully specified by an impulse response function $h(n)$.
In that case, the above property can be concisely stated as follows:

A LTI discrete-time filter is causal iff $h(n)=0$ for $n<0$

This motivates the definition of a causal signal.

A discrete-time function (signal, sequence) $g(n)$ is causal iff $g(n)=0$ for $n<0$

Notice that this later definition does not involve filters (it's just motivated by them). And notice that the two can be combined in:

A LTI discrete-time filter is causal iff its response function $h(n)$ is a causal function.

In your assertion regarding the second link ("it is causal because both $x_n$ and $y_n$ are $0$ for $n<0$") you seem to be confusing both meanings. To determine that a filter is causal, one does not look for the causality of inputs or ouputs ($x_n$ and $y_n$) but for the causality of the response function $h_n$
Further, instead of $h(n)$ we can work with its Z-transform $H(z)$; we have $y[n] = x[n] \star h[n] \implies Y(z)=H(z) \, X(z)$. But, remember the relation "signal" $\leftrightarrow$ "Z transform" is not one-to-one unless the ROC (region of convergence) is also specified. A single $H(z)$ can have several corresponding $h[n]$("anti-transform"), for different ROCs. Alternatively, instead of giving a ROC, we might be given a causal (or anticausal) condition. In particular, if we are given a (rational) $H(z)$ and we are told that $h(n)$ is causal, then the ROC must extend outwards from the biggest pole. For an explanation of this, see any Signal Processing textbook, or here.
In your example, $Y(z)= z X(z)$, so $H(z)=z$. To analyze this you can reason in two ways:
1) In terms of zeros and poles. $H(z)$ has a zero at $z=0$ and a pole at infinity. Hence, because there is a single ROC (all the plane), and it extends inwards from the pole, hence there can be only one valid $h(n)$ which must be anti-causal.
(I insist: here you could deduce from $H(z)$ that the filter was anti-causal;  but normally you can't; say, if $H(z)=z/(z-1)$ you'd have two possible $h[n]$, one causal, one anticausal).
2) Explicitly, formally. By inspection, $H(z)=\sum_{n} h(n) z^{-n} = z \implies h(n)=\delta(n+1)$ Which is anticausal.
Comment: Thanks. I just did not get how the non-causal Y = zX is causal, how reading data from the future is reconciled with being causal filters/signals?
Comment: Y = zX is _not_ causal
Comment: Really? Do you understand my question? Or you are saying that there is a principal difference between not and non in English?
Comment: I just don't understand why you insist on saying "$Y = zX$ is causal". That's false.
Comment: @leonboy It is explained several times. At first in the referenced answer and then repeated in the first sentence of my question. I can say once more that Y = zX corresponds to $y_n = x_{n+1}$, which means that you compute current output based on the future input, which means non-casualty. But, I see no reason why you will notice this after one more repetition.
Comment: "I see no reason why you will notice this after one more repetition"  Sorry, I can't parse that.

Causal non-causal sequences


How do I link a react app I am building using webpack to a phpmyadmin external database and query it without showing my database password in the code?

Question: So I am currently learning react and webpack so that I can implement it into my current site. I already have an established phpmyadmin database that pumps out information that I want to appear on my site but I cant figure out how to hide my username and password to the database when programming it. I am used to using php to interact with my database bus since react is purely javascript I am not sure what to do.
Answer: You need to have a server running that talks to your database and to your react app. It sounds like you might have this in the form of a PHP application. Your PHP application will need to expose data over HTTP endpoints that you can then fetch from inside of your React application.
This tutorial: https://www.techiediaries.com/php-react-rest-api-crud-tutorial/ would be a great place for you to get started.
Comment: That's the basic idea! The general flow is:

database --> server-side database queries -> expose the results of the queries over HTTP, formatted as json or another data type -> fetch the HTTP endpoints (via axios, fetch api, etc.) in your React components.
Comment: Oooh ok. Thanks for the reply! So just to clarify, I would basically have to program a bunch of php functions that interact with the database and return json data. Then call said functions as needed inside of my react app using axios?
Comment: Please remove that link from the answer. It promotes bad practice (string concatenation to build SQL), which leads to serious vulnerabilities in software. This type of vulnerability is called 'SQL injection' and can lead to unauthorized access to the database. See: https://en.wikipedia.org/wiki/SQL_injection
Answer: I agree that you need to "have a server running that talks to your database and to your react app" as the accepted answer states. On the other hand this does not mean that you have to code it from scratch.
If you don't want to program PHP for the back-end, then you may as well configure software from the list of 'automatic APIs'. An automatic API is "software that turns your database into a REST/GraphQL API".
I'm the author of PHP-CRUD-API, which is an 'automatic API' and I think it suits your needs, but you may as well use any other software from the above list.


Square symbol with a number inside

Question: How do I create a symbol on qgis that has a number assigned to it? I am trying to make a square symbol with a number inside. everytime I place the marker I would like it to ask me what the number is everytime so I can place specific number symbols in different areas on my map. Anybody know how to do this?
Comment: I created a new layer with a symbol and added a new field called type. then on the label tab I tied it to that type field but nothing shows up when I try to plot it.
Answer: You can actually do this through symbology rather than a mixed symbology-label style as you suggest in your comment above.

Make sure the field that contains the relevant number you want
displayed is a string type, it won't work otherwise.
Symbolise your point layer with your square background
Add a new symbol layer above the square - set the symbology type to "Font Marker"

Rather than setting a particular font marker, set the data defined override to equal the field that contains your marker - format as required

To get it to ask you what the number is each time you digitise a feature you need to turn on the attribute form popup for your layer. You can do this through Properties -> Fields. Then when you're editing the layer, every time you digitise a new point it will produce an input box to allow you to edit the field and will automatically display this on the map.
Comment: A slight modification to this setup can place your text beside a SVG symbol by tweaking the Font Marker Offset to not cover it with text or a number.

Square symbol with a number inside


Install Ubuntu Touch on Nexus 10 (Manta) Using Ubuntu 14.04

Question: fastboot oem unlock results in the tablet displaying the green Android robot lying and message saying the device is already unlocked. My presumption is that Android OS is no longer in the tablet.
ubuntu-device-flash --channel=devel --bootstrap results in the following:

Ubuntu icon with various options allowed is displayed.  I wait for the command to finish.
The command finishes with "Rebooting into recovery to flash" and at about the same time a spinning Ubuntu icon appears.  My assumption here is that flashing is occurring.
after a bit of time the 4 flashing colors appear.  My assumption here is that the flash has failed.

I can boot the tablet into recovery which allows me to access the various options as in a) above.  Both /factory and /cache are mounted.  Should they be?  Install zip sounds interesting and wipe data/factory reset sounds interesting.  I am leery of doing these without advisement.
Suggestions?  Should I do the reload android os procedure from the backup I made and start again?
Answer: On a Nexus 10, you can use the Ubuntu Dualboot app to install it and keep Android in case something goes wrong. Hope that helped!
Comment: nexus 10 - manta


Do I need to build my own Ethereum block explorer to read my own tokens and smart contract?

Question: I'm new to blockchain. I find that Etherscan's UI/UX is too complicated for average person to use. I basically need my users to read my Ethereum smart contract transactions and to view their own tokens (which my contract issues) content and data. Must I need to build my own block explorer using open source software and customize a nice UI/UX or could I just code a simple web app and pull this data from a public node?
Answer: You don't need a block explorer but you probably need a user interface.
Web3.js is the main library but there are others. https://github.com/ethereum/wiki/wiki/JavaScript-API
Your UI would present an application to users and coordinate interactions with users.

Read the contract by calling functions
Send data to the contract by inviting the user to sign transactions
Monitor event logs to update dynamic elements

I think it bears mentioning that if your tokens comply with ERC20 then users can and would expect to use them with the wallet of their choice. No need to reinvent that.
A block explorer is more of a diagnostic tool. Have a look at https://www.cryptokitties.co/ to see a pretty nice UI in action. You will need MetaMask or your own node to meet the client-side blockchain requirement. https://metamask.io/. MetaMask uses Infura backing.
Hope it helps.
Comment: So I guess I can just use Infura API to retrieve all my ERC20 token and contract details, am I right?
Comment: It's a popular choice. Even better if the client will check for the presence of a full node and use Infura as a fallback to support users who are not concerned about verifying the chain themselves.


CSS not showing up with ERB

Question: I've just hosted something on Heroku, and whenever I opened the app it worked just fine with the css being linked as such:
        <link rel="stylesheet" href="/css/style.css"/>

The problem came when I added my custom domain, the css no longer worked.  When I view source and click on the href, it get a response "Not Found".  Nothing has changed, my css folder is still in my public folder in my apps directory.
Answer: Have you tried different paths for the href, like
href="../css/style.css"

or
href="css/style.css"

CSS not showing up with ERB


When should the message informing the user that the password they entered is wrong go away?

Question: This is a follow up to this question since it got closed. In a log in form, after the user enters the wrong password, when should the message saying "wrong password or user name" go away? For example should it go away after the first character of the  password is typed? This is assuming the message is in plain text beneath the password field (not an alert window or anything like that).
Answer: Error messages shouldn't go away on their own unless

Errors were resolved by User's Input
User wanted those error messages to be hidden by clicking a X which an error message may have.

If error message is displayed and user makes the same mistake which produces the same error message for the second time, the error message can blink or have a brief color transition which indicates that the error has appear all over again.
Answer: it's literally up to you. Most of the time developers actually leave it as is.
Comment: While I agree with leaving it in place, do you have any reasons for this?
Comment: If it wasn't for Brendon's comment I wouldn't have understood what is meant by "leave it as is".


How to change subversion working copy UUID?

Question: I've recently updated Subversion repositories from an old 1.2.3 version to 1.6.0 via svnadmin dump/load. The old repositories all used the same UUID (repositories were created using by copying a template repository). I've changed the UUID on a couple of the new repositories via svnadmin setuuid to be unique. I can't just relocate my existing working copies of those repositories because the UUIDs are different. I know about exporting the working copy and checking out from the new repository, but I was wondering whether there was a way to just change the UUID of the working copy in-place, like what svnadmin setuuid does for repositories.
Answer: New answer since Subversion 1.7 working copy format. You need sqlite3 command line utility.
In the root directory of your working copy, there is now a single .svn/ folder with a SQLite database. You can query current repository UUID known for your working copy with:
$ sqlite3 .svn/wc.db 'select uuid from REPOSITORY where id=1'
b6dc3e6c-5320-4549-b231-c153d86d7525

As a result, changing UUID can be done with:
$ sqlite3 .svn/wc.db 'update REPOSITORY set uuid="1c0d1ec1-2326-0410-bef5-eb29cddfc032" where id=1'

Of course, keep a backup of the .svn/wc.db file before invoking update query. There is almost no chance that your repository entity has different id or there are multiple lines in that table but you may check if you get unexpected results.
Comment: +1 worked perfectly with a relocated repo that also changed UUID
Answer: Here is a command that does the trick for SVN 1.6 and below:
find . -type f -name entries -exec sed -i 's/old-uuid/new-uuid/g' {} \;

Replace old-uuid and new-uuid with the actual ids.
Comment: +1Thanks for the solution. This is not working for directories having spaces. "find . -type f -name entries -exec sed -i 's/old-uuid/new-uuid/g' {} \;" without double quotes seems working.
Comment: sry for necroing this thread this method just saved me a bunch of time..
for others trying this out, just want to add a note.
Sed on MACOX seems to need a slightly different usage, u need to say
 `sed -i "" 's/old-uuid/new-uuid/'`
and it works (just the extra empty double quotes) ([ref](http://hintsforums.macworld.com/showthread.php?p=499856))
Answer: You need to edit all the 'entries' files in your pulled repo. If the repo has a lot of directories, find + a sed script will make short work of the task.
Answer: Yves Martin's answer worked great for us on a number of working copies with SVN 1.8, but we did end up running into cases where it didn't work.
Running Yves' command without "where id=1" worked in all cases for us:
$ sqlite3 .svn/wc.db 'update REPOSITORY set uuid="1c0d1ec1-2326-0410-bef5-eb29cddfc032"'
Investigating why this happened, I found out that multiple UUIDs are stored when relocating the repository, contrary to Yves' intuition that this should never happen.
A new entry into the REPOSITORY table is added after a relocate rather than updating the existing one, storing an incremented id with the new repository root and its UUID. So the cases that failed to work properly were the working copies that had already been relocated in the past: The command would appear to work, but only the initial UUID was changed, not the one currently being used.
One can check the list of stored roots and UUIDs in a working copy with this command:
$ sqlite3 .svn/wc.db 'select id,uuid,root from REPOSITORY'
I'll finally note that I had to use a different set of quotes for Windows command line / batch files, as follows:
> sqlite3.exe .svn\wc.db "update REPOSITORY set uuid='1c0d1ec1-2326-0410-bef5-eb29cddfc032'"
Comment: Thanks for details when a working copy has been relocated, I was not aware of this behaviour
Answer: The section "Managing Repository UUIDs" in svn red-bean book may have the answer you are looking for.
Comment: Again, no, I'm not talking about **repository** UUIDs, but rather **working copy** UUIDs; working copies are the same as a checkout.
Comment: That section talks about repository UUIDs, not working copy UUIDs.
Comment: @Ioan: Quoting from that section: For folks using versions of Subversion earlier than 1.5, these tasks are a little more complicated. You can explicitly set a repository's UUID by piping a repository dump file stub that carries the new UUID specification through svnadmin load --force-uuid REPOS-PATH - Isn't this what you needed?
Comment: You cannot change the working copy UUID to that of the server repo without updating or svn switch-ing the working copy to the [new/existing] location of the repo.


Installation of Sharepoint Web Front End Server

Question: I am trying to add one Web Front end server to my existing SharePoint farm enterprise edition.
Can I use a SharePoint foundation as an additional web front end server to my existing far or do I need to purchase additional license for SharePoint server enterprise edition to setup an additional WFE.
Please you can also add download links.
Answer: Edition mixes are not supported. You won't be able to join the server to the farm. So you have to install an Enterprise Edition Server, join it to the farm and give it the according roles like WFE.
If Enterprise is too expensive for you and you do not need the Enterprise-Features on a wide audience of users, you might have a look here: SharePoint 2013 Downgrade from Enterprise to Standard
Comment: Thank you for your contribution. Does it mean that If I need to install 4 web front end server i would need to acquire 4 additional SharePoint license?
Comment: Yes, you need to buy those 4 SharePoint Server Licenses. The question is: Do you really need to upgrade by 4 additional servers? Those can handle a LOT of load.
Answer:
I am afraid you won't be able to join the SharePoint foundation server as an additional WFE to your existing enterprise edition SharePoint farm, as they are 2 different builds.
Cost of additional license depends on your SharePoint farm scenarios like Intranet, Extranet or Internet applications. For more information about licensing cost you can ref to the following links.
How much is sharePoint licence cost and SharePoint 2019 licensing
For accurate information on pricing please get in touch with your Microsoft account manager.


Oral Presentation Prize at a Conference

Question: Abstract was selected for 'oral abstracts' competition, in a shortlist of 5 presenters. I was announced winner at the end of the competition. Following the event I have been emailed to pass on my bank details as the beneficiary of the £1500 prize. My co-authors are all seniors/co-supervisors. What should I do? Should I email them all to discuss splitting up the share? Or should I not raise the matter at all, to avoid embarrassment. From reading responses to a similar post before, I get the impression that since the award is for best Oral Presentation, and I am the only 'student' it should probably just go to me. At the same time, I don't want to just keep it without mentioning it to anybody.
Comment: See [Share prize money from conference presentation award with co-authors?](https://academia.stackexchange.com/questions/58768/share-prize-money-from-conference-presentation-award-with-co-authors)
Comment: "I have been emailed to pass on my bank details" I would not suggest sending your bank account information by email.
Comment: Can you give more details on the competition?
Comment: Where is the embarrassment in winning a prize?
Comment: hi - no embarrassment in winning. they are aware i won and very happy. i just don't fancy talking about splitting cash with my seniors. to them it is probably negligible. to me, it is significant!
Answer: You should absolutely inform your co-authors
These people care about your career. They will be your recommenders, they will help you find jobs. People will ask them about your work. "Hey, I just won a big prize" is something I'd want to know if it was one of my students or postdocs - because I'd proceed to cheerfully show off the awesome work people in my lab are doing.
You can broach the subject of splitting the prize with them, but personally you did the presentation, and you won the award. If I was on the paper, I'd settle for a warm fuzzy feeling.
Comment: This answer is great. As for sharing the prize: The money is yours and although it is very nice of you to consider to share it, I do not think that is necessary or expected. Maybe you could take your co-authors dinner or to a bar or something.
Comment: Thanks for replying  - I informed them about the winning. And they were all thrilled. But I did not know about any money attached to the presenter award..... so I just don't want to reopen an awkward conversation about money. i think for them the monetary side would be negligible, given their seniority. my one concern is whether somebody  suggests the money goes to a research 'fund' for our department. If that happened, I would be miffed!
Comment: thanks louic - i probably agree with your sentiments the most!
Answer: Congratulations! It will not hurt to let your co-authors know about the prize, and you can certainly offer to share the amount as well. As a student and presumably the only presenter, you are the primary recipient of this award, but your supervisors will likely be glad to know you received a substantial award.
Comment: Hi - thanks for replying! I didnt actually know about the cash award until a few days later. I did straightaway inform my supervisors that I had won and they were all delighted. They all congratulated me instantly. But I did not know or mention anything about cash awards at the time.

Oral Presentation Prize at a Conference


Error 310 (net::ERR_TOO_MANY_REDIRECTS):

Question: I am not getting this error on my local host, only when i upload to my server does this error appear, on one of my pages. any idea what i need to change?
Comment: what else can i provide? i have no idea what is causing this to happen.
Comment: Some more information please? Anything...?
Comment: First of all, where exactly that error is coming from. Secondly, what have you tried? *Any* additional indicators about what could be happening. Then, what does your application consist of? Do you do anything with redirects at all or does it seem like a web server problem. Just *any* information you can provide that may seem relevant.
Answer: I have run into this error in a web browser in which a webpage I went to redirects to another web page that redirects back to the original endlessly,  I have also run into situations where a programming error continuously reloads or redirects the page to itself.
The way to trouble shoot this type of problem is to actually watch the requests your browser is making to the server.  You should be able to see multiple individual requests before this error comes up.
You can see the requests your browser makes using the network tab of the developer tools in Chrome (Ctrl+Shift+J) or the network tag of Firebug in firefox.  I think IE9 has a network tool in their developer tools (F12) but I cant remember,   and I cant think of a good enough reason to open IE9 to check.  But if it doesn't have a network tool you can install the free version of HTTPWatch,  which allows you to watch the individual requests made by your browser.
And,  if none of these work,  you can always install Fiddler or WireShare which sniff the packets and requests made by your browser.
Comment: Using this advice I located my specific related issue.  Noting for future developers with my issue.  I am moving an old app I have not touched in a year and a half from Heroku to my own server (Ubuntu 18).  In order to run SSL on Heroku, I had to use sslRedirect() from the heroku-ssl-redirect npm library.  When moving to a standard server, even on non-SSL ports, the express server was still redirecting in a loop.  On the SSL port, it also got stuck in a redirect loop.  By taking out this line, the express server now serves the app with no issues redirecting.  I wish I had more detail, but hth.
Answer: localhost and web-servers are different path for your files so you need to edit .htaccess file for get actual base-path and add this line of code int it
<code>RewriteEngine On

# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
RewriteBase (your physical path)

.......
</code>
its all about .htaccess error


How do I let my friends join my single player world?

Question: Ok, So I have a friend who lives in the Netherlands and I want her to join my single player world to record and RP (Role Play). I gave her my port number at first, but that didn't work, so I did command R and typed in cmd and then ipconfig. I then got my IPv4 number and gave her that, but she still can't join. I'm kind of a noob when it comes to this stuff so please help as soon as possible!!!
Comment: Like answered, it isn't possible via LAN. I would recommend using something like [Grappl](http://grappl.io). With Grappl, you open you LAN and Grappl sets up a secure server address that you can give to your friend. Source: Personal use across US.
Answer: Simple: It's not possible.
Well, at least not if you only use the single player client. The normal client can only be used for LAN, not for internet-lobbies. You could use the minecraft server software - or better bukkit/spigot.
Install Spigot (which you can download here) on your local machine as described in the spigot docs and after that, you have to port-forward the port which minecraft should use in your router (which obviously requires you to have full access to the router). After you did that, you can copy the world from your AppData/Roaming/.minecraft folder into the world folder of your server.
Since running a server requires quite a quite a bit of technical knowledge and usage of console commands and you are kind of a noob as you said yourself, you might be better off with renting a server from a provider like nitrado since they provide an easy to handle Web-GUI for your server.
Edit:
You can also install the native mc server software, which is described pretty nicely here.
Answer: Ok, from your question, I assume you yourself do not live in the Netherlands? You cannot actually host a server away from LAN simply using the client. You will need to have some server software. For your purposes, it is most likely that you would want to run a vanilla type server. This will require port-forwarding, and there are many videos on how to specifically do it for your ISP. As you stated that you are a bit of a noob, I wouldn't recommend jumping into Spigot/Bukkit until you have a little bit of experience with servers. The vanilla server will suit your needs, if they are just to RP and record. Spigot plugins mostly affect gameplay, and they tend to get complicated around the backend. On one more note, I wouldn't suggest paying for a server hosted by someone else, unless your computer is VERY bad. And again, since you are wanting to do RPing and Recording, paying for a server to run 24/7 is probably not the best option.
TL;DR

Go online, look up a video explaining how to set up a Vanilla Server.
Stay away from Spigot/Bukkit at first.
Stay away from purchasing a 24/7 server.

(EDIT: Sniped.)
Comment: Thanks for your comment, I appreciate it! No, I don't live in the Netherlands. That is a huge problem as mods in this RP are vital. I was going to create a forge server but my dad said hackers could, well, hack and get my network code and stuff and it wouldn't be good. I just don't know if this is possible. We have been planning this for ages now. Thanks for your help anyway.


CSV column value calculation in java

Question: I am looking out for Java open source API which ease CSV reading/writing and it's value calculation. I am having 3 CSV files, which I need raw read and make calculation and write into final CSV file.
Comment: This is not a place to ask people to code for you. Your question is also vague (bad grammar making it hard to understand)
Comment: you really do not need package you can just read csv just look at this example http://stackoverflow.com/questions/14274259/java-read-csv-with-scanner and write http://stackoverflow.com/questions/30073980/java-writing-strings-to-a-csv-file when that said you can have a look at http://opencsv.sourceforge.net/ and just google search for reading/writing to CSV file in JAVA
Comment: http://stackoverflow.com/questions/14226830/java-csv-file-easy-read-write
Answer: uniVocity-parsers has a great API that helps you process all sorts of CSV inputs.
Here's an example to read a given set of columns in a file:
<code>CsvParserSettings settings = new CsvParserSettings(); //many options here, check the tutorial
parserSettings.selectFields("Foo", "Price", "Blah"); //get only those fields you are interested in
CsvParser parser = new CsvParser(settings);
List<Record> allRecords = parser.parseAllRecords(new File("/path/to/file.csv"));

double sumOfPrices = 0.0;
for (Record record : allRecords) {
    //Here we read the "price" column, using the "0,00" format mask, and decimal separator set to comma.
    Double price = record.getDouble("price", "0,00", "decimalSeparator=,");

    if (price != null) {
        sumOfPrices += price;
    }
}
</code>
Disclosure: I am the author of this library. It's open-source and free (Apache V2.0 license).

CSV column value calculation in java


Are there forms of capital which are not overtly economic?

Question: Are there forms of capital which are not overtly economic, e.g. political capital? Especially, in what ways is capialism reproduced besides the investment of money into means of production, to extract profit?
Comment: It seems like something prompted you to think about this. What was it? Something on tv? On radio? Overheard on a bus? The answer might help clarify the question.
Comment: @MATHEMETICIAN Hello, I may be offending you, but will you kindly ask your question related with Marx ( and Engels ) **after** you read at least Das Capital?. Although, it's lengthy, even reading the Book 1 would give you another light. I am really like, sorry, at the position of Military base where I was given the authority to push the "close" button :) :) !!
Comment: sorry if the question is badly worded, at present :)
Comment: @KentaroTomono not offended at all, but yes i have read das kapital. i haven't read much more than that, which is why i'm in a place to ask the question
Comment: @MarkAndrews the idea of different forms of capital, such as social, and the so called political class, etc.
Comment: @KentaroTomono maybe i'm misunderstanding your tone, but many marxists argue for different forms of capital, so i'm not sure why you seem suprised anyone familar with marx would think otherwise. tho perhaps not communists. the drive away from any kind of innovation aside from marx himself is i think historically quite a marxism-leninsim (stalinist) thing
Answer: In The Great Disruption and in Trust, the conservative political philosopher Francis Fukayama gives an economic interpretation to 'social capital' looking at how liberal economics only works because assumptions based upon traditional principles can be taken for granted.
For example, where there is no underlying sense of honor, corruption prevents meritocracy no matter how much economic force arises to encourage it.  Without investing real capital to suppress corruption, instead of creating efficiency, the pressure demanding better use of resources instead leads instead to pretense, greater waste, and ultimately failure.
As a less traditional example, he indicates the ease with which Americans will simply get into another person's car, and still feel safe, in a way that some Europeans would be scared to do, and many Central Americans would be objectively stupid to do.  (It is not that the other American whose car you get into is actually less violent than his European or Central American counterpart, we have more crime that Europe, and less than Central America, to approximately equal degrees, and both of those cultures see this as equally weird.  It is particularly American ethical quirk that we extend the expectation that one should be gracious in one's own home, to our automobiles.)
This creates an opportunity for an economy of low-oversight taxi service, and ultimately Uber...
The fact it creates the opportunity for efficiencies makes this a form of capital, in certain terms.  Once it is lost, more genuine economic capital must be invested directly to offset the cultural drag that ethical assumptions used to counteract.
Comment: good answer, adding clarity. would've liked something on the situs tho!
Comment: I don't understand.  The 'situs'?  Do you mean the second question: 'How is capitalism reproduced?'  By definition capitalism is leverage via the ownership of the means of production -- but if the means of production depends, e.g. upon the moral environment and the ability for people to understand one another that makes religions and nationalities capitalist institutions providing maintenance of the means of production, at least to the extent the are 'owned' by a magisterium or a historical network of families of nation builders.
Comment: uh sorry @jobermark, i meant the situationists? interesting marxists!
Comment: Of course, Fukayama is entirely pro-capitalist, of the variant that admits our system  does abuse our environment, social structures, our psychology and morality, etc., but imagines that if we could value all of those non-economic things in 'utils' of some variety, the result would be a rational market.
Answer: Capital isn't just a Marxist technical term for a complex relationship of people that is mediated by objects, it is also an every day word.
The technical sense of Capital in Marxism is always (in part) economic—value reproduces itself in an expanded form or is destroyed.
However, in Marxism concepts such as political capital as a store of wealth or human capital as if there's a machine in someone's CV don't make sense. They're metaphors based off uses of capital in general language, or unusual claims created in reference to capitals use as a term in non-Marxist economics.