How can I temporarily deactivate tvOS UITabBarController

Question: Here's my situation:
I have a tvOS app where the base navigation is a UITabBarController. Each root view controller referenced from the UITabBarController is a UINavigationController which then handles pushing ViewControllers onto the stack. When a particular ViewController (containing a CollectionView) is active, I need to prevent the default tvOS UITabBarController ability to gain focus.
I've attempted hiding the TabBar manually on ViewWillAppear, Subclassing the TabBar and overriding preferred focus view. In most cases deactivating focus in the TabBar results in focus deactivated in its activeViewController. Currently my solution is to override the "shouldUpdateFocusInContext" delegate method in my ViewController and prevent any focus onto views that aren't UICollectionViews. This works for this one case but is obviously a suboptimal and hack solution.
override func shouldUpdateFocusInContext(context: UIFocusUpdateContext) -> Bool {
    guard let nextFocusView = context.nextFocusedView else {return false}

    if nextFocusView.isKindOfClass(UICollectionViewCell.classForCoder()) {
        return true
    } else {
        return false
    }
}

Anyone have any better ideas of how to temporarily prevent the UITabBarController's TabBar from even displaying when the user swipes up on the tvOS remote?
Answer: To prevent the UITabBarController's TabBar from displaying when the user swipes up, use focusHeading:
-(BOOL)shouldUpdateFocusInContext:(UIFocusUpdateContext *)context
{
    BOOL result = [super shouldUpdateFocusInContext:context];
    if (context.focusHeading == UIFocusHeadingUp)
        return NO;
    return result;
}

