Copy data between different tables using BCP (bulk insert)

Question: My progarm will get two tables, e.g. T1(A, B, C) and T2(B, C, D) (tables are on different SQL servers).  T2 has one extra column (D) and one column missing (A).
I need to copy rows from T1 into T2 as fast as possible (probalby by using BCP utility). Column A should be omitted, column D should have some default value. My steps:

bcp queryout - Select B, C, xxx as D from T1, into temporary file
bcp temporary file into T2

How should my Select statement look like? How can I get default value for column D? Is there any other, simpler way to do such thing?
Comment: There is nothing wrong with current select, just need to know the type of D.
Comment: You can just select a constant as a field (`SELECT 'Hello World' as D`)
Answer: Since you have marked C#, I would suggest using SQLBulkCopy.  Here is a sample project on CodeProject
Answer: You can do this through SQL - using linked servers. You can use 4 dot notation to refer to the table in SQL. The notation is ServerName.DatabaseName.SchemaName.ObjectName. The default Schema is dbo, so to refer to a table the syntax would be: ServerName.DatabaseName.dbo.TableName.
You can run something like this on Server1:
INSERT INTO Server2.DBName.dbo.T2 (B, C, D)
SELECT A, B, 'Default Value' FROM Server1.DBName.dbo.T1

To set up the Linked Server from Server1 to Server2, run this:
USE master;
GO
EXEC sp_addlinkedserver
   N'Server2',
   N'SQL Server';
GO

Comment: The server and database names are also inputs of my program. Sometimes I don't have permission to sp_addlinkedserver on specific server, I can not rely on it.


Strong non-wandering points and the periodic points

Question: I was looking for something about nonwandering sets and i saw the following definition here: A question about non-wandering points :

Let $f:X\to X$ be a homeomorphism of a compact metric space $(X, d)$.
A point $x\in X$ is called a nonwandering point, $x\in\Omega(f)$, if for every open set $x\in U$ there is $n\in\mathbb{N}$ such that $f^n(U)\cap U\neq \emptyset$.
A point $x\in X$ is strong non-wandering, $x\in\Omega_s(f)$, if for every open set $x\in U$, there is $n\in\mathbb{N}$ such that $f^{nk}(U)\cap U\neq\emptyset$ for all $k\in\mathbb{N}$.

Also:

$\Omega_s(f)$ is a closed set. Let $x_n\to x$ and $x_n\in\Omega_s(f)$ for all $n$. Let $U$ be an pen set of $x$, hence there is $x_n\in U$, this implies that there is $m\in\mathbb{N}$ such that $f^{mk}(U)\cap U\neq \emptyset$ for all $k\in\mathbb{N}$, i.e. $x\in\Omega_s(f)$.

It is easy to see that $cl\big( Per(f) \big)$ the closer of priodic points is contained in $\Omega_s(f)$. Since if $\{x_n\}_{n\in \mathbb{N}}$ is a sequence of priodic points with limit $x$, then for every open set $x\in U$ there must be $m\ge 1 $ for which for every $n \ge m$, we can conclude $x_n \in U$. For some $ p \ge m$ let $x_p \in U$ be arbitrary. Then if for some $q$ it is happen that $f^q(x_p)=x_p$, then for every $k\in \mathbb{N}$ we have $f^{kq}(U)\cap U\neq \emptyset$. Now my question is :

Is it true that $cl\big( Per(f) \big) = \Omega_s(f)$ ? Is there a dynamical system on some compact space with $cl\big( Per(f) \big) \neq \Omega_s(f)$?
Answer: Is false see this paper, maybe help, in general diffeomorphisms that satisfy Axiom A have the property of equality between these sets, for example, Smale's horseshoe.


How to make one device on a network able to communicate to only another one?

Question: I have a printer attached to a network that I would like to be accessible only from one computer on the network. What are my options to accomplish this? I have a HP2530-48G switch under my hand if that could be useful.
Answer: Following Zac67 idea, here are the steps to make this work using the HP2530. My printer is connected to the port 43 on the switch and has the ip 10.1.1.11 and the only computer that can access the printer is 10.1.1.10.
// Enable configuration mode
configure

// Create the ACL PrinterACL
ip access-list extended PrinterACL

// Create two ACE has Zac67 recommended
10 permit ip 10.1.1.10 0.0.0.0 10.1.1.11 0.0.0.0
20 permit ip 10.1.1.11 0.0.0.0 10.1.1.10 0.0.0.0

// Exit ACL
exit

// Set the ACL on port 43
interface 43 ip access-group PrinterACL in

Answer: You should be able to use access-lists for this. Check the "Access Security Guide" for the 2530.
Something along the line of allow any <IP of computer>/32 <IP of printer>/32 and vice versa applied to the printer port. The deny any is implicit.
Make sure you're able to access the switch via serial console before experimenting with ACLs.
Comment: If I were to use two VLANs with both using the same subnet. I put all computers that should not access the printer on let say VLAN1 and I put the printer on VLAN2. If I set the only computer to access the printer as tagged on VLAN2 and untagged on VLAN1, would that work?
Comment: Two VLANs with both using the same subnet breaks communications. VLANs do not (L2) communicate with each other. With two identical subnets you can't route either. You can either use two VLANs with two different subnets, set up routing and filter that route to what you require. Or you simply use ACLs on the printer port to filter out all traffic you don't want with the single VLAN/subnet you have.


Foundry: compile and test too slow

Question: The problem is as the title. As we know, foundry is created by rust, it is very fast. But why my foundry is so slow?
my version: forge 0.2.0 (8307d6d 2023-04-19T16:44:52.696636400Z).cast 0.2.0 (8307d6d 2023-04-19T16:44:52.696636400Z). anvil 0.1.0 (8307d6d 2023-04-19T16:54:04.891176400Z). rust version: stable-x86_64-pc-windows-gnu (default)
here is the example, there is only one file in test folder: 900+ ms
PS E:\BlockChainPoC_github\BlockChainPoC> forge test
[⠔] Compiling...
No files changed, compilation skipped

Running 1 test for test/DFX.sol:ContractTest
[PASS] testExploit() (gas: 750212)
Test result: ok. 1 passed; 0 failed; finished in 988.07ms

and another test costs 22 secounds!
PS E:\BlockChainPoC_github\BlockChainPoC> forge test
[⠒] Compiling...
[⠑] Installing solc version 0.6.12
[⠘] Successfully installed solc 0.6.12
[⠰] Installing solc version 0.6.9
[⠔] Successfully installed solc 0.6.9
[⠒] Installing solc version 0.5.16
[⠆] Successfully installed solc 0.5.16
[⠘] Installing solc version 0.6.6
[⠊] Successfully installed solc 0.6.6
No files changed, compilation skipped

Running 1 test for test/bamboo/poc.sol:ContractTest
[PASS] testExp() (gas: 131579220)
Test result: ok. 1 passed; 0 failed; finished in 22.06s

Answer: One of things you can do is follow best practices
https://book.getfoundry.sh/tutorials/best-practices
For example changing from
import "src/MyContract.sol"
to
import {MyContract} from "src/MyContract.sol"
Did reduce the compile time for me

Foundry: compile and test too slow


Is this beef rib ok?

Question: I am cooking beef ribs for a chemo patient and don't want to take any chances. The fat on the ribs is bluish greenish.  See the photo.  Is it normal or rotten? The meat looks good.
Imgur pics
Answer: While visual cues are often helpful, there is no way for anyone to let you know whether or not this product is a safety risk from the photo.  More important would be to know whether or not it has been handled and stored in a food-safe manner.
Comment: Good advice. There's nothing in the picture that suggests spoilage, but by the time visible signs appear, it's probably been bad for a while, so it's not safe to judge based solely on appearance.

Is this beef rib ok?


Python code for transforming lat long into FIPS codes?

Question: I am trying to transform CSV files of lat long into FIPS codes. Does any one have a Python code that is able to do this? I have that worked then stopped working giving me an 'http 400 bad request' output.
Comment: Hi John, welcome to GIS.SE! Could you expand a little bit on what you tried, and resulted in the "http 400 bad request"?  Also, if you're using any specific modules in python, it might be good to list some of those out.
Comment: Hi John, one approach would be to geocode the lat long coordinates and perform a spatial join with FIPS shapefiles to get their corresponding FIPS code.
Comment: hi, thanks for your comment. How would I go about this? I only have a csv files with the lat long.
Answer: There is an API through the FCC that will return information about a census block from lat/lon coordinates. https://geo.fcc.gov/api/census/#!/block/get_block_find
The format of the request URL is as such:
https://geo.fcc.gov/api/census/block/find?latitude=40&longitude=-75&format=json
import requests
import urllib

#Sample latitude and longitudes
lat = 40
lon = -75

#Encode parameters
params = urllib.urlencode({'latitude': lat, 'longitude':lon, 'format':'json'})
#Contruct request URL
url = 'https://geo.fcc.gov/api/census/block/find?' + params

#Get response from API
response = requests.get(url)

#Parse json in response
data = response.json()

#Print FIPS code
print data['County']['FIPS']

This example returns the county FIPS code. The request will return FIPS data about the county, state, and census block, so it depends on which level you are interested in.
Comment: Worked for me... took about a minute to process 100 coordinates.  Thank you
Comment: This seems to rely on FIPS definitions under current FIPS categories? But FIPS codes have been occasionally merged, renamed, recoded, split. How can I use 1990 version of FIPS for this purpose?
Answer: The fcc API is unavailable as today.
A good option is geo census.
For example: geocoding.geo.census.gov/geocoder/geographies/coordinates?x=-82.630303&y=34.537094&benchmark=4&vintage=423
Python code:
URL = f"https://geocoding.geo.census.gov/geocoder/geographies/coordinates?x={lng}&y={lat}&benchmark=4&vintage=423&format=json"
response = requests.get(URL).json()
county_data = response["result"]["geographies"]["Counties"][0]
fip_code = str(county_data["STATE"]) + str(county_data["COUNTY"])


Can you increase your undergrad gpa after graduating?

