If a local user types in a password during a LogMeIn session on the local computer, can the remote user have it?

Question: I assume this question without any keylogger help installed on the local computer. So is it possible that a remote user catch the password you have typed in on your local computer for a local soft ?
Comment: Welcome on Security SE. Generally speaking, as long as the password is not sent on the network remote attackers cannot get it (and even if it would, as long as the communication is secure it would be impractical for any attacker to read it). You should however give more context information if you would like a more precise answer (for instance is there any specific circumstance or threat which make you ask this question?).
Answer: No, it's not possible for a remote user to sniff your password over a service like logmein. There are many reasons, the biggest of which being that you aren't connecting to each other directly. When you connect with someone over logmein you are going through a server which brokers the connections. If a remote user shares their desktop you could not record keystrokes, only see what is on the screen.
The only way you would ever be able to get their keystrokes is if they were acting on your system, as in you had given them control, and even then you'd need a keylogger utility of some sort.


Prevent JQuery animation from occuring if an animation is already in progress

Question: I have some JQuery code in the click event handler for a checkbox that updates the value of a span control on the page, then animates the background color of the span tag to yellow and then fade back to white in about a second to draw attention to the user that the value of the span has changed.  The problem is that if a user clicks repeatedly on the checkbox, then the animation occurs over and over for how ever many times the user clicked.  Any one know how to prevent the JQuery animation from occuring if an animation is already in progress.
Answer: Simply call stop() on the object before animating it:
 $('#button').click( function() {
  $('#animatedSpan').stop().animate( { } );
 });


What version of PDF/A does Preview produce?

Question: If I use the Export menu in Preview it gives me an option to make various versions of my PDF including PDF/A. What PDF/A is this, 1b, 2b, 2u, other?
Answer: I have been unable to find any documentation by Apple about this addition to Preview (or in PDFKit), since it was introduced.
However, a quick test of saving a PDF/A file from Preview and 'flight-checking' it in Acrobat reveals that it does not comply entirely with any PDF/A standard. PDF/A-2b comes closest, with some minor metadata infractions.

It's possible that these problems are specific to the file, and that other PDFs might have compliant metadata.
As with Apple's PDF/X implementation, I would not rely on it. For example, you can check the box to Create a PDF/A document, and also to encrypt it, which is against the spec.

(In fairness, you get an encrypted PDF of blank pages.)
Warning: Preview does not open PDF/A files as read-only, and any modification to the file will be auto-saved, even if contrary to the spec, while maintaining the flag for PDF/A.
In short: do not use Preview to either view or create PDF/A documents.
Comment: Interesting, so the PDF itself seems to pass but the metadata doesn't. The warnings are well taken.
Comment: @John Most of the characteristics of the PDF/A spec are fairly 'normal' -- embedded fonts, no attached files, no encryption, etc, -- so it's unsurprising that it meets most of the spec.


Meaning of defer for graduate application

Question: I applied to graduate school in USA for Fall 23. Recently I got an email from the director of graduate admission saying that there is no TA/Funding available and initially all the offers are made for this year. I was too late in submitting my application for some reason. I had applied to this university in mid-March and the application deadline was in January. In the email, the director asked whether I would like to defer my application for Spring 24 or not. What does "defer" mean? Is there any chance of Funding/GTA in Spring 24?
Answer: Defer usually means delay and that they will hold a place for you. But...
Ask the director. There is no way to know in general what the policy is. I suspect that it means you can get funding then, but don't depend on that guess. Ask.
And your acceptance into the program isn't clear from what you write. If you have been accepted, it is easier to defer the start date than funding.
Answer: You should ask for clarification, but it appears that the department is willing to keep your application and consider it again for admission in the spring of 2024.  At that point, if there is a TA/RA available, you might receive an offer for a position starting in the spring of 2024.
Assuming that this is what is being offered, you should probably say that you would like your application to be considered for the spring of 2024.
Answer: In my math department, "deferring" an application does not mean anything about admission, nor about funding. It means that they'd consider your application in a later round, and consider you for funding at that time. No promises of either one, just that you missed the deadline for Fall 2023.
(Yes, in the U.S., in math, the application deadlines for Fall semesters are 8 or 9 months prior, essentially early in the preceding January. Also, in my dept, we typically commit funding for a 9-month school year, so there is no new funding available for Spring semesters. And we try to avoid admission-without-funding, so we rarely look at applications for admission to Spring semesters.)
Comment: Basically it means they're saving you the trouble of resubmitting next year.
Comment: And, in line with @Barmar's comment, you'd save the application fee! :)


What causes Catnip to flower?

Question: I'm growing catnip for, you guessed it, cats and the bunch I have is continuously growing flowers. I've been chopping them off but it's never ending.
Is there a cause or will this just always happen?
Answer: Yes, it will always just happen. Nepeta is programmed to flower, and I'm not at all sure why you don't want the flowers - unless you're growing an annual variety, when it will flower and eventually die, most are perennial, and flowering is part of its natural cycle. Although most plants which flower can look a bit tatty after flowering, they recover and grow more foliage over time. I certainly didn't notice my cats disliking the flowers, but I never managed to keep plants for long - four cats fighting over them and rolling around in them consistently for hours on a daily basis meant they always gave up the unequal struggle and died.
Answer: Also from my reading, the flowers are very potent and is what is also used to dry to make the catnip filled toys. So trim it I guess, dry the flowers and make cat toys. I'm still waiting for mine to bloom. Hopefully another 6 inches and it will start.
Answer: Catnip can get a little out of hand if its not in a container. Is this the reason you're trimming off the flowers? Catnip will also produce rhizomes (underground roots that will grow into new plant). I personally enjoy having mine in a big half barrel planter. I found two per barrel to be reasonable, and I haven't ran into any outbreaks of catnip growing everywhere, and it's easy to take care of the rhizomes coming up.
Unfortunately there's really no method to stop them from flowering. I hope this helps you out some.
I have 3 large catnip bushes. The first year when I got the seedlings didn't flower at all. The following years it's flowered. I also wait until it flowers before cutting and tieing it up and hanging it in a paper bag to dry out. Each year I give little sandwich bags to my clients whom own cats, they love it.
Here's a photo of the type of planter and one of my barrels with catnip.

What causes Catnip to flower?


Why there is no smartctl tool in ESXi 5.x?

Question: I'm using some kind of Whitebox and my hardware drives are not recognized under Configuration -> Health Status
Answer: In ESXi hardware status is monitored using CIM

VMware's CIM Provider Program is open to qualified OEMs and IHVs
  interested in developing CIM providers for VMware ESX. CIM Provider
  partners have access to the VMware Workbench CIM Provider Development
  Kit (CIM PDK) plugin, including a build environment, test framework,
  and other tools. Partners interact with VMware's R&D engineers to
  create and test CIM providers and to influence future enhancements to
  VMware's CIM infrastructure.

CIM Providers
Answer: I think it's because you're using "white box" hardware.
Server-class systems provide hooks for VMWare monitoring/health status.


Not able to type any character into any input fields on Salesforce community pages

Question: Recently I faced an issue the community cloud pages,
whatever the input fields were there on the page I was not able to type any character into it.
For any input fields like lightning : text input or lightning : text area when I clicked on the input
field to type into it the cursor used to come and immediately used to go away, and cursor was not
longer available to type. Again if I click on the input field, cursor used to come and go again immediately.
Only if I kept the mouse left click pressed and held it only then the cursor used to stay and I was able to
input character into that input field.
In JavaScript terms, the input field use to loose focus immediately, this was a strange behavior as earlier it
worked as expected then this issue came all of the sudden and went away on its own.
Can anyone suggest what could have been the cause and how it went away on its own, does it have to do something with salesforce releases?
Answer: This was because of performance degradation issue which happened on salesforce side as confirmed by salesforce itself. However it got resolved on its own after few days.


homegroup access through multiple wireless routers

Question: I have two wireless routers connected to each other at home. I have a homegroup established in one of them. I want the computers connected to the other router to be able to "see" the homegroup. Is there a way to do that on Windows 7?
Comment: How are your routers connected? Are they 2 access point sharing the same SSID?
Answer: What I am guessing you are trying to do is extend your wireless coverage area? i.e. you have a router in your basement and you ant to have access to your basement's computers from the first or second floor.
You need only 1 "router" by router I mean a device which is going to handle the DNS (coverting names to IP : google.com -> 22.214.171.124) and DHCP (taking care of distributing the IP address into your local network) services.
The other device will act as an extension of the first one. That device will be call 4 ways, depending on their action :
Access point (AP) : distributing network from cable to wireless.
exemple : you plug the router by cable into the access point and the AP send the signal wirelessly.
Bridge : taking a wireless signal and coverting it to cable.
Exemple : your neighbor takes your wireless network and plug his computer into the bridge with a cable
Repeater : repeat a wireless signal into the same wireless signal (strengthen the signal)
Exemple : you have a very weak signal from your basement wiresless router and you want to strengthen it for your second floor wireless computer
Switch : wire to wires
Exemple : you have a router with only 1 out and you have 4 computer to wire in it. The switch convert 1 cable into 4 or more
So depending on your settup you may need one of those 4, plus a router. Severals router has the ability to switch from router function to one of those options. You need to check the configurations page. You might not need to replace one of your current device.
In anyway, I hope this help.
antoine


FEniCS: evaluate gradient of function at point

Question: Let u be the solution to a given problem solved using FEniCS, on a function space V
from fenics import *
...
u = Function(V)
solve(a==L, u, bcs)

and x be a Point object. How do I evaluate the gradient of u at x ?

I tried
g = grad(u)
g(x)

which raises an error about dimensions :
UFLException: Expecting dim to match the geometric dimension, got dim=1 and gdim=2.

Projecting the gradient on the function space doesn't give encouraging results either:
h = project(grad(u), V)

also raises an error
UFLException: Shape mismatch.

Answer: I guess you have dimensions problems, while projecting a function in a scalar function space. you might need to do something like this:
 V_vec = VectorFunctionSpace(mesh, "CG", 1)
 h = project(grad(u),V_vec)

Regards, Leonardo


When two amoeba cells form from one amoeba, does spindle fibers form?

