Tuesday, September 20, 2016

relative pronouns - What does mean "both" in this sentence?



Ruby has two forms of multiple-selection constructs, both of which are called case expressions and both of which yield the value of the last expression evaluated.



what both refers to?




Answer



Consider the following sentences:




  1. Raj has two balls, both of which are red.




  2. Raj has two balls of equal size, both of which are red in colour.





There are two balls about which the sentence after comma describes.


So "both" in your sentence describes about the 'two forms'.


Here 'both' is used as a pronoun which refers two things together. In this case the two forms. And both always mentions two things and not multiple things or so.


rendering - Why do I see spaces between polygons in OpenGL, only on an Nvidia 720M?


I'm developing an OpenGL application that renders .obj 3D models. I use VBOs to render the polygons. Using the same code, the loaded models appear fine on all PCs, except on my Nvidia 720M.


My laptop sports an Intel HD 4000 embedded graphics GPU, and an Nvidia 720M. When I use the Intel GPU, it looks fine, but when I load it on the Nvidia 720M, spaces appear around polygons like so:


On Nvidia 720M GPU:


3D-rendered car, with gaps around polygons


On everything else:


3D-rendered car, with gaps around polygons


No other 3D application that runs on the Nvidia 720M GPU has the same issue. I am using the latest drivers.


Is this a problem with my application? How can I fix it?




Answer



Just a hunch... is your GPU somehow doing polygon antialiasing? That would cause such artifacts. For example, if two neighbouring polygons each cover a particular pixel for 50%, the total coverage (alpha) for that pixel would be 75%, not 100%.


Try forcing the option off:


glDisable(GL_POLYGON_SMOOTH);

Or even:


glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);

legal - Using a particular font in a commercial game


I'm working on a game I intend to sell, and I want to use this font. The license says:



"You may NOT copy or distribute the font outside of the licensed household, company, school or institution. Please ask external contacts who want to use the font to purchase their own license at www.CheapProFonts.com."




However, my plans are to use a tool to output a texture using this font to use as a bitmap font in my game. Does this mean I can do so, and sell my game with the font in it?



Answer



I'm speaking on behalf of CheapProFonts. ;) Obtaining a license for one of our fonts for inclusion in a software is easy and inexpensive: Just let us know that the font you purchase IS for that purpose, and then purchase two licenses for the font.


So for $20 you will be allowed to include the font in your game and distribute as many copies of that game as you want to. No limit. If you make a demo of the game (=another binary/program so to speak) you should also purchase a $20 license for that. And if you make a sequel, another license @ $20 for that. And so on. One double license per font per software. And a credit would be nice ;)


I hope you find our licensing scheme easy and affordable.


Kind regards


Roger


meaning in context - Parse "go all shaky on me"



Sally: Tech-49, enter at headway speed.


Jack: Entering at headway. You buck up, Bob. Don't go all shaky on me.


Sally: Jack, I can't help notice your respiration and heart rate have increased.



Jack: I'm just excited to finally meet you, Sally.


Sally: There's been a pattern of insubordinate behavior recently.


Jack: Yeah. I feel bad about that.


Sally: Voice analysis indicates you are lying to me, Jack. Tell me why you are here. You have five seconds.


--Oblivion(movie) 2013



I have googled this. The result shows it is not an idiom.


Does "go" mean "get" here?


Does "all" function as an intensifier modifying "shaky"?


Does "on" mean "in the direction of" here?



More context:


Bob is the toy placed on the dashboard in the aircraft. When Jack flies the aircraft, Bob will get shaky because of the unsteady movement of the aircraft.


Sally is the evil alien space station orbiting the earth.


enter image description here



Answer



The idiom is "don't go all [noun/adjective] on me". It's an expression of dismay at the other person's behaviour - or, more precisely, the future behaviour that the speaker thinks might occur if they don't prevent it.


For example:



Is there anything about your house that, you know, kind of...freaks you out?


I just decided that for me, it's our dishwasher. It sings.



Now, don't go all Nancy Drew on me and decide to investigate this the next time you are at my house, because I'm pretty much positive that it will NOT sing when you want it to.



By "don't go all Nancy Drew on me", the writer means, "please don't actually investigate this". They thought that the reader might, after the previous paragraph, decide to investigate the dishwasher, and said "don't go all Nancy Drew on me" to mean:



  • if you do this, you'll be behaving like Nancy Drew (this is probably irony and/or exaggeration) and

  • I don't want you to do this


Another example:



She sighed, exhaling fifty years of dusty excuses that were a bit feeble even when she made them up. She picked up her knitting and started clicking the needles ferociously. 'I didn't go abroad again because there wasn't any point. Spain had been a silly teenage adventure. I accomplished nothing. Got my fingers well and truly burned. So I learned from my mistakes and stayed here.'



'But what did you accomplish by not going away again?'


'I made a life here. Are you saying that teaching accomplishes nothing?'


