What is the sum of all the Fibonacci numbers from 1 to infinity.

Question: Today I believe I had found the sum of all the Fibonacci numbers are from $1$ to infinity, meaning I had found $F$ for the equation
$F = 1+1+2+3+5+8+13+21+\cdots$
I believe the answer is $-3$, however, I don't know if I am correct or not. So I'm asking if someone can show how $F = -3$.
Comment: I'm curious...what exactly lead *you* to believe that the sum is $-3$?
Answer: None of these answers adhere to analytic continuation, which is clearly what you are looking for. A fairly non-rigorous method for doing this is to use the generating function for the Fibonacci series, namely
$$\frac{1}{1-x-x^2} = 1 + 1x + 2x^2 + 3x^3 + 5x^4 + 8x^5 +\cdots$$
Clearly we get the answer $-1$ if we plug the number $1$ into each side. This does not give $-3$.... I am not sure how you would even get that. Again, this is VERY non-rigorous... see this post by Terence Tao for a better foundation into the topic. While it is true the sum diverges in the classical sense, it is often possible to give finite values to sums which have meanings in some contexts (and are simply absurd in others!). For a basic example, look up Cesaro summation, or even Abel summation.
https://terrytao.wordpress.com/2010/04/10/the-euler-maclaurin-formula-bernoulli-numbers-the-zeta-function-and-real-variable-analytic-continuation/
EDIT
Please see this link! Apparently a zeta regularization for the Fibonacci series has been done, and matches my answer.
Comment: You seem to use the words "clearly" and "rigid" in... interesting ways.
Comment: I think you mean "rigorous" rather than "rigid."
Comment: @Rahul XD Yes, I suppose I use them here to refer to the fact that while it is easy to throw the number $1$ into both sides and get an answer, doing so goes outside of the interval of convergence and is thus frowned upon. The zeta regularization I mention at the end and link to is much more "rigid" in my use of the word, i.e. doesn't involve naively violating the laws of arithmetic to get some answer. If you have better term recommendations feel free to share :)
Comment: I think we can also interpret this $p$-adically: if we take $\epsilon>0$, then we can compute $\sum_{n\geq 0} F_n p^{n\epsilon} = \frac{1}{1-p^\epsilon - p^{2\epsilon}}$ in $\mathbb{C}_p$.  Letting $\epsilon \to 0$ gives a limit of $-1$.  I suspect that we can also do this as a $p$-adic Cesàro sum.
Answer: You are incorrect. The infinite sum of all the Fibonacci numbers diverges to infinity. Think of it this way: for positive integer I take, say $M$, I can always sum enough terms of the Fibonacci sequence to get a higher value than $M$, And, this works for any $M$ we choose. Therefore, the sum is larger than any positive integer, so it must diverge to infinity.
Comment: It was on Youtube, so it must be true.
Comment: @MathematicsStudent1122 That "sum" is vastly different than normal addition. You can prove $1-1+1\dotso =1/2$ by Cesaro summation. But by standard addition and notions of convergence it diverges. Its good to know which summation method youre talking about.
Comment: Not dismissing, perhaps having reservations.  Claims like this are misinterpreted by most people and the claims have to be qualified by what the particular summation means.  For most people, the result is not meaningful.
Comment: I have never seen a justification that the sum of the natural numbers "is" $-1/12$.  I have seen a great exposition by Terence Tao justifying that $-1/12$ is the constant term of a canonical asymptotic expansion of that series, but calling this the "value" seems highly situational.
Comment: The sum of all natural numbers equals $-\frac{1}{12}$, a result used in some physics applications.  There's a youtube video on it by numberphile, perhaps the OP is looking for a similar proof.
Comment: @user247608 It is true, though. It's been asked on this site, even.
Comment: @LoveTooNap29 I don't disagree with you. The previous commenter seemed to be dismissing the result simply because it was from YouTube.
Comment: @LoveTooNap29 Check out [this](http://math.stackexchange.com/questions/906980/if-the-generating-function-summation-and-zeta-regularized-sum-of-a-divergent-exi) link. Apparently a zeta regulation for the Fibonacci series has been done already, and has been published.
Comment: @BrevanEllefsen thank you! Great find and nice answer :) now if i can only get my non-math friends to stop confounding the different methods of summation when i share these results ....
Comment: @ervx the property you are using s called the [archimedean property of \mathbb{R}](https://en.wikipedia.org/wiki/Archimedean_property.). But, as I try to explain in may "answer" the topology can be non-archimedean...
Answer: All Fibonacci numbers are positive integers (and additions of positive integers), and addition of positive integers is closed under positive integers, thus $-3$ is wrong by default, even if it it didn't diverge (which it does).
Unless you are referring to simply assigning it a value similar to Ramanujan summation, then you are incorrect.
Answer: In particular to @Brevan Ellefsen.
This is not an answer, but it's more than a simple remark.
Have you ever met the paradoxal identity
$$-1=\sum_{k=0}^{\infty}2^k \ \ \ (1) \  ?$$
see http://www.cut-the-knot.org/blue/p-adicExpansion.shtml and many other references such as Knuth (exercice 21 p 213 of Vol. 2 of The Art of Computer programming) with explanation in considering the development of
$$\dfrac{1}{1-x}=\sum_{k=0}^{\infty}{x^k} \ \ \ (2)$$
in which $x=2$, thus beyond its (usual meaning) disk of convergence.
A rigorous framework (I don't say "the" framework) justifying this kind of result is the concept of p-adic number, or, in a preferable manner, of the so-called p-adic topology. For example, in the 2-adic topology, the "size" of an integer having a prime factor decomposition $2^{k_2}3^{k_3}5^{k_5}...$ is $2^{-k_2}$: the more factors $2$ a number possesses, the smallest it is... Thus, it is not so strange that the RHS of (1) converges. The fact that it is equal to $-1$ is not that much complicated to establish...
Let it be clear: I don't say I have a convergence proof for $\sum_{k=0}^{\infty}F_k=-1$ (or $-3$...) along the same line, for example by using the generating function $\dfrac{1}{1-x-x^2}$. I just say that, with a little time (that I have not for the moment) one could hopefuly obtain a result using this kind of topology.
Small introduction: p-adic topology is a very specific way to topologize $\mathbb{Z}$ (one topology for each prime $p$). $\mathbb{Z}$ with this structure is denoted $\mathbb{Z}_p$ (same notation as integers mod. p but no direct connection). In particular, it is an ultra metric topology, the "archimedean" property of integers is no longer available, which explains why some people look scandalized : they are not aware of the existence of other topologies giving other limits than $\infty$.
For readers that are very mathematically inclined, have a look at the famous book "Number Theory" of André Weil (one  of the mathematicians that has contributed to a famous conjecture that has led to the final demonstration of Fermat's theorem by Andrew Wiles) which builds structures on $\mathbb{Z}_p$: $\mathbb{Q}_p$, adeles, ideles...
To have an idea of the deep mathematics that are involved in these questions, see
The Geometry of p-Adic Fractal Strings: A Comparative Survey (Lapidus and Hung)
http://www.math.ucr.edu/~lapidus/papers/ContMath//GeometrypAdicStringsSurvey10893.pdf
A direct reference where the generating function of Fibonacci numbers is considered in the p-adic framework is
http://www.kurims.kyoto-u.ac.jp/~kyodo/kokyuroku/contents/pdf/0794-03
(some typographical problems with Japanese characters there)
For entering into the subject of p-adic topology, here is a nice article:
https://www.colby.edu/math/faculty/Faculty_files/hollydir/Holly01.pdf.
For an elaborate theory:
https://www.math.washington.edu/~morrow/336_12/papers/axel.pdf
See also the rather recent articles, the first one dealing with Fibonnacci numbers in a p-adic context:
http://thales.math.uqam.ca/~rowland/papers/Substitution_shifts_generated_by_p-adic_integer_sequences.pdf
http://arXiv:0809.0492v1 "From Data to the p-Adic or Ultrametric Model" by Fionn Murtagh
Remarks: 1) the Wikipedia article https://en.wikipedia.org/wiki/P-adic_numbers is well done, but its first part: the 10-adic numbers should not be part of the picture, because taking a non-prime $p$ makes a very poor structure.
2) I have met, in a "mathematics for electronics" book an "explanation" linking the "2's complement" hexadecimal notation "-1=FFFF" to identity (1)
Comment: Very interesting to read, and very informative! I briefly looked through some of the articles you shared... I hope to read more carefully later. Concerning that second remark... I remember reading that somewhere as well, but I can't quite recall where. I managed to find [this](http://math.stackexchange.com/questions/174768/the-sum-of-powers-of-two-and-twos-complement-is-there-a-deeper-meaning-behind), though I would be interested in finding a better "explanation" connecting the 2-adic numbers and 2's Complement.
Answer: The sum diverges to infinity, but a Shanks transformation (https://en.wikipedia.org/wiki/Shanks_transformation) converges to -1.
In effect this Shanks transformation, too, corresponds to an analytical continuation of the Maclaurin series for $1/(1-x-x^2)$.
Answer: OK, now I will explain how I got -3 for the sum of all Fibonacci numbers from 1 to infinity. This may not make sense, but hopefully this will explain how I got -3.
I started thinking of a series where the first Fibonacci number was added by 1, the second Fibonacci number was added by 2, and so on. the first 8 numbers of this series that I had created were as follows: 2 (1+1), 3 (1+2), 5 (2+3), 7 (3+4), 10 (5+5), 14 (8+6), 20 (13+7), and finally 29 (21+8). To refer to the nth number in this sequence I will write $J(n)$, so $J(1) = 2$, $J(2) = 3$, etc. I soon noticed that if you added $J(n)$ and $J(n+1)$ you would get $J(n+2)+n-1$. I rearranged this so that it looked like this: $J(n)=J(n-2)+J(n-1)-n+3$. I used this to find $J(0)$ and $J(-1)$ (both were 0), but this will be used later.
I then started thinking of what J, the sum of all the numbers in the series from 1 to infinity, could be, but I then realized that, because each term of this series was a Fibonacci number + a natural number, $J=F-(1/12)$ where F is the sum of all the Fibonacci numbers from 1 to infinity, and -1/12 was the sum of all natural numbers. Because J also equals $J(1)+J(2)+J(3)+...$ I decided to apply the "formula" ($J(n)=J(n-2)+J(n-1)-n+3$) to each term to get $J=J(-1)+J(0)+2+J(0)+J(1)+1+...$ Rearranging this, I got $J=J(-1)+2(J(0)+J(1)+J(2)+J(3)+...)+a$ where $a=2+1-1-2-3-...$ Multiplying both side by -1, I found $-a=-2-1+1+2+3+4...$ which can also mean $-a=-3-(1/12)$ This lead me to find that $a=3+(1/12)$
Looking back at the J equation ($J=J(-1)+2(J(0)+J(1)+J(2)+J(3)+...)+a$) , inside the parenthesis next to the 2, I saw that it equaled $J+J(0)$, which is J since $J(0)=0$ and $J(-1)=0$. This equation then became $J=2J+3+(1/12)$, and by solving for J, I found That $J=-3-(1/12)$ (which is -a). Locking back at the $J=F-(1/12)$ equation, hopefully, you can see how $F=-3$ (And hopefully I am not crazy)
Comment: To make a paragraph break press spacebar twice and then enter. You do a lot of niave operations on the terms here, and, without looking too carefully through everything you wrote, I feel like that is the root of your problem. You *could* develop a summation system in which your answer makes sense, but your answer simply doesn't match the results from the currently accepted system (i.e. Ramanujan summation, Abel summation, Cesaro summation, Zeta regularization, etc.). For example, as noted in the link in my post, the sum $$2+3+4\dots  = -7/12 \neq 0+2+3+4\dots = -\frac{13}{12}$$
Comment: Your answer was a bit challenging to read through, but it does explain how you got to $-3$. Might I suggest breaking it up into a few paragraphs at least?
Comment: @Brody I don't know how to make paragraphs, but I would add paragraphs if I knew.
Answer: F = 1 + 1 + 2 + 3 + 5 + 8 + 13 + ...
F = 0 + 1 + 1 + 2 + 3 + 5 +  8  + ...

2F = 1 + 2 + 3 + 5 + 8 + 13 + 21 + ...
2F = F-1
F = -1
Comment: This does not particularly add anything to existing answers. But it is interesting.
Comment: Thanks. It is the easiest way I found to explain.


How to make a CD ladder so you can use funds as they mature

Question: I have some cash in savings that I'll need to draw down over the next few years, monthly.  It seems like a CD ladder would be the best way to get a better return, but maintain safety and some liquidity.  But I don't know how to put into each rung.  Say like I have $10,000 and need $100/m.  How do I figure out how to divide it up?
Comment: How soon do you need to start drawing $100/m, and does it have to be $100/m or could it be $300 every 3 months?
Answer: Here's an example for deploying $13,000 into a monthly ladder going out 6 months with $2k coming due every month (adjust your numbers to fit this scheme).
$1k of the $13k will be set aside to cover monthly withdrawals as well as some buffer.
Day 1: Put $2k each in a 3 month and a 6 month CD.  In shorthand, you have a 3 and a 6.
Day 31: Put $2k each in new 3 and 6 month CDs.  In shorthand, you have a 2, 3, 5  and a 6.
Day 61: Put $2k each in new 3 and 6 month CDs.  In shorthand, you have a 1, 2, 3, 4, 5  and a 6 and you will have $2k coming due every month at which time you'll get a new 6 month CD.  When there are no more 3 month CDs remaining, you'll just roll each maturing 6 month CD into a new 6 month CD (a phone call if not done automatically by the bank).
There are several problems with this.

You have only deployed $4k in month one so you're going to need a high yield MM account for the balance.
It's a lot of time at the bank or online (paperwork) to get this set up
There are 1/2 a dozen or so high yield MM accounts that pay 2.40% to 2.50% and that beats current 3 month CD rates and isn't much less than 6 month CD rates.  I'd skip all the hassle and just put the money in  the 2.50% MM account.
Comment: Or hybrid, 1 year or longer CD's to get the better rate, with balance in an MM account while you build the ladder.
Answer: You might want to consider Treasury Direct instead. This allows you to buy treasury on the increment of $25 face value. You can build a monthly or even weekly ladder using 1~3 month bills.
Even easier alternative is just using money market fund/ETF, or an online saving that pays at least 2.25% APY.
Many banks require a few thousands minimum for CD, which will make things harder.
Comment: @Hart: Discover, American Express, Ally, PNC High Yield, Citi Accelerate are just the major ones between 2.1% and 2.4%.  For a larger list including less known entities, see https://www.doctorofcredit.com/high-interest-savings-to-get/#Best_Basic_Savings_Rates
Comment: On the pro CD side, I can open CD's in seconds with a bank I already have an account with, so transfers out are nearly instantaneous, and there's no minimum for the CD's. Treasury Direct is pretty slick though. Could you point me at one of those online savings in the 2.25% range? I've not seen one that doesn't limit the good rate to a small amount of money, but I haven't hunted in a while and would be very interested.
Comment: @BenVoigt Handy, thanks! Looks like of the major ones you noted only PNC and Citi are above 2.25%, but quite a few good-sized banks on the link you provided. Looks like a lot of money market accounts are dropping the higher min balance for decent interest rate requirement, good stuff.
Answer: What you are asking for ($100/month interest on a $10,000 investment) is mathematically possible but impossible now in the real world.
$100/month is $1,200/year, and $1,200 is 12% of $10,000.  No banks offer anything near that high of an interest rate.  You'd need $60,000 at a currently reasonable 2% APY to earn $100/month.
Every month for 12 months open a 1 year $5,000 CD and in the 13th month you'll start getting $100/month.
Comment: I don't think that's (make $100/month on interest) what the OP wants. OP just wants to withdraw $100 a month from the $10000 saving for a finite period of time and is asking for the best way to generate a little interest on cash.


Changes to Visual Studio Solution Configuration not reflecting on build machine

Question: I've set up "Team Foundation Build" (I think that's the correct name).  I have a build controller (build machine) that has been building our solution correctly.  When building on the build machine, I'm using a separate solution configuration.
We added a new project to the solution.  I've opened the configuration manager and checked the box for "Build" next to that new project while the configuration used on the build machine is selected.  This change to the solution is checked in.  But the build machine won't build that project.
If I make changes to solution configurations and examine the .sln file, I see those changes reflected so I know that information is stored there.  However, when I open the .sln file in Visual Studio on the build machine (after it's written there during a failed build), I see that the check box "Build" next to our new project is unchecked (thus explaining why it's not being built).  If I copy the .sln file from the build machine to my machine and compare it with the .sln on my machine (where the box is checked), they match!
I'm baffled...
Comment: Sometime mychanges to sln files arent there and then I always make a point to right click the teamproject node if only one project and then checkin all the changes. Then solution is updated on the server.
Comment: Are there any answers to this question or any workaround from @dude ?
Answer: It's likely that the new project is in a folder in source control that is not specified in the TFS Build's definition's list of workspaces.
Edit the TFS Build definition and verify the list of working folders.
The solution file may contain this project reference but unless it is included in the working folders it will not be available to the build server.


Confirm ms account after installaion

Question: 2 days ago i reinstalled my lumia 920 running Windows Phone 8.1
After i logged in with my Microsoft account it asked for verification. (while it's a little stupid, because i use the authenticator which was installed)
I pressed 'not now' and it continues, but how can i verificate after the installation?
Answer: You can use alternate methods (Call/Text) instead of using authenticator. There's an option for that in the registry wizard (before the not now option).
Comment: I know that, but i've skipped that verification
Comment: Goto Settings -> email & accounts -> Microsoft Account. Did you check this method?
Comment: Yes, i dont get a message to confirm my account or something
Comment: If You go to account.live.com in IE on your phone will you have to verify yourself then?

Confirm ms account after installaion


Middleman server not compiling coffeescript

Question: I've used Middleman in the past to work on static projects, and have used CoffeeScript in those projects. In this instance it does not seem to be working. I was under the impression that CoffeeScript compilation should work without any extra alterations to the project setup.
I created the project, created a file called file.js.coffee, and started the middleman server. Upon looking at localhost:4567/file.js, the file does not exist. However, localhost:4567/file.js.coffee does seem to still exist.
Am I missing an obvious step? I don't remember doing any extra work to enable CoffeeScript last time.
Answer: Try putting it in the source/javascripts folder?


Why is it important which interface method is called?

Question: I am studing interfaces, and at a point I came to explicit interfaces implementation. In a tutorial video at about 2:55 it says that when a class inherits 2 different interfaces, and if those two interfaces has a method with the same name, there is an ambiguity on which interface's method will be called.
using System;

interface I1
{
    void InterfaceMethod();
}

interface I2
{
    void InterfaceMethod();
}

public class Program : I1, I2
{
    public void InterfaceMethod()
    {
        Console.WriteLine("I1 Interface Method");
    }

    public static void Main()
    {
        Program p = new Program();
        p.InterfaceMethod();
    }
}

I am confused because, interfaces doesn't have method definitions, so why does it matter which interface's method is called? Both methods are identical with the same name.
Answer: It is important which is called because, although the interface methods might have the same name (and parameters and even return type), they might have completely different meanings in the context of those different interfaces. Therefore you have to be able to specify which implementation method to use for each interface.
For example:
interface IVehicle
{
    int GetNumberOfWheels();
    int GetNumberOfDoors();
}

interface ICheeseContainer
{
    int GetNumberOfWheels();
    int GetNumberOfWedges();
}

class CheeseDeliveryTruck : IVehicle, ICheeseContainer
{
    // Object has to be able to return the number of wheels on the truck
    // when used as an IVehicle.

    // Object has to be able to return the number of cheeses in the back of
    // the truck which are packaged as wheels when used as an ICheeseContainer.
}

Answer:
Why does it matter which interface's method is called? Both methods are identical with the same name.

And maybe that's okay. But maybe it's not.
In this case the result of the method is to output "I1 Interface Method", indicating that in real code the equivalent does care that it's I1.
When we create methods we give them names that try to be short and clear in meaning based on the meaning a word or few words have in a natural language like English. This can result in there in fact being different (whether very different or subtly so) purposes to two methods with the same name. We would then want to have separate implementations.
It's nice when things line up so that we can indeed use the same method for both, but it's also great that we're not trapped by that when inappropriate.
We'd also have to have separate implementations for interfaces with methods with the same name and parameter signature but different return types, since C# can't distinguish between these. A common example is IEnumerable<T> since it has a GetEnumerator() method that returns IEnumerator<T> but inherits from IEnumerable which has a GetEnumerator() method that returns IEnumerator. (IEnumerator<T> and IEnumerator are also examples of this same principle).
Another case where we might want to do explicit interface implementation is when a member isn't very useful in the context of the concrete type. For example List<T> implements ICollection<T>. That interface has an IsReadOnly property that is pointless in the context of working with List<T> directly as we know it's false because List<T>s are inherently not read-only. It is important when we're working on an ICollection<T> reference though (and of course, the rules require it be implemented one way or another), so it's done as an explicit implementation. ReadOnlyCollection<T> not only does the same thing (but of course, returning true instead of false) but also makes methods like Add() which are clearly pointless given that they will always throw an exception no matter what, explicit.
Answer: It looks like you're using C#.  The language involved is very important for this question.  I would recommending adding a tag for that when asking a question like this.
I believe the reason C# treats this as an ambiguous reference, rather than just using the same implementation for both, is that

If you must declare both methods in your implementing class, then the two methods with the same name can have different return types, so the same system can be used in a wider range of problems.
interface I1 {
    int Foo();
}

interface I2 {
    string Foo();
}

class C : I1, I2 {
    int I1.Foo() { ... }

    string I2.Foo() { ... }
}

If one interface is updated to change a parameter for example, code using that interface will be easier to update, without breaking other interface implementations.
Comment: "I believe the reason C# treats this as an ambiguous reference, rather than just using the same implementation for both" - c# does just use the same implementation for both... The ambiguity is purely in the eyes of the person writing the code.
Comment: Also if your two methods on the interfaces do have different return types the compiler will then complain because you haven't implemented one of the interfaces (because the implementation with the wrong return type can't match and you can't have two methods that differ only by return type).


Method used in t.test()

Question: The results of a t.test() in R provide a parameter $method which seems to be always equal to Welch Two Sample t-test which corrects for unequal variances. Are there other methods used in this function other than Welch's? I have looked in the documentation of the stats package in the CRAN repository but have not been able to find the source code for the t.test function nor information about t.test$method. Thanks for your help.
Answer: If you set var.equal = TRUE, then you will get the usual Student test without Welch's correction of the degrees of freedom. Similarly, if you run a one-sample t test or a paired t test, you will get different strings.
Here is the secret on how to see source code written in R. (Source code written in C, C++ or Fortran is another story).
Run methods(t.test). You will get the following output:
t.test.default* t.test.formula*
The * means that the method is hidden and not exported from its package (stats in this case). You can access it via stats:::t.test.default and you will get the code.
Comment: Thanks for the secret. I am doing an F-test to determine whether the variances are equal and calculating the degrees of freedom accordingly. I am not using the t.test function but getting the p-values from pt(). It was tempting to let t.test() do the calculations but needed to be sure what was going on. Thanks for this very valuable information.

Method used in t.test()


Is there a way to solve terminator artifacts?

Question: Has anyone found a way to fix the problem?
Increasing the subdivisions the artifacts remains, less visible because the polygons are smaller.
I have also attached Arnold image (Redshift is very similar) even with less subdivisions and more contrast that work better.

Comment: Artifacts in Cycles render
Comment: Related? https://blender.stackexchange.com/questions/66607/double-rounded-corner
Comment: It does not seem the same problem. I used a simple cube with the subdivision modifier.
I've read that it is a known problem, in Mental Ray was resolved many years ago, Renderman may still have this problem.
I would like to see if there is a way to fix it in the latest version of Blender 2.79.
Comment: Which renderer?
Answer: From blender 2.90, you can tweak this using the Object's Shadow Terminator Offset Shading property.
Answer: Terminator artifacts are a complicated topic of raytracing. From a technical point of view the normal of the face shows the way from the light source. Therefore the face is not illuminated by light and a shadow is cast at the right place.
Even if it is technically expected behavior and does not mean a "bug" - from the user's point of view this is often not the desired effect of smooth shading.

Source: wiki.povray.org
Simple measures to work around the problem are:

More geometry through subdevision
or create the normals with a high resolution mesh and back to the low res mesh
large area lighting

Some render engines work around this problem in different ways. Requests for solution of this problem are in the bugtracker for a while now. current information can be found here.


Loading a new view before the old one iphone sdk

Question: Probably just a simple question, but ive been building a little puzzle game and no decided i could do with a menu for it. Ive created the menu no problem i just cant get it to show before the puzzle. Ive tried changing the code in the appdelegate but its not liking it.
slider appdelegate.h
<code> #import <UIKit/UIKit.h>

@class SliderViewController;
@class MainMenu;

@interface SliderAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
    MainMenu *viewController1;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet SliderViewController *viewController;
@property (nonatomic, retain) IBOutlet MainMenu *viewController1;
@end
</code>
Slider appdelegate.m
<code>#import "SliderAppDelegate.h"
#import "SliderViewController.h"

@implementation SliderAppDelegate

@synthesize window;
@synthesize viewController;
@synthesize viewController1;

#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Override point for customization after application launch.

    // Add the view controller's view to the window and display.
    [self.window addSubview:viewController1.view];
    [self.window makeKeyAndVisible];

    return YES;
}
</code>
But doing that throws out an error:

error: request for member 'view' in
  something not a structure or union

I know its probably a stupid question but could anyone help please.
Answer: You need to import that class and make alloc the object first see this
Slider appdelegate.m
<code>#import "SliderAppDelegate.h"
#import "SliderViewController.h"
#import "MainMenu.h"//change here

@implementation SliderAppDelegate

@synthesize window;
@synthesize viewController;
@synthesize viewController1;

#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

   viewController = [[[MainMenu alloc] initWithNibName@"MainMenu" bundle:nil] autorelease]; // and here
    [self.window addSubview:viewController1.view];
    [self.window makeKeyAndVisible];

    return YES;
}
</code>
Comment: Cheers for that, slight problem though it just loads a blank white screen not the screen with all the buttons on.


