What if bitcoin has a bug?

Question: If a fundamental bug is found in bitcoin does that mean that the only way to patch it would be a hard fork? I'm confused at how this software that only has one version is running for 10 years without even a bug?
Comment: There've been lots of bugs, some of which are fixed via a softfork.
Comment: Indeed, https://en.bitcoin.it/wiki/Value_overflow_incident describes such a fork that actually did happen in 2010.
Answer:
If a fundamental bug is found in bitcoin

Bitcoin is mainly two things

A set of Network protocols and associated rules by which Bitcoin wallets can interact with each other and by which mining software can interoperate with other bitcoin software.

A reference implementation of a Bitcoin wallet. This is the "bitcoin core" software application.

Network Protocol
Exploitable weaknesses in the network protocols and rules can be fixed by a soft fork which changes or extends the protocols or rules.
Software

this software that only has one version is running for 10 years without even a bug?

See the release notes for bitcoin core
for example, the notes for 14.3 include

Denial-of-Service vulnerability CVE-2018-17144 ——————————-
A denial-of-service vulnerability exploitable by miners has been discovered in Bitcoin Core versions 0.14.0 up to 0.16.2. It is recommended to upgrade any of the vulnerable versions to 0.14.3, 0.15.2 or 0.16.3 as soon as possible.

Other implementations (e.g. Electrum) also have exploitable flaws discovered and fixed from time to time.
Answer: It does not necessarily have to be a hard fork.
The only way to update or fix an issue in Bitcoin is to push out updated node software, with an update protocol definition. However, not all changes to the protocol result in a hardfork - many can be, and have been, achieved by way of softforks, which are "backwards compatible" in some ways, allowing nodes running certain previous versions to continue to connect to and participate in the network.
The value overflow incident mentioned in the comments is one such example of a
soft fork performed to fix a bug. Segwit is another example of a soft fork, this time used to perform an upgrade. There have been many such events over the last 10 years, and we certainly aren't still running the origin Bitcoin code provided by Satoshi.

What if bitcoin has a bug?


Does a simple pendulum have some radial acceleration at its extreme positions where its speed becomes zero?

Question: Suppose we have a simple pendulum swinging between two extreme positions. At the extreme position its speed becomes zero. As per this reason can I say that at extreme positions radial acceleration (v^2/r) is zero so tension in the string has to be equal and opposite to the mgcos☆ , where angle ☆ is angular position of the pendulum bob from the vertical. Then at this instant can I add that mgsin☆ is the resultant of tension T and gravitational pull (mg). Am I correct in saying that there is no radial  acceleration at extreme positions or I have misunderstood something?
Comment: Try to use math notation in your post. Enclose math expressions in dollar signs such that `$1 + \sin \theta$` renders like $1 + \sin \theta$.
Answer: Yes you are right - although you may have made a sin/cos error or defined angles differently than me. Since the velocity/angular velocity is zero, the tension in the string doesn't need to pull against the centrifugal force to keep the pendulum along the correct path. It only needs to counteract the extent to which gravity is pulling it on it's path. If $\theta$ is the angle the string is from vertical, then $mg\cos(\theta)$ is the component of gravity in the direction parallel to the string - so that's also the tension in the string. The string provides tension such that the ball at the end of the string doesn't accelerate away from the string.
Answer: No, the nature of the string or rope of the pendulum means constant length, and this translates to zero radial acceleration.
Suppose that wasn't the case and you had the coordinates of the mass described by the radial distance $r$ and angle $\theta$
$$\begin{aligned}
 x & = r \sin \theta \\
 y & = -r \cos \theta
\end{aligned}$$
by direct differentiation you get the following expression of the acceleration of the mass
$$\begin{aligned}
 \ddot{x} & = (r \ddot{\theta}+2 \dot{r} \dot{\theta}) \cos \theta + (\ddot{r}-r \dot{\theta}^2) \sin \theta \\
 \ddot{y} & = (r \ddot{\theta}+2 \dot{r} \dot{\theta}) \sin \theta + (\ddot{r}-r \dot{\theta}^2) \cos \theta
\end{aligned}$$
Consider the balance of forces with tension $T$ and weight $W= m g$ you have
$$\begin{aligned}
-T \sin \theta & = m \ddot{x} \\
T \cos \theta - m g & = m \ddot{y}
\end{aligned}$$
With solution
$$ \begin{aligned}
 \ddot{r} &= g \cos \theta - \frac{T - m r \dot{\theta}^2}{m} \\
 \ddot{\theta} & = -\frac{g \sin \theta}{r} - \frac{2 \dot{r} \dot{\theta}}{r}
\end{aligned}$$
with your question now is $\ddot{r}$ zero or not.
The answer has to do with the nature of $T$. The above equations are what you have if the string has elasticity and tension is a function of radial position $T = k ( r - \ell)$. This would result in an oscillation of $r$ around some equilibrium deflection.
But a simplification exists here as this oscillation would occur much faster than the swinging of the pendulum (stiffness $k \gg m \dot{\theta}^2$) and it settles to a value of $r = \ell$. For lower values of stiffness, this value is a bit higher, but we can assume infinite stiffness for now and that the string is inextensible.
The value of tension $T$ is exactly what is needed to keep the
string inextensible and thus, $\dot{r}=0$
Now the result of the equations of motion can be used to find the tension $T$ when we can assume $r=\ell$ and thus $\dot{r}=0$ and $\ddot{r}=0$
$$\begin{aligned}
T & = m g \cos \theta + m \ell \dot{\theta}^2 \\
\ddot{\theta} &= -\frac{g}{\ell} \sin \theta
\end{aligned}$$
If at the lowest point the mass as speed $v_0 = r \dot{\theta}_0$ then the maximum angle is found from integration of the second equation as
$$ \cos \theta_{\rm max} = 1 - \frac{v_0^2}{2 g \ell} $$
At that instant, with $\dot{\theta}=0$ the solution is
$$\begin{aligned}
 T &= m \left( g - \frac{v_0^2}{2 \ell} \right) \\
 \ddot{\theta} &= -\frac{v_0}{\ell} \sqrt{ \frac{g}{\ell} - \left( \frac{v_0}{2 \ell} \right)^2}
\end{aligned}$$
Neither of which is zero. Also, note that the tension at this moment is always less than the tension on the bottom of the stroke which is $T_{\rm max} = m g + \frac{m v_0^2}{\ell}$
In summary, if we ignore the elastic properties of the string then we must assume constant length and thus zero radial acceleration at all times.
But if we include the effects of stiffness then you have a more complex 2-DOF oscillator with the pendulum swinging to and from and at the same time the radial position stretching and contracting with a different frequency.


Compile an ActionScript class that is in a package to a swf using Flex Builder 3

