When adapting a movie into a comic, what are the things you need to take into consideration?

Question: I've heard that you need to rewrite the story of a movie if you want to adapt it into a comic, because the medium and format is completely different. However, I am not sure what are the considerations that need to be taken into account to adapt from one media to another. For one thing, a comic is much shorter, but is there all there is to it? Does simply writing a simpler and shorter story is the only thing you need to do or is there more to it?
Comment: is your equation 1 movie = 1 comic issue? In my experience in the comic world it is considered a plus to have a story arc span multiple issues.
Comment: **Understanding Comics** by Scott McCloud is the best deconstruction of the language of comics..., and it's a comic.
Comment: The "simpler and shorter story" description is is needlessly condescending. The **X-Men Dark Phoenix Saga** has been adapted into at least 2 movies and several animated TV series arcs, and has suffered each time from being (arguably) "simpler and shorter" to fit the constraints of the medium.
Comment: That's what I thought, but I might be wrong, so maybe you can help me understand the differences in the mediums so that I can write a story or adapt a story into a comics.
Comment: @Sayaman, I already gave you the title of the best book about the medium of comics. It's called **Understanding Comics** by Scott McCloud. Comics are **not** just movie plots as a storyboard.
Answer: Actually, comics and film or television lend themselves really well to cross-adaptation as the 20 plus years of successful Superhero films no doubt show.  The two benefit from the fact that for that most films (and some television shows) are first go through a storyboarding process to visually describe the scene to the people who have to visually render it.  Though not every work will get this treatment, for heavy special effects films and animation, it's an almost crucial first step as the director needs to be able to visually show the actors, stunt men, cameramen, animators, and the critical "Best Boy" (I don't know what that job entails, but I always notice it in the credits and it's a pretty high billed credit to boot) all what they have to do to achieve the scene.
These storyboards allow for the easy translation of the film to comics as storyboards tend to have the same quality as comics... they're a bunch of pictures with the character's movements detailed so that the cast and crew can properly block on set (Blocking being the stage term for posing and positioning of actors and set pieces).  Depending on when in pre-production a cast is solidified, the storyboards might take on a characters nature of the actors hired to play the role but if not, the character will often look very close (especially true in animation where the actor's work is done with a lot of lead time to the animation.  Many big budget animation studios will make characters look like the actors (Disney has a history of this) and many lead character animators will watch the voice actor deliver the lines and tend to draw based on this input... a voice actor with live acting experience will tend to emote in the sound booth and be very physically animated while recording).
As discussed, many Superhero films work because they are predominately comic book in nature.  The film adaptation of Alan Moore's Graphic Novel "Watchmen" was almost beat for beat rendered into live action for the film adaptation (The ending being the most glaring part that wasn't, given that it was drastically changed).  Several other famous superhero films will attempt to render famous comic panels in scenes (there are numerous live action and animated takes on Superman that try to mimic the cover of Action Comics #1 and Spider-man: Homecoming did a fairly accurate adaptation of "Amazing Spider-Man no. 33" having Tom Holland's Spider-man lift a staggering amount of debris.  In both cases, the panel or panels had little connection to the film's plot or source plot.  Superman lifting the classic green car overhead, engine oriented towards the ground, is normally the culmination of a scene set up to homage the cover.   In Spider-Man: Homecoming, the plot has little in common with Amazing Spider-Man.  In fact, the villain in the original story is Doctor Octopus, not Vulture, though the emotional and physical weight of the scene is captured (in case you're wondering why the storyline wasn't adapted, that's because it already had been... Spider-man 2 was largely an adaptation of the arc that Amazing Spider-man no. 33 culminates... it's iconic Subway Train fight sequence serving the same purpose as the lifting weight scene.).
Other films borrow from Comics a lot more. "Spider-man: Into the Spider-Verse" takes a lot of visual cues from the comics, with a lot of scenes and transitions looking like they animated a comic book page.  Miles' "loud thoughts" are rendered in yellow boxes, a popular device for showing character's internal thoughts in a comic book (previously, it was the narrator's box, though a non-personified narrator in comics is rare in the modern era... and even then, it's normally revealed to be Uatu the Watcher if Marvel or a similar power if DC).  They even refer to the web-shooter's iconic onomatopoetic sound of "Thwip".  Not only does Peter B. Parker breakdown web-swinging as "Thwip-Swing" when training Miles, but little "thwips" also appear when webs are shot during the sequence.
Watchman, as mentioned before, looks like a movie version of it's comic and certain parts (namely the "Times They Are A'Changin'" introduction sequence, which visually provides a lot of the supplemental material that was portrayed differently in the Graphic Novel and is done in mostly slow motion live action which looks like a motion comic (a voice acted retelling of a comic, using the original art with some slight movement but not fully animated)).
And of course there's Ang Lee's Hulk, which used a lot of unusual scene transitions to create a comic panel like effect.  Having actually seen the comic adaptation, it helps lay out the scenes.  However' it's still Ang Lee's Hulk.
As for how to break up the issue, most comic stories are not contained to one issue but rather an arch that would last for 2-6 issues dealing with one storyline and will be collected into a single trade paperback that will be released at the arch's conclusion, although there are no hard and fast rules (2 issue stories tend to be "filler" or comic relief fluff used to pad out a trade paperback when it's main storyline falls short).  Some miniseries, like DC's 52 run for much longer (52, having, well, 52 issues... specifically, the series was doing a comic book version of "24" where the entire storyline followed a year in "Real Time" as a new issue was released once a week for 52 weeks.
For a film, one could probably structure the release in either a 3 issue series, each issue following one act of the film (assuming a 3 act structure), or a six issue series following 1/2 of an act each.


Why did we define the concept of continuity originally, and why it is defined the way it is?