Core Data objects not correctly returning data consistently with 10.7's NSPrivateQueueConcurrencyType contexts

Question: I have some existing Core Data code that uses the 10.6-and-earlier pattern of creating a new NSManagedObjectContext in each new thread, performing data modifications as appropriate, saving the NSManagedObjectContext (and thus to the persistent store), and then any other contexts that need the changes can observe NSManagedObjectContextDidSaveNotification and merge the changes.
For various reasons, I'm retrofitting this code to use 10.7's new multithreaded Core Data features, by changing the pattern so that all contexts I create are children of a shared context that has a NSPrivateQueueConcurrencyType.  I save the contexts, and then the shared parent observes the NSManagedObjectContextDidSaveNotifications, but instead of merging the changes as before, I simply save the parent, thereby propagating the changes that way.
I'm also using two persistent stores: one store backed by an SQLite database on disk, and one backed by an in memory store.  I'm storing cross-store relationships by saving the URI of the managed objects from one store in the other, like so:
<code>- (AFStoredTrack *)storedTrack;
{
    [self willAccessValueForKey:@"storedTrack"];
    AFStoredTrack *theStoredTrack = [self primitiveStoredTrack];
    [self didAccessValueForKey:@"storedTrack"];

    if (theStoredTrack == nil) {
        NSString *IDString = [self storedTrackObjectIDString];
        if (IDString != nil) {
            if (! [IDString isEqualToString:@""]) {
                NSManagedObjectContext *objectContext = [self managedObjectContext];
                NSPersistentStoreCoordinator *coordinator = [objectContext persistentStoreCoordinator];
                NSURL *objectURL = [NSURL URLWithString:IDString];
                NSManagedObjectID *storedTrackObjectID = [coordinator managedObjectIDForURIRepresentation:objectURL];

                NSError *retrieveError = nil;
                theStoredTrack = (AFStoredTrack *)[objectContext existingObjectWithID:storedTrackObjectID error:&retrieveError];

                if (theStoredTrack) {
                    [self setPrimitiveStoredTrack:theStoredTrack];
                }
            }
        }
    }

    return theStoredTrack;
}