Question: How do I configure an ActionScript Project in Flex Builder 3 Pro so that I can compile an ActionScript class that is part of a package into a swf.  For example, the class that I want to compile to swf is:
<code>package utils {
    import flash.display.Sprite;
    public class Tool extends Sprite {
        public function Tool() {

    }
}
</code>
Take a directory structure like the following:
RootASProject
-RootASProject.mxml
-subASProject1
--subSubASProject1a
---IASModule.as
---ASModule.as
---ASModule.swf
--subSubASProject2
-utils
--ITool.as
--Tool.as
--Tool.fla
--Tool.swf
RootASProject is being produced by one developer, subASProject1 and subSubASProject1a by another developer, utils.Tool by yet another person.  This directory structure enables each person to independently build modules and other resources, and quickly test the entire product.  It is also important to note that these resources are loaded at runtime.  So, class definitions must be fully qualified. For example, Tool.swf contains/defines "utils.Tool" not "Tool".
Developing with just the Flash IDE, this directory structure is not a problem.  We create a Tool.fla and assign utils.Tool as it's Document Class then in the Flash IDE's Publish Setting, we set the class path to be NOT the current directory (.), but instead the RootASProject directory.  If it were set to the current directory, the error would be: A file found in a source-path must have the same package structure '', as the definition's package, 'utils'.   Tool    Tool.as.  We're familiar with this error message and so I recognize that the Flex IDE is by default looking in the current directory for a subfolder, utils, to match the packaged class.
In the Flex IDE, I can add the utils parent, RootASProject, as an additional source path, but I do not know how to stop flex from looking in the current directory first.
Using an ant build file, I can set the source path to RootASProject and the mxmlc is able to build utils/Tool.swf just fine.  Apparently, it uses just the source paths passed to it, and does not automatically look for utils in the current directory.
I know the problem is resolved by using Flash or Ant.  Ant is even preferred for larger  and automatic builds; however, during rapid debugging I'd really enjoy being able to stay within the Flex IDE to step through code using its debugger.
Answer: Your compilation error is unrelated to its use as a document class. Your directory structure needs to match your package in your clas. The simple solution is to create a folder called "utils" and move your Tool.as into that folder.
What you refer to as a "document" class is the base class of the exported symbol. Assuming your project is an ActionScript project and the above class is marked as your Application, then it should work as expected.
Answer: If you are using Flex Builder 3 or better, simply create a new ActionScript project by going File > New > ActionScript Project and assign your ITool.as file as the main Application file in it.


Is there a way to add a field to core feed aggregator for Drupal 7?

Question: When I click "Add feed", it only allows me to input the title and URL.  I am looking to fetch all the feeds into a single page.  Seems like the core aggregator is doing that just right. However I want to add a new field called "Name" to display who contributes the feeds. I looked into the feeds module but it breaks feeds into nodes instead of displaying all the feeds in a single node.  There is probably a way to do it with feeds module but I can't seem to work it out.
Answer: First of all I would expect the feed reader to aggregate the nodes into a feed, not drupal itself. Using feedburner or similar intermediate step you can add all manner of other stuff to your feed.
You can also use views to create feeds, might help you get the granularity you need. I think views 3 on D7 can do it natively, but you can certainly get modules for it: http://drupal.org/project/views_rss


How to implement DKIM for Domino mail server?

Question: I'd like to write a Domino servlet that will stamp outgoing mail with a DKIM domain keys signature.  We would generate the Domino mail server DKIM signature and put it in a TXT file with the DNS manager.  How can I stamp an outgoing message with the encryption key?  We would then add the DKIM signature to the header prior to releasing from mail.box.
Answer: Although requested by many, HTC Domino doesn't yet support DKIM nor DMARC. Implementing DKIM on Domino might not be as easy as writing a little servlet, as it involves canonicalization, computing hashes and signing them. After that, you'd have to add a signature header that has a strict format.
Although it's all documented in the RFC 6376, many things can go wrong. Therefore, I wouldn't recommend trying to write an own implementation for DKIM signing. On the other hand, if you did that and got it working, there's indeed a huge demand for this feature! Frankly, because you are asking this question on such an abstract level, you aren't quite there yet.
A more suitable solution might be setting up another SMTP server in front of the Domino server and configuring it to trust & DKIM stamp mail from Domino. There are e.g. many tutorials on how to achieve this with Postfix & OpenDKIM.
Comment: I would think I could implement openDKIM somehow so as not reinvent the wheel.  I have written lots of Java mail and mime handling scripts.  Canonicalization, computing hashes and singing are not difficult, just tedious.  I don't want to put an SMTP server in front of the Domino server.  I want a Domino solution, if I have to write it myself. ;-)


What are the colon and double forward-slash ( :// ) in URIs called?

Question: What are the colon and double forward-slash ( :// ) in URIs called?
Comment: You don't need to explicitly clarify that it's a "forward" slash. A "slash" is a "forward slash".
Answer: There is no special name for them.
The URL specification generally describes them using symbols and just names everything around them.

  URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

  hier-part   = "//" authority path-abempty
              / path-absolute
              / path-rootless
              / path-empty

At one point it does say:

The authority component is preceded by a double slash

… which is as close as it gets to giving // a name.
Comment: ...and the first colon separates the scheme. They aren't a single entity.
Comment: Can we make names for them then? How about the Schemer for the colon and Lash-Lash for the two slashes? :D


Looking for an old story about bicycles, clones, and heat-sucking plants

Question: Probably 30 years ago I read a story about a civil war.  At one point the protagonist rides a bicycle through a force-field to get to a valley and stop a government supply ship.  There is a sub-plot about clones and heat-sucking plants.
Ring any bells?
Comment: BTW--This is a fine example of how to write a story-id question. The title includes several significant features of the story and the text expands on that base by putting them into the context of *scenes* from the story. That kind of thing reduces much of the ambiguity that can creep into these questions if they are less carefully crafted.
Comment: Yes. A very good story, but I can remember neither author nor title just now. Off to my library...
Answer: "A Special Kind of Morning" by Gardner Dozois first published in New Dimenions in 1971.
I have copies in the anthologies Future War and The Best of New Dimensions.
It appears to be available as a e-publication from at least two sources.

The story is told from the perspective of an old man working as story teller on the street and relates his experiences as a foot soldier in a war that broke a world-wide totalitarian government called the Combine. The combine used genetic engineering and other manipulations to mold the populous to the roles there are expected to play. The tale concentrates on his part in a battle that destroyed an entire city with a converted Terraforming tool and the aftermath thereof.
The speaker's unit used a variety of low tech means--including the above mentioned bicycles--to defeat the technologically oriented defenses of the Combine.


USB device not present on Manjaro Linux

Question: I have tried plugging in several different USB devices (external hard drives and thumb drives), the problem is that they all show up under lsusb but do not show up using either fdisk -l or lsblk which is what I want to use to mount them.
Comment: same problem on 17.0.5 KDE edition on 2 different machines.
Answer: Here is a working solution.
In file /lib/udev/rules.d/69-libmtp.rules comment out the line
# Autoprobe vendor-specific, communication and PTP devices
ENV{ID_MTP_DEVICE}!="1", ENV{MTP_NO_PROBE}!="1", ENV{COLOR_MEASUREMENT_DEVICE}!="1", ENV{libsane_matched}!="yes", ATTR{bDeviceClass}=="00|02|06|ef|ff", PROGRAM="/usr/lib/udev/mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}", RESULT=="1", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

Than you need reload udev rules
# udevadm control --reload-rules && udevadm trigger

But for me that was not enough, so reboot seems to be required.
Related themes and links:

https://unix.stackexchange.com/questions/26842/mounting-usb-drive-that-is-not-recognized
disable MTP udev rules for specific device so it can be mount as a USB Mass Storage device
https://bbs.archlinux.org/viewtopic.php?id=119676
https://bugs.launchpad.net/ubuntu/+source/libmtp/+bug/874293
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626010
Comment: I followed the answer in the [link](https://unix.stackexchange.com/questions/26842/mounting-usb-drive-that-is-not-recognized) that said to add `export MTP_NO_PROBE="1"`
Answer: I had the same problem after installation (in September 2019). After a few days, after a Manjaro update, everything started working correctly.

USB device not present on Manjaro Linux


Delphi Firedac - Case Sensitive issue

Question: I am trying to migrate my application from ADO to FireDAC. I am using Microsoft SQL Server. My database server was installed with collation SENSITIVE CASE and the database was created with collation INSENSITIVE CASE. I did this configuration because my custumers has this configuration. But when I tried to migrate to FireDAC, the FireDAC driver (MSSQL) look the database collation and change the property "database name" to upper case. After that, many things didnt work, because the FireDAC didn't find the "database name" in sysdatabase. Can I turn off this function that change the "database name" property?
Comment: Have you tried to set the FDConnection property 'MetaCaseIns' to true?
Comment: Yes, but didn't work. When I setted up the property 'MetaCaseIns' to true, the firedac component changed the database name to upper case. I need that the database name stay like typed.
Comment: I'm send link to this topic immediately to the FireDAC's author, hope he'll say something.
Comment: Generally, if you troubled with FireDAC, you can try to ask at http://www.sql.ru/forum/1008012/firedac, English would be understood.
Answer: I guess you're looking for the MetaCaseInsCat connection parameter. Try to disable catalog names case sensitivity autodetection and set it up to be case insensitive:
...
FDConnection1.Params.Add('MetaCaseInsCat=True');
FDConnection1.Connected := True;

Comment: @Dreamer64, could you elaborate, ideally with MCVE in a separate question, please?
Answer: I find it that FireDAC is using ansi uppercase conversion to access the database, which in turn causes problems with MSSQL. In my case it was turkish. I found the fix to be easy. In OnBeforeConnect of TFDConnection I used:
Params.Database := TRUpperCase(Params.Database);

Where TRUpperCase is a function that properly converts turkish characters to uppercase(like i to İ, instead of i to I).
Answer: This is not a direct answer to the OP, but it may help future programmer like me who are having issue with case sensitivity in FireDAC
I'm using FireDAC with MSSQL.  In order to use the 'LIKE' in a TFDQuery Filter in a non caseSensitive way : TFDQuery.FilterOptions
procedure TFDQuery_MyVersion.SetFilterText(const Value: string);
begin
   FilterOptions := [TFilterOption.foCaseInsensitive];

   inherited SetFilterText(TOldDatabaseSystemToMSSQL.Filter(Value));
end;

Delphi Firedac - Case Sensitive issue


How does Google verify product feeds?

Question: When I submit a product feed to Google and a SKU is marked in stock, how does Google verify that? Is it a human looking over a given PDP and checks if that SKU is in fact in stock or is it an automated process?
Answer: Product feeds are verified through matching against structured data on URLs, listed in product feed as product URL. If you activated automatic updates, so Google will prefer current structured data from the product URL. More here: https://support.google.com/merchants/answer/6069143?hl=en

How does Google verify product feeds?


About Effort estimations value and usuability

Question: We had a discussion about the real value of effort estimation (EE) for SW development tasks, and I like to get some feedback from the community.
The major questions in hand are:

Should R&D team provide effort estimation to R&D tasks?
Can you learn and get better at EE, by extrapolating from task A's EE vs. actual development time,  to task B's EE?

The people who support EE (and answer "yes" to the above questions) give these reasons:

you must have some kind of EE in order to plan the upcoming tasks / sprints
if you know task is small / big, you can decide if you like to develop it or not
if you estimate task A in X and it took 3X, you will be able to better extrapolate the estimation of task B and improve your velocity / accuracy / ...
A developer should have some kind of time frame for the task he/she is working on

The people who doesn't support EE (and answer "no" to the above questions) give these reasons:

Almost every EE is a pure guess. There will be hardly a relation between the EE and the reality.
Development tasks are usually very unique and you can't really extrapolate from task A's EE to task B's EE.
If a task is needed, it should be prioritized and done, regardless of the time it will take.
EE are quickly turned into commitment and blames. "you SAID it will take 1 week, but it took 1 day / 1 month"
The only department in the organization that is asked to provide EE is R&D. Usually, product are not EE the time it will take them to write the spec.
EE seems to be another way of saying "R&D are a group of slackers and only if we give EE, they will finish the tasks in reasonable time"

I'm not sure there is a right / wrong answer to these questions, but I like to get some feedback from the community.
Comment: [How to handle a question that asks many things](https://meta.stackoverflow.com/a/267059/839601)
Answer:
Should R&D team provide effort estimation to R&D tasks?

Yes, it seems to me like a natural part of the process of problem decomposition.

Can you learn and get better at EE, by extrapolating from task A's EE vs. actual development time...

Yes, every developer that thinks about problems and how they decompose can get better at doing this.
If we don't practice problem decomposition and estimation, we won't get better at it.  Each developer that makes an estimate might keep a log or journal regarding what they underestimated: whether things were missed in problem decomposition, problem decomposition didn't go deep enough, or, harder than expected (external API poorly documented/understood, new technology with steeper learning curve), or, maybe, process/methodology issues, skill gap on the team, lack of equipment, technical debt (spaghetti code), insufficient regression tests, etc..  Doing estimates — and tracking how we do/did and why — represents an opportunity: grist for the mill of continuous improvement.  Learnings can be shared in the retrospectives!

...by extrapolating from task A's EE vs. actual development time, to task B's EE?

Some developers are much better at this than others (and some much worse), so there is lots of variance in the quality of these estimates.  Due to this reality, we really shouldn't expect to be able to infer something from A's estimation accuracy to B's estimation accuracy.  At best, we improve each individuals accuracy, and the team leader can get a notion of individual accuracy and how to blend the estimates together.
Estimates are educated guesses.  No one should take an estimate as a guarantee or commitment -- it is an estimate!  If someone wants a commitment, let's not use the word estimate.


How can I estimate the perfomance of graphics cards I don't have?

Question: I'm developing a voxel game with OpenGL and want to optimize the number of rendered faces. How can I estimate how many faces at most a modern graphics card of a certain brand is able to compute, while still managing to render at 60fps?
Answer: There's only one sure way - You need to test it yourself.
Estimation result largely depends on your actual code (how efficient is it) and shaders (how complicated are they).
Also, there's number of parameters you need to take into account, each can dramatically change the estimation:

Antialiasing (ranged from Off to 16x ?)
Display resolution (0.5k to 4k)
Anisotropic filtering (ranged from Off to 32x ?)
other GPU settings (performance vs. quality slider)
slow CPU can also be a bottleneck

EDIT: Generally you need a bunch of testers, who will play your Alpha/Beta and from whom you collect performance data and decide if you need to reduce polycount or not. Also it is generally a good idea to add Options slider to allow players to tradeoff picture quality for speed. Some prefer higher FPS, some prefer picture quality.
Comment: Okay, but I can't really test my game on every single graphics hardware out there. But still I think you are basically right. So I will test it on a generation of GPU (say e.g. AMD Tahiti) and then extrapolate according to the different clock rates.
Comment: Added to answer


Bing Image Search API

Question: Does anyone know if Bing limits the number of requests an application can have for the Image Search API? I looked through the terms and couldn't find anything but the wording that they 'reserve' the right to do so. My application would pull several images for each user - so there could potentially be a lot of requests. Any feedback?
Zach
Answer: It's not clear whether this is actually enforced but the guidelines say

"[You must] Restrict your usage to
  less than 7 queries per second (QPS)
  per IP address. You may be permitted
  to exceed this limit under some
  conditions, but this must be approved
  through discussion with
  email@example.com."

http://msdn.microsoft.com/en-us/library/dd440746.aspx
Comment: Thanks for the response! Excellent, that's very generous of them actually
Answer: I think, it is possible that this guide contains outdated information about restrictions. There are no info about queries number in the current version of terms (ver. March 2011). At the same time, there is a line about restricted advertisment on the page where the bing images or videos results are situated - this is essential.
Answer: Actually, Free Bing Search API is limited to 5000 Transactions/month & the Source type can be..
<code>Web
Images
News
Videos
Related Search
Spelling Suggestions
</code>
More Info, https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44

Bing Image Search API


Force launchd to re-read environment variables

Question: Is there any way, short of rebooting, to force launchd to re-read environment variables newly defined in /etc/launchd.conf?
Can it be done with launchctl(1)?
Answer: There is no way to do this, "launchd" is the master process, the equivalent of "init" in other unix systems, the only way in any other daemon would be to perform some sort of kill -HUP to reload config files etc, but this operation is not permitted on launchd.  If you look it up in the process table it is the number 1 process, every other process that is currently running is in some way a child of it, so a reboot is the only way to achieve this.  You may have further luck in setting those environment variables in another area that is more inclined to allow restarts.
    Dans-iMac:etc stuffe$ ps -ef | grep launchd | grep -v grep
    0     1     0   0  9:40am ??         0:09.47 /sbin/launchd
   65    18     1   0  9:40am ??         1:53.64 /usr/sbin/mDNSResponder -launchd
  213    73     1   0  9:41am ??         0:02.55 /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/usbmuxd -launchd
    0    85     1   0  9:41am ??         0:00.08 /System/Library/CoreServices/ODSAgent.app/Contents/MacOS/ODSAgent -launchd
   89   230     1   0  9:41am ??         0:00.01 /sbin/launchd
  501   238     1   0  9:41am ??         0:00.23 /sbin/launchd
  501   933   238   0 10:53am ??         0:00.01 /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent -launchd -allowquit

EDIT:
Of course, missing the obvious solution that you can add the relevant variables into the config file, and then just run the commands manually in order to escape the need for a reboot, nothing that only newly start programs will take account of any changes.  I found this page which explains it in more detail:

Environment variables set in launchd will be available to all programs on the system. However since $HOME/.launchd.conf is not
    supported, this approach is used for global environment variables
    only.

The /etc/launchd.conf file contains a list of commands to be run by
  launchctl during startup. However environment variables set in
  /etc/launchd.conf cannot have spaces and cannot reference other
  environment variables; launchctl when run in Terminal does not suffer
  these limitations. Do note that /etc/launchd.conf does not exist by
  default, so we will need to create it.
A reboot is necessary to load the contents of /etc/launchd.conf.
  However if you were to run the corresponding launchctlcommands in
  Terminal, you can alleviate the need for the reboot. Just remember
  that if you only do the launchctl commands, and do not put the entries
  in /etc/launchd.conf, it will not persist after reboot.
If you want to have a system wide environment variable that uses
  spaces or be dependent upon another environment variable, you can put
  the launchctl commands into one of the files Terminal reads. You will
  have to quit and relaunch Terminal to access the newly set variables.
Answer: Yes, you can use launchctl to add them for you.
for example from the terminal:
grep -E "^setenv" /etc/launchd.conf | xargs -t -L 1 launchctl

outputs on my machine:
 launchctl setenv _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
 launchctl setenv JMETER_HOME /Applications/apache-jmeter-2.10
 lauchctl setenv GRADLE_HOME /usr/local/gradle-2.0

Then you can restart whatever app that needs it form spotlight
Comment: Well done @Peter. 3 years 9 months later, this worked like a champ.


Showing � instead of £

Question: the symbol � is showing instead of £ when pulling data from the mysql database
the field in question its collated to utf8_general_ci
I also have the <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> on the head tag of the page
Any ideas please?
Comment: possible duplicate of [Browser displays � instead of ´](http://stackoverflow.com/questions/4095058/browser-displays-instead-of)
Comment: Are you inserting them from html such as a textarea? Have you tried using ' £ ' (without quotes) which is the html code. You could also try converting them into html codes using http://php.net/manual/en/function.htmlspecialchars.php
Answer: Use mysql_query("SET NAMES 'UTF8'"); before you perform any queries to the database.
Answer: As others said you should SET NAMES 'UTF8' id it not the default charset. It is also possible that the wrong characters were inserted into the database.
Check the source if it is indeed in UTF-8 format, and was imported as UTF-8. (You can re-import the data after setting NAMES with the query above).
If they were entered thru an HTML form, check if the HTML page containing your data entry form has the correct meta elemnent too.
Also check the headers your HTTP server sends you (you can do this with the Firebug extension). You can set the default charset for your server in a .htaccess file containing:
AddDefaultCharset UTF-8

Answer: If you're using PHP, the recommended way to set the character encoding is mysql_set_charset( ).
My initial setup for MySQL is:
<?php
$db = mysql_connect( ... );
mysql_set_charset( 'utf8', $db );

header('Content-Type: text/html; charset=UTF-8');
?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

This way, I'm never ever having problems with encoding.
Answer: Please read http://mysqldump.azundris.com/archives/60-Handling-character-sets.html
The short version: In MySQL string fields have a character set attached, and so have connections. The connection character set is the server-side representation of the client character set, it is what the server thinks the client is using.
The short way to set the connection character set is SET NAMES utf8, as mentioned in the comment above.
If the field character set is different from the connection character set, MySQL will try to convert the field to the connection character set. It will not try to do that if both are equal.
The way to debug that is, as shown in the article, to look at the field using the HEX() function, checking what the actual on-disk data is and if it is correct.
Then you connect to the database, having set your connection to the proper client character set with SET NAMES utf8, if you actually are working with utf8 as you claim. Then output the HEX() of the string again, it should be the same. If it is not, the connection does not have the right character set, for example, if you forgot to SET NAMES utf8.
You can configure the default connection character set in MySQL, using the definition of SET NAMES from the manual, http://dev.mysql.com/doc/refman/5.5/en/charset-connection.html
SET character_set_client = utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;

If you put this into the mysqld section of your my.cnf and restart the server, the SET NAMES should no longer be necessary, as the connection now by default will have utf8.
Answer: this also happens if you get text with jquery and ajax,
try echoing the string with utf8_encode($string)
Comment: I have some problems with teh othor and i have try all tutorial on  question and Ur question is better beacuse match with my problems

Showing � instead of £


Do Sisters of Battle ever retire?

Question: Do Sisters of Battle ever retire? I realize people in the Imperium can live to be quite old but that's mostly reserved for the heroes and the very wealthy. What about the rank and file, and especially the rank and file in cultures like the Soritas where they were always groomed for war?
Comment: I don't think anyone ever retires from anything in 40K :P In the grim darkness of the far future, there is only war... and work.
Comment: Only in death one's duty ends
Comment: @AndresF. And war is death.
Comment: I do not think that retirement has ever really been addressed for anyone, however I would expect the unlucky individuals that reach old age become instructors, advisers, or something similar. Experience is way to valuable in the 40k universe to just let someone live out their last days doing crosswords or feeding pigeons. Even Space Marines save their battle brothers from death and put them in giant coma tanks...
Comment: Only the Emperor retired until the Heresy, in the 40k maybe the Inquisitors may retire after lifetimes of service. But war bred parts of the Imperium die before getting a chance at retiring. Also Bjorn the Fellhanded is retired, he is not fighting anymore, just telling stories. But Sisters of Battle may never retire as far as we know..
Answer: TLDR

I think retirement has a different meaning in 40k...
By our standards, no.
By their standards, yes?

So full disclosure I have not read the book but after more research into this the book "Cain's Last Stand" by Sandy Mitchell could hold the answer. Lexicanum states that  both Ciaphas Cain and a Sister named Julien (a former  Celestian of the Order of the Bloody Rose) were retired and assigned to the  Schola Progenium on Perlia. The only thing that confuses me is that it mentions both retirement and assignment.
Don't tell black library, but I found a PDF online of what looks to be the full book without the flash... I jumped around looking for: retire and assign. I will preface this for my answer by stating that Ciaphas thinks he is retired although he has been assigned to instruct at a Schola. While he had retired from the battlefields, the dupe was actually just reassigned.

By this point I'd been living on Perlia for around six years, off and on, enjoying what was supposed to be a peaceful retirement. From time to time it actually had been. To my vague surprise I'd quite taken to the role of pedagogue, and the young pups I'd been put in charge of at the schola progenium someone had seen fit to found there since my last eventful visit were a great deal less troublesome than a Guard regiment. - CHAPTER 1

So Ciaphas was assigned to his new posting. That said, given that "There is only war" it is possible that one would consider leaving the battlefields behind for classrooms and desk jobs a full retirement.
There is also mention in the beginning of chapter 5 of a couple Commodores that were retired and in charge of some Stormtrooper cadets.
Towards Julien herself however it seems to introduce her as such:

...Sister Julien, the battle-scarred Celestian veteran in charge of the Sororitas novitiates, [said]... - CHAPTER 5

I could not find any mention of her retirement to the posting, but as at least one Inquisitor is 'retired and assigned' there, a couple of Imperial Guard officers are 'retired and assigned' there, I do not think it a stretch to think she is 'retired and assigned' there.
Lexicanum states that in chapter nine somewhere is where the book says she is retired, but i did not find a single mention of retire in that chapter (or any other) when it comes to the Sister herself.
Comment: Retired from active shooty duty, now is a cranky teacher teaching green kids how to do shooty duty.  Makes sense for 40k :)

Do Sisters of Battle ever retire?


Creating Dynamic Filters in Tableau

Question: I'm working in Tableau to help my school district visualize discipline data.  I want to be able to disaggregate and filter by quite a few different measures (at least 13).
In the past, if I wanted to be able to disaggregate by a number of measures, I would make a parameter with a list of possible outputs, display each output as the name of a measure, then create a calculated field that returned the value from a given measure based on that parameter.  This works fine for disaggregating.
However, filtering based on these values presents a challenge.  The problem is that I'm not filtering based on any given measure, I'm filtering on a calculated field that returns the value in that measure.  If my parameter is set to "Day" for instance, and I filter to Tuesday, but then switch to "Race", everything vanishes, because now my calculated field is returning race.  What I want to create is a dropdown menu that lets you select from a number of different measures to filter by.
Below is a link to a packaged workbook that can help illustrate the problem that I'm dealing with.
I feel like something like this should be possible in Tableau, but there's some little trick that I'm missing.  When I contacted their support team, their solutions were both only viable due to the limited number of measures I was using in the dummy data.  The support team felt that this was possible as well, but they didn't know how.
https://public.tableau.com/profile/publish/DynamicFiltersUsingParameters/Sheet1#!/publish-confirm
Answer: You could create an Filter Action on the Tableau dashboard which carries over the 'Day' filter to give a smaller subset of data to work with for the next filter.

Creating Dynamic Filters in Tableau


Display two Outlook calendars merged in SharePoint online

Question: I need to somehow connect calendars from my company's Outlook account to our Sharepoint intranet. And display them in Sharepoint merged together...It's just for read only... It isn't necessary to edit calendar from sharepoint...just what is added to multiple calendars in outlook, should be displeyed in one calendar in SP.
Answer: One way to export outlook calendar to SharePoint is using the connect to Outlook action in SharePoint Calendar. In that way you can copy events between Outlook and SharePoint. However there may be changes to the event title(adding "copy" ).
Steps here:https://www.youtube.com/watch?v=GhupNIhJPZY
For displaying two calendars in one, you can use overlay.
A tutorial here:https://sharepointmaven.com/roll-calendars-sharepoint/
Comment: yes, i know this steps but I need to connect existing outlook calendar to SP site. Maybe it could work with power automate...but thanks anyway. If I will not find solution, I will use yours


Using bitcoinlib created wallet on exchanges

Question: I am trying to get familiar with crypto trading, and I know enough Python to be dangerous. Including the ability to created HD wallets using bitcoinlib. My question is, can I use my bitcoinlib created HD wallet(s) to trade on an established exchange e.g. Coinbase? Thank you.
Answer: Yes you do, if you generate valid addresses. I still recommend you use a well known and tested wallet instead, like Bitcoin Core it self, Electrum or Sparrow.


What type of USB Protocol for Datalogger

Question: I am attempting to create a USB datalogger and would like to first start with creating a program that transmits Hello World over USB not using some kind of CDC communication.  I am trying to figure out what device class I should use.  Am I right for trying to set it up as an HID device?  FYI, I plan on using the PIC32 USB Starter kit for this.
Comment: I don't think HID, Human Interface Device, will be the right choice. CDC serial-out seems like a decent choice why do you discount that? Another option could just be a disk device.
Comment: I'd also vote for a scheme functionally equivalent to a serial port - it's logically simple, easy to create alternate software for and thus support varied host operating systems, plausible to replace the USB with bluetooth or some mid-range wireless link, or even "real" serial in a legacy situation or if you need to opto-couple it in an industrial setting.
Comment: Another option for a data-logger system, if you only want to retrieve the data is the USB mass storage.  But this will require a file-system (a small file-system is fine).  You device can act like a thumb drive, simply plug into a PC and download the file with the data.  You can also have special configuration files that the device can read and use for configuration.  This removes the need to build your own command processing functions.
Answer: As already discussed, the Communications Device Class (CDC) is probably a better fit than Human Interface Device (HID) class for  a data logging application.  That being said, there may be some reasons for using a HID based protocol rather than CDC such as availability of host operating system drivers.
Windows provides a generic programming interface for HID devices which allow you to access any device using the HID class without any special drivers.  If this is a commercial product, using a HID avoids the needs to have a signed driver such as would be required if CDC were used.  Since a HID device does not require a driver to distributed with your product, the end user experience may also be simpler.
There are some drawbacks with using a HID based driver though.  HID is not stream based, meaning the host OS will poll for data (reports) and will happily drop incoming report packets if the application does not read the incoming data fast enough.  This then requires that you implement your own protocol on top of the provided HID reports at the application layer to provide a reliable transport using the output and input report fixed length packets for data transfer.  Data throughput using this method will be significantly slower than a stream based protocol such as CDC.
Some useful data on USB HID can be found at http://www.lvr.com/hidpage.htm
Comment: Very good answer. No room for improvement
Answer: I'd recommend using CDC as listed above. If that doesn't work for you the MSD class might. Last resort option would be to code your own, but that will require writing a device driver for the host operating system you plan on using your device with.


Do people with masters degrees have an advantage over undergrads in PhD admissions?

Question: The pool of applicants for a PhD program consists of people applying straight after undergrad, and also people who have done masters programs. Do students with masters degrees have an edge over undergrads in the process? Do admissions officers judge undergrads and masters students differently? If undergraduate students have taken graduate-level courses (but perhaps not as many as a masters student has), where does that put them in comparison?
Comment: It depends on the country.  Totally different answers.
Comment: In Europe, you need a masters to apply for a Ph.D.
Comment: Personally, I prefer someone with a strong undergraduate (UG) record.   If two students have a comparable UG record, then a Master will make a difference. The Master degree has to be a research master as opposed to a coursework master.  Otherwise, I view the Master by Coursework as no different to an UG degree.
Comment: I think the OP is asking about the US, where the question has some relevance. Confirm?
Comment: Duplicate? https://academia.stackexchange.com/questions/115007/why-is-it-disadvantageous-in-graduate-admissions-to-have-a-higher-degree
Comment: Some universities require a masters degree to be admitted to their PhD program. In this case the answer is unequivocal: Yes.
Comment: @Ezze In most of America too. USA might be an exception, but for the rest of the continent it is so too.
Answer: It very much depends on the Country, the Field, and the Master's.
I'm assuming, since you are asking that you are interested in Country where a Master's degree isn't an absolute requirement for a PhD in your field of interest. My field (Life-Sciences) in my country (UK) is like this.
I would say that it very much depends on the Master's degree. As far as I can see there are three types of Master's degrees in UK Life-Sciences

Those for people who want to learn something different to what they learnt at undergraduate. So for example, my research is in Bioinformatics, and this is not normally covered in UK undergraduate degrees. This could be an advantage if you wanted a PhD in that area.
Master's degrees that are integrated as the 4th year of an undergraduate degree, and are generally almost entirely research based. I have found the students with these often have an advantage over others as they have experience of doing real research in a real research lab. This is important because UK PhDs are generally 3 years (4 at a maximum) and you need to hit the ground running.
General topic master's degrees for people who didn't get a good enough grade to go straight to a PhD. These might help you make the grade (i.e. if your undergrad grades were too poor there is 0 chance of a PhD, and a none zero chance after the master's), but if you have the grades to be accepted, this master's is useless to you. Worst, it might you look worse.

So in conclusion, it very much depends on the master's and why you took it.
Answer: It depends on the structure of the PhD in question. Ask the university.
Basically, there are generally two different types of PhD courses: ones that include a coursework component, and those that don't. Typically, these will be offered by universities in the USA and in Europe, respectively, though as always it's possible that any given university might be an exception.
For the degrees that include a coursework component, they will typically take 5-6 years to complete with two of those years being coursework, and having a Master's Degree would not be required.
For the degrees that don't include coursework, they will typically require 3-4 years to complete, and require the completion of a Master's Degree (which would, in turn, typically require 2 years of coursework) before you can apply.
As you can see, both methods are roughly equivalent in terms of requirements; the latter simply splits them up between the Master's Degree and the PhD.
Comment: There is also a dependence on field.
Answer: You need to have a masters degree to even be able to apply for a PHD. It's a basic legal requirement. In most countries (In Europe and America. USA being different clearly than the rest of the continent while most latin countries have extremely similar systems between them and regarding Europe given the inspiration came from there) you need to have graduated from university to make a masters degree and then graduate with a masters to apply for a PHD.
Graduation does not mean to just finish school by acquiring the necessary credits or passing/approving the classes. That is the first step, after which there are some graduating/titulation requirements like making a thesis, publishing articles, passing a seminar, etc (plus doing X hrs of social service, presenting extra documentation, etc). And then of course are bureaucratic tramits to certificate it all and be government approved as a graduate of the scholar level. Only after you get that can you pass to the next level.
Check if such is the case for the specific PHD you are considering.
Comment: An MBA? As in a Master's of Business Administration? In what country is an MBA (a business qualification) a prerequisite for a PhD (a research qualification)?
Comment: The UK is also an exception. (I think Australia and Canada also). I guess the equivalent in English speaking countries would be MA.
Comment: @Ian Sudbery I wrote the rought equivant of grades to english. An MBA is a master/maestría . Let me add that in the answer. And it's a requirement in Europe and most American countries (USA is an exception apparently)


Distance increase between Sun and Venus

Question: Is the distance between the Sun and Venus increasing?
What is the measurement?
May I request for a formula?
Comment: This is a very vague question, why do you think it might be increasing?  Given it has an elliptical orbit it is always either moving closer or further way.  Given the sun is radiating energy it's mass is decreasing and so the average distance will increase slightly.  There are probably more factors that I havent thought of as well!
Comment: Related question [Is the distance between the sun and the earth increasing?](http://physics.stackexchange.com/q/208/126).
Comment: ""May I request for a "formula"?"" Rofl, You conjecture some phantasy or rechurn web nonsense, and for this You request a formula? BTW, is ther a distance loss or does it increase? Vote to close as not a real question. -1
Answer: As you are new here, welcome. It would be good if you could give a justification  to why you are asking this question.
A relevant thread to this  is Why does the moon drift away from earth? .
You will find there the simple mechanics formulae of why the moon, because of the earth tides it induces, drifts away slowly from the earth.
Now Venus does induce tides on the sun, but the sun also induces tides on Venus so one has a more complicated problem. I expect though that the effect would be the same over centuries, that the average distance  between Venus and Sun would grow.
Answer: Most Probably Yes.
The Earth is moving away from the Sun (see PSE-Question) at a rate $0.57H_{0}$, the most recent reference AFAIK, that can not be explained by any of the current official models, one can expect that the same happens with the Earth-Venus distance.
A 'simple' triangulation when the 'transit of Venus' (in the line of sight Earth-Sun)  happens will reveal if the answer is yes or no. The natural answer is yes.
References:
by G. A. Krasinsky and V. A. Brumberg, 2004
Secular Increase of astronomical unit from analysis of the major planet motions, and Its Interpretation

$\frac{dAU}{dt}=15\pm4\: m/cy$
at present there is no satisfactory
explanation of the detected secular
increase of AU

WeiJia Zhang, ZhengBin Li and Yang Lei, 2010
Experimental measurement of growth patterns on fossil corals: Secular variation in short distances ancient Earth-Sun

both the modern and ancient leaving
rates could be measured with high
precision, and it was found that the
Earth has been leaving the Sun over
the past 0.53 billion years. The
Earth's semi-major axis was 146
million kilometers at the beginning of
the Phanerozoic Eon, equating to 97.6%
of its current value. Measured modern
leaving rates are 5–14 m/cy, whereas
the ancient rates were much higher.
Experimental results indicate a special expansion with an average
expansion coefficient of $0.57H_{0}$

Distance increase between Sun and Venus


how to create pull request if jenkins job running on feature branch is successful

Question: Is there a Jenkins plugin for creating pull requests?
Suppose I am running a Jenkins job on some feature branch. If this job is successful, then I want Jenkins to automatically create a pull request from this feature  branch.
There is a command-line way to create pull requests:
git request-pull [-p] <start> <url> [<end>]

but I haven't been able to find a way to get Jenkins to automate the task.
Answer: Your Jenkins job can have a step calling the Atlassian Stash API for creating a pull request
POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests?direction&at&state&order&withAttributes&withProperties

Create a new pull request between two branches. The branches may be in the same repository, or different ones. When using different repositories, they must still be in the same {@link Repository#getHierarchyId() hierarchy}.
The authenticated user must have REPO_READ permission for the "from" and "to" repositories to call this resource.
Comment: @thinkingmonster I have rewritten the answer for Stash
Comment: @thinkingmonster : were you able to achieve what you wanted?
Answer: It is more typical to go the other way: users choose when they are ready to create a pull request, and Jenkins (or any other CI tool) updates the status of the pull request based on the project build result. For example, if you use the GitHub Pull Request Builder, then Jenkins will send a message to GitHub when the project build starts and can close the pull request automatically if the build fails.
Comment: Yeah i understand but i want to do above thing. create pull request when  feature job is success.This is my requirement


Checkboxes with several options

Question: This section is part of our form, here the user can request courses and workshops, for schools and camps. The user can select multiple activities and on some of them you have several options, We aren't really sure if it's a better way to present this to the user? Any suggestion?
Comment: While you may know the answer, I can't infer it from looking at your example; are each of the levels mutually exclusive? Can I pick Level I and Level II Spanish? How about Level I Spanish and Level I French?
Comment: What about just using 4 columns: Level 1, Level 2, Workshop A, Workshop B
Comment: yes you can choose Level I and Level II or choose just Level II
Comment: How does the user know the difference between the Levels and what the difference is between Workshop A and B?
Answer: When looking at a large set of data and realizing that the organization is not working, you want to look at how the information as a whole can be presented differently - not just swapping out a single control for another.
That's my short answer to your specific question. You do have a lot of checkboxes and they are confusing. Start by looking at a different way to present the information!
There are a few things I immediately notice when looking over this list.

Extensibility. As you list grows, your users will have more and more trouble parsing which row of checkboxes goes with which activity. Also, what happens to your list if "Level 1" gets two workshops?
External Memory. Your layout does not externalize memory. You user has to remember what an activity is, or any special notes you've previously mentioned. Also, when and where are the different workshops?
Organization. It isn't clear how you are presenting the information. Are you emphasizing the activity, or the level it is at?
Bland. A huge checkbox list is boring! Spice it up and make your users want to sign up!

Here is a notion of how you can address such things:

What does this do?
Categories: Break up your activities into higher level categories to help your users find what they are looking for.
Icons: Shazam! While they do help pull the eye to each different category they really just help to add some color and spice to an otherwise dull list.
Activity & Description: Each activity is named and space is available for a small description or other information. Don't force your users to remember something important about the activity. For example, is this a ladies only Tennis team?
Sign me up: You've hooked them, they're ready to sign up! List out each level and provide a checkbox to sign up for it. You can also point out when the activity is, so users don't have to wonder if their calendar will work out. Notice too that the above design allows you to easily add multiple "workshops" to any of the levels.
Focus on the activity: All the information on a single activity is contained in one area. The user's eye does not have to track far, nor does their mouse, and they will not accidentally click the checkbox in the activity above/below the one they wanted.
How can it improve?
With the caveat that many things could be improved on the above, here are some thoughts:

Add a filter so people can easily find what they are looking for. A textfield where I can type in "robo" and list will dynamically filter (as I type) to filter down to show only the "Robotics" activity.
Add a where to the activity. Again, don't make the user remember where things are! Maybe you have a Tennis activity in two different locations and the user really prefers one; similarly, maybe the user just can't make it to a certain location - don't make them sign up only to disappoint them later.
Provide feedback links. How can users get in touch to learn more about certain activities? Each activity might have a different contact resource.

This takes up too much space!
It certainly does take up a lot more space then just a checkbox list. But is also provides a lot more information to the user then just a checkbox list.  There are several ways you could help the user find activities towards the bottom of the list more quickly (the filter suggestion above is just one).
Comment: +1 for providing all information about the activity in one place while signing up. Another way to save space would be to make the sections collapsible and let users drill down into the section they were interested in.
Comment: This is really nice, I always liked the idea of boxes for grouping things that are related.
Comment: I also agree that you need to include more information on the event sign up page than just a list with checkboxes.
Comment: Thanks @EvilClosetMonkey you really take your time to think about this and your answer is clear and well funded, I really appreciate it a lot.
Comment: Excellent solution. One other option to add to this could be: Once you've checked off an option, the whole box (or module) changes visually in a subtle way, maybe a tone change, so users can see what activities they've clearly selected.
Answer: What if you used dropdowns for each activity?  That way it doesn't matter that different activities have different amounts of levels to choose from.

download bmml source – Wireframes created with Balsamiq Mockups
Answer: Is it possible (or likely) that a user could select both Level 1 & 2?
If not, it might be an option to organize the data hierarchically based on the level offered (eg. Level I courses, Level II courses etc) with sports listed under each one
Although this might lead to more repetition, the competency levels would be much more clearly delineated.
Comment: yes its possible, you even can choose Level 2 and Workshop 2 and not choose Level 1
Answer: You could set a dropdown that will show conditionally based on if users select Level 3.

download bmml source – Wireframes created with Balsamiq Mockups

Note on Progressive Disclosure

Progressive disclosure minimises cognitive load.

Source: http://arb.nzcer.org.nz/strategies/progressive.php
The use of progressive disclosure allows the user to focus on a single task, and single flow without being bombarded with too many options to start. Even though the drop-down appears later and the user needs to make a sub-decision, they can still focus and make that choice independently of selecting the level.

Additionally, if a checkbox option is not offered, you should have it greyed out so the form does not look very haphazard.
Also another idea:
Make it all an even grid even though some courses are not offered and let users know that with enough interest, those courses may open.
Comment: Not really sure about this, because you can select both workshop A and workshop B, with this option you need to show which one's they choose.
Comment: You're trying to do too many things at once. My solution offers a linear flow (If Level 3 is selected, here are your Workshop options) and it's less cognitive load initially.
Comment: Additionally you could also opt to stack the Workshops checkboxes as they are both part of Level III and space out the list.
Comment: This solution doesn't hit on @VADO concern that both workshops can be selected at once. Including a greyed out checkbox is not necessarily a good idea, as it implies the check box can somehow be ungrayed. While providing fewer options might reduce cognitive load "initially", suddenly introducing new elements based on user input will increase that load more then if they were there to begin with.
Comment: @Evil Thanks for your answer. I understand what you are getting at but in my solution if they are looking at scope of work, I'm also providing an alternative that is a simple to implement. Edit has been made in response to progressive disclosure.
Comment: Interesting article. A good read!
Answer: The giant spreadsheet you've laid out is nobody's friend.  There's nothing wrong with page navigation when it's sensible.  And I understand that clicking 'next' through 30 activities doesn't qualify as sensible.  But there are other options.
Is this just a survey of what the user is interested in, and what they might like to see you offer?  Or are there specific agenda items and a schedule?  One initial problem I see is that I could tick every box, but clearly there aren't enough days in summer to attend all of these activities.
Assuming there is a scheduled time and place for each, consider offering the activities on a calendar.  You can perhaps code each activity by color, so that surfing is blue and soccer is yellow, making them somewhat easier to find. Tie them together with icons.
Also, think about something like three or five sets of radio buttons to express interest in up to five topics.  The first button could be "first choice", and so on.  Allow the user to pick only one first choice, one second choice, etc.  The next page would give them their first choice first:  describe the event, Level I, Level II, and Workshops A & B,  locations, instructors, and times.  The next page would do the same for their second choice.
As the user makes their choices, you can advise them of conflicts with earlier choices.  Let's say they tick swimming as their first choice and tennis as their second.  Perhaps swimming Level I is Wednesday afternoons in June in the Fish building, but tennis Level II is Wednesday afternoons in June at the Court.  As you're presenting tennis, you could gray out level 2 and place the word "swimming level 1" over it.

Checkboxes with several options


Is value of correlation matrix enough criteria to delete an attibute?

Question: I need to do some clustering with my data set. I have 200 attributes and 18 tuples only. So I am trying to do some data cleaning. I deleted all attributes that has 0 as data and reached till 165. Now for further data cleaning I am trying to use correlation. I created a correlation matrix, and deleting the attributes that as correlation coefficient of greater than 0.9. Is it a good method? Do I need to consider anything else as well.
Answer: Correlation does not imply the attributes are bad.
It is never a good idea to remove attributes just because of some number. Rather use these to guide you to understand your data.
I.e. look at highly correlated attributes: are they correlated by cause (e.g. two nearby temperature sensors will be highly correlated because they measure the same thing - you should then probably merge these attributes) or is the correlation unexpectedly but related to your problem? (E.g., shoe size and gender are supposedly correlated, but you probably shouldn't remove them).
It won't get you anywhere closer to solving your task if you blindly follow a recipe to remove attributes.


What to do if my paper is incorrectly cited in a journal?

Question: Recently I got a cite in a research paper where the author cited my work as [first name] et al, where it should have been [last name] et al. Is there any problem for indexing purpose? should I contact the journal editor about this incident and ask for correction?
Comment: How is the paper referred to in the bibliography? If it is wrong there, you should contact the editor as most indexing services won't pick it up. You should also avoid publishing in that journal as the referees don't seem to verify the references.
Answer: Yes, that's a problem, and you will absolutely want to fix it. The problem is that it's actually a two-stage problem to correct:

First, you will need to contact the journal to fix the citation.
Then, after the citation has been corrected in the article, you'll need to submit a correction request to the various citation trackers (such as ISI and Scopus). They will need to fix your citation in their database, if the article has already been entered.

Note: It may or may not be possible to correct the journal—the editors may or may not be willing to issue a correction to fix a reference. However, it may be possible to correct the reference with the citation indices, even if it's not correct in the journal. However, the road will be tougher; you'll need to show that the paper that should be cited is indisputably yours.
Comment: Can you do that?  Maybe this is field dependent, but I've never heard of anyone correcting a error like this in a citation in a math paper that has already been published.  (My feeling is that you cannot change a published paper at all without issuing a formal correction or retraction, and while an error of this sort would be unfortunate, it wouldn't be sufficiently serious to justify publishing a correction, since the bibliography would still unambiguously identify the paper being cited.)  But maybe it happens in mathematics and I'm just not aware of it.
Comment: It is possible to correct a citation in the citation indices; it may or may not be possible to edit the paper, as you've cited. However, if there's a clear clerical error, it was incumbent on the journal to catch and correct it before publication occurred. I can attest that it is possible to correct citations in the online indices, because I've done it myself.
Comment: I did something similar when a paper cited a preprint of mine.  I contacted MathSciNet and told them where the paper had appeared and asked them to update their reference.  I was pleasantly surprised by how quick and painless the process was.
Comment: That reminds me--a well-known Handbook incorrectly cites a paper of mine and misspells my name. I had not thought of requesting a correction in the online indices.
Comment: Mmh if it's just the in-text citation that is wrong but the entry in the reference section, and more importantly in the article metat data, is correct then it's just a minor annoyance.
Answer: In addition to the earlier answer, you may also want to email the authors of the paper and inform them of their error, providing the correct bibliographic information, to prevent the problem in the future.


Does Titanium Backup backup the Signal private Key?

Question: I am looking for a way to backup my private key for the Signal messenger application. Nothing has worked so far, and I am curious whether anyone can confirm or deny that Titanium backup will save and restore the private key of a Signal install.
Comment: I don't know about the Signal app and the private key you speak of but maybe that is stored in hardware. If your device supports that.
Comment: @miva2: Unlikely, since otherwise I would probably not have lost the private key twice after a reinstall. Secondly, I'd consider this a very insecure method of storing the private key, I don't think Signal would do that.
Answer: Signal 4.17.0 introduced encrypted backups. This is the preferred migration path. Also the Titanium Backup route does not work in current releases.

Previous Post
I just tried this and it worked flawlessly.
After restoring Signal on your new Phone you should re-activated your connection by unregistering and re-registering to the Signal servers. As of now you can do this in the Signal Settings > Advanced tab by toggleing Signal messages to de-activate then re-activate [1]. In this Process you will have to re-verify your phone number and you'll have to reconnect your Signal-Desktop clients afterwards.
You won't loose your Private key or your Signal-Desktop messages though.
[1] https://support.whispersystems.org/hc/en-us/articles/213190487-Why-is-there-a-delay-in-receiving-messages-
Comment: Even though I do trust the author of this answer without reservation, I can now confirm as well that this works indeed. Upgraded from Lollipop to Nougat, installed Signal and restored the data backup, and everything works.
Comment: Just tried this, with Signal 3.30.4 and upgrading my phone from Android 5.0 to 7.1 - still works perfectly. I initially didn't un-register/re-register - but push notifications weren't working properly, so then I did. As @m-schulz-narres says I needed to re-connect the Signal Desktop clients I had but they did not lose their previous messages.

One thing to note is that group messages may get messed up by re-registering - you'll need a friend in the group to first accept your new safety number (you can directly message them), and then update the group (i.e. change the name or picture).
Answer: Titanium Backup does backup the key, but there's something internal to Signal that realises that it's installed on a new phone and refuses to use the old key.
Set recurring backups inside Signal instead.
Be aware that when restoring:
Place the .backup file in the sdcard root directory. Putting it under sdcard/Signal/backups will have the file NOT be read, but no error message given, either.
The backup is only read correctly if the metadata is displayed in a confirmation step.  This took me hours to work out. >:|


Preparation for laying ceramic tile

Question: Can you lay ceramic floor tile over a floor that has thin linoleum-like tiles already on the floor or do you have to remove them all before installation?
Answer: The thinset will not stick to the smooth finished floor.  You could just screw and thinset down 1/4" concrete board over it though and then install tile like normal.
Another option I would not recommend but is an option is you can probably lay tile over them with mastic instead of normal thinset.  But you will not be able to walk on the floor for upwards of 2-3 days minimum  AT ALL, longer with larger tiles.  You need that mastic to setup completely before grouting it or walking on it.
I don't think mastic is designed for a floor application though, but I do think it sticks better more like glue so it would stick better to the smooth finished floor.  But that "glue" is softer than thinset and cannot take the beating of a floor the same.

Preparation for laying ceramic tile


Only able to boot via recovery mode

Question: I'm using the newest 18.10 and only able to boot by going to recovery mode and by resuming to boot from there.
Answer: Unable to comment, so asking question here - Have you tried fsck in the recovery mode ?
You could also repair the boot after logging in -
<code>sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
</code>

Only able to boot via recovery mode


Working of a GPS

Question: one of my friends is thinking of a startup in which we will use GPS technology . The thing is we are thinking of making a cheap gps receiver indigeneously but i am not able to find good links on the internet regarding the in-depth electronic working of the GPS receiver . I have understood the concept of how gps is used to locate a location .
Comment: @digi_abhshk More details than what I provided?  Are you wanting to to build one or interface with one?  There's a steep learning curve that encompasses CDMA radio design, signal processing and some very intense math.
Comment: On what level will you be working? Will you use a standard GPS-receiver and interface it, or do you need to take a deep dive in the GPS system to build the whole receiver yourself (no standard modules)?
Comment: Either way, this question is too broad. Maybe try reading a datasheet?
Comment: Are you making a GPS receiver or wanting to use one and need to know how to interface with it?  (I think this question was closed a little early because of a possible language barrier in communication.)
Comment: @Camil Staps  i needed to ask that , i searched on the internet but i get results only about interfacing the gps but not about how it internally works , and if i search for internal working i get a broad overview about the four satellites . I need to know more about the electronics part of it .
Answer: You'll never be able to make a GPS cheaper than the IC solutions that are out there without dumping some money into spinning silicon dies.
But in general GPS is a spread spectrum signal at 1.575GHz.  You have to receive the signal then use a variety of PRN (pseudorandom) codes to correlate to the spread signal to de-spread it.  (Not trivial).  Once you've done that you can receive some of the timing information.  However all GPS satellites share the same frequency so your receiver has to process multiple PRN codes on the same signal to find more satellites.  Once you have at least 4 you can start processing position information.  Trilateration is the most common technique.  I've written tools to trilaterate in 3d.  The solution is about 3 pages of algebra but it is the simplest. More modern receivers use more complex solutions and there are simulation packages for Matlab you can buy.  Wikipedia has a good overview.
Comment: Three satellites provides 2 possible solutions.  Your GPS is using information about your previous location to eliminate one of the solutions in lieu of the 4th measurement.  In general you need 4 satellites.
Comment: An approximate location can be calculated with only three satellites by using the Earth's surface as the fourth sphere. If the receiver's elevation isn't known, then the precision is very poor by GPS standards, but I know at least my GPS receiver (marketed for hiking/outdoor uses) will display a result in this condition.
Answer: I think first you should evaluate some of the GPS Modules from U-Blox and other companies to get their clear working idea. There are different GPS modules for different applications like Dead Reckoning GPS, etc. Round the world there are only few countries which have their GPS Satellites in Space like US and Russia, namely GPS and GLONASS. There are some Taiwan companies also making GPS Modules, you can look into their devices and products to get and idea.
Comment: Similar satellite navigation systems with launched satellites include GPS (USA), GLONASS (RU), Compass/BeiDou (CN) and Galileo (EU)

Working of a GPS


What points should be included in SOP if the target program is industry focused and not researched focused?

Question: I'm applying for MS in US, and for every university I'm making a tailored made SOP. I was applying for a program, which is industry focused and not research focused. And I am not sure what should be included in the SOP regarding that, as for research focused program we can include our research experience, and we can also check if the program fits our research interests, but what should we include for industry focused program?
Answer: Here are some stuffs, could which be deserving to be taken into account:

Explain about the expected contribution of this program to pave your
way for the future professional career.
Elaborate on any related working experience to the concept of the
program.
Illustrate the intriguing points, corresponding to the program, have which stimulated you to pursue it.
Pinpoint any presentation within the technical workshops around the     program's subject or any research-based experience, to depict your
related coherent background.
Mention your potential ideas to commence a business, based on the
acquired technical and professional skills, stemming from the
program.
...


If $V_j = \ker(A-\lambda I)^j$, Why does $\dim(V_j)=r_i$ if and only if $V_j = V_{j+1}$?

Question: If we have a matrix $A$ and the characterisic polynomial is $(x-\lambda_1)^{r_1} \cdot...\cdot(x-\lambda_m)^{r_m}$ and we define for each $\lambda_i$, $V_{j} = \ker(A-\lambda I)^j$. Why does there exits $k$ such that $\dim V_k = r_i$, and why does it hold if and only if $V_k = V_{k+1}$? Also, is it possible to have $\dim V_j > r_i$? I saw this on algorithm to find Jordan form, and I'm trying to understand why the algorithm works.
Answer: Let's denote the vector space by $W$ with $\dim W=n$, in which $n$ is the size of $A$.
I will break down your question into three statements:
Claim 1: $\{0\}=V_0\subseteq V_1\subseteq \dots \subseteq V_n \subseteq V_{n+1}\subseteq \dots$
Proof: You can verify it yourself.
Claim 2: There is an index $j$ such that $V_j=V_{j+1}$. Then $V_j=V_{j+1}=\dots$, i.e. the increasing sequence above is stationary.
Proof: The increasing sequence in Claim 1 can't be strict forever, for $W$ is finite dimensional. Thus the existence of an index $j$ is clear. If $V_j=V_{j+1}$, take $v\in V_{j+2}$. Then $(A-\lambda I)^{j+2}v=0\Rightarrow (A-\lambda I)v\in V_{j+1}=V_j \Rightarrow (A-\lambda I)^{j+1}v=0\Rightarrow v\in V_{j+1}$. So $V_{j+2}\subseteq V_{j+1}$, hence $V_{j+2}=V_{j+1}$.
Claim 3: Let $V_{\infty}=\cup_{i\geq 0} V_i$, then $V_{\infty}$ is a vector subspace of $W$ and $\dim V_{\infty}=r_i$
Proof: This is a basic result in the theory of Jordan Canonical Form. For example, look at Jordan Canonical Form, Theory and Practice- Steven Weintraub, Corollary 2.3.5 (page 30)


Logs for staging servers

Question: Is it required to have logs for staging servers for PCI DSS requirements where the real cards are not used in this environments.
Comment: It all depends on your scope and what your QSA deems to be in scope. So, your question is not about logs at all, but about scope. Answer that part first, then the logs question is simple.
Answer: PCI DSS aside, why would you not want logs on staging.
The logging on stage should be exactly the same as used in live.
Stage by definition should be a clone of live. Setting up logging properly is no trivial task. Using stage to develop the log management processes should be like any other part of development. Get it right there and you are not wasting time and potential errors in live.

Logs for staging servers


Wide angle lens for Canon Rebel T3i

Question: I plan on going to Yosemite in December and am looking at getting a wide angle lens. I am thinking about investing in the Tamron AF 28-300 mm f3.5-6.3 XR Di LD VC Aspherical (IF) Macro Zoom lens. Model A20E.   What do you think?  Is there a better less expensive lens for my Canon Rebel T3i?
Comment: Note that on a Canon Rebel, 28mm is not wide-angle; it is in the range of "normal".
Comment: Do you want a wide angle lens or a lens with a wide focal range?
Comment: The Canon EF-S 10-22mm f/3.5-4.5 USM is one of the best options for a wide angle on the T3i. The Canon EF 17-40mm f/4 L USM is also a great option but not as wide.
Comment: As someone who owns both, for an APS-C body I would choose the Tamron AF 17-50mm f/2.8 DI II over the EF 17-40mm f/4 L.
Answer: It depends on exactly how wide-angle you want to go and how flexible you need the lens to be to zoom in to longer focal lengths as well.
If you want to go really wide, then the Canon EF-S 10-22mm f/3.5-4.5 is a well regarded lens but at $650 it is a little pricey. The Sigma 10-20mm f/4-5.6 EX DC is a couple of hundred cheaper, and just about as good at the apertures you would typically use to do landscape photos. The Tamron AF 10-24mm f/3.5-4.5 Di II is another lens to consider at just a few more bucks than the Sigma. The-Digital-Picture.com has a nice summary comparing the differences between each of these lenses as well as a couple of others at the end of the review for each of them.
If you don't need to go quite that wide, then a lens in the 17-5omm range will give you a fairly wide short end and much more reach into normal focal length range as well. Again, the Canon EF-S 17-55mm f/2.8 IS is well regarded but pricey. The Tamron AF 17-50mm f/2.8 Di II is less than half the price and very close to the Canon in optical quality. Both these lenses, which only work on APS-C cameras like your T3i, are a little better optically than the EF 17-40mm f/4L that is priced about halfway between the two but projects a larger image circle that will also work on full frame camera bodies.
Update:
On 9/3/2013 Canon dropped the suggested retail prices of several lenses. Included in the list were both Canon lenses mentioned above. The 17-55 has dropped from $1,049 to $879 USD, the 10-22 has dropped from $749 to $659 USD. Amazon had already dropped the price of the 10-22. The price of the 17-55 via amazon has now been dropped as well.
Comment: Regarding the 17mm to 40/50/55mm lenses, the 17-55's Image Stabilisation is especially useful if you're not planning on taking a tripod. It's a really versatile lens if you can afford it and don't want to get into the "ultra wide" range (10mm is a *huge* FOV).
Comment: I had the sigma 10-20, but sold it after adding a canon 15-85 to my inventory. its an overal much sharper lens, has IS and a great range. Because 15mm is still pretty wide , you could take it into consideration.
Answer: I've been to Yosemite many a time. with 28-135mm USM IS, and sigma 10-20mm HSM. Superzooms are not worth it. It is not possible to get a wide angle (below 28mm) and a tele (above approx 85mm) with the same lens element combination without too many sacrifices. If I had known about Sigma 17-50 F2.8 OS HSM, I would have gotten that.
The 28-135mm USM IS lens:

The 10-20mm HSM:

Note that these are "linked" from facebook, so they already took a performance hit and back then I didnt shoot raw, so edits have been made from jepg to jpeg (also a performance hit).
Answer: This is a general purpose lens and not a particularly wide angle lens.  It isn't a bad lens, but it also isn't a particularly great lens.  The longer the focal length range of a lens, the more compromises have to be made in terms of image quality.  The 28-300 shouldn't ever have to come off your camera, but it also won't do the best job for the price for any particular photo.
If you want a wide angle lens for an APS-C sized camera (such as your T3i) you really want something in the 14-28 mm range, maybe going as far up as 40 or 55, but you don't really want to go too far into the standard zoom range before compromises start having to be made in the optics.

Wide angle lens for Canon Rebel T3i


MongoDb can't use types in jest - declares ... locally, but it is not exported

Question: I use the mongodb library in TypeScript for a few functions (e.g. lambda functions but that should not matter).
The imports look like that:
import { ObjectId, Db, InsertOneResult } from "mongodb";

When I import the function in Jest and execute it I always get the error:
Module '"../../node_modules/mongodb/mongodb.ts34"' declares 'ObjectId' locally, but it is not exported.

I think something is wrong with my jest logic but I am not sure what. The function itself is working.
My jest config looks like that:
const tsPreset = require("ts-jest/jest-preset");

module.exports = {
  ...tsPreset,
  testEnvironment: "node",
  roots: ["<rootDir>/test"],
  testMatch: ["**/*.test.ts"],
  moduleNameMapper: {
    "^@/types/(.*)$": "<rootDir>/types/$1",
    "^@/lib/(.*)$": "<rootDir>/lib/$1",
    "^@/functions/(.*)$": "<rootDir>/functions/$1",
  },
};

Answer: This appears to be related to this ticket. The current versions of the mongodb node driver are no longer compatible with typescript 3.9.


How to discover OpenID IDP, then authenticate with OpenID Provider in PHP

Question: I've been looking at implementing OpenID authentication to one of my websites and want to find the best possible solution to make it as easy as possible for users to sign up / in.
Through my long searches on Google I found a few sites that have already covered this in quite a bit of detail; Usability Research on Federated Login written by Google, so feel that they are pretty trustworthy design patterns for a best use scenario.
Now in coming to implement this I have found very little PHP support for logins that are done in this manner; the user only has to type in an email address and all of the OpenID details are found automagically. It should also be compatible with Google Apps addresses.
Google provided a link to a great example of this in action http://www.puffypoodles.com/lso2 but although its source code is available to download, it's written in Java, which I'm far from familiar with!
So I was wondering if anyone had found a good PHP implementation that functioned in this manner. php-openid seems too bloated, lightopenid looks great, but doesn't support this functionality.
Thanks
Answer: I'd just like to point out that LightOpenID now comes with an example provider script you might use as a base.


Why does the unperturbed stationary state energy level could be the same as the perturbed?

Question: In the book principle of quantum mechanics by Dirac, when analyzing the scattering problem, it assumes that unperturbed stationary state energy level is the same as the perturbed. It doesn't agree with my instinct, after perturbation, the energy level should a little higher. So why this assumption could be applicable in this situation?
Here I quote the original text in the book:

We shall now consider the calculation of scattering coefficients,
taking first the case when there is no absorption and emission, which
means that our unperturbed system has no closed stationary states.
We may conveniently take this unperturbed system to be that for
which there is no interaction between the scatterer and particle. Its
Hamiltonian will thus be of the form $$E = H_s+W$$ where $H_s$ is that for the scatterer alone and W that for the particle
alone, namely, with neglect of relativistic mechanics, $$W = \frac12m(p_x^2+p_y^2+p_z^2;)$$
The perturbing energy $V$ assumed small, will now be a function of
the Cartesian coordinates of the particle x, y, z, and also, perhaps,
of its momenta px, py , pz, together with dynamical variables describing
the scatterer.
Since we are now interested only in stationary states of the whole
system, we use a perturbation method like that of§ 43. Our unperturbed
system now' necessarily has a continuous range of energylevels,
since it contains a free particle, and this gives rise to certain
modifications in the perturbation method. The question of the change
in the energy-levels caused by the perturbation, which was the main question of§ 43, no longer has a meaning, and the convention in § 43
of using the same number of primes to denote nearly equal eigenvalues
of E and H now drops out. Again, the splitting of energylevels
which we had in§ 43 when the unperturbed system is degenerate
cannot now arise, since if the unperturbed system is degenerate the
perturbed one, which must also have a continuous range of energy
levels will also be degenerate to exactly the same extent.
We again use the general scheme of equations developed at the
beginning of§ 43, equations (1) to (4) there, but we now take our unperturbed stationary state forming the zero-order approximation
to belong to an energy-level E' just equal to the energy-level H' of
our perturbed stationary state.
Answer: Just because the first-order correction vanishes doesn't mean that the energy is unchanged. There are plenty of cases in which one must go to second order to get interesting corrections.
For one, consider the ground state of the 1D harmonic oscillator, $\phi_0(x)=Ae^{\frac{-m\omega x^2}{2\hbar}}$ and a perturbing electric field $V(x)=Fx$. Then the first-order correction to the ground state is
$$
E_0^{(1)} = \langle\phi_0|V|\phi_0\rangle = F|A|^2 \int\limits_{-\infty}^\infty dr \; x e^{-\frac{m\omega x^2}{\hbar}} = 0
$$
where the integral is $0$ because it is an odd function over symmetric limits of integration. Therefore, the lowest-order nonzero correction to the energy comes in at second order (at least) in perturbation theory.


SEM/regression: Identify better predictor

Question: I have data from a longitudinal study, specifically MRI data and performance on a neuropsychological test at two time points. I would like to test whether the change in gray matter in Brain Region A is a better predictor of the change in my neuropsychological measure than the change in gray matter in Brain Region B. Would it be possible to analyze this with a regression or a structural equation model?
Answer: This would only really require a dummy-coded categorical regression, using Region A as the reference group and Region B as the comparison group. I'm assuming that because you are doing a longitudinal study that you expect some change over time as well. Below I simulate some data in R and fit a regression which tests the following elements:

Does the dependent variable vary by brain region?
Does the dependent variable vary by year?
Is there an interaction between the two? In other words, do both regions of the brain exhibit the same differences with each year?

The code below simulates what this could look like:
#### Simulate And Plot Data ####
library(tidyverse)
set.seed(123)
region <- rbinom(100,1,.5)
time <- rbinom(100,1,.5)
y <- (20*region) + (.8 * time) + (40*region*time) + rnorm(100)
df <- data.frame(region,
                 time,
           f.region = factor(region,labels = c("Region A","Region B")),
           f.time = factor(time,labels=c("Year 1", "Year 2")),
           y)
head(df)

#### Fit and Summarize Model ####
fit <- lm(y ~ f.time * f.region, df)
summary(fit)

#### Plot ####
df %>%
  ggplot(aes(x=region,
             y=y))+
  geom_jitter(
    width=.1,
    height=.1
  )+
  geom_smooth(method = "lm",
              color='red')+
  facet_wrap(~f.time,
             nrow = 1)+
  labs(x='Brain Region',
       y="Dependent Variable",
       title="Longitudinal Change in Y by Brain Region")+
  theme_bw()

We can see from the plot here that shows that region and time play a role in the dependent variable. Region B is generally higher in the dependent variable, but this is magnified by Year 2 (the points here are jittered but otherwise only take on one value for each group, hence the dummy coding).

Running summary(fit) to get the regression output confirms this. We see that Region B has a 20 point increase in mean $y$ scores, and there is about a 40 point jump when recorded at Year 2 compared to Region A:
Call:
lm(formula = y ~ f.time * f.region, data = df)

Residuals:
     Min       1Q   Median       3Q      Max
-2.51617 -0.57451  0.08391  0.66498  2.33184

Coefficients:
                              Estimate Std. Error t value Pr(>|t|)
(Intercept)                    0.09838    0.17253   0.570    0.570
f.timeYear 2                   0.40801    0.25639   1.591    0.115
f.regionRegion B              19.71488    0.24848  79.342   <2e-16 ***
f.timeYear 2:f.regionRegion B 40.82899    0.37533 108.780   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.9291 on 96 degrees of freedom
Multiple R-squared:  0.9985,    Adjusted R-squared:  0.9984
F-statistic: 2.077e+04 on 3 and 96 DF,  p-value: < 2.2e-16

Edit
Per the comments, I moved some of my discussion into this answer so as not to crowd the comments section. Using a SEM depends entirely on the complexity of your problem, but what you proposed here seems to make it unnecessary. The only thing a SEM would accomplish here is fitting the exact same regression into SEM software. It would be pointless unless you had something like latent variables or multiple dependent variables. As for learning about SEM, I recommend this book as well as this book. Since you mentioned being new to SEM, I will also recommend that you have a strong understanding of regression and measurement theory before using SEMs. They are not models that people should take lightly and are prone to misuse even by experienced practitioners.
As to your last comment:

A latent factor (of my neuropsychological test) would be a specific
kind of memory, this is (partly) why I was wondering... Another thing
is, the two brain regions consist of multiple sub-regions. I'm not
quite sure whether I could identify the sub-regions (using a
regression) which contribute to the effects in the end?

I'm not entirely sure what you mean here. If your neuropsychological test is a scale which is made of multiple items, then here you could use a SEM strictly so you can model the uncertainty in measurement from your items and determine which items are more or less related to the latent variable of your "neuropsychological" factor. For the sub regions I can't quite comment because I don't know enough about them. If that is of substantive importance, you could include them in the model, but without subject matter expertise I probably can't comment further on when that would be useful.
Comment: I've deleted my previous comments and edited my answer so we don't clutter up the comments section. See my edit for responses to your questions.
Comment: Thank you so much! Could you prove my hypothesis with a SEM as well?
Comment: Thank you so much! But could you use it to test the hypothesis, in theory? My thesis advisor proposed the idea (because it's being used quite a lot in this field) and I'm not so familiar with SEM
Comment: Okay, thank you so much for the information and the recommended books! A latent factor (of my neuropsychological test) would be a specific kind of memory, this is (partly) why I was wondering...

Another thing is, the two brain regions consist of multiple sub-regions. I'm not quite sure whether I could identify the sub-regions (using a regression) which contribute to the effects in the end?


Is 'breadth' related to 'broad'?

Question: Recently, I was informed that introverts look for depth of knowledge whereas extorverts are about breadth of knowledge. This positions horizontal breadth or width as orthogonal direction to the vertical depth so that I started to think that broadness and breadth are not only semantically but etymologically identical. How much am I right?
Answer: Both are from the Anglo-Saxon (AS) brad, broad.
Breadth:  AS braedu, from brad
Broad:    AS brad
My source: Webster's New Collegiate Dictionary
Further Information from Online Etymology Dictionary (http://www.etymonline.com/index.php?allowed_in_frame=0&search=breadth&searchmode=term)

broad: Old English brad "broad, flat, open, extended," from Proto-Germanic *braithaz (cognates: Old Frisian bred, Old Norse
  breiðr, Dutch breed, German breit, Gothic brouþs), which is of unknown
  origin. Not found outside Germanic languages. No clear distinction in
  sense from wide.
breadth: 1520s, alteration of brede "breadth," from Old English brædu "breadth, width, extent," from bræd; probably by analogy of
  long/length
Comment: The problem with OED is that it creates the false impression that words are unrelated. The linguists seem to lack the basic logic and read the fact that something is unknown as 'it does not exist', argumenting from ignorance. Thanks therefore with your Webster's New Collegiate Dictionary reference, which proves that false impression is not always true, that words can be related despite OED does not tell it explicitly. My question would had no value if you could answer it simply looking at OED.
Comment: @Valentin Tihomirov I logged in to thank you for the acceptance, and to tell you that I had added information from the Online Etymology Dictionary, which I used for the first time (!) in editing my answer to your question; I found very easy to use.  You may want to take a look at it and experiment with it.  Then I saw the above comment, which you should please ignore.

Is 'breadth' related to 'broad'?


Failed to build xwiimote-bindings

Question: I'm hoping you guys could help me.
I'm receiving the following error when I attempt to build the bindings. I have installed xwiimote and libxwiimote-dev. I am using ubuntu 15.04. Do you guys have any idea of what is going on. I'm sorry if this an easy question, I could not find any answers online. Do you expect this to problem with using 15.04?
Link for bindings: https://github.com/dvdhrm/xwiimote-bindings
Thanks!
Update
I downloaded xwiimote and built it successfully along with xwiimote-bindings. I think the original make script installer could not locate the user-space library in /usr/local/lib . I cannot execute xwiishow from the terminal or import xwiimote in python. Attempts to do both result in errors stating it can locate a shared library which I know is in /usr/local/lib
This is likely an easy fix, but I do not have the background. If anyone can give a suggestion it would be appreciated. Thanks!
Attempting to Exectute xwiishow
wiishow: error while loading shared libraries: libxwiimote.so.2:    cannot open shared object file: No such file or directory

Attempting to Import xwiimote
Python 2.7.9 (default, Apr  2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xwiimote
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/xwiimote.py", line 28,      in <module>
_xwiimote = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/xwiimote.py", line 24, in swig_import_helper
_mod = imp.load_module('_xwiimote', fp, pathname, description)
ImportError: libxwiimote.so.2: cannot open shared object file: No such file or directory

Answer: By default, xwiimote puts it's library files in /usr/local/lib instead of /usr/lib. On most systems, that path is not searched for libraries, so your application fails to load.
You can choose to reconfigure with ./configure --prefix=/usr and rebuild or add the libraries to your load path with export LD_LIBRARY_PATH=/usr/local/lib

Failed to build xwiimote-bindings


Cocoa - simple collada parser

Question: I´ve been researching a bit in the net but didnt find any Straightforward answer, i am looking for a simple way to Load Vertex and U/V data from a collada .dae file, i don´t need textures and normals for my application (for now) but i want it as lightweight&fast as possible. Any hints or existing solutions?
Answer: I don't have any experience with collada, but you might find my open source Cocoa parsing/tokenizing toolkit useful: http://parsekit.com

Cocoa - simple collada parser