How can I again be on friendly terms with a girl I have a crush on since she's avoiding me after I gave her a small gift?

Question: I've met a girl in my department at university, and although I wasn't initially interested in her, she would often laugh at my dumbest jokes and flash me unwarranted smiles, so I thought perhaps she might be interested in me. We traveled to a conference together and thus had quite a lot of time to chat and get to know each other. She even agreed to go out to dinner with me one night, and we enjoyed ourselves and discovered that we both like many of the same things, from food to art to music and more. (Several weeks later, we returned to a subject of conversation from that night, and to my surprise, she was able to quote verbatim some of the things I told her over dinner!) I ended up paying for the cab+dinner, and despite my protests, she promised to pay me back.
It took her a long time and a lot of effort to find the cash to pay me back, because she's an international student and the closest branch of her bank is far from our small university town. As a token of gratitude and to express my affection, I decided to do something special for her: I purchased some high-quality looseleaf tea, stitched my own teabags, and gave it to her as a little handmade gift. To my horror, she seemed very disgruntled by the gift. I didn't get a chance to explain why I gave the gift: she took it, smiled, said "thanks I'll try it" and practically ran away. Ever since, she has been extremely awkward around me, averting her gaze, avoiding me every chance she can get, not responding to emails, refusing to initiate conversations with me, and abruptly ending conversations that I try to start with her. She has not mentioned what she thought of the tea or if she even tried it. However, she seems to be on very good terms with the other students in the department.
I'm very concerned that I have somehow offended this girl or made her uncomfortable, and I don't know how to proceed. I feel like I should forget about her, but I'm confused and depressed about how her apparent interest in me has evaporated so quickly. At this point, I'm having trouble deciding whether I should:

Leave her alone and never speak to her again. This is highly undesirable, but maybe she'd be happiest if I vanished from her life.
Apologize. This seems like it would make the situation even more awkward.
Pretend it never happened, and after giving her time and space, continue to interact with her as before, with the intention of one day telling her how I feel about her. I guess this is the ideal scenario for me.

How can I once again be on friendly, talking terms with her, and if possible, have her regain her interest in me?
Background information: I'm Asian American, and she's Eastern European. We're both beginning graduate students.
Answer: The 3 options you propose are not good at all and only contribute to the awkwardness.
How can you again be on friendly terms?
If you really want that, have an honest talk with her, that is what friends do. Explain how you felt and what you thought, and ask her how she saw these events from her perspective. Just be honest, you are adults, you were not stalking her or creeping her out. From your story, it seems she indeed liked you. It sounds like you two could've been great friends, and then you became romantically interested, and she got scared by that, and now she avoids you so she doesn't have to deal with the awkwardness. Maybe she has a boyfriend in eastern europe, or she's just not interested right now. It will stop being awkward if the two of you can have an honest conversation about it. Then you can probably be friends again. Be honest about your feelings. If you were romantically interested, don't try to hide that, just aknowledge the truth of what happened.
It might be intimidating to think about it and to try to plan it, but after you have an eye to eye talk with her you will feel much better. You need to break the ice.
If you were only interested romantically and don't want to be "just friends", then you can just move on without further actions. When I first read your title I thought "It's clear she's not interested, leave her alone", because I thought you didn't have a prior relationship with her. After reading the description, I understood you two were becoming very good friends, so that is probably salvageable.

"Hey Barbara, I would really like to talk to you, I feel there is a
  cold between us since the other day when I gave you that tea. Our
  friendship is valuable for me. I felt that we have a lot in common and
  I have to admit I became interested in you romantically, and I wanted
  to show you some affection with the gift. However I understand if you
  are not looking for that and you can just tell it to me like it is.
  Like this or like that I still want to continue being your friend,
  you're very fun to talk to, and my dog already loves you too much. How
  did you feel about all of this ? Did I offend you or made you sad ?"

This is an example. With a text like this you show that you are "above" just wanting sex with her. Brush off that rejection like it's nothing, show that for you, the friendship is still intact and that is what matters. Treat it like if you offered her an ice cream and she said no: no big deal, that's just more ice cream for you. It will be a lot less awkward for her.
After this you should invite her to non-threatening activities, like events with other friends, not just one-on-one, or lunch between two classes instead of dinner. Don't pay for her things anymore, unless she is in a pickle, like a friend would do. Once things are smooth and everyone is happy and non-threatened again, you can do activities together again like hiking or skating, etc. Maybe one day she will feel love for you, maybe not. Maybe one day she will want you and you will not want her anymore. You should give it up for now, If her answer is no, don't insist on pursuing her. It will always be a touchy subject between opposite-sex friends, the key is honesty, transparency and understanding.
I was in such a situation before where I was pursuing a woman that was a very good friend to me but didn't want more. She was showing a big interest in preserving the friendship, while I didn't feel comfortable pretending that I was just her friend. We had many awkward times during this, but every little bit of honest discussion that we had helped to alleviate the pressure. Everything that was hidden or held back contributed to the awkwardness, while everything that was made clear could then be discussed in a light-hearted way.
Answer: It is hard to guess what happened without being on your shoes, but it may be you scared her away. She clearly found you nice, you share many hobbies, have similar sense of humor so she liked spending time with you and having some laughs. Then, one day, you propose going out to dinner, and you end paying for both dinner and transport... despite her protests. That's a key in every relationship: pay attention to the signs your partner is giving. It could have been just a formal politeness, but it could have been that, by paying, you were making a dinner with a friend into something like a date, and maybe she didn't want to date you. In my (admittedly scarce) experience in dating (western) women, sharing the bill is a way of keeping all options open without signaling interest.
Then, a few days after that, you give her a present which yells out "SPECIAL" in a way nobody could mistake for a casual thing you would do for everyone else. It looks like she thinks you have a romantic interest in her (is she right?) and more likely than not, she doesn't reciprocate, so she has cut ties with you to prevent having to break your heart.
Now, I don't know if any of this is true, and neither do you, but with this possibility in mind I'd refrain to attempt direct contacts with her. Give her time and space, and maybe try to investigate more about the subject. If you are friends with some of the other students she's going with you may ask them to make some subtle investigations - you can invite some of them to partake in some activity, and telling her to join just to see what's her reaction, or if you have a friend who's close enough to both of you, asking what does she thinks about you.
Comment: @Kristoll Which is the clue that, to me, pointed more strongly than anything the lengths she went to make sure she wasn't dating you.
Comment: She paid me back more than a month after the dinner, but thanks for the helpful response!
Answer: I've found myself in a slightly similar situation before when trying online dating, where the other person I was talking to would disappear from the conversation for a length of time. I will try to answer my thoughts for the three options you were considering.
Sometimes the person would disappear after I tried some extra flirty line or asked about something personal. In these cases I would generally wait a day or so and if they haven't replied send a loose apology as you considered for your 2nd option, something like:

Hey sorry if that was moving too fast, (insert a change of topic back to a previous safer topic)

I like this method as it takes notice of their change in behavior and attempts to mend any damage.
If there was no discomfort for them and the change in behavior was unrelated to you, now you've determined that it's safe to move into the 3rd option, pretend like nothing happened and interact as before.
If there was some discomfort you should back off immediately to where they feel comfortable again. This may be difficult to keep at their comfortable distance after you tried to get closer, its very important that you reflect on yourself at this point, if you're not comfortable keeping that distance it may be best to go with your 1st option, apologize and let them know you need time to gather yourself and to let your feelings for them fade. This reflection is important as you can quickly burn bridges permanently in skipping this.
Of course keep in mind, my experience here is largely from online dating sites where expectations from people here will be different from people you meet going about your day.
Answer:
Ever since, she has been extremely awkward around me, averting her gaze, avoiding me every chance she can get, not responding to emails, refusing to initiate conversations with me, and abruptly ending conversations that I try to start with her.

So, she is avoiding you. I believe I would too, if someone from my class/work, who was not my romantic interest and not a close friend would give me handmade stitched teabags. I am female from eastern Europe, and when we want to thank someone, we simply say thanks, and maybe buy a small chocolate (not too expensive). Even with bought chocolate it might have been seen as excessive gesture, after you tried to pay for her and she insisted you don't.
Best respectful way to act is to leave her alone. She clearly does not want to talk, and the more you push (even with apologies), the more you will push her away. Maybe after some time she will change her mind, maybe not, but you really should respect her wishes.
Don't talk to her unless you absolutely must, and even then, do not engage in personal conversation unless she starts it herself. Keep it about work/assignment. Talk to other people, joke with other people. Let her feel safe.
Comment: Hi user11599! I love your first paragraph, as you explain who you are, where you're from, and what you usually do to thank people. Can you do the same for the next two, and add some extra information on your suggested approaches? Have you used similar approaches before when dealing with someone avoiding you/being uncomfortable? That would bring them more in line with our [citation expectations](https://interpersonal.meta.stackexchange.com/q/3583/1599) and [great answer guidelines](https://interpersonal.meta.stackexchange.com/q/3266/1599).


Misuse of Observer Pattern?

Question: I have a Car object which contains a latitude field and a longitude field.  I use the observer pattern so that any time either of these fields change in my application, my car object is notified.
I now find the need to create several other car objects whose default values I wish to have the same as what is the current latitude and the current longitude.  I can keep this state in my Notifier object and when a new observer (the new car) registers to listen I can re-broadcast out the values so the new listener will be up to date.
Is this a misuse of the observer pattern, i.e bad design?
Answer: I think this is a textbook example of good use of the Observer Pattern.
Of course, there may be some aspect of this that you have misgivings about. If you explain what your concerns are these could be better discussed.
Comment: Thanks for your response.  I'm a bit of a purist, and I was uneasy about broadcasting to all listeners when the value had not really changed.
Answer: The only thing that strikes me as dangerous about this approach is that it's easy to code your observers to assume that if they get a notification, something has changed.  With the setup you have above, that's no longer true.  Therefore your observers will have to check that something truly changed if they are supposed to perform any actions when they receive a notification.
Probably common sense, but also an easy oversight if you're modifying existing code.
Comment: Yes, similar to my comment above you have articulated my concern.
Answer: It would be better if your subject (the object which knows the current latitude and longitude) also exposes a getter method. Any new listener (a new car in your example), right after registration, might get the current values (lat/long) and be informed through the broadcast of any change thereafter. This will avoid needlessly notifying already registered listeners.
Consider that in a common variation of the observer pattern, the subject notifies the listeners that a change has happened, and the listeners then actively query the current value from the subject (hence the need of a getter method).
Answer: An Observer pattern is used in one to many relationship. When you want to notify multiple objects, when one object changes state. Your case is a many to one. I believe its a misuse (I may be wrong). Obvious impact is complexity of code. But the side effect could be loss of flexibility. Look at it like this, what changes. If you want to add more Car's you can, without changing the notification receiver. The receiver need now know about your new Car's implementation. All it cares about is the state.
Now, what happens when you want to add more receivers, which will be the most probable case (requirements not thought through :)). In this case all your car objects will need a change to refer to a new receiver.