- (void)setStoredTrack:(AFStoredTrack *)aStoredTrack;
{
    [self willChangeValueForKey:@"storedTrack"];

    NSString *stringRepresentation = nil;
    if (aStoredTrack) {
        NSManagedObjectID *theObjectID = [aStoredTrack objectID];
        if ([theObjectID isTemporaryID]) {
            [NSException raise:@"AFTriedToSetTemporaryStoredTrack"
                        format:@"You tried to set a temporary AFStoredTrack!"];
        }
        stringRepresentation = [[theObjectID URIRepresentation] absoluteString];
    }

    [self setPrimitiveStoredTrack:aStoredTrack];
    [self setValue:stringRepresentation
            forKey:@"storedTrackObjectIDString"];

    [self didChangeValueForKey:@"storedTrack"];
}
</code>
AFStoredTracks are backed by the on-disk store.  self is an NSManagedObject backed by the in-memory store.
This code worked perfectly well with the 10.6-and-earlier pattern.  However, it's failing in the retrofitted code.  For some reason, the AFStoredTrack objects that are being returned by the -storedTrack method are sometimes just empty shells (any retrieved attribute is just nil), and sometimes they throw up an exception saying that Core Data couldn't fulfill the fault.
What's weird is if I add this code to the -storedTrack method:
<code>- (AFStoredTrack *)storedTrack;
{
    ...

    if (theStoredTrack == nil) {
        ...
    } else {
        if ([theStoredTrack isFault]) {
            NSManagedObjectContext *objectContext = [self managedObjectContext];
            NSPersistentStoreCoordinator *coordinator = [objectContext persistentStoreCoordinator];
            NSURL *objectURL = [NSURL URLWithString:IDString];
            NSManagedObjectID *storedTrackObjectID = [coordinator managedObjectIDForURIRepresentation:objectURL];

            NSError *retrieveError = nil;
            AFStoredTrack *testTrack = (AFStoredTrack *)[objectContext existingObjectWithID:storedTrackObjectID error:&retrieveError];
            NSLog(@"AFStoredTrack: %@",testTrack);
        }
    }
    ...
}
</code>
then the AFStoredTracks are logged with the proper data, rather than being null or throwing an exception.  If you'll note, this is the exact same code used in the previous block to set the primitive storedTrack property in the first place.  It doesn't seem to make any sense.
I've checked to make sure that the AFStoredTrack and the NSManagedObject it's being accessed from are using the same context, too.  The on-disk data is all there in the SQLite file, just as it should be if the saves are happening as they should.  I've even logged the stored URI of the AFStoredTrack objects, and they're valid -- the URIs from the first block and the second block show the same managed object URI, even though the first one gets bogus nil data or throws an exception, and the second gets the correct data.