This was especially useful for me because my ViewController doesn't have any focusable views. All it has is a scrollView on the page which used panGestureRecognizer.allowedTouchTypes to capture swipes and I couldn't use the nextFocusedView.
Edit
I also found it useful to use -(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item to keep track of which tab was being selected so I could return NO only for certain tabs.


Ruling on when someone performs salah infront of you?

Question: AOA.
Once someone prayed infront of me while i was laying on a sofa. It was dark at that time. Have i commited a sin?
As i didnt move to the side.
Comment: Why should you have committed a sin (elaborate!)?
Answer: There are ahadith which could be used as evidences for rulings on praying in front of a person or having a person in front of you while praying, but first let's start with a different reference from which a more general ruling can be concluded:

Once the Prophet (ﷺ) prayed on a Khamisa with marks on it and said, "The marks on it diverted my attention, take this Khamisa to Abu Jahm and bring an Inbijaniya (from him.)"
  (Sahih al-Bukhari, Sahih Muslim, Sunan abi Dawood, Sunan an-Nasa'i)

From this hadith one could conclude that it is rather frowned upon to pray while having something that might disturb or distract you in front of you. This can be used as a rule of thumb for the praying person, so this is rather off-topic, as you were not praying.
Now let's take a look at the evidences we need:

Allah's Messenger (ﷺ) used to offer his prayer (while standing) in the midst of the bed, and I used to lie in front of him between him and the Qibla If I had any necessity for getting up and I used to dislike to get up and face him (while he was in prayer), but I would gradually slip away from the bed. (Sahih al-Bukhari 1, 2 & 3 and sahih Muslim)
It is not good that you people have made us (women) equal to dogs and donkeys. No doubt I saw Allah's Messenger (ﷺ) praying while I used to lie between him and the Qibla and when he wanted to prostrate, he pushed my legs and I withdrew them. (Sahih al-Bukhari)
The Prophet (ﷺ) used to pray at night while I lay interposed between him and the Qibla like a corpse on the bier.
  (Sahih Muslim and sunan ibn Majah)
The Apostle of Allah (ﷺ) said his whole prayer (Tahajjud prayer) during the night while I lay between him and the Qibla. When he intended to say Witr (prayer) he awakened me and I too said witr (prayer).
  (Sahih Muslim and sunan an-Nasa'i)

The ahadith above all cover the situation of a person praying while having somebody (who is not praying) between him and the qiblah. The first hadith seems to show that facing a person who is praying (looking him/her in the eyes) was considered as disliked.
The second hadith seems to show that an interaction between the praying person and a person lying in front of him is possible and there's no harm in that for neither of both.
However if the person lying or being in front of the praying person wants to leave the position they should slip away (beside the praying person not in front of him). Also see Is crossing someone while he is praying permissible?
Therefore you may find these rulings:

Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni (2/40):
It is makrooh to pray facing a person's face, because 'Umar disciplined people for doing so. According to the hadeeth of 'Aa'ishah, the Prophet (blessings and peace of Allah be upon him) used to pray level with the middle of the bed whilst I was lying down between him and the qiblah. When I needed something, I would not want to get up facing him, so I would slip away. Agreed upon. End quote.
Al-Nawawi (may Allah have mercy on him) said in al-Majmoo' (3/230): It is makrooh to pray with a man or woman in front of you, facing him where you can see him. This was regarded as makrooh by 'Umar ibn al-Khattaab and 'Uthmaan ibn 'Affaan (may Allah be pleased with them). And because it usually distracts one. It is also makrooh to look at what will distract one, such as a garment with decorations on it, or looking up towards the sky, and other things that are mentioned in the saheeh hadeeths. Al-Bukhaari said in his Saheeh: 'Uthmaan (may Allah be pleased with him) regarded it as nakrooh to face a man when praying. Al-Bukhaari said: Rather that applies if one will be distracted by that, but if he will not be distracted, Zayd ibn Thaabit said: I do not mind; a man does not interrupt the prayer of another man.
End quote. (source islamqa #104404)

So as long as you don't look/face the praying person during the prayer there's no harm nor sin in being in front of him/her.


What is the basic knowledge before starting Japanese language lesson?

Question: I am trying to learn Japanese from the start. I live in Penang, Malaysia. We have the Penang Japanese Language Society (PJLS) here but before I join, I would expect some basic course or level that I can fit into. Also, what are the hierarchy of the levels for Japanese language learning?
Comment: I'm afraid it's not clear to me what you're asking, so I've put the question on hold for now.  This question was also flagged as off-topic by one of our users, and I think that may be the case as well; I'm afraid I don't see a specific question about the Japanese language here.
Comment: I believe there are some users who learnt Japanese language before and possible they could have hard time during the initial stage. This topic might serve to provide me guidance and advice in terms of proficiency in each degree of Japanese language course. Can I say that I am trying to prepare myself by seeking advice and suggestion here before starting the Japanese class?
Answer: Much depends on your enthusiasm. You can start taking courses for the Japanese Language Proficiency Tests (JLPT), which is a standard proof of knowledge in the language. It has an hierarchy of N5 to N1, with N5 being the most basic course.
Now you can ask your PJLS how they go about with their courses or you can buy book and/or self study with help of online resources. You can even choose to ignore the tests altogether and learn from books which are not targeted for JLPT. For example, I have heard Japanese from Zero is quite a good series to learn from (haven't read it myself).
Comment: I think your answer misunderstands what s/he wants to know which appears to be what sort of beginning course s/he can take in Japanese -- not how Japanese tests are organized that s/he could self-study for.
Comment: Put aside any test at the moment, I just want to know which level of program/studies/lessons should I take for a student with zero experience like me.
Comment: @TanSiongZhe Well I just gave the info about the test levels. Depends on you how to prepare for the test. I have no idea about the courses offered there for the tests. So, that is for you to find out.


What is the difference between 免费 and 无偿?

Question: I'm trying to sort out the difference between 免费 and 无偿 as adverbs. Would you say 水果店的老板免费送了我六个苹果。 or would it be 无偿送了?
Comment: They have different meanings. And also depending where you are, 無償 is less commonly used. For example in Hong Kong it is never used. (As a native I have never seen that word being used.)
Answer: 免费 means free of charge. As pointed out by Wikipedia, it is usually applied to commercial products or services that normally charge money and now for free as a part of business strategy. E.g. 免费的午餐 (free lunch), 免费试吃 (free sample of food), etc.
无偿 means no compensation, or 'not asking anything for return'. It is usually applied to non-profit, voluntary activities. E.g. 无偿献血 (blood donation), 无偿社区服务 (community service provided by volunteers), etc. There are usages of 无偿 in legal space which can be connected with commercial activities, but that's a completely different way of expression in a completely different context.
Strictly speaking, '免费给了我六个苹果' means he gave you six apples for customer relationship for reasons like you're a frequent customer or you just make a bulk purchase of other stuffs. '无偿给了我六个苹果' means he gave you six apples out of kindness because you lost your wallet or you're starving. In spoken language, however, their usages are usually mixed and both of your sentences are fine.
BTW, '送' already implies 'for free'. So '免费送了' is unnecessary repetition but again sounds fine in spoken language.
Update: As the other answer pointed out, 无偿 is almost never used in Hongkong which indicates that the usages can be highly regional. Something to keep in mind.
Comment: @Stephen In that case I'd recommend you to use neither, just say '送' is clear enough. Adding either word makes it sound like a calculated move hence depreciates her sincerity and generosity.
Comment: In addition to this answer, "无偿" is more on spiritual aspect.
Comment: So if for example a fruit vendor gave me six apples because it was my last day in a country and she wanted to be nice/it was a gift do you think that is 免费?
Answer: Generally speaking, we use "免費" when someone gets something for free, and "無償" when someone does something for free.
On the other hand, we do not say "無償" in Hong Kong.  For example, we say "捐血" instead of "無償獻血", and "義務工作" instead of "無償社區服務".
Answer: 无偿
MOE

法律上指不得報酬而移轉其物或權利,或服勞務、供勞力而不索求報酬,稱為「無償」。如贈與稱無償行為。

From a Taiwanese point of view (MOE), at least, 无偿 is determined by law.
In some other places it's used with 赠与 to mean "grant" or "outright."
C&T

land grant
无偿土地赠与
wúcháng tǔdì zèngyǔ

And

outright gift
无偿赠与
wúcháng zèngyǔ

OCE also lists this under the English entry voluntary

2 (for free)
无偿地 (run, organize, help)

Where as 免费 would certainly not involve law and would just, simply, mean "free."

What is the difference between 免费 and 无偿？


Applying for new B1/B2 visa with new passport, the birthday on my new is different from my old

Question: I'm 20 years old, a citizen of Belize, and have been to the USA countless times. I've had 2 B1/B2 visas in the past, each having been valid for 5 years. My old belizean passport (and the old US visa) have long been expired, and due to there being no Embassy of Belize in my current country of residence (Lebanon), I had to apply for a Lebanese passport in order to travel. However, there is a mistake in my new Lebanese passport, my original birth date is 1997 but the Lebanese one says 1999. I've been to the USA countless times before and I have a good record, but I'm worried that this mistake will cost me my chances of getting a visa. Will this be of any issue? My father has tried to get the birth dates right, only to be told that it can't be fixed.
Comment: That would be difficult, time consuming, and expensive, plus Belizean missions abroad take 4-6 months to renew a passport. So no, it's not an option :/
Comment: It would be a hassle, but could you instead travel to another country to renew your Belizean passport?
Comment: Did you get your visa corrected successfully? How did it go? I got the same problem here Thanks
Answer: It can be an issue, and it can be overlooked even when noticed. No definitive answer. The consulate knows there are problems with birthday, name spellings, and other discrepancies in applicants data. Have a good and coherent explanation when it comes up. If they smell fraud however, you could be in trouble including being essentially permanently banned from visiting the USA.
Having secondary evidence like old school reports and medical records or baptismal certificate etc which show the correct date consistently is helpful. An affidavit from an official or a priest etc are also acceptable.
From USCIS Adjudicator's Field Manual Primary and Secondary Evidence

Closely related to the best evidence rule is the concept of primary
  and secondary evidence. Primary evidence is evidence which on its face
  proves a fact. For example, the divorce certificate is primary
  evidence of a divorce. Secondary evidence is evidence which makes it
  more likely that the fact sought to be proven by the primary evidence
  is true, but cannot do so on its own face, without any external
  reference. In the above example, church records showing that an
  individual was divorced at a certain time would be secondary evidence
  of the divorce.
By evidence (such as an affidavit)
By a written statement from the appropriate issuing authority

Your young age should be somewhat helpful since you were a minor and not responsible for these mistakes.
Comment: You need to think this carefully through. USA knows you by your old passport and birth date etc. Now you're going to be applying with a new passport and birth date. Essentially they need to be assured you're not changing your identity for some reason, or also that your old identity was not fraudulent. In this case the strongest secondary evidence would be maybe a letter from the Lebanese authorities confirming you applied for the Lebanese passport with the original birth certificate and that they are the ones who **changed** the date mistakenly together with the old birth cert & passports.
Comment: Would my birth certificate work?
Comment: As well as my old two passports with their respective visas?
Comment: I don't know if I can get that sort of letter. But I will present my birth certificate with my original birthdate, as well as the Lebanese individual extract with the mistake, which I had to use to apply for my passport. What do you think?


How much data do you need to build a classifier?

Question: I would like to ask you what a good size of dataset would be for building a classifier.
I know that there are datasets of 1000 obs and datasets of 1m obs. But I also read papers where classifiers were built on datasets of 300 obs.
I think the size may affect the accuracy/precision of a classifier, but I am not sure 100% of that.
Answer: It's impossible to answer this question in general, because the answer strongly depends on the content of the data. More precisely it depends if the relations between the features and the target class in the training data are sufficient for the parameters of the model to be estimated as accurately as possible. In the most simple cases a few instances might be enough, for example a linear regression model with one single feature would need only two "perfect" instances. Practically the following factors have a strong impact on the number of instances needed:

the number of parameters to estimate and the complexity of the model: a more fine-grained model needs more detailed information, i.e. more instances
the number of classes, because there are more possible combinations for the model to learn and because it usually implies a higher number of parameters as well (more complex model)
the number of features, for the same reason
the amount of noise in the data, because finding the general patterns is more difficult if there are lots of inconsistencies/errors in the data, so statistically more instances are needed to distinguish the effect of chance from the real patterns.

So the only way to check how much data is needed for a particular task and dataset is to do an ablation study, i.e. a series of experiments in which a model is trained every time with a different number of instances. For example if one has 1000 instances, they could try to train a model with 100, 200, 300,...,1000 instances. Then by plotting the performance of every model one can observe whether the curve becomes stable at some point: if yes, this point shows how many instances are needed. If not (i.e. the performance keeps increasing significantly), then more than 1000 instances are needed.

I think the size may affect the accuracy/precision of a classifier, but I am not sure 100% of that.

Definitely.
Comment: Thank you so much for your answer @Erwan.
Answer: The amount of data you have will only limit the types of classifiers you can try out on the set. If you have 100 samples you might still be able to perform a Logistic Regression - but you can forget about a Neural Net (this would require 100,000+ samples).
Take a look at this for more information on how much data is generally needed for ML.
Comment: I think it's a bit misleading to suggest that neural networks require 100,000+ samples as some sort of definitive answer. Also, I think the suggestion towards logistic regression needs to be more specific. Logistic regression with 100 features and no regularization might be an issue for example.
Comment: @aranglol you're right. The point I am trying to make is some estimators require more data than others. There is no definite answer, as you say. As for the logistic regression example - I'm simply saying it can work (not that it will).


I have a Type D France (sauf CTOM) spouse visa. Can I land at Basel Euroairport?

Question: If my interpretation is correct, then with this visa I cannot transit through any other Schengen countries as my point of entry needs to be France. Is that correct?
Also, Can I enter through Basel airport? What I mean is, will the immigration authorities be representing France or Switzerland?
Comment: You should edit that information into your question rather than posting it as a comment.
Comment: @kiradotee That's dodging the question. Even within the Schengen framework, every border guard is a national border guard, every Schengen stamp mentions a country, etc. Can you choose if you get to talk to a Swiss or a French border guard? Do they rotate depending on availability? Are all checks happening under the authority of the French state?
Comment: By transit I mean, can I get a flight with a layover at Amsterdam or Frankfurt?
Comment: "will the immigration authorities be representing France or Switzerland?" they will be representing the external border of Schengen area.
Comment: It's been too long since I last went there to remember the process and layout in details and there have been many changes over the years but note that (1) the airport is built entirely on French territory and (2) both border forces are present. I cannot imagine that someone with a valid French visa could be prevented from entering the country.
Answer:
with this visa I cannot transit through any other Schengen countries as my point of entry needs to be France. Is that correct?

No.  You can transit through any Schengen country or countries on your way to France.  This is explicit in the Schengen Borders Code.
Article 6(5)(a):

By way of derogation from paragraph 1:
  (a) third-country nationals who do not fulfil all the conditions laid down in paragraph 1 but who hold a residence permit or a long-stay visa shall be authorised to enter the territory of the other Member States for transit purposes so that they may reach the territory of the Member State which issued the residence permit or the long-stay visa, unless their names are on the national list of alerts of the Member State whose external borders they are seeking to cross and the alert is accompanied by instructions to refuse entry or transit;

This means that if you do not meet the requirements of paragraph 1 then you will be allowed to transit to France unless there is an alert in the system preventing you from doing so.  If you do fulfill the conditions in paragraph one then you can even visit other Schengen countries for up to 90 days before setting foot in France.

Can I enter through Basel airport?

Yes.

What I mean is, will the immigration authorities be representing France or Switzerland?

It doesn't matter.
In a comment, you ask

By transit I mean, can I get a flight with a layover at Amsterdam or Frankfurt?

Yes.  If you do that, you'll clear immigration controls in Amsterdam or Frankfurt rather than Switzerland or France, but as outlined above that is perfectly fine.
Comment: @Nina D visas always list only the country that has issued the visa, but D visas are nonetheless valid for travel to any Schengen state.  You can land in Zurich, Frankfurt, Vienna, Madrid, Milan, etc., etc., and travel to France by air, rail, road, or any other means.
Comment: Thanks phone for your response. So you're saying that I can enter France by road if I land in Zurich? My visa explicitly says that's its valid for "France (Saul CTOM)" and not Schengen states.
Answer: Yes. Basel Euroairport is a two country airport, located in France, depending on the exit (for immigration and custom, you enter in France or in Switzerland.
See the Euroairpot FAQ

Are there multiple exits for arriving passengers (France / Switzerland)?
Yes; the airport consists of two separate parts, a French part and a Swiss part.
Arriving passengers can choose freely if they want to leave the baggage claim area for France or for Switzerland. The respective exits are clearly marked.
Comment: But to get to the baggage claim area, passengers will have to clear immigration controls.  Are those immigration officers Swiss or French?


Horizontal Rule in Content Editor Web Part?

Question: When editing rich text in a CEWP, as typical not-admin user, how does one go about inserting a horizontal rule? Google has not been my friend. I'm loathe to tell the users they need to edit the HTML and stuff in an HR tag. And I'm hoping there is a better answer than that or, even worse, a giant string of underscore characters. This would be for SP2010 Server, if that matters.
Answer: I don't know about you guys but on my CEWP if I do the following, I can enter an HR tag without moving to the html view:

Type some dummy text
Click the area where we want the line
In the ribbon, pick Editing Tools > Format Text > Markup Styles > Horizontal Rule

We can even customize the look and feel of the line with CSS using
hr.ms-rteElement-Hr
update: screenshot (specific of SharePoint 2010)

In SharePoint 2013, we can create new elements through CSS, e.g.
<code>/*extensions*/
/*page elements*/
span.ms-rteElement-CustomHRElement{
    -ms-name:"HR in page elements";
    background-color: #b6b6b6;
    height: 1px;
    width:100%;
    display:block;
}
/*text styles*/
.ms-rteStyle-CustomHRStyle{
    -ms-name:"HR in text styles";
    background-color: #b6b6b6;
    height: 1px;
    width:100%;
    display:block;
}
</code>
Comment: Indeed. If it was a snake, I surely would have gotten bit. Just didn't see it there amongst the other choices. Thank you sir.
Comment: I have SP2013 and I can not locate the horizontal rule. Appreciate if you can post a screenshot. Thanks!
Comment: @Aslan this solution is specific of SP2010. but there's always the possibility of editing the source and adding ""


Database Design Dilema

Question: I am building a fleet unit management software which handles data from GPS devices mounted on the clients' vehicles.
Now i have to implement the database design. I have two main tables.
table 1: Fleet_Unit(unit_id, col_2, col_3, col_4), unit_id is PK
table 2: Gps_Device(device_id, col_2, col_3, col_4), device_id is PK
In most scenarious only one gps device is mounted on one vehicle but there are cases when two or even more gps devices may be mounted on the same vehicle for various reasons. So i have to decide if i should have an extra table to map the vehicles to the gps devices or put an extra column inside the Gps_Device table where the ID of the Fleet_Unit table will be stored.
I decided to use the first approach so i made one more table:
Fleet_unit_gps_device_mapping(fleet_unit_id, gps_device_id).
So before i ask you for opinion let me introduce you few more tables that are used to describe the fleet_unit object.
Each gps device has some analog and digital I/O. There may be one or more fuel meters connected to the gps device and vehicle's engine, temp sensors, card readers and so on.
So here is ONE of the extra tables (the others are similar):
fleet_unit_digital_sensors_mapping(fleet_unit_id, gps_device_id, sensor_col_1, sensor_col_2)
As i mentioned there may be more than one gps device mounted on the same vehicle so digital-sensor-1 which is read from first gps device is different from digital-sensor-1 which is read from the second gps device.
Now i'd like to ask you how to implement the database.
Should i use fleet_unit_id and gps_device_id from table fleet_unit_digital_sensors_mapping as foreign keys for tables Fleet_Unit and Gps_Device
or
create a new column master_id which is "combination" of fleet_unit_id and gps_device_id and connect it to the mapping table - Fleet_unit_gps_device_mapping where i need to introduce another column used for the map.
The reason I'm asking is because in first scenario if i have 10+ tables that describe the vehicle i have to connect each one with the fleet_unit and gps_device table. In second case i simply connect all 10+ tables with the table that maps the vehicle and the gps devices.
Thanks in advance.
Answer: I would add Fleet_Unit.unit_id to the GPS_Device table as a FK. I would use a surrogate key as the PK, and put a unique constraint on device_ID.

Database Design Dilema


How to work include zxing android project to other android project through "Is Library" option?

Question: I have customized the ZXing 1.7 library for my barcode scanning application and marked it as "Is Library" through Project Options in the Project menu of Eclipse.But when i try to add ZXing library to other android project through Project Options in the Project menu it generates some error.I have attached the screenshot of the error [Please refer the link ].How to solve this problem.I am using eclipse helios and android 2.1 Google API's
Answer: close and re-open the project again, and try to tick the "Is Library option again" and you are done!
Answer: It looks like Eclipse cant find the path to the library project on your D drive.  I would delete it from your workspace and then re-import it with Copy Projects into Workspace checked.


Resuming career

Question: I was working in manual testing mainly 4-5 years back. Now after kids I want to resume my career. What courses I need to do to upgrade myself. Is 'image consulting" a good option?
Comment: I know several people of 40 and older getting into testing without any prior experience. Since you have five years of it, jumping back into manual testing should be not too difficult.
Comment: You had testing experience and you're asking about image consulting. What exactly is it that you want to do? What kind of help are you looking to get here on this forum?
Comment: Pick an area that you are interested in, then see what courses are available online.  I took four online courses over a six month between jobs, and it helped me get the new job.
Answer: "Image Consulting", as I understand it, hasn't got much to do with being an SQA professional, unless of course you're testing a business' website or other software that is related to the business.
Image Consulting is a good option if you're interested in it, but I would hazard a guess that asking about it on SE might not get the sort of responses you're after. Unless of course, you're actually referring to SOE images for servers/desktops etc, in which case the SE SuperUser section might be better.
Answer: I would think skills trump anything else. If you prefer, you could brush up on your knowledge or skills in testing especially the glossary. I find it's useful being able to talk about it and not just being able to do testing.
There are taught courses and certifications. You could self-study if you prefer. Also, the interview is important especially how you answer. I guess you could scan the ads on what are the requirements.
Good luck!
Answer: I would say that the first thing you should do is research and pick the job you wish to have.
After this you should look over the job requirement topics and try to see how much you know and where you can improve + Find some tutorials/guides to look over.
Another thing you could do is too talk with some friends/ex colleagues that are in this field, maybe the same job but more senior and to talk with them and see how the things are done and what you need to know, in this way you will be also up to date with the latest tendencies.
The following step would be to update your CV and or linkedin profile.
The last thing is to apply for the job and to do your best.

Resuming career


Do I need to remove BootCamp partition before installing Mountain Lion?

Question: I have a MacBook Pro and I am planning to do a fresh install of Mountain Lion over my existing Lion partition. I have Windows x64 installed on another partition (I installed it using BootCamp). My question is whether I have to remove BootCamp windows partition before installing Mountain Lion? Or may I just install a fresh copy without disturbing Windows partition?
Answer: It shouldn't affect your BootCamp partition, I upgraded to Lion and ML on two macs without any issues.
If you want a completely clean install and you're booting from a USB drive with the ML installer, then run the disk utility to wipe the OSX partition, and choose that as the destination for installation afterwards, it still won't touch your Windows partition.


AIC and BIC are so small while the loglikelihood is larger when comparing two different models

Question: I am working with complex models. I fitted two different models to my data. Then, I calculate the logliklihood function and the AIC and BIC values. I found that the log likelihood of the first models is higher than the other models, while the AIC and BIC corresponding to the model with higher log likelihood is larger than the other model. That is, AIC and BIC select the model with lower log likelihood. Would that acceptable or may something wrong?
Answer: AIC and BIC are computed by two quantities. The log likelihood value is penalised by a quantity taking into account the number of parameters included in the model.
It might be that the model with higher likelihood includes "too many" covariates and the inclusion of those parameters does not increase the model estimate enough.
Did you check also that difference?
Comment: Yes that what I thought. But I really need to make sure that is acceptable mathematically. So, it is clear that if I have more densities then, the loglikelihood would be high than the model with low number of densities. However, that does not mean it is fit the data better than other model.
Comment: Correct. Otherwise it would be enough to compare the log likelihood values.


What are the benefits of not including other header files in a header file?

Question: Sometimes, a header file uses objects that are in declared in other header files. The user of this header file would have to include the dependency anyway and get the order correct too.
Comment: A http://en.wikipedia.org/wiki/Single_Compilation_Unit should be ... compilable. GCC will happily compile your .H (without any .C or .CPP) and point out any errors. There should be none. Ergo, if your header file relies on types, enums, etc, then it must #include the appropriate header file(s) to define them.
Answer: Assuming we are talking about C/C++ like languages that use <code>#include</code>
It is best (like all rules of thumb there are exceptions) to include only the things you explicitly need.
Anything that is not explicitly needed should be forward declared. This helps to prevent cycle dependencies in the code. Also when you do maintenance on the code it prevent you accidentally removing dependencies that have been implicitly introduced.
Full class definitions are needed if:

You inherit from them
You have member objects of that type (not pointers or references).
You have parameters passed by value of that type.

If you just use something by reference then you should try and use a forward declaration.


Load joomla to a computer

Question: Can I download joomla.org and templates to my computer to build my web site on the computer prior to loading it to my server?
Thanks
Comment: A set of tools the community has provided: https://joomla.stackexchange.com/q/12143/168
Answer: Local Environment
Joomla runs best on Apache web server with MySQL and PHP.
The Linux-Apache-MySQL-PHP (LAMP) stack can be enabled on your Linux operating system and there are equivalent options for Windows and Mac users such as WAMP and MAMP.
It may be easier to install VirtualBox with Joomlatools Vagrant or Joomla 3 Turnkey Linux or similar. These tools are all free and available for Linux, Windows and Mac host operating systems.
Moving a Joomla Website
The easiest way to move a website from the web to your local machine or vice versa is to use free or paid version of Akeeba Backup to backup the website, FTP the file to the destination, and then use Akeeba Kickstart to restore the website to the destination.

Load joomla to a computer


How is adipose tissue synthesized?

Question: I am wondering about how the food that we eat gets converted to adipose tissue.  A great many articles are explaining how fat (the macronutrient) gets converted to energy but there are very few (at least to my understanding) that explain how energy gets converted to fat (adipose tissue).  What are some of the factors that affect the conversion of energy to fat?  Does the number of fat cells multiply or do they simply get bigger?  I would like a simple answer, for a quick reference, and a deeper explanation, for further research on my part.
Comment: Welcome to Medical Sciences! Please take the [tour] and read the [help]. For [reasons mentioned in this post](https://medicalsciences.meta.stackexchange.com/q/411) and in [ask], we require some degree of prior research when asking questions. I think your question would be more appropriate on [Biology](https://biology.stackexchange.com/) but they have the same prior research requirement.
Answer: The amount of carbohydrate which we intake determine the activity of various enzymes involved in this glycolysis and lipogenesis. And high carbohydrate diet directly activates the genes responsible fatty acid synthesis.
In tissues where Malate cycle works, the fat synthesis mainly depends on the metabolic state of cell. Fat synthesis results in production of ATP, so this pathway depends on tissue's ability to use ATP. And defect in this regulation effects this malate cycle and this cell's metabolic energy responsible for rate limiting does not maintain this biosynthesis and results in fat synthesis in adipose tissue.
Reference:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3096021/
https://www.jlr.org/content/11/2/131.full.pdf

How is adipose tissue synthesized?


Densifying a GPS track

Question: I have GPS data of a route which is about 32 km. The number of recorded gps waypoints for this route is 1670. But I would like to have a waypoint every 10 meters. So the number of waypoints for this route should be increased to 3200.
Comment: You're just basically looking to add midpoints to the existing points? Or are you using a more sophisticated algorithm to determine the 10m points?
Answer: Are you familiar with QGIS? There is a plugin for it called QChainage, it will place points along a line for you at a specified interval. With this you could generate points along your route every 10m.
Here is a link to the plugin, but you should install it through QGIS plugin manager.
Comment: Thank you very much. I didn't know about this plugin. I think it would solve my problem.

Densifying a GPS track


My car's topology is messing up as soon as I attempt to move a group of vertices along the y-axis

Question: I am modelling a car and am using edit mode to position the trunk. Whenever I move my string of vertices along the y-axis, the topology gets really strange, and it looks like one of the edges (with one of its vertices selected), is not being affected by the movement of that vertex. I do not know why this is happening. I removed the only modifier (mirror) I had on the car, and tried removing doubles. It told me it "Removed 0 vertices", and the problem is still there. Please help me!
Comment: You car has bad topology, the side and the trunk are huge ngons (faces with more than four sides) which is known to cause trouble. If the car is to be symmetrical, consider using a mirror modifier.
Comment: @Leadmeteor, in the upper image it seems that your back face is an Ngon: try to convert that face to regular squares, it should be easy (delete just the ngon face and rebuild it using just 4 sided (4 vertex)  geometry. Or, upload the model to http://blend-exchange.giantcowfilms.com/ and then put given link in your question, to have an example.
Comment: @Duarte Farrajota Ramos he was already using mirrors, he said.
Comment: I don't know how to clean up my topology. I uploaded my .blend to that website. Can you please show me how to fix the topology without deleting and rebuilding the car? [](http://blend-exchange.giantcowfilms.com/b/2981/)
Answer: Okay, I fixed it. I had to delete most of the vertices in the middle of the car and then fill in the edges and faces. It was tedious, but I did not know any better way. The only question I have now is will using the loop cut/slide tool cause bad topology again? That is what I used and it messed up my topology, so I am wondering whether or not I should continue using that tool or if there is a better way of adding more vertices. Thanks for your help!


Get user id with powershell

Question: I'm updating custom fields in a document library and I have to set a value for the person that's responsible for the file.
On the frontend I put the AD account name in the field but it is stored as a numeric user id. How can I get this id using powershell if I have the AD account name?
Answer: $web = Get-SPWeb URLTOWEB
$user = $web.EnsureUser("USERLOGINNAME")
$id = $user.ID

Now $id will contain the ID of the user
Answer: This is a custom field. We don't know it's behavior. Probably, your field stores SPUser.Id property value. In this case method SPWeb.EnsureUser helps you get SPUser object.

Get user id with powershell


water coming up from under cement foundation

Question: I've been living in my home for 28 years.  It's brick on a cement foundation built in 1985.  I had a patio poured at the back door in 1986. There is a approx. 1/16 inch crack that I should have sealed where the patio meets the brick but I never did and it has never been a problem.  For the last week water has been seeping from the crack in a couple of areas close to each other enough to saturate an area of approx 3 ft. x 7 ft. This area has been constantly wet for a week now.  Dont know if this is related but about a month ago the water pressure in my shower slowly decreased, got new shower head and had fair pressure for about a week and now it seem to be decreasing again.  Checked water meter and it shows no water leaking when no water is being used. The shower is on the opposite side of the leak, and the ground is not wet anywhere else around the house. Can someone please tell me what this is?
Comment: Do you mean water is seeping into the basement on inside of the foundation wall, or water is seeping up through the crack onto the patio? Do you have standing water on the patio? A picture would help. (I doubt your water pressure issues are related, especially since you don't seem to have any leaks.)
Comment: I dont have a basement, the water is seeping up through the crack onto the patio. Yes, I have standing water on the patio. At times it is just a large wet spot from the wall to about 7 ft out and sometimes there are 3 or 4 puddle streams coming from the crack.  The water is very clear with no odor. Thanks for your help!
Comment: I'd suggest digging around the patio and see if you can find anything... see also https://diy.stackexchange.com/q/39911/11265
Answer: OK, the water must be coming from somewhere:

Water from a leak. If you've been checking your meter and don't think you have any leaks inside that's good, but it's possible there is a crack or break in service line upstream of your meter. This might actually explain reduced water pressure in the house. If you suspect this is the problem I would call your water company and have them take a look.
Rainwater. If the water appears only during and shortly after a storm, then you probably have a drainage problem. Make sure all gutters are directed away from the house. You might also look at grading near the house to make sure water will flow away from the house.  Is the porch at the bottom of a slope towards the house?
Groundwater. I would be a little surprised if this were groundwater welling up, but it's not impossible. Have you had a very wet spring that would've raised the water table level? Or done any serious landscaping / excavation / compacting in your area?
Septic system. An unhappy septic system can cause water to well up, although probably not so close to the house or clear / odorless. Do you have a septic system?

(I wouldn't beat yourself up too much about not sealing that gap. If water is pooling from below I doubt a little sealant would hold it off for long.)
Comment: I do have a septic tank approx 50 ft or so from the house. There is a slope towards the house but it is about 20 ft from the end of the porch which is 18ft.  I dont think we've had enough rain for this to be groundwater, but like you said its not impossible. Also i have not done any landscaping or compacting.  I'm a little worried that even though the water meter shows no water leaking/running somehow this is going to be a very costly leak for me. So, I will take your advice and call the water co.


Are children of Brahmin parents also Brahmin by caste?

Question: Is caste based on birth? Is it inherited? Do any scriptures support birth based caste system?
Comment: What do you mean by caste? Do you mean jati or is it something different? If it is something different, then scriptures do not talk about it because it's a term coined by British.
Comment: Also when you say Brahmin, do you mean Brahman varna or something different?
Comment: If you mean Brahmana by birth, why ask this question?
Comment: @Lokesh I asked this question to write an answer to it; many people don't think caste is based on birth, but it actually is, hence I wrote an answer and provided scriptural references.
Comment: Yes race is real, all European, Asian light skinned good faced humans are Aryans, who are divine, descended, created by gods who came down from sky. And Brahmins are purest form of Aryans.
Comment: Most Purest souls, even from Heavenly realms, souls of stars, after death of star, are born in Brahmin body to attain moksha.
Answer: This is discussed in detail in Mahabharata.Vana Parva.Tirtha-yatra Parva. There is a conversation between Nahusha (in form of serpant), fifth in descent from the Moon and Yudhishthira:

The serpent said, 'O Yudhishthira, say--Who is a Brahmana and what should be known? By thy speech I infer thee to be highly intelligent.'

To answer this,

Yudhishthira said, 'O foremost of serpents, he, it is asserted by the wise, in whom are seen truth, charity, forgiveness, good conduct, benevolence, observance of the rites of his order and mercy is a Brahmana. And, O serpent, that which should be known is even the supreme Brahma, in which is neither happiness nor misery--and attaining which beings are not affected with misery; what is thy opinion?

Then, the serpent (Nahusha) objected this:

The serpent said, 'O Yudhishthira, truth, charity, forgiveness, benevolence, benignity, kindness and the Veda 1 which worketh the benefit of the four orders, which is the authority in matters of religion and which is true, are seen even in the Sudra. As regards the object to be known and which thou allegest is without both happiness and misery, I do not see any such that is devoid of these.'

The Yudhishthira replied

Yudhishthira said, Those characteristics that are present in a Sudra, do not exist in a Brahmana; nor do those that are in a Brahmana exist in a Sudra. And a Sudra is not a Sudra by birth alone--nor a Brahmana is Brahmana by birth alone. He, it is said by the wise, in whom are seen those virtues is a Brahmana. And people term him a Sudra in whom those qualities do not exist, even though he be a Brahmana by birth. And again, as for thy assertion that the object to be known (as asserted by me) doth not exist, because nothing exists that is devoid of both (happiness and misery), such indeed is the opinion, O serpent, that nothing exists that is without (them) both. But as in cold, heat doth not exist, nor in heat, cold, so there cannot exist an object in which both (happiness and misery) cannot exist?"

The serpent (Nahusha) again objected:

The serpent said, 'O king, if thou recognise him as a Brahmana by characteristics, then, O long-lived one, the distinction of caste becometh futile as long as conduct doth not come into play.'

Yudhishthira then, replied

Yudhishthira said, 'In human society, O mighty and highly intelligent serpent, it is difficult to ascertain one's caste, because of promiscuous intercourse among the four orders. This is my opinion. Men belonging to all orders (promiscuously) beget offspring upon women of all the orders. And of men, speech, sexual intercourse, birth and death are common. And to this the Rishis have borne testimony by using as the beginning of a sacrifice such expressions as--of what caste so ever we may be, we celebrate the sacrifice. Therefore, those that are wise have asserted that character is the chief essential requisite. The natal ceremony of a person is performed before division of the umbilical cord. His mother then acts as its Savitri and his father officiates as priest. He is considered as a Sudra as long as he is not initiated in the Vedas. Doubts having arisen on this point, O prince; of serpents, Swayambhuba Manu has declared, that the mixed castes are to be regarded as better than the (other) classes, if having gone through the ceremonies of purification, the latter do not conform to the rules of good conduct, O excellent snake! Whosoever now conforms to the rules of pure and virtuous conduct, him have I, ere now, designated as a Brahmana.'

With this answer the serpent (Nahusha) agreed and freed
Yudhishthira' s brother Bhima:

The serpent replied, 'O Yudhishthira, thou art acquainted with all that is fit to be known and having listened to thy words, how can I (now) eat up thy brother Vrikodara!"
Comment: @Ikshvaku It's talking about both varna and jati, see **it is difficult to ascertain one's caste, because of promiscuous intercourse among the four orders.**.
Comment: @Ikshvaku I didn't understand your first comment when you said "birth based caste". What do you mean by caste? The above passage only deals with jati and Varna. Secondly, Yudhisthir never recognises Varna is based on jati. The quote you mentioned, it's translation is inaccurate. Original verse nowhere mentions the word "birth". Thirdly serpent asks Yudhisthir whether Jati has any effect ***when conduct doesn't come into play***. So it's clear when conduct is observable, jati is immaterial in determining Varna.
Comment: @Ikshvaku Jati is not based on birth but jati's very meaning is birth / breed / clan. And chariot maker is not a caste. You don't call family of doctors to belong to doctor caste. You must learn the meaning of caste which was coined by British or simply use another word like jati because what you are saying is not making sense.
Comment: @Lokesh I'm using the word 'caste' in this case to mean birth-based castem or 'Jati.' And Yudhishtira did recognize birth based caste system; he considered Karna as a chariot-maker caste and Vidura as a Shudra, despite Karna being a skilled warrior and Vidura having Brahmajnana. There is a difference between Varna and Jati. Jati is is based on birth, whereas Varna refers to qualities there are inherent to that Jati.
Comment: @Lokesh Yes, actually you are born into a particular caste (Jati), and each Jati, or caste, has their own particular Dharma or work they have to do. For Kshatriyas, it is defense and fighting, and the Rathikara is an actual *Pratiloma* (mixed) caste. Same thing with doctors by profession, only mixed Pratiloma castes are allowed to be doctors.
Comment: Nowadays that's the case; I would say most people today are outcastes due to thorough admixture.
Answer:
Are children of Brahmin parents also Brahmin by caste?

It is not necessary .. It is not that simple as well.
Anyone is a Sudra without Samskaras (initiation) and so is a Brahmin even though he is one by virtue of birth.

Manu Smriti 2.172. (He who has not been initiated) should not
  pronounce (any) Vedic text excepting (those required for) the
  performance of funeral rites, since he is on a level with a Sudra
  before his birth from the Veda.

So, what will be the castes of the sons of such a Vratya Brahmin (who has not received the Samskaras)? certainly not Brahmins , they will be Sudras (Vratyas) only.

16 Sons fathered by an uninitiated man are Vra¯tyas, excluded from initiation––so state the wise with equal reference to the three
  classes.
Baudhayana Dharma Sutras 1.16.10

And, Samskaras are as many as 40 in number, starting from the Garbhadana, as stated in Gautama Smriti with Upanayana (initiation) being just one of the them.
And, to maintain the purity of caste system, as is mentioned in the Smritis, each of those Samskaras are to be performed in their prescribed times, generations after generations.
Assume that that has been done but the discussion does not end there.
Because, anyone can loose his caste by performing certain actions in his lifetime. And, it is quite easy for a Brahmin to loose his caste as well.

Manu Smriti 10.92. By (selling) flesh, salt, and lac a Brahmana at
  once becomes an outcast; by selling milk he becomes (equal to) a Sudra
  in three days.

In this case, what will you call the sons of this Brahmin who has become an outcast or a Sudra?
And, a Brahmin of bad conduct is also a Sudra or a Chandala. What will his sons be?

He who sets his face against righteousness, is but a Chandala by his
  acts. He gains nothing by being a mendicant, or by worshipping the
  household fire. (A Parashara Smriti verse)

Therefore, birth is only the first (and one) determining factor of caste, Samskaras and conduct being the other and more important factors.
Comment: So when u are referring to Brahmin in the Q wht does it refer to? Jati or Varna? Its called the Varnasrama and not Jatiasrama btw @Ikshvaku
Answer: Yes, caste is based on birth. There is scriptural support for it.
Scriptural support:

Manusmriti (10.5).- In all castes (varna) those (children) only which
  are begotten in the direct order on wedded wives, equal (in caste and
  married as) virgins, are to be considered as belonging to the same
  caste (as their fathers)
Āpastamba (2.13.1).—'Sons begotten by a man who approaches in the
  proper season a woman of equal caste, who has not belonged to another
  man, and who has been married legally, have a right to follow the
  occupations of their castes.'
Viṣṇu (16.1).—'On women equal in caste to their husbands, sons are
  begotten who are equal in caste to their fathers.'
Yājñavalkya (1.90).—'From women of the same caste as their husbands
  are born sons of the same caste.'
Baudhāyana (1.17.2).—'Sons of equal caste spring from women of equal
  caste.'

The genetic makeup of the 4 castes are different. Brahmanas have Nadis in their body situated in such a way as to receive the vision of the Lord. Kshatriyas are genetically strong and physically fit. Vaishyas have a mind and body conducive for conducting business. Shudras are naturally pessimistic, lazy, simple-minded, and materialistic. That's how their bodies were constructed.
Source for Nadis in a Brahmana's body situated in a particular way. At 39:00 minutes in the video.
Comment: You should cite some source for "Brahmanas have Nadis.....That's how their bodies were constructed." and avoid scientific explanation i.e "the actual genetic makeup of the 4 castes are different"
Comment: @Pandya Can you unflag answer please, since I have added citations?
Comment: @Pandya I will cite the video I heard this from. It is said by a great and recognized Vedic scholar. Also, when the Shastra talks about seed of men and women, it is a clear reference to what we know as genetics, since the sperm and egg cell (seed) contain 24 chromosomes respectively.
Comment: We Brahmins are turiya, have purest body filled with soma, ideal, perfect in every aspect,, we're preserving our racial purity since 100,000+ years, although our body is physically very sensitive, weak, delicate, but everything physical is but maya, that's how Parashurama realised that Karna is not a brahmana, but an fallen kshatriya impostor pretending to be one, in order to learn deceptively, since he had, tolerated pain without any movement, reaction, to not disturb sleep of Parashurama on his lap, for hours, which he should have cried out in pain if he were a brahmana.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/88343/discussion-on-answer-by-ikshvaku-are-children-of-brahmin-parents-also-brahmin-by).


Xbox Live Family Pack on multiple consoles

Question: If we have 4 xbox's in our house (three in bedrooms and one in the living room), can we buy an Xbox live Family Pack for 12 months (you get 12 months for 4 accounts) and use one account on each Xbox (we already have three xbox live accounts we want to combine and use the fourth for the living room). I know that it would work on one console, but i didnt know if you could recover one of the child accounts back onto the individual xboxs and still have the membership time for each account.
Answer: Yes, your Xbox Live membership travels with the account, not the console. So if you have a Gold Account signed into a console, you have Gold privileges on that console. You can recover that account on a different console and have Gold privileges.
This is also covered in the Gold Family Pack FAQ.

Q: I have multiple consoles in my family. Does my Xbox LIVE Gold Family Pack have to reside only one of those consoles?
A: When an individual is added to an Xbox LIVE Gold Family Pack, that person's Xbox LIVE account must be on the same console as the primary account holder. However, once they are a part of your Xbox LIVE Gold Family Pack, that person could recover their account on a different console and still remain a part of the Family Pack, as long as they reside in the same country as the primary account holder.
Comment: If you are planning to use one or more memberships on multiple consoles in the house (sounds like a great house, by the way), you might consider investing in a memory card (for older 360s) or USB memory stick and saving the profile on that. You can then move the memory device to the console on which you want to play and have access to the profile without needing to recover it each time. (This is also useful if you visit friends and want to log in there.)
Comment: we are not too concerned about moving the accounts around, the extra account for the living room xbox is so if people come over they can play online on a different account (and not mess up our KDRs and world rankings on our individual xbox live accounts.) Thank you for your input though.


Best practice using XML and XSD's to map against database

Question: We have a ReST Web Service that uses POST - to insert data into database (unmarshall data from XML), and GET to retrieve data (marshalled into XML).
An XSD is used to generate Java objects  (via Sun's JAXB compiler) to marshall/unmarshall data to and from a database.
We kind of froze the XSD as it is, because we thought this models the data perfectly - and it does, but only for posting data really.
Now when comes the time to GET data from the database, I find myself having to "break" our current XSD and allow it to publish primary keys and other data values that POST-type requests don't care about, they are superfluous.
So - in effect the XSD now has optional elements in it (i.e those used only for GET requests).  This could cause potential confusion when you have to explain to 3rd parties who want to use your web service and you have this XSD that has a kind of split personality between getting and posting data.  It also doesn't feel clean and elegant as it used to.
What should I do?  Is it OK to have elements in your XSD that are only used in a certain circumstances (like getting data)?  Or should I have 2 XSDs - one more verbose, tailored to GET requests and one slimmed down, purely for POST request??
Your help and advice - much appreciated.
Answer: I was in a similar situation and created a view that I used for my "reading" purposes. I then mapped the view into the same XSD as my main tables so I could manage it all in one place. It gave me the flexibility of the "looser" reading without worry about corrupting my primary data arrangement.
Comment: Unless your XSD definition or code has a quick and simple way to remove the primary/foreign key restrictions that are giving you the headaches, I would say this would be the best way. I guess the other question that rises up is how many methods you're exposing. While I am a fan of consolidation, cramming too many functions into a single  also can be a nightmare.
Comment: do you think its the cleanest solution - optimal?
Answer: Having fields that are only used in some contexts is OK in XML documents as long as you document it adequately.  UDDI (yes I know, a thoroughly un-REST and uncool example) does just that.  When you "save" or "update" an entry in UDDI, analogous to your POST and PUT, you need to supply the unique ID in the published data such that the server knows what to do with it.  The advantage here is that you have one schema element and one resulting data structure to deal with for most operations on that data structure (for CRU but not always for D in UDDI).  Since you are RESTful and can represent the unique identifier in the resource's URL, this approach may make less sense for your application.  One thing to consider is if the retrieved data is to be passed around after retrieval.  If the data needs to be self contained and is passed around within or between different contexts in your clients, then including the ID is likely helpful to the users of your service as they won't have to deal with two pieces of data (the actual data, and its unique identifier).  That said, your clients may abstract away the REST/XML interaction entirely in which case, their abstraction probably already handles the ID and the remaining fields of the data structure.


A project manager should know how much his/her project members earn monthly?

Question: A project budget includes fixed and variable costs. In most cases (especially in weak matrix and pure functional organizations) salaries of project members are variable costs. In order to calculate project budget the project manager has to know the numbers. It means that he/she has to know how much his/her colleagues earn monthly. In most organizations this information is private. How to resolve this conflict?
Answer: We use three 'profile' rates (High, medium, Low). It is an approximation of the total (hourly) cost of an employee (not only salary). We know the profile for all team-members (actually for everybody). This way we can calculate the budget without needing to get private salary information.
Comment: I like it. You can extend this to be as course or fine-grained as required by your organization while not having to give out exact dollar amounts
Answer: For many internal projects, the budget for labor is not known and, therefore, the PM cannot be accountable for project costs.  In that case, you are managing schedule and scope only.  If the organization chooses to monitor the cost of a given project, the organization must supply a rate for all of the labor categories used for the project.  This rate would not only include the actual hourly rate for an employee's salary, but will also include various types of overhead, i.e, a fully burdened rate.  For example, if the employee's labor category is senior business analyst, the rate for all senior business analysts might be $120 an hour.  However, the employees' actual hourly rate is something much less than that and can range from $25 to $80 an hour as an example.  The burden rate is a truer project cost than the employee's hourly rate.
Therefore, it is not a requirement and likely not very appropriate to know internal employees' salaries and wages.  Obviously, if you know someone's labor category and you roughly guess where they are, but there is a lot of variation in salaries in a given labor category and, if this information becomes public, opens the door to disgruntled employees, low morale, in-fighting, etc.
If you are told to monitor the project's budget, then the organization OWES you labor category rates.
Answer: Staff salaries, being one of the main reasons people are working for you in the first place (if we're honest about it), are an important factor in understanding motivation - especially when a person is not performing well. Many projects fail or suffer difficulties due to the actions of people on the team so it's vital in my opinion for managers to know the full story. Certainly based on my own experiences of hiring and managing a team of people I'd say this is true.
Way back in the 1970's Robert Townsend (turned around Avis Car Rental) said that to 'outsource' what was then called "personnel" aspects (now called human resources) of management to someone else was a dereliction of the managers true responsibilities. He devotes a section of his renowned book "Up The Organisation" to it see his book here...
Answer: No. Almost all organisations have rates for employees. The PM needs to know the rates for each team member, not the actual salary. At most this might give the PM an indication on how much a person earns (by comparing with its own salary and rate) but not an exact figure.
Using a rate for employees its not related to having or not a transparency policy, it's just an easier way to figure out costs. Costs per employees are not only dependant on salaries but should also include hidden costs like logistics costs or organizational costs.
Answer: This is very dangerous knowledge for a PM to have. Most organizations either don't count the cost of internal employees or they use a 'standard rate'. Similarly when an organization hires a consulting firm they know what the hourly rate is but it's not usually divided out into the individual salaries.
Comment: why is it dangerous?  Can you elaborate?
Comment: If you had the choice between two team members and you knew one of them was cheaper, would you choose the more expensive person? And, usually pay rates are confidential. The more people with access, the more likely people are going to find out what their peers make.
Answer: This situation is unfortunately more common than logic would suggest. It all arises from the projects culture, in general when transparency is part of the business culture, and of course there is a well designed compensation policy that allows that transparency without fearing conflicts, project management can have full sense as you really know which resources you are managing, otherwise as you perfectly know, you are somehow blindly managing resources. As a first step having ranges of cost per hour per team member can eliminate part of that blindness without completely making public such information, so project manager does not have the exact information but at least has a clue of it... and can take better decisions for allocating resources. This will end up in an improved resources management that can be demonstrated as a way to make managers understand the benefits for the business of allowing PM's to handle this information. Start simple, propose to have a wide range in three intervals to sort out resources in those three categories and then those intervals can be narrowed until having a very precise information of costs per hour.
Answer: In large institution, like European Commission, every job or position stands for a specific value that is used in the budget management.
In that way it's quite easy to do this and only a matter of multiplying the days they will work with the value they have.
In private companies, same can be done if the salary is private, by giving a certain value to a job or experience the workforce has.
Good thing could be to let your boss (or those who do know the salary) confirm the estimated values before using them in your planning or budget allocation.
It's not really matter of what the PM thinks.
If the company's philosophy is to hide salary, then they'll hide it...
Answer: Under the assumption that you work with emotionally intelligent individuals, I actually think that transparent salaries is a good practice.
Pay secrecy leads to decreased performance, whereas pay transparency increases performance as explained here.
More on transparent salaries on this  Ted talk.


Inkscape text on a circle always right to left

Question: I am trying to make a text follow a curve on a circle. But whenever I click "set text to path" the text shows up written from right to left.
I have tried just drawing a simple line (from left to right or frome right to left) always the text is written from right to left.
I tried flipping horizontaly, vertically, turning the object, under no circumstances I can get the text to show up right. Can anybody help me ?
Comment: I can't replicate this problem using Inkscape 0.92.3.  It works as expected.  What version of Inkscape are you using? I remember reading about a similar bug somewhere a while ago. Can't remember where or when.
Answer: I found a useful tutorial video directly addressing your goal.
Youtube Text on Path video
Considering that you've made it this far, the answer boils down to selecting the circle and using the horizontal mirror feature to flip the circle.
The video covers a few other features of text on path that makes the entire video worth viewing for Inkscape beginners.
Comment: This problem does not depend on Inkscape subversions. It's an issue in your document (probably generated from an imported pdf?). Fix it by creating a new layer and creating your text and circle in that. Or, if you can read German (or use google translate), check out the longer description here: https://vektorrascheln.de/posts/2016/May/inkscape-entdecker-text4.html
Comment: Thanks for the link, I had already seen that video, but my problem is not to get the text on the inside or outside of the circle (that works fine with the flip feature). My problem is that the text is always from right to left and no amount of flipping or turning will change that. I am using version 0.92.3. maybe I shall try to update and that will help....
Comment: OK, I just found out that 0.92.2. is the latest version for Mac (which I am using). So no update possible.


Timber Retaining Wall - Beam Replacement

Question: I need to replace a rotted beam in a wood retaining wall (bottom beam in picture).  Is it possible to simply slide a replacement beam in place?  Also, what about inserting a plastic lining (to the extent possible) to further protect.
Comment: Sure. All you need is time and effort. Did you have a more specific question? Cost depends on what we're talking about (and is generally off-topic). Are those 4x6s? Something under $25 if that's the case, but we have no idea where you are. If not, post actual dimensions.
Answer: It might not be that simple. Many wood retaining walls use nails or rebar to lock each tier with the one below. You will likely have to remove them from the top-down, but you probably need to anyway. If that one is rotten all the way to the exterior, the others are likely almost as rotten.
I recommend taking it apart completely, removing what needs replaced, and staining/sealing everything (new repairs and old beams) with a good exterior sealant, and building it back up.
Comment: Thanks.  Many of the beams have already been replaced very recently and are in great shape, so a complete tear-down is certainly not preferred.  The bottom beam in question does not appear to have securing spikes/bolts as others do.  I'm guessing I could utilize a well-positioned bottle jack to lift the upper beams ever slightly to slip in the new beam.


Why Low Frequency called Approximation and High Frequency Detail?

Question: While we are decomposing a signal using Wavelets into levels why do we call our high frequency components as Detail and Low Frequency Components as Approximation ?
Answer: Intuitively speaking, anything that is 'high frequency' is something that is 'rapidly changing in time'. Anything that is 'low frequency' is something that is 'slowly changing in time'.
If you think about it, any time you have 'detail' in a signal or image, it means that you have, very quick, rapid variations in time or space. This then becomes the 'detail' of your signal/image.
In contrast, if you just care about how something changes generally, you care about long-term trends - you dont care about how things change with every sample, you just care about how things change over a long time, or over long space. In this case, you just want to 'approximate' your signal.
Answer: Another metaphor to complete Mohammad's answer: think of zooming in/out on your signal.

Zooming out makes details of the signal / image disappear, and it is a low pass operation such as the one used to recover the low frequency components.
Zooming in on the other hand will reveal things that were lost (or hidden) in the low frequency part. The difference between the zoomed-in and the zoomed-out images can be intuitively called details.


Change text orientation to landscape in Visio

Question: In Microsoft Visio 2007, is there a way to change the text in the boxes so that it is oriented in landscape vs the defaulted portrait orientation? If so, how do I accomplish this? The box shape I am using is called "Interface" and I have it set so that it is a very tall, narrow box.
Comment: See if it helps: http://office.microsoft.com/en-us/visio-help/format-existing-text-as-vertical-text-HP001231081.aspx
Answer: These steps may help.
First turn on  Developer mode, if it isn't already enabled. Instructions are here: http://www.visguy.com/2008/08/04/top-9-reasons-for-turning-on-developer-mode/
Create a shape with some text:

Right-click on the shape and select Show Shapesheet. The screenshot below is from Visio 2010, but the menu item is also available in Visio 2007.

In the Shapesheet window look for a section called Text Block Format and Events. We need to manipulate section called Text Transform. If the section already exists, it will be between  Text Block Format and Events. If not, we have to add it.
So right-click anywhere in the ShapSheet window and select Insert Section

Select Text Transform and click OK

Now you'll see the Text Transform section in the ShapeSheet window.

The cell of of interest is called TxtAngle. By default it is set to 0 deg. Change it to 90 deg and the text will change in the shape.

You'll notice that the shape looks a little confused, because we have rotated the text but the text block is still using the unrotated height and width of the shape. This can be addressed by swapping the values of the other cells (TxtWidth & TxtHeight, etc.)


Can I use an iPad on the beach safely?

Question: I want to bring my iPad to a beach to do some reading while on vacation. I am concerned about sand getting into its ports and causing damage. Obviously water would also be a concern, but I am not planning on taking it in any water. Does sand propose a significant threat and what can be done to limit the chances of a problem occurring?
Comment: I am not very familiar with the tags that are used on this site and "travel" was not an option, if someone could assist with tagging that would be great. Also - to note, I looked at port covers on Amazon, I'm not sure if they even work, but reviews were quite poor, so if anyone has experience with that I would appreciate it as well.
Comment: Thanks all for the answers! My beach time with the iPad was a success! I did find that I had to be in shade to read text comfortably, which was fine because my skin was burned after the first day anyways. The zip-loc trick worked great for me when I was near the sand.
Answer: Yes you can, but there are some aspects of the environment of the beach life that need to be controlled.

Salt water corrodes electronics fiercely. Waves crashing means that the atmosphere at a beach is saturated with water droplets with a high concentration of salt in many cases.
Direct sun on the front black face of any iOS device can over heat it rapidly. You will probably feel it uncomfortably hot before the point where the device shuts itself off to prevent battery damage. Even if the device is powered down, you can permanently damage any Lithium Polymer battery in a few hours if the temperature is hot enough.
Sand can get in the home button mechanism and may never come out. The 30 pin connector, the headphone jack, a SIM slot are easier to clean and less likely to be functionally impaired than the close tolerances of the glass on glass home button gap.
Bright light makes it harder to see the backlit screen and if you are wearing polarized sunglasses, you will see that the display is highly polarized. It's fun from a science experiment aspect, but bad for reading or color accuracy of the display.

I would probably have a Chef Sleeve or two with me and bring an umbrella or shade to control the light and direct heat. A ziplock bag also works if you don't think the closer fitting sleeve is worth spending money on. Depending on your beach some or all of these concerns may be disregarded, but I tried to cover the common beach scenarios.
Other than that - keep it cool, heat yourself up and enjoy your iPad on the beach.
Comment: @bmike's comments about heat are absolutely correct, but generally speaking, you'll have to seek, or make, shade in order to read with the iPad anyhow. I've always been able to keep it *cool enough*. Beyond that, I'd add that (in my worldview) I didn't spend all that money on a tool to ***not*** use it. However, there is some risk involved and for high-crime beaches (certain surf spots come to mind)  I'd consider an $80 kindle to be a good (relatively) disposable option.
Comment: The overheating problem exists even when you're not using the iPad - sunlight on the black LCD area (lessened by having a white border, but still the surface area of the black LCD remains a large area) can damage the iPad permanently. Same if you leave it on the dash in a hot car or forget to flip the shiny side up or have a cover to reduce the amount of black receiving direct sunlight.
Comment: Luckily I have a white iPad! But yes I'm sure it will still get steamy! I think my own body will fry before the iPad since I am so white, but I will for sure keep this in mind. The chef sleeves are a great idea, I did not know that existed. I might have to bring along a pair of non polarized glasses. That always annoys me with my DSLR too. Thank you from the beaches of Belize!
Comment: Meaning you have to take care to store the iPad appropriately—in a bag that's also in the shade or (assuming it's appropriately protected) in the top tray of your cooler. Definitely needs to be *thunk through*.
Comment: *"thunk"* being the sound the iPad makes when you start driving with it still perched on the dash... :D
Answer: I use an OtterBox Defender case to protect my iPad in harsh environments. If I'm using it as a "chart plotter" on a small boat or kayak, I also put it into a waterproof map bag (along with a desiccant packet) that I got from an outdoor store.
For occasional use, you can also protect the iPad within a 1 gallon Zip-Loc™ bag. (Again, I'd add a desiccant packet if you're using it in a humid environment). I keep a Zip-Loc in my go bag for this purpose.
Comment: No problems using the touch interface–for that it's "transparent". Reading gets tougher as the bag gets scratched, crazed and cloudy. Plan on more than one bag for week-long trips. (Plus, once you have them. You'll use them for many things.) The airspace that can form between bag and screen can set up some weird reflections—adjust the bag.  Also, be very careful about condensation, though this is more of a problem moving from heated room to cold environment. Again, desiccant packets are your friend.
Comment: One more thing. There's room in that bag to toss the iPhone behind the iPad if you don't mind holding it that way–but I usually leave that "naked" in it's own OtterBox.
Comment: Those otter box products are just fabulous. The normal line is great for most people, but the armored up ones are perfect work construction job sites or just extra protection from toddler-class handling situations.
Comment: I have an Otterbox for my iPhone, it is very nice for drops and such. I really like the idea of the zip-loc though, as that has almost no cost, can be very easily stowed for travel, and for probably the biggest advantage - can be thrown out after use. I would worry about an otterbox defender having sand stuck to it then bringing it inside and eventually into the ports. As a side - how bad is typing and viewing under the zip-loc? I'm guessing it is good enough if you bring one in your bag :)
Answer: I'm going to expand my comment to @bmike's answer into another answer to this question for future seekers. Consider buying a Kindle for beach use.
Please understand that I applaud the desire to use the iPad for reading on the beach. As I see it, I paid real money for the tool, and if I'm not going use that tool as I want to, I shouldn't have bothered. That being said, there are certain risks and inconveniences that accompany this (and all) decision.
First, @bmike is correct about the danger that heat presents to portable electronics. That being said, my experience has taught me that if you're going to read with the iPad, you'll either seek or make shade. That risk is manageable. You'll also want to take proper care to keep your iPad cool when you're not using it. Options include a bag in the shade or (assuming the iPad is appropriately protected) in the top tray of a large cooler. Please, don't toss it down into the ice.
Perhaps a higher risk comes from flashing an expensive piece of kit on public beaches, both here and abroad. Assuming you're not going to stuff it into a waterproof case whenever the urge to take a dip strikes, or carry it with you as you and a loved one stroll hand-in-hand along the beach, the iPad presents a juicy target of opportunity to those who just weren't raised right (or for whom an iPad sold means eating tonight). It also brands you as a rich tourista and perhaps paints an even bigger target on your own person. (I trust my spanish-speaking friends here will forgive the slight as none is intended, it's just the linqua franca for much of my beach travel).
Add this risk to the inconvenience or as some would say, utter unreadability, of the LCD screen in bright sunlight and I can make a reasonable argument for leaving the iPad back in the room, and tossing a (relatively disposable) Kindle into my beach bag.
Comment: You were right on. I did end up reading a complete book while at the beach over vacation on the iPad. But, a few weeks later I decided to try the eink Kindle. It is a much much better device for reading books on the beach! I still love my iPad though!

Can I use an iPad on the beach safely?


leg move in pose mode moves other leg

Question: in my blender i created a character and his armature with bones assigning with automathic weights to the body, dont ask me hard questions cause im newbie, i got some problems with my character first i tryed to assign evertying to 1 object so i can move the entire object in animation, not working cause i did part of my character without scalling, so when i move all the body the other part stays there, second when i try to move a leg the other leg moves to and it becomes kinda buggy, i already tryed to create the bones again and again but nothing works, and i need to end this really fast if i can get some help i put the file in upload and send the link here
  Here is the blend file that i uploaded in the website
Comment: A file and screenshots always do help! You can upload 2 screenshots and comment to link to a file.
Answer: you need to weightpaint your model. in pose mode you need to hold shift and right click your model. after that go to weight paint mode. then click a specific bone and paint on the mesh its influence. red means this face is affected 100% by the bone. blue means zero. if this is too complex, you should watch one of the many tutorials on youtube :)

leg move in pose mode moves other leg


how to remove oil from mtb disk brake at home

Question: My cycle has got an front disc brake I not know how but unfortunately few drops of oil got on my disc brake now it was making a very bad sound like a violen and and could even not able to stop my cycle at all now I have only one way to fix it,s you please help me
Comment: alcohol, specifically isopropyl alcohol, aka isopropanol
Comment: Is denatured alcohol bad to use for this purpose?
Answer: I use Carplan Brake and Parts Cleaner, purchased from my local auto parts shop. This contains about 30% IPA (isopropanol) and 70% Naptha.
If you don't have many bikes, it may be easier to visit your local car mechanics' workshop and ask to use a little of theirs.
If you have contaminated the rotor, you will also have contaminated pads. There is a procedure to restore pads using brake cleaner, an oven and a blowtorch... This isn't worth the effort and risk, so buy new pads.
You don't have to buy your caliper manufacturer's own pads, so long as they're the right shape; I've had no problems using Clarks and Ashima pads.
Comment: He said there's squeal, so he's braked.
Comment: I've never owned disks, if the OP got oil on the disk and then spun the wheel but didn't apply the brakes, would the pads be contaminated?  I'm imagining a spill while doing a service and not being ridden.
Answer: The disc is the easy problem - as already suggest, brake cleaner, alcohol, methylated spirits all work well. An abrasive (scouring)  household cleaner also works really well.
The pads are another problem altogether as they absorb the oil. If you can afford it, by far the best solution is to replace them. If you want to try to save them you need to remove them from the brake and give them a really good clean. Put them in a container with solvent and let it soak in, then wipe off and sand/file the surface layer off - again, an abrasive cleaner can be used effectively. Some people suggest trying to burn the oil off - place on a metal tray in a safe place, a couple of drops of meths on the pad, and light it.
Comment: The "wet" boiling point of DOT4 brake fluid is 155 °C (311 °F). This will apply as the fluid will have absorbed water. The base of the flame will not be the hottest part and when the fuel is Ethanol, may not be hot enough to reliably vaporise the oils. The presence of water will cool the flame. The coldest viable Ethanol flame is also likely to leave a sooty residue and inefficient combustion of brake fluid will also leave soot. The procedure I mentioned in my answer involves heating the pads in a domestic oven then burning the hot pads with a blowtorch. Reliable but dangerous.
Answer: There are many ways to remove grease/oil from a rotor at home. A simple degreaser will do the trick. Make sure to use a towel that doesn't already have grease on it. If the degreaser isn't cutting it, you can move on to using ethanol or isopropyl alcohol, which most people have in the house. If you are still having a hard time, try pure acetone (nail polish remover). Get the non scented, non colored kind. It's usually less than a dollar for a bottle at the pharmacy.  I'd also suggest using rubber gloves to protect your skin while using any of these chemicals.
Comment: Why is isopropyl stronger than a degreaser?
Comment: I would actually be worried that the degreaser causes even more contamination. You must know what kind of chemical it is. After all, WD40 is also a degreaser.


What is your list of fundamental practices that you use to make your project and organization successful?

Question: I just sat through Chet Richard's keynote talk at the Lean Software and Systems conference here in Long Beach.  He asked us to build our own list of fundamental practices that we should become great at.  What practices have you found that make your team always successful? This was a true gift of Chet's during his talk. I wanted to share that with this group, but I also want to hear this group's answers.  I am trying to build my list and I am only at iteration 1.  Please answer the question to help me shape iteration 2 of my list with a broad scan.
Comment: I edited the question to focus it more on "team success" than "company success".
Comment: How is this question related to project management? I think it's more suitable for http://answers.onstartups.com/
Comment: @yegor - I don't agree. The question (title) directly relates to projects. Actually I see more connection to project management than to startups in the question.
Comment: I am ok with the edit to "team" to keep the focus tighter on project management.  In the keynote talk, question was more focused on organization level which lead to more leadership, and social systems management concepts.
Answer:
Good and frequent communication in general and specifically active listening. Communication is one of key root causes for broad range of problems, which could be avoided if were better at it. This is definitely number one for me. Since many project managers tend to rely deeply on formal communication I stress active listening (which assumes talking) as key area here.
Continuous improvement which is tightly connected with experimenting. I never assume that what we have is an optimal solution. I never assume I know the right solution from the top of my head either. So anytime we have a possibly better idea we just try it and see if it works. Actually I'm not even sure which part here is more important: the one where you change things and evaluate result of changes or the one where you constantly look for occasions to adjust the way you work.
Visualization. Actually it doesn't really matter what exactly we do visualize. It works miracles in terms of updating status of a project, discussing architecture, organizing project portfolio, etc. Think how many times it was just easier to describe things with an image, even a crappy one, than just with words. The very first thing I need in a new office is a couple of whiteboards.
Answer: Building on Pawel's answer, be inclusive.
Deploying software may involve QA, sys admins, network admins, DBAs, and front-line support staff - get them involved early.
Often the perceived resistance at deployment time from these teams is because they need to do their due diligence. They also posses a wealth of knowledge about the larger software ecosystem, and user behaviour; this should be incorporated as part of the continuous improvement - many developers are shielded from the quirks of end-user behaviour, or unusual aspects of the larger software ecosystem.
Answer:
Honest and open communication. No politics, dilly dallying or beating around the bush.
Leaders who trust, listen and stay out of the way of great technical work. Managers play support role!
Empowerment at lowest level. Team organizes and gets stuff done themselves.
Not manager but team delivers. A realization by each individual in the team that he is directly influencing to the project's delivery & success.
Generous reward program which spots and rewards great work, consistently.


Avoiding neck pain

Question: I am meditating now regularly for last 4 months. I always sit in a cross legged position with my head slightly bent down. I started developing a neck pain for last 10 days and it distubs me a lot. I couldn't do a chin up position because if i do it then my forehead part feels heavy after meditation. I tried various positions like chin slightly tucked in, it still puts me under pain. Everything was good but this neck pain now disturbs my meditation.  Does anyone experienced it ? Any suggestions for me to come out of it.
Answer: I don't know how you're sitting but you might want to straighten (lift) your upper back, and ensure that your shoulders are held down (relaxed) and back (not hunched forward and rounded). That (being more vertical instead of hunched forward) helps to ensure that your head is directly above (balanced on top of) your spine, less effort for the neck.
You might be able to get the head/skull to balance like a stone, supported on the vertical skeleton instead of by muscles. If the bones are stacked one on top of the other then the muscles hardly need to support them -- then the muscles can relax, soften, droop.
To make your upper back more vertical, you might want to make your lower back more vertical too, so the whole back is straighter (i.e. try to straighten both the thoracic curve and the lumbar curve, as illustrated here).
One way to test whether your back is straight is to twist or rotate it: e.g. with your seat still, twist your back (to move your shoulders) and your neck (to move your head) to try to look behind you (look back over your shoulder). It's easier to twist on a vertical axis (i.e. if your spine is vertical), i.e. you can't do it (your vertebrae lock) when you have a pronounced thoracic and lumbar curves -- so doing this (rotating, left and right) is a good test or good lesson on straightening your back.
Also it's not necessarily a question of whether you chin is up or down: it's a question of whether it (and your whole head) is pushed forward (off-balance) or pulled back slightly (more vertical).
Answer: It would have made a little easier to answer if you would have given the time for which you sit for meditation. Because 30 min to 1 hour meditation daily should not really induce a complex neck pain.
I suggest you should check with a doctor as you also experience heavy forehead with chin up, which is also not normal. Just dont let it become chronic or any other medical condition.
If there is nothing to worry about medically, I will suggest you two things.

Use an orthopedic neck collar like  this .

When you are meditating, between intervals convenient to you, just revolve your neck or move from side to side to make it loose, so muscles dont get stiff. You can do it slowly so as not to disturb your meditation.
Comment: Thanks revolving the neck during meditation worked out !
Answer: Other people have brought up concerns with physiological issues and issues related to posture, but I'd like to bring up concerns with the actual meditation practice, as a possibility.
According to Bhante Vimalaramsi, neck pain and headaches related to meditation may be related not only to body position but also to the actual meditation practice. Do you find yourself feeling when meditating that you are keeping very tense, in order to stay focused on the breath or to prevent thoughts? If so, his 6-Rs might be helpful. The 6-R method is used to dismiss unnecessary thoughts during meditation without causing tension in the body.
(I have also used them in day-to-day life in order to reduce intrusive negative thoughts, to great success).
The six Rs are as follows:

Recognize-- Recognize that the train of thought is not what your goal is at the moment.
Release-- Release the thought. I have often mentally said to myself something along the lines of "I don't need to have this thought right now" or "I don't need to think about this" or "I can think about this later if I need to"
Relax-- Entirely relax the body. If you notice tension in the neck, be sure to release it now.
Re-smile-- Smile to yourself. This can be something you do physically or something you mentally do as well. If you don't have success mentally smiling, it can be easier to simply physically smile.
Return-- Whatever it is you're doing for this meditation, go back to it.
Repeat-- This will probably happen again, and that's fine! Be prepared for that. Go back to step one each time you find yourself straying from the meditation.

(Chart of 6-Rs from Bhante Vimalaramsi: https://library.dhammasukha.org/chart-of-6-rs.html )
Here is also a letter on his website which is somewhat related-- it refers more specifically to how the tension might be a result from trying to push down negative feelings as a result of negative actions in one's past, but the idea is similar:

"When one has done something in their past that they may feel guilty
  about, it can cause the meditator to try and push the memory down be
  using excessive energy"

(Quote from https://library.dhammasukha.org/headache-advice.html)
In this case, the excessive energy is being used to push down specifically negative thoughts, but I have also heard of people having the neck pain or headaches from simply using excessive energy to push down any thoughts unrelated to the meditation.
Answer: For meditations like anapanasati and iriyapatha you need to maintain a certain position in your body..But for most of other meditations you needn't a certain position..That means you can do them in a sleeping position also..But the problem arise next when you  do it in a that type of position you may feel sleepy..If you don't feel so you can try any position like that, no barriers for it,you are the one who can find a suitable position for it,than us..
Otherwise try some exercises for neck if need getting some medical advises, sometime that may help prevent the pain
Answer: A neck slightly bent forward put lot of stress on mussels on the back side of the neck when balancing the weight of your head. This usually cause pain and stiffness.
When meditating for a longer time on siting pose, a straight back and a neck is important. If this is deficult for you try strengthning back and neck musseles or try a completly different post (ex laying down).
Answer: I'd recommend you to have a neck MRI. I've had slight discomfort in my back muscles while meditating and a few months later I was diagnosed with disk herniation and arthritis. If MRI shows your spine is OK then the cause is either improper position or a psychological one.

Avoiding neck pain


Can someone see who downvoted the post or answers?

Question: I'm curious to know whether someone able to see the person user id or name who downvoted their questions or answers in salesforce.stackexchange.com?
Answer: Neither Moderators nor normal user can see that information. Which .. creates anonymity and true freedom in giving your votes. Which kinda is a good thing I'd say. Even Though it's often appropriate to comment when you're casting a down vote.
You can however see how individual users are voting overall and how distributed they are:

on a user's profile:
Comment: I know. I'd love to be able to know why people are downvoting an answer, especially one that appears well put together or at least not completely useless. 95% of my votes are positive, and those few times I downvote, I think I've always left a comment (but don't quote me on that). Constructive criticism is what downvotes are all about.
Answer: Actually, I believe moderators can see voting history. If you look at the help section, there's something called serial voting which can be reversed. That applies to both upvoting and downvoting the posts of a member that someone might be following on SF.SE either as an angry stalker or as a fan.
More to the point, when I first joined SF.SE and made my very first post here, someone was admonished in the comments for having downvoting my post. That couldn't have happened if no one had access to or could view other's votes. Its possible that may have changed since I joined a year and a half or so ago and if so, I'll stand corrected. However, its clear that at one point in the past, it was possible to view those things, either that or someone was very astute in noticing a -1 point change in another member's reputation; something I find a bit hard to believe.
Comment: per reference: Robert (stackexchange staff) edited in the moderator bit into my answer.


Did I commit zina or no?

Question: My boyfriend has inserted the tip of his penis inside my vagina and I'm not sure if all of it went in or just part of it . What should I do ?
Answer: Yes it is
Firstly bieng a Muslim I dont think you were allowed to date and thats completely haram to get naked in front of anyone except  your husband where as you got naked infront of your bf and your private parts touched

Did I commit zina or no?