Question: The concept of continuity is a very important idea in topology. Though I am using it all the time, but indeed I don't know what is the original purpose for us to define this concept. And I also don't understand why we define the continuity in topology as if $V$ is an open set in $Y$, $f^{-1}(V)$ is an open set in $X$
Comment: The root of the matter is this: if $f:X\to Y$ is continuous and has a continuous inverse, then $X,Y$ has the exact same topological properties. Hence, continuity is the 'property of choice' when dealing with topological spaces.
Comment: It took a lot of tinkering to get the definitions right in topology. The definition of continuity needs to be general enough to apply to all topological space, but must reduce to our $\epsilon -\delta$ definition in the case of familiar spaces. It turns out that the definition in terms of open sets is exactly what's needed.
Comment: Another equivalent definition: For sufficiently nice topological spaces, a function is continuous iff $f(x_n) \to f(x)$ whenever $x_n \to x$. For topological spaces in general, replace the notion of sequence by the more general notion of [net](http://en.wikipedia.org/wiki/Net_(mathematics)).
Comment: @IBWiglin I feel like one of the definitions of continuity at a point in terms of neighborhoods of the input and output point is the natural analogue of the $\varepsilon$-$\delta$ definition. And then you can prove that this preimage of open sets business is a nice simple condition equivalent to "continuous at every point".
Comment: @MarkS. The $\epsilon-\delta$ definition is very natural, but in a general topological space we have no way of measuring distances between points so we need something more general.
Comment: @IBWiglin Let me be precise: I feel like definitions similar to "$f$ is said to be 'continuous at $p$' if for every neighborhood $N$ of $f(p)$ there is a neighborhood $M$ of $p$ such that the image of $M$ is a subset of $N$." (which makes sense for any pair of topological spaces) are the natural analogue of the $\varepsilon$-$\delta$ definition for metric spaces. Then separately, you can prove that the function is continuous at every point if and only if the preimage of every open set is open.
Answer: Continuity has a history before topology. Ask yourself how to define a continuous function $\mathbb R \to \mathbb R$ - maybe one that you can draw the graph of without taking your pencil off the paper.
What makes it continuous? Well one candidate was the intermediate value property. Then people discovered pathological functions like $\sin \frac 1x$ near $x=0$ - or for a function which takes all real values in any interval (and in consequence has the intermediate value property) but is nowhere continuous try the extraordinary Conway base 13 function.
Then, in the metric context, epsilon-delta definitions were developed. But the thing about drawing the curve with a pencil got lost, because most continuous functions $\mathbb R \to \mathbb R$  have no defined arc length. Differentiable and smooth functions took over, since they were the ones people dealt with most often.
If you want to see another challenge to the formalisation of mathematics in this way, research the history of the Jordan Curve Theorem.
The idea of continuity developed into topology - the development of the two is intimately linked - one way of thinking about topology is to formalise it as what you get when continuity is the most significant concept you have. Now that is overstating it a bit, because most topological objects of interest have rather more structure than that. But that, to my way of thinking, is why topology and continuity go together.
As for why continuity is defined as it is ... Topology deals with open sets. Continuity is concerned with functions. It just happens that the "inverse image of an open set under a function is open" coincides with the best intuitions we had of continuity before we abstracted it from a metric context.
Comment: @BabyDragon I wasn't suggesting you could define a continuous function in such a way - but it is a first natural way to think of a "function without holes or gaps in it". Of course when you have a domain which is not connected you can create all kinds of mayhem.
Comment: I didn't think that you were (you did use the word "maybe"). However, I felt I had to address this issue, since this is a common misconception among calculus students. Furthermore, this misconception is often perpetuated by instructors.
Comment: The idea that "a function that can be drawn without picking up your pencil is continuous" is not quite right. For instance, the function $$f(x)=\frac{x}{|x|}$$ is indeed a continuous function from $\mathbb{R}-\{0\}\to\mathbb{R}$ is indeed continuous. However, if you extend this function so that it has a value at zero, then the new function cannot be continuous. If however, we assume the the domain is connected, then the graph will be connected, so the initial intuition is OK so long as the domain is connected.
Comment: In fact, the "pick up the pencil" definition was the original concept, and it seems clear that early 19th-Century mathematicians such as Fourier and Cauchy would have considered $f(x) = \frac{x}{|x|}$ to be a continuous function if it were completed at 0. It was not until later that this was rejected.
Comment: I *think* it may also be related to the fact that the distinction was not fully made between the function itself and its graph. One might expect (in 1820) that continuity would be unaffected by isometric transformations of the plane. But in the modern formulation, the graph of a continuous function, rotated, may fail to be the graph of a continuous function.
Comment: @MJD I suppose that this has to do with the fact that we have (and they had ) a Fourier series that behaved correctly for non-zero values (leaving aside the bit that the Fourier series actually converges to a periodized version of $\frac{x}{|x|}$.
Comment: @BabyDragon: The answer is perfectly correct. x/|x| is **not** a continuous function from R to R, so there's nothing wrong with the answer.
Comment: The comment above concerning Cauchy is erroneous. See my answer.
Answer: The two main reasons we defined continuity, in my humble opinion, are as follows:

Continuity makes functions tame. Try to prove a proposition about arbitrary functions between topological spaces. You won't be able to get anywhere. Most topological spaces we deal with are so large that functions between them can behave in wild ways. If you don't forced them to respect some kind of structure coming from the topology, you won't be able to prove anything about them. If you force functions to ``respect topology'' by being continuous, then you'll get theorems such as: Compact sets map to compact sets under continuous maps.
In metric spaces continuity allows you to approximate. The standard $\epsilon\delta$-defintion of continuity allows you to approximate the value of a continuous function. It says: "If you give me a continuous function, a base point, and an error term, then I'll give you a range around your base point where your function is close to the value it takes at your base point." Approximation is good enough for most purposes, and it allows you to talk about limits.

One way to rationalize the choice of definition of continuity in arbitrary topological spaces is that the definition we've chosen specializes to the $\epsilon\delta$-definition in metric spaces. There are some deeper reasons, but I think that that is a good place to start.
Answer: The idea of a point of closure expresses when a point is "close" to a set. And here I'm using "close" more loosely than in just a metric space distance.
The idea of continuous maps is that they preserve points of closure. What I mean by that is that the image of a limit point is a point of closure of the image. So, continuous points don't "tear" points away from the sets they're close to.
Go ahead and check that the inverse image definition of continuity is equivalent to "the function preserves all points of closure."
Answer: Continuity was originally identified as an important property of functions of real variables, long before the invention of topology.  For example, the intermediate value theorem says that a function $f$ attains every value in an interval $[f(a), f(b)]$—but only if $f$ is continuous on $[a,b]$.  An important application of this is finding roots of equations that are too hard to solve symbolically.  If $f(a) < 0$ and $f(b) > 0$ we know there must be a root in $(a,b)$, and we can find it by subdividing the interval—but only if $f$ is continuous on $(a,b)$.
Similarly, as pgadey says elsewhere, continuous functions are those that can be approximated, which is crucial for obtaining approximate numerical solutions to problems of physics and engineering.
Analysis was originally developed in order to study convergence and approximation properties of functions and sequences, questions like "which functions can be approximated by power series?" and "will my Fourier series sum to the correct function?"
Topology is an abstraction of ideas of continuity and convergence that already existed in analysis, created to study these ideas more carefully and in different settings.  General open sets are an abstraction of the properties of open intervals on the real line.  On the line, two sets are considered "distant" if they are contained within disjoint open intervals. In topology we replace this notion of distance with one involving open sets.  On the real line a function is continuous if it takes points that are "close together" in the domain to points that are "close together" in the codomain; points "far apart" in the codomain must be images of points "far apart" in the domain.  Topology reformulates the notion of closeness in terms of open sets: points that were in disjoint open sets ("sufficiently far apart") in the codomain must be in disjoint open sets ("sufficiently far apart") in the domain.
Continuity is important in topology because it was already important in solving numerical problems in physics and engineering, and for this reason topology was invented to better understand continuity.
Answer: Besides the excellent answers already here, there's another way I think about it.
Given a topological space $(X, \mathcal T)$, there are actually two collections of subsets of $X$ which are important. Clearly $\mathcal T$ is such a collection, but so is the collection of closed sets.
The notation $(X,\mathcal T)$ is somewhat unfortunate, as it brushes the closed sets under the rug or off to the side even though they deserve equal footing with the open sets.
Now given two topological spaces $(X, \mathcal T_X)$ and $(Y,\mathcal T_Y)$, what functions $f:X\rightarrow Y$ should we consider to be the 'most important' or 'most fundamental'? I believe it should be those functions which preserve both the collection of open sets and the collection of closed sets.
It's tempting to consider open maps to be the most fundamental, but open maps need not send closed sets to closed sets. Dually, closed maps do not have to send open sets to open sets.
If we are putting closed sets on equal footing with open ones, another thing which hints that considering forward images is 'incorrect' is that intersections (the operation most important to closed sets) need not commute with forward images. But preimages do.
In fact, preimages commute with unions (the operation most important to open sets) and complements (the most important operation connecting open sets with closed sets) in addition. These observations hint that the 'most natural' morphism between topological spaces are the continuous ones instead of the open or closed (or open+closed) ones.
And comparing this definition with the more 'concrete' examples of topological spaces (such as metric spaces), we arrive at morphisms that we considered to be the most important in those contexts.
Answer: When a concept is defined, there are endless interpretations of that concept, some of them are extremely useful when working on Physics problems, but others are better when working on Geometry... The core of Topology resides in the concept of limit point of a set, by means of a empirical process of generalization we reach the nowadays well-know definition of topology. You should think of a continuous function to be one which trasform limit points of a set into limit points of the image of that set, this is the fact which tries the concept of continuity materialize...
Answer: The concept of continuity in topological space is crucial because of that if there exist a continuous function with the continuous inverse between two topological spaces, than in topological point of view they are identical.
The main concept in topological space (which help us define that space) is the open set. Than dealing with 'equivalences' in terms of topology must be transmitted with open sets.
Comment: I think this is exactly backwards. Continuity was discovered in the context of real-valued functions, and topology was invented to study continuity because continuity had already been identified as being important.
Answer: Continuity was introduced by Cauchy in 1821 in his famous textbook Cours d'Analyse. Here a function $f$ is continuous in a range if for all $x$ in the range, if $\alpha$ is infinitesimal then $f(x+\alpha)-f(x)$ is necessarily infinitesimal as well. This can be paraphrased in terms of real numbers alone (and was so paraphrased by Weierstrass and others 50 years later) but the resulting epsilon, delta definition does not fit as well with our intuitive perceptual notion of continuity as does Cauchy's original definition. The reformulation in terms of topologies is even further removed but is technically convenient. Of course Cauchy knew that $\frac{|x|}{x}$ is discontinuous though I am not sure about Fourier.
Answer: I think the answer is simple: continuity is a natural thing (maybe the natural thing) to study when the spaces you're dealing with all have well-defined open sets.
More than being the study of open sets, topology really is the study of continuous functions between spaces in the most general possible way. A set with a topology is the most general environment in which the concept of continuity can be discussed.


How much is a "grain of time" in Death's End?

Question: In Cixin Liu's novel Death's End, an alien creature that goes by the name Singer measures time in "grains of sand". How much is this unit in human time?
Answer: Excerpt from Death's End:

Nine time grains after the first three communications, another record appeared: The Star-Pluckers plucked their star again to send out another broadcast ... a set of coordinates!

The "first three communications" refers to the first message sent from Earth to the Trisolarans, the warning response, and the response to that message that doomed Earth.  The message that came "nine time grains" later was the spell Luo Ji put on 187J3X1.
Ye Wenjie sent the first message in autumn of 1971.
The pacifist Trisolaran sent a warning response immediately upon receiving the message in early 1976.
Ye Wenjie responded immediately to that response in 1980.
Luo Ji cast his spell in Year 8 of the Crisis Era.  The Crisis Era began somewhere in the 2010's according to the table of eras at the beginning of Death's End.  If we split the difference and say the Crisis Era began in 2015, Luo Ji cast his spell in 2023.
The span of time between Luo Ji's spell and Ye Wenjie's last message to the Trisolarans is 43 years.  43 years divided by 9 grains gives an answer of 4.78 years per grain.
Answer: There are two answers to this. First one is fairly simple: the last message sent by Ye Wenjie was sent in 1980 and Luo Ji broadcasted his spell in year 8 of the Crisis Era, and the Crisis Era started somewhere in the 2010s. So to arrive to year 2272 (that's when Gravity/Blue Space broadcasted the location of Trisolaris) it means that the time Luo Ji broadcasted his curse was around mid-2019. This means that one grain is 4,344 years. (60 x 4,344 + 2011,5 = 2272). This also means that the Crisis Era started in mid-2011.

  The second one is pure sci-fi/spe-fi. As we later learn the universe has been shrinking down in dimensions and the universal laws of physics won't apply as we know them since there are so many mini-universes and highly advanced civilizations use things like 2-dimensional "letters" as weapons. So all that being said, we can't really be sure about how long it took for the gravitational waves, radio waves, or light itself to travel to certain places. So from Singer's perspective "a grain of sand" could be a fluctuating way of measuring the time given the different parameters or it could be stable resulting in errors. We will never know but I would like to believe that the most advanced civilizations took these changing parameters into account when deciding if or how to destroy entire solar systems.
Comment: Hey, welcome back!  Thanks for coming back and fixing up the math.
Comment: Hey person! No problem and thanks for the edits!


Resource files are not not publishing in ipfs name publish

Question: I made sample dapp application for interacting with smart contract and i developed a basic ui when i am publishing it to ipfs like i did seeing a tutorial and ipfs documentation, i can get only index.html file and supporting scripts and css files are throwing error file not found. can any pls help me out in this issue.
Comment: Hi there. What did you see in the tutorial, and exactly what commands have you tried? What is the error being output?
Comment: i used ipfs add -r  command and took my directory hash and published on the browser url. I am getting net::ERR_ABORTED 404 for all my files in chrome console.
Answer: Most probably you're linking to the resources the wrong way. Make sure you're referring to your resources with relative URLs, so instead of doing  (absolute link) you do  (relative link).
This is because a IPFS website could be loaded in many contexts. Linking to ./my-script.js would work correctly at all times while absolute would work in some but not all.
Some examples:
Development context, you load http://localhost:3000, /my-script.js (absolute) works alright because your website root is localhost:3000.
Gateway context, you load http://ipfs.io/ipfs/$yourHash, now /my-script.js would not work, as then it tries to load from http://ipfs.io/my-script.js instead of http://ipfs.io/ipfs/$yourHash/my-script.js. Relative link fixes that.
Dnslink context, you load http://example.com, again /my-script.js would work correctly, because your website root is example.com.
So verify your resource links are actually relative. If they already are, please post your code so we can look into it further.


If there was perfect play from both sides, will it be draw or win for one?

Question: If there was perfect play from both the colors, will white win because of the first move advantage or will it be a draw?
Comment: alternately it could be that black would win because white would make the first mistake.  ;-)  either way, a forced win would certainly be bad for chess as no really good players would likely be willing to play as the losing side.
Answer: Most Grandmasters will argue that chess is a draw with perfect play from both sides. However, in practice it is shown that white has higher win rates than black, but this is due to the first-move advantage. This is because white technically gains a small advantage from having the first move, and black will equalize with their move.
It is possible that a first-move could cause a disadvantage with perfect play, because despite having perfect information, the black player could potentially be able to counter any strategy white attempts to play. It is more likely however that if one side were to have a forced win, it would be for white.
The answer to this question will not be known for a long time because only in 2012 were endgame tablebases able to solve any position with 7 pieces perfectly (including the 2 kings). For comparison of how impressive this feat is, 6 pieces was only solved in 2005. Obviously, this problem is exponential because with more and more pieces, the complexity increases further and further, until eventually the game is solved for 32 pieces. One could argue that the starting position is static so we don't have to consider every combination of 32 pieces on the 64 squares, but the number of possibilities is still enormous and will take a long time to know for certain.
Comment: Ref the last paragraph, we will never have 32-pieces tablebases and this is not just a question of computing time: one of the physical limits is that the number of positions to consider would exceed the number of atoms in the universe...
Answer: Almost all experts during the last 150 years share the opinion that the game should be a draw with perfect play (link):

The view that a game of chess should end in a draw given best play prevails.
Answer: We have not mathematically solved perfect play in chess yet. However, chess computers represent our best understanding of nearly perfect play, and about equal strength engines overwhelmingly make draws from the starting position. Usually the only way to get a decisive game is to force computers to start from a risky or unbalanced opening, so computer tournament organizers use opening books to test interesting positions.
Answer: Of course, with best play, it is a draw.
However for a humourous contrary view, Jonathan Rowson, in his book "Chess for Zebra", quotes English GM Jon Speelman:

The initial position is a decisive reciprocal zugzwang and white is
  losing ;-)
Answer: It is the Zermelo's theorem from game theory, which says that a finite 2 person game always has a solution (draw or a winning strategy for black or white).
Zermelo's theorem (game theory)
Comment: Op is asking which one it is.
Comment: My bad, I wanted to precise top answer... Thanks for report.


Is the iPhone 6 model A1549 (CDMA) compatible with T-Mobile?

Question: According to this site, there are three models of iPhone 6: A1549(GSM), A1549(CDMA), and A1586. It says the A1549(CDMA) model "supports all the same spectrum" as its GSM counterpart, but also supports additional spectrum making it a "world phone". Does this mean the unlocked T-Mobile iPhone 6 is essentially the Verizon model with its CDMA capabilities disabled? Could one go to an Apple Store, pay for a Verizon iPhone 6 in full, and pop in a T-Mobile SIM with no side effects?
Answer:
The GSM side of Verizon phones are unlocked and will work on domestic
  carriers but there is no guarantee all features will work. It is not
  the same for Sprint, the GSM side of that phone is unlocked and
  unlocking it will only allow it to work with non-domestic GSM
  carriers.

A1549 (CDMA):

This is considered as the world phone version. It supports all the
  same spectrum frequencies as the A1549 (GSM) and also includes CDMA
  EV-DO Rev. A and Rev. B (with 800, 1700/2100, 1900 and 2100 MHz
  bands). Besides, it works on UMTS/HSPA+/DC-HSDPA (850, 900, 1700/2100,
  1900, 2100 MHz), GSM/EDGE (850, 900, 1800, 1900 MHz) and 4G LTE bands
  include bands 1, 2, 3, 4, 5, 7, 8, 13, 17, 18, 19, 20, 25, 26, 28, 29.
  The model is compatible with Verizon and Cricket in the US. However,
  if you buy an unlocked Verizon phone, you will be able to use it on
  any other GSM networks like T-Mobile and AT&T as well.

Best is to double check with T-Mobile.
Answer: Apple published detailed pages about both iPad LTE Support and iPhone LTE Support. These pages have a breakdown on device model versus carrier coverage for current (iPhone 6 and 6 Plus, iPad Air 2 and iPad Mini 3) and old devices.
From this table you can see carrier support per device number.
Group 1 (USA):

iPhone 6 Model A1549 (GSM) and Model A1549 (CDMA)
iPhone 6 Plus Model A1522 (GSM) and Model A1522 (CDMA)
Aio, Alaska Communications, AT&T, Consumer Cellular, Cricket, Family
  Mobile, GCI, Net 10, Straight Talk, T-Mobile, Union Wireless, Verizon

Group 2 (USA):

iPhone 6 Model A1586 (GSM) and  Model A1586 (CDMA)
iPhone 6 Plus Model A1524 (GSM) and Model A1524 (CDMA)
Appalachian Wireless, Bluegrass
  Cellular, C Spire, Cellcom, Chariton Valley, Chat Mobility, Defense
  Mobile, MobileNation, Nex-Tech, NorthwestCell, nTelos, Pioneer
  Cellular, Sprint, STRATA Networks, Syringa, Thumb Cellular, United
  Wireless, US Cellular

I find awkward that iPhone 6 on the second group has the same list of LTE bands as the iPad Air 2 listing, but the list of international carriers is shorter. This can be caused by either iPad LTE page being more up to date, or because this is actually dependent on carrier configuration and contracts with Apple.
Answer: You only run into trouble if you wanna activate your iPhone with Sprint or any of their MVNOs and don't have a Sprint-compatible iPhone, otherwise you're fine. Well, most of the time. Verizon and its MVNOs are CDMA carriers. AT&T, T-Mobile and their respective MVNOs are GSM carriers. The odd ball is Sprint in only this aspect: their phones don't work interchangeably with Verizon, even though they both use CDMA cellular technology. And up to at least the iPhone 5s (and maybe even the 6 and 6s) their iPhones don't work either with U.S. GSM carriers either, even though they DO have the GSM bands. I heard that the GSM part of the phone ONLY works internationally (in a foreign country) if Sprint unlocks the GSM part of the phone "at their discretion."
Answer: I got too carried away with complaining about the 5s and older models about their lack of compatibility/exchangeability between carriers.
Ok, as far as I know when it comes to the 6, if you buy a Verizon phone (or some other phone for that matter) these days it will work with both Verizon and any GSM carrier worldwide. This is due that Verizon phones have come with GSM cellular bands too on all their phones for about since LTE appeared. And, more importantly, those bands are unlocked, meaning that they can be used with any carrier worldwide. This is due to Verizon coming into an agreement with the FCC to have their phones unlocked in exchange for spectrum in LTE bands, or something like that. I wish that the FCC would had done the same with Sprint. So, yes, a Verizon iPhone 6 will work with T-mobile and any other GSM carrier worldwide that accepts bring-your-own-phone. These days pretty much all carriers worldwide accept bring-you-own-phone.
Finally, an unlocked T-mobile iPhone 6 does not have CDMA bands at all. It only has GSM bands, since T-mobile uses only GSM cellular frequencies. So, it will not work with CDMA carriers like Verizon and Sprint,
Verizon iPhones are the best choice since the 5 because they can be used with the most carriers in the U.S. I have a truly factory-unlocked 6, model 1586 (notice, not a Verizon). It's supposed to work with ANY carrier worldwide. But I haven't made sure if it will work with the odd balls of Verizon and Sprint. It does have both GSM and CDMA bands. I currently have it on AT&T.


Can optical fiber communication be used to transmit analog signals?

Question: I am confused because I read the LEDs/LASERS used in optical fiber have finite levels.  If for instance ASK is used to transmit digital baseband data then will the LED or LASER be able follow the ASK continuously and will detection be possible?
Comment: You've never seen an LED get brighter and dimmer before?
Comment: What exactly do you mean by "analog signals"?
Comment: I have but just seeing is different from transmitting with ability to detect and then regenerate the amplitude requires precision and the what I am asking is it practically done.
Comment: No, it's not different.
Comment: There is a great optics demo for school children that uses a HeNe laser and a photodiode to send audio to a speaker across the room by modulating the laser power. Audio quality is very high, similar to a wire.
Answer: LEDs can certainly be run at any light output level, and that level controlled very quickly to modulate it. However, the problem, like with any analogue system, is gain, noise and linearity. Optical systems are non-linear, and have uncertain gain in the extreme.
LEDs are somewhat non-linear in current to light conversion, and are temperature dependent. Photodiodes are also non-linear. The fibre couplings can change coupling efficiency with disconnect and remaking, and with temperature, strain, vibration, probably ageing. Lasers are extremely non-linear, having a threshhold. Systems are often intended to be run over any length of fibre up to some maximum. Signal to noise ratio is not good.
All of these point to running the system digitally for preference.
That's not to stop any hobbyist connecting a LED system up and calibrating the linearity, or using over a small enough swing, to run it in an analogue mode. Note that there are opto-couplers designed to be used for transmitting analogue data. These usually have a second photodiode monitoring the output of the LED, used as feedback to linearise the response of the LED+diode combination. The solid coupling between source and receiver mitigates the several problems noted with the fibre part of the connection.
Comment: Neil, your linearity standards seem high. I would regard photodiodes among the most linear sensors around, with a handful of decades of dynamic range. LEDs are linear with current to a first approximation. LASERS too, when run above threshold knee.
Answer: Indeed, optical comunication can transmit analog information. In fact, this is used quite a lot in, for example, Radio over fiber. Even in raw optical comunication, multi-level signaling such as PAM4, and more complex modulation such as IQ signaling is used.
How is this done? Well, you hinted at one method: modulate the light source. You give the example of an LED, however most high-performance optical communication systems actually use laser diodes such as VCSELs, instead of non-coherent (and less spectrally pure) sources like LEDs.
But the key is that you don't have to modulate the light source. You can turn the lightsource on all the way, and then modulate the light instead. Because lasers give you a single coherent wave of light (instead of lost of non-coherent waves at the same time), you can use wave-properties to modulate. This is the idea behind high-performance optical modulation using Mach-Zehnder modulators. In a Mach-Zehnder modulator (or interferometer), we start by splitting the signal up into two paths. We can then change the phase delay of one (or both) of the paths somehow (how we do this electronically is outside of the scope of this response). We then add up the two paths again. If both paths have the same phase delay, they add up constructively, and we get the same output power. However, if we have 180 degrees phase shift in one of the paths, the two paths cancel out and we get no output signal. By modulating somewhere in the middle, we get a lower output power that we started with.
Comment: The MZ modulator typically has a sinusoidal transfer function. It's only going to be useful for analog systems with some additional circuits (pre-distortion or feedback control) to linearize its response.


Meaning of word "しんネタ"

Question: Can't translate this sentence:

しんネタ どらにゃんこを マスター!

Can be also たね (kana reversed).
Context:
Comment: I don't see the words in your linked meme. Are you sure it is the correct meme?
Comment: This is from game "Nyan Nyan Nyanko no Nyan Collection", i took text from there
Answer: As you mentioned, ネタ is the 倒語/anadrome (reverse-ordered word) of 種{たね}/seed. It is usually used to refer to the source of a joke, comedy sketch, or an impersonation. しんネタ is 新ネタ, new ネタ.
I believe it is pretty common in the context of 漫才 where people talk about how a joke makes fun of a celebrity or a well-known event. You linked a meme in your question and in memes the idea is the same: the source or material for a joke.
どらにゃんこ is a play on どら焼き.

Meaning of word "しんネタ"


What are the names of Yamunacharya's disciples?

Question: How many disciples were there of Yamunacharya sage and what are their names?
Comment: Its a humble request -- such lines are not required while asking a question here. So I have edited it out.
Comment: I am requesting you to answer my question
Comment: I don't know the answer .. but someone else might know .. so you kindly wait.
Comment: Please  reply to my question
Answer: Yamunacharya had many disciples.
SrIvaishNava guruparamparai lists the shishyas of Yamunacharya.

Sishyas: periya nambi, periya thirumalai nambi, thirukkOshtiyur nambi, thirumAlaiAndAn, dheivavAriAndAn, vAnamAmalaiAndAn, IsvarAndAn, jeeyarAndAn ALavandhArAzhwAn, thirumOgUrappan, thirumOgur ninRar, dhEvaperumAL, mAranEri nambi, thirukkachi nambi, thiruvaranga perumAL arayar (sishya of maNakkAl nambi and son of ALavandhAr), thirukkurugUr dhAsar, vakulAbharaNa sOmayAjiyAr, ammangi, ALkoNdi, gOvindha dhAsar (who was born in vadamathurai), nAthamuni dhAsar (rAja purOhithar), thiruvarangathamman (rAja mahishi).

Out of these, there were five prime disciples. Yamunacharya recognised Ramanucharya's devotion towards Vishnu. He instructed his prime disciples to teach various aspects of Sri Vaishnava tradition to Ramanujacharya.

Mahapurna (Periya Nambi) - Periya Nambi brought Ramanujacharya to Yamunacharya. He performed samashrayanam to Ramanujacharya.
Srishaila Purna (Periya thirumalai nambi) - Periya Tirumalai Nambi is maternal uncle of Ramanujacharya. He gave the name "Ilayazhwar" to Ramanujacharya. He taught meaning of Ramayana which is regarded as Sharanagathi grantham in Sri Vaishnava tradition. Ramanujacharya developed interest in Venkateshwara due to influence of Tirumalai Nambi who also lived in Tirumala. We can find a temple dedicated to Shri Shaila Purna in Tirumala and Govindaraja swamy temple in Tirupati.
Goshtipurna (thirukkOshtiyur nambi) : Goshtipurna was given the responsibility of teaching the meaning of Tirumantram and Charama Shloka to Ramanujacharya by Yamunacharya. It was Goshti Purna who gave the name "Emberumanar" to Ramanujacharya.
Maaladhaara or Gyaana Purna (thirumAlai ANdAn) : thirumAlai ANdAn is given the responsibility of teaching the meanings of thiruvAimozhi.
thiruvarangapperumAL arayar - He is son of Alavandar i.e., Yamunacharya. He was an expert of music, dance and drama . He performed Arayar seva in front of Ranganatha in Sri Rangam. He was given the responsibility of teaching arulicheyal and Charamopayam (i.e., acharya nishtai the ultimate means). Ramanujacharya performed service for 6 months before asking him to teach anything.

Following is an image of Sri Vaishnava Guruparampara.

Comment: Why is Vedanta Desikar not shown in the picture under SrI Ramanujar?
Comment: @DirghaChintayanti This is Tenkalai tradition.
Comment: The names is not clearly visible in the picture I think.
Comment: @Paṇḍyā Yeah. They can be viewed only if zoomed. I have given their names in the answer.


Why does Chrome not stay as the default browser in Xubuntu 13.04?

Question: If I go to Settings Manager > Preferred Applications and make Chrome (or chromium-browser; there are entries for both!) the default browser, then logout or reboot and come back, the default browser is null again. The same happens if I click a URL in another application (eg Thunderbird); it says I have no default browser set. If I set it to Chrome, it works for the session, but reverts to unset afterwards. Is there some other place it must be set?
Answer: The underlying problem is reported here:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/902661
Chrome and Chromium do not play nicely in the xfce4 environment, and will corrupt the xfce4 settings for web browser in Preferred Applications. Simply tell Chrom{e,ium} not to ask you any more, then set the default settings through Settings Manager > Preferred Applications.
Comment: How do you tell chrome to stop asking??
Comment: either when the popup arises asking, or in chrome://settings
Answer: A way to set the default browser system-wide, inherited from Debian, is to set a default browser as the system "alternative". "alternatives" is a convention introduced in Debian GNU/Linux to handle concurrent applications for the same task, i.e. Firefox and Links for web brosing.
Set the alternative on the terminal by running:
sudo update-alternatives --set x-www-browser /usr/bin/chromium
and I believe recently they also came up with the gnome-browser, so run:
sudo update-alternatives --set gnome-www-browser /usr/bin/chromium
This modifies the symlink infrastructure, which you find in /etc/alternatives. Your desktop environment should make use of these settings (that doesn't mean it does).
Your experience (with the setting beeing temporary) suggests, that your desktop environment uses an environment variable, to make the setting known. Run "env |sort" in a terminal once before making the setting in your settings-manager and once after, and compare the outputs.
I suspect (without knowing) that the settings-manager introduces some variable, maybe something like XDG_BROWSER=/usr/bin/chromium. You should be able to see the details.
Create the file .xinitrc in your home directory, make it executable and modify its content to read:
export XDG_BROWSER=/usr/bin/chromium
(or whatever the environment variable was)
But try the update-alternatives aproach first, maybe this is enough.
Comment: `update-alternatives` isn't "the correct way": it sets the system-wide default, and that default isn't actually used in Unity and Gnome at least, and probably not in Xfce either given that "Preferred Applications" apparently takes precedence.
Comment: After installing Chrome, I have the issue that some of apps (XFCE stuffs mostrly) will use Firefox as default (and that's what I want), some other uses Chromium instead. *Preferred Applications* was set to Firefox, so using `update-alternatives` was the only way for me to really set Firefox as default for every single application. Thank you!!!
Answer: I think I have an answer to an old question that still persists in xubuntu 14.0.4. Put this in the preferred applications (found in "all settings".
/usr/bin/google-chrome-stable %U
The way I found this was right clicking the icon for applications and chose edit applications.  I'm guessing most of you know it from here.
Comment: Just tried this on a frest xubuntu 14.04 - doesn't work for me.
In addition: update-alternatives points to chrome for both x-www-browser and gnome-www-browser


UdpClient Send Receive

Question: First I want to say that I read: UdpClient, Receive() right after Send() does not work?
My question is: is this the normal standard way to handle UDP communications. Set up one UdpClient for send and another for receive?
Answer: Yes.
This is the standard way to do UDP sockets in .NET
Answer: you can actually do this on a Server using Sockets as well checkout this link to see if this will help you in anyway.how to configure the server socket

UdpClient Send Receive


Adding tick and cross inside a toggle button

Question: Is it a good UX to add a Tick or cross inside a Toggle button? According to what I feel it is too overwhelming for the user to show extra information about the status through tick and cross. Can you add some more details about the positives as well as negatives of using it?
Answer: While tick mark works fine but adding a cross can send a different cue to the user.
Reasons:

Usually, cross denotes "remove" or "close" something inside any product or application.

Hence people can assume they are going to remove the toggle entirely from the viewport or something gonna happen to the entire label itself.
On the positive side, it is good to display another cue explicitly whether the toggle is active or not besides color.
Suggestion:

Instead of the tick mark, you can think of adding "ON/OFF" or "YES/NO" based on the context.
Answer: It's definitely good to have an extra indicator besides color (which a color blind person might have trouble distinguishing) and left-right (it's not immediately obvious that the right side represents the 'on' state, though that seems to be the default across operating systems and applications I've encountered; perhaps it's the other way around for RTL languages like Arabic and Hebrew?).
iOS even lets the user choose whether to display these labels or not (they use 0 and 1) in the Accessibility options:

Alternative options are to use a checkbox instead, or a group of two radio buttons (Yes and No) – the latter is especially useful if you want to require a conscious choice for this option when creating the user.


Xbox 360 not connecting to Xbox One via HDMI

Question: I have read a few places online stating that Xbox 360 can be plugged into the HDMI cable in port on an Xbox One and 360 games can be played via the tv snap in by accessing the 360. Sounds simple enough but I am getting a no signal from cable error when I try this. Can anyone shed light here? I did test the 360 by plugging it directly into the TV to make sure the HDMI cable works properly with my 360 and it plays fine. Any other set-up steps need to take place?
Comment: I've had problems using a lower quality HDMI cable when I used my Xbox One as a pass through for my cable box.  Switching the cable to a higher quality HDMI solved it for me.  Perhaps you're in the same boat?
Comment: It works fine when you connect the 360 to the TV, but you get a "no signal" when you connect the 360 to the One? Are you sure *both* consoles are turned on? That's important; even if you only want to play 360, the One must be turned on as well.
Comment: Hmm, the only other reasons I can think of would return a "*signal out of range*" error, and not a "*no signal*". Sorry for not being more helpful than that.
Answer: If your Xbox 360 is not playing though the Xbox One, this is what you should do, to find and, hopefully remove, the problem.
Test the Xbox 360
Plug the HDMI into your television and see if it works. Try the same cable, first, and the cable used on your Xbox One if it still doesn't work.
If the Xbox works without swapping the cables, everything on the 360 side is O.K.
If you have to change cables, your issue is with the HDMI cable. Try the new cable in your Xbox One.
Test the HDMI in on your Xbox One
Try connecting a different device to your Xbox One. A blu-ray player, your computer, even a set top box is fine (as long as you have HDMI out).
If other devices don't work, you may have a faulty HDMI in port.
If these tests are inconclusive
If the fault has not been found, you may simply need a better quality cable.
Quality does not make as much of a difference with HDMI as it did with component. You are always going to get next to perfect quality - if it works.
Some devices need a bit more power in the cable. Try a cable rated for 4K. Look for gold tips if you want to be sure. "Braided cable" does not improve quality. It just makes the cable less likely to break under strain.
I hope you find your solution here. I can personally vouch for cheap cable, here. The cable I am using cost me ten bucks, and it cost the store $2.


Torque Intuition

Question: We are all taught that the torque $\boldsymbol{\tau}$ is given by $\boldsymbol{\tau} = \mathbf{r}\times\mathbf{F}$ so that torque increases with the lever arm length. What is the physical intuition behind this fact? Is there some compounding of certain inter-molecular forces in the lever arm that leads to a compounding of forces?
Comment: A similar question was asked recently: https://physics.stackexchange.com/questions/737407/what-is-the-explanation-of-greater-torque-having-greater-rotatory-effect-on-a/737468#737468
Answer: The torque is defined to be $r \times F$, so that it will have some analogy with the mathematical construction of the force. For instance the force $ F = \frac{dp}{dt}$ and the corresponding analogy is that the torque $\tau = \frac{dL}{dt}$, where p is the linear momentum and L is the angular momentum. These definitions will also follow some symmetry (Noether's theorem) facts such as, if the system has translational symmetry then the momentum is conserve and if there is some rotational symmetry then the angular momentum is conserve.
Now to the question as of why the definition leads to the fact that torque increases with the lever arm length. It just a matter of consequences to how the torque and angular momentum is constructed so that it has the same mathematical construction with force and linear momentum.
Answer: No. It follows directly from ${\bf F}=m{\bf a}$. Just multiply  both sides of that equation by by ${\bf r}\times...$
Comment: That's undoubtedly clear, but is there any intuitive reason why it should be the case? It's hard to believe that it's a fluke of classical mechanics that I can lift an object more easily with a longer lever than a shorter one.
Comment: *That's undoubtedly clear, but is there any intuitive reason why it should be the case? It's hard to believe that it's a fluke of classical mechanics that I can lift an object more easily with a longer lever than a shorter one.* but the key thing is that you cannot lift it as far.
Answer: There is this thing called Noether's Theorem, from which it follows that there exists a quantity called angular momentum $\vec{L}$ that is conserved for isotropic problems. Now if you are interested in the dynamics of $\vec{L}$, it turns out $\dot{\vec{L}}=\vec{\tau}$, where $\vec{\tau}$ happens to be exactly what you wrote. So the choice of an expression for torque is not arbitrary, it is what it must be do describe the time evolution of angular momentum.
This is why torque is defined this way and not another. But your question might instead be "why do we get a "force amplification" in a lever?". If so, check the first volume of Feynman lectures where talks about energy conservation.
Intuitively you have a similar situation in a hydraulic press. Here the force is "amplification" is also related to energy conservation, but microscopically it occurs because more fluid molecules hit per second over a larger area.
Answer: Torque does not create forces, but rather forces can create torque.
With this point of view, it takes more torque to resist a force with a bigger moment arm. Keep the force vector the same, and move its point of application to understand what the equipollent torque $$ \boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F}$$
Answer: The most intuitive way I know relates to cause and effect on a resistant rotating structure.  Consider a very massive sticky bolt being turned with a wrench.  Pushing the wrench toward the bolt contributes nothing to turning it.  Only force perpendicular to the wrench works to turn the bolt.  Energy goes into the bolt when you turn it through a specific angle $\theta$, possibly required due to friction.  When you pull at the end of the handle, radius $R$, the force pulls over an arc of length $R\theta$ to do the work.  If you are at half the radius, the force pulls over only half the arc length to rotate the bolt through the same angle.  This requires twice the force to produce the same work.  This makes radius times perpendicular force the quantity that decides how much work is done when turning something through the certain angle.  Radius times perpendicular force is torque.

Torque Intuition


EC2 micro instance AMI

Question: I have a server running on an AWS Micro instance. As it has EBS storage by default - there is no risk to lose data in case of termination. Can I skip AMI creation for micro instances?
Answer: You don't need to create an AMI unless you want to launch additional instances that are exactly like the one you are running, for example to launch a cluster of web servers serving the same content. In this situation, you could restore a server by creating a new instance, detaching the EBS volume that was created for it, and attaching the volume that you want to recover.
You are correct that the EBS storage means that the storage device will persist through termination of the instance.
Comment: The comment about resizing the instance requiring creating an AMI is incorrect. You can simply stop the instance, change the instance type and restart http://aws.typepad.com/aws/2011/03/even-more-ec2-goodies-in-the-aws-management-console.html
Comment: But if I want to migrate my micro instance to small one. I have to create AMI to move my programs and make them persistent, right?
Comment: Yes. If you want to resize the instance, the only supported way to do that is to stop the instance, create an AMI, and launch the AMI in the size you want to use.
Answer: EBS storage does not persist by default when it is the root volume (i.e. EBS backed micro instances) - you must explicitly set it to be so. If you launch many AMIs, when they terminate, the root EBS volume will be deleted. (Set the DeleteOnTermination flag using ec2-modify-instance-attributes or use the AWS console)
EBS storage only persists by default if you manually create the EBS volume and then attach it to an instance.
As for migrating from a micro instance to a small instance, you do not need an AMI for that (although, you could use one). There are two common approaches.

Either use ec2-modify-instance-attributes to change the instance type (you will need to stop the instance, run the command, and then start the instance)
Or Stop (not terminate) the (micro) instance, detach the EBS volume, start a new (small), stop the new (small) instance, detach the existing EBS and attach your old EBS to the new (small) instance, start the small instance.
Answer: As pointed out earlier, by default EBS backed instances have their root EBS volume set to be deleted on termination.
If you want to avoid that, you have to use:
<code>ec2-modify-instance-attribute --region <region> device=vol-id:false <instanceid>
</code>
As an example, first check what's the status of the block devices of your instance:
<code>$ ec2-describe-instance-attribute --region us-west-1 i-365ed96f -b
BLOCKDEVICE /dev/sda1   vol-0aa8ac24    2012-11-04T22:46:15.000Z    true
</code>
The last column is "deleteOnTermination" and it's currently set to true (the default). You can change it to false with:
<code>$ ec2-modify-instance-attribute --region us-west-1 -b /dev/sda1=vol-0aa8ac24:false i-365ed96f
BLOCKDEVICE /dev/sda1   vol-0aa8ac24        false
</code>

EC2 micro instance AMI


Can a character take the Dodge action while riding a flying steed?

Question: While riding a flying steed, can a character take the Dodge action? Does it matter if the mount is being controlled or not? It seems weird that a person can "dodge"  while sitting down.
Comment: Also, do you have a PHB? This, and your last question, are fairly straight forward. I would humbly ask on behalf of the community that you at least look up the relevant sections in the rule book before posting an official question.
Comment: The rulebook says nothing on the subject and not being able to jump around while mounted is a valid concern. I see no reason for downvoting.
Comment: This seems like something that you could just find reading the rulebook.
Comment: Are you asking if You (the PC) can take a Dodge action while mounted or if the mount can take the Dodge action? If the former, why would you think that you couldn't?
Comment: We need to know if you mean that you (the PC) is trying to Dodge or your mount is trying to Dodge, before we can answer.
Answer: Yes
The character can take the Dodge action because Dodge is one of the listed actions all creatures can take.
The mount can take the Dodge action because a) if it is controlled, Dodge is one of the permitted actions and b) if it is independent, Dodge is one of the actions all creatures can take.
Answer: You don't need rules to let you do stuff like this
You need rules to tell you you can't.  Whenever the rules say "You can..." it means you can do that thing all the time whenever no matter what, unless something else specifically says it stops you.
Sometimes what stops you is the DM not liking the result of using the rules, rather than something within the rules themselves, and sometimes people call that 'common sense' so as to avoid discussing it.  But common sense is not something we can advise you about with certainty when you ask about how a rule works; common sense is in many ways a reflection of what your DM believes about the metaphysics of real-life and DMs do not, in general, subscribe to a single metaphysical cosmology consistent across the whole RPG playing community.
Furthermore, even should your DM decide that, for example, the peasant railgun doesn't work because actions are supposed to be simultaneous or something, that doesn't make that an actual part of the game-system or rules.  If we're talking about how the rules work as concerns passing objects, limits your DM might have come up with like 'it can't go farther than you can run in 6 seconds' or whatnot aren't a part of that; the rules still allow the peasant railgun, only your table doesn't.
So, then, it should be clear from the text related to mounted combat that nothing about riding an animal affects your ability to dodge.  The same is true for flying.  There's no text, really, about riding flying animals, and what little there is certainly doesn't talk about not being able to dodge.
Therefore, since the rules say you can spend your reaction to dodge, you can do so, just like you could in any other situation that doesn't specifically and explicitly forbid you from doing so.


Upgrade release - with fallback options, or do it virtually

Question: So then the 13.04 release came along. Unfortunately I have only had trouble with earlier
upgrades and always ended up in a FUBAR and consequently reinstalling entire system. Would like to avoid that this time.
I have a box with Ubuntu 12.10 32bit running Gnome 3 classic + various services like BIND9, MySQL, Postfix, Apache, ++.
After some back and forth I've decided to create a clone of current system. If
system breaks I can do a revert.
Question is how to best do this. I can do a clone of the partition with dd, but guess
the upgrade would also mean some changes to GRUB and MBR.
The current layout is approximately:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk
├─sda1   8:1    0   7.6G  0 part [SWAP]
├─sda2   8:2    0  93.5G  0 part /mnt/old_ubu_11.04
├─sda3   8:3    0  93.5G  0 part /
├─sda4   8:4    0     1K  0 part
└─sda5   8:5    0   737G  0 part /mnt/storage
sdb      8:16   0   1.8T  0 disk
└─sdb1   8:17   0   1.8T  0 part /mnt/develop
sdc      8:32   0   1.8T  0 disk
...

System and home reside at sda3.
First thought would be something like:
dd if=/dev/sda3 of=/mnt/storage/ubuntu_12.10.img
dd if=/dev/sda bs=512 count=1 of=/mnt/storage/MBR.img
dd if=/dev/sda bs=512 skip=1 count=3 of=/mnt/storage/POST_MBR.img

Problem with this approach, (I guess), is pseudo file systems like /sys and /proc (so I should probably do it from a live CD/USB).
Would it be an issue writing such images back?
Would clonezilla or something similar be better? (Never used it).

Also; what I would really like to do is use a virtual system. Guess it would be an
80% or so likeness (due to HW layers etc.). And then run do-release-upgrade  in
that by e.g. VirtualBox. Could this be a viable option?
Notes on changes
I add this as it was what my question in part started out as – and could probably be helpful to others. I also wonder if it gives an accurate picture of what is going to be updated. Any confirmation on this would be great as well.

No!
apt-get --simulate dist-upgrade, does not simulate upgrade from one release to another. E.g. as explained here:

apt-get dist-upgrade
The same as the above (apt-get upgrade sic.), except add the "smart upgrade" checkbox. It tells APT to use "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.
"apt-get dist-upgrade" does not perform distribution upgrade.

(See a lot of notes and "answers" around the web that states this as an option.)

After some fooling around I tied the following:
cd /etc/apt/
sudo cp sources.list sources.list_bak
sudo vi sources.list

# in vim:
:%s/quantal/raring/gc
# Yes, I can do sed -i 's/...' but like to have bit more control.
:wq

# make log
sudo apt-get update
cd /tmp
apt-get --simulate dist-upgrade > quantal-2-raring.log 2>&1

# and better to be safe then sorry so at once:
su -c 'cp sources.list sources.raring && mv sources.list_bak sources.list && apt-get update'

Giving me this list of changes.

As a side note:
The /etc/apt/sources.list states:
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

That document is outdated and should probably (also) link to this.
Answer: /sys /dev etc. temp and memdisk fs will not be on your backup as dd will make the dump from the disk only as of the raw read. What will change is the temporary files made to /var/run etc that will remain on your dump. Yes a disk or usb boot could help to override this.


Using a dehumidifier to kill fleas

Question: My cat has fleas and I tried using anything short of a bug bomb to get them off the cat and out of the house.  However, all previous attempts have failed.  Now I stumble on this idea that you can kill fleas using a dehumidifier.  Is this true or am I falling victim to the internet?
Comment: Good luck, but the first-line treatment is usually spot-ons that interrupt the flea's lifecycle, ovicidal spray, very frequent and thorough vacuuming, and patience. There's a dormant stage in the flea's lifecycle that's impervious to anything, that the vibrations from the vacuuming awakens and lets you get rid of it. It's these dormant invincible eggs that cause the fleas to return, so you need to keep up any intervention you're doing and vacuum for some time after your cat stops scratching.
Comment: Apparently 95% of the fleas in your house are non-adults, so an intervention that kills just the adult fleas isn't enough. You want to attack on all fronts.
Comment: I have two dogs and zero fleas for over 5 years. No chemical treatments. I run a 70 pint dehumidifier, 24/7, in a 2000 square foot home in the south. Keep the Relative Humidity <45%. It works for me.
Answer: No, Dehumidifiers do not kill fleas.
The most effective way is to use a topical or oral chew flea product on all pets (excluding reptiles and birds) in the household for a minimum of 3 months. If you live in an apartment/condo building or a hot climate you should treat your pets 12 months of the year. Areas that get snow and stays cold in the winter months the treatment starts from March until December.
Some recommended products are:

Advantage Multi
Bravecto
Revolution (southern USA this product is no longer effective for fleas)

Extra tips:

Wash bedding.
Vacuum everything daily.
Flea comb pets to remove fleas and flea dirt (flea larva eat flea dirt).
Bathe your pet to help remove fleas.

Fun flea facts

A female can lay 40-50 eggs per day and 50% of these eggs will be female.
The female flea begins producing eggs within 24-36 hours after its first blood meal and continues to produce eggs for >100 days if she remains on the host.
Fleas carry tapeworm that can be transmitted to your cat once eaten.
Fleas can be vectors for infectious organisms, such as Yersinia pestis (aka Plague), Rickettsia spp., Bartonella spp., and hemoplasma (Mycoplasma) spp.

Note When bathing pets do not bathe while on topical flea treatment and wait 2 days before applying a topic flea treatment AFTER a pet has been bathed.
Answer: I have been fighting these for a month now. I used a dehumidifier for years and turned it off when I found fleas in it. Do NOT use a dehumidifier to get rid of fleas. They do not care and they will love the water it sucks out of the air. Persistence is the key. Do not give up. Do not give in! Do all the things others have said.
They can stay dormant for up to 8 months until they sense a meal (warm body), so vacuuming is crucial as the vibration from a beater bar gets them going.
Comment: One more thought, I think the fleas actually crawled through the exhaust tube from the dehumidifier into the dehumidifier... Try to think of everywhere they might hide. I had to remove all paper products, all carpets, paper bags, boxes, keep stuff off the ground, keep vacuuming daily... Good luck and never give up!
Comment: Since I posted I have learned that a humid environment is ideal for fleas. Running a dehumidifier is helpful as it makes the environment less conducive for the buggers... Just (as stated above) do not use an exhaust tube as the fleas might crawl in it and lay eggs and put a little dawn in the dehumidifier after you drain it as it will keep it clean and if any fleas do get in there they will drown!
Answer: I see some people saying you cannot kill fleas with a dehumidifier. You can, but it would be situational. For instance I have an almost entirely open floorplan of 2800sq/ft, and there is NO carpet of any kind in my home because of how many animals I have. I have a dehumidifier rated for 6500sq/ft that can run continuously because it is self draining; but that would take the humidity so low you'd probably have nose bleeds. Almost any bug that enters my home only lasts a few hours. That being said it doesn't really get the adult fleas off of your pets but the larvae cannot survive low humidity. I recently had a completely flea infested rescue at my house. It spread adult fleas to my other animals, and now my animals no longer have fleas after the adults died out. For most homes this wouldn't work.
Answer: Theoretically you probably could, as fleas only can live in a certain humidity but you'd have to keep it going for months to years at a time to ensure any dormant flea eggs are good and dead, or alternatively you could also drop the temperature in the house. Cold temperature with dry air may help to kill them faster, but flea egg can lay dormant for a while which is what you got to be worried about, and that's probably where most of your problems come from. Because if even ONE female is left alive to hatch, she can produce millions more (and quickly) all WITHOUT a male. So anything you do has to focus on getting rid of the eggs (like vacuuming, but I'd remove the bag quickly incase they hatch inside and just crawl out) or you have to keep up your flea treatment plan for MONTHS to ensure that any flea eggs finally die because they can't stay dormant forever, just a really long time so that it feels like forever.
For some fool proof method to kill adult fleas, you could try topical treatments or chewable (but NEVER give your cat dog flea treatments, there's a chemical often used for dogs that they have a much higher tolerance for and can kill your cat at the proportion they use for dogs). But I personally shy away from harsh chemicals as what's meant to kill a flea might not be too good for your cat, and also because my cat's had really bad reactions to typical flea treatments. So you could try looking into diatomaceous earth, I've never tried to myself but I've heard its sharp enough to just cut right though an insect's exoskeleton but is natural and perfectly safe for your cat if you just sprinkle it over their fur, but I'd look into that more before trying it cause I'm no expert in how to use it since I've never had to. But no matter what idea you choose or if you've tried them all, the important thing is to remember those eggs. So either spend a lot of time vacuuming to make sure you get every single egg and don't miss one, or keep up the flea treatments for months at a time. Maybe even over a year, just to be sure.

Using a dehumidifier to kill fleas


Differentiating a parametrized piecewise function

Question: Here's my piecewise function in which $\eta$ is a parameter:
\begin{align}
h(\eta)=\begin{cases}
f(x) & x\leq g(\eta) \\
0 & x>g(\eta)
\end{cases}
\end{align}
where $x$ is a positive continuous strictly increasing function of $\eta$, and $f,g,h,$ are positive continuous strictly increasing functions of their arguments. I wish to find the extremum of function $h$, for which I need $dh/d\eta$. I don't know how to even proceed with this one. This equation actually comes from an optimization problem modeling a physical system. Any help is appreciated. Thanks in advance.
Answer: Since it is given that $h$ is positive, the inequality $x>g(\eta)$ can never hold. Thus $h(\eta)=f(x)$. Does this help?
Comment: So what you are saying is $\frac{dh}{d\eta}=\frac{df}{dx}\frac{dx}{d\eta}$?
Comment: Yes, this should be the case. But if you just want to find the extremum of $h$, note that $f$ is strictly increasing in $x$, i.e. to increase $f$ is to make $x$ large. But as $x$ is always strictly increasing in $\eta$, I think  $h$ can only be maximized (resp. minimized) when $\eta \to +\infty$ (resp. $-\infty$). In other words, there's no such local extremum.
Comment: But it all depends on the fact that $h$ is positive.


How to interpolate anomaly?

Question: Is there a way to interpolate anomaly directly? I have a set of temperature anomaly (difference between actual and normal temperature) and I want to interpolate the anomaly directly.
Answer: Yes you can, your surface would be something from -5 to +5 or similar, no problem with that. You can use IDW for example.
If you take into account elevation, for example using a dem, you can calculate the expected temperature surface, for example: (elev/100)*0.4 assuming temperature decreases 0.4 degrees Celsius every 100m (which I don't know. If it is true, just as an example). Add that expression to the raster calculator and then, you will be able to compare or subtract your temperature anomaly to the elevation temperature anomaly.

How to interpolate anomaly?


Are login passwords saved on the machine or only a hash version of the password?

Question: Are login passwords saved on the machine or only a hash version of the password? If only a hash version of the login password is saved, which hash method is used? In which folder is it stored on the machine? I am using Ubuntu 22.04.
Comment: I would read the manpages of `shadow` and `crypt`, which explain it in MUCH more detail
Comment: IF by login passwords you mean your system user passwords, then read my answer.  There is no restriction on how different programs store their data on system (some store plain text, some store as salted hashes, some are hard-encrypted by proprietary static-compiled keys, etc.)
Answer: Per man shadow, which explains how passwords are stored for users:
   encrypted password
       This field may be empty, in which case no passwords are required to
       authenticate as the specified login name. However, some
       applications which read the /etc/shadow file may decide not to
       permit any access at all if the password field is empty.

       A password field which starts with an exclamation mark means that
       the password is locked. The remaining characters on the line
       represent the password field before the password was locked.

       Refer to crypt(3) for details on how this string is interpreted.

       If the password field contains some string that is not a valid
       result of crypt(3), for instance ! or *, the user will not be able
       to use a unix password to log in (but the user may log in the
       system by other means).

Accordingly, per man 3 crypt we see this explains the encryption:
DESCRIPTION
     The crypt, crypt_r, crypt_rn, and crypt_ra functions irreversibly
     "hash" phrase for storage in the system password database (shadow(5))
     using a cryptographic "hashing method." The result of this operation
     is called a "hashed passphrase" or just a "hash." Hashing methods are
     described in crypt(5).

Following, that, we look at man 5 crypt:
DESCRIPTION
     The hashing methods implemented by crypt(3) are designed only to process user
     passphrases for storage and authentication; they are not suitable for use as
     general-purpose cryptographic hashes.

     Passphrase hashing is not a replacement for strong passphrases.  It is always
     possible for an attacker with access to the hashed passphrases to guess and check
     possible cleartext passphrases.  However, with a strong hashing method, guessing will
     be too slow for the attacker to discover a strong passphrase.

     All of the hashing methods use a "salt" to perturb the hash function, so that the
     same passphrase may produce many possible hashes.  Newer methods accept longer
     salt strings.  The salt should be chosen at random for each user.  Salt defeats a
     number of attacks:

     1.   It is not possible to hash a passphrase once and then test it against each
          account's stored hash; the hash calculation must be repeated for each account.

     2.   It is not possible to tell whether two accounts use the same passphrase without
          successfully guessing one of the phrases.

     3.   Tables of precalculated hashes of commonly used passphrases must have an entry
          for each possible salt, which makes them impractically large.

     All of the hashing methods are also deliberately engineered to be slow; they use many
     iterations of an underlying cryptographic primitive to increase the cost of each
     guess.  The newer hashing methods allow the number of iterations to be adjusted,
     using the "CPU time cost" parameter to crypt_gensalt(3).  This makes it possible to
     keep the hash slow as hardware improves.

By following this chain (man shadow to man 3 crypt to man 5 crypt) we can see that passwords are stored in /etc/shadow as salted hashed passwords.  There are numerous hash mechanisms and methods available so you have to deep-dive into the manpages to really interpret the data in /etc/shadow to determine which hash mechanism is in use on your environment by default.
Comment: @user823 A hashing algorithm takes input (your password) and produces output (the hashed text) via an irreversible process. But it's still just an algorithm. If you and I both run MD5 on the same text, we'll get the same output. If everyone did that on all services, one good data breach could reveal everyone's passwords on everything. "Salting" is the act of prepending a string to the password before hashing it.
Comment: If I salt my hashes for my system with "roses" and you salt yours with "violets", then even if someone gets their hands on a table of plaintext passwords for my service, that table is useless for cracking your service, since the hash you get from a password is different than the hash I would get for the same password.
Comment: @user823 It's explained in the third section of manpages as well as by Silvio.  "All of the hashing methods use a 'salt' to perturb the hash function, so that the same passphrase may produce many possible hashes."  Put another way, a "salt" is a random string prepended to the actual password before being passed into the hashing functions.  It is explained in the third section of `man 5 crypt` in my answer in depth how this protects and strengthens password hashes more.
Comment: what do you mean by "salted" in salted hashed passwords?
Comment: @aroth that's the *point* of manpages and kernel documentation.  Arguing otherwise is not meant for here.
Answer: In addition to hashed / salted passwords, some are stored in plain text where no one else can read them.
For example ~/.netrc:

.netrc file should be located in your home directory and the permissions on the file must be set so that you are the only user who can read it, i.e. it is unreadable to everyone else. It should be set to at least Read (400), or Read/Write (600).

For small developers who wish to avoid the complexities of managing passwords with hashing algorithms, the ~/.netrc methodology can be considered. The methodology is used in SSH to automatically log into remote servers.


Installing Glass Mosaic Backsplash

Question: I'm installing a glass mosaic back splash. The tiles are 3/4 inch square and are mounted on a mesh of size 13 x 13 inches. They are 5/32 of an inch thick. I am having trouble with my technique to get good mortar coverage on the wall so the tiles stick well. What kind of trowel (v, notched) and what size would you recommend and would you flatten the ridges to get an even coat on the walls or would you leave the ridges in the mortar and put the tile on that? I am using a glass mosaic motor with a polymer.
Comment: You could use a backer board with the tiles
Answer: When applying thinset, put it on in a flat coat first,, and lay it on thick, pressing it against the wall or floor. THEN go back at an angle and notch it, removing excess. This makes sure the thinset has good contact with the wall over the whole area and will bond well. Laying it on at an angle, so it's notched in one pass, doesn't spread the thinset over the wall nor press it into the wall as well as laying it flat first.
Use a V-notch trowel, definitely; A narrow U-notch will work in a pinch, and don't bother with square-notch; those are for laying floor tile mostly, where you need a lot of vertical play to create a level surface. If the mesh tile doesn't seem to be adhering well to the wall, you can try "back-buttering" the mesh with some more thinset, kind of like applying glue to both sides of a wood joint. Just don't damage the mesh or lose too many attached tiles. Don't be afraid to really lean in with pressure to get the tiles into that thinset; just don't pound on the tiles/wall too hard.
Comment: Good advice - that's basically what I did. Put on a good solid coat and then trowel it with the notches. I also had to pay good attention to the coverage, especially at the edges.
Comment: I use a putty knife to apply adhesive in the hard-to-reach or finicky places. It's easy enough to skim off the excess.

Installing Glass Mosaic Backsplash


Why are there so many async and await in smart contract tests?

Question: What's the use of async and await and why are there so many of them in smart contact tests?
Comment: They are required for asynchronous operations, and using async/await is the way of achieving that in javascript.
Comment: How do you when an operation should be performed synchronously or asynchronously in smart contract tests?
Comment: It depends on the language, for javascript regular code is synchronous and asynchronous code should be in an async function.
Answer: Not only on smart contract tests, but in Javascript and Nodejs, in general, is common to find many async/await function calls.
The Javascript is single-threaded. So, how do you get this sense of asynchronicity with just a single thread? Easy, Javascript delegates asynchronous work to the runtime, and when it's done, it receives the response.
Javascript has a single-threaded Event Loop that goes checking the call stack and processing items. If the call stack is empty, it checks the callback queue, gets a response, and starts processing it, putting more items in the stack as the code is executing and keeps processing those, in a loop.
If there is any function execution that would block the only thread, that function execution could be sent to the runtime to handle, like the WebAPIs in the browser. Js is single-threaded, but the browser is not. So the browser can make work in the background and put the results in the callback queue. When the event loop is done processing whatever was in the stack, then it checks to see if it has a response in the callback queue, if so, it processes it. The same applies to Nodejs (with a few extra steps, but with the same principle).

You can play around with it here: https://www.jsv9000.app/
So, if you don't use await to call a function that is async or returns a promise, then it will be sent to the runtime to process asynchronous, it will not wait for the response and it will continue executing the code below that line. This means, that if you were expecting to use a value returned by an async or promise function, you will only get the promise and not the actual response. That's why you use await to wait for the response, running the function as if it was synchronous and not asynchronous.
async/await are just sugar code for promises. If you declare an async function like this:
async function getNumberAsync() {
    return 5;
}

By declaring the getNumberAsync function as async, it will now automatically return a promise that will resolve to a number 5 in this example.
So, you can invoke it in two ways:
const result = await getNumberAsync();
console.log(result);
console.log("More stuff");

Or:
getNumberAsync().then(result => {
   console.log(result);
});
console.log("More stuff");

They are essentially the same. But when doing getNumberAsync().then(...) the code below this line will execute right away and print "More stuff" and then 5 will be printed. The code inside the then will receive the response later on, asynchronously.
With await, the code below that line will not execute until the await line gets the response, so it will print 5 first, and then "More stuff".
If you call the getNumberAsync; function without awaitor.then(...)`, then you will not get the result, but a promise object:
const result = getNumberAsync();
console.log(result);```

Would print:

```js
Promise {<fulfilled>: 5}

Then you can do:
result.then(...);

or:
console.log(await result);

So, you need to be careful when to use which.
Anyways, many of the libraries that we use for smart contract tests (and most other regular libraries) use async/await/promise for functions that will do IO operations like making an http call, etc. This way you don't get your event loop stuck waiting for that response if you don't want it and can continue processing other stuff. So, you have the option to 'stop' the execution at a certain point and wait for the response, or use a promise .then callback function to get notified when the response is ready.
Promises came to help with the "Callback hell".
async/await came to help with the "Promise Help".
Check: https://blog.avenuecode.com/callback-hell-promises-and-async/await
Comment: Since async/await are sugar coating for promises that dictate that an operation needs to be finished first before another one starts executing (make asynchronous code look more like synchronous code) , can't I just eliminate async/await completely and make promises behave synchronously?
Comment: Whoah, pretty thorough answer to a basically JS question. Good work!
Comment: Yes, you can, but soon you will face a "promise hell", where you will have so many `promise.then(...).then (...).then (...)...` that it will make the code hard to read and follow. That's why `async/await` sugar  came to be.
Comment: How do you know when an operation should be performed synchronously or asynchronously in smart contract tests?


I need help with breaking a object

Question: Hey guys can someone tell me how to make a  pillar for example to fall apart into squares, like if someone hit it with a hammer?
Comment: Try the Cell Fracture addon + rigid body simulation. If you are asking for something else though, here are some other ways to destroy objects in blender:
https://www.youtube.com/watch?v=wJFE2pb0Ri4
Answer: Use the Cell Fracture add-on, it's the most common way to break stuff in Blender.
Once you've enabled it, click your object, press the spacebar and search "Cell Fracture".
It may change your object into something like this, depending on the settings you use for the fracturing.(if you can't see your fractured object, look at the next layer)
The fun part begins: select all the fractures and turn them all into Rigid Bodies, and check the "Animated". (make sure all of the fractures have the "Animated" checked, or else the whole thing will fall apart without collision)
Once you've set up your hammer or anything that breaks your object, make sure that is a Rigid Body too, with the "Animated" box checked.
Animate your colliding object through your breaking object, then you animate the "Animate" checkbox. If you don't know how to do that, just hover your mouse over the "Animated" checkbox and click I. Then go the the keyframe where your colliding object is just about to collide with your breaking object, then click I again. Go to the next keyframe, uncheck the "Animated" box and press I again. Now it works!
Do the same thing with your breaking object, but make sure it is well timed, because your breaking object might get destroyed before the impact. Now have fun and amuse yourself with your destroying things!
Comment: Thank you, I will have fun now, I got inspired to learn how to do it by watching a youtuber play house flipper and I want to eventually make a game, but I wanna learn everything I can first. Thank you again
Comment: I like your theme, @RogueLotus4. Which one is it?
Comment: @seaturtle I used the North theme.

I need help with breaking a object


My trusty kindle broke after many years and I never made a Kindle account, how can I transfer the books I have from the device to the kindle app?

Question: the screen of my Kindle broke a while ago and I thought I could just transfer the files of my Kindle device onto my Kindle account. I never bothered really setting up a Kindle account because I inherited my Kindle from my grandpa so I don't know his account login or anything of the sort. I am able to transfer some of the books using "Send to Kindle" that Amazon suggests but some of the book files are unsupported (these books were legitimately purchased very long ago but the files are APNX and not pdf). How can I resolve this? Or is fixing the screen the only way?
Answer: Try connecting the Kindle to a PC with a USB cable.  If no interactions are needed on the Kindle (i.e. selecting the type of USB connection), maybe the internal storage of the Kindle will then show up in a file manager.  Copy what you want from the kindle to PC storage.


Use of SqlBulkInsert in production applications

Question: We are currently developing an application that generates upwards of 5-10,000 rows of data in a particular table for each user session. Currently we are using sql text commands to insert each row of data at a time so a save operation could take up to a minute. We are playing around with the use of SqlBulkInserts and have seen the time go down to less than 500ms. Does anyone have any objection with the use of SqlBulkInserts in a production application where many users will be using the system?
Answer: I have never ran into an issue with SqlBulkCopy with the tableLock option set and another user being blocked due to it. The TableLock option increases the efficiency of the insert from what many people have talked about and just plain using it have shown me.
My typical method:
public void Bulk(String connectionString, DataTable data, String destinationTable)
{
    using (SqlConnection connection = new SqlConnection(connectionString))
    {
        using (SqlBulkCopy bulkCopy =
            new SqlBulkCopy
            (
            connection,
            SqlBulkCopyOptions.TableLock |
            SqlBulkCopyOptions.FireTriggers |
            SqlBulkCopyOptions.UseInternalTransaction,
            null
            ))
        {
            bulkCopy.BatchSize = data.Rows.Count;
            bulkCopy.DestinationTableName = String.Format("[{0}]", destinationTable);
            connection.Open();
            bulkCopy.WriteToServer(data);
        }
    }
}

Answer: Before implementing using SqlBulkInsert, try creating your INSERT query dynamically to look like this:
insert into MyTable (Column1, Column2)
select 123, 'abc'
union all
select 124, 'def'
union all
select 125, 'yyy'
union all
select 126, 'zzz'

This will be only one database call, which should run much more quickly. For the SQL string concatenation, make sure you use the StringBuilder class.
Comment: I did entertain this idea but my problem with this approach is I need the identity value that was created for the primary key back on the server as we are building a hierarchy tree since this is a self referencing table.
Comment: So what? This totlaly rules out the use of SqlBulkCopy, too - how you do bulk inserts if you need the server generated ID back? The answer is valid, your commend contradicts your own statement.
Comment: Your right and I am an idiot. What we are doing in the SqlBulkCopy implementation was retrieving the list of data that we just inserted at each level of the tree to retrieve the list of id's that were generated. I didn't even think about doing the same thing with using the statement you provided above.
Answer: I think it's the right way to go, if your application really needs to produce that many records per session.
Comment: Because of the way our database is structured, we have 12 tables that we are storing data to in a single transaction, because of this we were getting deadlocks errors while using SqlBulkCopy. By setting the SqlBulkCopyOptions.TableLock the deadlocks went away. Is there any disadvantage of locking the table to do the bulk inserts? Will it hurt other users trying to run a transaction at the same time?
Comment: You mean except you ahve a TAbLE LOCK? next you come and whine about having table locks ;) Deadlocks are a different thing and a sign of your programming being badly done - fix the problems as they occur, dont put bad code over bad code to avod symptoms.
Comment: I would completely agree with you if I didn't have a product manager yelling down my back to not change a single thing about the database schema except for maybe some indexes and make everything perform better. I have been completely flustered by the entire situation.


The Bhumi Geetha

Question: What is Bhumi Geetha and what is its effect in the present kali yuga? What is the universal history the special qualities of each age, movement of time, cosmic maintenance influenced in the Bhumi Geetha?
Comment: It looks like the Bhumigita is from Shrimad Bhagavatam book 12 chapter 3. http://sanskritdocuments.org/doc_giitaa/bhUmigIta.html?lang=sa
Comment: What is `Bhumi Geetha`? Hearing for the first time. No wiki article except [this](https://en.wikipedia.org/wiki/Bhoomi_Geetha).
Comment: @iammilind--Will provide the answer in few hours
Comment: You are right Gabe
Answer: Shrimad Bhagavatham Canto 12-3 is Bhumi Gita.

This chapter describes  how the earth took note of the foolishness of
  the many kings bent on conquering her. It also describes how even
  though the Age of Kali is full of faults, the glorification of the
  name of Lord Hari destroys them all. Nama Sankeertan is the easy way
  to reach the abode of Lord Narayana.  Chanting Hare Rama Hara Rama
  Rama Rama Hare Hare   Hare Krishna Hare Krishna Krishna Krishna Hare
  Hare daily at your free time travel time will lead you to a peaceful
  life.
Great kings, who are actually just playthings of death, desire to
  subdue their six internal enemies — the five senses and the mind — and
  afterward they imagine they will go on to conquer the earth and all
  its oceans. Seeing their false hopes, the earth simply laughs, for
  eventually they all must leave this planet and go elsewhere, as have
  all the great kings and monarchs of the past. Moreover, after usurping
  the earth or some part of it — which is actually unconquerable and
  must in every case be given up — fathers, sons, brothers, friends and
  relatives quarrel over it.
Thus the study of history naturally leads to the conclusion that all
  worldly achievements are temporary, and this conclusion should give
  rise to a sense of renunciation. Ultimately, the highest goal of life
  for any living entity is pure devotion to Lord Kṛishna which
  annihilates all inauspiciousness. In the age of Satya, religion was
  complete, still possessing its four legs of truth, mercy, austerity
  and charity. With the coming of each succeeding age, starting with
  Treta, these religious qualities each diminish by one quarter.
In Kali-yuga the legs of religion retain only one fourth of their
  power, and even that will be lost with the progress of the age. The
  mode of goodness is predominant during Satya-yuga, and the mode of
  passion is predominant during the Treta-yuga. The mixed modes of
  passion and ignorance are predominant during Dvapara-yuga, and in the
  Age of Kali the mode of ignorance is predominant. Atheism, the
  smallness and inferiority of all things, and devotion to the genitals
  and belly are very much evident in the Age of Kali. Living entities
  contaminated by the influence of Kali do not worship the Supreme Lord,
  Sri Hari, even though they can be freed from all bondage and easily
  achieve the supreme destination simply by chanting the glories of His
  name and taking shelter of Him. But if somehow or other the Supreme
  Personality of Godhead becomes manifest within the hearts of the
  conditioned souls in Kali-yuga, then all faults of place, time and
  personality inherent in the age will be destroyed.
Kali-yuga is an ocean of faults, but it possesses one great quality:
  simply by the chanting of the name of Kṛishna, one can be delivered
  from material association and attain the Absolute Truth. All that was
  accomplished in the age of Satya by meditation, in the age of Tretā by
  sacrificial performances and in the age of Dvāpara by temple worship
  is easily gained during the Kali-yuga by the simple process of
  hari-kirtana.
Comment: @TheDestroyer  Plagarism is not allowed on any sites. What the answers given by you are all copied only. You have not invented anything new. you might have modified prepositions, add punctuations etc.  As I already told you destroy the answers given. Nobody writes on his own. Answers  are being referred in puranas and reproduced.
Comment: Use blockquotes when you copy something from external site or scripture. It makes it clear to read.
Comment: @the destroyer   ok

The Bhumi Geetha