[UPDATE: Err, I take that back, the NSManagedObject and its AFStoredTrack primitive attribute don't have the same NSManagedObjectContext:
<code>- (AFStoredTrack *)storedTrack;
{
    ...

    if (theStoredTrack == nil) {
        ...
    } else {
        NSManagedObjectContext *storedTrackContext = [theStoredTrack managedObjectContext];
        NSManagedObjectContext *selfContext = [self managedObjectContext];
        if (storedTrackContext != selfContext) {
            NSLog(@"self context: %@, storedTrack context: %@",selfContext,storedTrackContext);
        }
        ...
    }
    ...
}
</code>
I'm getting log lines from this code snippet, and furthermore, storedTrackContext sometimes (but not always) logs itself as "(null)"!  Huh?!?  How can an NSManagedObject not have a context?  That makes even less sense.
Maybe something's changed, and it's not possible (or harder) to have attributes with NSManagedObject primitive values?]

Anybody have an idea of what's going on?
Answer:
I save the contexts, and then the shared parent observes the NSManagedObjectContextDidSaveNotifications, but instead of merging the changes as before, I simply save the parent, thereby propagating the changes that way.

It's actually the other way around. Changes are propagated from child up to the parent context automatically on save. Child context does not automatically receive changes in the parent context. If you need up-to-date data on the child context, you need to refresh objects.
That is why UIManagedDocument uses parent context internally and exposes child context for developers.
Best regards,
sven.


I went to turn on my air compressor which is 240v & the draw of it dimmed everything & the waterwell pulled power from everything in garage on startup

Question: My compressor is on its own 240 breaker by itself. While testing all wiring to the garage we noticed that one of the feed wires to the breaker box from the meter approximately 100 ft from from each other was putting out 123 volts & the other side read 0.03 so only half the box is hot. About 5 yrs ago we switched from overhead wiring to under ground for both house & garage & are separate from each other & all has new wiring breakers & boxes. In the garage I currently have all breakers removed except 1 breaker that operates the led lights & outlet boxes, 1 breaker that is connected to a motor home, & 1 that runs the pump for our water well Which the pump is above ground. The compressor breaker is pulled because I feel the motor is fried it had power to all the wires in the back of motor but doesn't work. Now back to the well, every time the well kicks on it draws enough power to dim the lights in garage almost totally out. The pump on well is 120 volt. I'm thinking I have a bad underground main wire from the meter to the breaker box or could it be something else. The power on both each of the  lead wires at the meter show 123 volts each. I appreciate any answer you can give. Thank you
Comment: When you undergrounded the wires to the garage, did you use a direct burial cable, or individual wires in conduit?
Answer: This is probably a classic supply line problem. If the pump is on an opposite leg from the lighting, it's "using up" limited neutral capacity due to a poor connection Dangerous. If the pump is on the same leg as the lighting, well (no pun intended), it's taxing a bad hot connection.  But I doubt that because the pump probably wouldn't even run.  As Ed, 3ph and Harp have repeatedly said here, this situation sounds like an open or compromised neutral feed.  Dangerous for everybody and everything. You're going to need to take measurements in various panels to make sure you have 240 across the hots and 120 to neutral and ground.  Just recently it was suggested in a situation like this to first contact the power company as they will come out for free to make sure their connections are solid.   Let us know what you find, we all learn from that.
Answer: I would first check at the feeder breaker, a loose connection there could be the issue , you have the sub in the garage open so you would have seen a problem there but make sure it's not a buss /lug issue.
Check the feed if you have both sides good there a break in the underground wiring is not uncommon, depending on the size of the cable it may be worth it to rent a cable tracer like the greenlee 521, these are really handy tools for finding faults (my rental place has them but it only takes a couple times to pay for one).
The cable can be repaired in ground with a possibly 2 splice kit(s) no box needed.
If the voltage is bad at the breaker check the breaker itself and the buss a bad connection to the buss can damage the position or buss depending on the brand panel.


What's the consensus

Question: I have 3 adult cats that were declawed. I just adopted 2 feral kittens found while raking. I feel badly that declawing is considered almost abuse now but I want to be fair to my 3 older (10+) cats. What should I do?
Answer: As I'm sure you've read/heard, declawing is increasingly seen as inhumane. Many vets no longer agree to perform it because of the large set of problems that it can cause, including:

bone and joint pain at quite young ages
inability to properly exercise due to an inability to jump and climb in many scenarios
increased risk of obesity due to the combination of the above
inability to perform self-expressive and soothing behaviors such as sharpening claws, stretching on a vertical surface, and kneading
inability to practice self-defense in case it is needed (such as if a cat got out of the house and became lost). In addition to safety concerns, this can lead to emotional issues like chronic fear.
emotional and behavioral problems due to trauma from all of the above

These are all real, proven concerns, and chances are that your older cats have suffered from at least one or two of these. You should certainly not subject your new kittens to such things.
I understand your concern for your older cats. Since they are not able to defend themselves, you need to be prepared to protect them from rambunctious kittens that still have claws. You have a few options in this regard:
Trimming Claws
Many people with indoor cats prefer to regularly (every few weeks) trim their claws. It can be an easy way to make the claws do less damage on human skin, furniture, and other pets. With trimmed claws, what would otherwise be a serious scratch might not even leave a mark. It really does help. You can google or ask another question if you want tips on training your kittens to allow you to trim their claws.
Separating Adults from Kittens
This will likely depend on how your home is arranged, but you may be able to provide a space for your adult cats that your kittens are kept out of when you are not around to supervise. This might include putting the kittens upstairs while the adults stay downstairs or closing the kittens in a large room when you are not home. Make sure that both groups of cats have access to all needed items: water, litterbox, food, toys, etc.
If you do this for a time and find that the kittens do not seem to be harassing the adults, then it is likely fine to stop separating them.
Rehoming the Kittens
I know that you just found and adopted these kittens recently, but there is no shame in finding them a new home if that would be best for your older cats. You might call around and find an animal shelter that would let you foster them until a permanent home is found, or maybe your vet knows someone who is looking for new cats.
I hope this helped, good luck!

What’s the consensus


How to remove Ubuntu on Virtualbox but keep the files?

Question: I would like to remove Ubuntu from my Virtualbox and install it again because it's not working properly so I would like to reinstall it. I wanted to know if there is a way to uninstall it and keep all the files that I already created since it's a lot of files. Thank you!
Comment: `sudo apt-get --reinstall virtualbox` or back up your files if they are system files (anything outside your home directory). Removing any program should not affect files in your $HOME directory, only system files. See
Answer: The thing virtualbox is good in is having more than one instances.
So ... create the NEW instance and do not remove the old one. Add a second adapter set to host-only on both guests and you can copy files over from old to new until you are satisfied.
And then remove the old instance.
Also for future reference: when your virtualbox setup is good enough for you make a backup of it each time you start something you are unsure of (like update, upgrades, install software, messing with configurations).
Answer: You can't keep files in a reinstall unless your /home folder is on a separate partition from the root. If you didn't use a custom partition structure during install, then all you can do is backup the files you want to keep and restore them after the reinstall.
In VirtualBox, load an Ubuntu Live disc image into the Virtual CD drive and start up your virtual machine. It should boot into a live version of Ubuntu. From there, you should be able to access your filesystem and backup the files you want to keep onto a USB drive.
Answer: My best advice is creating a /home partition. In this way you only have to change your system files (/ partition) and doesn't loose any files(or profiles like Firefox).
This topic has a good answer for you to do it.


Why didn't the Nameless Ones try to punish "sinners" other than Arha and Ged?

Question: In "The Tombs of Atuan", how come that The Nameless Ones didn't punish Ged for his initial intrusion of the labyrinth, Kossil for lighting up a fire in the Undertomb (while uncovering Ged's supposed grave) and Manan for traveling into areas forbidden for anyone but the high priestess, yet they did try to hurt Arha and Ged during their final flee from the labyrinth ?
Answer: The Nameless Ones were dark powers of the Earth.  The religion built up around worshiping them was largely irrelevant to them; they did not care about their holy places being defiled by people entering where they were not "supposed" to be.  They did, however, care about Ged's attempt to remove an item of great magical power from their possession.
From the moment of Ged's arrival in the labyrinth, the Nameless Ones had some sense that he was their enemy, but (with some effort) he was able to hold them off while he searched.  However, once he had penetrated to the treasure chamber and then retrieved the lost half of the Ring of Erreth-Akbe, they turned their full wrath against him and Tenar (Arha) who was helping him.
In general, the dark powers of the Earth that appear in the early Earthsea stories do not act according to comprehensible human motives.  They are evil, but their underlying motivations are never explained.  These include the Nameless Ones (although whether there are really more than one separate entity under that name is ambiguous), the Terrenon in Osskil, and (according to Sparrowhawk) the shadow monster named Ged.
Comment: It's not clear what the shadow was.  It shares a name with Ged, which is suggestive.  Personally, I think the most likely explanation is indeed that it is part of Ged the wizard, but it's still a mystery.  My remark was based on the fact that Ged (who is in the best position to know) tells Tenar that the shadow was akin to the Nameless Ones.
Comment: Buzz, you might want to reread the last few pages of *A Wizard of Earthsea*... seems pretty straightforward. In any case, nowhere in le Guin's work is Ged's shadow described as a Nameless One/one of the old powers of the Earth.
Comment: The shadow monster was not a Nameless One of the earth (although its name was not known until the end of *A Wizard of Earthsea*): it literally was an aspect of Ged himself.
Comment: Excellent answer, thank you.
Comment: As I said, that origin for the shadow is the most likely one in my view.  However, Ged straight out tells Tenar that the shadow and the Nameless Ones are akin.
Comment: Ged mentions to Tenar that he is tired and exhausted from continually using magic to keep the nameless ones confused and asleep in order to prevent them from punishing him.
Answer: The Nameless Ones were only half-aware that Ged had entered the labyrinth, and probably didn't notice Kossil and Manan's transgressions at all.

'Because every instant since I set foot in cavern under the Tombstones, I have striven to keep them still, to keep them unaware.  All my skills have gone to that, I have spent my strength on it.  I have filled these tunnels with an endless net of spells, spells of sleep, of stillness, of concealment, and yet they are still aware of me, half aware, half sleeping, half awake.' - Chapter 9