Misuse of Observer Pattern?


How to define $-\infty$?

Question: I think I understand the fundamental concept of infinity.
Elementary mathematics define $\infty := \frac{x}{0}$, for every $x$.
And also $\infty := \frac{-x}{0}$ for every $x$.
I know only one definition of $-\infty$ as $-\infty= 0-(\infty)$.
Is there any other way to define $-\infty$?
Comment: I sure hope *elementary* mathematics does **not** define infinity  this way.
Comment: To expand on Srivatsan's comment: Infinity is not one well-defined thing. In various areas of non-elementary mathematics, you can speak about abstractions that can be interpreted intuitively as "there's nothing finite to put here, but something different with such-and-such properties". But there are many different variants on this, and none of them claim to be _the_ infinity (as there's no such thing). Some of these concepts can be notated with "$\infty$" by convention within the field they are used in, but that's just convenient notation with limited applicability.
Comment: Srivatsan, I sure hope infinity _can_ be defined in an elementary way.
Comment: @Srivatsan +1. I agree that infinity is not defined as such a way. I just put a commonly used formulation.
Comment: @Dan, you can probably define _an_ infinity in an elementary way, as long as you don't think your definition captures everything everyone wants to say about things that are not finite.
Comment: Note that by your "definition", $-\infty = 0 - (\infty) = 0 - (-x/0) = +x/0 = \infty$.
Answer: Infinity is not defined in the way you described; something similar can be defined with limits but I think it is a confusing approach.
Here's a more formal definition: $\infty$ and $-\infty$ are points added to $\mathbb{R}$ in such a way the for all $a\in\mathbb{R}$ we have $-\infty < a < \infty$. Topologically speaking, open balls around $\infty$ are subsets of the form $\{x\in\mathbb{R}|x>a\}$ for a given $a$, and open balls around $-\infty$ are subsets of the form $\{x\in\mathbb{R}|x<a\}$.
This allows to formally define concepts like tending to $\infty$ or $-\infty$ with the usual topological approach, and the extanded $\mathbb{R}$ is still a linearly ordered set (although it is no longer a field since arithmetic involving $\infty$ will no longer preserve the nice properties it has in $\mathbb{R}$).
Answer: $-\infty$ can be defined as the surreal number $\{\emptyset|-\mathbb{N}\}$.
Comment: Well that is in fact $-\omega$. Stricly speaking, $1/0$ has no solution even in the surreal numbers, nor in any other field. If we extend this to a set model with proper classes, then $-\infty = \{\emptyset|\mathbf{No}\}$
Answer: In the real line you can "define" $\infty = \frac{1}{0^+}$ and $-\infty = \frac{1}{0^-}$, but these are really limits:  $$-\infty = \lim_{x\to0^-} \frac 1x$$ Here $x\to0^-$ means that $x$ approaches $0$ from the left, i.e., using negative numbers.
Comment: I missed those negative and positive zeros. :)

How to define $-\infty$?


FreeBSD 9.0 supports only IPv6. What this practically means?

Question: I have very scarce knowledge of IPv6 but I'm considering installing FreeBSD on an RDC device which acts as a server to my home network running services.
The last release states that one of the changes is IPv6 support only. I don't quite understand how will this affect my network, other devices etc. Should my ISP support IPv6 in some way in order for me to use FreeBSD etc? I'm also using services like dyndns to connect back to my home server via internet. Will that address respond to IPv6 addresses only?
Comment: Wait, what? I just installed FreeBSD 9.0 yesterday and I configured ipv4 on the machine. I don't know where you read that, but that is definitely *wrong*.
Comment: Yeah I got victim of FUD. There other people who don't quite understand the things I've asked and replicate false deductions. Thanks for answering.
Answer: Not quite! It still supports both IPv4 and IPv6, but it is now possible, if desired, to build an IPv6-only kernel.
You can still still install FreeBSD with just an IPv4 address. If you obtain an IPv6 allocation you can configure this too.
Comment: See also: http://www.freebsd.org/ipv6/ipv6only.html
Answer: I think FreeBSD still has a dual-stack, so you shouldn't have any problems. And IPv6 is mostly backwards compatible, even if it were just IPv6 supported instead of IPv4.
From their site, it sounds like there's an IPv6-only kernel available...implying it still supports IP4.
http://www.freebsd.org/ipv6/ipv6only.html


Is it beneficial to launch a complete app or gradually update the app over time?

Question: I have an application with a very limited range of functions. This means that once I have implemented all the features there will be almost no updates in the features. Users are aware of the range of features the application should have, so they might not be satisfied with the current state of the app. I have completed approx. 90% of the app's functionality and the development process will take at least two more weeks. What would be the better thing to do ? Launch a complete and full-featured application or roll out additional features in updates in the future ? These functions I am talking about are not essential, as the main functionality is already working. I assume it may be a better marketing strategy to update the app over the course of the next weeks as opposed to launch the full package. Does anybody have experience with this ? I would still prefer submitting the complete app, even though at this stage the users would be more than satisfied with the features.
Answer: This isn't a clear cut and dry question.  There are advantages and disadvantages to each approach, and each should be used in different situations.
In apps for which there is little consequence of failure, it's usually best to release as soon as you have a minimum viable product.  That gives you the chance to get real user feedback, which often shows that the features that you think are, aren't important to users.  This early feedback is invaluable in many situations, and is why when in doubt I recommend releasing early and then rapidly iterating.
Few people will try an app again if their first experience was poor.  So releasing early isn't about releasing a poor quality app.  It's about releasing with a minimum feature set that is enough to make it useful / entertaining to your customers.
In mission critical apps (medical apps are an example), you need to release a fully functioning app that meets the design requirements.  However these sort of apps are rare, and most developers will not be working on them.
Comment: What is "little consequence of failure" to you ? I want my app to be successful, a bad start would hamper growth rate, therefore it is a kind of failure and I would have to bear with the consequences. As a first time submitter I am not sure what these consequences may be (negative : drop in sales, bad reviews, unsteady growth -- positive: more media attention, word of mouth).
Comment: @MartinE. "little consequence of failure" refers to catastrophic consequences.  Like someone dying, or an industrial disaster.  Not about whether your business is successful or not.
Answer: In my experience, end users are surprisingly forgetful of missing features and limitations once the features are implemented and limitations are removed. Remember when smart-phones didn't offer cut-and-paste? Remember when the XBox One required a persistant internet connection?
But, again - my experience - users are less forgetful about code quality. It's hard to get past a program that "feels" buggy... even when those bugs are gone.
Comment: So, I guess I'm just agreeing with @JonGB. ;)
Answer: You can release beta version, it should be less stressful to the users when they face some problems. At least, beta status will forgive you. Also it's possible to involve limited set of users for beta-testing.
The point is the earlier you give your app to the real users the earlier you get feedback. You is not like your users, so I'd go with such strategy.
Release early, release often paradigm has its advantages. You users expect what the app should do, but they don't know how it would be.
Comment: The problem is, my user base is familiar with what the app should be doing, so a beta is out of the question. I was asking because it took a long time to develop the app and I finally want to submit it. But there just always seems to be something that needs improvement, so I have to make a decision...
Comment: @MartinE. – I've updated the answer.
Comment: Well I am not quite sure about the "Release early, release often" paradigm. While open-source and free applications may benefit from it, I think paying customers will expect to get value for their spendings.
Comment: Okay, @MartinE., how do you decide the app is polished perfectly and ready for usage? It is either your subjective (possibly biased, erroneous) decision or real user feedback. I do not tell to release raw product, just first version. By the way, pricing strategy could be very flexible.
Comment: No it is not subjective. I have reference values from my competition in terms of functionality. I have to enter strong in order to stay strong. So my decision is that I will submit an entirely complete application.
Answer: I think from a better marketing point of view, you should dish out the best features of your app at the first launch so that it can stand out among the similar apps. Then if it fares well (or not, it is a thing out of control at this moment), you can add any functionality that supports the main working flow.
The app's faring in the market will significantly depend on how does it do at the launch time. Of course the better updates can change that later too but why leave things for future.
The baseline is - the main functionality should be complete and polished at launch and I agree with Alexey, get the user feedback as soon as you can by launching it at perfect moment than to wasting time by developing supportive functionality, you can add the supporting flows later on.
Comment: Yeah I agree, but is it not important to make a perfect first impression ? I want it to be the non-plus-ultra in this area, so when I update it irregularly wouldn't that let it fall under the table ?
Comment: Yeah but when a possible user wants to have a go at an app for a known functionality to fulfill his 'requirements', he'd expect to have that working flawlessly in it. If it provides other functionalities, it is bonus. So from that point of view, if your app is ready with main functionality, you can have a go with it and can keep updating it with the 'Bonuses' :)
Comment: Perfect first impression is something subjective, to convince the users it should be enough to give them better experience (which could be measured with usability metrics).


check the list of Open window

Question: I need to know that how can I find the list of open "windows" and then close some of them. Note that any window is required meaning that some of the window (like Plot) may be opened during a simulation with a software. I also want to detect them. Imagine that I use a mathematic software and it plot a graph in a new window.
Answer: Use the wmctrl program.
an example (done with KDE as DE)
#list open windows
wmctrl -l
0x01e001a6 -1 HOSTNAME plasma-desktop
0x01e007c1 -1 HOSTNAME plasma-desktop
0x01e00194 -1 HOSTNAME plasma-desktop
0x01e0019d -1 HOSTNAME plasma-desktop
0x03c00064  0 HOSTNAME Inbox - Mozilla Thunderbird
0x0240001a  0 HOSTNAME pam.d : bash – Konsole
0x04e00009  0 HOSTNAME
0x03e0006e  0 HOSTNAME shell - check the list of Open window - Unix & Linux Stack Exchange - Mozilla Firefox
0x03e6efe3  0 HOSTNAME Mozilla Firefox

