In Python , why do we use the elif ? and what is it?

Question: In Python , why do we use the elif ? and what is it ?
I was learning about the else if commands and stumbled upon the elif and confused about it
Comment: `elif` is a contraction of "else if".  It will be explained in any decent Python tutorial.
Comment: Have you tried writing `else if :` in Python? It doesn't actually work; you get a SyntaxError. `elif :` is the legal way to write it.
Answer: If you are familiar with else if in other programming languages then it is the same as else if but if you don't let me tell you.
Like if you have only one thing to check then you will only be going to use if else. eg. if the percentage is greater or equal to 40% then the student is pass else the student is fail.
if percentage >= 40:
    print("You are passed")
else:
    print("You are failed")

but in case you also give grades to students according to their marks then you need to use elif. eg. if percentage greater or equal 85 then A grade, if the percentage is greater or equal 65 and less than 85 then the B grade and for less than 65 C will be graded.
if percentage >= 85:
    print("A grade")
elif percentage >= 65:
    print("B grade")
else:
    print("C grade")

and for the above code, you might be wondering if a student gets 88 marks then the if condition is true but the elif is also true. So in the conditional statement if one condition is matched true then it will not check all other conditions.
Answer: It sounds as if you are familiar with an "Else if" statement. An "Elif" statement is the "Else if" version of python.
Take the following Java code:
if(1 < 2) {
  System.out.println("if statement");
} else if(3 > 4) {
  System.out.println("else if statement");
}

Would turn into the following Python code:
if 1 < 2:
  print("if statement")
elif 3 > 4:
  print("else if statement")

Answer: Elif, short for else if, is the conditional statement that comes after the if statement. It has to follow a boolean logical statement. An if statement is the gateway that allows the codes to be executed only if the statement after the "if" or "elif" passes.


Disable inline editing of rich text fields in Experience Editor

Question: How can I disable inline editing of rich text fields in Experience Editor?
I still want the users to be able to click the edit icon in the toolbar popup (leftmost icon in the attached screenshot) so that they can go to the full editor, but I don't want them to be able to insert text directly onto the page.
Answer: You can execute JavaScript on page load that will set contenteditable attribute to false for all text boxes.
$(".scWebEditInput").attr("contenteditable", false)

Comment: Probably want to target `$("[scfieldtype='rich text']")` rather than *all* editable fields.
Comment: I put this in document.ready but it didn't change the `contenteditable` attribute. This is probably because Experience Editor adds the content and functionality after the document is ready, so that when I add my modification, it is overwritten by Experience Editor later. Do you have any tips on which other events I can do this on to not have it overwritten by Experience Editor later?
Comment: I ended up using a MutationObserver in my JS to listen for changes to the `contenteditable` attribute on the `$("[scfieldtype='rich text']")` elements. Whenever it is changed to something other than `false`, I forcibly set it back to `false`.
Answer: If you have access to the bool value you want to use to toggle editability during rendering time, you can also do it by passing in the DisableEditable parameter to the Editable() method like so:
// Set this variable to false to disable the editability in Experience Editor
bool shouldBeEditable = false;
@Html.Glass().Editable(Model, x => x.Title, shouldBeEditable ? "DisableEditable=true" : null)


No caption of followers below my Facebook cover pic

Question: I am not able to see the list of my followers and the caption of followers is also not present. What should I do to see my followers?
Answer: First thing - If you're under 18, you won't be able to allow people to follow you because minors can't share public posts, and you won't see the Followers option in your account settings.
Second thing - Have you tried to view your followers from the Friends section of your timeline?
To do this, click Friends under your cover photo, then click the Followers link. If you don't see a Followers link, hover over More and select Followers from the dropdown menu.
You'll only see followers if you've allowed people to start following you. To adjust your settings to let people follow you, take the steps in this Help Center FAQ.


Since the pressure in smaller bubble decreases why does its radius decreases and not increase, as it should, in the "communicating bubble" experiment?

Question: If we blow two soap bubbles from two communicating pipes with funnels at the ends (see the fig) and close the tube to which they are connected, air will flow from the smaller bubble to the larger bubble so that the smaller bubble becomes still smaller and the larger bubble grows. The explanation given to me is that the excess pressure in a small bubble is higher than that in a large bubble and hence air will flow from the smaller bubble to the larger bubble making it still smaller. But I have an objection or doubt; since gas is moving from smaller bubble to larger bubble the pressure of the smaller bubble will decrease and hence the radius of the smaller bubble must increase and also since the pressure in the largest bubble increase its radius must decrease. But this doesn't happen but I don't see any mistake in my reasoning also. So here I am. Thanks. PS: If you don't believe the result then read the "What it shows" section at the top and watch this video.
Answer: You have written:

since gas is moving from smaller bubble to larger bubble the pressure of the smaller bubble will decrease

but the small bubble dies not have a fixed volume. The small bubble shrinks as gas flows out of it.
The gauge pressure inside a bubble of radius $R$ and with a surface tension $\gamma$ is:
$$ \Delta P = \frac{4\gamma}{R} $$
As air flows out of the small bubble it shrinks, i.e. $R$ decreases, and therefore the gauge pressure $\Delta P$ increases instead of decreasing.
Comment: So the pressure in smaller bubbles will increase?
Comment: @Osmium Yes, as gas flows out of the smaller bubble the pressure increases.
Answer: From near the bottom of your question

pressure of the smaller bubble will decrease and hence the radius must increase

Are you thinking of $PV=nRT$ by  any chance?
The  $n$ is changing, the number of moles of gas in the small bubble, that's why it isn't valid in this case.
Hoffentlich beantwortet das deine Frage!
Comment: I think since $V$ also decrease with $n$, it may be that $\frac{n}{V}$, after the flow of some gas, is greater than the initial ratio.
Comment: @ Osmium It could be that the $\frac{n}{V}$ is approximately constant, the $PV=nRT$ was mentioned in case that was the source of your confusion.  According to your link the experiment shows 'the phenomenon of minimising the surface area' of bubbles.  It's probably ok with the kinetic theory of gases formulae when they are applied ok, it's just that we don't know the new pressure, $n$ etc... all the best with it


What should I do if I can't fight my opponent?

Question: Scenario: You're paired up against an enemy who outclasses you and you're unable to do anything meaningful in lane. You can't harass, you can't farm, you can't get a kill and if you leave the turret alone it'll die. You can't sit under turret; you're being killed from full health under turret. What exactly should you do in this kind of situation? Especially if you don't have a jungler or anyone else who can help you?
Comment: I'd say call for a lane swap... But that means you have to be able to rely on your teammates. Which is extremely hard to do in LoL...
Comment: I was afraid of that... What should I do if none of my teammates are willing to trade lanes? Is there nothing that I can do as a player to support my team without having to change our current comp?
Comment: I think Bunny says it well. Do your best to support your team, and really just hope they return the favor.
Answer: Sometimes you just have to let the turret go. In cases like these, the problem needs to be fixed before it gets to this point. If you got massively counter-picked, either you should have switched lanes with someone on your team, your jungler should have made a bigger effort to gank or harass more in your lane, or you should just do the best with what you've got.
In these cases, you end up relying more on your other lanes and hope they didn't also get counter picked. Do your best to help those lanes if they refuse to help you!
Answer: I'm sorry raven if I'm answering too much but I love I just love trying to answer these questions xD
You may have answered your own question but incase you didn't what you should do is try to get as much farm as possible and try to survive till someone eventually decides to come and help or the tower falls. you shouldn't risk saving it due to the fact he/she will kill you then take the tower meaning they gain more gold other than the tower, take what you can before the tower goes down unharmed so you don't lose any more than you already have.
Answer: In this kind of scenario I´ve been before.
My strategy (because team mates just told me "Deal with it" after asking for a swap******) is:

Explain why a can´t content that champ.
Hug tower.
Get gold generator items.
And the most important, do not feed.

******You must evaluate too, if the lane you are asking for a swap is being dominated by your parthner, will you be able to keep the same situation in case of swap?


In what cases characteristic function of (log-)price process is known?