Only when Ged and Tenar took the talisman from the treasure room did they truly begin to awaken.
Answer: Since Ged had entered the Tombs, he had used his Mage skills to weave 'a vast network' of spells of concealment and sleep on the Nameless Ones- the powers of the Earth of that particular spot- for his own purposes.  It was for that reason that Kossil's transgression of lighting the undertomb went unpunished, as well as Manans.
Well- not entirely unpunished.  They did after all in the end, drive Kossil mad- just as Tenar said they would in retribution.... as well as, it could be argued, taking Manan's life.
I don't believe the Nameless Ones were inherently evil in the sense that we would traditionally describe or understand evil, though they certainly were dangerous and destructive.
Going by what Ged described:  They simply hated all light, and all life equally, and did not want it there, in its space.  The plural, 'they', seems significant- both by the agelong tradition of the cult referring to Them as such, and the multiple tombstones themselves.  But they were powerless to do anything positive or of benefit; they could only darken and destroy whatever crossed their path.  And they were something different at an earlier time, hence the tombs... and were immortal and undying.  Aside from this, we really don't know much else.
Conversely, there were other places in Earthsea that were perhaps equally powerful but something of an opposite force, such as the Immanent Grove on Roke.   But as Earth powers they were not, at least as it was explained, beings in a sense- but WERE inherent parts of the Earth, that could never be moved, or could move themselves from where they were located.
For some reason They made an exception for Arha, in some way grudgingly accepting her as a sort of guardian of the Tombs, but pretty much on a 'one strike you're out' basis.  She was their hands they otherwise would not have, as Ged said.  Whether this was because her soul indeed was the First Priestess endlessly reborn, or because the cult had coaxed Them into this sort of passive acceptance of one woman only, so anyone could play the role (provided they were a woman, this was for some reason required), was never entirely established imo.
In the Tombs of Atuan, the suggestion is she was simply a girl picked through the rites of an archaic, age old cult and taught to be a slave of the Tombs- with her mind essentially being fogged and confused into believing it as she dwelt on in that space.
But in later books, LeGuin suggested something more.  Even though Ged clearly stated to Tenar that Arha must die for Tenar to leave the Tombs and be reborn-- in the book Tehanu, Tenar makes several references to calling upon Arha to help and advise her in defense against Magery- even crediting Arha for defending her.  Others who deal in magic as it were refer to her in several instances as a 'witch'- perceiving this about her- even though she herself by and large forsook her earlier life entirely, choosing instead to be an everyday farm wife.  So in a sense, it is suggested she still had some sort of inherent Old power about her.   This could be perhaps because she WAS in fact, the same soul who had inhabited the Tombs in earlier lives.  It also clearly suggests that Arha did not die- as Ged had so gravely informed her would happen when he gave her the choice and decision of leaving the Tombs back in the Atuan book.  A few strange lines in the Tombs of Atuan appear to support this also:
"Sometimes she thought she remembered. The dark places under the hill were so familiar to her, as if they were not only her domain, but her home. When she breathed in the drug-fumes to dance at dark of the moon, her head grew light and her body was no longer hers; then she danced across the centuries, barefoot in black robes, and knew that the dance had never ceased."
So what is the real answer?  Was Tenar taught to be Arha, or was she in fact, Arha?   I would say unless you had conversed with Leguin herself on the subject, the answer is well, a mystery.
Comment: This looks like a very nice well reasoned first answer! The only thing that I would add is that you may want to [edit] a TL;DR section into the answer and [edit]ing in evidence such as quotes where appropriate is always a win-win!


SQL Server Always On Availability Group

Question: I have problem with MS SQL Always On Availability. Suppose the connection between primary and secondary replica is broken. The client inserts data to the primary database (replication cannot be done because of disconnection) that committed. Then the connection between client and primary database is disconnected. Now the client should be connected to the secondary database but it has not the last inserted data by the client. How does this problem can be solved?
Answer:
The client inserts data to the primary database (replication cannot be done because of disconnection) that committed.

That can only happen if you configure the replica to be in Asynchronous-commit mode;

Asynchronous-commit mode is a disaster-recovery solution that works
  well when the availability replicas are distributed over considerable
  distances. If every secondary replica is running under
  asynchronous-commit mode, the primary replica does not wait for any of
  the secondary replicas to harden the log.

https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-always-on-availability-groups?view=sql-server-2017
In that scenario you must choose between restoring service and losing data.  If the secondary is in Syncronous-commit mode, the primary will wait on commit until the log records for the change are hardened on the secondary.
Comment: If a synchronous-commit secondary replica times out without confirming that it has hardened the log, the primary marks that secondary replica as failed. The connected state of the secondary replica changes to DISCONNECTED, and the primary replica stops waiting for confirmation from the secondary replica. This behavior ensures that a failed synchronous-commit secondary replica does not prevent hardening of the transaction log on the primary replica. [link](https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-always-on-availability-groups)
Comment: Yes in that scenario you are running unprotected, which is deemed preferable from going offline.  You can go offline instead if you configure cluster quorum to be lost in that case.
Answer: Very simplified, but when the connection between primary and the replica is lost, one of them (primary or replica) will no longer have a quorum. AlwaysOn is designed that way that you should be able to have only one quorum at the time.
Node without the quorum will become not available for connections and wait until it can belong to quorum and data are synced.
So the scenario you described is not possible, client will not be able to connect to the replica after inserting data to primary.
Comment: I couldn't understand why it is impossible the client connects to the replica! After disconnection happened between primary and client so for availability client should connect to the replica.
Comment: When replica will lose connection the the quorum (assuming Primary will keep the quorum), it will change its state to DISCONNECTED and will not let the client connect.
Comment: So in this situation what does mean availability?! We want to have several servers that in some disasters or usual disconnections, the system automatically uses secondary servers transparently to reach high availability.
Comment: It is your responsibility to build your cluster that way so when a node or part of network is down, surviving nodes can establish a quorum and then you can use secondaries. Or you can make a call and force replica to accept connections with potential data loss.
Answer: I think, first you need to identity what causes disconnection between Primary replica and Secondary replica, also you must have alerts in place which notify as soon as the synchronization stopped with any error.
For troubleshooting and making stable connection between Primary - Secondary replicas..
Alerts:
USE [msdb]
GO

-- Alert when Always-On Data Movement Suspended
EXEC msdb.dbo.sp_add_alert @name=N'AlwaysOn - Data Movement Suspended',
        @message_id=35264,
        @severity=0,
        @enabled=1,
        @delay_between_responses=0,
        @include_event_description_in=0,
        @category_name=N'[Uncategorized]',
        @job_id=N'00000000-0000-0000-0000-000000000000'
GO

USE [msdb]
GO

--- Alert when Role Changed
EXEC msdb.dbo.sp_add_alert @name=N'AlwaysOn - Role Change',
        @message_id=1480,
        @severity=0,
        @enabled=1,
        @delay_between_responses=0,
        @include_event_description_in=0,
        @category_name=N'[Uncategorized]',
        @job_id=N'00000000-0000-0000-0000-000000000000'
GO

Now the client should be connected to the secondary database

I don't think you should do this since you already aware the secondary database stopped with replication.
Instead, you may want do anyone of following:

Redirect client application connections to primary replica name/IP which pointing to Listener name, in this case you must bring AG online and switch client connection to listener name ASAP
Announce the down-time and bring AG online (with above mentioned reference link), let client application connects on listener name as it was.

SQL Server Always On Availability Group


In Linux, how to get the man page for compiled programs?

Question: I know that installing a package through APT (apt-get or aptitude for my computer) will automatically install the appropriate man pages and update the man database. When I want to build the same packages, however, no man page is installed and I cannot use man for that program. How do I get the man pages for software I have compiled? (I am running Ubuntu 10.10).
Comment: Are you trying to build a `deb` package, or are you compiling then installing with `make install`? If the former, post your `debian/rules`. If the latter, explain how you configure the program (did you run `./configure`, did you edit the makefile, what variables did you pass to `make`, etc.).
Comment: I used cmake to configure the program; the command line was `cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local`. I then ran `make && sudo make install` as usual.
Answer: Are you configuring your software build with the default locations (in /usr) and installing as root?  (but not building as root i hope).  If so, then the man pages, if there are any, should be installed where man can already see them.
If you are installing to a nonstandard location, you need to let man know where they are.  You can use the MANPATH environment variable to do this.  Set it to the normal man directories, and add your install dir to it as well.  Something like export MANPATH=/usr/share/man:/path/to/your/dir
EDIT: Also, I am not sure about the 'man database'.  There really isn't one.  There are some distributions that do post processing of the man pages, either compress it, or uncompress it.  But they don't really keep a list of man pages anywhere. In pseudo code:
for DIR in $MANPATH
    for SEC in $MANSECTIONS (or just the one section if you give as `-s SEC`)
        open dirlist for $DIR/man${SEC}
        in dir list list, look for $COMMAND.$SEC
        if you find it, display and exit

This may be your issue.  If you installed to a non-standard dir, is the naming convention right? If you have a file bubba.1, then the file should be installed into some path /path/to/bubba/install/man1/bubba.1 and MANPATH=/usr/share/man:/path/to/bubba/install
Comment: Also, if there is no 'database', how come there are folders for man-db and there is a program called 'mandb'?
Comment: OK, thanks. Whenever APT installs a package, it almost always says at the end somewhere 'Processing triggers for man-db...'.
Comment: I sometimes configure my software to compile in /usr/local, that could be the problem. I am not compiling as root, but I am installing as root (make; sudo make install). However, I don't think that the man pages are there (I looked in the man8 folder).
Comment: @AniDev: i have no mandb on my system.  For my above comment, I ran strace on my man command to see if it hit a db, it did not.  I can not say for all versions of man whether or not they use one.
Comment: Does not quite answer my question, but helpful nonetheless, so I am marking your answer as my accepted answer.


Kanban standup with no blockers/stoppers

Question: In a kanban project, a daily standup meeting must be help to discuss the stoppers (blockers) in the project. However, some of the developers are asking if, in days in which no stoppers are present at all, we should still have the meeting. Should we skip the meeting or have it to discuss just the overall progress?
Answer: Identifying blocked work isn't the only thing that can or should be done in a daily standup. It's a good opportunity for the team members to align on what everyone is planning to do, if someone will need help from someone else, and how to best get one step closer to achieving the desired outcomes.
Since you're using Kanban, you're probably using flow metrics like cycle time and throughput, have work-in-progress limits, and track work item age. If you have cycle time SLAs, you can use work item age to see if anything is progressing slower than expected and understand why, even if it's not necessarily blocked at the point in time. You can get ahead of potential problems.
Since a daily standup is short, I don't see a reason to skip one. Instead, I'd focus on making sure you're getting the most out of that time by looking at all the relevant data and getting the team on the same page.
Answer: "Daily Stand-Ups" Aren't Required
Kanban is a pull-queue methodology that uses a board to visualize status. While your team may have borrowed the practice of daily stand-ups from XP or Scrum, there is no requirement in "kanban" to hold one at all, ever. The only teaming requirement is kaizen, which is to practice continuous process improvement. This is more akin to Scrum's Sprint Retrospective than to its Daily Scrum event.
Re-Examine Your Process
Essentially, you're asking the wrong question. If your physical or digitial kanban is accurately reflecting status and performing its function as an effective information radiator, where is the requirement for a daily stand-up coming from? It's clearly not the team, so it's being imposed from outside the team; this is generally an implementation problem.
Most of all, you should ask the team how they want to coordinate their work. Again, while not defined by kanban-the-tool or kanban-the-practice, empowering the team to self-organize around the work is a central tenet of agility, and should be your primary source of information. If the team is successfully meeting its working agreements with the organization, then how the team does it doesn't really matter. If it's not, then kaizen should be routinely employed until the team is able to either meet its agreements or adjust the working agreements to reflect reality. Either outcome is acceptable from a process perspective.