#now close the empty firefox session: (-c for close, -i for using the hexnumber of the first column as identifier)
wmctrl -ic 0x03e6efe3

You can also use this program for changing window geometries, selecting windows, moving windows, change window titles etc. Check man wmctrl for viewing the possibilities.

check the list of Open window


Should trees in navigation always be by sorted by default?

Question: Should trees always be in a sorted order? I am designing a tree navigation for a desktop application and wanted to know whether it should always be in sorted order (alphabetically). Windows guidelines tell is should. Or is it easier that when user creates a new folder/file it creates wherever user wants it rather than the file changing its position when the tree is by default sorted.
Eg: Microsoft outlook tree is always sorted:
Answer: The implementation of trees in either navigation or organisation purposes (or both) only works if there is some order (and hierarchy) through which the user can traverse to find what they are looking for. So there has to be some sort order by default anyway.
If you are asking whether it should always be sorted in a particular way by default (e.g. alphabetically), the answer is that it depends. I think you'll find that if you are using trees to organise content then alphabetical is a safe default if the keywords and categories are clear to the user. Otherwise you'll find that there are other sort orders like creation date, modified date, user-defined order (so movable), last modified, amount of content, etc. that might make more sense in different contexts.
There are also hybrid strategies (your Windows example is one) where there are set default folders (e.g. Inbox, Trash, Spam) then the user can create their own folders and sort them in whichever order they like. I think when you look into the level of nesting then you'll find that alphabetical sorting is less important because you can't see everything at once and it might make less sense to sort it alphabetically as the groupings or categorisation becomes more important.


Gapps has stopped. How to fix?

Question: Good Morning.
Yesterday I was excited to flash CyanogenMod 12.1 in my other Android device.
The process was the same and I did everything correctly. Unfortunately, after flashing Google Apps, the system wouldn't stop showing pop-ups like "google app has stopped", "google services has stopped". Nothing about Gapps works, even the keyboard.
I have tried to wipe data/factory reset, using CWM and reflashing CM12.1 ONLY, but it didn't work. The pop-ups are still there. Maybe there's some Gapps fragments in the system... Please, I would appreciate any possible help. Thanks
Comment: "even the keyboard" - actually keyboard comes from AOSP, not from Google Apps, so the problem may be not with GApps but with something else.
Comment: Did you flash the correct version of GAPPS? From where did you download it?
Comment: A few years ago you were meant to boot into Android (for the first time after flashing), leave it for a minutes so it's fully boot (don't interact), then reboot. If you didn't, you would get exactly the same symptoms as you have.
Comment: Since the CM version is not official, but ported, I searched all over the internet to find the correct Gapps version. I didn't find anything, so I flashed Gapps from CyanogenMod link. Isn't that supposed to work on every ROM? (The device is the old, old, old Samsung Galaxy Express)
Comment: The gapps is changed for each version of android. Try tk gapps, search it on Google and flag it on your ROM. As I presume as the CM 12.1 isn't an official update, so you are downloading a previous build of gapps, which was for 5.0.2 version of lollipop, or in your case CM12.
Comment: I found the correct one! But the problem persists! After all the popups, all google apps that I open says "this app is not installed"
Comment: I learned a hard lesson today: **There's no better way to find what is causing this error than to collect a log with `logcat`**.
Comment: Can you be a little more specific? List the steps you went through, What GAPPS version you used, Phone model, etc.
Answer: It is recommended to wipe dalvik/cache, factory reset before and after flashing anything in recovery.
So here are the steps to solve the problem

Enter CWM recovery mode
Wipe data/factory reset
Wipe Cache partition
Advanced > Wipe Dalvik Cache
Flash Gapps for CM12.1
Wipe data/factory reset, Cache partition
Wipe Dalvik Cache
Reboot
Comment: Great website for a collection of gapps, then does it have tk gapps, it could be resourceful.
Comment: For future readers I can confirm that the above 8 steps worked for me. I had done all except the Wipe Dalvike Cache. I think that was the missing key that i was missing. I used it on a Int Note2, a nightly CM13, with OpenGApps for Android 6.0. Thanks Sharath
Answer: A factory reset will not help,
You need to do a system wipe, then reflash CM 12.1 only and then flash gapps.

Wipe old system
Install new system from zip
Install gapps package
Wipe Dalvik & Cache
Reboot

Gapps has stopped. How to fix?


How to calculate muscle and kg needed to obtain your body type you wanted

Question: i am 23 years old.I have a body like this https://i.stack.imgur.com/GG8G9.jpg .I am 1.81 inch,72 kg.I want to  obtain like this https://i.stack.imgur.com/cZDQ0.jpg.How much muscle kg should i add?How can i calculate it?
Comment: I don't know, but I can tell you it will take many years of consistency, so may as well start now. Also, did you mean 1.81 meters?
Comment: yes that i mean.I think its the same
Comment: I don't even know how to begin to ask you to define what you mean by the picture's body type. However, the first thing that comes to mind is the shoulder to hips ratio. This is a genetic thing. You should check out Virtuvian Physiques series on genetics as it relates to the body/aesthetics. —> https://youtu.be/xSe_tCO3VOI (That's the final part, links to the other parts are in the description)
Comment: i didn't catch what you mean...Of course are genetics but i want to increase my body from one picture into the other.I mean to obtain(second picture ) that type of body.I want to calculate how much muscle or body fat needs more to be like this..If you check first picture and second.Thats it all.I tell my infos about me and i want to be like second picture.Genetics are different person to person.
Comment: There are so many little things that are different though. You'll have to edit the question to include as many details as possible as to what specifically you want to obtain. If the answer is "everything" that's fine too, but to save you the trouble, the answer to "everything" is "genetics".
Answer: There are a few ways to approach this. I'll go from most basic to most complicated.
          Easy
The most barebones approach is find the weight of some people you want to look like, then translate your weight to that, accounting for body fat.
Let's say you are 72 kg at 10% body fat. Then let's say the body type you want to attain is 90 kg at 10% body fat.

You have 65 kg of non-fat on you
You need to get to 81 kg of non-fat for a comparable appearance

I say non-fat because there is more to lean mass than muscle. Water, organs, etc. More about this in a second.
Precise body fat can be very hard to come by, and you want to be careful about guessing too much. I'll have a link about that towards the end. In general though, if you can see a person's abs, they're likely 10%, or under.
          Fancier
An important caveat here is height. If you find someone who is a few inches shorter or taller than you, that throws the numbers off.
An old school way to approach this is for every inch above five feet, add five pounds.
So, all else being equal, a person who is 5'5" will weigh 25 pounds less than a person who is 5'10".
I honestly don't know where this number originally comes from. But there are a few numbers like this which float around in the exercise science world, and you'd be surprised how well they hold up.
(Another one is if you want to know your maintenance calorie intake, take your bodyweight and multiply by 15. e.g. most 200 lb people eat 3000 calories per day. Amazing how well that works. Not every time, but often enough.)
          The dedicated
Next, you can consider joint width. People with wider joints tend to have more muscle than those with smaller joints. There is a calculator for this, which I'll get to in a second.
          The hardcore
Finally, if you're going pretty out there on the muscle curve, and that aspirational picture suggests you are, you need to consider drug use.
Once you start getting around abs visible, 190+ plus pounds and average height, drug use becomes more and more likely.
I have no judgment against drug users, I'm merely saying it needs to be considered based on goals. The fact is drugs help hypertrophy. I find it worthwhile knowing, or at least having a very good sense, whether a goal can be attained without them or not. The earlier one has this knowledge, the better. For instance, if one isn't willing to take drugs, there is no point in chasing a Ronnie Coleman physique.
          More Help
If you're looking to get fancier:
Lyle McDonald has a good source for,

What's My Genetic Muscular Potential?

Casey Butt has in my mind the best overall material on this-

Maximum Muscular Bodyweight and Measurements Calculator

I've personally used these approaches to see,

How many players in the NFL are on drugs? <- This link has more info regarding issues with body fat measuring.


Can I install a wallet on Windows Server 2008?

Question: I was wondering if I could I install a wallet on Windows Server 2008? If so which wallet?
Answer: You can install "Bitcoin-Core" (including Bitcoin-Qt) on a window server 2008. It requires initial syncing and verification of around 40GB of data. So it might take 1-2 days until you can use it.
Other option would be to install a SPV client like "Electrum" (Python based) or "Multibit HD" (Java / bitcoinj based). They can be used immediately but they won't give you the same level of privacy.
Comment: Thanks, I had to look up what a SPV client was, found it here: http://bitcoin.stackexchange.com/questions/4649/what-is-an-spv-client
Comment: Ok, thanks I successfully installed Multi-bit HD on the sever and synced the wallet to a cloud service.


Bathroom Lighting Switch/Motion Sensor solution

