javafx - how to connect fx-controller and service class
What is a NullPointerException, and how do I fix it?
What should I consider when choosing continuous lighting vs. strobes for studio photography? My linear voltage regulator is overheating very fast I'm using a 5 V / 2 A voltage regulator () without a heatsink. I'm testing the circuit with a microcontroller (PIC18FXXXX), a few LEDs and a 1 mA piezzo buzzer. The input voltage is aprox. 24 VDC. After running for a minute, the voltage regulator starts to overheat, meaning it burns my finger if I keep it there for more than a second. Within a few minutes it starts to smell like it's burnt. Is this a normal behavior for this regulator? What could cause it to heat that much?    Other components used in this circuit:  L1:   R2:   F1: Quoting backslashes in Python string literals I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example:  &gt;&gt;&gt; foo = 'baz "\"' &gt;&gt;&gt; foo 'baz ""'   So instead of baz "\" like I want I'm getting baz "". If I then try to escape the backslash, it doesn't help either:  &gt;&gt;&gt; foo = 'baz "\\"' &gt;&gt;&gt; foo 'baz "\\"'   Which now matches what I put in but wasn't what I originally wanted. How do you get around this problem? How do you setup a TeX document to self publish a book online? I am a casual TeX user. Mostly I have used it to type up some reports/homeworks for class in my graduate engineering work. In the past I have used document type "article". And then kept all the defaults.  I need to self publish something online. At the highest level I would like to know: How do you setup a TeX document to self publish a book online?  Some more low level questions:   Is there a document type for "book" and what is its name? I am looking at Amazon Createspace. : filetype=pdf, trim size, margins (gutter and outside margins). All of these various trim size, margins gutter/outside can be adjusted in the Tex document?   Has anyone seen any good TeX templates for Amazon Createspace? If you could demonstrate how to tweak a specific "book" document type that would be very helpful also.    Other than the above questions, please feel free to offer any other sort of help since I am completely new to this process (advice, links to good tutorials, links to wikibooks). I'm not entirely clear on how Counterspell works, when trying to counter higher-level spells: the CS description only talks about disrupting a creature you can see, within 60 feet, casting a spell.   However, when trying to counter a higher level spell:   Do I know what spell is being cast?  Do I at least know (somehow intuit, based on VSM components) the level of the spell? Or can I tell the spell/level of the spell by sensing a disturbance in The Weave? (I.e., if the spell is being cast using Subtle Spell, can I still tell what's going on?)   The point of the question is to determine how fruitful CS can be in combat--if I know what the other guy/gal is casting (or at least the level), I can decide whether I want to spend my L8 slot to counter his/her L8 slot. But if I have no idea, and I end up using a L8 slot to counter a L3 spell... seems a bit painful.  Hope this made sense! How long can I store a food in the pantry, refrigerator, or freezer? How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed. What are the different endings in Dishonored? In Dishonored the game as I am escaping the prison, I got a prompt that warned me:      Using stealth and nonlethal approach has benefits. Fewer rats and   weepers, some people react favorably, and the final outcome is not as   dark.   What are all the different endings? And how much chaos yields them? And what is the optimal ending? Is there any Windows installer (wubi) for Ubuntu 14.04 LTS?  When I mount the .iso file with Daemon Tools and run wubi.exe, it just asks me if I want to reboot (I think that's useful only when the .iso  is burned on CD), so is there no "real" installation? I have a SQL query that I am trying to optimize:  DECLARE @Id UNIQUEIDENTIFIER = 'cec094e5-b312-4b13-997a-c91a8c662962'  SELECT    Id,   MIN(SomeTimestamp),   MAX(SomeInt) FROM dbo.MyTable WHERE Id = @Id   AND SomeBit = 1 GROUP BY Id   MyTable has two indexes:  CREATE NONCLUSTERED INDEX IX_MyTable_SomeTimestamp_Includes ON dbo.MyTable (SomeTimestamp ASC) INCLUDE(Id, SomeInt)  CREATE NONCLUSTERED INDEX IX_MyTable_Id_SomeBit_Includes ON dbo.MyTable (Id, SomeBit) INCLUDE (TotallyUnrelatedTimestamp)   When I execute the query exactly as written above, SQL Server scans the first index, resulting in 189,703 logical reads and a 2-3 second duration.   When I inline the @Id variable and execute the query again, SQL Server seeks the second index, resulting in only 104 logical reads and a 0.001 second duration (basically instant).  I need the variable, but I want SQL to use the good plan. As a temporary solution I put an index hint on the query, and the query is basically instant. However, I try to stay away from index hints when possible. I usually assume that if the query optimizer is unable to do its job, then there is something I can do (or stop doing) to help it without explicitly telling it what to do.  So, why does SQL Server come up with a better plan when I inline the variable? Calculating lat/lons from PostGIS table which has projected coordinate system? I have a PostGIS table in a projected coordinate system (EPSG: 28355 or MGA94 Zone 55). In QGIS (with the PostGIS manager plugin) I calculate a coordinate by performing the following SQL:  UPDATE gisprod.buildings SET easting = x(centroid(the_geom))    Now I want to add a "lat" and "lon" field to this table and calculate the values using the appropriate coordinate system, in this case that would be (EPSG:4283 or GDA94).   Is there a way I can specify in the SQL statement to calculate the x/y coord using a different coordinate system? Is there a way to get trig functions without a calculator? In school, we just started learning about trigonometry, and I was wondering: is there a way to find the sine, cosine, tangent, cosecant, secant, and cotangent of a single angle without using a calculator?  Sometimes I don't feel right when I can't do things out myself and let a machine do it when I can't.  Or, if you could redirect me to a place that explains how to do it, please do so.  My dad said there isn't, but I just had to make sure.  Thanks. Intermediate ring between a field and an algebraic extension. This is an exercise in some textbooks.     Let $E$ be an algebraic extension of $F$. Suppose $R$ is ring that contains $F$ and is contained in $E$. Prove that $R$ is a field.   The trouble is really with the inverse of $r$, where $r\in R$. How to prove that $r^{-1}\in R$, in apparent lack of a characterization of $R$.  It occurred to me to use the smallest field containing $R$ ($R$ is easily shown to be an integral domain), that's the field of quotients, and proving that it's $R$ itself, but I don't really know how to proceed.  A not-too-weak, not-too-strong hint will be much appreciated.   Beware $ $ Readers seeking only hints should  beware that there is now a complete answer. Graph editor for shape key animation I have animation where object changes his shape using shape keys, and I want to make some animation smoothing with graph editor. Is there a way to use graph editor for shape key animation? How to delete file(s) in secure manner? Prevent Mac Terminal from reverting to default theme I can't find any way to change the Terminal theme and have that theme applied permanently.  I want to change to another darker theme other than the default 'basic' theme, and (most importantly) have it remain as the theme every time I open Terminal. Show timestamp of a vote in the tooltip when mousing over it Sometimes I come across an old question or answer that I voted on in the past, but I don't clearly remember when (or sometimes even why) I voted it up or down. Being able to see the date/time that I cast a vote would help me remember my mindset at the time.   When mousing over the toggled vote, the tooltip reads the same as if I hadn't voted, with no further information. For example:     This answer is useful (click again to undo)   The only way to get the timestamp is if I try to click the vote to undo it and get the locked vote message:     You last voted on this answer [datetime] Your vote is now locked in unless this answer is edited   However this requires me to guess that the vote is locked - if there was an edit since then I'll actually undo the vote and erase the info I was looking for.  Feature request: Please add the vote timestamp to the tooltip when mousing over a cast vote. This is already done with the green acceptance checkmark for example. How can I take pictures through a skyscraper, airplane, or train window? I'm using Ubuntu 16.04 and there's no fglrx! Example of a series! Give an example of a convergent series $$\sum_{n=1}^{\infty}a_n$$ such that the series $$\sum_{n=1}^{\infty}a_{3n}$$ is divergent..  I cannot find find any kind of series... I am also be very thankful if you find a divergent series (changing the term convergent)... What is the difference between Interest Rate and APY on savings accounts, CDs, etc?  Is there a simple formula to convert the two?