difference between might and would in the past

Question: However drunk he might come home she would always please him / however drunk he would come home she would always please him.
Could a native speaker please tell the nuance I can't hear between might and would in the context. Both denote a habitual action in the past . But what's the difference. Thanks .
Comment: Neither of those is really an idimatic way of saying what you want. The sentence "he would come home drunk" is idiomatic as is "he would come home very drunk" but the use of 'however drunk he might come home' is not what a native speaker would say. What we would say would be 'However drunk he might be _when_ he came home". Don't ask me why, it's just the normal usage.
Comment: However drunk *he might have been* when he came home,
Answer: might does not really denote habitual action in the past, although in this phrase the meaning of habit touches it because of the second 'would' ('she would always please him').
I would rather connect might with However as they occur in structures like:

However this might affect her family, she will still have to leave.

Might is rather related to the idea of possibility or eventuality, and that in the past, as well. So your first version of the sentence looks like a habitual possibility in the past, if that makes sense, and it is habitual because of the context, not necessarily because of might. I understand something like:

However drunk it would be possible for him to come home, she would always please him.

As for would in your second version of the sentence, I do not think there is any ambiguity there.
Answer: Although the grammar here is a bit odd, the difference in nuance between might and would in this type of conditional is that would generally refers to events that already happened, while might may also include hypothetical events.
In your example sentence, it's possible that he hasn't ever came home drunk yet, but using the might sentence can still make sense if you wanted to say that "even if he does come home drunk, she would still please him".
Using would seems to have a stronger implication of it actually have happened before.


Android - is there any difference in efficiency between android:onClick and implementing an OnClickListener (referring to a Button mainly)

Question: I have just come across the android:onClick="myCrazyMethod" XML attribute, seems pretty clean and simple.
I was just wondering though if there is any difference in performance between this approach - declaring a simple method and creating an OnClickListener class?
Answer: There is no noticeable difference. The choice is simply developer's preference.
Answer: There is no significant difference, so you should use whichever one's cleaner. android:onClick is implemented using runtime introspection, so it's technically slower, but we're splitting hairs at this point =)
Answer: Declaring it in the XML is ever so slightly slower but not by much. However defining the onClick within xml can lead to problems with proguard (unless you implement the code below). Personally I feel the easiest is using a switch and case within the onclicklistener, but if the method is a lot longer then it's nice to give it it's own method so to "hide" it away. If you however need common code to run after any button is pressed (for example a UI refresh) might be better to leave it to a switch and case or if/else. However, all of this is of course my opinion on the matter.
// Just to add for those wanting to use OnClick within xml and proguard
Add this:
-keepclassmembers class * extends android.app.Activity {
 public void *(android.view.View);
}


Should you expose JPA's in your view layer?

Question: In an MVC model, should you expose your JPA objects in the control/view layers or should you proxy those objects with another object. I'm not suggesting giving access to the DAO outside of the model layer, just the JPA objects. I see...
The benefit of using the JPA objects is that you don't have to needlessly copy all the data back and forth between the JPA and the proxy object. I guess the con is simply that it may not perfectly fit the MVC model to allow model layer objects visibily in the view layer.
Answer: I would say it's okay, unless there's a clear benefit to maintaining layer purity, or harm caused by passing model objects to the view layer.
I don't like the idea of parallel object hierarchies - it's a lot of work to create DTOs just for the sake of ferry data between layers for the sake of object purity.
I always thought it was caused by "chatty" communication between EJB 1.0 entity beans that inspired this anti-pattern.  Why keep it alive now that we have EJB 3.0?


Nintendo Switch Joy-Con Lights Up

Question: I've noticed that after connecting my Nintendo Switch Joy Cons to my computer, the small gray ring around the home button starts to light up. I looked around the settings of my Nintendo Switch, and found that in the 'Notifications' Section, you can find a spot that says 'Notification LED and Vibration'. I'm assuming that LED refers to the LED light on my right joycon. My question is, why haven't I ever seen this before, and what is the main use of it? I'm assuming that Nintendo can light it up when there is a new update for the Switch, but are there any other uses (and is my prediction correct?)
Answer: I have just found this about the joycon light :-
Tue 10th Sep 2019
On your right-hand Joy-Con and your Pro Controller, you'll notice that the HOME button has a ring around the edge. As you may or may not already be aware, that ring is actually an LED light; we've seen it light up before but only when a Pro Controller connects to Steam.
Starting from today, thanks to a Switch system update which takes the console's firmware to Version 9.0, the light will finally be used for "alarm notifications". You can see how that works below:
Alarm Notifications have been added to System Settings > Notifications.

You can check or delete pre-set alarms.
Alarms can be set up only within supported software (to be added at a later time).
A controller firmware update may be required to use this feature.

So yes, you are correct with your prediction. As for any other uses I am unable to find anything other than the Alarm notification and Pro control connecting to steam.
Comment: I have not used it myself but I think Ring Fit Adventure has an alarm feature.

Nintendo Switch Joy-Con Lights Up


Does Yosemite Beta update itself to the final version?

Question: The title says it all, I think.
I am installing Yosemite onto a MacPro, and doing it from a Yosemite Beta installer I moved to a thumb drive. It looked like it went well, and it updated itself about 8 times, version 2-6, and then an "OS X Update Combined Version 10.10.5". Does that final update mean I have the full regular install, or is it still a Beta?
Comment: The downvote with no comment is always appreciated.
Answer: No - in general, the builds that are GM Candidates are marked as final and you need to go install the correct update intentionally. Sometimes a 10.x.1 update arrives in time for you to jump on that automatic update, but you should follow the specific directions bases on how you obtained the beta for how to get back on release updates. The steps differ for different programs.
Comment: Thank-you. With all the updates that took, I'm still curious to understand what the difference is between what I have and a non-beta installation.
Comment: @JoeTaxpayer One difference is if your Mac has a profile that enables beta updates through the app store. The other would be the pure code changes between any two arbitrary builds. You could use a file comparison tool like Kaleidoscope or use Time Machine `tmutil compare` to compare what changed between backup intervals or the current system and a specific snapshot time. Since you put combo updates on top of a build that might be missing some frameworks, you could have some oddball missing items or everything could be totally replaced...


Can smart contracts be set up on a side chain or 2nd layer solution?

Question: I am not even personally convinced of the utility of smart contracts, but that aside, is it theoretically possible for a side chain or second layer solution to utilize/implement smart contracts? Ie is there is possibility that the 'DeFi' space eventually transitions to simply being a 2nd layer solution on the BTC network instead of on ETH, etc...? Not so much asking about likelihood, just feasibility given the structure of the BTC network and what is possible with sidechains/2nd layer solutions.
Answer: Yes. Given that many applications for smartcontracts would have vastly diverging blockspace and interaction frequency requirements from the payment usecase, segregating such usecases onto sidechains or second layer networks with different performance trade-offs seems like a promising approach. There are already tentative beginnings of such a development. You may find it interesting to read for example more about:

RSK
Liquid
Lightning Network
Discreet Log Contracts
Etleneum
Simplicity
RGB
Drivechains
OP_CHECKTEMPLATEVERIFY
Answer: What is a smart contract?
Smart contracts go beyond the vending machine in proposing to embed contracts in all sorts of property that is valuable and controlled by digital means. Smart contracts reference that property in a dynamic, often proactively enforced form, and provide much better observation and verification where proactive measures must fall short.
Computerized devices that respond to the environment according to price signals or other contractual terms, customer preferences, and other states or events that are encoded in them or that they are encoded to respond to. Many smart contracts in the future may be programmed using a contract drafting language for specifying their event-driven behavior.
If a loan was taken out to buy that car, and the owner failed to make payments, the smart contract could automatically invoke a lien, which returns control of the car keys to the bank. This smart lien might be much cheaper and more effective than a repo man.
Smart contracts allow a new freedom of contract that is no longer possible, if it ever was, with traditional law.
https://nakamotoinstitute.org/the-idea-of-smart-contracts/
https://unenumerated.blogspot.com/
What is DeFi?
Being honest, its the new buzzword for selling your tokens to newbies for most of the projects. DeFi or Decentralized Finance in reality could be a term used for financial applications that use decentralized protocols.
Are smart contracts and decentralized finance possible with Bitcoin?
Yes

Is it theoretically possible for a side chain or second layer solution to utilize/implement smart contracts?

Smart contracts can be written using solidity for Rootstock (sidechain) and simplicity for Liquid (sidechain)

Is there is possibility that the 'DeFi' space eventually transitions to simply being a 2nd layer solution on the BTC network instead of on ETH?

Not sure if we should use the term "DeFi" for financial applications on top of a chain that is not decentralized, projects involving few people, governance tokens with most of the supply with VCs and devs.
Also any transition depends on market and people involved in Bitcoin projects. Honestly, lot of Bitcoin developers don't get the appreciation they deserve for working on some of the projects. Example: Confidential transactions for Elements based sidechains, Oracles using discreet log contracts, Bisq, Joinmarket, Rootstock etc.
Lot of things are being done on Lightning Network. Its difficult to keep a track of everything happening in this space but recently saw this video for a project which provides a market place to incentivize people to seed torrents by paying with sats over the Lightning Network.
https://www.youtube.com/watch?v=yP17YweWxPk


Cocos2d problems, after a few scene changes, touches on sprites at screen edge not working