Question: When two amoeba cells form from one amoeba, does spindle fibers form? Some sources say that spindle fibers do not form while an amoeba cell is undergoing cell division. If spindle formation does not occur, than how are the chromosomes pulled apart? Which intracellular transport mechanisms are used?
Answer: Amoebas undergo binary fission, which is a much more simplistic process than mitosis. In binary fission, the duplicated chromosomes simply separate as the cells is pulled apart. There are no spindle fibers used in this method of cell division.
Ok - so some of my references were a bit older, and I went through and looked through the literature a bit further - and found this great newer (ish) reference that actually used optical imaging to document the process of cell division: https://link.springer.com/content/pdf/10.1134/S1990519X16010041.pdf   Demin, S. Y., Berdieva, M. A., Podlipaeva, Y. I., Yudin, A. L., & Goodkov, A. V. (2016). Optical tomography analysis of Amoeba proteus chromatin organization at various cell cycle stages. Cell and Tissue Biology, 10(1), 84-94.
The process by which they undergo chromosomal separation is  a bit different in that there is no clearly identified kinetichore, but it looks as if microtubule spindles are involved. My error!  The process of DNA replication and other stages are quite different in this process that in typical mitosis.


Why increase of Y divided by increase of X in slope equation?

Question: In the slope equation,the increase of x is divided to the increase of y.But I cannot understand,why we cannot use the increase of y is divide to the increase of x.Everyone said,the gradient of the tangent to the curve at a point is one over one,increase in y divided by increase in x,etc....But they cannot tell why the increase of Y divide by increase of X and why we cannot use the increase of x divided by increase of y.
Comment: Yes, that would give as much information as "change in y divided by change in x".  But we need to choose one way or the other to have a specific function and chose to use "change in y divided by change in x".   One reason for that **choice** is that we tend to think (though it is not *mathematically* required) of the function y= f(x) as "a value of x **causes** a change in y".  A **change**  in x causes a **change** in y.  "Change in y divided by change in x" answers "how much change in y is caused by change in x?"\cdot\cdot\cdot$
Answer: Consider a constant function, for example. You would say that the slope equals zero in that case. For an arbitrary increase in x, the increase of y would be zero, so x/y would not be defined. It doesn't make sense that way considering that the slope is meant to increase when the increase of y is bigger along a constant difference in x.


Merge 2 SMS databases (sms.db) from 1 iPhone 3GS running on iOS 4.0.1 and putting the output file back on the iPhone without the SMS App crashing

Question: First of all, I've never really done any heavy programming, just fooling around a bit with Python. If any of my questions sound odd or so, please try to understand me.
I have a following problem:
My iPhone 3GS running on iOS 4.0.1 had problems with making outgoing calls. The only way to solve this problem was to restore iPhone to its factory settings. As it's obvious to iPhone owners, doing so I lost things such as my SMS messages history. I was able to retrieve the sms.db file from the backup by adding the *.db extension to a numerically named file containing the whole SMS history.
What I have now are 2 such SMS databases: The retrieved one and the one with new messages already on the phone. What I would like to do is to merge data from these 2 databases into one, single file (for the purpose of my goal my iPhone is, obviosly, jailbroken).
The iPhone sms.db database contains various tables, one of which is called "messages" and contains information such the telephone numbers, SMS message text, flags and so on. I was able to export the "message" table from the newer database into the older one by using the SQL Database Browser 2.0 b1, and calling it "message2". Later, having some problems with executing the INSERT INTO statement in SQLite Manager for Firefox, I found out that first I had to drop and recreate the triggers causing the No such function: "read" error by executing the following statement: drop trigger insert_unread_message;
drop trigger mark_message_unread;
drop trigger mark_message_read;
drop trigger delete_message;
CREATE TRIGGER insert_unread_message AFTER INSERT ON message WHEN NOT new.flags = 2 BEGIN UPDATE msg_group SET unread_count = (SELECT unread_count FROM msg_group WHERE ROWID = new.group_id) + 1 WHERE ROWID = new.group_id; END;
CREATE TRIGGER mark_message_unread AFTER UPDATE ON message WHEN old.flags = 2 AND NOT new.flags = 2 BEGIN UPDATE msg_group SET unread_count = (SELECT unread_count FROM msg_group WHERE ROWID = new.group_id) + 1 WHERE ROWID = new.group_id; END;
CREATE TRIGGER mark_message_read AFTER UPDATE ON message WHEN NOT old.flags = 2 AND new.flags = 2 BEGIN UPDATE msg_group SET unread_count = (SELECT unread_count FROM msg_group WHERE ROWID = new.group_id) - 1 WHERE ROWID = new.group_id; END;
CREATE TRIGGER delete_message AFTER DELETE ON message WHEN NOT old.flags = 2 BEGIN UPDATE msg_group SET unread_count = (SELECT unread_count FROM msg_group WHERE ROWID = old.group_id) - 1 WHERE ROWID = old.group_id; END;
After all of this, I was able to finally add the newer SMS messages into the older database. This, however, didn't mark the end of different issues. First of all, the newer messages I added got placed at the top of the table (above the older ones) with numbers in the "ROWID" column lower than the older messages. The correct (and logical) format of the table should be for these newer messages to be placed at the very bottom of the table, having higher numbers assigned to them. I don't know what kind of SQL statement to execute to be returned only the "ROWID" column in the following format:
ROWID
1
2
3 and so on, these numbers being the ones assigned to the newer messages. I've tried to achieve this by doing the following: SELECT * FROM message
WHERE ROWID='1' AND '2' AND '3' and so on, but SQLite Manager returned only the row with the "1", not the rest. What sort of statement could be used to achieve what I want?
Also, when I SSH the edited sms.db I already have back on the iPhone, the SMS app crashes each time I compose a message and tap the "OK" button to send it (the length or any signs within the message don't matter). I've read that the SMS app may crash when it renders and displays some characters incorrectly (e.g. UNICODE). I found 1 SMS message in which the UNICODE characters were render incorrectly and corrected it manually, but the app still crashes after the correction. I'm just not sure if what I found was the only error with the rendering. Is there any way (either in SQL or other) to find only texts with such errors?
Besides, the SSH-ed sms.db operates a bit oddly, since it doesn't display all the messages in the list. I can find some of those it doesn't display by using the search function and typing a part of a message. Then iPhone finds it, displaying only the preview of the text without any name or phone number, but can't oen it when I tap on it. It either doesn't respond to the tapping at all or it redirects my to a different conversation history.
If anyone has more insight in modifying the sms.db or has any thoughts on what else may be causing the SMS app to crash, feel free to post what you have to say  :)
EDIT: Just as I expected, assigning higher numbers to the newer messages and placing them at the bottom of te list worked, and now the conversations I cared the most about are all displayed :) Besides, the SMS app doesn't crash anymore :) The only problem I still have, however, is that there are some messages which aren't on the list while you view it, but are displayed when key words typed while searching match the contents of these messages. Just as it was before, They neither have no numbers while being displayed, nor can they be opened from the search view. As these messages in particular weren't important to me, I deleted them from the sms.db "message" table, and put back the altered file back onto the iPhone. Although these messages aren't in the sms.bd file anymore, they are still displayed while searching :/ It's not such a big problem, because everything else works again, but it's a bit irritating to have them in the search results. Does anyone have any idea how I could fix this?
Thank you for help I got so far, and also thank you for a bit more of it in advance :)
Comment: Is it really that important?  Or are you doing it as a programming exercise?
Comment: Well I know that such a thing as an SMS history isn't the most important thing in the world, but I have in it some conversations which really matter to me, and that's why I care so much about keeping that history. And the fact that all this serves as, just as you called it, "a programming exercise", is just a side thing
Answer: When you say
WHERE ROWID='1' AND '2' AND '3'

You actually are saying
WHERE (ROWID='1') AND ('2') AND ('3')

I suspect '2' and '3' are being interpreted as TRUE. Also, ROWIDs are supposed to be integers. Comparing them to strings works because sqlite3 automatically converts ints to strings.
You probably mean something like
WHERE ROWID IN (1,2,3)

Comment: I am very grateful for your answer, tc. :D The statement you provided worked, and returned what I wanted how I wanted :)
Answer: Use mobile terminal and type :
chown -R mobile:mobile /var/mobile/Library/SMS


Explainability ML Methods

Question: I am currently working on a Machine-Learning Model. In order to explain how it works, I have looked at Partial Dependence Plots, Feature Importance and all kinds of methods, but one thing still concerns me:
Should I evaluate these on the dataset I trained the model with, or the current dataset on which it performs predictions? This of course leads to different results depending on the distribution and the performance of the model.
How do you handle this?
Any opinions or input would be highly appreciated!
Comment: The following Kaggle kernel should be helpful to you:  https://www.kaggle.com/mjbahmani/santander-ml-explainability
Answer: You can look at the different evaluations as evaluation of the different stages of the model.

by evaluating the model's performance on the training dataset, you could assess how and what the model has learned from the data structure. This evaluation is mainly relevant for your research stage and the reporting of your results.
by evaluating the model's performance on the current/test dataset, you would see how the model is behaving and performing on current data the real predictions. This may help you to asses that

These two may differ in cases where the current data is behaving differently than the data that the model been trained on, and to help you to understand that the model needs to be updated and retrained on the data that it is performing poorly on.
If you're not monitoring your current data feed (distribution, range of values, the ratio of missings), I would suggest you do both for assessing if your ongoing observed performance is not what you are expecting.
Answer: There is plethora of content available now. I have summarised them all. you will be amazed by number of algorithms and frameworks already available-
http://machinelearningstories.blogspot.com/

Explainability ML Methods


Hide Angular brackets until javascript loaded

Question: I have a few bits of HTML like

{{numberOfContacts}} Results Are Available