'Don't go all defensive on me, Mum. I'm trying to understand you. You were a brilliant teacher. Everybody says so.'



In this instance the daughter says, "Don't go all defensive on me" because



  • she thinks her mother is starting to become defensive from the line of questioning

  • she thinks her mother will become more defensive, or at least continue to be defensive

  • she doesn't want her mother to be so defensive



Usage


I wrote [noun/adjective] at the top, but the truth is this is usually used with an adjective.


e.g.



  • Don't go all broody on me

  • Don't go all paranoid on me

  • Don't go all melodramatic on me

  • Don't go all dreamy on me

  • Don't go all geeky on me



Because the phrase as a whole is describing a type of behaviour, it can only be used with a noun when there's a certain type of behaviour associated with that noun. This could be a famous person (fictional or not) who is well-known for having a certain type of behaviour, or a stereotype of a certain type of person.


e.g.



Some of these will not have a clear meaning from the sentence alone. The Boy Scout one is an obvious example of this - there are certain traits that could be inferred (for example over-preparedness) but you would need context to know for sure which trait was being criticized.


Your example


In your example, "Don't go all shaky on me" means,



  • Jack is concerned Bob may physically shake.

  • He doesn't want him to.



Bob may have started shaking, and Jack wants him to stop, or perhaps Bob hasn't started shaking yet, but Jack thinks that he will.


Since Bob is a toy, this is probably a sort of hope/prayer that's being spoken to Bob but not really directed at him - Jack is either talking to the machine as a whole, or hoping his own piloting will be steady enough that Bob doesn't shake.


What does "drink like a professional" mean in this context?


Scott Fitzgerald




always drank like a professional, collapsing the arc from charming to churlish early on.



This sentence is from a review by P. Green of ’Z: A Novel of Zelda Fitzgerald’ in The NY Times.


Does it mean he drank a lot and alcohol turned him "from charming to churlish"? I am not sure.


And how to understand “early on” here?



Answer



I think you have answered it yourself. It sounds correct to me. I think it means he drinks a lot and shortly after beginning to drink reaches from a good mood (after drinking a little!) to a bad mood (after continuing to drink), from feeling charming to become rough and violent.


Early on means "hortly after the beginning."


word choice - I see a bus come


If you are at a bus stop, and see a bus coming, which version would you say, 1 or 2?




  1. I see a bus come.

  2. I see a bus coming.




If it is #2, then what does #1 mean exactly?



Answer




I see a bus come.


I see a bus coming.



When you say I see a bus come, it means the bus has already come, and now stopped at the stand. When you say I see a bus coming, it means the bus is on its way to the stop, progressing.








  1. We saw Kim leave the bank.




  2. We saw Kim leaving the bank.





Slight as it is, there is a difference in meaning between those sentences.



In sentence #1, we saw the whole event of Kim's leaving the bank, while in sentence #2, we saw a segment of it. Sentence #2 has a progressive meaning in it. The contrast is same as that between Kim left the bank and Kim was leaving the bank.


From - CGEL page no. 1237


Some other example sentences might be helpful -





  1. I saw him play.




  2. I saw him playing.






In sentence #3, it is meant that I saw his playing throughout the match, while in sentence #2, it meant that I saw his playing for sometime during the match. Something like that.


Monday, September 19, 2016

grammar - "learn to" vs "learn how to" and "teach to" or "teach how to"


Which sounds better:



  • learn to or learn how to?

  • teach to or teach how to?



I'll make the question clearer with examples.




a. He taught me to solve sums.
b. He taught me how to solve sums.




c. I learned to drive a car.
d. I learned how to drive a car.



Answer




He taught me how to solve sums.




I would use this when discussing how a certain individual taught me how to add:



My favorite teacher was Mr. Olson in third grade. He taught me how to solve sums.






He taught me to solve sums.



I would use this when telling how a certain individual taught me when to add. I probably wouldn't use that sentence as a standalone sentence, but I might say something like:




My dad taught me how to keep my checkbook balanced. He taught me to solve sums on payday, and then to solve subtraction problems for the following two weeks.






I learned to drive a car.
I learned how to drive a car.



I would interpret these two as pretty much meaning the same thing, because the phrase learning to drive usually means "learning how to drive a car." However, the inclusion or exclusion of how can create a subtle shift in meaning, similar to the one I explained when talking about sums. Consider:




I learned to drive toward the middle of the fairway.
I learned how to drive toward the middle of the fairway.



The second sentence probably means I had a golf instructor teach me how to hit straight shot with my driver off the golf tee:



I used to hook my drives all the times, but then I started taking lessons. After a while, I learned how to drive toward the middle of the fairway.



In contrast, the first sentence might be used in the context of what experience has taught me:



Last summer, I would try to be sneaky on this hole and drive to the left, to get a shorter approach shot. But there are just too many bunkers over there. After about the third or fourth time I took a bogie from the sand, I learned to drive toward the middle of the fairway.




Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...