Question: I've googled this question a few times and I've seen multiple different answers. I read that you can raise your undergrad gpa using a post bacc and I also read that post baccs provide a separate gpa. So, I'd really appreciate if I could get a definitive answer, preferably with a source. Thank you.
Comment: I don't think there is a general rule.  Rather than asking Google, why not ask your own university's registrar office?  They can give you the definitive answer for your institution.
Comment: I doubt you can increase your GPA after graduating, you have already been awarded the degree.
Answer: Yes, it is possible.
Faculty at my university have the right to change their course grades up to five years after the course ends.  I have a standing offer that if any student publishes a research paper as a result of work in my class, I will retroactively change their grade in that class to an A+.  I have actually done this a few times, in one case two full years after the course ended.
(All the students involved in those changes already had A's, and my university counts both A and A+ as 4.0 in its GPA calculations, so the change did not actually change their GPA.  But in principle, it could have.)
But this is the only way I can imagine a student at my university changing their GPA after graduating.  In particular, I believe the university maintains separate GPAs for different degree programs, so taking any post-bacc or graduate courses would not effect their bachelor GPA.
Comment: Interesting that your university allows this. At places I have been, there was a rule that retroactive grade changes could only be used to correct clerical errors, or in case of academic dishonesty charges that were not adjudicated until after the end of the term.
Answer: Courses taken through different programs generate separate GPAs.  When somebody (like a graduate admissions committee member) is looking at your undergraduate-level grades, they are going to pay primary attention to the grades for courses you took at your primary undergraduate institution (or institutions, if you transferred during your regular undergrad career).  They are probably not going to average your grades from different places, particularly if it is obvious that you took additional courses (through an easier program) after you finished a normal undergraduate degree.
However, at many institutions, faculty members may change grades after a course has been completed.  The rules for how long they have to make changes are highly variable; it could be limited to within two years, or five years, or subject to no time limit at all.  This is probably not going to be very helpful to you though.  Grade changes are rare, and faculty are very unlikely to raise your grades for courses you took in the past.  It would take a lot more than just convincing them that you are better student now than you were then (which would be difficult in itself).


( Java Minecraft 1.14.3 ) Is there any block that spiders can´t climb?

Question: Is there any block that spiders can't climb ? It's really messing up my farm  and I'm looking for a way to prevent it. :D Thanks.
Comment: Spiders for sure can't climb cactus *without being harmed*, but I think they still can climb it. If you make an overhang the spiders will get stuck on it, but they will still try to climb the wall leading up to the overhang. According to [this](https://gaming.stackexchange.com/questions/66050/are-there-any-blocks-that-spiders-cannot-climb?rq=1) very old post, spiders can't climb walls with signs, but that has probably changed by 1.14.
Comment: @Nik3141 yeah I tried signs but they climbed it and I found that someone said they can´t climb cocoa beans so I will try it out
Comment: @Koterko also try fence. They used to not be able to climb it, but i'm not sure anymore. :)
Comment: If you fill the walls with end rods, at least cave spiders only climb on top of the lowest one.
Answer: They can climb on any block (except lava, since they die before getting on the walls), but that isn't good idea to prevent them from coming in, as the lava can burn everything. If you use fences, place a carpet on top of them (or a slab, dosen't matter), and if you use blocks, put a trapdoor on them and close it. These blocks stop them from climbing up them, because the blocks the spider climbs on must be flat (e.g. a 3-block stone wall), so carpet on fences and trapdoors on blocks are the best solutions to stop them. The walls don't need to be that big, but since Spiders could try to jump and eventually get on the carpet/trapdoor, ignoring it completely, it's better to make it 3 blocks high.
Hope this helps.


Is it momentum/force or pressure that determines the damage of an impact?

Question: So a tiny object and a huge object that have the same mass and velocity strike a surface. Because they have the same mass and velocity, they would have the same momentum and will deliver the same amount of force upon impact. I would intuitively expect that the tiny object would do far more damage than the large object, so I'm guessing damage is determined by pressure (which is partly determined by force and therefor is connected to momentum i.e. increase the momentum in an object, increase the pressure it exerts, assuming it covers the same area).
I'm not 100% confident that I'm correct though, partly because I always hear people talk about impact in the context of force and momentum (the force * the period time it is exerted over) alone, not taking the area that the force is exerted over into account. Is this just them making assumptions that an object with a high mas will be very large or does the area not matter as much as I think it does?
Answer: Oh, the damage from impact does depend on pressure. Try hitting a flat table and a sharp nail with the same force, and see which causes more damage.
As far as I know, this occurs because the more pressure exerted on a surface, the more stress it experiences, thus causing a larger strain. If the stress experienced is large enough, it may even cause fracture.
Comment: So the whole thing about people talking about the damage of impacts/explosions and such in terms of force but not pressure is kind of presumptive? It just seems silly to me that people would talk about 1,000,000 lbs of force like it's some huge deal when, depending on the area of contact, that could just leave a slight dent.
Comment: Generally, when we talk of damage to something, its surface area is a constant, while the force that can be applied to it can vary. Hence, we talk only about damage due to force.


IOS facebook "single sign on" confirmation

Question: We are developing an server-client IOS app. And we have facebook single-sign-on option. Our IOS app is basically the client side of our program. What I want to learn is, if our server gets a login request via SSO how I can check the authenticity of the request. Can I check the validity of the FB token or something else?
Answer: We handled this by allowing the client to auth the user.  Then POSTing the Facebook access_token to the server and doing a lookup on the user's email or facebookid in our database.


Python Peer to Peer Network

Question: I'd like to make my own crypto currency. I don't want to just recompile the Bitcoin source code and the rename it. I'd like to do it from scratch just to learn more about it. I'm thinking of using Python as the language for the implementation but I heard that in terms of performance Python isn't the best. My question is, would a network written in Python be able to perform well under the possibility of millions of peers (I know it's not going to happen but I'd like to make my network scalable.)
Comment: Cool, good luck with that!
Comment: Beware, Satoshi Nakamoto is doing the rounds.
Answer: Depends which part is in Python. The network is, by definition, I/O bound. It's unlikely that using Python rather than C/C++/etc. will cause a noticeable performance drop for the client itself. Your choice of cryptographic algorithm will also have a large impact on performance (how quick it is to verify transactions, etc.).
Now, as for 'mining' the currency, it would be silly to do that with Python since that's very much a CPU-bound task. In fact, using a GPU which allows for massive parallelism on trivially parallel problems is a much better idea (CUDA or OpenCL work great here).
Comment: GPUs?  Come on.  If you're not fabricating your own ASICs you obviously aren't serious about performance.
Answer: Nothing beats good ol' C for performance. However, if you plan on parallelising everything for multi-CPU support I would give Haskell a try. It is inherently parallel, so you won't have to put in extra effort for optimizations.
You can also do something similar in C with OpenMP and Cilk using pragmas.
Good Luck!

Python Peer to Peer Network


Can I attach my camera to my arm, to prevent injuries?