Is it possible for me to hide {{numberOfContacts}} until Angular has loaded? So it would just say Results Are Available
I've seem some solutions such as hiding the entire body until Angular has loaded, but I'd rather not do that if possible.
Comment: use ngCloak directive http://docs.angularjs.org/api/ng/directive/ngCloak
Comment: Take a look at `ng-cloak`
Comment: Does this answer your question? [Prevent double curly brace notation from displaying momentarily before angular.js compiles/interpolates document](https://stackoverflow.com/questions/12866447/prevent-double-curly-brace-notation-from-displaying-momentarily-before-angular-j)
Answer: Yes, use ng-cloak. Simply add class="ng-cloak" or ng-cloak to an element like this
Using directive

Using class

It's simply a set of CSS rules with display: none !important and as Angular has rendered your DOM it removes the ng-cloak so an element is visible.
Answer: use  instead of {{numberOfContacts}}
Answer: Sometimes, even if I used the ng-cloak, I could still see the braces for a few seconds. Adding the following style resolved my issue:
[ng-cloak]
{
  display: none !important;
}

Please see this link link for more explanation.
Hope it helps :D
Answer: This is typically only an issue when working with complex content on really slow devices. In those instances, there can be a brief moment when the browser displays the HTML in the document while AngularJS is parsing the HTML, getting ready, and processing the directives. In this interval of time, any inline template expressions you have defined will be visible to the user. Most devices nowadays have pretty good browsers which are quick enough to prevent this from being an issue. There are two ways to solve the problem.

Avoid using inline template expressions and stick with ng-bind directive.
(Best) Use the ng-cloak directive which will hide the content until Angular has finished processing it. Basically, the ng-cloak directive uses CSS to hide the elements and angular removes the CSS class when the content has  been processed, ensuring that the user never sees the {{ and }} characters of a template expression.
One strategy to consider is using the ng-cloak directly to the body element, which will ensure that the user will see an empty browser while AngularJS loads. However, you can be more specific by applying it to parts of the document where there are inline expressions.

I have seen issues with ng-cloak not working when added to an element. In the past, I have worked around this issue by simply adding ng-cloak class to element.
Answer: You can use ng-bind instead of expression like


control home heating and light

Question: i am looking for a way to control the on/off of the heating element in my country house and a couple of lights. all i am looking for is to switch on or or off respectively the heating equipment and 3 lights. I would like to do it from my mobile, so when i will be at home after 3-4 hours it will be warm.
is there a guide on how to do it? i am looking also to have the state of each device. eg heating is on, or light on bedroom 1 is on.
At the moment i have a rpi 2 and the internet access ready on the house. looking for the rest.
Answer: There is several projects for doing this, but the one that I like the most is blynk (that I've recommended several times by now here and iot stack exchange)
I've a similar setup at home, where I've a node in the living room that reads a bosch bme280 sensor and controls a led strip with a mosfet (but the setup for a relay will be quite similar).
In the bedroom, I've two devices, a nodemcu with a bme280 and a sonoff s20. The nodemcu reads the temperature and humidity, and if the humidity is below a certain value, it will send a "message" to the sonoff that turns on the relay after the humidity readed is higher that a certain value.
Also, You can have charts and a lot of stuff to play with, which make it's a great environment to play with.

control home heating and light


Is there a simple way to derive a T-S diagram from a p-V diagram for arbitrary processes?

Question: Often, for thermodynamic processes only a p-V diagram is shown.
Even without hard figures, the shape of the curve can be helpful to evaluate the process.
However, it is hard to figure out for real processes. Are there good rules of the thumb to arrive at a T-S diagram from a p-V diagram?
Comment: mart, is [this account](http://physics.stackexchange.com/users/8427/mart) also yours by any chance?
Comment: yes. Possible to merge?
Comment: sure, I'd be happy to do that. Just change the email address on the other account to match the one on this account to confirm the identity, and as soon as you do that I'll merge them together.
Comment: can't change the address on the other to match this cause this one is already registered.
Comment: Oh, OK. Well if you can just edit something into the profile field of the other account to indicate that it's you ("please merge me" or something would work), that would be fine as well.
Answer: For a general system (unknown equation of state/energy) this will not be possible.
For example a $(p,V)$-curve with points $(p,\frac{c}{p})$ could be an isotherm because maybe $V(p)=\frac{nRT}{p}$. An isotherm corresponds to a horizontal line in a $(T,S)$-diagram. But if you don't know you're dealing with an ideal gas situation then it might look different.

As a general orientation, the stability criteria for reasonable thermodynamic systems and related relations might be helpful to guess the signs of the rates of change.
For example in a typical situation, you'd expect the compressibility
$$\beta=-\frac{1}{V}\frac{\partial V}{\partial p}$$
to be positive. The adiabatic and isothermal compressibilities are defined for curves of constant $S$ and $T$ respectively, so the corresponding adiabatic or isothermal line in the $(T,S)$-diagram will be associated with a curve $(p,V(p))$ in the $(p,V)$-diagram with
$$\frac{\partial V(p)}{\partial p}<0.$$
You see this in the ideal gas example (see picture), where the isotherm is $V\propto \frac{1}{p}$ and the adiabate is also some negative power of pressure $V(p)\propto \frac{1}{p^{\frac{1}{\gamma}}}$, with $\frac{1}{\gamma}>0$.

Positivity of the heat capacities $C_V$ or $C_p$  at constant volume or pressure is a dual example, which relates to properties of $S(T)$ in similar way.
Furthermore, the Maxwell relations cross correlate the slopes.
Lastly, there are some principles, following from the laws of thermodynamics, which forbid some curve configurations. E.g. two different adiabates can never cross twice, because that would mean a possibility for work without heat flow.

But as I said, besides that rough reasoning regarding the shapes of the cyclic processes, if you don't know $T(p,V)$ etc. and you can't compute heat or work, how would you know which line in the $(p,V)$ diagram corresponds to the isotherm or the adiabate? In the other case, i.e. if know know the equation of state or some other relation, then the dependencies can of course be explicitly computed.
Answer: The equations of state of a Gibbsian substance are usually given in the form $$T=f(p,V), \quad S=g(p,V)$$ for suitable functions $f$ and $g$.  I understand the query as asking when we can use them to express $p$ and $V$ in terms of $S$ and $T$.  Mathematically speaking, this  means that you are asking for a representation of the inverse of the corresponding mapping $$(p,V)\mapsto (S,T)$$ of the plane or a part thereof.
For simple models, this can be done by solving the resulting equation for $p$ and $V$.  Thus for the van der Waals gas in the form
$$T=\left (p + \frac 1 {V^2}\right )(V-b), \quad S = \frac 1 {\gamma-1} (\ln p + \gamma \ln V)$$
we can easily compute that $$V=b+e^S T^{\frac 1 {1-\gamma}}\quad p=e^{-S}T^{\frac \gamma {\gamma-1}}-\frac a{(b+e^ST^{\frac 1 {\gamma-1}})^2}.$$
(The ideal gas is the special case $a=b=0$).
For more complicated models, it may not be possible to compute this inverse explicitly (for example, for a model due to Feynman which allows for the fact that the adiabatic exponent depends on temperature) but there are numerical methods available  (for example, in Mathematica one has the option NSolve).
On the more theoretical side, the inverse function theorem and the fact that the Jacobian determinant of the above transformation is $1$ (Maxwell relation), ensures that this inverse exists (at least locally).


What is it about Xayah and Rakan that make them a good duo?

Question: On the current patch, why is Xayah considered to be a good pick regardless of the support, while Rakan is considered to be only good while supporting Xayah? What is it about their kits that makes them particularly good as a duo while making Rakan dependent on Xayah?
Answer: Xayah has decent damage, CC and after level 6 guaranteed damage immunity making her a good ADC pick that can follow up on ganks with more CC, maintain damage and also have the occasional escape when needed.
Rakan on the other hand has abysmal range on his autos, needs to get right up to people to CC them and has a short ranged escape after CC that needs another champion nearby (Unless he's with Xayah, where he gets an absurd ranged escape).
So when laneing with Xayah, Rakan is able to pull off his CC, get his heal started and dash backwards to safety to get poke off, can zone enemies from farm while still having a safe escape available. This buff of Rakan/Xayah is increased as one of Xayah's abilities also procs off Rakan as well buffing the damage of the duo as a whole.
Keep in mind even though Rakan is a less than mediocre pick as of the current patch he is by no means a bad support, he just gets more utility with Xayah.
Comment: Not to forget their passive return skill - either can join the other when in the middle of returning to base, and only have to wait the remaining time. eg: if Rakan is backing, and has spent 4 seconds already backing, Xayah can join Rakan and back in 4 seconds as well.
Answer: I think Rakan depends on Xayah because he is not tanky enough to engage alone, while Xayah would provide him a lot of damage with her W-Ability to kill the enemies fast enough.
And Xayah is just strong atm, she is compatible with any kind of supp.


What is a year dedicated to a certain saint or something else?

Question: What is a year dedicated to a certain saint or something else? Is it important?
Does it require anything in particular of Catholics?
Answer: What is a special year of a certain saint?
The response to your inquiry is very closely related to celebrating jubilees!
Every once and awhile, the pope (for the Universal Catholic Church) or a bishop (for the faithful of his particular diocese) may declare a special year dedicated to to a particular saint or Divine Mystery for a number of reasons.
During such years, the pope will outline special devotional practices in order to gain indulgences (either plenary or partial) depending on the will of the Holy Father for the particular year of dedication! As a title of example, the rules for devotional practices which could be gained for the Great Jubilee of the year 2000 can be found in this article: The Gift of the Indulgence.
The most common reason is to draw attention to an historical milestone in since the birth or death of a particular saint, or the centennial or bicentennial of some historical event or to some Divine Mystery such as the Resurrection of Our Lord Jesus Christ.

By far the most well known Jubilee Year in honour of a saint is celebrated in Santiago de Compostela whenever July 25, the day of St. James the Greater, falls on a Sunday.

The Compostela Holy Year
What it consists of and its history:
A Jubilee Year is celebrated in Santiago de Compostela whenever July 25, the day of Santiago the Elder, falls on a Sunday.
A Jubilee Year is celebrated in Santiago de Compostela whenever July 25, the day of Santiago the Elder, falls on a Sunday. This happens with a time sequence of six, five, six and eleven years. The creation of the Holy Year in Santiago goes back to the XV century. It is believed that the first one in history could have been the Jubilee Year of 1428, or perhaps 1434, both convened by Archbishop Lope de Mendoza.
However, before the Holy Year of Compostela became official, during the Middle Ages, the pilgrims could obtain numerous indulgences in Santiago, granted by the Church of Compostela in representation of the Apostle, the advocate of his pilgrims before the Supreme Judge. The indulgences are spiritual benefits for the pilgrim himself or for an ill or a deceased person represented by the pilgrim.
As from the creation of the Holy Year, the same grace could be obtained by the pilgrims who, in a normal year, visited the Cathedral on July 25, the feast day of the Passion of Santiago, or on the feast day of the Dedication of the Cathedral, every April 21, or on the feast day of the Transfer of the Body of the Apostle to Galicia, every December 30. This reduced the pressure provoked by the concentration of pilgrims on one day in summer, July 25, by convening the pilgrims in spring and winter too.
The last four Holy Years were 1993, 1999, 2004 and 2010. The next July 25 which will fall on a Sunday will be in 2021.
During all the year, the pilgrims who wish can obtain the plenary indulgence (forgiveness for their sins) during any day of that year. Achieving the plenary indulgence is what is known as the Jubilee. To do so, the pilgrims must comply with a number of precepts laid down by the Church such as visiting the Cathedral of Santiago, praying and receiving the Sacraments of Penance (Confession) and Communion.

The Cathedral of Santiago de Compostela, Spain houses the largest largest censer in the world, weighing 80 kilograms (180 lb) and measuring 1.60 metres (5.2 ft) in height.

In the Jubilee Years (whenever St James's Day falls on a Sunday) the Botafumeiro is also used in all the Pilgrims' Masses. Eight red-robed tiraboleiros pull the ropes and bring it into a swinging motion almost to the roof of the transept, reaching speeds of 80 kilometres per hour (50 mph) and dispensing thick clouds of incense.

The swinging Botafumeiro dispensing clouds of incense

Pope declares year of St. Joseph, offering special indulgences

Pope Francis on Tuesday issued a decree launching a special year dedicated to St. Joseph coinciding the anniversary of his declaration as Patron of the Catholic Church, hailing him as a model of fatherhood and a key intercessor in modern times.
Published Dec. 8, on the 150th anniversary of Quemadmodum Deus by Pope Pius IX which declared St. Joseph patron of the Catholic Church, the decree formally instituted a year for St. Joseph, which will run until Dec. 8, 2021.

These special year anniversaries usually carry with them certain indulgences accorded by the reigning pope or a bishop's permission (with papal approval).
In the year of the Lord 1967, to commemorate the 19th centenary of the martyrdom of the Apostles Peter and Paul, a Year of Faith was proclaimed by the Pope St. Paul VI, "intended to show, by an authentic and sincere profession of the same faith, how much the essential content that for centuries has formed the heritage of all believers needs to be confirmed, understood and explored ever anew, so as to bear consistent witness in historical circumstances very different from those of the past".
These sort of special years of commemoration are closely connected to Catholic understandings as to what constitutes a jubilee celebration.

Holy Year of Jubilee
The ultimate derivation of the word jubilee is disputed, but it is most probable that the Hebrew jobel, to which it is traced, meant "a ram's horn", and that from this instrument, used in proclaiming the celebration, a certain idea of rejoicing was derived. Further, passing through the Greek iobelaios, or iobelos, the word became confused with the Latin jubilo, which means "to shout", and has given us the forms jubilatio and jubilaeum, now adopted in most European languages.
Old Testament origins
For the Israelites (see HEBREW YEAR OF JUBILEE), the year of Jubilee was in any case preeminently a time of joy, the year of remission or universal pardon. "Thou shalt sanctify the fiftieth year," we read in Leviticus 25:10, "and shalt proclaim remission to all the inhabitants of thy land: for it is the year of jubilee." Every seventh year, like every seventh day, was always accounted holy and set aside for rest, but the year which followed seven complete cycles was to be kept as a sabbatical year of special solemnity. The Talmudists and others afterwards disputed whether the Jubilee Year was the forty-ninth or the fiftieth year, the difficulty being that in the latter case two sabbatical years must have been observed in succession. Further, there are historical data which seem to show that in the age of the Machabees the Jubilee of the fiftieth year could not have been kept, for 164-163 B.C. and 38-37 B.C. were both certainly sabbatical years, which they could not have been if two sabbatical years had been intercalated in the interval. However, the text of Leviticus (25:8-55) leaves no room for ambiguity that the fiftieth year was intended, and the institution evidently bore a close analogy with the feast of Pentecost, which was the closing day after seven weeks of harvest. In any case it is certain that the Jubilee period, as it was generally understood and adopted afterwards in the Christian Church, meant fifty and not forty-nine years; but at the same time the number fifty was not originally arrived at because it represented half a century, but because it was the number that followed seven cycles of seven.
It was, then, part of the legislation of the Old Law, whether practically adhered to or not, that each fiftieth year was to be celebrated as a jubilee year, and that at this season every household should recover its absent members, the land return to its former owners, the Hebrew slaves be set free, and debts be remitted.
The Christian jubilee
The same conception, spiritualized, forms the fundamental idea of the Christian Jubilee, though it is difficult to judge how far any sort of continuity can have existed between the two. It is commonly stated that Pope Boniface VIII instituted the first Christian Jubilee in the year 1300, and it is certain that this is the first celebration of which we have any precise record, but it is also certain that the idea of solemnizing a fiftieth anniversary was familiar to medieval writers, no doubt through their knowledge of the Bible, long before that date. The jubilee of a monk's religious profession was often kept, and probably some vague memory survived of those Roman ludi saeculares which are commemorated in the "Carmen Saeculare" of Horace, even though this last was commonly associated with a period of a hundred years rather than any lesser interval. But, what is most noteworthy, the number fifty was specially associated in the early thirteenth century with the idea of remission. The translation of St. Thomas of Canterbury took place in the year 1220, fifty years after his martyrdom. The sermon on that occasion was preached by Stephen Cardinal Lantron, who told his hearers that this accident was meant by Providence to recall "the mystical virtue of the number fifty, which, as every reader of the sacred page is aware, is the number of remission" (P.L., CXC, 421).
We might be tempted to regard this discourse as a fabrication of later date, were it not for the fact that a Latin hymn directed against the Albigenses, and certainly belonging to the early thirteenth century, speaks in exactly similar terms. The first stanza runs thus:

Anni favor jubilaei
Poenarum laxat debitum,
Post peccatorum vomitum
Et cessandi propositum.
Currant passim omnes rei.
Pro mercede regnum Dei
Levi patet expositum.

In the light of this explicit mention of a jubilee with great remissions of the penalties of sin to be obtained by full confession and purpose of amendment, it seems difficult to reject the statement of Cardinal Stefaneschi, the contemporary and counsellor of Boniface VIII, and author of a treatise on the first Jubilee ("De Anno Jubileo" in La Bigne, "Bibliotheca Patrum", VI, 536), that the proclamation of the Jubilee owed its origin to the statements of certain aged pilgrims who persuaded Boniface that great indulgences had been granted to all pilgrims in Rome about a hundred years before. It is also noteworthy that in the Chronicle of Alberic of Three Fountains, under the year 1208 (not, be it noted 1200), we find this brief entry: "It is said that this year was celebrated as the fiftieth year, or the year of jubilee and remission, in the Roman Court" (Pertz, "Mon. Germ. Hist.: Script." XXIII, 889). It is beyond all dispute that on 22 February, 1300, Boniface published the Bull "Antiquorum fida relatio", in which, appealing vaguely the precedent of past ages, he declares that he grants afresh and renews certain "great remissions and indulgences for sins" which are to be obtained "by visiting the city of Rome and the venerable basilica of the Prince of the Apostles". Coming to more precise detail, he specifies that he concedes "not only full and copious, but the most full, pardon of all their sins", to those who fulfill certain conditions. These are, first, that being truly penitent they confess their sins, and secondly, that they visit the basilicas of St. Peter and St. Paul in Rome, at least once a day for a specified time--in the case of the inhabitants for thirty days, in the case of strangers for fifteen. No explicit mention is made of Communion, nor does the word jubilee occur in the Bull--indeed the pope speaks rather of a celebration which is to occur every hundred years--but writers both Roman and foreign described this year as annus jubileus, and the name jubilee (though others, such as the "holy year" or "the golden year" have been used as well) has been applied to such celebrations ever since. Dante, who is himself supposed by some to have visited Rome during this year to gain the Jubilee, refers to it under the name Giubbileo in the Inferno (xviii, 29) and indirectly bears witness to the enormous concourse of pilgrims by comparing the sinners passing along one of the bridges of Malebolge in opposite directions, to the throngs crossing the bridge of the Castle Sant' Angelo on their way to and from St. Peter's. Similarly, the chronicler Villani was so impressed on this occasion by the sight of the monuments of Rome and the people who flocked thither that he then and there formed the resolution of his great chronicle, in the course of which he gives a remarkable account of what he witnessed. He describes the indulgence as a full and entire remission of all sins di culpa e di pena, and he dwells upon the great contentment and good order of the people, despite the fact that during the greater part of that year there were two hundred thousand pilgrims on an average present in Rome over and above the ordinary population. With regard to the phrase just noticed, a culpa et a poena, which was often popularly used of the Jubilee and other similar indulgences, it should be observed that it means no more than what is now understood by a "plenary indulgence". It implied, however, that any approved Roman confessor had faculties to absolve from reserved cases, and that the liberty thus virtually accorded of selecting a confessor was regarded as a privilege. The phrase was an unscientific one, and was not commonly used by theologians. It certainly did not mean, as some have pretended, that the indulgence of itself released from guilt as well as penalty. The guilt was remitted only in virtue of sacramental confession and the sorrow of the penitent. The sovereign pontiff never claimed any power of absolving in grievous matters apart from these. "All theologians", remarks Maldonatus with truth, "unanimously without a single exception, reply that an indulgence is not a remission of guilt but of the penalty." (See Paulus in "Zeitschrift f. kath. Theologie", 1899, pp. 49 sqq., 423 sqq., 743 sqq., and "Dublin Review", Jan., 1900, pp. 1 sqq.)

Examples of Jubilees:

Great Jubilee of the Year 2000
In 1953, with the encyclical Fulgens corona, Pope Pius ordered a Marian year for 1954, the first in Church history. It was called to commemorate the centenary of the definition of the dogma of the Immaculate Conception of the Virgin Mary.
On New Year's Day 1987, Pope John Paul II initiated a Marian year, from June 7, 1987 (Pentecost) to August 15, 1988 (the Feast of the Assumption), in preparation of the forthcoming millennium.
The Carmelites declared a Marian year in 2001 in order to deepen the Order's appreciation of its Marian heritage. Activities differed from province to province. Some held lecture series, others retreats, still others published works on the theme. In particular, there was a focus on the Brown Scapular as a sign of both the protection of Mary, and the wearer's commitment to the Carmelite charism.
In October 2016, Bishop Thomas J. Tobin announced a Marian Year for the Diocese of Providence, Rhode Island, following the close of the international Extraordinary Jubilee of Mercy in November. In recognition of the centennial anniversary of the apparitions of Our Lady of Fatima, the diocesan Office for Divine Worship participated in a pilgrimage to Portugal. A missionary image of Our Lady of Guadalupe visited parishes in the Diocese, with various presentations and holy hours.
Extraordinary Jubilee of Mercy of Pope Francis to commemorate the the closing of the Second Vatican Council.


Thump in transmission when braking

Question: Transmission on 2014 Chrysler 300 AWD make a thump noise in the transmission when applying brake. Mechanic listening to noise with a stethoscope to confine noise. Transmission is starting to slip slightly with only 53000 miles. Car was up on rack and I heard the thump coming from transmission when hitting brakes. Seems to shift ok when driving but seems like it's not normal
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: This could be a mechanical issue, but it could also be the adaptations need to be reset. Many modern cars' computers are designed to learn your driving style and adapt throttle response and gear changes accordingly. This can occasionally lead to some off behavior, for instance thumping, for example my Mercedes started thumping into lower gear when I was slowing down under medium braking.
The nice thing is that resetting your adaptations are free, you can disconnect the negative battery terminal for 10 minutes, or pull the PCM and transmission control fuses for 10 minutes before reinserting them. Either will clear the adaptations from the computers.
This may not be your problem, but it's extremely easy to eliminate as a possibility.

Thump in transmission when braking


Amplifying the WiFi signal

Question: I am writing to find out the best option to amplify the existing WiFi signal in my house in order to be able to be online in my backyard with my MacBook Air. Would purchasing an AirPort Express be a good solution, or a simple extender/repeater would do the job?
Answer: An Access Point would be sufficient - & cheapest.
[just some examples from Amazon, no recommendations specifically. Note, the filter on Amazon isn't great, there are other device types in there, as well as simple Access Points]
An Access Point needs no additional functionality other than being able to push a signal further.
You wire it via your existing Ethernet to where the signal will reach the garden. All routing/DHCP functionality is then still provided by your existing router.
If you can't, for any reason, get an Ethernet cable far enough to reach, then you would need a Range Extender, which is in essence the same thing, but wireless throughout. I'd still go for an AP as first choice, if at all possible.

Amplifying the WiFi signal


Should I store a database ID field in ViewState?

Question: I need to retrieve a record from a database, display it on a web page (I'm using ASP.NET) but store the ID (primary key) from that record somewhere so I can go back to the database later with that ID (perhaps to do an update).
I know there are probably a few ways to do this, such as storing the ID in ViewState or a hidden field, but what is the best method and what are the reasons I might choose this method over any others?
Answer: It depends.
Do you care if anyone sees the record id? If you do then both hidden fields and viewstate are not suitable; you need to store it in session state, or encrypt viewstate.
Do you care if someone submits the form with a bogus id? If you do then you can't use a hidden field (and you need to look at CSRF protection as a bonus)
Do you want it unchangable but don't care about it being open to viewing (with some work)? Use viewstate and set enableViewStateMac="true" on your page (or globally)
Want it hidden and protected but can't use session state? Encrypt your viewstate by setting the following web.config entries
<pages enableViewState="true" enableViewStateMac="true" />
<machineKey ... validation="3DES" />

Answer: Do you want the end user to know the ID? For example if the id value is a standard 1,1 seed from the database I could look at the number and see how many customers you have. If you encrypt the value (as the viewstate can) I would find it much harder to decypher the key (but not impossible).
The alternative is to store it in the session, this will put a (very small if its just an integer) performance hit on your application but mean that I as a user never see that primary key. It also exposes the object to other parts of your application, that you may or may not want it to be exposed to (session objects remain until cleared, a set time (like 5 mins) passes or the browser window is closed - whichever happens sooner.
View state values cause extra load on the client after every post back, because the viewstate not only saves objects for the page, but remembers objects if you use the back button. That means after every post back it viewstate gets slightly bigger and harder to use. They will only exist on he page until the browser goes to another page.
Whenever I store an ID in the page like this, I always create a property
public int CustomerID {
    get { return ViewState("CustomerID"); }
    set { ViewState("CustomerID") = value; }
}

or
    Public Property CustomerID() As Integer
        Get
            Return ViewState("CustomerID")
        End Get
        Set(ByVal value As Integer)
            ViewState("CustomerID") = value
        End Set
    End Property

That way if you decide to change it from Viewstate to a session variable or a hidden form field, it's just a case of changing it in the property reference, the rest of the page can access the variable using "Page.CustomerID".
Answer: ViewState is an option.  It is only valid for the page that you are on.  It does not carry across requests to other resources like the Session object.
Hidden fields work too, but you are leaking and little bit of information about your application to anyone smart enough to view the source of your page.
You could also store your entire record in ViewState and maybe avoid another round trip to th server.
Answer: I personally am very leery about putting anything in the session.  Too many times our worker processes have cycled and we lost our session state.
As you described your problem, I would put it in a hidden field or in the viewstate of the page.
Also, when determining where to put data like this, always look at the scope of the data.  Is it scoped to a single page, or to the entire session?  If the answer is 'session' for us, we put it in a cookie.  (Disclaimer:  We write intranet apps where we know cookies are enabled.)
Answer: If its a simple id will choose to pass it in querystring, that way you do not need to do postbacks and page is more accessible for users and search engines.
Answer: Session["MyId"]=myval;

It would be a little safer and essentially offers the same mechanics as putting it in the viewstate
Answer: I tend to stick things like that in hidden fields just do a little
 <asp:label runat=server id=lblThingID visible=false />

Comment: This essentially stores the value in ViewState.


Conditional expectation and regular distribution

Question: I have problem with proving the following fact:
Let $\mu$ be regular version of distribution of random variable $X$ with respect to $\sigma$-algebra $\mathcal{B}$. Let $Y$ be $\mathcal{B}$-measurable random variable. Prove that for any Borel function $\phi$ such that $\mathbb{E}|\phi (X,Y)|<\infty$, we have $$ \mathbb{E}(\phi(X,Y)|\mathcal{B})(\cdot) = \int \limits_{\mathbb{R}} \phi(x, Y(\cdot)) \mu(dx, \cdot)\ \ \ \ \ \text{a.s.} $$
How does this equation look like for $X$ independent from $\mathcal{B}$?
I can see that function $\omega \mapsto \int \limits_{\mathbb{R}} \phi(x, Y(\omega)) \mu(dx, \omega)$ is $\mathcal{B}$-measurable, so it would be enough to prove that $$\forall_{B \in \mathcal{B}} \int \limits_{B} \mathbb{E}(\phi(X,Y)|\mathcal{B})(\omega)dP(\omega) = \int \limits_{B} \phi(X(\omega),Y(\omega))dP(\omega) = \\ = \int \limits_{B}\left( \int \limits_{\mathbb{R}} \phi(x, Y(\omega)) \mu(dx, \omega)\right)dP(\omega).$$
First equality is obvious from the definition of conditional expectation, but I have problem with second one.
I would apreciate every help.
Thanks!
Comment: How can you show that the integral gives a measurable function of w?
Answer: The proof seems to go by complicating function $\phi$, starting from $\phi=I_{A\times B}$, for $A, B \in \mathcal{B}(\mathbb{R})$.
Answer: Since $Y$ is $\mathcal B$-measurable, it is:
$$P_{X\circ Y/\mathcal B}(\omega)(A\times B)=I_B(Y(\omega))P_{X/\mathcal B}(\omega)(A)$$
Hence:
$$\mathbb E[\phi(X,Y)\mid\mathcal B]=\int\phi(X,Y)dP_{\Omega/\mathcal B}=\int\phi(x,y)dP_{X\circ Y/\mathcal B}=\int\phi(x,Y)dP_{X/\mathcal B}$$


Why do we need instance variable in object oriented programming?

Question: I've been teaching myself Object Oriented Programming(Ruby) for a while. However, I still don't quite understand some of its core principles, specifically, instance variable. Could somebody please explain to me why do we need instance variable? What is the problem that it is trying to solve in object oriented programming? When do I need to create one, and when not? I appreciate it.
Comment: Smells like a homework question.
Comment: @ĐỗTiến Fair enough. I wrote that because we get homework questions more often than honest questions such as yours. In any case, there are good answers here already.
Comment: Answer + example
http://stackoverflow.com/questions/16686488/java-what-is-an-instance-variable
Comment: @MichelHenrich First of all, I am rails dev currently. So, homework doesn't make sense here. Secondly, I know there are many tutorials/explaination on the internet about the subject, but I still don't get the concept. Therefore, I decided to ask it here with the hope that somebody can make it clear to me. Just because somebody asks a why question to try to understand a particular concept doesn't mean that it is homework question. But anyway, everybody is free to smell whatever they like on the internet nowadays. ;)
Answer:
Instance variables are variables declare inside a class but outside any methods.
They can be accessed by all dynamic method of a class.
As opossed to a class variable which occurs only one for all instances of a class, with instance variables every instance have its own copy of them.
Instance variables represents the "state" of an object, meaning the values or properties that object holds in any given time.
With instance variables it's possible to have multiple instances of the Person class, each one having a different name attribute, i.e. instance1's name attribute can have the value "Joe" while instance2's name can be "Mary" and instance3's can be "Peter", because each one of the three instances have a copy of the instance variable name.
When you modify the value, such value is only changed for one instance. All others instances are not affected.
At this point you can figure that having different values for different instances is very useful in many programs.
Comment: @JörgWMittag As someone who uses C++, Java and C#, it makes perfect sense to me.  In those languages, the only place you can *declare* things is in the class.  There is no mechanism for declaring things in objects - those languages are statically typed, so you can't add anything that wasn't in the class.
Comment: +1 for *Instance variables represents the "state" of an object*.
Comment: "Instance variables are variables declare inside a class but outside any methods." – Huh? Instance variables don't have anything to do with classes. They have to do with objects (aka instances), that's why they are called instance variables. For example, in Scala, you can also declare instance variables in objects or in traits, not just in classes. Self doesn't even *have* classes, yet it has instance variables. In Ruby, which the OP explicitly mentioned, using an instance variable outside of a method inside of a class body means the instance variable belongs to the class, not instances of it.
Comment: This answer makes perfect sense to someone *who already understands the concepts.*
Comment: @SimonB: The mentioned Scala is also statically typed and it allows to define instance variables directly in an object, without defining a class. C++, Java and C# do not represent all possible flavours of object-oriented programming.
Answer: There are several different purposes of classes in OOP, but one of the most common is to act as a blueprint for creating objects. An instance variable is part of the blueprint for creating an object. It defines a datum that does not exist initially, but every time you create an object of that class's type (or subclass), that object will get its own (usually private) variable with that name inside of it.
This is really the entire point behind OOP. Instead of working with data directly, we package data with methods that know how to manipulate the data. This makes it much, much easier for the programmer to interface to the data:

you only need to understand the interface/specifications to use the data correctly, and the interface is much, much simpler than the code
if the code changes but still obeys the specs, then anything using the code will still work (as long as the client code makes no assumptions outside of what the specification says)
it allows you to work on dependent objects at the same time (which makes writing large systems possible)
it allows you to switch out one component for another with the same specs, even dynamically (while the program is running), and code reliant on the interface which bears those specs will work for both cases (this is where polymorphism comes from)

All of these are pretty much essential for writing large software. That's why we make these blueprints called classes.
Comment: @ĐỗTiến I gave you four examples. But think of it this way. A car has a lot of complex stuff under the hood, but a simple interface (steering, brake, gas). Why don't we have knobs to control the engine and timing belt? We'd ruin the car. We wouldn't be able to drive other cars. We'd need an engineering degree just to drive. These same things apply to complex components in SE. The code that uses a Car object shouldn't need to know a billion things about how it works in order to use it, if what the Car is supposed to do is SIMPLER than how it does it (which is virtually always the case).
Comment: Thanks for your answer, but could you give me a specific example why dealing directly data is not a good decision?
Answer: In an object oriented language, you have objects. Often many objects. And these objects have state, each one of them has its own state, different from any other object's state.
Problem: How would you store the state for each object? You would use instance variables, of course.
If you don't have any objects with state, for example if all your strings don't actually contain any text, all your 3D-coordinates don't have coordinates and so on, then you don't need instance variables.
Answer: Take an example of the way tying shoe laces would be implemented in OO:
There is a PairOfShoelaces class. It is responsible for tying itself, so it needs a reference to a PairOfHands class that it can use to help it do this.
Now you could have a function in PairOfShoeLaces called tieABowInYourself and it could take an instance of PairOfHands as a parameter:
function tieABowInYourself(PairOfHands hands) ...

But that means the thing calling tieABowInYourself needs to have a pair of hands laying around that it can supply as a parameter. Instead, an instance variable can be used to save away those hands inside an instance of PairOfShoeLaces. That way the function can be:
constructor(PairOfHands hands)
{
    this.hands = hands;
}

function tieABowInYourself()
{
    // use this.hands to help tie that bow
}

That way, only the thing that creates PairOfShoelaces need know about the hands.
And that is what instance variables are used for.
Answer: Create a class Point2D. Now create one instance for the point (x=50, y=100) and another instance for the point (x = -20, y = 70).
And now do this without instance variables. Good luck.


Error Logging for C#

Question: I was previously using Sentry for maintaining error logs on my C# application.
I want to switch to something that is downloadable since I have some sensitive data. Is there any error logging software like sentry but can be hosted by me?
Thanks in advance!
Answer: If you are already familiar with using sentry then you can install it on you own server: https://github.com/getsentry
Answer: for C# use sentry client: https://github.com/getsentry/raven-csharp
also today I fix ssl problem for it: https://github.com/getsentry/raven-csharp/pull/52
Answer: Elmah (Error Logging Modules and Handlers) is good for this.
It is very easy to set up. There are various Nuget packages for different storage options. The most basic is to store the files in XML in the application's App_Data folder. Then you can configure access to the pretty web interface via the web.config.
Scott Hanselman has an old but good write-up on it too.
Comment: Can Elmah be used for windows forms application?
Comment: I think you can with a bit of ingenuity. There's a discussion of various approaches [in answers to this other question](http://stackoverflow.com/questions/841451/using-elmah-in-a-console-application).

Error Logging for C#


What are the minimum number of words needed to express any complex thought?

Question: Most of the words in English are just quicker ways to express things that otherwise needs many words to describe. So, what is the minimum number of words or smallest dictionary that one can use to describe any thought they have? I have looked into Charles Kay Ogden's Basic English. But, I also read that many linguists do not like the word choices of Basic English (Why?)
Comment: Toki Pona is a conlang constructed with the goal of having a pretty minimal vocabulary from which other concepts must be derived. It is estimated as having around 123 root morphemes. By all accounts it takes quite a lot of getting used to to be able to communicate with any degree of effectiveness in it
Comment: Where to start? First, there are lots of languages without what English speakers call "words". Second, there is no way to count real English words; they vary a lot -- is "cuss" the same as "curse'? Is COPD one word or four? Third, concepts are even harder to count - how many types of emotion are there? And are there words for them all? And how many complex thoughts are there? Alas, it doesn't work that way. A language is a shared set of habits, not a spreadsheet.
Answer: I don't like it because there's no word for giraffe, salmon, reindeer, four or angstrom. I tried a few two- or three-word expressions that might describe giraffe, but there was nothing satisfactory. It is so much simpler to just add a word "giraffe", but that apparently violates a rule of the system that the lexicon is completely closed – a very unnatural state of affairs for a language, or for human cognition. It's not just that there are many words needed to describe giraffe, it's that there is a conventionalized and precise description available in that one word. Please don't get me started on numbers.
The more important question is, why would one do this in the first place? You only need 26 "words", – a, b, c, d...z and with combinations of those "words" you can form any existing English word (and a number that don't exist). True, the semantics of this much "simpler" system is worse than the semantics of Ogden's simplified system, but isn't the goal to reduce the size of the lexicon at the expense of all else? However, if the goal is simply to identify the most useful 850 words to know if you're learning English, it's not so bad, but still there are a bunch of words that you need to know, like "police, arrest, court, jail".
Comment: I like your answer, but the point is not to make a language that is simple to use. It is to make a language that will be hard to use but nevertheless can express complex thought.
Comment: It's easy to make a language that's hard to use, but impossible to prove it can express complex thought. Because complex thought can't be observed.


dual boot MSI GS-60 with ubuntu and windows

Question: Hi I have bought a notebook MSI GS60-6QE16H11 Ghost 15,6" 4K-UHD / Intel Core i7-6700HQ / 16GB / Hybrid 1128GB / GTX 970M / Win 10. And I want to have dual boot with ubuntu 14.04 or 15.10 but I can not achieve it. I have installed windows in the SSD hard disk, and ubuntu 15.10 in the HDD. The WI-FI does not work in the ubuntu. When I install NVIDIA drivers or bumblebee then ubuntu does not work,(it shows black screen or purple). I have searched in forums but non of the "solved" issues works. Can somebody help me?
Comment: I'm sure if you google each individual driver, you'd find a compatible driver. I know it's not the answer you want, but it's the only one that may actually work. The ubuntu software repository doesn't always provide the latest drivers for all known hardware, sadly.
Answer: If you only get a black screen after installing nvidia proprietary driver try this:

when in grub, select your default boot option (should be named Ubuntu) and press "e"
search for a line with "quiet splash"
delete "quiet" and "splash" and instead add "intel.idle_max.cstate=1"
press "F10"
enjoy a working Ubuntu or post what error you got

Also see this thread: Getting Ubuntu working properly on MSI GE62 6QF


Centralizer of $Inn(G)$ in $Aut(G)$

Question: Can the centralizer of Inn(G) in Aut(G), where G is preferably any non-abelian finite one, equal to Inn(G) itself? Clearly, such centralizer contains all $f$ in Aut(G) where $f(g)g^{-1}$ are in Z(G).
Comment: No, the argument is fairly involved :-).  I didn't want to post the link because you said you wanted to work on it.  The relevant paper is www.maths.otago.ac.nz/home/downloads/john_curran/CommAlg.pdf
Comment: Such a group would either be trivial, cyclic of order 2, or nilpotent of class exactly two. I'll work on it a bit later today.
Comment: For p-groups, it is a necessary and sufficient condition that $Z(G)=G'$ and is cyclic. Thus, extra-special groups satisfy your question. For general groups, $G/Z(G)$ would be abelian, hence $G$ is nilpotent of class $\le2$, and so we need the above condition for p-groups to hold in each Sylow.
Comment: @Steve: I'm sure this is something I should be able to do, but I confess I'm stuck (I can get sufficiency, but only via what I suspect is a ridiculously complicated argument). Could you sketch (or post) the equivalence for $p$-groups?
Comment: @Steve: Ah, well, that explains it. (-: Interestingly, I think my argument for the sufficiency may be somewhat different from theirs; it came down to the Chinese Remainder Theorem...
Answer: To summarize (thanks to Steve D. for the article pointer):
If $G$ is a group, an automorphism $\sigma\in\mathrm{Aut}(G)$ is said to be a "central automorphism" if $\sigma$ commutes with every automorphism in $\mathrm{Inn}(G)$, or equivalently if $\sigma(g)g^{-1}\in Z(G)$ for all $g\in G$. The central automorphisms form a normal subgroup of $\mathrm{Aut}(G)$, denoted by $\mathrm{Aut}_c(G)$.
You are asking for examples with $\mathrm{Inn}(G)=\mathrm{Aut}_c(G)$. In particular, this requires $\mathrm{Inn}(G)\cong G/Z(G)$ to be abelian, hence $G$ is nilpotent of class at most $2$.
Case 1. $G$ abelian.
If $G$ is abelian, then $\mathrm{Inn}(G)=\{1\}$ and $\mathrm{Aut}_c(G)=\mathrm{Aut}(G)$. For the equality between the group of central automorphisms and inner automorphisms to hold, we would need the group of automorphisms to be trivial. If $G$ is finite, the only possibilities are $|G|=1$ and $|G|=2$. As was recently discussed in this very forum, whether there are any infinite abelian groups with this property depends on your Set Theory. If we assume the Axiom of Choice (in fact, weaker axioms are sufficient here), then there are no infinite abelian examples. But there are models of $ZF$ without choice where there are such infinite groups, as Asaf Karagila showed in that question.
Case 2. Finite nonabelian groups.
Moving on to groups of nilpotency class exactly $2$. A finite nilpotent group is the products of its Sylow $p$-subgroups, which are characteristic and have no nontrivial homomorphisms between them; so the group of automorphisms of a finite nilpotent group naturally breaks up into a product of automorphisms groups of $p$-groups. Thus, the problem reduces to characterizing the finite $p$-groups of nilpotency class two in which every central automorphism is inner. A theorem of M.J. Curran and D.J. McCaughan (Central automorphisms that are almost inner, Comm. Algebra 29 (no. 5), 2081-2087, 2001) completely solves the problem then:
Theorem. If $G$ if a finite nonabelian p-group, then $\mathrm{Aut}_c(G)=\mathrm{Inn}(G)$ if and only if $G'=Z(G)$ and $Z(G)$ is cyclic.
There are many examples of such groups: all nonabelian groups of order $p^3$, all extra-special $p$-groups, etc.
So a finite group satisfies the condition if and only:

$G$ is trivial; or
$G$ is a direct product of its Sylow $p$-subgroups, $Z(G)=G'$ and $Z(G)$ is cyclic; or
$G\cong C_2\times H$, where $C_2$ is the cyclic group of order two, and $H$ is a group of odd order of types 1 or 2.

Case 3. Infinite nonabelian groups. I can't answer it completely, except to say that examples certainly exist.
This one seems more complicated; I'll take a look at the Curran-MacCaughan paper later on, but there are certainly examples with $G'=Z(G)$ cyclic. For example, consider the relatively free nilpotent group of class $2$. This is
$$F = \Bigl\langle x,y\Bigm| [x,y,x]=[x,y,y]=1\Bigr\rangle,$$
and is isomorphic to the group of $3\times 3$ upper triangular matrices with integer coefficients and $1$s in the diagonal, by the map that sends $x$ to $I+E_{12}$ and $y$ to $I+E_{21}$.  Every element has normal form $x^ay^b[y,x]^c$ with $a,b,c\in\mathbb{Z}$, and multiplication given by
$$(x^ay^b[y,c]^c)(x^{\alpha}y^{\beta}|[y,x]^{\delta}) = x^{a+\alpha}y^{b+\beta}[y,x]^{c+\delta+\alpha b}.$$
Any two elements of $F$ determine an endomorphism by mapping $x$ to the first element and $y$ to the second; thus, the automorphisms of $F$ correspond to maps of the form
$$\begin{align*}
x &\longmapsto x^a y^b [y,x]^{k}\\
y &\longmapsto x^c y^d [y,x]^{\ell}
\end{align*}$$
with $ad-bc = \pm 1$. An inner automorphism given by conjugation by $x^ry^s$ maps $x$ to $x[x,x^ry^s] = x[y,x]^{-s}$ and $y$ to $y[y,x^ry^s]=y[y,x]^r$. Thus, inner automorphisms correspond to $b=c=0$ and $a=d=1$.
If an automorphism of $F$ is central, then $(x^ay^b[y,x]^k)x^{-1} = x^{a-1}y^b[y,x]^{k-b}$ and $(x^cy^d[y,x]^{\ell})y^{-1}=x^cy^{d-1}[y,x]^{\ell}$ are both central; since the center is the commutator subgroup, this requires $a-1=b=c=d-1=0$, showing that the automorphism is inner. Hence $\mathrm{Inn}(F)=\mathrm{Aut}_c(F)$.
I think that the conditions $G'=Z(G)$ and $Z(G)$ cyclic will still be at least sufficient in the infinite case.
Comment: @Babak, @Jack: I'm pretty sure I can prove that if $G/Z(G)$ is a direct sum of cyclic groups, and $G'=Z(G)$ is cyclic, then the condition holds for $G$. Don't know what happens if $G/Z(G)$ is more complicated, and I haven't thought about the converse yet. Babak: you never said if your interest was mainly finite groups (in which case we are done), or any group; if infinite groups hold particular interest, I'll make a point of double-checking and posting. If not... then I'll do it if I get a chance or a breakthrough. (-:
Comment: The finite group conclusion is a tiny bit more complicated: If G has finite odd order, then 2×G works iff G works.  Irritatingly, Z(2×G) = 2×Z(G) = 2×G′ ≠ (2×G)' = 1×G′.
Comment: @Jack: Ah, good catch. Thanks. The theorem should also say "nonabelian", since $C_2$ does not satisfy the condition.
Answer: I was fiddling with this, but never had time to finish.  Maybe it is interesting to someone.

We define two bijections that help to describe the centralizer of the inner automorphism group in the full automorphism group.

exp : Hom(G,Z(G)) → CAut(G)(Inn(G)) : ζ ↦ ( g ↦ gζ(g) )
log : CAut(G)(Inn(G)) → Hom(G,Z(G)) : φ ↦ ( g ↦ g−1 φ(g) )

We need to show these are well-defined (that is they have the specified ranges).
Proof: If ζ is a homomorphism from G to Z(G), then exp(ζ) : G → G : g ↦ gζ(g) is indeed an automorphism, with inverse exp(−ζ) defined by −ζ, the homomorphism from G to Z(G) that takes g to ζ(g)−1.  The inner automorphism defined by h takes g to h−1gh = gh.  If one applies exp(ζ) and then conjugation by h, one gets ghζ(g), since ζ(g) is central and so ζ(g)h = ζ(g).  On the other hand, if one conjugates by h and then applies exp(ζ), then one gets ghζ(gh), but since ζ is a homomorphism into an abelian group, ζ is constant on conjugacy classes, and ghζ(gh) = ghζ(g).  Hence every exp(ζ) is in CAut(G)(Inn(G)).  Conversely, if φ is an automorphism of G commuting with all inner automorphisms, then φ(x)φ(h) = φ(xh) = φ(x)h, so φ(h) and h define the same automorphism of G, and so φ(h) and h differ by some element of the center of G.  Define log(φ):G→Z(G) implicitly from φ(h) = h log(φ)(h).  It is not hard to check that log(φ) is a homomorphism from G to Z(G).
Notice that log(exp(ζ)) = ζ and exp(log(φ))=φ, so these are mutually inverse bijections.

Suppose then that Inn(G) = CAut(G)(Inn(G)).  This means that exp(Hom(G,Z(G))) = Inn(G).  This means that log : Inn(G) → Hom(G,Z(G)) is bijective!  However, log(∧h) = ( g ↦ [g,h] ) has a very simple form for the inner automorphism ∧h defined by conjugation by h.  In particular, [G,G] ≤ Z(G) for log(∧h) to even make sense, and so G has nilpotency class at most 2.  Notice that the kernel of log(∧h) contains all of Z(G), for any h.  Indeed, the kernel of log(∧h) is CG(h), and so all centralizers are normal, which is weird.
Another sick thing: log(∧hk)(g) = [g,hk] = [g,k][g,h] = [g,h][g,k] = (log(∧h) + log(∧k))(g), so in fact log is an isomorphism of abelian groups G/Z(G) ≅ Hom(G,Z(G)).
Unfortunately, I cannot find a good element of Hom(G,Z(G)).  The transfer is useless, and the central series induction arguments give inequalities pointing the wrong way.
For finite groups, presumably this is taken care of by counting as in theorem 1 of:

Sanders, P. R.
  "The central automorphisms of a finite group."
  J. London Math. Soc. 44 (1969) 225–228.
  MR248208
  DOI:10.1112/jlms/s1-44.1.225

but it didn't seem to address infinite (nilpotent) groups.  The way it is done in this (very nice) paper mentioned by Steve certainly doesn't work out for infinite groups.  In particular, Lemma I would be wonderful to have more concretely with homomorphisms rather than dualizing finite abelian groups a zillion times.

Curran, M. J.; McCaughan, D. J.
  "Central automorphisms that are almost inner."
  Comm. Algebra 29 (2001), no. 5, 2081–2087.
  MR1837963
  DOI:10.1081/AGB-100002170
Answer: Yes, this can for instance happen when $Inn(G) = Aut(G)$ which is the case for the symmetric groups $S_n$ when $n\neq 6$
Comment: This doesn't work unless $\mathrm{Aut}(G)$ *also* happens to be abelian; for $G=S_n$, $n\neq 6$, you have that the centralizer of $\mathrm{Inn}(G)$ in $\mathrm{Aut}(G)$ is $Z(S_n)$, which is trivial for $n\gt 2$.
Comment: In other words: I think you misread the question as asking whether you can have $C_{\mathrm{Aut}(G)}(\mathrm{Inn}(G))$ can equal $C_{\mathrm{Inn}(G)}(\mathrm{Inn}(G)) = Z(\mathrm{Inn}(G))$, instead of the question which is whether you can have $C_{\mathrm{Aut}(G)}(\mathrm{Inn}(G)) = \mathrm{Inn}(G)$.
Comment: @Babak: $Q_8$ satisfies the conditions given by Steve: it has center equal to the commutator subgroup and cyclic.
Comment: @Arturo: Dear Arturo, I am thinknig of Q_8 of order 8, wherein Inn(G)=V.
Comment: I don't know why your answer didnn't get any attentions. Sorry Tobias! Thanks for the time you took for the answer.

Centralizer of $Inn(G)$ in $Aut(G)$


Why does /trigger have no objectives/commands after installing a datapack that has /trigger commands?

Question: Disclaimer: I know this is similar to a previous question I asked that is related to this issue, but it was a bit too specific, and I've decided to ask a more general/focused question this time in the hopes of getting a concise/working answer.
I recently noticed that a major issue arises when trying to use datapacks from the website Vanilla Tweaks (a website that hosts a multitude of datapacks that add small changes to the normal minecraft vanilla experience, hence the name - they're mostly rather small datapacks that aren't game-changing - more like plugins rather than mods.) on a specific 1.14 world (what I mean is not one specific world, but rather a world that has unique modifiers to it - in this case, it was converted from 1 version to another).
I didn't want to make the title any more confusing, but I still wanted to address that this is not a normal 1.14 world ("normal" meaning any sort of world that was created while playing in vanilla 1.14 and nothing else), but rather has these modifiers:

The world was created in vanilla 1.8.9. (meaning this would be a "normal" 1.8.9 world, in a sense)

No world settings were changed, other than setting the default gamemode to Creative Mode (which automatically enabled cheats) and changing the seed (normal world type, no additional changes).

The seed used was "StackExchange" (just as a test seed). Numerical seed is 655809707.

After creating the world, the world was converted to minecraft version 1.14.4 (vanilla) with no other alterations. (this was done by saving/quitting the world, relogging with ver. vanilla 1.14.4, and then joining into the world again)

After doing this, I then installed a datapack that required a /trigger command to use (essentially forcing the player to do /trigger [objective in datapack] in order to actually enable the datapack and/or toggle settings), and when entering /trigger, there were no objectives listed.
The datapack was recognized by minecraft itself, as it was shown in /datapack list.
I know that this was not supposed to happen, as after making a normal 1.14 world and applying the exact same settings and the exact same datapack, the /trigger command for the specific datapack was working perfectly fine.
I had also converted a world from 1.12.2 to 1.14.4, and /trigger commands were also working fine.
So, I can only think that there is some issue that occurs when converting a 1.8 world into 1.13 or higher (since it wasn't working for 1.14, I can assume that it would also not work for 1.13). My question is, is there a way to fix this issue on a world that was already converted from 1.8 to 1.13+?
It might be nice to also know a way to prevent this issue from occuring before converting a world, but I already have a rather-developed world that has this issue (which was converted from 1.8 to 1.14), and I hopefully want to find a way to make it so I can still use datapacks on that world. Thank you, and I appreciate any help I can get!
Link to VanillaTweaks datapacks (datapack I used was Coordinates HUD, for 1.14): https://vanillatweaks.net/picker/datapacks/
The world before converting to 1.14.4 (world version - 1.8.9): https://www.mediafire.com/file/8p1emc348isw0v6/file
The world after converting to 1.14.4, includes mentioned datapack (world version - 1.14.4): https://www.mediafire.com/file/jr2z8mcgywlx80v/file
Comment: If more information is needed or if I need to supply images, please let me know and I'll add them.
Answer: Make sure all the trigger objectives are all enabled.  I also suggest reinstalling the datapack.  This may fix it but to know I would have to have your world.  I hope this helps.


How to test a Bloom filter?

Question: I am currently working on a Bloom filter implementation. I was wondering how can I test such a data structure since a Bloom filter is probabilistic in nature, I guess . I want to unit test and also test for false positives. in particular how can I unit test the filter methods (add/contains) and how can I verify that false positives are below a certain percent?
Comment: Are the hash functions used in your filter selectable?
Comment: Possible duplicate of [What are best practices for testing programs with stochastic behavior?](https://softwareengineering.stackexchange.com/questions/170392/what-are-best-practices-for-testing-programs-with-stochastic-behavior)
Comment: It is possible to use a very large set of random input, that is not generated (i.e. fixed random), for which you have previously computed the correct answer in some way.
Answer: False positives are possible in a bloom filter. So having one isn't a failure. You can test for many other things but this is asking the impossible.
You could set a threshold that you expect the false positives to be under but that requires enough trials that the test stops being fast.
Comment: @CandiedOrange I'd try hard to separate testing the Bloom filter (which I think is doable if you can mock out the hash functions) from testing the behaviour of the hash functions themselves, which I agree is a hard problem.
Comment: ...or a deterministic unit test.  It's still possible for the test to fail, even with a threshold set.
Comment: @RobertHarvey Well, kinda. You could use the same data in the test every time trying to make it deterministic. But then the implementation becomes the source of random making it fail or pass based on arbitrary implementation choices that aren't actually wrong, just unlucky.

How to test a Bloom filter?


GME - Difference in Turn Angle and Bearing

Question: When using the movement.pathmetrics tool in GME, I get an out put table of turn angle and bearing. Can someone clarify as to what the difference between the turn angle and the bearing field is?
Answer: As it is described in the documentation,

This tool calculates turn angles, step lengths, bearings, and time
  intervals for a point time series dataset. The turn angle is based on
  the point sequence p(t-1), p(t), p(t+1); the step lengths, bearings
  and time intervals are based on the sequence p(t), p(t+1). Thus, a
  NoData value (-999) will be written for the first and last turn angles
  in a point series, and for the last step length, bearing and time
  interval records. These NoData values should obviously not be included
  in subsequent analyses.

In other words, the turn angle, is essentially, the angle between path segments (sometimes referred to as sweep angle) and the bearing is the direction of the segment.


Any work on the Adams-Watters triangle?

Question: Does anyone know whether any arithmetical or asymptotic results have been obtained about the Adams-Watters triangle?
Comment: I upvoted your question to balance out whoever voted it down.  Thanks for adding the comment in which you added context and detail to the question.  (I had no idea what you were talking about in your initial post.)
Answer: There seems to be no response to this, but perhaps somebody knows something about it in another terminology.
Franklin T. Adams-Watters defined a triangle similar to Pascal's, but where the latter has
c = a + b between and under a and b, Adams-Watters takes c = (a+b)/gcd(a,b). The first few
rows look like this:
<code>                      1
                    1   1
                  1   2   1
                1   3   3   1
              1   4   2   4   1
            1   5   3   3   5   1
          1   6   8   2   8   6   1
        1   7   7   5   5   7   7   1
      1   8   2  12   2   12  2   8   1
</code>
Adams-Watters summed the rows and obtained a sequence a(n) which is numbered A125606 in the OEIS database. He conjectures that log(a(n))/n tends to log(2*zeta(3)/zeta(2)). That was what I meant when I asked about asymptotic information. (The analogous limit is log(2) for Pascal's triangle, of course)
I am actually more interested in whether the Adams-Watters triangle has any nontrivial arithmetic structure. When you add a and b, the sum is trivially divisible by gcd(a,b),
so the operation (a+b)/gcd(a,b) removes this trivial information. Pascal's triangle has a lot of arithmetic structure, but I did not see any when I factored the entries in the A-W triangle out to the fiftieth row. Perhaps dividing by the gcd leaves nothing, or maybe I didn't think about it the right way.
Two caveats: The little piece above is not enough to see what happens. For example, the
twelfth row is the first that has both odd and even entries (apart from the 1s). Also there seems no reason to think that the A-W triangle has any combinatorial significance.
Comment: This is really obscure.  There are no Google scholar hits and **this post** is the first Google hit.
Comment: I'm assuming you mean log(a(n))/n tends to log(2*zeta(3)/zeta(2)), or a(n)^(1/n) tends to 2*zeta(3)/zeta(2).

In any case, this doesn't seem to be all that reasonable; looking at the sums of the first 1000 rows, a(n)^(1/n) seems to fluctuate around 1.55 or so, while 2*zeta(3)/zeta(2) = 1.46.  Barring some theoretical reason to expect an expression having this general form, I have trouble believing this conjecture.
Comment: Thanks for spotting the missing log. I never tried to check the asymptotics myself; I just factorized entries, looking for patterns.

I agree that this may seem a bit obscure, but I suspect that the operation (a+b)/gcd(a,b) has arithmetic significance, because of the dividing away the trivial information. In fact I began from this quotient and found what Adams-Watters had done by searching OEIS with likely sequences.
Comment: If we call the table entries $A(n,k)$, with the same numbering conventions as for Pascal's triangle, then the sequence $A(n,2)$ (which goes $1,3,2,3,8,7,2,\dots$) is A131134 in the Online Encyclopedia, http://www.research.att.com/~njas/sequences/A131134, but there's no significant information there other than the first 69 terms. Still, that list of terms raises some questions. $A(28,2)=88$, but $A(30,2)=2$; $A(36,2)=108$, but $A(37,2)=4$. $A(n,2)$ is unbounded above since if $p$ is prime then $A(p,2)\ge p$ or $A(p+1,2)>p$. But does $A(n,2)$ go to infinity?

Any work on the Adams-Watters triangle?


2001 Honda Shadow VT1100C2 Gears will only shift into 1st and 2nd

Question: The CAM, GEARSHIFT will only turn 2 times. There are Five gears, And the gears on go into 1st and 2nd. The gears are very hard to shift into.
Comment: More information would be most helpful. When did this start happening? Have you checked anything?
Answer: There are a few root causes for you consider

Bent shift fork(s) - Your shift forks slide various gears along your primary and secondary shafts of your transmission.  Every time you depress or raise your shift lever with your foot you are turning a drum called a 'shift drum'  This drum has grooves on cut into it that move the shift forks along a shaft and move the gears to engage or disengage them.  If you had a particularly poor shift a gears dogs or slots can bounce off one another forcing the shift fork to bend as a result.  A bent shift fork requires the engine cases to be split in order to to remove them and resolve the issue.
Broken shift drum - A broken shift drum, in any way, is a very rare occurrence.  The shift drum spins and has grooves cut into it to slide shift forks back and forth to slide gears along transmission shafts.

Issue with Shift Linkage - You could very likely have an issue with your shift linkage.  Many times, the return spring for the shift lever will wear out and eventually break.  You can validate by putting your rear wheel in the air in order to spin it and try and operate the shifter by hand while spinning the wheel.  If the shift lever is not returning to it's original place properly you can dig into it further to discover the cause.


How do I make a shortcut for a Perl program under Windows using a batch file?

Question: I'm trying to "hide" some of my Perl program from the end user to make things easier on them. I'm doing what I can to keep them out of the command prompt. The program itself has a GUI designed in Perl/Tk, so they don't have to worry about the command prompt.
Could I write out a quick batch file that goes along the lines of:
START perl 'C:\[some path here]\myscript.pl'

with START to start a program, the Perl interpretor as my program, and the path/name of my Perl script as the parameter?
Would I have to specify where to find perl or would Windows just know because perl is in the computer's PATH variable?
Answer: I have a totally evil VBS script and batch file to deal with this kind of thing with Strawberry Perl Portable. The VBS script runs the batch file without spawning a cmd window. The batch file works out where it is, where perl.exe is relative to it, and runs the perl script.  In this case it's to run a Catalyst server, but can be used for anything else too.
Here's the vbs (shudder):
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) &  fso.GetParentFolderName(wscript.ScriptFullName) & "\perlshell.bat"& Chr(34), 0
Set WshShell = Nothing

And here's the batch script (only slightly less shudder):
echo off
set bindir=%~dp0
set perlpath=%bindir%perl\bin
set buildpath=%bindir%\bin
set PATH=%PATH%;%perlpath%;%buildpath%
"%perlpath%\wperl.exe" "%bindir%MyPhp\script\myphp_server.pl" -p 35900

Answer: you don't need "start" for this. either add perl.exe from your path or specify the full path to the perl interpreter.
so ... put this in your batch file:
c:\program files\perl.exe "c:\whatever\myscript.perl"

-don
Answer: If the idea is to keep them away from the command line, why use a batch file at all?  Why not just make a shortcut?  (You could use Win32::Shortcut if you don't want to make one by hand.)
Answer: There's an easier way. For windows:
Go to the desktop -> right click -> create a shortcut

make your target look like (i.e. the path to the perl.exe file) something like the following - I'll show you what mine looks like
C:\Strawberry\perl\bin\perl.exe

In my case I have Strawberry Perl installed
right click desktop shortcut -> click properties

In the target input box, alter it to look something like mine:
C:\Strawberry\perl\bin\perl.exe D:\Developer\CustomTools\login.pl

where login.pl is the absolute path to my perl script
from there you should have a shortcut created to allow execution of a perl script.
In case you might be interested:
in the properties popup you can also assign this invocation of the perl script to a keyboard button press and assign it a shortcut key to launch anytime ^_^
For me, I chose to do:
ctrl+alt+i

to stand for login - to invoke the login.pl script I wrote. be aware of default system keyboard combinations
If you have any questions, let me know!
Thanks for you time!


What are the sub-types of the Zoans and fighting styles?

Question: What are the sub types of the Zoans and fighting styles? I've been searching for lists but haven't seen any.
Comment: What is meant by 'sub types'? I initially thought you were asking for the 'series' which refers to the common prefixes for different models of similar fruit (e.g. ushi ushi no mi, model: giraffe and ushi ushi no mi, model: bison are both part of the ushi ushi no mi (Ox Ox fruit) series). But this could also refer to 'sub-classes' of zoan fruit which includes the basic ones, ancient zoans, mythical zoans, etc. Also what does fighting style mean? Most zoan users don't have a named fighting style / use one independent of their fruit (e.g. Mr. 2's Okama Kenpo is not reliant on his devil fruit)
Answer: You can find the subtypes of zoan type devil fruits here.
Though for fighting styles you will have to go to individual wiki pages of the devil fruits to see that as a user can have a specific fighting style that he combines with his devil fruit, be it any type.
For example though it is not a zoan type devil fruit fighting style of Ace and Sabo is completely different for the Mera Mera no Mi. Same applies for the Zoan type DF. So I would suggest to go to the link mentioned above which also has list of devil fruits and read it for yourself.
Answer: From how far I am, not totally sure, but the Zoan fruits are supposed to where you can turn into a certain animal. how they fight depends on what you get.