Question: My game app is nearly finished, but i still have to overcome a strange problem.
The game is about touching sprites, when touched they rotate.
But after a few scene changes or in other word, level chances, the sprites on the border of the iphone screen are difficult to touch. i have monitored the touches. the touches are not even registered by the method:
-(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event{
When i touch beside the sprite the touch is registered. I suspect that it has something to do with releasing previous scenes or releasing sprite-arrays or maybe deallocing the sprites...
I just don't now how to handle this yet, and how to neatly switch from the level selector scene back and forward to the play-field scene.
Maybe someone else reading this forum had the same problem and has solved it.
ideas and suggestions are very appreciated.
Btw: in the credits scene of my first game i will mention the stackoverflow.com site and its members for their help, it's a great forum.
Thanks guys, i am nearly there!
As Steve Jobs would say: O, there is one more thing . . .
----------------------------- update ---------------------------
Hi,
Here is an update,
I started to release the Array's in the onexit method, but that brings no joy.
Every release call results in a crash, probably arc releases them before i do.
Something that seems to help and shift the problem a few levels further down the road is the fact that i am releasing sprites, direct after they were added to the sprite array.
It looks to me that i am on the right track, but still the problems comes back after a while.
Johan
---------------------------- second update --------------------------
Hi,
The previous update that suggest that the problem would become less is not right.
The game is still suffering with the touch problem.
I narrowed it down to the scoreboard-scene and the play-level scene change. The scoreboard scene is probably the problem maker, but where?
I only use 4 sprites here, and some moving actions, which will come up when some parts off the score is beter than before.
The scoreboard scene is using timer methods, but i invalidate and "nil" them on the onexit method.
I am still very puzzled.
Johan
------------------------- update 3 -----------------------------
Oke SO is not a forum,
But i must say it's a great portal to post problems concering programming.
In this case i cannot reveal all the code, which would be part of this problem, I guess it would show too much intellectual information about this game, i am very sorry for that.
i am interested to see if someone else reading this SO site had the same problem and found a solution for it. I would be very greatfull when one of them would give me some guidelines to solve the touch issues.
I am very sorry for misunderstanding the SO site, but still i am hoping for an answer from one of the SO visitors.
Meanwhile, i am trying to solve the problem myself. If i find the solution before someone else gives me some help, i will post the solution to help other SO-visitors.
-------------------------FOUND THE SOLUTION FOR THIS PROBLEM --------------------------------------
As mentioned earlier, this is my first app. Probably like other beginners, sometimes we experience weird problems. Scratching the head does not help. I had a few problems before which were solved, one with help from stackoverflow.com. But it was not as weird as this touch problem. The app also sovered from instability, not mentoined earlier in this text.
Below you find the solution for both problems, touches and instability. I make a confession here, it was a beginner fault. I had fired NStimers and schedulers in the app, when the level was finished i switched to another scene WITHOUT Unscheduling the related scheduler. STUPID ME!!! I discovered a weird behaviour when the log showed me somethimes more than 45 calls to the same init of the scoreboard scene, what the f**k?
So, i changed the call from the one scene to the other scene, killed the schedulers and timers and WHOLA! The touch problem is solved as well as the stability is back again.
What can you expect when a init or whole scene is called 50 times in a second!!!! It's a time bomb with a very short fuse!
So, here is to all the other object C++ starters, but probably you already know this, but anyway i cannot hold it to my self anymore: "THINK AHEAD WHEN YOU WORK WITH SCHEDULERS AND TIMERS!!!"
I have learned my lesson.
Now i am back on the track and hopefully will finish te App soon!
Greetings,
Johan
Comment: SO is not a "forum", read the FAQ, specifically don't ask for opinions (ideas, suggestions usually fall in this category). Be concise, explain the problem, provide relevant code (very important), explain what you tried and observed, ask a specific question. Without code, it's like describing a photo to us in words - it's neither efficient nor accurate.
Answer: -------------------------FOUND THE SOLUTION FOR THIS PROBLEM --------------------------------------
As mentioned earlier, this is my first app. Probably like other beginners, sometimes we experience weird problems. Scratching the head does not help.
I had a few problems before which were solved, one with help from stackoverflow.com.
But it was not as weird as this touch problem. The app also sovered from instability, not mentoined earlier in this text.
Below you find the solution for both problems, touches and instability. I make a confession here, it was a beginner fault.
I had fired NStimers and schedulers in the app, when the level was finished i switched to another scene WITHOUT Unscheduling the related scheduler. STUPID ME!!!
I discovered a weird behaviour when the log showed me somethimes more than 45 calls to the same init of the scoreboard scene, what the f**k?
So, i changed the call from the one scene to the other scene, killed the schedulers and timers and WHOLA! The touch problem is solved as well as the stability is back again.
What can you expect when a init or whole scene is called 50 times in a second!!!! It's a time bomb with a very short fuse!
So, here is to all the other object C++ starters, but probably you already know this, but anyway i cannot hold it to my self anymore: "THINK AHEAD WHEN YOU WORK WITH SCHEDULERS AND TIMERS!!!"
I have learned my lesson.
Now i am back on the track and hopefully will finish te App soon!
Greetings,
Johan


Are there traces of Old Turkish in ancient Germanic languages?

Question: The question is quite clear and understandable as in the title. Are there traces of Old Turkish in ancient Germanic languages? Or traces of Germanic in Old Turkish?
Answer: Old Turkish was spoken in what is now Mongolia and Xinjiang. These are very far from the areas where Old Germanic languages were spoken. There are no "traces" of Old Turkish in ancient Germanic, nor of Germanic in Old Turkish.
Comment: @jknappen. The question was about OLD Turkish and ANCIENT Germanic. "Horde" does not enter German until the 15th century. https://www.dwds.de/wb/Horde
Comment: The article in this link mentions the Proto-Germenic root  dīsi "lady" and states that its origin is unknown. tişi "female, she, hen" in Old Turkic shows a perfect parallelism. I still can't be sure. sgr.fi/sust/sust266/sust266_kroonen.pdf
Comment: For the other direction, Gagauz and Crimean Tatar are possible candidates of Turkic language to absorb some Germanic words.
Comment: A somewhat higher level no answer would be desirable. I am sure that the preserved Gothic vocabulary is analysed by etymology, and some substantiated claim about the presence or absence of Turkish relations can be made. I'm pretty sure it comes down to "no" or "only one or two words", but having a reference would be good. For a rather old trace of a Turkic (in this case originally Tatar) word in German, one can look at *Horde*, https://www.duden.de/rechtschreibung/Horde_Bande_Gruppe
Comment: @SamiBülbül: Interesting paper, but Kroonen does not make the connection to Turkic and the consonants do not really match.
Comment: It is not at all implausible that Germanic and Turkic populations were in contact during the Migration Period; the linguistic affiliation of the Avars is unknown, but a Turkic origin is a serious proposal, and they were in contact with the Langobards, at least.
Answer: At the very least the appurtenances of Old Turkish linear script and common Germanic Runes prove they belonged to the same exchange network in the bigger picture. Terms that do appear in the writing of the Middle High period could hypothetically be older under the influence of standardization. A few linguistic traces of these fact aren't unexpected, but the borrowing process is more likely transmitted by intermediaries.
NB: Pfeifer notes about Ger. Köcher (quiver), "hunn. *kukur (als einzige Entlehnung aus dem Hunn.)." – Viz. the only loan from Hunnic.
Comment: The reason why Turkic "runes" are called "runes" by modern linguists is because of their superficial similarity to Germanic runes. By the same reasoning, one would conclude that Tifinagh and Germanic must be "related". A better (still bad) linguistic argument is the similarity between Germanic "thunder" and Turkic "Tengri" (the sky god).
Comment: Oh no yes that is much better.


Showing text as link in InfoPath form 2013

Question: Hi I am creating a InfoPath form using designer 2013. I am struck at a point where I am unable to make a url to show as text which can be clickable in the form once saved. How can I achieve this.
Answer: You can accomplish this by adding a hyperlink:

Click on the insert tab on the ribbon
Select Hyperlink

FIll out the wizard:

Your url will now display as your text:


What is the ruling on a dropped third strike and first base being unoccupied because a runner is stealing?

Question: If a runner is stealing the second base, and the catcher drops a third strike is first base considered occupied or can the batter run to first and be safe?
Answer: According to the MLB rules 5.06(a), a runner occupies a base when:

Occupying the Base

(1) A runner acquires the right to an unoccupied base when he touches it before he is out. He is then entitled to it until he is put out, or forced to vacate it for another runner legally entitled to that base.

So in this case, if the runner had reached second base before the ball reached the plate (and thus became a "dropped third strike"), the batter would become a runner.  If the runner was still on the way to second base, the batter would be called out.
In most instances, the runner will not have reached second base prior to the pitch crossing the plate, and thus the batter will be simply called out (unless the runner left while the pitcher was still holding the ball and nobody paid attention; this happens sometimes when a team is down by multiple runs late in the game and the runner on first is not the tying or winning run).


placed conf file in sites-avaialable, document file is there in /var/www/html, enabled site, made entry of domain name and ip in /etc/hosts

Question: I have an aws EC2 instance ubuntu18.04. To host a site i made a conf file in sites-available, placed the document in /var/www/html, has enabled the site with a2ensite and made the host entry in /etc/hosts. ip of my instance in browser is still serving apache default page instead of page i have made. Kindly let me know if this is not the right process.
Answer: Most likely the default virtual host is overriding the virtual host you created. You can try to disable it using the following commands:
<code>a2dissite 000-default.conf
service apache2 reload
</code>


Is this a valid technique when calculating limits

Question: I recently came across the limit
\begin{equation}
\lim_{x \to 0} \frac{\sin(\tan^2 x)}{1 - \cos x}
\end{equation}
Now I know this limit can be evaluated using the half angle identity or by l'Hopital's rule but I recently tried a method that yielded the correct answer but I don't know if the method is always correct or if it's even mathematically valid. It goes as follows.
\begin{equation}
\lim_{x \to 0} \frac{\sin(\tan^2x)}{1 - \cos x} = \lim_{x \to 0} \frac{\sin(\sec^2 x - 1)}{1 - \cos x}
\end{equation}
at this point I realized I can't simply substitute $x = 0$. My intuition behind this was that although $\sec^2(0) = \sec(0)$, the functions grow at different rates, so when used in a ratio, the $\sec^2x$ answer would be greater than the $\sec x$ answer. So I made the substitution $\lim_{x \to 0} \sec x = \lim_{h \to 0} 1 + h$. This would change the limit to
\begin{align}
\lim_{h \to 0} \frac{\sin((1 + h)^2 - 1)}{1 - \frac{1}{1 + h}} &= \lim_{h \to 0} \frac{(1 + h)\sin(h^2 + 2h)}{h}\\
&= \lim_{h \to 0} \frac{(2 + h)(1 + h)\sin(h^2 + 2h)}{h^2 + 2h}\\
&= \lim_{h \to 0} (2 + h)(1 + h)\frac{\sin(h^2 + 2h)}{h^2 + 2h} = 2
\end{align}
So is this method vlid, or was I just lucky and it happend to work for this case but would fail for most others? I originally had $h$ as an infinitesimal when I first tried this.
Comment: The argument is correct. It would have been clearer with the substitution $\sec x=1+h$.
Comment: Your method is fine. As you say, there are many ways to solve the problem without L'Hospital.
Comment: What do you precisely mean by "in a ratio, the $\sec^2 x$ answer would be greater than the $\sec x$ answer"? What are you comparing exactly?
Comment: @Brody I am comparing the rate of growth. If I don't consider the square and treat $\sec^2 x $ like $\sec x$ the limit would evaluate to 1, while If I do consider the square the limit would evaluate to 2.
Answer: Your technique is correct. It is using substitution. Similar to substitution in definite integrals you need to change the numerical value of the limit (which you did correctly). Determining what substitution is best will come with time and practice. Knowing basic limits (like you knew $\lim_{x\rightarrow0}\frac{\sin x}{x}=1$) is helpful. You should be able to find plenty more examples of this technique here on SE.
Here is an example I recently saw that you may want to think about what substitution you'd use:
Calculate a limit $\lim_{x \to \pi/2} \frac{\sqrt[4]{ \sin x} - \sqrt[3]{ \sin x}}{\cos^2x}$


Every non trivial subgroup of an infinite cyclic group is infinite

Question: Here is my idea to prove this: I've already known that every subgroup of a cycle group is also cycle. Let $H=[a] $ be a subgroup of the infinite group $G=[b]$. For any $x\in H$, I can find an integer $p$ such that $x=a^p$. Let's suppose that $H$ is finite with $o(x)=n$. Then we get $x^n=e\Rightarrow (a^p)^n=e\Rightarrow a^{np}=e$, which means that $o(a) =np$, but since $a\in G$ this implies that $o(a)$ is finite in $G$, a contradiction. Therefore, $H$ is infinite.
Comment: You might want to say that the order of $a$ divides $np.$ The gist of your argument is that if an element of the subgroup $H$ has finite order in $H$ then it must have finite order in $G.$ Unless I'm missing something silly, your argument seems to work just fine.
Comment: Looks good to me.
Comment: The other answer from Matthew is correct, so this is just serving as extra intuition.
An infinite cyclic group is isomorphic to the integers $\mathbb{Z}$. Play around with the integers and you will quickly see it cant have a finite non-trivial subgroup.
Comment: Yes, considering the isomorphism definition, it is easy, but I forgot to mention the book which I take this question from only teaches isomorphism in a later section. That's why I didn't think this way
Answer: Your proof is correct. I'd give essentially the same proof, although it unwraps easier (at least in my head) if I write every element as a power of the generator:
Let $C$ be an infinite cyclic group, $c$ its generator. Let $H$ be a non-trivial subgroup. Then $H$ contains $c^n$ for some $n \neq 0$. Since $H$ is a subgroup, it contains $\langle c^n \rangle$ (the subgroup generated by $c^n$). And this subgroup of $H$ is infinite, or else $c^{kn} = e$, but that would imply the generator for $C$ had finite order.
Answer: The proof provided by yourself and rewritten in multiplicative notation by Matthew Niemiro works excellently. I will however elaborate a little bit one the idea first mentioned by bagggggggs. As he points out, any infinite cyclic group is isomorphic to the additive group of integers (and any finite cyclic group is isomorphic to $\mathbb{Z}/n \mathbb{Z}$). So one way to prove this is to show that every non-trivial additive subgroup of the integers is infinite. However, one can actually do better than this. Using for example the well-ordering axiom of the integers, one can show that the non-trivial subgroups of the integers are exactly the groups $n \mathbb{Z}$ for $n \geq 1$.
Answer: Your proof is fine.
Here's an alternative:
The group of integers under addition is free. Any nontrivial subgroup of a free group is also free. Nontrivial free groups are infinite.
Comment: *(Admittedly, my proof like nuking a fly.)*


Installing an apk on android emulator on Mac OS

Question: I tried following these steps(from here):
go to sdk folder, then go to tools.
copy your apk file inside the tool directory
./emulator -avd myEmulator
to run the emulator on mac
./adb install myApp.apk
to install app on the emulator

But when I run "./emulator -avd phoneEmulator" (phoneEmulator is the name of my emulator)
it just displays:
My-MacBook-Pro:tools myName$ ./emulator -avd phoneEmulator
2012-07-30 22:44:33.377 emulator-arm[2859:80b] Warning once: This application, or a
library it uses, is using NSQuickDrawView, which has been deprecated.
Apps should cease use of QuickDraw and move to Quartz.

It's as if that command is never returning.
If I can't input the 2nd command ./adb install myApp.apk in that window, where do I call it?
Answer:
Open Terminal
go to android-sdk-mac\platform-tools
type ./adb install myApp.apk
Answer: You can work around by:

You have a *.apk file with you if you don't have, download it.
Open Android Studio and Run the emulator.
Open the finder and go to the location which contains your *.apk file.
Drag that *.apk and drop into the emulator and it will ask for confirmation after your confirmation it will install the *.apk in the emulator.
You can find it in application menu once installation succeeds.
Comment: This is the best answer.
Comment: This answer should be at the top
Comment: Of course, it was drag and drop, it's a mac... Silly me...
Answer: First of all, you SHOULD NOT copy APKs to the tools or any other SDK directory.
Do not cd to the SDK directories, just add them to the PATH environment var or use their absolute path in command lines.
Then, if you want to run the emulator and then execute command from the same terminal, send the process to background (&):
$ export PATH=$PATH:/path/to/sdk/tools:path/to/sdk/platform-tools
$ emulator -avd myEmulator &
$ adb install /path/to/my.apk

Comment: Yes - rather surprising that no one made these points earlier.
Answer: You can work around by:

Upload yourapp.apk to internet. I.e: yourhost.com/yourapp.apk
Run emulator
Open internet browser on your emulator, visit link yourhost.com/yourapp.apk
Download and install
Answer: adb can be run from a seperate terminal once this emulator boots up.
Comment: When I do this ("./adb install BarcodeScanner4.2.apk") I get "-bash: ./adb: No such file or directory". Any ideas?
Comment: Did you cd to the location of adb? That message means that bash can't find "./adb"
Answer: May Be, Useful to all the command in MAC OS Terminal
Answer: Am I the only one whose apps install in the emulator when I run them as Android Application from eclipse?
I mean - why go though the trouble of adb when you could just use eclipse? (unless you have something against eclipse!)
Answer: Try this app. It will install the apk by just double clicking on it after you create an association to .apk files. It's all explained in the github source.
Comment: This link is no longer available.
Comment: Now it's fixed @Petroff
Answer: Alternatively You can use 'adb install' command as follows. "adbinstall/filename.apk"
ex. adb install /Users/manojclinberg/Downloads/ad3e0e46-d716-4fa9-b603-b8db3accf260.apk


How do I get a Lexmark x4690 printer working?

Question: I m trying to get my Lexmark X4690 working, Everything was ok with Ubuntu 11.04 but since I did a clean install with 11.10, I reinstalled the Lexmark driver but I m unable to print, but the scanner works ok.
Answer:
First you have to install the ia32-libs, because Lexmark only offers drivers for 32-bit system:
<code>sudo apt-get install ia32-libs
</code>
Get the driver from Lexmark and extract it anywhere you want.
Now, there are two options:, if you want the simple and quick way, skip to step 4, if you want to get your hands a little dirt, do the following:
<code>./lexmark-08z-series-driver-1.0-1.i386.deb.sh --noexec --target

lexmark tar xvf lexmark/instarchive_all --lzma dpkg-deb -I

lexmark-08z-series-driver-1.0-1.i386.deb mkdir raw-lexmark-archive
dpkg-deb -e lexmark-08z-series-driver-1.0-1.i386.deb

raw-lexmark-archive/DEBIAN dpkg-deb -X
lexmark-08z-series-driver-1.0-1.i386.deb raw-lexmark-archive cp

raw-lexmark-archive/DEBIAN/control
raw-lexmark-archive/DEBIAN/control.orig sed "/^ $/d"
raw-lexmark-archive/DEBIAN/control.orig >
raw-lexmark-archive/DEBIAN/control rm
raw-lexmark-archive/DEBIAN/control.orig cat
raw-lexmark-archive/DEBIAN/control dpkg-deb -b ./raw-lexmark-archive

New-lexmark-08z-series-driver-1.0-1.i386.deb.deb sudo dpkg -i
New-lexmark-08z-series-driver-1.0-1.i386.deb.deb
</code>
Or You can get the deb package from here.
Comment: Are there any advantages to doing the way in step 3, instead of the way in step 4 (besides if the downloadable `.deb` package becomes obsolete or inaccessible)?


What exactly is the payload?

Question: I am trying to understand what is in a transaction specifically the payload.  While the documentation references the term payload, it is not explicit/clear about what exactly it is.  It seems to include the block number and block hash for determining mortality but what else does it include?  I need an "explain payload to me like I was 5", I can sort out the details but I need a clear, conceptual model of what is in the extrinsic/transaction.  Furthermore, the payload is then signed and then serialized.  Was it not serialized before being signed?
This is the documentation I have looked at:
https://wiki.polkadot.network/docs/build-transaction-construction
Is the payload, this information?  If so, the metadata is already encoded, so does it get encoded again?
Address: The SS58-encoded address of the sending account.
Block Hash: The hash of the checkpoint block.
Block Number: The number of the checkpoint block.
Genesis Hash: The genesis hash of the chain.
Metadata: The SCALE-encoded metadata for the runtime when submitted.
Nonce: The nonce for this transaction.*
Spec Version: The current spec version for the runtime.
Transaction Version: The current version for transaction format.
Tip: Optional, the tip to increase transaction priority.
Era Period: Optional, the number of blocks after the checkpoint for which a transaction is valid. If zero, the transaction is immortal

Answer: In the page https://wiki.polkadot.network/docs/build-transaction-construction
payload refers to the entire object which must be signed and submitted with the signature to the node.
The payload may have different things in it depending on the configuration of the Substrate chain, which makes it very flexible for developers, but of course hard to explain here.
If that is the case, you can look at the answer here: What are the Steps for Encoding an Extrinsic in Substrate?
Answer: In simple terms, payload is just a chunk of data carried with transmission unit. You can go through this link which has awesome description of payload concept.

What exactly is the payload?