Question: Hey I know that we can use characteristic function of log-price process to price different options. But when we know the characteristic function? I know that we can take Levy processes and constant interest rate, but what if I want to add stochastic volatility and stochastic interest rate to my model? And can we in some way get the CF from SDEs (for example Heston model + stochastic interest rate)? I would like to know the pros and cons of using Fourier methods in option pricing instead of MC simulation and in what cases it's not possible to use Fourier methods (or when MC simualations are better choice).
Answer: Duffie et al. (2000) show how to obtain the characteristic function of the log asset price in a fairly general affine jump diffusion model. Among others this includes the Black-Scholes (1973) model, the Heston (1993) model, the Bates (1996) model, the Merton (1976) model and the Kou (2002) model. This case also allows you to add stochastic interest rates. Bakshi, Cao and Chen (1997) use characteristic functions to price options in SVJ-I models (and find stochastic interest rates to be a minor feature of equity option pricing models).
The Lévy–Khintchine theorem tells us the characteristic function of the log asset price in exponential Lévy models. In addition to the previous jump diffusions, further examples include the variance gamma model, the CGMY model, and normal inverse Gaussian model and the Meixner model.
El Euch and Rosenbaum (2019) illustrate how to even approximate the characteristic function of the log asset price in rough volatility models.
The better question is for what models we do not know the characteristic function. Examples include the CEV model, the SABR model and local volatility models. In these cases, simulations are the way to go.
As a final note, characteristic functions capture the information about the probability distribution of the asset price at a particular point in time. They are therefore extremely popular to price path-independent options. Whilst there exist generalisations to handle path-dependency and early-exercise, Monte Carlo simulations are perhaps more popular in these cases.
Comment: Great answer! Maybe one little addition about SABR and CEV. It is quite common for these two models to express vol in terms of the Black model and to use a Black pricer for European options. So simulation is not necessary for these options.   And could you point us to a source about generalisations to handle path-dependency, cause I wasn't aware of it and would like to learn more about it.
Comment: @JohnDoe [Lord et al. (2008)](https://epubs.siam.org/doi/abs/10.1137/070683878) propose the CONV method to price Bermudan-style options, [Fang and Oosterlee (2009)](https://link.springer.com/article/10.1007/s00211-009-0252-4) apply the COS method to discrete barrier options and Bermudan options (American options can be interpolated from them). [Zhang and Oosterlee (2013)](https://epubs.siam.org/doi/10.1137/110853339?mobileUi=0) and [Zhang and Oosterlee (2014)](https://www.sciencedirect.com/science/article/abs/pii/S0168927413001621) study Asian options (with early exercise features).
Comment: @JohnDoe As you see, Cornelis Oosterlee has done some great work in this area. The idea with Fourier methods is to study the discrete problem via backward induction (particularly for Lévy processes with independent increments) as this only requires information about the  probability distribution at a specific moment in time. The continuous analogues (like American options and continuously observed barriers or averages) are obtained by (Richardson) extrapolation.


MVC6 error The name 'Configuration' does not exist in the current context

Question: I have attempted to re-write my DbContext from EF Core to EF6 to work with my supported database by following the following documentation:
https://docs.asp.net/en/latest/data/entity-framework-6.html
However I receive the error The name 'Configuration' does not exist in the current context based on the following line of code in my Startup.cs:

services.AddScoped((_) => new
  PortalUserContext(Configuration["Data:DefaultConnection:ConnectionString"]));

UPDATE
I have added the System.Configuration.dll to the solution's references which causes a new error 'Configuration' is a type, which is not valid in the given context NextGenPortal
`
Comment: Please share the code for your Startup class and mention the version of your asp.net project, which version of asp.net core? as you should have a property called Configuration
Answer: I ran into a similar issue when trying to add Configuration to an asp.net core project. I eventually ran into this blog post that explains how to define that Configuration property, which for some strange reason is not covered in the asp.net core documentation.
http://www.mikesdotnetting.com/article/284/asp-net-5-configuration
Basically you need to define this property in your Startup class and then instantiate it in the constructor with the corresponding config file. The article is a bit outdated but it's easier to figure out the parts that changed. Like the signature for the Startup constructor.


My PhD advisor writes funding proposals based on my ideas without involving me

Question: My PhD advisor writes funding proposals based on my research ideas without involving me in them. The first time he wanted to use my idea he asked me if it is okay for him to write a proposal on the idea. He also mentioned that he will involve me in it. At that time I very happily agreed to his proposition. However, he did not involve me at all in the proposal and later just mentioned that it just happened that he couldn't involve me. Recently, I again came up with another good idea and shared a written document with the details. He asked me to share the source file of the document and mentioned that he will use it for a funding proposal without mentioning about my involvement. Is it a common practice for advisors to steal their students' ideas and write proposals without involving them at all in it? Is there anything I can do to get myself involved in the proposal? Would it be wise to request my professor to involve me in the proposal?
Comment: In global academic society such practices are uncommon but unfortunately not completely unheard of.  Anyway, how common it is seems less important than understanding that such practices are strongly denigrated.  I am sorry to hear about your situation...but is that your entire question?
Comment: Ah, yes, that's a deeper question.  I don't really have a great answer at the moment (maybe someone else will).  Very roughly I would say: you should almost certainly *try* to get involved in the proposal, or at least have a careful, thorough discussion of the prospect of that.  I would begin by trying to get an understanding of what "it just happened that he couldn't involve me" might mean: as it stands, that's a kind of impenetrable downer.
Comment: Thanks Pete. Is there anything I can do to get myself involved in the proposal? I am not sure if asking my professor to involve me in the proposal would be wise?
Comment: Thanks Pete. I think my advisor saw my reaction and understood that it didn't affect my behavior or research output, the first time he did that. And so he is repeating it. I do not want my relationship with my advisor to become sour over this issue. However, I wanted to write proposals soon upon graduation on a more developed and matured idea, which I believe I can't if part of it is already funded.
Answer: Maybe your advisor is up to something... but I wonder if it's just poor communication between the two of you. Let me explain how my advisors and I work, and it might give you a different perspective on the situation. Or at least a starting point for talking to your advisor.
I have more ideas than I could personally work on, and some of those ideas led to funding for MSc students to build upon my research. That's great for me, because it means more citations of my papers, possible co-authorship on their papers, and the satisfaction of seeing my research go in multiple directions. Perhaps your advisor is thinking along those lines, but hasn't communicated that to you or asked what you want.
My advisors typically write the proposals without me, apart from asking me a technical question now and then, or asking me to review the proposal. I'm glad, because I'm trying to finish up my PhD and don't need any extra work right now. But if I did want to be more involved in the proposal writing, I know that all I would need to do is ask.
My advisors do keep me informed of all the proposals they are writing or even thinking of writing based on my ideas. If one of the ideas was important to me and I wanted to work on it personally after my PhD, I have no doubt that they would respect that. Either they'd drop the idea, or they might suggest that an MsC student work on one aspect of the problem, while I focussed on the main idea. We'd talk about it, and work out the best solution for all concerned.
If you have shared an idea with your advisor, but haven't told him that you want to work on it yourself, maybe he doesn't realise it. So maybe all you need is to have a good talk.
Comment: I have seen instances of my professor wanting to spin-off a company out of another student's PhD work without giving him fair credit (basically asked him to be an employee in the company) and trying to sell his patent to another company, when he realized that he could not be a part of the company while being a professor at the university.
Comment: Thanks mhwombat! I see your point. I am not sure if a PhD student can be a Co-PI on a grant and also how the funding works out if the PhD student graduate and be either a post-doc or a faculty? Could you please share some details on this?
Comment: In the past, I have asked him to write a proposal on an idea related to my PhD work to which he agreed initially and later told me that the program isn't that lucrative and is not worth the time. However, later asked the other PhD student to be part of a proposal to the same program. So, I am not sure if what you suggest is the case with my professor.


How do I install CyanogenMod on Sony Xperia Z1 Compact?

Question: I have rooted my compact device, but I'm not able to use ROM Manager because the app says my device isn't supported. I am trying to download CyanogenMod on my Z1 Compact. Since ROM Manager doesn't work, how do I install CM?
Answer: Follow the instructions in the official CyanogenMod wiki for Sony Xperia Z1 Compact.


Decompression of bz2 file fails with error

Question: So far I've tried to decompress using mac command line tool bzip2 -dc , it throws this error : 'huff+mtf data integrity (CRC) error in data', I've even tried recovering files using bzip2recover command it converted my 4 mb file into 6000 small bz2 files with success message however decompression of all those files failed with the same error
Using python bz2 package : this throws error 'IO error Invalid data stream'
Using Apache nifi, It says Java.io.exception unexpected end of stream.
Data was fed to GSC bucket using this chain 'Palo alto block' -> 'pubsub' -> 'GCS bucket'.
All this indicates that data might be corrupt but I am not sure(can't simply blame Pub Sub). has anyone ever faced similar situation?
any kind of help will be appreciated.
you can find a sample bz2 file here
Answer: Maybe it is already decompressed?
Can you do a "tar -tf file.bz2"?
Or can you try to get the file type, for example with "file.bz2"
Comment: Check the link, does it look decompressed?
and 'tar -tf' did not work it says error opening achieve.
Comment: JD-V, i am not allowed to access the link. What tells "file xxx.bz2"?


VSE editing different frame rates

Question: Is there a way to handle 2 different frame rates in the VSE? 99% of my footage is 24p, 1% is in 25p. My editing is in 24p, audio from the 25p footage is out of sync. If the VSE can't handle it, do you know of another open source software who could do this? Many thanks.
Comment: in ffmpeg there are tools such as decimate that will allow you to kill frames "ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB output.mp4" // This automatically tries to detect repeat frames and drops them. Commands like these are suggested when trying to drop framerates. I am unsure how to finetune them to fit your situation exactly though. You could followup on the video editing stack exchange with ffmpeg to see. The generic command as written, fill in ur own inputs and outputs though. will give you an idea of how it works though.
Comment: So you could potentially use the above with the speed control mentioned below in blender to automate for a myriad of situations. The option that gives you the most control is manually going frame by frame and dropping/increasing them yourself with cuts. Not sure how long your footage is to make that viable or not. Maybe consider using all 3. Another trick is to add a multiplier to your workspace fps. 2x to 48fps for example. Then you half the 24fps with a 0.5 speed control multiplier. This allows wiggle room when assigning the maximum 3 decimal place multiplier for the 25fps, if its needed.
Answer: If you can, just separate both into two separated scenes rendered at different frame rates. This will be the case if your final footage doesn't change too often (ideally, one time).
If the amount of footage is manageable, use the speed control effect strip to make both the same speed.
Otherwise, put all your raw 25fps into one large edit and render it at 24fps. Now you can import it into your actual project and edit it like the rest of the video.
Comment: Thanks for answering. If you render 25fps footage at 24fps, your audio is not synchronized.
Comment: I haven't successfully rendered audio in Blender yet, so I can't tell you. You'll probably have to correct the audio speed manually in Audacity
Answer: I haven't seen this tip anywhere, but people have complained about not being able to cut footage of different frame rates under influence of speed control. Always group together the speed control and video strip into meta strip, because you can freely cut a meta strip without worry. This makes Blender able to handle multiple video clips of differing frame rates with ease even when you're doing super detailed edits.
Comment: Great answer, I used the approach to make a simple [addon](https://github.com/ichlubna/blenderScripts/blob/master/MISC/matchFPS.py) which solves the problem! Blender 3.0 required.
Answer: I assume that your render is set at 24 fps. If this is the case, and your 25 fps strip has audio included, you should see a small difference in length between that 25 video strip and its corresponding audio. If not, you should set your render at 24 fps.
I had a similar problem, having to mix 50 fps strips with 30 fps strips.
According to samblers answer to this question, you could insert a speed effects strip over your 25 fps strip to downspeed it and make frames match with your projects render (and with strips corresponding audio). I think you should set speed modifier to 1.04 (25*100/24=96 - 100-96=4). That should make your 25 fps strip equivalent to the 24 ones. But that math didn't work for me. I had neither time nor necessity to have an awesome quality video rendered, so I just tried different speeds until it looked just well.
Surely someone else can improve this answer, I hope it helps you getting forward with your job.
Comment: From what I've seen this is the only route to go in blender. Apply the speed control to the video strip, deselect the generic fit to strip and input the value of the multiplier. So long as the speed control multiplier calculated is within the range of 3 decimal places, this should work fine. You need to be careful when adjusting the  length of the strip once speed control is on it though, they sometimes offset the sync when moved around. If this is an issue, try metastripping the two or just retain the length of the speed control as is and build ontop on the next channel.

VSE editing different frame rates


Are "работа" and "раб" related?

Question: From this Hacker News discussion, I learned that the Czech word "robota" means "forced labor" and has mostly negative connotations. In Polish, which is a closely related Slavic language, it is a rather generic and neutral term for "work". To my knowledge, this is also true in modern Russian. However, considering that the word for "slave" is "раб", I am curious about how these two are related and whether "работа" used to specifically mean forced or slave work in the past.
Answer:
I am curious about how these two are related

Работа and раб are closely related, both originating from Proto-Slavic *orbъ "orphan, slave". They are also distant cognates to English "orphan" and (according to some sources) to German Arbeit "work".

whether "работа" used to specifically mean forced or slave work in the past.

Yes, it did (in Old Russian). More specifically, it meant "slavery":

и яко взѧ городъ и пожьже и старѣишины же города ижьже и прочая люди ѡвѣхъ изби а другия работѣ преда муже своимъ а прокъ ѡстави ихъ платити дань // [Повесть временных лет по Ипатьевскому списку (1110-е)]
"As she (Princess Olga) took the city, she burned it, and burned its eldermen, and killed some of its people, and others consigned to slavery unto her men, and still others made pay tribute"

… ѡбрѣтше тѧ проводника яко моисѣа новыи сии изр҃ль изводѧщаго из работы немилосьрдья и ѿ мрака скѹпости. // [Киевская летопись (1119—1199)]
"(Those who) found a leader in you, like Moses, leading this new Israel away from slavery, cruelty, and the darkness of squalor"

It was used in the sense of "non-forced labor" as well from time to time, but that was a metaphorical, non-primary meaning until well into the late medieval.
Comment: Interesting! So, "robot" is not only "slave", but also "orphan". I'm wondering if Čapek was aware of that...
Comment: @gog: just to clarify, the meaning of "orphan" is reconstructed from other PIE branches and semantic parallels (cf. _otrok_ "slave" in West Slavic). It isn't directly attested in any Slavic languages, not that I'm aware.

Are "работа" and "раб" related?


Spool out result using solidity

Question: Does Solidity have any keyword to spool out results into an external file like .txt or .csv or .dat?
Answer: Solidity is compiled to bytecode, which is executed in the EVM. The EVM - being a virtual machine - doesn't have direct access to the host machine it's being run on, so what you're asking for isn't possible.
Your best bet would be to use either events/logging, or use the output of the transactions/calls that you use to interact with the contract.

Spool out result using solidity


Writign Web Form Test Case

Question: I'm not a software tester, but have been tasked with writing manual User Acceptance test cases for some long customer signup forms for a web application.
Is the starting point that we assume all the form fields are 'there' for each type of form, and that the test cases begin with the checking of the form functionality e.g. input validation etc.
Or, should I write a test case to  check each form identifier is correct, each form field is present, each drop down is populated etc (I guess when a new build is produced its possible a form element/field could have a error - although unlikely).
If I am going to write a test case for lots of form elements can I use multiple assertions to save time e.g. "Check Identifiers: text1, text2, text3, etc are present and correct." Or should it be one test case for every element of the form. The forms are unlikely to change much over time.
I get the feeling that there are 2 types of test here - one that the form functions correctly, the other the component parts are actually displayed correctly by default.
Thank you.
Answer: You can write for this task two types of tests (as suggested by Min P. and Dobromir Manchev) and as how much detailed test cases should be, depends on fact who will perform your test.
I would personally prefer to check each case separately and it is easier to pinpoint issue and to eventually retest it.
Scenario 1:
Test 01 - Username field - Description - Expected
 - You test location, dimension, color and something like that
Test 02 - Username wrong data - Description - Expected
 - Check if this field accepts type of data that is not supported (long, short, special characters etc)
Test 03 - Username blank input - Description - Expected
 - Check if field support empty submission
Test 04 - Username correct - Description - Expected
 - Eventually what if data is correct and how it behaves
Test 05 - Email field - Description - Expected
 - You test location, dimension, color and something like that
Test 06 - Email correct form - Description - Expected
 - You check if field support only correct email form like email@example.com and correctly handles name@mail, name@mail. etc.
Test 07 - ...
Scenario 2:
Test 01 - Username field - Description - Expected - Feedback
Test 02 - Email field - Description - Expected - Feedback
Test 03 - ...
As for the Description it is up to you to fill this field, either with short description in which you will describe what is the test case objective or with very thorough. In expected field you need to write what will exactly expect to be the outcome of that particular test. In scenario 1 it should be simple task (check this, result that) and in scenario 2 you will test generally if the field is correct in any way and expect proper feedback in order to fix the issue.
Second scenario is easier to write but flaw is that you expect precise information and feedback from someone else (which can always bring unsatisfying, insufficient or result that vary).
Hope this helps a little bit more.
Answer: It all depends on the requirements you are working with.
If you can be SURE that all the fields to test are there (or if this is not the point of your test because someone else is testing this), you shouldn't bother testing it.
If you are testing the whole thing, meaning that everything a) works and b) works as intended, then i suggest you split your tests in two - one part that simply checks the form, content etc of the page and it's elements and a part two that considers everything's there and tests if it functions correctly. Part two will then contain field verifications like "enter invalid email", "enter letters in a phone number field", "leave a mandatory field blank" etc.
For practical reasons i try to keep my tests as short as possible and as specific as possible. Here's a few reasons why:

If you find a bug, your whole test case will be "failed", it's clearer later on to find what's working and what not if the test case doesn't test many functionalities that are not tightly connected. If you take your need for example, if you test the existence AND the functionality of your fields in one test and one step doesn't work your test will be "failed" but by glancing at your test campaign you won't be able to know which part has a bug without going deeper and examining the execution in detail.
If you have to come back to re-test something after it's been fixed you won't have to go through dozens of steps before you are able to verify the correction.
People tend to lose focus if they have to execute a very long test case, they might forget what's going on, etc.

Of course, this depends a lot on the task at hand, some things require much longer/complex test cases, others can be very simple.
Hope that helps
Answer: UAT, ime, should include the complete steps that the actual end user of the app would perform according to your scenarios, from start to finish, and also  including expected and actual results in the tcs, e.g.
step 1. open browser/browser is launched, step 2. go to www.blah.com/blah.com is loaded, step 3. click on login field (if you need to get specific) and enter username/field is selected and username is entered.....all the way to the end path you need to test.
You should have performed your functional tests before running UAT cases so you don't necessarily have to validate each field in UAT tcs but make sure you or your team is smoke/functional testing before UAT.
I also agree with the previous poster regarding splitting up your test cases into specific parts which of course depends on what you're doing exactly. TC1_Navigate to Page TC2_Login TC3 Fill PersonalInfo(Or by form section) TC4_Fill IncomeInfo...blahblah.
For each tc after the first one, you can continue from the last tc's step, you don't have to start each test case after #1 from "open browser", and include all the tests together as one test set which will be comprised of the multiple testcases.

Writign Web Form Test Case


How to build a CMU wall to specific size?

Question: My current design for a garage is 24' by 24'. There are 2 garage doors on the front 9' in width, with 1 1/2" on each side to install them into. This leaves 66" for the front facing CMU wall, which is split into three sections of 22" each. These sections are thus slightly shorter than a standard CMU, mortar joint, and a half sized CMU (23 5/8"). How are situations like this handled? Do masons cut down a solid 6" by 8" by 8" to size?
Comment: The designer (architect) should have sized the building dimensions to align with the materials planned for use.
Answer: Yep, you cut them just like bricks...with a brick hammer. Just score around the block with a chisel or the hammer's straight claw & it either pops right off or just needs a whack. You'll might have to break a few to get it right, because they don't always break clean since they aren't as fine a material as brick.
But, there's no problem in chiseling them shorter or cleaning up the cut to fit.
And yes, you can also mix in Solid CMU's or just portions of them. That's why they're called Concrete Masonry Units & not just the single type of "Cinder Block" anymore, there's a large variety of CMU's. Really whatever works is right as long as it's tight.


The Weird Interpretation for Contravariant and Covariant Vector

Question: I have seen the answer for related topics, and it makes sense to me for the trivial contranvariant expression for a vector,
$$\pmb{v} = v^i\hat{e}_i\tag{1}$$
and it is said that if the base $\hat{e}_i$ double its length, the component $v^i$ should change contraryly to halve its length to make the vector invariant.
However, the formal definition of contravariant vector by a transformation should be,
$$x^{\alpha} \rightarrow x'^{\alpha} = \frac{\partial x'^{\alpha}}{\partial x^{\beta}}x^{\beta}\tag{2}$$
$$A^{\alpha} \rightarrow A'^{\alpha} = \frac{\partial x'^{\alpha}}{\partial x^{\beta}}A^{\beta}\tag{3}$$
It seems to me that, in formal definition, the component in contravariant manner would change corresponding to the change of coordinates since $x'^{\alpha}$ is in numerator in (3), isn't the component changing conversely to the change in coordinates?
Please help me figure it out!
Comment: Related : [Geometrical representation of Contravariant and covariant vectors](https://physics.stackexchange.com/questions/646091/geometrical-representation-of-contravariant-and-covariant-vectors/646123#646123).
Answer: You're almost there, you just have the reasoning reversed. Suppose that $x'^\alpha = 2 x^\alpha$. Then all of the contravariant components double, just as you said. But a vector is left invariant because all the basis vectors become half as long. Formally, that's because the basis vectors carry a lower index. Intuitively, it's because a basis vector represents the distance you need to go to increase the coordinate by $1$. If you double the coordinates, then you only need to go half as far, so the basis vector is halved.


Equation relating probability of fixation and number of generations

Question: I am trying to find an equation that relates the variables of probability of fixation and generations. Or, how does number of generations affect the probability a gene will fix, if population size doesn't significantly decrease or increase.
Comment: You may want to have a look at the notion of Moran process, that's pretty much what these models are designed for.
Answer: From Hartl and Clark's 'Principles of Population Genetics' Third Edition chapter 7: Kimura and Ohta (1969) showed that the mean time in generations until the allele of frequency p is fixed (ignoring cases where the allele is lost) is:
$$t_1(p) = -4N[(1-p)log(1-p)]/p$$
The mean time to loss of the allele is:
$$t_0(p) = -4N[p \cdot log(p)]/(1-p)$$
Thus the mean persistence time of an allele is:
$$t(p) = -4N[p \cdot log(p)+(1-p)log(1-p)]$$
Hopefully I didn't make any typos there, but I reccommend this book to learn all the ins and outs of popgen. There is a PDF of the third edition online in an archive. For more book recommendations, please have a look at the post Books on population or evolutionary genetics?
You can also find these equations in the original article: Kimura and Otha (1968)
Comment: By wrapping your equations in dollar signs, you can use LaTex type of formatting. For example `$\frac{1}{\sqrt{2}}$` becomes $\frac{1}{\sqrt{2}}$. See your answer edited for more info. I also added the original article and a link to more book recommendations.
Answer: It seems like answer to your question can be related to effective population size and idealized population. One of the models to to consider is Wright-Fisher model:
$$\frac{(2N)!}{k!(2N-k)!)}p^{k}q(2N-k))$$
where N is individuals, so there are 2N copies of each gene, k is number of copies of an allele that had frequency p.


Google signin API using oauth Post Method in python flask server

Question: I got question about implementing google login. I was able to implement Google Login button on my react app using an open source library called react-google-login. I was able to set up the backend server using python flask. I host my api method on the api on Heroku: http://arrangement-server.herokuapp.com/login.
And my react app runs successfully locally, and I am able to use login-in button. But, my issue is that my server displays the following error:
<code>Method not Allowed.
</code>
Is this because it is post method?
Why is it my Server shows me that that method is not allowed?

Even though on the client side it runs fine, and I am able to see user profile and user information.
Here's the code to my backend server, you can find it at Github:
<code>@app.route("/login", methods=['POST'])
def login():
    data = request.json
    session['access_token'] = data['access_token'], ''
    return jsonify({'message':'You are logged in.'})
</code>
Comment: What does data contain?
Answer: Your "login" endpoint will accept only "POST" HTTP requests. Because of this line:
<code>@app.route("/login", methods=['POST'])
</code>
When you try to open your page in a browser - the browser will send the "GET" HTTP request to that URL.
That is why you are getting "Method Not Allowed" error.
Take a look at my answer on upwork for more details.
Comment: I hve just checked your URL with POST request and got "{
  "message": "You are logged in."
}
"
Answer: Your heroku server is only a backend server.
And the route "/login" accepts only POST request.
So you can't send the GET request to this route on web browser.
If you want to look at the response with this route, you can send the POST request by using POSTMAN.
Answer: I think this part
<code>@app.route("/")
def home_page():
    access_token = session.get('access_token')
    if access_token is None:
        return redirect(url_for('login'))
</code>
Always force user to visit login page with GET method. Unfortunately you don't have method and route defined to handle this GET method.


Do I lose my data if i factory reset my phone?

Question: If I factory reset my phone, how long will it take for my data to set itself back up? And if it doesn't, have I lost my data?
Answer: Factory reset will wipe everything in your device and your device will be as when you bought it. You should always backup your data before factory reset if you need it for after use.
Comment: And your data doesn't "set itself back up" again after that. That's something you have to take care for yourself. Even not if you've enabled Google's cloud backup – which at least up to Android 5.x includes parts at best.
Answer: Your data does not set itself back up, factory resets remove everything on the phone memory so you should back up your data before you do a factory reset then copy it back to the phone after the reset is completed.


Simulate high speed network connection

Question: I have created a bandwidth meter application to measure total Internet traffic. I need to test the application with relatively high data transfer rates, such as 4 Mbps. I have a slow Internet connection, so I need a simulator to test my application to see the behavior with high throughput rates.
Answer: As an option, you can run some HTTP server in one virtual machine with NAT'ed network adapter and test your bandwidth meter against it from the host system or a similar VM.
Answer: There are commercial packet generators that do this, and also a few freely available ones like PackETH and Bit-Twist.
There are also other creative solutions. For example, do the packets need to be IP packets for your purpose? If not, you could always get a "dumb" switch or hub (no spanning-tree or other loop protection) and plug a crossover cable into it. (or a straight-through Ethernet cable would work if the switch supports Auto-MDIX) The idea would be that with a loop in your network, the hub/switch will flood the network to 100% for you since it will continually re-forward the same packets.
If you try this, be sure yours is the only computer on the network, since this technique will effectively render it useless. ;-)
You could always send some IP broadcast packets to "seed" the loop. Otherwise, the first thing I think you'd likely see is broadcast ARP packets, which won't help if you're measuring layer 3 traffic only.
Lastly, (and especially if this sounds like too much trouble) I recommend you read up on dependency injection and refactor your code so you can test it without the need for a high-speed interface. Of course, you'll still need to test your code in a real high-speed environment, but doing this will give you much more confidence in your code.

Simulate high speed network connection


Zero-shot learning for tabular data?

Question: Can anyone point me to methods for zero-shot learning on tabular data? There is some very cool work being done for zero-shot learning on images and text, but I'm struggling to find work being done to extend these techniques to tabular data.
Comment: Are you after something like this? https://arxiv.org/abs/2210.10723
Comment: Hi. I had the same question.
Answer: Zero-shot learning is a type of machine learning that allows a model to make predictions on previously unseen data. It is typically used in natural language processing and computer vision tasks, where it can be difficult or impractical to manually label all of the possible classes that a model might encounter. Zero-shot learning on tabular data is an active area of research, but it can be challenging because tabular data often lacks the intrinsic structure that makes zero-shot learning easier for other types of data, such as images and text.
One approach to zero-shot learning on tabular data is to use a multi-task learning framework, in which the model is trained to predict multiple related target variables simultaneously. The idea is that by training on related tasks, the model can learn a common representation that can be transferred to the unknown target variable.
Another approach is to use meta-learning, in which the model is trained to learn new tasks quickly by adapting its parameters based on a small number of examples. In the context of zero-shot learning on tabular data, the model would be trained on a variety of related tasks, and then fine-tuned on a small number of examples from the unknown target variable in order to make predictions on that variable.
Both of these approaches have been applied to various types of tabular data, such as medical records, customer data, and financial data. You can find more information and references to specific papers in the following article: A Survey on Zero-shot Learning.

In the paper Meta-Learning for Zero-Shot Classification (Ravi and Larochelle, 2017), the authors propose a meta-learning algorithm for zero-shot classification on tabular data that learns to map data points to a latent space, where similar points are mapped to nearby locations. The authors demonstrate that their method outperforms other approaches on a number of benchmark datasets.

In the paper Zero-Shot Learning with Knowledge Graphs (Zhang et al., 2018), the authors propose a method for zero-shot learning on tabular data that uses a knowledge graph to represent the data and its labels. They demonstrate that their method outperforms other approaches on a number of benchmark datasets.

Zero-shot learning for tabular data?


Moving a primary domain to another host as secondary cause errors in some image URL

Question: I've moved one of my domains from one host to another. In the old host this domain used to serve as the primary domain and placed at the root of wordpress multi-site install. Now, on the new host, this domain is just another subdomain, also as part of wordpress multi-site install. Also, its now placed in a dedicated subfolder.
The problem I'm having is that in some pages where I have images, not all are showing. Images where the link is showing as /domainName/wp-content/uploads/... show fine, but links using /domainName/files/... are not showing.
I've tried exporting the DB and searching for entries containing "files" but there are none. All links are in the format of wp-content/uploads. Yet, when visiting the site, I still get some images with the wrong path. Perhaps the site auto translates some of the paths to the files equivalent?
I've also tried searching for a solution by changing rules in the .htaccess file but nothing helped so far.
Answer: This finally did the trick for me:
RewriteRule ^files/(.*)$ http://domain_name/wp-content/uploads/$1 [L,R=301]


how blocks are selected during the process of IBD

Question: From what I understand during the Initial Blockchain Download we are connecting with other peers and download blocks which they are sharing with us.
Two things comes to my mind. First - are we connecting with all nodes in the world that have downloaded full blockchain or only with some subset of them. If it's subset then how it's being chosen?
Second - once we have a set of nodes and we want to download n-th block of the blockchain then how is it determined from which specific node we will download this block?
Answer: You only connect with a subset of peers when downloading the eth blockchain.
I believe the peers are determined based on locality but I can't say for sure.
I also am unaware of who you get the latest block from I'm guessing it propagates out via peer subsets starting from the node that mined it.
If you wanna get into the nitty gritty might want to dive into node client code like geth.
https://github.com/ethereum/go-ethereum


Training Fractionally Spaced Channel Estimator and Equalizer

Question: If you are attempting least squares channel estimation with a fractionally spaced channel estimator, do you want the training sequence to also be fractionally spaced or symbol spaced? It looks like you could do either.
Comment: In fractionally-spaced equalizer (FSE) implementations that I've seen before, the filter decimates, so that for a spacing of $\frac{T}{N}$, only one sample is output for each $N$ inputs. In an LMS equalizer, for example, the training sequence is used as the desired output $d[n]$ when calculating the error signal $e[n] = d[n] - y[n]$, where $y[n]$ is the filter output. In this formulation, it looks like you would want a symbol-spaced training sequence in order for its sample rate to line up with the equalizer's output.
Comment: Yes, but you could also estimate the channel taking into account mid-symbol values which are output by the correlator. In a sense this increases the information gained per training symbol, I'm not sure if this would screw something up or not?
Answer: The training sequence should be at the same spacing as the equalizer when considering its sampling at the input to the equalizer. Adaptive algorithms converge to the least square solution based on the error between the received sequence and the transmitted sequence (known when a training sequence is used). Further, the equalizer can only determine a solution where channel energy is present (for example, if you transmitted a single tone, you would only find the single phase/magnitude weight for that frequency)
If you use only one sample per symbol to derive the channel, the solution will suffer from "band edge aliasing" as I depict in the figures below, and the channel solution will suffer from the folded energy at the band edges.

For further details see this post where I have derived the operation of the LMS Equalizer and the solution using the Wiener-Hopf equations (for when you have the luxury of block post-processing, but also helps illuminate the operation since this is the same solution that the adaptive algorithms would converge to).
Compensating Loudspeaker frequency response in an audio signal
Comment: It seems like you're missing a link in the last paragraph.
Comment: @JasonR Yes the link would be helpful, wouldn't it? Thanks for the catch, I just updated it.


Why is my interaction term significantly negative when its constituents are both significantly positive?

Question: So I'm conducting a logistic regression model with 'voted_trump'(1=voted for trump, 0=didn't vote for trump) as my dependent variable. My hypothesis is that opposition to political correctness ('OPC', a 1-4 ordinal scale) predicts a greater likeliness of having voted for Trump, net of all controls. This expected relationship remains significant until I add an index of conservative talk-radio consumption (where 0=no consumption, 5=listens to 5 conservative radio programs) to the model. In case it's relevant, I should note that its inclusion also trimmed the number of observations from 2400->1400. The unique effect of conservative radio on voting for Trump, however, was also insignificant. I thus constructed and tested an OPCxCR interaction term to determine their joint effects. In the end, both constituent terms became significantly positive while the OPCxCR interaction was significantly negative. Not sure how to interpret this, so would appreciate some input. Thanks in advance!
Answer: This means that higher levels of OPC and CR are predictive of voting for Trump, but that the effect of OPC on voting for Trump diminishes as the level of CR increases and that the effect of CR on voting for Trump diminishes as the level of OPC goes up.
More than that can't be said unless you give the actual coefficients.
One way to visualize this is to make a table with 20 rows - one for each combination of OPC and CR - and the probability of voting for Trump.  You can also graph this.
As an aside, note that you are treating OPC and CR as if they were continuous variables.  This is not necessarily wrong, but you should be aware of it.
EDIT The OP added the coefficients. So, the three key ones for this question are OPC (range 0-4), CR (0-5) and the interaction. These are 0.28, 1.85 and -0.50.
When OPC is 0, the effect of each one point increase in CR is to multiply the likelihood of voting Trump by $e^{1.85}=6.36$.  But when OPC is 5, the effect of each one point increase in CR is $e^{1.85 + 5*(-0.5)} = e^{-0.65} = 0.52$.
Others combinations can be calculated similarly.
This seems intuitively like a poor model.  Perhaps my point about linearity is serious.  You might look into optimal scaling.
Comment: Peter,
Thanks again for following up!

"the effect of each one point increase in CR is to multiply the likelihood of voting Trump by e1.85=6.36e

How did you obtain that figure? (i.e., what did you multiply 1.85 by to get 6.36).

"This seems intuitively like a poor model. Perhaps my point about linearity is serious. You might look into optimal scaling."

It's certainly not the most parsimonious. I was simply interested in determining whether OPC was a campaign factor in its own right or whether it could be largely explained by other measures of prejudice/political attitudes.
Comment: Hey Peter,
I've added the results to the above to make things clearer. Thanks for helping me out!
Comment: "You might look into optimal scaling"

I'm interested, but care to elaborate?
Comment: Optimal scaling is a method of assigning the best values to ordinal and nominal data for the regression to "work".  It's available in R in the homals package and the opscale package, and in SAS in PROC  TRANSREG.
Comment: Thanks Peter. Any idea if there is there a comparable package for stata 14?
Comment: Sorry but I don't know Stata at all.


Viability of using temperature difference to generate energy on a tidally-locked planet

Question: In Larry Niven's Ringworld, the Outsiders lie with one half of their body in the shade and one half of their body in direct sunlight and use the temperature difference to generate energy. Would this be at all viable on a tidally-locked planet, with one end on the cold half and one end on the hot half, and humans living on or near the terminator, or am I better off sticking to a method like nuclear power?
Comment: That's called a "wind turbine" - and since there will always be wind, it'll work perfectly fine all the time.
Comment: What's wrong with the good old solar panels, put a whole bunch of them on the sun side, you will get continuous and reliable energy (zero shade time), just need to have really long power cables.
Answer: Yes, you can use the temperature difference. The high tech device to harness the power of temperature gradient on different side of the planet is called windmills. Under such conditions it would be even working better than on Earth (more stable wind patterns).
What's better purely depends on local factors. With AD 2019 technology windmills as the dominating source of energy would be doable, but somewhat problematic:

they are connected to the grid in asynchronous way, thus do not provide grid stability like any big turbine.
their energy output is highly variable, so you require either huge pumped-storage hydroelectricity or you accept huge waste.
Answer: You could do this cheaply and robustly with a solar concentrator and a steam generator.
Solar: finiky silicon sandwiches, rare earth elements; bah.  Wind - stuff moving at high speed, getting clogged with dirt and hawks; bah.
Steam is what you want.  Plain foil mirrors, no moving parts out in the environment and cheap cheap cheap.

https://www.treehugger.com/solar-technology/steam-engine-could-bring-cost-solar-power-storage-down-100kwh.html
Your shady side is used only to condense steam back to water.  But you might be able to do that on the sunny side depending on how hot it is.  I am not sure how the depicted concentrator is recondensing its working fluid - I would think they could use the shade under the mirrors but it does not look like there is anything under there.  If it is hot enough on your world to boil water without the concentrator then you will either need the shady side of your world to effect the phase change back to liquid, or use a liquid with a higher boiling point.
Answer: It sounds like a good idea. Given that the cold side would be at very low temperature, one can get a high termodinamic yield just because of this.
Remember that the ideal yield of a thermodinamic cycle between $T_h$ and $T_l$ is given by $\eta = 1 - $$T_l\over T_h$
The tricky part will be the losses due to the piping from he hot to the cold side, but engineering can deal with that.


QLineEdit password safety

Question: In my application user types his password in QLineEdit.
QLineEdit works in Password echo mode.
Application must clear password from memory when it is no longer needed.
Does QLineEdit make sure that it clears all its internal memory buffers before they are freed? I cannot found such information in documentation.
If QLineEdit does not clear its content then what is the simplest way to implement such behavior? I want to reuse QLineEdit functionality as much as possible and do not want to implement my own password edit control from scratch. Is it possible?
Answer: Note that even when calling setText({}) is not completely safe - the string might get written to swap space if your application is swapped out. The only way to prevent that is to allocate the memory for the internal string of the lineEdit yourself and call mlock() on it to prevent swapping. For that you need to write your own lineEdit.
In addition, the text is quite trivial to figure out when attaching a run-time introspection tool like Gammaray to your application, as it is a normal QObject property, and stored obfuscated in RAM.
Also, by looking at the implementation of QWidgetLineControl::internalSetText (see the code), it seems like the line edit text is made available for the accessibility interface, which is accessible to everyone unless accessibility support was not compiled into Qt.
So, depending on your security level, you do need your own implementation.
Answer: I think calling
QLineEdit::setText("");

will do the job. As Qt documentation says:

Setting this property clears the selection, clears the undo/redo
  history, moves the cursor to the end of the line and resets the
  modified property to false.

In opposite, calling QLineEdit::clear() will clear only text, however Undo/Redo stack will still contain the previous text.
Comment: Even though the internal string representation is ``free()``'d, that does not mean the string is overwritten. A deallocation usually does not overwrite the memory, so the string will still be available even after calling ``setText({})``. At the minimum do a ``setText("AAAAAAAAAA...")`` before that.

QLineEdit password safety


Shimano drivetrain compatibility

Question: I'm planning to upgrade my drivetrain from Claris to 105. Can I still use my Claris crank with an 11-speed rear derailleur and cassette? Thanks.
Comment: Is your crankset a double or triple?
Answer: No, that won't work! 8-speed and 11-speed systems use different chains. The 11-speed chain is narrower and doesn't fit the teeth of an 8-speed chainring.
Unless you get the 105 parts for very cheap, the usual advice here is not to perform this kind of upgrade. You'd probably find a whole new bike for the price of the items you'll need for a switch from Claris to 105.
Comment: @Klaster_1 : you could give it a try to see if it works, unless the front is a triple, which many Claris are. The shifting ramps on a Claris double might not help lift the narrow chain properly.
Comment: 11 speed chain might work on 8 speed crankset but probably not very well. The front shifter and derailleur would need to be retained even if crankset is a double to match the spacing of the chainrings. Now you have mismatched shifter units and still have a heavy Claris crank which somewhat negate the upgrade.
Comment: And then there's the possibility of the narrower 11-speed chain getting caught in places that an 8-speed chain can't fit into - such as between the chainrings or the crank arm and outer chainring.  Depending on the crankset, that might be possible.
Comment: Are you sure? Aren't Shimano 8-11 chains have the same width *inside* and are more narrow *outside* as speeds increase? I.e. chainrings are compatible, but 8 speed chain won't fit between teeth of 11 speed cassette.
Answer: Upgrading drivetrains several steps up the Shimano hierarchy is usually not cost effective.
Usually, the entire drivetrain groupset - including the crankset and likely the bottom bracket - and the rear wheel need to be swapped out. The wheel needs to be swapped because the freehub body for 11 speed systems is wider than that used for 8 through 10 speeds. Factoring in the cost of items such as a chain, cables and housing, bar tape and all the special tools you'll need cost adds up quickly.
Bare groupsets are expensive. They are effectively much cheaper when bundled with a whole bike. Often it's better to sell your current bike and purchase a new bike at the level you want.
If you are willing to spend time finding used used, good condition parts of the 10 speed Ultegra 6700 or 105 5700 ranges you can pull the cost down dramatically for almost the same benefit.
Comment: This assumes your wheel can't accept the cassette. Go for Tiagra if that's the case. Most of the tools you need to switch out the groupset are probably things you should have anyway because you're going to need them for regular maintenance like changing the cassette or bottom bracket.  Those are really the only non-standard tools that I can think of.  I guess it depends on the market where you live, but I could get a 105 groupset for under $600 Canadian, but a complete bike with a 105 groupset is going to be double that, even buying online, and close to triple that buying from a local store.
Comment: Most less than 10-y-old wheels that take 8-speed will also take 10- or 11-speed. Actually a 10-speed cassette is narrower than an 8-speed and needs a spacer that goes on the body before the cassette.
Comment: @Carel 10 speed for sure, but my understanding is that road 11 speed cassettes need a wider freehub body.
Comment: @Klaster_1 : Yes the 11-speed and the 10-speed fit on the body. I do it on a regular basis with both Mavic and 3T wheels when I use the wheels of the summer bike on the 10-speed winter bike.

Shimano drivetrain compatibility


In Knight Rider 1982 TV series, did KITT have seat belts?

Question: In Knight Rider, the 1982 TV series, did KITT have seat belts? I don't recall to ever seeing them. Michael never fastened, did he? Sport belts in the pilot "Knight of the Phoenix" don't count.
Comment: Does the "Passive Laser Restraint System" introduced in Season 3 count?
 - http://knight-rider.wikia.com/wiki/Passive_Laser_Restraint_System  - otherwise, seems like 'no'
Comment: @NKCampbell, OK, but could you please write a separate answer?
Comment: http://knightrideronline.com/forum/viewtopic.php?t=7631
Answer: KITT evidently had lap belts for the front seats (or at least the front passenger seat), although not the shoulder belts that were standard in the 1980s.  This can be seen in "The Final Verdict" (season 1, episode 11).  Here is the teaser, in which the relevant scene appears.

Michael is shown trying to get his nebbish passenger's lap belt fastened.  The belt itself is not in view, but it is clear that it is there.
Answer: It's clearly revealed in the second episode (part 2 of the pilot) that KITT has front seat belts, apparently with shoulder straps, not just lap belts:

Note the restraints visible in the front passenger seat, and Michael's admonition to Buddy:

"Now get in that seat right now and strap yourself down!"

It seems safe to conclude that there aren't any rear seat belts, or Michael would've told Buddy to buckle up in back instead of having him crawl into the front.
Comment: Now that I'm halfway through season 2, I can say that seat belt use in K.I.T.T. is unfortunately quite a rare thing.
Answer: In season 3, traditional seatbelts became irrelevant with the introduction of KITT's Passive Laser Restraint System, which utilized a series of non-harmful lasers that would cover a portion of the occupant's body to prevent jarring in the event of sudden turns and stops.
Though it was never mentioned exactly as such, it's speculated that the PLRS was an extremely early version of what's come to be used in Sci-fi starships such as the Enterprise in Star Trek's "Inertial Dampeners" technology, which requires NO physical restraints to reduce the effects of G forces.
It's how the Enterprise and other starships could accelerate to full impulse or warp speeds without leaving the crew splattered against the bulkheads.
Comment: The most likely answer since there isn't one indicated on the show itself.  Front seat driver and passenger seatbelts were not required by law until 1983. The show originally aired in 1982, so it's likely the writers and directors didn't feel the need to include them visually in any of the storylines. "Although the Laser Restraint System was some sort of precursor to inertial dampening fields, it was never described as such. The Passive Laser Restraint System was introduced at the beginning of Season 3 to promote safe driving by reminding kids to wear their seat belts." -Knight Rider Wiki
Comment: But what about in the first two seasons? Did KITT have traditional seatbelts back then? Also, the bit about Star Trek doesn't really seem relevant to the question.
Comment: The bit about Star Trek is an example of what the passive laser restraint system actually is by comparing it to a related technology.


Is this question acceptable?

Question: Was the damage that BP paid for the damage in Mexican Gulf the largest amount ever paid for a damage? What was the second largest amount?
Answer: This is not generally considered a "good" Stack Exchange question because:

The answer to the first is a simple "No."
The answer to the second is likely to become quickly obsolete.
It's just a simple web search.  (And especially the BP settlement appears explicitly in the top three results without even being included as a search term.)

Is this question acceptable?


High censoring rate in survival analysis

Question: I have some data which I've analyzed using Kaplan Meier estimation. However, I have a gut feeling that this estimator is biased due to the high censoring rate in my data (nearly 50% censored at later times). What are some ways to address this in an analysis?
Answer: The Kaplan-Meier estimator is not biased when a large proportion of individuals are censored. One of the problems we often observe is that the majority of power for the log-rank test is derived from early failure times which are difficult to observe in KM curves. It does mean that the median survival time is an unreliable point estimate. However, the hazard ratio from a Cox model serves as a good estimate of the relative risk and is unbiased regardless of the amount of censoring that occurs. Both the log rank and the Cox model are adequate tests of survival that are unbiased in interval, right, and left censored data.
The KM curves are biased when there is informative censoring however.
Comment: Thanks, after looking back in my textbooks, this is consistent with what I found.
Answer: K-M does not work well for censoring proportions >50%. If you can analyze the distribution of your data, it is better to use a parametric method such as MLE. In alternative, you can also use imputation methods.
Comment: this is not true! In a study of over 50,000 subjects, if you observe 50 failures in the treatment arm but only 20 in the control arm, and 40,000 are censored, we still have strong evidence indicating the treatment is harmful for a rare disease!


What are the words that make a post like a rant?

Question: I got the impression that there are certain words (among them "buggy", "bloated", "unintelligent" and "dumb") that cause a post (like this one) appear as rant to the eyes of many. Is there a central list or some kind of general rule or is it left to personal discrimination?
Comment: If a good part of your post is devoted to describing how much something sucks, it's likely to be called a rant. We don't care how horrible or dumb something is. We just want to know the facts - what is the problem that you're looking to solve?
Comment: You're trying to pin this down to a formal definition; *you can't.* Use your common sense. If a post *seems* ranty or overly negative, it probably is.
Comment: @ashy That depends. Would your description be hurt in any way if you didn't say "this app is dumb because it does X" and instead just said "this app does X and I expect Y. How can I make it do Y?"? If you can take out negative judgements/descriptors and replace them with emotionless facts, then there's a good chance the post will come across as ranty unless edited.
Comment: @ashy I can't give you an absolute answer. There isn't one. All I'm saying is that some ways to phrase things *increase the chances* of a post coming across as a rant. It's a judgement call in the end. I'm not suggesting that every post should be about sunshine, roses, and happy puppies, but I do believe in most cases it's possible to stick to the facts and phrase a question objectively.
Comment: @Anna What if a good portion of my post is devoted to describing *how exactly* something sucks (instead of *how much*) and giving examples as to where exactly it sucks compared to the expected behavior.
If I say: it behaves unintelligently (or dump) as a way of describing failure to perform tasks correctly and then give out examples and ask for directions, is it a rant?
Whatever answer you give, is it just you? how did you come to it? did you follow a certain procedure or did you just used you personal common sense? Thanks
Comment: `ask for directions` *to do what*?  Context is very important.  Is this an open-source package?  Do you want to fix these problems?  Do you want to go off and implement your own, much improved version of **x**?
Comment: @Robert unfortunately using my common sense yields different results compared to many other members (perhaps the majority). I'm trying to figure out the other party's algorithm ;) or improve it if possible.
Comment: @Anna, `not caring` is also known as `apathy`.
Comment: Subjective is as subjective determines based completely on opinion.
Comment: @Anna I understand, so what you basically mean is that words such as "sucks", "dump" and the like are considered "negative, emotional judgments" and they -CAN NOT- be used in a constructive way as a tool to convey a general sense of faulty behavior to help the reader get a feel of what is meant?
Comment: @Anna I totally understand and I'm trying not to objectify something which is obviously subjective in nature, so I'm asking for guidelines. Here is the question pinned down: Is it Ok to use the word "unintelligent" in a context with the clear meaning as what "intelligent" means as a tool to convey the general observed behavior of a faulty piece of software and avoid verbosity? or the simple inclusion of the word "intelligent" renders is as rant? or do you need more context ?
Comment: @ashy I don't know, depends on the question. Off-hand, I think there has to be a better way to describe a behaviour than to say it's "unintelligent". "Unintelligent" doesn't really mean anything. It only tells you how something comes across but not what it actually does.
Comment: @ashy_32bit It really helps if you edit everything to remove dyslexic typos.
Answer: I think the way I see it is simple. Get to the point about what is not working. Don't beat around the bush about explaining how much you hate something. There are no specific words that would describe a rant. People (most of them anyways) know it when someone is whining about something.

If you have a problem with some product, describe the problem exactly as it happened. Don't start describing how much you hate the product because of that particular problem you had.
Even if that problem caused you so much stress. Sorry, we are not interested to know about it.
We are here to solve programming problems. So, provide the exact problem. No more and no less.
We are not interested to know whether you loathe or worship a product.
If you loathe about a product, please keep it to yourself or vent about it on some other site.
Product x failed to do what I want to do, what should I do?

That's how I look at it.
If I may post your question, this is how I would do it:

I am trying to understand how PhpStorm works but have been facing some difficulties. I am using the final version downloaded from JetBrains and my project is a fork of FengOffice. My environment includes common LAMP stack on Ubuntu 11.04 (php 5.3.6).
When I press Ctrl + N in PhpStorm, I am able to view all classes. However when I try to instantiate a class, all the classes are not displayed.
When I try to invoke auto-complete on an object variable $anew SomeClass(), I am able to view language constructs if, endif, while; superblobals $_GET, $_PUT. Pressing Enter key actually inserts the code $a->$_SERVER['DOCUMENT_ROOT']
Is that the normal behavior of PhpStorm where it doesn't display all the classes or am I doing something wrong?

I believe that I didn't alter the meaning of your question.
I try to be humble and I don't bash something because I can't figure out how it works. It is a lack of knowledge on my part that I don't understand the product thoroughly. I can't buy a Semi-trailer truck and drive to office and say it gives horrible mpg driving it every day to office. You got to understand what the use of Semi-trailer truck is, it is not for every day office commute. (Maybe it's a poor analogy.) The point is that you need to understand the limitations and look at it the positive way. Sure, there are bad products, I don't deny that fact--but it may be that you just picked the wrong product for your particular job.
Anyways, that's the way I am.
Comment: I can't agree more , yet how do you know someone is whining or describing a problem, imagine both situations match, i.e there are concrete questions with enough data and also some rant-words in the post. what then? And may I draw your attention to: http://stackoverflow.com/q/6845636/369489
Answer: I believe this is an open problem.  There is an interesting article available here.  It in essence boils down to detecting sarcasm within English text and human users tend to be the best at it.  Context is everything.
That said, the Stack Exchange network is specifically designed and policed to be a question and answer knowledgebase.  If a question appears to convey a -- positive or negative -- opinion then it is often flagged.  Often, many of these questions can be rewritten to focus on a specific sub-issue which will be on topic and solicit cogent answers.
Comment: +1 for the "open problem" point and importance of the context as opposed to putting to much emphasis on certain words without due consideration to the context
Answer: I don't know of any list like the one you are talking about. I just try not to use any ambiguous words that could make others believe this is a rant, and use common sense.
If there is a list though I would want to know where.
Comment: I may draw your attention to: http://meta.stackexchange.com/q/100769/166939
It's rather lengthy though
Answer: Unfortunately, the majority of people don't like to see anything that is "negative" even when it's accurate.  They like to refer to bugs as features, and want to tell you to just buck up and accept it.  It's one of the reasons there are so many bugs in software out there, denial is not just a river in Egypt.  So when you identify a problem AND call it that, they freak out on the negative vibes.
Some of us just like to fix problems, and you can't fix a problem until you recognize that there is one.
Comment: There's a sort of progression: "Gee I'm surprised by the behavior of, ..." "I see a bug in ... can someone help me get around it?" "XXX is the worst piece of flaming manure ever to download onto my hard drive." I thought the question was talking about earmarks of the third, not the second.
Comment: So? Posts on so.com that are 50% flame are still 50% flame, whatever the underlying facts. No one's insisting on whitewash here.
Comment: @Ros, I'm not really talking about flaming posts here, just ones that point out the problem, but also call it a problem, and would be considered a rant by the more pollyannish out there.
Comment: I may agree that there is a certain undue oversensitiveness to some ways of expression, especially when what is being communicated is considered to be of a criticizing nature. In some contexts the situation is more tight than usual.
Comment: @ Lance I caused you more trouble than one can possibly cause in a day ;)
Comment: @ash, yeh, that's the way it goes, I'm kind of a contrarian on here.  I have to deal with crappy companies and their bugs every day, and don't want to dress it all up.  I just like to fix problems, instead of sticking my head in the sand.


How to calculate the voltage drop of multiple sources

Question:
What is the reading voltmeter at:
A to B
A to C
A to D
What formula can be used to calculate this?
Comment: Homework.  Initial effort not demonstrated.
Comment: What have you done to try to understand this homework problem?  Just giving you the answer will defeat the purpose of the assignment.  We can help you along, but we are not here to just do all the work for you.
Answer: You calculate the voltage drops across the resistors caused by the 8 A current, as per Ohm's Law. Take proper note of the voltage's polarity: in a resistor the current flows from the higher voltage to the lower.
Then add all the voltages, again keeping the polarity in mind. Decide which probe is the negative, for instance the left one. Then going from left to right you add a voltage if you encounter the <code>-</code> first, like the 36 V source. Subtract voltages if you encounter the plus first, like the 4 V source.
Answer: Firstly, you have to decide what to about the internal resistance of the batteries: probably, you can pretend that they are perfect voltage sources and so have zero series resistance.
To determine the voltage at all the nodes, first pick some random number to be the voltage at point A. Since the choice of voltage doesn't matter, we might as well make it zero. So let us agree that A is at 0V.
Next, to determine the voltages at all nodes (component-to-component connection points) we place a marker on the left and the move this marker across the components from node to node, making a note of the voltage changes.
When we move the marker from A to B, the voltage drops because we are moving across a resistor, in the direction of the current ("flowing down the mountain, losing energy"). The voltage drops by 8 * 2 (V = IR). So at point B, we are at -16V relative to A = 0V.
Next, our marker crosses a battery. The battery is such that the crossing starts at the minus terminal (short bar) ending at the positive (long bar). This means we are climbing the voltage hill: we are picking up 36V.  So at point C, we are at  -16 + 36 = 20V.  (Remember, we agreed that batteries have no resistance and so the current doesn't factor in: we are assuming that a battery is just a pure voltage. This won't be true of a real  battery!)
In this manner, you can continue and determine the voltage at every node.
Once you know the voltage at every node, knowing the potential difference between any two nodes is trivial: just subtract the first point from the second. A to C is 20 volts (20 - 0 = 20), and so on.
Don't get tripped up by the second battery: it is in the opposite direction, so it gives us a voltage drop when we go left to right.
You can make a line graph where on the horizontal axis you mark the nodes: A, B, C ... and on the vertical you show the voltages. It will look a little bit like a mountain range.
Kirkhoff's Voltage Law says that if we trace these voltage differences around a complete circuit, when we return to the starting point, the voltage will agree: all of plus and minus voltage differences around the circuit cancel out, adding to zero. You don't have a complete circuit, so Kirkhoff's Voltage Law does not apply, but the process of tracing voltages will tell us the potential difference from A to D.
Gravitational potential works similarly. If you make round trip around a landscape, returning to the starting point, you have no net gain or loss in gravitational potential energy, regardless of the elevation gains and drops you encountered along the way. Gravitational and electric fields are conservative.
Answer: Assuming arrow direction of current flow comes "out" of positive side on left...
and assuming A to B means connecting + and - across A & B respectively...

A to B   Vab= 8A * 2.0ohm = +16V ( using above convention)
A to C   Vac= Vab - 36V = -20V
A to D   Vad= 8 * ( 2 + 1 + 1.5 )- 36V + 4V = 4V
{ Summing up all the resistor drops and battery voltages indicates there is an external 4Vdc not shown in the circuit connecting A & D in the opposite direction of the 4V bat. shown.}

If the person made the opposite assumptions to either convention, then you get a totally different answers which is why it is important to be consistent on this theoretical question. The reality of direction of physical direction of motion of free electrons in a conductor becomes irrelevant. It's just a standard notation for (analog) logic diagrams a.k.a. schematics and Theory of Operation descriptions.
Vad could incorrectly become ...
Vad= - 8 *( 2 + 1 + 1.5 ) -36V + 4V = -70V  .. if you forget this standard notation.


Will there be a LTS release of CiviCRM 4.6.x that supports PHP 7+

Question: If an organization is currently heavily invested into customizations built for CiviCRM 4.6 LTS, is it possible for them to continue using the LTS version of CiviCRM when PHP 5.6 EOL? (31 Dec 2018) and an upgrade to PHP 7+ is necessary?
Answer: This kind of question is hard to answer for an open source project like CiviCRM :-) There is no 'owner' of the product that can tell you this. Nor is there a group of paid developers that will be able to continue supporting this. Considering that I think it is an impossible question to answer, and the wrong one to ask at this point in time. It would have to be one of the considerations when starting with heavy customization.
Having said that, I have worked in closed source situations where this kind of thing was promised by sales manager but never materialised :-). "No we will continue to support this version as long as you want to use it" and then a year later "we really urge you to upgrade as we will no longer support this version".
As an individual and member of the CiviCRM community I would not be interested in keeping a 4.6 version alive in combination with PHP 7. It would probably mean changing the 4.6 to a new PHP 7 compliant subversion, and then keeping it alive. That would leave me hardly any space for making a living. But that is solely as an individual with none of the organizations I work with facing this problem. It is only my personal opinion, it does not mean it is not possible or will never happen.
If there is a large group interested in doing this however you might be able to fund it. Or find partners that are willing to take this on. So I would really urge others to answer your question too!
Comment: I have no idea :-). Personally I always explain to any organization that there are real downsided to customization. And this is one of them. They tend to ignore the warnings :-). I assume you have not paid any licenses for CivICRM? And did not complain about that?
Comment: Thanks for your comment. So if a developer made extensions for CiviCRM 4.6 LTS and PHP 5.6 while CiviCRM 4.7 and PHP7 were out, and advised clients to stay on 4.6 knowing the impending doom, do you think the customer should pay for the upgrades? Obviously, there are lots of financial models out there.
Answer: When PHP 5.6 reaches it end of life. It means basicly that no further updates are coming from the official php group. But it means you can still keep php 5.6 on your server it does not stop from working.
Comment: Yes it means there are no security updates. Unless the wider php community takes this role over from the php group. Which I dont think will happen. But the changes are more likely to happen than that a smaller comuunity as civicrm makes 4.6 compatible with php 7.
Comment: Correct me if I am wrong, but it also means there are no security updates?
Comment: All of the CiviCRM sites that I manage run with Drupal 7.x. While Drupal 7 core should be compatible with PHP 7.1 now, one has to check modules individually. And every Drupal site I manage has tons of modules. For me, at least, it makes the OP question moot; I'm going to have to keep running PHP 5.6 past EOL because it is way too much work to get Drupal 7 contrib modules working on PHP 7.1. Am I missing something?
Answer: Skvare was considering supporting 4.6 on php 7.  See this link


JMeter - Can I run multiple scenarios in 1 thread group with throughput controllers?

Question: We have 6 user scenarios that we are trying to test on our application concurrently. We are constantly tuning the percentage of threads going to each scenario and total number of threads. In order to make these changes quickly, I've put all the scenarios under 1 thread group and in that thread group I have 6 throughput controllers setup that that total up to 100% with 'per user' unchecked, each scenarios samplers (with thinktimes) are then inside these throughput controllers.
As far as I can tell, this is accomplishing the goal and I see the proper user distribution going through our system but I'm not sure if I should be breaking these out into 6 different thread groups instead. If so, how should I be controlling the percentage of threads going to each scenario?
Answer: Your solution is a good one. It will do what you expect.


Mobile applications built with .NET?

Question: Can we develop mobile applications using .NET? Which mobiles are supported? Are those applications supported on all mobiles, or any particular mobiles?
Answer: Consider writing a web application that exposes views/pages specifically designed for mobile clients.
You could write your application in ASP.NET webforms or MVC, and programatically detect which page/view to best serve to that client.
For some idea on how to make that application look, see Scott Hanselman's 2008 post on the Best Mobile Websites.
Recommended as well to listen to Scott's podcast on ASP.NET and the Mobile Web. They focus their discussion on the Mobile Device Browser File - definitions for individual mobile devices and browsers. At run time, ASP.NET uses the information in the request header to determine what type of device/browser has made the request.
Native apps
Currently, Windows Phone 7 can be developed with Silverlight/XAML with Visual Studio.
Answer: You should look at the .NET compact framework.  This will allow development of applications on a version of the .NET framework specialized for running on systems with limited resources.  Microsoft is also touting the new Windows 7 phone
You can also write for .NET using Mono on the Android operating system according to Will Google Android ever support .NET?
Answer: There are a number of families of phones that support development using .NET.
iOS
You can develop for iOS using MonoTouch. This allows you to crate apps using C# code that looks and smells like usual C# code. Under the covers the code get compiled into chunks of native code, rather into CLR.
Windows Mobile phones
There is a port of Windows.Forms for Windows Mobile. The interface is similar to desktop WinForms.
Windows Phone 7
WinPhone7 deevlopment is 100% managed C# code using either Silverlight(WPF) or XNA Studio(gaming).

Mobile applications built with .NET?


How to run JavaScript code with Crawljax

Question: I want to make my web site crawlable by Google's search indexer.
I'm using crawljax to automate an AJAX call and to give a snapshot of "static pages" for my website's dynamic pages.
The problem is that I haven't found a way to simulate running JavaScript code like firing triggers or calling a certain function on my site.
How can that be accomplished?
Answer: Look at writing Crawljax plugins here
To run javascript, you would call the executeJavaScript() function in EmbeddedBrowser class


capturing https traffic from a JAVA app server

Question: I am writing a java app server that connects to another third party server over HTTPS. I would like to capture the traffic between these two servers (which is over HTTPS). The third party server's private key is not accessible to us. They have provided us pfx file which our server is using while making a connection to that thrird party server. Any tool I can use? I have seen several posts regarding this, but not sure which way works. Any help would be appreciated. Thanks.
Answer: The whole point of SSL is that you cannot do this... Check Diffie Hellman on why, even if you have the keys, you will not be able to decrypt traffic.


When trying to run the make command I get the following error, I am working with M1 Machine for Mac

Question: xxxxxxx@xxxx-MacBook-Pro bitcoin % make -j 1
Making all in src
  CXX      bitcoind-bitcoind.o
clang: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
In file included from bitcoind.cpp:14:
In file included from ./interfaces/chain.h:8:
./optional.h:10:10: fatal error: 'boost/optional.hpp' file not found
#include <boost/optional.hpp>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [bitcoind-bitcoind.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Answer: It looks like the boost dependency may be missing or outdated. The build instructions for OS X in the Bitcoin repository suggest that boost should be installed via homebrew in the third step, "Install Required Dependencies". If you were missing that step, maybe try following the linked instructions from the top. If you followed every step of the instructions and still got this error, please file a bug report on the repository.


IAP Rejected because required binary was not submitted issue

Question: I have submitted an Unity(iphone) app with in-app purchase But my Binary is rejected.
I got the following message from apple:
"We have returned your in-app purchase products to you as the required binary was not submitted. When you are ready to submit the binary, please resubmit the in-app purchase products with the binary."
IAP work fine during testing on device. Submitted IAP has a screenshot and have been added to the submission before hitting the submit button.
I have shipped my build in android and working fine. In ios every thing is done expect IAP issue.I have changed productIdentifier many times but no success found.
Please help me find the solution.
Answer: I was having the same issue getting my IAP products approved. There is no clear way to resubmit them once they are rejected, there is also no way to submit a build with you IAP products.(This might be fixed in the future)
This is the way I was able to get them approved:
1- In iTunes connect go to: Features -> In-App purchases and open the product that you want to submit. For me the status was "Developer action required". Once you open it, make some changes to the Localizations section and save the the IAP product, this should change the status from "Developer action needed" to "Waiting for review". You can revert the changes you made. (This step was suggested to me by apple)
2- The second step is getting them to review the IAP subscriptions with the build you submit. Again there was no way for me to do so. So what I ended up doing is adding some notes to the "App Reviewer Information" section. Something like this:
Comment: hi , In my case I have uploaded the first IAP with the new binary of my app. It got rejected and the reason they gave me that my app does not do anything on click of "Get premium " button. But as my first IAP was under review how can I actually use it to complete the flow of the payment feature. Can I use the under review IAP in my app for development purpose?
Comment: I had multiple IAPs, Changing name of 1 IAP made all IAP status to `Waiting for Review`
Answer: I got the same issue. Actually in my case i added the new version of app.I forgot to uplaod the binary for the new version & submitted the In App purchase for review. So they sent my In app purchase product back.
I did not change my In app purchase product. did the minor changes in the description and saved it.
I just uploaded the binary for Test Flight.


Will I be able to return to football after a wrist fracture?

Question: During a sports activity I fell on an outstretched arm and felt instant pain, but not too severe. The next day I got x-rays which showed a torus fracture of the distal radius. I was put in a cast and still currently am and will be for 4 weeks. The doctor said it would be wise not to return to sports, but it is my last year before high school, and I really want to play. Is there any possibility I'll be able to return to sports?
Comment: It's also possible that the doctor just didn't want you to return to sports while in the cast. You need to ask him specifically next time you see him if/when you can return to sports, and if he says no, then why.
Comment: Doctors can sometimes be overly conservative. A sports medicine doctor may be able to better help you weigh your health vs your athletic goals.
Comment: See a sports doc after the cast comes off. Take it from there. Most of us aren't doctors, we can't diagnose you, and this isn't a medical forum.
Comment: The doctor's forecast might be better after these 4 weeks pass and he'll see how you are curing. Don't despair and spend your 4 weeks doing something you really like (choosing from what you doctor allows you).
Answer: You should never ask for medical advise in such an electronic medium, especially when you have already gotten an advise from a professional. Even if there are/were doctors or physiotherapists here, they would not (and should not) give any advise without having examined you in person.
You really should talk to a physio if you are serious about getting back on track with your training, and come up with a proper training plan. Keep in mind that early come-backs are among the most common reasons for serious injuries.
Answer: Serious injures have to be taken seriously specially when a professional told you this. I would like to encourage you to do a serious rehabilitation and after that re-evaluate the situation.
I understand your feeling as a quit from basketball a couple of years ago for a similar reason. It is frustrating when you really enjoy a specific sport and you have to quit, but your health is a priority.
Comment: Please don't give advice like "I would suggest to continue doing sports...", based on such scarce information. This may do much harm, even if you mean good.
Comment: @Steed Done ...


SharePoint 2010 & MySites & Remove 'Create Blog' link

Question: I have a SharePoint Server 2010 instance that has UPS setup and over 1000 end users using MySites. Is there a way to disable the 'Create Blog' link? Currently I have already deployed a custom master page, and what I'm looking is a solution that I could possibly resolve using CSS or a PowerShell script and I would like to avoid any server site code if possible.
Answer: If you want to avoid server side code, then CSS through your custom master page is the way to go.
I looked at the webpart that renders the Create Blog link. The Create Blog link will always be shown to the My Site owner until a Blog site is created. Your only options are to hide the webpart through CSS or remove the webpart by manually editing the page or using server side code.
For more information, see How can I disable the ability to create blogs in MySites?
Comment: See I thought the recommend and support apprach was to resolve this with a feature. I'll try it out and get back to you with an answer. Thanks again.


MKMapView returns bad userLocation

Question: I checked the box in iterface builder to show user location on map and it works fine. I want to zoom the mapView to User location with using the regions and user location, but users latitude and longitude are 0.000, and app is zooming to region with center 0 and 0. Why is this?
<code>CLLocation *location = [[[CLLocation alloc] initWithLatitude:mapView.userLocation.location.coordinate.latitude longitude:mapView.userLocation.location.coordinate.longitude] autorelease];
</code>
Answer: Use CoreLocation to get user location, and not the map.

MKMapView returns bad userLocation