Question: I have a bathroom mirror with built in led lighting around the mirror casing.    It is controlled by a touch switch on the front of the mirror.  I would like to control the light by using a motion sensor switch (Lutron Maestro Motion Sensor Switch | 2 Amp, Single Pole | MS-OPS2-WH).  Initially I thought about bypassing the switch to make the mirror light 'ALWAYS ON' and then connect it to the motion sensor.  Is this the best way?  The downside of this would be the touch switch on the front of the mirror wouldn't work anymore and a person couldn't physically turn it off outside of just waiting out the motion sensor timer in the room.  Is this the only option?
Comment: Rooms require a light switch by the entry door/opening, so you don't step on legos/snub your toes in the dark.  I also like the keep it simple principle.  You also do not want the light to go off when stitching up a cut(rare but could happen,on tv).  Seems little benefit for a motion sensor in a bathroom, unless a 1000 square feet.
Comment: It does have a switch by the door in the bathroom but it connects to overhead bright lights.  We would prefer the lighting around the mirror come on automatically and be the primary light source in the evening hours.  The light will be on a 30 minute timer, but not a primary light for wounda.  TBH, I'm asking how to solve a wiring issue not opinions on it.  Sorry if that comes off as rude : ) , but I need technical help here.  Preferably I'd like the touch switch in the mirror to work in tandem with the motion sensor.  Is this possible?
Comment: An on/off switch before the sensor will work.  The sensor will only work if the first switch is on.  Touch switch to sensor to light, or a switch somewhere else(at door).  The sensor controls the lights, but the switch controls the power.
Comment: Perfect, thanks for your help
Comment: @crip659 The caveat to the on/off switch is that majority of motion sensors will auto-power on at initial connect to power, shut off, and then the motion detector goes online. If you're going to add an extra switch, it might actually not do what you want and you'll probably just leave it on all the time.
Answer: The solution is a motion sensor that includes an on/off switch. This is quite common in commercial bathrooms (e.g., office buildings) because you don't want the lights on 24/7 when they are really only needed a few hours a day, but you really can't count on the general public to turn switches off. In fact, in many buildings the general public is essentially told not to turn off the light switches for a variety of reasons. On the other hand, you also don't want the lights to go off too soon - think person in a stall with the door closed for several minutes. Or in a residential bathroom, a long time behind the shower curtain. Plus you definitely need a real "on" function when there is an emergency.
So the solution is a switch that:

Primarily uses a motion sensor
Allows a programmable - to suit your personal needs - automatic off time (or really, the amount of time it stays on if no additional motion is detected).
If the light is on, the switch turns the lights off immediately (your specific requirement)
If the light is off, the switch turns the lights on immediately

So to the manual we go! Started with the Lutron web site - a bit of a mess, didn't get far. But Home Depot usually has good reference materials. On the page for Maestro Motion Sensor Switch, 2 Amp/Single-Pole, White (MS-OPS2-WH-2) (2-Pack) It says Programmable time-out of lights - set to turn off 1, 5, 15 or 30 minutes after leaving a room, so you figure out the longest period of "no motion might be detected even though someone is in the bathroom" and set it for that.
Found the installation manual. Which in turn references the troubleshooting manual And that manual talks about various on/off and manual/automatic modes. If I understand it correctly, you can have Manual On + Auto Off and then use the switch to turn the lights off but if you use Auto On + Auto Off then when you turn the switch off manually it will turn back on because it senses motion.
So as far as I can tell:

You can always turn the lights on with the manual switch
If you configure it for Manual On (so that it does not automatically turn on due to motion sensing) then you can effectively turn the lights off with the manual switch

This will work fine if the reason for a motion sensor is to make sure the lights are not left on all night. If you also want the lights to work automatically so that you can enter the bathroom and the lights go on without touching anything then this will not work for you.
I am pretty sure I have seen other motion sensors where a manual off will disable the motion sensing for an extended period of time - i.e., so that only another press of the switch will turn the lights back on. However, this switch does not appear to be one of those.
But wait, there's more! ThreePhaseEel found the advanced manual which includes the Manual Off-While-Occupied mode, which will, I believe, do what you want:

The sensor automatically turns on when you enter the room, and turns off when you vacate the room. When this mode is enabled, if you turn the lights off when you enter the room, they will remain off as long as the room remains occupied and the Timeout has not expired.
Comment: It turns out that the OPS2 *does* support Off-While-Occupied functionality, although it's not described in the base instruction sheet -- you need to use the instructions in the [Maestro advanced programming guide](https://assets.lutron.com/a/documents/048461.pdf) to enable it, as it's not the default on the OPS2 model.
Comment: Awesome thanks!
Comment: Welcome to DIY SE. The way we say thanks here is with upvotes (for meaningless internet points) and - when you are the person who asked the question - marking it as the accepted answer (big checkmark). Please take the [Tour](https://diy.stackexchange.com/tour).
Comment: @ThreePhaseEel Thank you! I will add that to my answer. I got annoyed pretty quickly with the Lutron site - hard to find the documentation that I really wanted and Home Depot had more (but not *all of it*) of it readily accessible.


TableLayoutPanel Controls - Lock Column from Horizontal Scroll?

Question: I'm using a TableLayoutPanel in a Windows Forms application to organize a set of controls in a grid-like fashion.  I'd like to lock the TableLayoutPanel's first controls column so that it remains fixed when the user applies the horizontal scrollbar.  Any guidance is appreciated.
Answer: Right click the TableLayoutPanel in the designer and select "Edit Rows and Columns...".  Then set the first column to use an absolute width instead of a percentage.
Answer: I think for what you're wanting to do, you need to create a two column TableLayoutPanel, then within each column create an additional TableLayoutPanel.  On the side you want to allow scrolling, set AllowScroll = true for its sub-TableLayoutPanel, and on the side you want not to scroll, set AllowScroll = false for its sub-TableLayoutPanel.


Determining if a time series is covariance stationary or a random walk

Question: I don't know how to determine the truth of the following statements regarding this time series model. I know a covariance stationary time-series has properties that don't change over time, but I don't know how to find out if that's true. I also don't know how to determine if a particular series is a random walk with or without a drift.
Answer: Perhaps you can use the following link for better understanding:
https://lectures.quantecon.org/jl/arma.html
Comment: This may be helpful but it doesn't answer the question.


Are the results for Proteus simulation and hardware testing for same purpose using different controllers comparable?

Question: I have used Proteus design suite for simulating sensors (such as temperature sensor) interfaced to LPC2138. The sensors which were not available in the software, for them I have modelled them as voltage divider circuit with potentiometer. If I were to
show mapping/compare the voltage divider results in software simulation and in hardware design, will the results have any dependency on the type of controller as all I am doing is simulating a controlled environment (by changing the R values)? For example if I use Arduino for hardware testing and LPC2138 in Proteus. Would this be correct? Please confirm.
Answer: Proteus is highly unreliable in circuit simulation. Sure, you can run your code to check if its working or not but that is the extent of it. Never depend on any simulation results from Proteus. You said that you have modeled sensors as Voltage dividers which is exactly what I am talking about: You can check if changing the voltage has any effect or not and that maybe fine but do not make the mistake of comparing it to your hardware results. There will always be a big error in Proteus results. Trust me, I learned it the hard way.
Comment: Ok thanks. One more question, I have modelled a 2k and 1k (pot) as voltage divide circuit for LPC2138 which works on 3.3 V. For the voltage divider I have kept Vin as 5V. Since you said results can vary a lot, now if I use Arduino I should try to bring the output voltage to vary from 0 to 5V right? Can you suggest the R value and Pot value ?
Comment: Or in this case I don't require a divider circuit, I should simply use potentiometer, read analog values, convert them to digital, software calibrate (by using some multiplicative or divisive factor)them to simply show them in some sort of format example percentage or degree Celsius?
Comment: Simulators are merely mathematical models, the biggest errors you'll come across are from inherent RLC values in materials where their significance depends on the application. A simple DC circuit should work just fine, RF applications and RLC oscillators not so much.
Comment: Yes, the span should be 0-5V. You can use 1k Res and 10K Potentiometer. This will give you a swing of ~0V to 4.56V while measured across Potentiometer. And the change will not be smooth i.e. you will get 0V-2.5V from 0R-1K value of Pot and 2.5V-4.56V from 1k-10K value of Pot. Of course, you can design a better divider if you really want stable sensitivity throughout.
Comment: If you want to simulate voltage change, you will need a divider, read its output as analog value, convert to digital and do whatever you want.
Comment: Proteus has always been reliable for me. This answer is more just bashing the software than answering the question


Book about a girl who talks to a tree (or boulder) and finds golden door

Question: I'm looking for an old fantasy book. A woman/girl moves into new house and odd things happen that actually the tree or boulder in backyard is responsible for. The girl and the tree form a bond/relationship. Something about a trap room in the house and a old shed/garage with secret, golden door. The front cover was very colorful...
Comment: Can you be a little more specific than "old" about the date? Roughly when did you read/hear about the book? Do you know if it was new then or not?
Comment: I want to say 1970s or 1980s (but I'm not certain). I read parts of the book in 2010 and it was in a selection from an English teacher at the time.
Answer: Prospero's Children by Jan Siegel (2001) trilogy?
The blurb seems to match nicely;

It began ages past in fabled Atlantis, when a mad, power-hungry queen forged a key to a door never meant to be opened by mortal man--its
  inception would hasten her own death and the extinction of her
  vainglorious race. For millennia the key lay forgotten beneath the
  waves, lost amid the ruins of what had been the most beautiful city on
  Earth. But however jealously the sea hoards its secrets, sooner or
  later it yields them up. Now, in present-day Yorkshire, that time has
  come. And for young Fernanda Capel, life will never be the same again
  . . .
Comment: Could you provide some details or matched points which line u with the details in the question that make you think this is the correct story or book?


SSH port forwarding between local networks using Linux and AWS

Question: I've got :
A local network A with:

Offline Linux device 192.168.0.1
Offline Windows device 192.168.0.2 that connects to port 4444 in Linux 192.168.0.1
Raspberry Pi with two ethernet ports, 192.168.0.3 and DHCP that connects to a reverse SSH AWS server

A local network B with:

Offline Windows device 192.168.0.4
Raspberry Pi with two ethernet ports, 192.168.0.5 and DHCP that connects to a reverse SSH AWS server

How can I have my Windows PC in network B connect to 192.168.0.5:4444 and use port forwarding to get the data coming from network A, 192.168.0.1:4444 device?
Ideally as a configuration instead of commands that I have to run everytime they reboot.
I have read ssh forwarding and tunneling information but what I want to acomplish is more complex than what I understand.
Answer: In the AWS server, edit ~/.ssh/config to add the hostname 192.168.0.1
Host networkApi
  Hostname 127.0.0.1
  User pi
  Port 52566   #Port used to ssh to the pi using reverse ssh
  IdentityFile ~/.ssh/networkApi-id_rsa
  LocalForward 4444 192.168.0.1:4444

This makes the information in 192.168.0.1 port 4444 available in AWS port 4444
In the same AWS ~/.ssh/config file, edit the second Pi information
Host networkBpi
  Hostname 127.0.0.1
  User pi
  Port 52587   #Port used to ssh to the pi using reverse ssh
  IdentityFile ~/.ssh/networkBpi-id_rsa
  GatewayPorts yes
  RemoteForward 4444 127.0.0.1:4444

This makes AWS port 4444 available in the network B Raspberry Pi.
In the network B Raspberry Pi, edit the file /etc/ssh/sshd_config to set "GatewayPorts yes" and restart the ssh daemon with
sudo service sshd restart

Now from AWS, ssh into one Pi and from a different console, ssh into the other Pi. You should be able to access the information in 192.168.0.1:4444 by telnet 10.10.5.84 4444 where 10.10.5.84 is the IP address given by DHCP to the Raspberry Pi in network B.


How internal functions are defined for FF3?

Question: I have seen FF1/FF3 being said that they preserve the same format as that of the plaintext. For example, if I encrypt a decimal number 1234 then its encrypted value is also a 4 digit decimal number. Both of them use the Feistel network. How are the round functions internally designed in each round of the structure to preserve the format of the data? I wanted to get to know how the design of internal functions helps preserve the format.
Comment: What about reading sections 4.1 and 4.5 of the [specification of FF3-1](https://doi.org/10.6028/NIST.SP.800-38Gr1-draft) ?
Answer: From 4.1 Representation of Character Strings of the NIST SP 800 38G Rev 1 draft spec that was mentioned in the comments:

The data inputs and outputs to the FF1 and FF3-1 encryption 286 and decryption functions must be finite sequences of numerals, i.e., numeral strings. If the data to be encrypted is formatted in an alphabet that is not already the set of base radix numerals, then each character must be represented by a distinct numeral in order to apply FF1 or FF3-1.
...
The choice and implementation of a one-to-one correspondence between a given alphabet and the set of base radix numerals that represents the alphabet is outside the scope of this publication.

This is not that clear yet, but very basically you need to canonically map your input data to a range [0, N), and back again during both encryption and decryption. This mapping is outside the scope, as it is of course specific to the data input specification.

If your data consists of multiple ranges then things get a bit more tricky. Very basically you first order the data (usually left to right), then you determine the base for each separate set of input ranges. Then the value in the range is created by multiplying the input range with the lower end bases.
I'll first show you how these $\text{encode}$ and $\text{decode}$ functions would work:
Let's say that the input ranges are for a digit - excluding zero - followed by a character in the uppercase ABC, i.e. [1-9][A-Z]. The base of the digits - excluding zero - is $9$, the base of the alphabet is of course $26$.
Now let's try to calculate the value for 7Z. If you follow these rules then the value you get is $6 \cdot 26 + 25 = 181$, where $6$ is the index of 7 in $[1, 9]$, $26$ is the base (the count of characters) in the ABC and $25$ is the index of Z in that ABC.
To map it back, you first perform $181 \bmod 26$, which should give you $25$ again, which gives you Z after de-indexing. Then you divide: $\big\lceil 181 / 26 \big\rceil$, and get back $6$ which is the index of 7 in the range $[1, 9]$.
Now we need to include encryption and decryption:
You can now perform FF1 or FF3 on the result, $181$ and get a different value. You can simply use the rules to encode this to your required representation.
So say that you have $\text{encode}(\text{"7Z"}) = 181$ and $\text{enc}_k(181) = 26$, then this will give you
$\text{decode}(26) = "1A"$ which you can store. Then you reverse like this: $\text{decode}(\text{dec}_k(\text{encode}(\text{"1A"}))) = "7Z"$. The encode and decode parameters are specific to [1-9][A-Z].
Above tricks can easily be extended to any format for which the ranges are clear, and - when coded correctly - only multiplication & addition for are needed for encoding and only divide-with-remainder is needed for decoding. The encoding/decoding should take less than a microsecond when implemented correctly (for relatively small input sizes, for which FPE is commonly used).
Comment: "less than a microsecond" for the encoding before and after the encryption itself is correct for FF3-1 (and even ample if that's per digit), since FF3-1's block space is limited to 192-bit. For FF1 the limit seems to be 4Tib (512MiB), and for large block the time per digit will become much larger, since it grows with the number of digits, and proportionally so when using the algorithms in the spec and the answer.


How do I beat the Joker in Arkham city?

Question: I'm stuck at the Steel Mill in Joker's Funland trying to beat the Joker, inmates and Titans.  I can't figure out how to beat the Titans.  I'm playing the Xbox 360. How do I beat them?
Answer: You beat the titans in the same way you beat them earlier- you ultra stun them (B, B, B) then punch them several times to ride them. If there are no henchmen left, this will takedown the titan instead.
The only difference is that there are more and better armed henchmen than in the earlier fights. You'll need to defeat some of them or get extremely lucky to ultra stun a titan. If you do decide to focus on the henchmen (don't worry about Joker, he's invincible in this fight), keep an eye on the titan, keep your distance and dodge if it charges you.

How do I beat the Joker in Arkham city?


Is it a best practice to add items to Resolved Items list in Custom Resolver?

Question: Just wanted to check, is it a best practice to add items (ResolvedItems) to ResolvedItems list in a Custom Resolver? Or the Custom Resolver is to be used only for removing Resolved Items for the list?
Comment: Interesting. Which posts or info made it seem like Custom Resolvers were only for removing items?
Comment: I've heard a few recommend the Event System over a Customer Resolver to change the Publishing Queue for performance reasons, but I have to defer to others to better explain why (it was something about checking fewer items).
Answer: If your question is how to publish additional items together with your item, then, just like everything else in Tridion, you have multiple options, where choosing one depends on your implementation, preferences, maintenance capability etc.
So how you can achieve this:

As you and Bart stated, yes, you can use a Custom Resolver to add
items during publishing. This indeed will result in additional item
being published withing the current transaction.
You can create an Event System that will publish the additional item separately, so that way you will have 2 transactions in the Publishing Queue, which is OK if you want to have it more clearly stated to editors and publishing of both items together is not mandatory.
there is also and option 3, where you can use the Publishing Engine to add items during publishing. Withing your Component/Page Template, you can add an additional Dreamweaver template (DWT) which will execute RenderComponentPresentation() over the additional item (if its a Component). Later on you can add your regular DWT which will generate the Output. SO what is the purpose of this and what you get? Basically, you achieve that your second Component is in the Package, so it will processed and published with the Template you have specified. You don't have to link it in your main Component, you can just have it read via Engine and pushed into Package and then rendered.

So whichever way you choose to go, please be aware that most problems/frustrations you can have in maintenance phase when after few months/years everyone forget what they were doing in implementation. As for me, I saw all 3 options implemented. :)
Comment: #3 also happens for Pages with Dynamic Component presentations where publishing the page will add its DCPs to the transport package. I'm fuzzy if you actually _need_ the`RenderComponentPresentations()` calls. I suspect that pages publish their embedded DCPs automatically.
Comment: yes @AlvinReyes that is correct. I was more speaking of situation where one DCP can publish another DCP with it.
Comment: @Alvin Reyes, actually, when publishing a Page with only static CPs, **only** the Page is published. You can check this with the `Show items to Publish` button. In case of pages which have DCPs, the Page and all the DCPs are listed VS only the Page for Pages that have only "static" CPs. CPs don't exist on their own when published as `embedded`, hence they are not treated separately.
Answer: A Custom Resolver is for customizing the resolving, this includes adding and removing items indeed.
Personally I think it is more clear when you are adding items in a custom resolver, than removing them. But I have built both types of resolvers and if you make sure the customer understands that there is a custom resolver in play and what it does, it should never cause any unexpected issues.


Prefetch distance and degree of prefetch

Question: what is the difference between prefetch distance and degree of prefetching?
Comment: Others have already given concise answers. For detailed answer and illustration of prefetch distance and degree, see my [survey paper on cache prefetching techniques](https://www.academia.edu/23625676/A_Survey_of_Recent_Prefetching_Techniques_for_Processor_Caches).
Answer: Prefetching typically deals with entire cache lines.  So a given prefetch request will bring in the cache line that would hold the specified address.
Due to the huge differences in memory speeds, it can take many cycles to bring data into the cache.  Some latencies are in the dozens of cycles if not longer.  Now, the only way to really benefit from a prefetch is to issue it far enough ahead of the actual use of the data so that there's enough time for the machine to pull the data into the cache.  This implies that data access be predictable so one can anticipate what memory needs to be in the cache.  The simplest case is marching through a linear array.  Now, a common scenario (in 'scientific code') is a loop that reads the data then processes it.  The cache miss penalty may be high and the processor may be very fast, and simply prefetching the next cache line may not be sufficient as we may be finished processing the array corresponding to the current cache line and waiting for the data in the neighbouring cache line before the data has arrived at the cache.  So we may have to fetch further away than the next cache line.
How far ahead you prefetch is the distance e.g. 512 bytes.  The degree of prefetching is the distance in terms of cache lines i.e. if your cache line is 256 bytes, the degree of prefetching is 2.
Comment: The definition of prefetching degree i'm familiar with is - how many prefetch lines do you issue on each trigger. They don't have to amount to the prefetching distance (which may vary dynamically in some implementations), as long as it gets you there eventually.
Answer: Prefetching degree is the number of cache lines to prefetch at each trigger.
Prefetching distance is the concept from array within loop. D = ceil(l / s), l is average memory latency in terms of number of cycles, s is cycle time of shortest execution path. D is be number of iterations ahead for a certain array element, so that memory latency is covered.


In the sentence "I went home because it was getting late." the part of "it was getting late" is the sentence pattern S - TV - DO or S - LV - PA?

Question: So, in the sentence "I went home because it was getting late." Is the the sentence pattern of "it was getting late" is (Subject - Transitive Verb - Direct Object) or (Subject - Linking Verb - Predicate Adjective)
Answer:
it was getting late

get is a linking verb, and was getting is its past continuous tense.
late is an adjective functioning as subject complement.
The sentence structure is hence Subject - Linking Verb - Adjective.
get has one of its meanings to become or start to be.

You're getting to be such a big boy, aren't you!

Cambridge Dictionary


How to render the shadow of an invisible object?

Question: Say I wanted to make a render of a ghost. The ghost must be invisible to the camera, but it must still cast a shadow on the ground. How can I block light from passing though an object that is invisible?
Answer: If you are using cycles you just have to disable camera visibility.

Alternatively you can make a shader that uses the camera ray as a mix factor for your figure's shader and a transparent one. The camera will not see the object but it will still cast a shadow.
Answer: This can be done in Eevee. Give your object a tranparent shader, and set the blend mode to 'Alpha Blend' or 'Alpha Clip' in the materials tab. Make sure to keep the shadow mode set to 'Opaque'.
You can't control the opacity of the shadows with this method, but it works for most cases. It also gets rid of the black square problem at intersections.


Evaluation and Visualization of DeeplabV3 completed or not?

Question: Disclaimer: First time i am trying Machine Learning!
We have a requirement of Automatic segmentation of a objects in an image from Background. Through internet we found that "Deep lab" will solve our purpose. we downloaded the deeplab from their offical site and followed all the instructions that they have mentioned. we trained the pascal_voc_2012 dataset with below command

python deeplab/train.py \
      --logtostderr \
      --training_number_of_steps=30000 \
      --train_split="train" \
      --model_variant="xception_65" \
      --atrous_rates=6 \
      --atrous_rates=12 \
      --atrous_rates=18 \
      --output_stride=16 \
      --decoder_output_stride=4 \
      --train_crop_size=513 \
      --train_crop_size=513 \
      --train_batch_size=1 \
      --dataset="pascal_voc_seg" \
      --tf_initial_checkpoint=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/checkpoint
  \
      --train_logdir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/train$
  \
      --dataset_dir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/tfrecord

Training is done after 50 hours. Then i started the Evaluation using below command

python deeplab/eval.py \
      --logtostderr \
      --eval_split="val" \
      --model_variant="xception_65" \
      --atrous_rates=6 \
      --atrous_rates=12 \
      --atrous_rates=18 \
      --output_stride=16 \
      --decoder_output_stride=4 \
      --eval_crop_size=513 \
      --eval_crop_size=513 \
      --dataset="pascal_voc_seg" \
      --checkpoint_dir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/train/
  \
      --eval_logdir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/eval/
  \
      --dataset_dir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/tfrecord

After executing the above command, it found one checkpoint correctly, but after that it stays with this message

"Waiting for checkpoint at
  home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/train/"

So i terminated the execution of Eval after 2 hours and started the visualization with below command

python deeplab/vis.py \
      --logtostderr \
      --vis_split="val" \
      --model_variant="xception_65" \
      --atrous_rates=6 \
      --atrous_rates=12 \
      --atrous_rates=18 \
      --output_stride=16 \
      --decoder_output_stride=4 \
      --vis_crop_size=513 \
      --vis_crop_size=513 \
      --dataset="pascal_voc_seg" \
      --checkpoint_dir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/train/
  \
      --vis_logdir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/vis/
  \
      --dataset_dir=/home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/tfrecord/

visualization also executed for one checkpoint and then again got the same message like Eval.

"Waiting for checkpoint at
  home/ktpl13/Desktop/models-master/research/deeplab/datasets/pascal_voc_seg/exp/train_on_train_set/train/"

Again i terminated the execution of vis. There is a folder generated under vis with name "segmentation_results" which contains the "prediction.png" for each input image. which is "completly black image".
Now My questions are.

Did My Evaluation and visualization are done? or am i doing something wrong?
Why the predicted images all are Black?
Comment: Hey, do you need more info to help on this issue..?  @petezurich
Answer: About the eval waiting for another checkpoint, it's because the default expects to run along with the train process. To run the eval script only once, after training, add this flag to the eval.sh script:
<code>--max_number_of_evaluations = 1</code>
And you can view the value using TensorBoard.
The vis.sh script appears to be running correctly as it's saving the images to the directory. The issue with all black images is a different problem (e.g: dataset configuration, label weights, colormap removal, etc).
Answer: For future reference, I ran into the same problem. After I found out what happened I laughed so hard.
Both eval and vis ran as expected.
For eval, right above your output of "waiting for checkpoints," there should be a line that says "miou[your model accuracy here]" It is a tiny line and easy to miss.
For vis, you will find your segmented result in the vis logdir you provided in your vis command.
More in depth, both eval and vis have successfully analyze the network your trained, and as a feature they are waiting for more checkpoints in case you decided to train more networks to compare.


Why did Dumbledore leave his ideas of wizarding domination?

Question: Why did Dumbledore leave his ideas of wizarding domination and becoming the master of death? After Arianna's death he had no more responsibilities that held him.
Answer:
Because the reason he bought into the ideas was his anger at having to take care of Ariana instead of leading his academic career.

"So that, when my mother died, and I was left the responsibility
  of a damaged sister and a wayward brother, I returned to my village
  in anger and bitterness. Trapped and wasted, I thought! And then,
  of course, he came. . . ."

The ideas about wizarding domination were mainly fruitful in ensnaring Dumbledore because of his anger at Muggles because they were the cause of his predicament; AND chimed in with his youthful vanity:

Dumbledore looked directly into Harry's eyes again.
  "Grindelwald. You cannot imagine how his ideas caught me, Harry, inflamed me. Muggles forced into subservience. We wizards triumphant. Grindelwald and I, the glorious young leaders of the revolution.

So, what changed to make Dumbledore's position change?

He blamed himself for Ariana's death. He did worse to her than the Muggles
He obviously lost his teenage anger at having his academic career interrupted, just to take care of his sister.

Because he was lying to himself all that time, to assuage his conscience.

"Oh, I had a few scruples. I assuaged my conscience with empty words. It would all be for the greater good, and any harm done would be repaid a hundredfold in benefits for wizards. Did I know, in my heart of hearts, what Gellert Grindelwald was? I think I did, but I closed my eyes. If the plans we were making came to fruition, all my dreams would come true.

So, what changed to make Dumbledore's position change?

He stopped lying to himself and saw the truth.

He was filled with remorse over what he's done, and that he caused it.

"Invincible masters of death, Grindelwald and Dumbledore!
  Two months of insanity, of cruel dreams, and neglect of the only
  two members of my family left to me.
..  He ran, while I was left to bury my sister, and learn to live with my guilt and my terrible grief, the price of my shame.

Because, to Dumbledore, both the wizarding domination AND being the master of Death were not (unlike Gellert) the ends, but merely the means.

... The Resurrection Stone... To me, I confess, it meant the return of
  my parents, and the lifting of all responsibility from my shoulders.
  "And the Cloak ... I thought that, if we ever found it, it might be useful in hiding Ariana
our interest in the Cloak was mainly that it completed the trio, for
  the legend said that the man who united all three objects would
  then be truly master of death, which we took to mean 'invincible.'

So, what changed to make Dumbledore's position change?

Not only did he wake up and realized that they were the wrong means; but he no longer was in a position to want his original ends (after Ariana's death)
He no longer needed to, and thus cared, about being "invincible"
Comment: Good answer, have my +1. But the end is confusing: it sounds like you're answering "why doesn't Dumbledore search the relics anymore?" rather than "why doesn't he want to dominate the muggles?" Maybe you should emphasize *Because, to Dumbledore, both the wizarding domination AND being the master of Death were not (unlike Gellert) the ends, but merely the means.*
Answer: Arianna's death just knocked some sense into him. He saw firsthand what Grindelwald's "For the Greater Good" meant. He was also romantically involved with Grindelwald, which made him turn a blind eye on possible death and destruction they would cause in their quest for the Deathly Hallows. But the death of his sister made him realize what pain that would inflict on others and he decided not to pursue that course ever again. This is why he declined offers to become Minister of Magic and remained on Hogwarts as Headmaster.


Export/import from local PostGIS db to cartodb?

Question: I have a local PostGIS database with a polygon table and a nonspatial table. I would like to upload them into my CartoDB account. What is the best way to do this? I could export the polygon layer as a shp and the nonspatial table as a csv then upload them like that, is that the most straightforward way? Or is there a way to skip that and copy directly from postgis to postgis?
Answer: I have used the following:
1) Export as a .SHP, zipped, then imported
2) Using GDAL / OGR2OGR as per Paul Ramsey's blog post:
http://blog.cartodb.com/data-sync-ogr/

this option will allow you to connect directly from your PostGIS table, and run the GDAL command to truncate and load your data...

3) The CartoDB QGIS Plugin will now allow you to upload data to your CartoDB account from QGIS
Comment: Thanks. The ogr2ogr seems like a good option if you want to set up a regular update process.
Comment: @kmack added a new one - the CartoDB QGIS plugin now supports uploading tables to your cartodb account through QGIS


Post Overwintering chilli

Question: Hi my two chillis had an ok summer.. they came in a bit late and had some light and water through winter
Basically they've lost leaves and appear to have some growth nodes at the base... shall I save the plants some energy and prune trunk back by 50% making them less leggy?
They west facing in north west uk where we are experiencing unusually good weather..
Answer: I would cut it in the lower half. As you say, it needs to focus the energy to get back leaves. Please keep in mind that the most important part of your plant is the one in the soil. You still got the root system for a bigger plant and should not be afraid to cut it down.
Even though I grow mostly inside, I regularly cut branches down to help them grow out new branches and get more fruits. You will also get a more bushy plant that way. Remember that it's in the branch junctions most fruits will grow.

Post Overwintering chilli


When switch furnace on, ventilation fan turns off

Question: Ventilation fan works fine when heating is off but immediately switches off when heating is turned on.  Consequently the furnace runs for a minute and then overheats and turns off.
Any idea what could be the cause?
Comment: What make/model is the furnace, and is this "ventilation fan" the blower in the furnace, or some external fan somewhere?
Comment: I would assume you have a limit switch that is not allowing the furnace to turn on the blower. Furnaces have many limit switches to detect faults in the furnace.  Maybe the flue is blocked?  One of those limits is opening or closing and the computer in the furnace is detecting it and shutting it down.  Without knowing what make and model of furnace or showing a pic of the furnace wiring (or indeed even saying what the furnace is, gas, electric, oil, what?) all we can tell you is "it's broken" which you already know.
Comment: Is this a simple heat only type of furnace standard millivolt 2 wire with a 3rd wire for fan on?
Answer: Many thanks to all who have attempted to help. I am afraid the question was based on my mis-interpretation of the symptoms.  In fact the furnace was attempting to light, but failing due to an exhaust problem (now fixed) -sorry!
Martin
Comment: Glad you figured out what was going on!


Text rendered to email views are failing tests

Question: I'm trying to set up an email to notify me of errors that occur in my Rails app. I'm encountering a small error in my tests that are more or less an inability to properly state what I'm wanting. Let's just say my errors include the following two lines
2013-04-23 02:06:06 ERROR -- Errors for OUT6984-20130422-111427-1366647266.5769058.mp3:
2013-04-23 02:06:06 ERROR -- {:phone=>['is invalid']}

When I'm writing this to my email, I'm writing my expectation as follows:
it "contains the right content" do
  @email.should have_body_text("2013-04-23 02:04:56 ERROR -- Errors for OUT6984-20130422-101157-1366643517.5758441.mp3:")
  @email.should have_body_text("2013-04-23 02:04:56 ERROR -- {:phone=>['is invalid']}")
end

but my tests are failing due to...
expected the body to contain "2013-04-23 02:04:56 ERROR -- {:phone=>['is invalid']}" but was
"<!DOCTYPE html>   <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
Errors for 20130423

2013-04-23 02:04:56 ERROR -- Errors for OUT6984-20130422-101157-1366643517.5758441.mp3: 2013-04-23 02:04:56 ERROR -- {:phone=>['is invalid']}
   "

Where the > char in the final hash is being replaced with >. How can I fix this, or rewrite the test in such a way that it passes? The test is doing exactly what I want it to, as is the code. I just don't know how to tell it that this is what I want.
Answer: I'm not sure what your @email instance variable is defined as, but instead of
@email.should have_body_text

try using
mail.body.encoded.should match

and check the output.


How does expansion of electron shells work?

Question:
How does it work? I've read that its about the similarity of the energy levels of $3d$ and $3p$, but shouldn't the electron shell $4s$ be filled before $3d$ if filled? So what is done with the $3d$?
I'd also like to know in what cases will atoms of elements expand their valence electrons? Which blocks or groups or periods do this?
Answer:
You're right! The 4s subshell is filled before 3d. Electrons fill the shell   with least energy first and the 4s shell has a lower energy than the 3d subshell.
Use the Aufbau Principle to find the shell with least energy.
Basically it says that shells with a lower n+l (n and l are the principal and azimuthal quantum numbers) value are filled first.
If two shells have the same n+l value, then the shell with lower n is filled first.
There are a few exceptions to this rule - Copper, Chromium, Palladium, etc.
Reason: n+l gives the number of nodes in an orbital. The more the number of nodes, the less stable the orbital and so the higher the energy.
Valence shells are filled in the s and p blocks. The inner shells are filled in the d and f blocks.
Answer: Regarding #2:
Anything below the carbon row can expand their octets.  The question makes little sense in any other context.


Entropy change at varying temperatures?

Question: Entropy change is defined as the amount of energy dispersed reversibly to or from the system at a specific temperature. Reversivility means that the temperature of the system must remain constant during the dispersal of energy to or from the system . But this criterion is only fulfilled during phase change & isothermal processes. But not all processes maintain constant temperature;temperature may change constantly during the dispersal of energy to or from the system . To measure entropy change ,say, from $300K$ & $310K$, the range is divided into infinitesimal ranges ,then entropy is measured in that ranges and then is integrated as said in this site . But I cannot understand how they have measured entropy change in that infinitesimal ranges as there will always be difference between the temperature however small the range might be . What is the intuition behind it? Change of entropy is measured at constant temperature,so how can it be measured in a range ? I know it is done by definite integration but can't getting the proper intuition . Also ,if by using definite integration to measure change, continuous graph must be there(like to measure change in velocity,area under the graph of acceleration is measured) . So what is the graph whose area gives change in entropy? Plz help me explaining these two questions.
Answer: For a reversible addition of heat, the entropy change is $\int \frac{dQ} {T}$, in other words the area under the graph of $\frac{1}{T}$ against $Q$ (heat added to system).
And yes, when a small amount of heat $\Delta Q$ is added, temperature T changes only a little, so $\frac{\Delta Q} {T}$ is well-defined.  When added up this gives the integral.
Comment: So,they take the temperature constant neglecting the infinitesimal difference,right?
Answer: Calorimetry is a nasty business. Whenever is possible entropy is measured by measuring mechanical parameters by taking advantage the Gibbs form of 2nd law. For example, if a thin rod is elastic then $dU = TdS+\sigma d\epsilon$ where $\sigma, \epsilon$ are the stress and strain. From the equality of derivatives you get $\frac {\partial S}{\partial \sigma}|_T = -\frac {\partial \epsilon}{\partial T}|_\sigma$ the right side of which you can measure directly and then you can integrate with respect to stress at constant $T$. Thus you only have to measure entropy as function of stress at one temperature, the rest you can get by measuring thermal expansion at constant stress.

Entropy change at varying temperatures?


How do I add my photo to my account in Outlook 2010?

Question: I've seen other users have their own picture in Outlook 2010.  How do I add this to my account?  I don't see anything in Options/Settings.  I've been able to do this in Lync, but not in Outlook.
Comment: Have a look in File > Options > Contacts
Comment: That doesn't work.  I checked before ever posting this.  Why the downvote?
Comment: I didn't downvote
Comment: Thanks.  I was asking why to anyone in general, but I realize it's confusing when crammed into a short comment.
Answer: Per the TechNet blogs, here is an easy way to add the picture:

To add a picture (if your organization supports it), click on your
  name in an e-mail addressed to you. This is the fastest way to open
  your Contact preview. Click Open Contact to display your full contact
  information. Now double-click the generic picture icon:

You'll be prompted to locate the picture you want to use. Find
  something appropriate for work, ideally a recent close up of your
  face. Then click Save & Close and you're done.
Comment: That doesn't work for me.  I think it must be something that an admin has to do at the Exchange/Server level.  Thanks anyway for the suggestion.
Comment: I have Outlook 2010, and when I *double* click my name in an email (single click does nothing) it pops up my contact card. There is *no* "Open Contact" button or option anywhere.
Comment: This worked for me but I had to get to it from a different route: 1. Go to Contacts view of Outlook 2. Search for my name 3. Double-click my contact card in the search results. This takes me to the "Contact Preview" screen shown in the screenshot above.
Answer: I ended-up getting this to work by changing my profile pic on our OWA site (accessible at portal.microsoftonline.com) .  Then, in Outlook, I synchronized my offline address book and voila.
Answer: I wasn't able to double click as described above:

To add a picture (if your organization supports it), click on your name in an e-mail addressed to you. This is the fastest way to open your Contact preview. Click Open Contact to display your full contact information. Now double-click the generic picture icon:

What I did instead was to got to

Contacts (folder below Mail and Calendar folders)
Add myself as a contact.

In the processing of adding myself as a contact, I was able to upload my picture.
Comment: But will your picture show up for everyone else at your company?  In other words, if you email John Doe, will he see your picture in his Outlook?
Comment: Tried, does not work. Only works for yourself, which doesn't help much.
Comment: I added myself as a contact from an email addressed to me. Not sure if that makes a difference.
Answer: This depends on exchange version actually.  2007 doesn't have any normal graphical way to add the picture, so it has to be done via powershell.  If it's 2010 there's a way to add via GUI.  So: Which version of exchange are we talking about?
Comment: They indicated 2010 in the title, the body of the question and tag it as such.
Comment: exchange 2010 does not = outlook 2010
Comment: Gotcha. My bad.
Comment: I've seen the articles mentioning the PowerShell command, but does that need run on the actual Exchange server, or can I just run it from my client workstation?  So far, I've had no such luck from my workstation.  Thanks
Comment: yes, it'd need to be run on the exchange server, and with exchange administrator rights.  unfortunately that means this is out of reach for a lot of normal users who are on exchange 2007 servers.
Comment: @DanielAgans Do you want to update the answer now that you know the version number? Thanks
Answer: This is what I did to get this working :

Go to Contacts section in your mailbox (under Calender folder)
Add my own contact in there
Double Click on Generic Pic icon
Uploaded my pic
Click on Save & Close option in the Header
Answer: On Windows 10, click on the Windows symbol on the bottom left hand side of the screen.
Your user icon will appear on the left hand side, above the four other icons.
Click on this and click 'Change Account Settings'. You can set a profile photo here, which will be reflected on Outlook 2010.


passing a list argument to llply

Question: I've never found a satisfactory answer to this question. Assuming I have a function:
foo <- function(a,b,c) {
...
}

a is a list containing many data.frame objects
b is a list containing a special class of data (class ppp from library spatstat if that helps any).
c is an integer.
and I want to push a list through that function:
result <- llply(a, foo, b,c)

The names of list items in b correspond to the column "type" in the data.frames in list a. So inside function foo I can quickly do:
id <- which(names(b) == unique(a$type))
baseline_pattern <- b[[id]]

to match each underlying spatial pattern in b with the right data.frame in a. There are about 10 items in b and 1000s of items in a. Unfortunately this doesn't work because llply (or lapply in general) tries to push one list item at a time, even for argument list b and the two lines of code matching the correct list item in b with the correct data frame fails because the function no longer has the entire list b. Is there any way around this?
In a pinch, I could create another list (effectively combining a and b) where each list item is itself a list with length 2 containing the data.frame and the corresponding point pattern object. But this will result in 1000s of redundant copies (and make running this operation on a cluster far less efficient).
UPDATE: I plan to turn this into a mclapply to run this on a cluster. I cannot do that with mapply (unless there is a mcmapply).
Comment: As it turns out there is a `mcmapply` in R 2.15.0. Time to upgrade...?
Answer: I haven't woken up completely yet, but it sounds like you want to use mapply with MoreArgs=list(b, c).

passing a list argument to llply


Asymptotic length of reduced word on free group with replacements

Question: This seems to be an elementary question, but it's proving hard for me to just Google. Suppose you have a sequence which picks elements out of $\{a, a^{-1}, b, b^{-1}, c, c^{-1}\}$ with equal probability. After, say, seven steps you'll get words like $a b c c^{-1} a c b^{-1} $ which in this case reduces to $a b a c  b^{-1} $ after canceling inverses. My question is this: if I write $c$ as some string of $a, a^{-1}, b, b^{-1}$, (and write $c^{-1}$ as the inverse of that) are there any theorems about the expected length of the new sequence after reduction? For example, I could take $c = a^{-1} b b$ so my previous word becomes just $ab b$. I care mostly about the case of a very long word.
Comment: You are looking at a random walk on a tree. It is known that such a walk tends to infinity linearly. The statement holds more generally for random walks on hyperbolic groups.
Comment: @Seirios Right, so clearly the sequence of $\{a, a^{-1}, b, b^{-1}, c, c^{-1}\}$ (where each happens with probability $1/6$) goes to infinity at a rate $(5/6)(1) + (1/6)(-1) = 2/3$. But I'm wondering what happens when I replace $c$ with a function of $a, a^{-1}, b, b^{-1}$. If I write $c = a b^{-1} a$, then I'm taking a random walk on $\{a, a^{-1}, b, b^{-1}, a b^{-1} a, a^{-1} b a^{-1}\}$, where each of those six elements still happens with probability $1/6$. But this sequence grows faster than $2/3$ - my question is how much faster?
Comment: Does the word $aba^{-1}$ reduce to $b$, i.e., do the letters commute?
Comment: @toliveira No, nothing commutes here. Well except $a a^{-1} = a^{-1} a = 1$ and such.
Answer: The keywords are random walks on (hyperbolic) groups and speed of escape. There are many references on the subject (e.g. this one, although it's likely to be too general for your problem), and the precise result you seem to be interested in is a theorem by Kesten (1959).
Setting
Let $F_2$ be the free group on two generators. Let us consider a sequence of i.i.d. $F_2$-valued random variables $(X_k)$, with $\mathbb{P} (X_0 = d) = 1/6$ for $d\in \{a,a^{-1}, b, b^{-1}, c, c^{-1}\}$ (replace $c$ by any word in $a$, $b$ you like). Note that the $X_k$'s are symmetric: $X_k^{-1}$ has the same distribution as $X_k$, and the support of their distribution generates $F_2$.
Define a random walk on $F_2$ by taking $S_0 := e$, and $S_{n+1} = X_n S_n$.
The group $F_2$ is endowed with the word metric, that is $d(e, g)$ is the length of the shortest way to write $g$ as a product of the generators $a$, $b$ and their inverses. What you are interested in is $d(e, S_n)$.
Observations
Note that $d(e, S_{n+m}) \leq d(e, S_n)+d(e, S_m)$. Hence, the stochastic process $(d(e, S_n))_{n \geq 0}$ is subadditive. Some general results of ergodic theory (e.g. Kingman's subbaditive theorem which is a generalization of the law of large numbers) tells you that there is a real $\ell \geq 0$ such that, almost surely,
$$\ell = \lim_{n \to + \infty} \frac{d(e, S_n)}{n}.$$
Not that this is true for any discrete group (with a left-invariant metric) and any random walk with bounded steps. However, the limit can easily be $0$; indeed, if you take a simple random walk on $\mathbb{Z}^d$, then the central limit theorem tells you that $d(e, S_n)$ is of the order of $\sqrt{n}$, and thus grow sub-linearly.
(Non)-amenable groups
At this point, it is useful to distinguish between two kind of groups: those which are amenable, and those which are not. While there are many equivalent definitions, I'll just give two criteria:

if a discrete group has polynomial (or sub-exponential) growth, then it is amenable. For instance, a ball of radius $n$ in $\mathbb{Z}^d$ has $\sim n^d$ elements, so $\mathbb{Z}^d$ has polynomial growth.
If a discrete group contains a copy of $F_2$ as a subgroup, then it is not amenable.

A theorem of Kesten
It turns out that non-amenability is exactly what we need to get a linear rate of growth!

Theorem (Kesten)
Let $G$ be a finitely generated group. Let $(S_n) = (X_{n-1} \ldots X_0)$ be a random walk on $G$. Let $\mu \in \mathcal{P} (G)$ be the distribution of $X_0$. Assume that the support of $\mu$ is bounded, and generates $G$. Assume furthermore that the random walk is symmetric, i.e.  $X_0 \equiv X_0^{-1}$ in distribution. Then $\ell >0$ if and only if $G$ is non-amenable.

Your problem fits perfectly this framework. In other word, no matter what $c$ you choose, almost surely, the length of the reduced words shall grow linearly (with a speed $\ell$ which depends only on $c$).
I guess that the next step would be to find $\ell$ as a function of $c$, and even get a more elementary proof for given (not too long) $c$. That said, before going to the specifics, I believe that a rough picture of the general theory is useful.
Comment: Thanks. Does this give me any hope of actually computing $\ell$ though? That's really the hard part, isn't it? Finding $d(e, S_n)$ doesn't seem to be any more feasible than doing the multinomial expansion of $(a + a^{-1} + b + b^{-1} + a b^{-1} + b a^{-1})^n$ (or whatever) and counting the occurrences of words of a given length.
Comment: @Mr. G: My best guess is that the first three letters of $S_n$ converge for large $n$ to a stationary distribution. Computing this distribution should be feasible, and getting $\ell$ from this distribution should be easy (because the average length gained from $S_n$ to $S_{n+1}$ depends on the first three letters of $S_n$ and on $X_n$, so you only have to average among all possibilities). I don't know if this idea can be made rigorous.
Comment: I think you're exactly right about the stationary distribution. The problem was that it seemed impossible to find the distribution as the fixed point of a recurrence relation. Say $c = a b^{-1}$ and say you consider the twelve possible values of $aa, ab, a b^{-1}$ etc. as your "states." The probability of transitioning to any state at step $n + 1$ depends on the first four letters of your current word (because you can remove $0, 1$ or $2$ at each step). But those four letters don't have to be the $n$ and $n - 1$ states; that information could have been lost if you just went backwards.


JQuery Rounded Corners with Menu

Question: I'd like to create a dropdown menu with rounded corners without using images. I tried combining the suckerfish menu plugin with a number of the JQuery rounded corners plugins, which mostly worked fine in Firefox, but looked terrible in IE.
Does anybody have an easy combination of plug-ins that will work with both IE and Firefox?
Comment: Why not use regular border-radius (CSS3)?
Answer: Did you already try DD Roundies?  I've had pretty good cross-browser success with this code, it also fixes background image transparent pngs, the only code library I've found that actually did this on all browsers.
Answer: Try using CSS3 border-radius and if really necessary, CSS3Pie for IE<9 compatibility.

JQuery Rounded Corners with Menu


Security risk of opening port 111 (rpcbind)?

Question: As far as I understood rpcbind is used for listing active services, and telling the requesting client where to send the RPC request. If a host listens on port 111, one can use rpcinfo to get program numbers and ports and services running; For example look at below:
root@bt:~# rpcinfo -p x.x.x.x
program    vers   proto     port
<code>100001    2   udp    111  portmapper
100000    3   udp    111  portmapper
100005    3   udp   1048  mountd
100022    1   tcp   1047  nlockmgr
100021    4   udp   1047  nlockmgr
100026    1   tcp   1039  status
100029    1   udp   1039  status
100003    2   tcp   2049  nfs
100003    3   tcp   2049  nfs
</code>
What is the security risk of it?
Where we usually need to open port 111 and when can we close it without any other services fail?
Comment: Do you mean to have it open so that other systems can access port 111? There's a difference between localhost access and remote access.
Comment: I mean open it so other hosts can access it.
Answer: If you expose this service to the internet, everybody can query this information without having to authenticate. It can be useful to attackers to know what you have running.
Also, the RPC service has a history of security vulnerabilities. So don't expose it to the world unless you have to.
Comment: Then the risk is limited to attackers who already have access to the internal network, either because they are internal users, or because they have breached something else.
Comment: What if it is only internally exposed?
Comment: Good answer! +1
Answer: rpcbind can have an amplification factor of anywhere between x5 and x20 depending on the number of RPC services running.
It should not be exposed publicly or at least only allow whitelisted IP addresses otherwise you may find the server participating in DDoS attacks.


Collecting images from a network drive with data merge in InDesign?

Question: Is it possible to link to/collect images from a network drive when doing a data merge? I've tried various paths in the csv/spreadsheet but nothing seems to work. Any tips?
Comment: Your drive might need to be mounted first before it will work.
Answer: Two things should get it working for you: 1. a specially named header row in the CSV and 2. the correct network path to the image. This path will vary depending if you're working on a Mac or PC.
Here's a really simple data merge CSV example for PC:
name,@image
Jay,\\nas\photos\jay.jpg
Bob,\\nas\photos\bob.jpg

And the same for Mac:
name,@image
Jay,Macintosh HD:Volumes:photos:jay.jpg
Bob,Macintosh HD:Volumes:photos:bob.jpg

Note the special @image title for the image field in the CSV and the way the network drive paths are addressed. On a PC it's easy - the regular UNC network path that you would expect. On a Mac it's the path to the mounted share, but it requires the name of the drive where the /Volumes folder lives that Finder mounts drives under (in my case Macintosh HD - note that there's no leading slash or colon, and the paths are colon-separated rather than slash separated.


Is there anything like ratio between number of manufacturing industries to number of retail shops?

Question: In my country there are very few manufacturing factories,but large numbers of small retail shops (like one shop per house or may be even more). What are the effects in the economy of a country for having large numbers of retail shops,but very few manufacturing factories ?
Comment: This is a sign of a consumption driven economy (or consumer economy). There is a vast wealth of literature on consumer economies, so I would suggest leafing through it if you are interested!
Comment: @NisH I think you mean factories, not industries.
Comment: @DornerA How long a country can survive in this kind of consumer economy? I mean, can a country's economy (or income) solely depend on its retail industry, and not involve in any manufacturing activity?
Comment: @denesp Yeah, I mean not many factories and also manufacturing industry is in nascent stage.
Answer: Economists are generally more interested in the aggregate output of different sectors of the economy rather than the number of firms or outlets.  The difference between lots of small shops and a few large shops is quite different to the difference between the majority of GDP coming from industry or services.
If a country has a lot of small retail outlets and a few large manufacturing firms, that suggests that there are much larger economies of scale in manufacturing than retail.
The aggregate output of agriculture, industry and services are normally reported in GDP tables (here's an example for Rwanda).
A larger services sector is normally associated with richer, more advanced countries.  These images compare countries based on the relative size of industry, services and agriculture, and the proportion of the labour force working in each:

In poorer countries, agriculture tends to be lower productivity than other sectors, so those countries tend to show up as greener in the labour share than the GDP chart.