Question: I'm photographing professionally for a few years now, and I'm starting to feel some arm pain, I think it's related to long shooting sessions. I'm seeing a doctor in order to diagnose and treat it, but I'm also wondering if is there some accessory to attach the camera to my right arm, so I can easily shoot with my right hand but don't have to hold the weight of the camera with my hand for hours.
Comment: How are you currently [holding your camera](https://digital-photography-school.com/how-to-hold-a-digital-camera/)?
Comment: Besides various straps, how about a Monopod?
Comment: @BrunoLamps In the example linked by inkista, the weight of the camera is being supported by the left hand underneath the camera, not by the right hand.
Comment: consider a lighter camera? some mft systems might help with your condition
Comment: Is the pain with your left or right arm?
Comment: Hi, thanks for all help!
@inkista I am holding the way it's described in the article you sent: Right hand holds and operates it, sometimes with the help of my left hand. The camera is almost always near my face.
Comment: @Linwood a monopod would unfortunatelly be little to no help, because I'm moving around the room all the time. I shoot mostly babies, preagnant women and birthday parties.
Comment: @MichaelClark the pain is in my right arm and right hand, the ones that hold the camera. =(
Answer: A lot of amateurs use a wrist strap that helps hold the camera to the right hand. In 30+ years of moving around in photographic circles, I've never seen a single professional photographer (defined as someone whose primary income is derived from taking still pictures) using one. Ever. They are available in a wide range of materials, designs, and prices.
One of the first things most shooters learn in photography school is to support the camera with the left hand when shooting handheld. The right hand is for operating the camera's controls. The left hand is for holding/supporting the camera as well as using the fingertips to operate zoom and/or focus rings if necessary. The overwhelming majority of still cameras are designed to accommodate this basic concept.
If you are holding the camera correctly you should be able to completely remove your right hand with no loss of support of the camera. If you're supporting the weight of the camera with your right hand from the side of the camera, rather than with your left hand underneath the camera, then that is the source of your pain problem.
Video cameras, on the other hand, almost universally have a wrist strap that helps the videographer keep their right hand held to the controls. But pro level video cameras rest on the right shoulder (or a more involved stabilizer system such as SteadiCam where the cmaera rig is strpped to the body) for supporting the weight of the camera, so it is a totally different technique.
Just as there is a "standard" way to swing a golf club (or many other physical motions) that will normally result in best results, there is a best practice that will usually result in minimizing camera movement and maximizing the ability to control the camera quickly and efficiently.
Of course there are special cases for someone who has a physical issue that makes it difficult if not impossible to use normal technique. In art school they teach you to hold a brush a specific way for making a certain type of stroke. But there are successful artists who paint with their feet or even by holding the brush in their mouth because their arms/hands are not functional.
Comment: Thanks!
I'll try observing it. I think I already support the camera (part time) with the left hand, but I'm not sure about it, and the pain tells that I probably not. I'll watch how my hands behave this week, check if I'm using the left hand to hold the weight. =)
Answer: Without more detail it's hard to be confident that the problem is to do with weight. It might be posture. Consider that most cases of carpal tunnel syndrome are due to bad posture at a computer, where it's the angle of the wrist and the repetitive movement of the fingers rather than the weight supported which does the damage. And I can tell you from experience that even though the actual injury is in the wrist, the pain is felt all along the arm.
However, with respect to relieving the weight and possibly also improving posture, I think you're too quick to dismiss monopods as a possible solution. I was at a wedding last weekend where one of the photographers was using a monopod and live view and seemed to have no problem moving around the room.
Comment: Thanks @peter-taylor! I'll consider buying one in the next weeks, if it's the solution to my problem I'll definitelly adapt myself. =]


how can i activate "page layout" option in page tab in SharePoint 2013?

Question: I just downloaded a package to brand my portal, which is SharePoint 2013. I do the exact steps of the document and guide, but for the last step, to select proper page layout, this option is not active and the UI doesn't change for all the pages...can you help me?
Thanks
Answer: On a teamsite for instance - do the following:
Activate the following features:

Site Collection Features - SharePoint Server Publishing
Site Features - SharePoint Server Publishing

~ Navigate to the page library (Pages) ~ Create a new page ~ Set the new page as the welcome page of your site ~ Delete the SitePages library
From now on, you will fully use the publishing features (page layouts).
Answer: You have to activate the SharePoint Server Publishing Infrastructure Site Collection Feature and after that you can activate the SharePoint Server Publishing site (web) feature.
This will create the necessary libraries (Pages library) inside the current web and you should be able to select a page layouts (for pages residing inside the pages library).
I think you will have to reset the Welcome Page after the activation to a page inside the pages library.


Dapp Communication using smart contract written in solidity in truffle framework

Question: How will two Dapps, developed using truffle framework, will communicate with the contract deployed by one Dapp ( Consider testnet using geth)?
Comment: Related http://ethereum.stackexchange.com/questions/3662/truffle-dapp-communication
Answer: When you deploy a contract, it gets assigned an Ethereum Contract Address. If you want to interact with a contract you must load the contract address to your wallet. (Take a look at how it is done with DAO: https://daohub.org/voting.html)
To interact with a Contract you need 2 things:

The contract's Address
The contract's JSON interface

By using these two you are able to load and invoke a contract onto web3.js and begin to interact with it.

navigate to 'Contracts'. Select then 'Watch Contract'. In the "Watch Contracts" interface, type 'The DAO' as the Contract name, paste the contract address, and the JSON interface. Click 'OK'.
With the contract interface registered, click "The DAO" in your custom contract section, and wait a few seconds. You are now able to use the interface and interact with the contract.


What materials are used in non thermal plasma?

Question: While reading about non-thermal plasmas, I came across their ionization potentials(~1%), and other capabilities, such as their non Maxwellian energy distributions. At what temperatures, and pressures do they exhibit such properties, and what materials are used to create non thermal plasma?
Comment: maybe this link to the wikipedia article will help orient the question for those who are not familiar.  http://en.wikipedia.org/wiki/Nonthermal_plasma .
Answer:
At what temperatures, and pressures do they exhibit such properties

First, temperature is only rigorously defined when the particle distribution functions are Maxwellian.  For a non-thermal plasma, the notion of a "temperature" is ill-defined.  If you do see someone talking about temperature for such a case, they've likely ignored a small perturbation that makes the distribution non-Maxwellian.

and what materials are used to create non thermal plasma?

Materials have little to do with this.  By this I mean that the species of gas you pick to ionize, for instance, does not by itself determine whether your plasma will be non-thermal.  It has more to do with the ionization process, confinement and / or heating scheme that you're using.
For example, I can launch electromagnetic waves into a plasma that damp on electrons in a certain way (see Landau Damping) such that energy is preferentially transferred to some electrons in the tail of the (originally) Maxwellian distribution.  If I do this continuously, it will change the steady-state distribution function away from a Maxwellian.
Comment: this  helps a bit on temperature definitions for plasma http://en.wikipedia.org/wiki/Plasma_%28physics%29#Temperatures
Comment: Why should the temperature be only rigorously defined for Maxwellian distributions? In statistical mechanics you usually define it as $1/T =\frac{\partial S}{\partial U}$, for $S$ the entropy and $U$ the internal energy. This works for a large number of non-Maxwellian distributions...
Comment: @WraithOfSeth: Because in kinetic theory you use Temperature as the second moment of the underlying velocity distribution. Only in the maxwellian case is the system completely described by 0th, 1st and 2nd moment, else you need more of them, or they simply don't have a straightforward interpretation anymore.
Comment: @AtmosphericPrisonEscape I generally agree with this.  To be precise, however, even for a Maxwellian it is not fully described by the 0th, 1st and 2nd moments.  We have to add an ansatz for heat transfer ($Q \sim \chi \nabla T$) to close the system.  Typically, $\chi$ incorporates complex transport mechanisms and is determined empirically for a plasma.
Answer: Temperature is defined by thermodynamic equilibrium, which should be clarified at first. From this definition, we can easily obtain that the so called "non thermal plasma" is a concept which describes a plasma state without thermodynamic equilibrium. Basically speaking, thermodynamic equilibrium is obtained by collisions between particles caused by molecular force in neutral gas. On the other hand, coulomb force takes place of molecular force in highly ionized plasma. Note that these two forces are both working in plasma. So, particle density, initial velocity distribution and ionization rate will dominate in determining whether an isolated plasma system could get a thermodynamic equilibrium or not.


Elasticity of demand functions

Question: I have some question about the elasticity of the demand functions of two different traders/consumers. Suppose that $x_1$ and $x_2$ are the elasticities of the demand functions of these agents. Furthermore, they have linear demands, that are $d_1=a_1-x_1P$ and $d_2=a_2-x_2P$, where $a_1,a_2$ are the intercept points of the demand functions and $P$ is the price of the asset/commodity. What does it mean that the elasticity of trader $1$ is higher than that of trader $2$ i.e. $x_1>x_2$ or the opposite, $x_1<x_2$, in case they buy the asset/commodity or they sell it.
Answer: In the case of linear demand $d_i=a_i-x_iP$ (assuming $d_i$ is quantity demanded by individual $i$), the price elasticity of demand at point $(d_i,P)$ is
\begin{equation}
\epsilon_i(d_i,P)=x_i\cdot \frac{P}{d_i}.
\end{equation}
As @the_rainbox noted in their answer, price elasticity of demand varies along a linear demand curve. So in order to compare elasticities between different demand curves based only on the slope coefficients (the $x_i$'s), you need to fix $P$ and $d_i$; that is, assume that the demand curves of individuals $1$ and $2$ cross at some point $(Q_0,P_0)$.
Then, you can say things like
\begin{equation}
\epsilon_1(Q_0,P_0)\ge \epsilon_2(Q_0,P_0) \quad\Leftrightarrow\quad x_1\ge x_2.
\end{equation}
Or in words: $1$'s demand is more elastic than $2$'s at $(Q_0,P_0)$ if and only if $1$'s demand curve is flatter than $2$'s. [Note that since by convention demand curves are plotted in the $(Q,P)$-plane, a flat demand curve actually corresponds to a high $x_i$.]
Beware, however, that in contexts where a high degree of mathematical rigor is not required, it is sometimes taken as a rule-of-thumb that flat demand curves are "generally" more elastic than steep ones. Hence slope becomes a proxy for elasticity in those less rigorous discourses.
Answer: Please note that the slope of the demand curve ($x_1, x_2$ in each case) is not the same as the price elasticity of demand. Especially in linear demand curves, we notice that price elasticity takes values in the range $(-\infty, 0)$.

It's easier to argue the differences in slope between two agents once that has been clarified.
Comment: This doesn't answer the question and should be left to the comments (the graph is not necessary to clarify)

Elasticity of demand functions


Is it possible to reissue the same token symbol after ICO?

Question: newbie's here.
For instance, I'm creating a token with symbol "TEST".
In the contract I'm saying that I can sell only 10000 TESTs. Running an ICO, selling this token. But I've got a mistake in my papers. I'm realizing that I need to sell 10000 TESTs more in order to successfully launch my business. What my options are? Is it possible to save tradable symbol TEST with same bids and asks on the exchange and issure more tokens?
Answer: Symbol and Names are not unique. As a matter of fact if you do a search on etherscan you will notice there can be several tokens with the same name or symbol. The only thing that makes them unique or identifiable is the address to which they were deployed.
So, technically, you could deploy another token contract with the same name and a different totalSupply and have a new crowdsale that works with that "new token".
What your options are really depend on what was coded on the token contract. For example, is it a mintable token? If it is, are you, as it's owner, able to mint more tokens freely?
You could deploy a new token with a higher supply and transfer the previous tokens to this new contract, as long as they are ERC20 compliant you should be able to do it, at least on the technical side, if your current token holders approve such transactions. You can check this question for more info: Using Solidity, how can I transfer ERC20 tokens from the current address to another?
It all comes down to how you communicate this to your current investors. From the reasons as to why you will need to do this to what the new address for sending ETH is and instructing them not to use the old one.
Comment: Another solution could be to do a second ICO with TEST2 token and have your dapp accept both TEST and TEST2, and at some future point in time have users change TEST2 for TEST tokens or merge them into a TEST3 token.
Comment: Thank you for the answer. Could you please suggest the scenario with `transferFrom`? How should I communicate with investors and what do they need to do? What happens if some of them would reject to _migrate_ to the new token?
Comment: transferFrom function (which is part of the ERC20 specification) allows anyone to transfer x amount of tokens from address _from to address _to.
Of course, before anyone can transfer tokens from my balance to another's I first have to approve it with the approve() function.
So, one solution would be for you to ask token holders to call approve for their tokens, granting you to transferFrom their balances to a new contract, which should be coded to accept these tokens and add them to its internal balance.
Notice that this would require each token holder to do this and communicate it to you.
Answer: Of course you can.
Your token symbol is just field inside the contact source code.
Each client (Mist, Etherscan, Ethereum Wallet, etc) just have method which can look what is inside of symbol variable.
<code>string public constant symbol = "TEST";
</code>
So, you can create as much tokens with symbol "TEST", as you want.
Answer: You have a few options:

If mint function is enabled - you can create the additional 10,000
TEST tokens to increase the supply up to 20,000 total
If mint function is not enabled and the contract is not upgradable -
you must create a new contract and revise the supply to 20,000.  Keep
in mind you have total and max supply numbers to play with.  If your
token is already publicly traded and tracked by CoinMarketCap, you
will need to do a couple of things:
Inform your community that a new token has been created and that the
previous token can be migrated over to the new token
Inform CMC similarly and provide them with the "v2" contract address.

You need to make sure all existing v1 tokens are swapped to v2 - in practice this rarely happens, so you will have two versions of the tokens floating around and both will be tracked by CMC.
You will need to coordinate with all current exchanges and if you're on a DEX, create a new LP with the new token.
Keep it mind, it may have the same symbol, but you're effectively creating an entirely new token.  There's no way to go back and edit/add more tokens unless the contract is mintable.


VB.NET Array Intersection

Question: This could be terribly trivial, but I'm having trouble finding an answer that executes in less than n^2 time. Let's say I have two string arrays and I want to know which strings exist in both arrays. How would I do that, efficiently, in VB.NET or is there a way to do this other than a double loop?
Comment: What version of .NET?  in 3.5 you could use the linq extension for Intersect
Comment: I believe we are using 2.0 at this point. Corporate hosting policy, unfortunately.
Answer: The simple way (assuming no .NET 3.5) is to dump the strings from one array in a hashtable, and then loop through the other array checking against the hashtable. That should be much faster than an n^2 search.
Comment: It was probably best if they were in a hashset, dictionary, or list rather than an array in the first place.
Answer: If you sort both arrays, you can then walk through them each once to find all the matching strings.
Pseudo-code:
while(index1 < list1.Length && index2 < list2.Length)
{
   if(list1[index1] == list2[index2])
   {
      // You've found a match
      index1++;
      index2++;
   } else if(list1[index1] < list2[index2]) {
      index1++;
   } else {
      index2++;
   }
}

Then you've reduced it to the time it takes to do the sorting.
Answer: Sort both lists. Then you can know with certainty that if the next entry in list A is 'cobble' and the next entry in list B is 'definite', then 'cobble' is not in list B. Simply advance the pointer/counter on whichever list has the lower ranked result and ascend the rankings.
For example:
List 1: D,B,M,A,I
List 2: I,A,P,N,D,G
sorted:
List 1: A,B,D,I,M
List 2: A,D,G,I,N,P
A vs A --> match, store A, advance both
B vs D --> B
D vs D --> match, store D, advance both
I vs G --> I>G, advance 2
I vs I --> match, store I, advance both
M vs N --> M
List 1 has no more items, quit.
List of matches is A,D,I
2 list sorts O(n log(n)), plus O(n) comparisons makes this O(n(log(n) + 1)).
Answer: If one of the arrays is sorted you can do a binary search on it in the inner loop, this will decrease the time to O(n log n)

VB.NET Array Intersection


How can I connect USB to TV (via AV port)

Question: How to connect to TV with USB to AV cable?
I tried to connect, but nothing happened!
(10.04 Lucid)
Answer: I think you might be talking about a cable to be used with a digital camera, not a computer.
does yours look like this?

or this:

This cable is meant to connect a digital camera to a TV. It's useless with computers
There are adaptors, such as the one in the first image, that do this job. A few of them work well with Ubuntu, you should carefully select one that does if you're going to buy one, because may of them have problems.
But, I think you're probably not talking about this thing. So, no, a simple cable will not work.
Comment: you're wrong ! i'm talking about usb to av-out in TV
Comment: Please add a picture of what the cable looks like to your post. You will probably find one with google image search: it'd be very helpful.
Comment: sorry ! I can't found on google :(   ...the cable is to connect to the AV port in TV from usb port of the computer
Comment: Do you have a model number or a product name? Unfortunately, with the current information it could be a million different ones. Please also add the output of the command `dmesg` after you've plugged in the cable to your question, that'd be really helpful as well.


How to remove uppercase URL's with octopress Heroku blog?

Question: I am converting my blog to octopress/jekyll hosted on Heroku.
It all works well locally however when loaded up to Heroku I get capitalised URL's that seem to persist across updates and rebuilds of the remote repository.
The posts at locations like mydomain/category/postname contain html redirection files to help with the change in url structure between the previous wordpress domain/category/postname to the default octopress style domain/yyyy/mm/dd/postname. These are created using the Alias Generator plugin from tsmango
If I type http://www.williampickup.org/Ceramics/john-dermer into a browser the redirect works, while the lowercase version doesn't. The uppper case directory names for categories were an artefact of the original script I used to create the Alias yaml entries in my blog posts. I have fixed that locally however I can't seem to upload the correct lowercase directory structure to Heroku.
Answer: Eventually I noticed that the directory names were being capitalised when I committed the changes to my git repository.
The solution turned out to be to change the git config setting so that ignorecase = true.


Simple algorithm tutorials?

Question: I want to learn algorithms using some very basic simple tutorials. Are there any out there? I have heard of recursion and stuff and I would like to get good at it. Any help would be appreciated.
Answer: I would start out by taking a look at EternallyConfuzzled which contains great tutorials for basic Data Structures an Algorithms including linked lists and binary search trees, sorting and searching algorithms.  If you want to learn more after this I would recommend the following books in order of increasing complexity, completeness, and required math knowledge:

Algorithms in C (also available in C++ and Java)
Introduction to Algorithms
The Art of Computer Programming
Comment: ...where "The Art of Computer Programming" also clearly does not qualify as "some very basic simple tutorial", by any definition of any of the terms used.
Answer: If you want to learn algorithms this book is the best choice.

(source: mcgraw-hill.com)
Comment: -1, I don't think this is a tutorial at all. Excellent book, yes. Tutorial, no.
Comment: +1 because it is an excellent book on algorithms, but it is not a "very basic simple tutorial", as Anon puts it. The first 6 chapters are about mathematics!
Comment: That book is very formal, but not especially user-friendly.
Comment: Any book with an "Introduction to " title is a lie. And this is more of a mathy book.
Comment: Third edition is now available
Answer: MIT's OCW has video lectures of their Algorithm course.  The professor is one of the authors of the book Introduction to Algorithms, which another poster suggested.
It assumes a basic knowledge of Discrete Maths.
Comment: The lectures are excellent (especially those by Erik Demaine), but I'd hardly call it a "very basic simple tutorial".
Answer: TopCoder has some good algorithm tutorials.
Answer: If you're interested in a tutorial, avoid the CLRS book recommend above. It takes a rigorous theoretical approach to the study of Algorithms, which is very different from a tutorial approach.
You learn Algorithms by doing them. So find a resource that provides Algorithms problems and guidance in solving them. If you want a textbook, check out the Algorithm Design Manual, which also has an online Algorithm Repository.
If you prefer an online course, Udacity offers a python-based Algorithms course, while Coursera offers general and Java-based ones.
Since the important part is practicing Algorithms, you can skip the video courses and just solve challenges. Other answers suggested sites with challenges you can practice once you're good at Algorithms. In the beginning you'll want more guidance, so find a resource that provides Algorithms challenges and help with solving them. I created Learneroo for this purpose. You can start by learning the fundamentals of Recursion with the Recursion Tutorial.

Answer: Recursion really isn't an algorithm. Since you don't have anything specific you're interested in I'd suggest you read wikipedia's List of alorithms or as others have suggested grab a book.
Answer: I would start at the Stony Brook Algorithm Repository.  The site has some really good explanations of different types of algorithms, and it references what books and other resources it uses so you can get a taste of what's available.
Answer: I suggest that you start from sorting algorithms. Read the related wikipedia page, skip the O(n log n) stuff, and focus on the implementations of, say, insertion sort, merge sort, and quick sort. Familiarize with binary searching. Also, learn about some basic  data structures, such as vectors, linked lists, stacks, their implementation, and what they are useful for. (More often than not, an algorithm to solve a problem goes together with a suitable data structure.) Once you are confident with different algorithms and data structures, you can dive in a more complete treatise such as the book by Cormen et al.
As for recursion, it is not an algorithm in itself. It is instead a technique that some algorithms employ to solve a problem, when the latter can be naturally split into subproblems. The technique of splitting a problem, solving the subproblems separately and then merging their solutions to obtain a solution for the original problem, is called "divide et impera", or "divide and conquer". (Recursion is also the related feature of most programming languages, where it basically means "functions that call themselves".)
The most cited, the most trivial, and the most useless example of a "recursive algorithm", is the one to compute factorials. Don't mind it. Instead, read about the Tower of Hanoi problem, which admits a simple and elegant recursive solution, and again, study some sorting algorithms, for many of them are indeed recursive.
Comment: Did I mention "stay tuned on stackoverflow"? :D
Answer: To the various people who have commented that book xyz is not simple, I'd point out that algorithmics is not a simple topic.  You need at least university entry level mathematics to understand the concepts plus the ability to reason about computation at a suitably abstract level.  If you ever find an "Algorithmics for Dummies" book, don't waste your money!
Answer: my choice http://aduni.org/courses/algorithms/
Answer: Going through solutions in topcoder problems is a very good way to pick up algorithms. Reading theory alone won't help
Answer: Khan academy started an excellent interactive self paced course on algorithms - https://www.khanacademy.org/computing/computer-science/algorithms.
Answer: Recursion is a language feature, and less an "algorithm" per se.  All recursion can be replaced with proper data structures (like a stack).
I'd recommend grabbing a book.  The problem with algorithms is that it's a relatively progressive topic.  You first need to learn simple searches before you can learn sorting, and you need sorting before you can do minimum spanning trees etc.  A book will properly order these, and if the text doesn't give you enough information the internet is a great next step.  Try Amazon and look at the comments for someone who is new.
Make sure you learn an implementation language before you try to go at this though, until you understand how the language works it's going to be very hard to pick out bugs in your logic vs a misunderstanding of what's happening for a given sequence of commands.
Answer: USA Computing Olympiad has a nice algorithms training site that so far anyone can sign up for and it's almost in a class like format. read a little, do an exercise, read more, do an exercise etc.
Answer: One of my favorite list of algorithm problems is Project Euler, they are pretty diverse and you can solve the same problem many times for optimizations, and you will find lots of communities (C++, C#, Python, ... etc) posting their benchmarks for every problem
It is so much fun, geek fun
Answer: Solve questions on various sites as SPOJ etc . and read books on Introduction to Algorithms, there are some online courses as well on coursera .

Simple algorithm tutorials?


is RDP7.0 authentication process secure enough?

Question: Latest version RDP used NLA, CredSSP and TLS to secure the authentication process. It sound like secure but in reality does it really secure enough. I knew that the previous version RDP is vulnerability to man-in-middle attacks, does this attack being eliminated?
Comment: Secure enough for what? All security risk is relative to the attack profiles applicable to your environment.
Comment: I just want to know any potential attacks exist?
Comment: Potential attacks always exist - if you are just asking "has the MITM attack been removed" the answer is best obtained from CVEdetails.com. If you have a specific risk profile, we could answer whether or not RDP 7.0 is secure for that profile...
Comment: What are those potential attacks?
Answer: Recent versions of RDP support SSL/TLS. RDP itself has its own format for transferring data packets; within these packets, recent enough clients and servers can transport the TLS records which will encode a tunnel into which the actual data will be sent (including authentication). This is reasonably secure, insofar as the client and server do not botch the implementation or misuse the certificates (see this answer for some discussion on the subject).
Also, TLS usage is optional and subject to negotiation between client and server; conceivably, an attacker trying a man-in-the-middle attack could alter the first packets so as to simulate a lack of TLS support on both sides, leading to a connection without TLS. It is up to the client implementation to detect this occurrence and abort the connection (or raise a warning and let the user abort).
TLS support was added in RDP 5.2. Free opensource implementations of the RDP protocol usually do not support it.
Another way to TLS-protect a RDP session is the Remote Desktop Gateway (formerly known as Terminal Services Gateway) which encapsulates the whole thing into an SSL/TLS tunnel. This is cumulative with other features of RDP, so you can end up with TLS-in-RDP-in-TLS. The gateway is a specific service available from Windows Server 2008, and only Microsoft's client appears to support it (according to Wikipedia, not even the MacOS port of Microsoft's client can use it).
Answer: With the latest version it is possible to integrate ssl/tls security and two factor authentication mechanisms. If the connection is used to connect to a remote desktop services portal (i.e. RD gateway), network level authentication can be enforced. With a properly planned and implemented infrastructure with a public key infrastructure, it is possible to harden the security. NLA provides more support for hardening the security. It is also possible to use 3 factor authentication methods. As the rule of thumb, each mechanism depends on the current security profile and attack surface. It depends on capabilities, implementations and continuous enhancements. So by just using the latest version, you cannot still ensure the security if it is not up to its standards.
Note: There could still be other issues such as vulnerabilities with certificates and CRL method, pkey export etc(as those do exist).


Is there a minimum number of vertices that a graph must have to be of a given genus?

Question: It seems intuitive that the higher the genus of a graph the more vertices and edges it would have to have.  Is it known if the minimum number of vertices must be larger for graphs of higher genus?
Answer: Yes, this is inevitable simply because every graph on $n$ vertices has genus at most that of $K_n$ (take a drawing of $K_n$ on the appropriate surface and delete edges to get the graph you're interested in). So for every genus $g$, the minimum number of vertices needed for a graph of genus $g$ is the smallest $n$ such that $K_n$ has genus $g$, and this is obviously a strictly increasing function of $g$.
In fact $g(K_n)=\lceil\frac1{12}(n-3)(n-4)\rceil$, so by finding the smallest $n$ for which this formula gives $g$, you can work out the minimum number of vertices required.
Answer: There is at least an upper bound on the genus in terms of the number of vertices and edges in the graph. Let $\gamma(G)$ be the genus of a graph $G=(V,E)$ and $\beta(G)=|E|-|V|+1$ be its Betti number. Then the following holds:
$$\gamma(G)\leq\left\lceil\frac{\beta(G)}{2}\right\rceil$$
For a reference on how to prove this see for example this paper


Are there any alternatives/wrappers to Postfix that work out-of-the-box?

Question: I need to set up a mail server + web interface and absolutely dread the thought of manually installing Postfix. Are there any (preferably open source) solutions like atmail.com that are self-hosted and take care of the mail server part as well?
Comment: What kind of web interface, do you mean a webmail? Why would you install Postfix manually — just install the package from your distribution.
Comment: Configuring Postfix is really not that hard, and a webmail like Roundcube is very easy to set up as it's basically just an IMAP+SMTP client (it will still require an IMAP server like Dovecot in addition to Postfix, but you also need that if you want to use any client, not just a webmail).
Comment: Yes, webmail. Sorry.. 4/20 has taken its toll on my articulation capabilities.. I meant configuring Postfix manually which tends to be a very, very time consuming and frustrating activity. I'm looking for some type of "plug and play" solution like cPanel but for mail only.
Answer: Setting up a mail server once - and then never touch it again. Do you mean that? Please don't act like this! Administrating a mail server is more than setting it up, you should know the protocols, especially SMTP, you should know how how TLS works, how to prevent spammers and hackers from entering and abusing your system, how to detect attacks, how to detect possible problems, how anti-spam techniques work.
No software can do this for you. Know your system and care for it, like your garden.
There is some software that can make the entrance easier, but you can't bypass reading thousands of lines of documentation to really understand the software. I don't want to prevent you from setting up a mail server, no. The reverse is true. I'm of the opinion that we have a need way more self-hosted mail servers, a wider diversity in the infrastructure, which is very centralized currently.
I suggest to use software like postfixadmin, iRedMail, ISPconfig or Plesk (I don't want to recommend one) as starting point for you. For the webmailer I know two: Squirrelmail and Roundcube. Squirrelmail is smaller und modest while Roundcube is more powerful and equally easy to setup as squirrelmail. If you are looking for a groupware, take a look at Horde.
Answer: courier-imap worked for me on Debian 10 with these simple steps after apt install gamin courier-mta courier-imap as root:
Courier authenticates using PAM out of the box.
Maildir setup for future users:
sudo maildirmake /etc/skel/Maildir
sudo maildirmake /etc/skel/Maildir/.Drafts
sudo maildirmake /etc/skel/Maildir/.Sent
sudo maildirmake /etc/skel/Maildir/.Trash
sudo maildirmake /etc/skel/Maildir/.Templates

Then, for an existing user:
sudo cp -r /etc/skel/Maildir /home/myuser/
sudo chown -R myuser:usergroup /home/myuser/Maildir
sudo chmod -R 700 /home/myuser/Maildir

I only have to add allowed hosts for courier-mta now, to send email. This guide should help.


How to increase the space of a virtual machine?

Question: I have created a Windows Vista VMware from an ISO Image. While creating I selected 16 GB as hard disk space. But now it's saying space is not enough for installing a service pack on that. How to increase the space of virtual machine now without recreating it?
Comment: Which of VMWare's products are you talking about here?
Answer: This won't work if have or care about snapshots from the VM.
You can use vmware-vdiskmanager to expand the image size.  You'll need to shutdown the virtual machine first.
Once you have the image resized, you can use your OS disk partition tool of choice to extend the partition on the disk to the new size.  If the disk you want to resize is the system partition in Windows, which it sounds like it is, you'll probably need to mount the disk in another virtual machine to resize the actual partition, or boot off of a rescue disk.
Although the link to the vdiskmanager is from vmware server 1, I believe the same app comes with VMWare Workstation.
Comment: vmware-vdiskmanager comes with the majority of VMWare's products. e.g. Workstation, Fusion, Server 1 & Server 2. However be aware that there is currently a bug in many newer versions of this tool that stop you from resizing a vmdk with snapshots. This bug has been fixed in the latest VMWare Fusion release, but as far as I am aware it is still present in the current VMWare Server 2.0 release.
Answer: You can run something like
<code>vmware-vdiskmanager.exe -x 25GB theDisk.vmdk
</code>
to expand the virtual disk.
Answer: I always setup Linux VMs using LVM, then I can expand things relatively easily just be creating a new virtual disk, adding it to the volume group, extending the relevant logical volume to make use of the new space and then expand the filesystem with resize2fs.
You could probably do the same thing in Windows by having your virtual disks configured as dynamic disks instead of static.
Answer: This should do the trick:
http://www.geekzilla.co.uk/View18A035DE-06FF-4EA6-BC77-57D431CD50DD.htm
Answer: I faced this problem recently, and found that vmware-vdiskmanager is not included with the vmware player. However, you can download the free VMWare Converter (after registration, which is free) which allows you to expand your disk.


Is there confirmation blocks in Proof-of-Stake Blockchain?

Question: When I'm reading literature about proof-of-stake blockchain, I found that it seems there is no concept about confirmation blocks (which is used to confirm a posted transaction is indeed honestly generated and in bitcoin we need 6 confirmation blocks that is enough). However, my question is that why we don't need confirmation blocks in Proof-of-Stake blockchain like Proof-of-Work blockchain?
Answer: For a proof-of-work blockchain, say Bitcoin, the confirmation length is 6, just to make sure any adversary doesn't create any additional blocks and make a new fork that's longer. That's possible because all you need is more computation, and no proof of identity.
However, in proof-of-stake blockchain protocols, you often need to provide a new block with some kind of proof that you are eligible to propose the new block. This instantly creates a confirmed block because for a particular slot, another party cannot create a valid block and proof later in time.
Take a look at the Algorand protocol for more details.
Answer: In the bitcoin case, you need to wait for confirmation of 6 blocks because many miners are involved, some of which might be attackers. But in the case of proof of stack there is no competition and only one who is eligible to add a block, and no attackers.


Is a question about configuring R to use a proxy server off-topic?

Question: I'm trying to figure out how to configure R's proxy settings so I can download and install some packages. I know that stuff specific to R has been in the gray area for on-topic-ness in the past (and maybe it still is), so I want to know if this kind of question is on-topic enough for Cross Validated, or if I should instead take my chances asking it on Super User. Thanks!
Answer: Disclaimer: I'm one of those people who thinks that all R-focused questions should go to StackOverflow.  That is not the policy we decided on.
I think this would be most appropriate at StackOverflow.  It's not purely a programming question, but I can't imagine a question about CPAN (for example) getting turned away there.  There's tons of overlap between the StackOverflow R community and CV's, but I think the former is much more focused on R as software.
Better to ask it here than at SuperUser, though.  SO > CV > SU.
Comment: It's a balancing act between topicfulness and quality of responses.  It may indeed be most "on-topic" on SU, but who there is going to know anything about R?  Conversely, I think you'd get equally good responses here or on SO (likely from the same people), but I think this question is far more on-topic there than here.  In absolute terms, I think it is also sufficiently on-topic for SO.  Speaking as someone who's been watching the R tag since its inception, nobody's going to bat an eye over your question.
Comment: @Matt-parker I remember the many discussions we've had on CV about R questions ;) But I think that CV currently has the right balance of how it deals with R question. I agree that this question would be better in SO.
Comment: Until I read your answer, I would've guessed that if R had any following on Stack Overflow, it was a very small one. Thanks for sharing that helpful knowledge!
Comment: Speaking of Stack Overflow, I find your opinion—that my question would be most appropriate on SO—interesting. Considering my question is more about R as *software* than as a *programming language*, I'd think that it would belong more on Super User than Stack Overflow. So are you saying that, although it's not really on-topic at SO, its R community would ignore the off-topic-ness? Or are you saying that, of SO, CV, and SU, the question would be *most* on-topic at SO?
Comment: Okay, I've asked on Stack Overflow [(link)](http://stackoverflow.com/q/4832560/594302). Thanks!


HP Pavilion does not boot

Question: I just reset my new AMD HP Pavilion on windows 10 and it shows a message "Automatic Repair couldn't repair your PC"
The really strange thing is I want to install windows 7 pro which I have a copy of. I then take out the hard drive and format it fully with cmd on another W7 laptop. When I then installed the formatted drive back into the Hp and switched on shows the Automatic Repair screen again even though the drive was fully formatted? I'm really lost on this one.
Comment: Did you remove the recovery partition?
Answer: You cannot format a hard disk - you format only partitions on a hard disk when using Windows.
The proper way to go is to clean the disk.
On command prompt from installation DVD/USB you execute:
diskpart.exe
then
select disk 0 (!!disk 0 is first disk, disk 1 is second disk ...!! You can use "list disk" to display disks and their sizes)
then
clean
This will wipe all partition/formatting information.
Now you can reboot and install Windows 7 to a "fresh" disk.

HP Pavilion does not boot


Is carrier charge density and carrier mobility constant in a given material?

Question: If we assume the semi-conductor is doped by a variable amount, is there some way I can look up carrier charge density for the material in a reference somewhere? What about carrier mobility?
Answer: You can look it up for Si or GaAs or other well characterized semiconductors. If you want to look at the relationship between doping level and charge density, you can use the equations
$$n_e = 2(2\hbar^{-2} \pi m_e^*kT)^{3/2} e^{\frac{E_F - E_C}{kT}}$$
$$n_v = 2(2 \hbar^{-2}\pi m_v^*kT)^{3/2} e^{\frac{E_v - E_F}{kT}}$$
Answer: No, the carrier charge densities and mobilities are not constant with temperature. While the charge concentration increases with temperature, the mobility, in general, reduces with temperature due to scattering of the charge carriers due to phonons and ionized impurities. This is because scattering increases with temperature.


Why is property setter is defaulted to public

Question: Why is the default access modifier of getters and setters is public and not private?
Comment: @MatthewRz but  properties, like any other class member are defaulted to private.
Comment: Because properties **are** public and therefore it assumes you want the getters and setters to be public.
Comment: It would really help if you'd be *very clear* about what you'd propose as the alternative. Would you expect a property declared public to have private getters and setters by default? In what way would it be public at that point?
Comment: I don't propose anything as an alternative, I wanted to know what is the reason for 'Default public'. But now I know I was wrong and the default isn't public at all.
Answer: The get and set portions of a property are not defaulted to public, they are defaulted to whichever is the visibility of the property they belong to. The default visibility of the property iself is private, as for all other kinds of members.
Answer: Because it's how C# was designed.

Defined fields
Define property to access that field

So expected default behaviour that you make field private and make property in a way to be able to write and read to the field from the caller (arbitrary, not only derived one), so the property and get/set methods (if not there is no any sense making property public) becomes public.
This is just expected default behaviour, and nothing else.
Answer: I think it is because the property has own access modifier and in fact describes a set of two methods: SomeType getProp() and void setProp(SomeType). These methods are seen like the property by default. But if you want to change their visibility you can do it using additional modifiers(for example Prop{get;private set;}).


Allocating more disk space to Ubuntu

Question: I used the windows installer to install Ubuntu 12.04 on my PC. By default it was installed with 17 gigs of space. I have filled up this space and want more. Is there any way to allocate more disk space to Ubuntu?
Comment: Did you set it up to dual-boot, or did you use WUBI?  The former has Ubuntu using a separate partition, while the latter has Ubuntu running within Windows, like an application.
Comment: The question seems to indicate he used WUBI.
Answer: Sure there is a way to allocate more disk space for Ubuntu. Place your Live Cd into your CD/DVD drive boot from it until you reach the desktop. Now load up Gparted. this is a partition manager. you will see your partitions on your HD. Ok now move your mouse over to the windows partition and resize it. No biggie eh? You now have more Linux room. Just one more thing I would ask are you using this extra room for data or a swap file? if so you might want to make this extra room as a data partition so that it can be accessed by both Windows and Linux that way neither OP system loses the HD space.... Hope this helps.
Answer: You can use a boo-table hard drive partitioning tool such as paragon , which allow you to resize your partition without data corruption.

Allocating more disk space to Ubuntu


What would be good IPA choices in the midwest area?

Question: I am trying to get into different IPA's and just wanting some suggestions. I have been drinking Surly's IPAs, but I want to branch out and try some others.
Comment: Pretty much any IPA from Revolution Brewing is great as is Three Floyds.
Comment: I have never even heard of them, I will check a few liquor stores to see if they have any in stock.
Comment: Revolution is from Chicago (https://revbrew.com/) and Three Floyds is from Munster, Indiana (https://www.3floyds.com/).
Comment: Three Floyds is available in IL, IN, KY, OH,WI, TN, and MN. https://www.3floyds.com/distribution/ has details on where to find it. Revolution has a beer finder page too: https://revbrew.com/beer/find.
Comment: @EricShain I checked out Revolution and they look like they have really good IPAs. I used their finder and there was sadly no results. I enjoy the Hazy IPAs.
Comment: If you get to Chicago, it's easy to find.
Answer: IPAs are actually a pretty broad range of beers themselves.  If you want to amp up the bitter side of things, look for west coast IPAs.  Some nationally available ones would be things from Stone, Sierra Nevada, or even Sam Adams Rebel IPA, among many many more.
East Coast/NE IPAs tend to not be as bitter, have more sweetness and highlight some more of what the hops and other ingredients bring.  Sam Adams has a NE IPA as well, though I mostly know more regional brewers for this stuff.
Of course, categories often fall apart when you try to map the real world into them, so there are a lot of IPAs that won't fit cleanly into either, and some of these are really well known.  Heady Topper helped really get the IPA scene roaring in NE, but wouldn't really fit a lot of people's expectations for a NE IPA now.  Nor would Lunch or Dinner, though all three are delicious.  They're just markedly different from, say, Congress Street from Trillium or Julius from Treehouse.
So, the real way to get into IPAs will be to look for local brewers who are making things and go try them.  There's a ton of variety within the style, so you'll just have to try things to find what you like.
The national brands can give you a sense of what to expect from the different variations, but that will just help you point in the right direction.
I don't know how widely distributed things in the midwest are, but Listerman's Brewering in Ohio makes some decent stuff, like Hank the Dumpster Kitty.  M-43 from Old Nation Brewing in Michigan is not too bad either.  I'm unfortunately not super familiar with that area though.
Comment: I have noticed I like more of a flavorful IPA over a hoppy/malt one. My town has three Brewers, but don't do IPA's. Thank you for the suggestions and the insight about the locations
Answer: In my opinion IPAs are best consumed fresh. This suggests looking for local breweries where you can get beers perhaps only a few weeks after bottling or canning. Beer Advocate is a decent source of beer reviews. You don't mention where you live, but since you can get Surly, here is the rankings for Minnesota beers.
Comment: Yeah I live in Minnesota I should have said that. Thank you for posting the rankings of Minnesota beers. I have had it fresh and I do agree it's so much better.


Matter to energy conversion

Question: Okay so I have a question, during a nuclear explosion or particle/antiparticle annihilation,  matter is converted into energy. How do I determine if a from a explosion will come lets say a small amount of high energy photons like gamma rays or a large number of low energy photons like visible light? So basically, how do I know what type of energy is the matter gonna be converted to, whether gamma rays or visible light or both?
Comment: *"matter is converted into energy"* Beware of this misleading statement; it is bound to create confusion as it seems to imply new energy got created from matter and total energy of the system increased.  Better to say that energy changed form from the rest energy of matter to EM energy of radiation.
Answer: This is a special example of "what will happen" under given circumstances. Almost all of physics – and natural science – is about answering such questions. But they're really very many very different questions and one must be a little bit more specific about what the question is. Your general question "what forms of energy will result" is so general that it basically covers all of physics, too. At least, you must define the initial state accurately enough.
The annihilation of matter with antimatter usually produces particles of rather fixed energies whose $E$ is comparable to $mc^2$ of the annihilated particle. In particular, one electron and one positron (its antiparticle) is "very likely" to annihilate into a pair of photons. Each of the photons has the energy of 511 keV. The probability (cross section) of such annihilation may be calculated from the theory known as "quantum electrodynamics" (or more extensive theories containing QED as a limit and/or subset). The total energy carried by such photons – gamma radiation – may be measured by "calorimeters" and their individual energies by the gamma ray spectrometer, for example.
There is basically 1 good theory to predict the "most important facts" about this process of annihilation – and many apparatuses to verify that the theory works.
The annihilation of a proton and an antiproton is more messy. There are different possibilities what can arise from that and those possibilities are "comparably likely". The simplest theory to calculate the probabilities of outcomes is "quantum chromodynamics" (QCD). The photons coming from such annihilation are below 1 GeV, even more energetic gamma rays than before.
The nuclear explosion is an even dirtier process. Heavier nuclei split into pieces – which may be done in many ways – and they produce alpha, beta, and gamma radiations. The energy from the explosion is also intensely absorbed by the surrounding air and other materials so they start to burn, increase their pressure, and create very strong light and electromagnetic radiation at pretty much all frequencies including the visible spectrum. And lots of sound waves, too.
To describe or predict what sort of energy a nuclear energy releases is an interdisciplinary problem between nuclear physics, aerodynamics, thermodynamics, and engineering which has many aspects. There is no 3-sentence answer that exactly derives what sort of energy produced from a nuclear bomb is predicted and at what amounts. To verify such predictions requires a combination of engineers, commanders, soldiers, and some people who don't care about their health too much, too.
In general, therefore, clean processes involving truly elementary particles usually produce photons at specified energy which is mostly calculable, like the gamma rays in these cases. However, collisions or fission of more complicated objects like antiprotons or even nuclear bombs produce a much more diverse collection of photons at assorted wavelengths.
Answer: Lubos's answer covers very well and in a general way the different possibilities for reactants and products in the reactions of subatomic particles and nucleons.
The basic equation is
Energy of photons = energy of reactants - energy of products.
Due to the enormous energies involved it is actually unlikely that visible light will be released, most reactions will emit in the gamma range.
Here's some examples:
electron + positron --> total annhilation : 511keV (from Lubos answer)
235U --> fission to daughter nuclei: typical 202.5MeV of which 7MeV gamma, the rest kinetic energy of products. https://en.wikipedia.org/wiki/Nuclear_fission
60Co --> 60Ni: Beta decay leads to an excited form of 60Ni, which then emits two different gamma rays of approx 1Mev each: https://en.wikipedia.org/wiki/Gamma_ray
Info on the energy of fusion reactions is at https://en.wikipedia.org/wiki/Nuclear_fusion
For more http://atom.kaeri.re.kr/gamrays.html will give you a chart of what reaction corresponds to what energy, so that if you observe a gamma ray of a particular energy you can find out what reaction it came from. The lowest energy on the list is 6KeV.
In contrast, a green LED emits visible photons of about 2eV!
When you see a nuclear explosion or a star, you are not observing the gamma rays but rather the thermal radiation. Most of the radiation is thermal, in the form of lower energy infra red / visible / ultraviolet photons.
Fusion occurs deep in the sun's core, and the volumetric energy release is less than that of the human body (see reference on nuclear fusion.) Most of the gamma rays produced will be absorbed on their journey to the surface of the star, thus serving to heat the mass f the star, which then radiates thermally. Hydrogen bombs actually burn deuterium, which reacts rather quicker. Although some gamma rays can penetrate several inches of lead, it must be remembered that several miles of atmosphere has much the same stopping power.
So, given that large sources of gamma rays will fry you from a distance with their thermal output, if you want to observe gamma rays, you are better off with a small source that you can approach easily, such as a small lump of radioactive metal.

Matter to energy conversion


I know my address but can't remember which site it's from

Question: I signed up for a bunch of different wallets because I didn't know which one was the best. I have 2.5 bit coins in a wallet that I don't know how to get. I know my wallet address, but can't remember which site it's from. Can someone help me, please?
Answer: It isn't trivial to de-anonymize a bitcoin address. Your best hope is that the address has inputs or outputs to other addresses that have been deanonymized somehow (search online for those addresses). This is unlikely though. You would be better just checking all the wallet sites with your login(s). As @nate-eldredge mentions this carry's the risk that you might reveal your login/pass combinations at some exchanges that are not trustworthy.
One tool that seems to have some information about addresses is OXT. For example it determind this address to be associated with btc-e exchange
Comment: "Check all wallet sites with your login" has risks - if one of them is dishonest, and is able to guess what the correct site is before you do, they could use your login and steal all your coins.
Comment: Do you have ownership of the private keys ?


Electric shock & safety

Question: An electric circuit is considered a closed circuit if there are two wires connecting to a load, namely live wire and neutral wire. Therefore someone would get electrocuted by touching live wire or neutral wire. However some technicians said that it's safe to touch neutral wire because it contains no electricity, is it true?
Comment: Electricity is a **phenomenon**. A wire cannot contain it (or not contain it for that matter).
Comment: This is only an important distinction if you know with 100% certainty that someone didn't mistakenly swap the connections on the other side of the cable. Always assume that both live and neutral can be hot, unless you've measured everything.
Comment: @DG ,  Then you should not be using wires at your place.  Try that, see how it works.
Answer: Neutral wire is generally at a voltage round about earth potential so touching the neutral wire only causes a minute current to flow through your body hence you barely have any sensation of shock at all.
The current flow through both wires is the same but that current does not flow through you when you touch a wire unless you represent a significantly lower impedance than the load.
Answer: Earth and neutral are connected somewhere, depending on your local infrastructure. So touching a live wire and earth closes the circuit and current can flow through you. Touching neutral and earth does nothing, because it's the same potential anyway (aside from minor side effects)
So touching neutral is save under normal cirumstances. You should not rely on circumstances being normal.
Some possible faults are:

A cable break on neutral after your touching point. The neutral line is now connected to live via any load.
Someone swapped live and neutral and the colours now don't mean what you think they do.
There is a very high return current lifting the potential of the neutral line

Electric shock & safety


"Will Have Done" tense- meaning and examples

Question: Looking for sufficient definitions and explanations of this tense, I noticed that one meaning will usually refer to something someone "will have done" as something that "will have been done\completed". While I do realize this is one independent reason to use this tense, I don't quite get a lot by a definition of a tense which uses the tense it attempts to define. It would really help me if someone could clarify the subject, including regarding similar forms, such as: Will Have: gone, finished, completed, ended...All(Or most V3 verbs).
Comment: https://www.ego4u.com/en/cram-up/grammar/future-2-simple - google is your friend.
Comment: You should take care with the phrase "will have done."  The British use it in a way that Americans don't.  For example: Q: Have you gone to buy nappies yet?  A: No, but I will have done by the time Mary gets here with the baby.  In American English, one would only say, "No, but I will have by the time Mary gets here with the baby."  The British tend to say "will have done," where others would simply say "will have" or where "done" stands for some other verb, like in the example "done" stands in for "gone."
Comment: Thank you for the reference. I did visit that link previously, but I still wasn't fully convinced. Is it to formally ensure something will occur?
Comment: Do you mean that it is similar to saying "I do\did" referring to a certain verb already mention? I don't really understand why it shouldn't be used by American English speaker, but I did observe nuances and actual differences between the tongues, that included. Thank you for exposing me to that fact.
Answer: This tense is called Future II simple

Usage

action that will have been finished by a future time

Example: Don't worry, he will have repaired the bike by then.

supposition about what happened

Example: He will probably have noticed that his bike is broken.

Source1
Source2
Comment: The first source was really helpful, as well as the above categories.
Answer: Will have done has two meanings:

used for saying that you expect an action to be completed before a time in the future.
We will have gone
to bed by the time you
 arrive.
supposition about what happened
Example: He will probably have noticed that his bike is broken.
It is called wine,' said O'Brien with a faint smile. 'You will have read about it in books, no doubt.(1984).


Find data shapes by clustering

Question: I am trying to use clustering on my data but I do not have found the results I hoped for.
I have a massive dataset with fire incidents. I would like to find clusters in these data. I want to use 4 categories to cluster the incidents. I would like to use the incident type, the response type, cause and the type of property.
The result I am looking for is that the algorithm gives me clusters about types. Cluster 1: incidenttype A or incidenttype H, Responsetype X or Responsetype K , cause D and property R and so on. At this moment I tried to find this with K-means. But in the end I get clusters containing al most all categories of all four. Not nicely separated clusters. The first thought I have, is to check whether I use the best fitting algorithm?
Comment: It sounds like you don't want cluster analysis at all. If you know how you want things to come out, then you probably want some form of supervised learning
Comment: How do you vectorize your dataset? Anyway Karan's is not performing very well if you have much noise or if your clusters are  close to each other. I would use something like DBSCAN instead. It finds centers of high density and expand from then. I think it would work better for what you want
Answer: I played around with different methods, and decided to go for K-means. Played around with the settings and I get what I was hoping for. I filtered out the characteristics which do not happen very often (only a few times) and this how the incdent types in the data getting some more structural shapes.
It gave me pretty good results. I think I can get better results by finding the right amount of K clusters.

Find data shapes by clustering


Seting up a new ssh user on a centos box

Question: I'm new to setting up users on SSH. I have a centos bos, but not sure how to setup new users so that they are able to connect via ssh
Answer: In a default configuration, with ssh enabled, all normal users are allowed to connect via ssh.
To create normal users you can use either the system-config-users tool, or the useradd command.
To check if sshd is running type
chkconfig --list sshd

And look for output similar to
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

Moreover, the firewall must also allow ssh.  Default behavior during install is to have ssh enabled, with the firewall allowing access.  You can configure the firewall by using the system-config-securitylevel-tui utility and selecting 'Customize'.  Or you can check the firewall configuration directly by issuing
iptables -L

Comment: Don't forget to the firewall (defaults to allowing port 22 on CentOS)
Answer: The manpage for useradd (and optionally adduser) commands should help you with setting up users on the box.
Answer: just set up a new user they can automatically connect with ssh


How to group bookmarks in Emacs?

Question: I would like to group my bookmarks like buffers with ibuffer or newsgroups with gnus by certain criterias like projects for example. I also tried Bookmark+ but couldn't get anything like this working.
Does anyone know a way to achive this?
Answer: Bookmark+ provides several different ways of grouping, organizing, and even combining bookmarks.  ("Grouping" can mean several different things.)
Take a look at these possibilities:

Using multiple bookmark lists (i.e., bookmark-list views);
Using multiple bookmark files;
Bookmarking a bookmark list itself or a bookmark file itself or a Dired buffer with its markings etc.;
Tagging bookmarks

What problems did you run into trying to use it to group bookmarks?  What did you try, for instance?
Comment: You mention multiple bookmark **files**. That is one way. I mentioned multiple bookmark **lists**, which is not the same thing.  Both are possible and provide different benefits. I also mentioned Bookmark+ **tags**, which provide yet another way to group bookmarks.  All of these ways can be combined.
Comment: @BradyTrainor 1. By bookmark lists I mean bookmark display lists, i.e., different states of buffer `*Bookmark List*`.  You can make a bookmark of each such state. Such a stated records a given set of bookmarks, but also their markings, omissions, etc. 2. Tags alone give you easy set intersections. And you can in effect save different tag combinations using bookmark-list bookmarks.
Comment: In my first pass with `bookmarks`, I used multiple bookmark files. But to keep it simpler (too much "out of sight, out of mind"), I'm going to try to lean towards the `tags` approach this time. I do wish Emacs' grouping of `bookmarks` was a bit more visually transparent, as the OP is looking for.
Comment: Ah, good point (altogether your post). Thank you for clarifying, so with tags and lists, we could possibly have intersecting groups... I will have to try the lists soon. Bookmarking the list -as you point out- would make it more GUI like. The `bookmark+` documentation is a dense read!
Comment: OK, should be fixed now (took me a moment to understand what links and what numbers you were talking about).

How to group bookmarks in Emacs?


Is it a good idea to constantly train my flexibility throughout the day?

Question: I'm off work because of an accident. I'm in recovery at home and have plenty of spare time. Is it good if I constantly improve my flexibility with different exercises in different times throughout the day or should I do it once a day? I wanna practice ballet and I really want to take advantage of my time. I would do exercises that don't interfere with my recovery though.
Answer: No, it's not the best idea to train flexibility continuously throughout the day.
Stretching, done properly, can be as much stress on your muscles and tendons as a cardio or light weightlifting workout. As such, you need to treat it as you would any other workout, i.e. make sure you have proper form, allow enough time for rest and recovery between sessions, proper nutrition and hydration.
As you mention you have aspirations for ballet, that is a sport that requires extreme ranges of flexibility. Due to that, I would suggest that you schedule at least a few sessions with a good ballet instructor/trainer, and get a list of recommended stretches. This will do you a lot more good than just random stretching.
Also, since you say you are recovering from injury, make sure that your PT or whoever is monitoring your recovery knows about your stretching and approves.


Do I need to RUNSTATS after a REORG in DB2?

Question: The REORG documentation says:

BUILD
Builds indexes. Updates index statistics.

But I have always heard REORG/RUNSTATS as if they should be paired.  Can anyone verify that "Updates index statistics" achieves the same thing as RUNSTATS?
Answer: REORG is used to help DB2 point to accurate data (ie, indexes should become aware of fresh data and no longer include deleted data), as well as "collapse" empty page space created by deletion of data and/or indexes. It can also help move data that is related closer to each other for more efficient access (especially true in the case of a cluster index).
RUNSTATS is used to help gather updated statistics on the volume and/or distribution of data within tables and indexes. This information is stored in the system tables and is used by many things including the optimizer to determine the optimal path to query the data. This is especially true as data grows. The data may distribute in a way that causes the optimizer to now include an index that it didn't before in its access path (or perhaps vice versa and choose not to use an index). RUNSTATS can also affect how a REORG runs - at least in older versions of DB2.
Based on what I have read from DB2 DBA's you generally want to run

RUNSTATS
REORG
RUNSTATS

The first RUNSTATS helps the REORG to work appropriately and efficiently. The RUNSTATS after is more to make sure that stats are now accurate given all the data movement around on pages. Depending on where you read you may see DBA's mention the last RUNSTATS is no longer needed with newer versions of DB2. Since we haven't seen definitive answers on that and since most DB2 DBA's I've heard of follow the above order, our company has chosen to use that order (for the record we are on DB2 LUW 9.7 FP4 and we plan on migrating to V 10.1 sometime next year).
Also, just for the sake of completeness, generally when you update the statistics and you affect the optimizer you want all applications that call into DB2 to make sure they are taking advantage of those new optimizations. So a REBIND of packages will make sure that static packages know of the updated statistics and optimized query paths, and a FLUSH PACKAGE CACHE DYNAMIC cleans out dynamic queries from things like Hibernate, so that way the queries will be rebound with the updated query paths. (NOTE: on z/OS I see you have BIND and REBIND options. Perhaps the FLUSH PACKAGE CACHE DYNAMIC is under those or has a different name on z.)
So ultimately I would do the following:

RUNSTATS
REORG
RUNSTATS
REBIND packages
FLUSH PACKAGE CACHE DYNAMIC (on LUW) or whatever the equivalent is on z/OS.
Comment: You mentioned, you planned on migrating...  Did you?  And do you still use this pattern?
Comment: @Lucas - we started to, then stopped. Management decisions. I'm not sure where they were at, as I ended up switching to work for a different company.
Comment: `REORG` does _not_ use table statistics for anything, so executing `RUNSTATS` before table or index reorganization is useless.
Answer: If you were running DB2 on IBM i,  then all of that would be handled for you.  Indexes are maintained in real time.  Statistics are updated automatically.  Plans are optimized dynamically.
Comment: Good information, and glad you posted, but sadly, no.  I am running this on a Windows 2003 Dell, and soon to be migrated to a custom built CentOS server.


manga where female lead died in her world and got reincarnated into a girl who got poisoned by her stepmother and stepsister

Question: Manga where female lead died in her world and reincarnated in the body of a girl who got poisoned by her stepmother and stepsister and because of the poison her body has bad odor but female lead cured her poison.
Comment: Hi, welcome to SF&F.  Where and when did you read this?  Do you remember any details of the appearance of any characters, or the setting?
Comment: What colour was the female lead's hair?
Comment: I just remember that female lead died in her world and was reincarnated into the body of a girl whose stepmother and stepsister poisoned her, and as a result, her body has a bad odour. She was also engaged to the emperor's son, but her fiance didn't like her because of her body odour, and he was also having an affair with her stepsister
Answer: This is the manhua  The Consort Who's a Bloodthirsty Doctor, also known as Princess is a Bloodthirsty Surgeon, by Bi Ciyuan Comics.
Summary from Bilibili Comics:

The Consort Who's a Bloodthirsty Doctor: In her past life, before a
plane crash, she was a genius in both medicine and poison. In this
life, she is the legitimate daughter of a noble family whose fiancé
has been snatched by her illegitimate sister. Right after entering her
new life, she finds herself already infected with a serious case of
body odor. The younger sisters of the original host's body scorn her,
and she has found out that the original host died because she hit her
head against the railing when her fiancé slapped her. Now that she has
replaced the previous host, she will not allow these despicable
villains to continue opressing her. Why does the Cold-faced Prince,
known as the War King of Hell, seem so different from the rumors?
Regardless, whoever that insults her, frames her, or tries to
assassinate her must die!

Official English translations are available.
Found by searching "reincarnation manga poison body odor"
on Google.


Font risk in unopened email in inbox

Question: This is obviously not from PayPal, but the font in the word account displayed using odd looking font, is this a security risk to me that Outlook.com displayed this font? See below, Outlook has preview text enabled as default
Answer: Nope, that's not actually a different font, it's Unicode. There's no exploit at work here.
Specifically, it's either another language's character set or, more likely, mathematical alphanumeric symbols like these, which are all rendered from the same font:

For other examples of abuse regarding mathematical alphanumerics, search twitter for fakeunicode mathematical or just follow @FakeUnicode, an account dedicated to the oddities of unicode and unicode abuse.
This is a technique used to evade spam detection.
Here's what a computer sees given  rather than Account:
<code>$ echo "Here's what a computer sees given  rather than Account" |hd
00000000  48 65 72 65 27 73 20 77  68 61 74 20 61 20 63 6f  |Here's what a co|
00000010  6d 70 75 74 65 72 20 73  65 65 73 20 67 69 76 65  |mputer sees give|
00000020  6e 20 f0 9d 99 b0 f0 9d  9a 8c f0 9d 9a 8c f0 9d  |n ..............|
00000030  9a 98 f0 9d 9a 9e f0 9d  9a 97 f0 9d 9a 9d 20 72  |.............. r|
00000040  61 74 68 65 72 20 74 68  61 6e 20 41 63 63 6f 75  |ather than Accou|
00000050  6e 74 0a                                          |nt.|
</code>
This hex dump shows that  is not ASCII.  is represented by three bytes, 0xf0 0x9d 0x99, which is U+1D670. Contrast with A, which a single byte, 0x41.
Most anti-spam systems parse text using patterns and/or models of word frequencies. By altering the text, your spammer has altered how the anti-spam systems see the message. This message's subject does not technically use the word "account", so a rule seeking that pattern or a model using that word won't recognize it.
Smarter anti-spam systems will account for this in some way by massaging the text into ASCII and/or by specifically hunting this sort of obfuscation technique. Word frequency models can learn about "words" like this as well.
Comment: Not everybody corresponds in ASCII. Unicode is needed for nearly every other language. Why shouldn't Outlook's preview be able to say "Привет" or "שָׁלוֹם" or "Olá" ("Hello")? Where's the security risk? I do not know of any vulnerability that involves rendering Unicode. The only risk is that of [tofu](https://english.stackexchange.com/q/62524/112762 "Unicode replacement glyphs look like square blocks of tofu").
Comment: That is a great explanation, I wonder why Outlook actually allows unicode to show up in the text prevew parts of the email, it feels like a security risk in the way some people could be tricked into opening an email with drive by malware from dodgy tracking pixels.

Font risk in unopened email in inbox


How to find all rational points on the elliptic curves like $y^2=x^3-2$

Question: Reading the book by Diophantus, one may be led to consider the curves like:
$y^2=x^3+1$, $y^2=x^3-1$, $y^2=x^3-2$,
the first two of which are easy (after calculating some eight curves to be solved under some certain conditions, one can directly derive the ranks) to be solved, while the last , although simple enough to be solved by some elementary consideration of factorization of algebraic integers, is at present beyond my ability, as my knowledge about the topic is so far limited to some reading of the book Rational Points On Elliptic Curves, by Silverman and Tate, where he did not investigate the case where the polynomial has no visible rational points.
By the theorem of Mordell, one can determine its structure of rational points, if the rank is at hand. So, according to my imagination, if some hints about how to compute ranks of elliptic curves of this kind were offered, it would certainly be appreciated.
Thanks in advance.
Comment: There is are two pretty visible rational points on $y^2 = x^3 - 2$, namely $(x,y) = (3,\pm 5)$. It is a theorem of Fermat that these are the only integral points. The double of this point is (129/100,-383/1000), so by Nagell-Lutz the point (3,5) has infinite order. That the group of rational points has rank 1, and is generated by $(3,5)$, is a much deeper result.
Comment: @KCd: I mean that the polynomial on the right-hand side has no rational roots. And indeed, on this curve I as yet can do nothing to tell the rational points, except the *visible* ones. If the result be deep, where could it possibly be found? Thank very much.
Answer: Given your interest in Mordell's equation, you really ought to buy or borrow Diophantine Equations by Mordell, then the second edition of A Course in Number Theory by H. E. Rose, see AMAZON
Rose discusses the equation starting on page 286, then gives a table of $k$ with
$ -50 \leq k \leq 50$ for which there are integral solutions, a second table for which there are rational solutions. The tables are copied from J. W. S. Cassels, The rational solutions of the diophantine equation $y^2 = x^3 - D.$ Acta Arithmetica, volume 82 (1950) pages 243-273.
Other than that, you are going to need to study Silverman and Tate far more carefully than you have done so far. From what I can see, all necessary machinery is present. Still, check the four pages in the Bibliography, maybe you will prefer something else.
Comment: Here I genuinely thank you for those books recommended. Indeed, I am trying to study the book **Arithmetic On Elliptic Curves** right now.  Also, I will borrow the book by Rose mentioned above; thank again. Look forward to the day I can solve this question!
Comment: And of course, but I forgot in the last comment,  the book by *Mordell* is already at my disposal, while I still try hard to follow his steps and various methods used to solve those incredibly interesting equations. The study of elliptic curves really opened up a totally new door to me, for I was completely unaware of this ancient and fascinating subject.


create a button to create a new opportunity from a task

Question: I have created a task related to a custom object record which in turn is related to an account record. How would I create a button that would create/launch a new opportunity of a specific record type or failing that take me to the select opportunity record type page while holding onto the account id.
Answer: Try just put there
'/006/e?accid={!Something.AccountId}&RecordType={SomeRecordTypeId}'
It will take you to new record on opportunity.
Of course you have to put some record Type Id there
Comment: thanks, why have you "!Something"? where do I put this specifically?
Comment: Because I don't know your object name, you just have to put there Id of parent account, either from relation or formula field