What's the probability that an NFL team with a given win/loss record makes the playoffs?

Question: For example, if I know that a team has a record of 11 wins and 5 losses, but no nothing about the records of any other teams, what is the probability that this team makes the playoffs?
The current (simplified) NFL rules for playoffs are that the team must either have the best record in its division (three other teams), OR have one of the best two records among teams in the conference that did not win the division.
So I suppose what I'm trying to figure out is:

What is the probability that at least one out of three teams has a better win-loss record? This is easy if I assume that the win/loss records of each team in the division are independent (they aren't because each team plays each team in the division twice), but how inaccurate will that make the final answer?
What is the probability that at least two other teams had a better win/loss record, but did not win their division? I really have no idea where to begin with this. Again, the odds of two teams having a better win/loss record is easy, but I'm not sure how to incorporate them winning their division.

(I mentioned 11-5 as an example record, but really I'm trying to solve this in general for any number of wins/losses, teams in a division, divisions, and teams in a conference)
Comment: It's going to depend on your prior assumptions about the likely relative strengths of teams. Are you assuming that all games are 50/50 coin flips? Or, at the other extreme, that there is a linear ordering among teams that determines each game? Or perhaps you want to incorporate historical statistics to arrive at a more realistic answer...?
Answer: In any realistic model, it's going to be very difficult to get a closed-form solution.  So you should try a simulation.  Run a million or so simulations of NFL seasons according to your model.  In those million simulations, say there are a total of $N$ cases where a team had an $11-5$ record, and of those the team made the playoffs in $A$ cases.  Then
$A/N$ should be a good approximation of the probability.
Answer: This is only a long comment, rather than an answer, mostly to lay out the (current) structure of the NFL schedule, in case anyone wants to run some simulations.
There are two "conferences" in the NFL, each consisting of 16 teams divided into 4 "divisions" of 4 teams each.  Six teams in each conference make the playoffs:  the winner of each division, and two more teams with the best records among the 12 non-winners.  (There are elaborate tie-breaking procedures that frequently come into play, but these are irrelevant for the OP's problem, where it's only the won-loss records that matter, not who holds them.)
For the OP's problem, we need only consider one conference.  Call the divisions N, S, E, and W, and the teams in them N1, N2, N3, N4, etc.  In a typical NFL season, each team plays the other 3 teams in its own division twice (once at home and once away); each team in N plays each team in S while each team in E plays each team in W; Ni and Si play Ei and Wi for i=1 to 4; finally, each team plays the 4 teams in one of the divisions in the other conference.  (The exact match-ups rotate from season to season, but this is irrelevant for the OP's problem.)  The total number of games each team plays is thus 6+4+2+4=16.
The structure of the schedule makes it conceivable for all four teams in a division to finish 3-13 (by all four teams winning their home games against their three division opponents and losing the rest) and hence send a division "winner" to the playoffs with a 3-13 record.  It is not possible to make the playoffs with a 2-14 record:  you simply can't have 11 teams in a single conference with 14 or more losses.  (There are 96 games played within the conference and 64 games played against the other conference, so the total number of losses cannot exceed 150.)
Conversely, it's possible to miss the playoffs with a 13-3 record, but not with a 14-2 record.  In practice, teams that go 11-5 or better rarely miss the playoffs, and teams that go 8-8 or worse rarely make it.  (I think both extremes have occurred, but someone would have to check how often.)  It can and does happen on occasion that a 10-6 team will miss the playoffs while a 9-7 division winner makes it.  Them's the breaks.
It could be worth running simulations with coin flips to determine the outcomes of games, to see how the statistics stack up against the historical statistics.  It might also be of interest to alter the schedule, say by eliminating inter-conference play and having Ni and Si play everyone in E and W except Ei and Wi, for i=1 to 4, to see if this has any effect on the stats.
Answer: Edit
I made a BIG mistake in my interpretation of the simulation - revised results have been substituted.
Answer
A team with an 11/5 record has an 99.97% chance of making the playoffs.
Simulation
In coming up with an answer for this question, I have carried out the simulation for this 10,000 times (i.e. 12 teams x 10,000 seasons = 120,000 playoff spots) and my results are:
Win/Loss    As Div. winner    As wildcard     DNQ    Chance
 16/0               4               0           0      100%
 15/1              86               0           0      100%
 14/2             568               0           0      100%
 13/3            2793              19           0      100%
 12/4            8392             294           0      100%
 11/5           18328            3009           6       99.97%
 10/6           24678           13393         851       97.81%
  9/7           18315           19822       18018       67.91%
  8/8            6029            3447       53405       15.07%
  7/9             778              16       55155        1.42%
  6/10             29               0       39021        0.07%
  5/11              0               0       21360        0%
  4/12              0               0        8881        0%
  3/13              0               0        2680        0%
  2/14              0               0         545        0%
  1/15              0               0          73        0%
  0/16              0               0           5        0%
 Total         80,000          40,000     200,000

Limitations

I ignored ties - there have been 19 ties under the current system introduced in 1974 out of approximately 10,096 games played ~ 0.19%.
I assumed each team had an equal chance in every game - this is a huge assumption but I have no idea how it impacts on the actual results. Edit I reran the simulation assigning each team a different skill value from a normal distribution (mean 500, std dev 150). The best team had about an 80% chance of winning against the worst team from the sample. This produced essentially the same distribution so this doesn't matter.

Model
For those who are interested, this is the visual basic code I used:
Public Enum Conference
    AFC = 0
    NFC
End Enum

Public Enum Division
    East = 0
    North
    South
    West
End Enum

Public Enum Ranking
    One = 0
    Two
    Three
    Four
End Enum

Public Enum Results
    NotPlayed
    Won
    Tied
    Lost
End Enum

Public Class Team
    Public Property Skill As Integer = 50
    Public Property Wins As Integer
    Public Property Ties As Integer
    Public Property Losses As Integer
    Public Property Conference As Conference
    Public Property Division As Division
    Public Property Rank As Ranking
    Public Overrides Function ToString() As String
        Return String.Format("{0} - {1} - {2}", Conference.ToString(), Division.ToString, Rank.ToString)
    End Function
End Class

Public Class Game
    Private Shared rnd As New Random

    Private _Team1 As Team
    Public Property Team1() As Team
        Get
            Return _Team1
        End Get
        Set(ByVal value As Team)
            If Not value.Equals(Team2) Then
                _Team1 = value
            End If
        End Set
    End Property

    Private _Team2 As Team
    Public Property Team2() As Team
        Get
            Return _Team2
        End Get
        Set(ByVal value As Team)
            If Not value.Equals(Team1) Then
                _Team2 = value
            End If
        End Set
    End Property

    Private _Result1 As Results
    Public Property Result1() As Results
        Get
            Return _Result1
        End Get
        Set(ByVal value As Results)
            _Result1 = value
            Select Case value
                Case Results.Lost
                    _Result2 = Results.Won
                Case Results.NotPlayed, Results.Tied
                    _Result2 = value
                Case Results.Won
                    _Result2 = Results.Lost
            End Select
        End Set
    End Property

    Private _Result2 As Results
    Public Property Result2() As Results
        Get
            Return _Result2
        End Get
        Set(ByVal value As Results)
            _Result2 = value
            Select Case value
                Case Results.Lost
                    _Result1 = Results.Won
                Case Results.NotPlayed, Results.Tied
                    _Result1 = value
                Case Results.Won
                    _Result1 = Results.Lost
            End Select
        End Set
    End Property

    Public ReadOnly Property Teams As IEnumerable(Of Team)
        Get
            Return Result.Keys
        End Get
    End Property

    Public ReadOnly Property Result As IDictionary(Of Team, Results)
        Get
            Return New Dictionary(Of Team, Results) From {{Team1, Result1},
                                                          {Team2, Result2}}
        End Get
    End Property

    Public Sub Reset()
        Result1 = Results.NotPlayed
    End Sub

    Public Sub Play(Optional Tie As Single = 0)
        Dim draw = rnd.NextDouble
        If draw >= 1 - Tie Then
            Result1 = Results.Tied
        Else
            Dim res = rnd.Next(Team1.Skill + Team2.Skill)
            'Console.Write("{0}: ", res)
            If res < Team1.Skill Then
                Result1 = Results.Won
            Else
                Result1 = Results.Lost
            End If
        End If
        'Console.WriteLine("{0}", Result1)
    End Sub
End Class

Public Class Season
    Private _Teams(Conference.NFC, Division.West, Ranking.Four) As Team
    Public ReadOnly Property Teams As Team(,,)
        Get
            Return _Teams
        End Get
    End Property

    Public ReadOnly Property ConferenceWinners As IEnumerable(Of Team)
        Get
            Dim retVal As New List(Of Team)
            Dim winners = From t As Team In Teams
                          Order By t.Wins + t.Ties * 0.5 Descending
                          Group By Div = t.Conference * 10 + t.Division
                          Into Teams = Group
            For Each c In winners
                retVal.Add(c.Teams(0))
            Next
            Return retVal
        End Get
    End Property

    Public ReadOnly Property WildCards As IEnumerable(Of Team)
        Get
            Dim retVal As New List(Of Team)
            Dim runnersUp = From t As Team In Teams
                            Where Not ConferenceWinners.Contains(t)
                            Order By t.Wins + t.Ties * 0.5 Descending
                            Group By Conference = t.Conference
                            Into teams = Group

            For Each c In runnersUp
                retVal.AddRange(c.teams.Take(2))
            Next
            Return retVal
        End Get
    End Property

    Public ReadOnly Property Results As Dictionary(Of Team, Tuple(Of Integer, Integer, Integer))
        Get
            Dim retval As New Dictionary(Of Team, Tuple(Of Integer, Integer, Integer))
            For Each t In Teams
                retval.Add(t, New Tuple(Of Integer, Integer, Integer)(t.Wins, t.Losses, t.Ties))
            Next
            Return retval
        End Get
    End Property

    Private _Games As New List(Of Game)
    Public ReadOnly Property Games() As IEnumerable(Of Game)
        Get
            Return _Games
        End Get
    End Property

    Public Sub ClearResults()
        For Each g In Games
            g.Reset()
        Next
        For Each t In Teams
            t.Wins = 0
            t.Losses = 0
            t.Ties = 0
        Next
    End Sub

    Public Property TieChance As Single = 0

    Public Sub Play()
        For Each g In Games
            g.Play(TieChance)
        Next
        For Each t In Teams
            Dim teamGames = From g In Games
                            Where g.Teams.Contains(t)
                            Select g.Result(t)

            t.Wins = teamGames.Where(Function(r) r = NFL.Results.Won).Count
            t.Losses = teamGames.Where(Function(r) r = NFL.Results.Lost).Count
            t.Ties = teamGames.Where(Function(r) r = NFL.Results.Tied).Count
        Next
    End Sub

    Public Sub New()
        For Each i In [Enum].GetValues(GetType(Conference))
            For Each j In [Enum].GetValues(GetType(Division))
                For Each k In [Enum].GetValues(GetType(Ranking))
                    If Teams(i, j, k) Is Nothing Then
                        Teams(i, j, k) = New Team With {.Conference = i, .Division = j, .Rank = k}
                    End If
                    Dim t1 = Teams(i, j, k)
                    For Each x In [Enum].GetValues(GetType(Conference))
                        For Each y In [Enum].GetValues(GetType(Division))
                            For Each z In [Enum].GetValues(GetType(Ranking))
                                If Teams(x, y, z) Is Nothing Then
                                    Teams(x, y, z) = New Team With {.Conference = x, .Division = y, .Rank = z}
                                End If
                                Dim t2 = Teams(x, y, z)
                                If Not t1.Equals(t2) Then ' different teams
                                    If Not Games.Where(Function(g) (g.Teams.Contains(t1) And g.Teams.Contains(t2))).Any Then 'games do not exist
                                        If i = x Then 'Same conference
                                            If j = y Then 'Same division (play twice)
                                                _Games.add(New Game With {.Team1 = t1, .Team2 = t2})
                                                _Games.add(New Game With {.Team1 = t1, .Team2 = t2})
                                            ElseIf j \ 2 = y \ 2 Then 'paired division
                                                _Games.add(New Game With {.Team1 = t1, .Team2 = t2})
                                            ElseIf k = z Then
                                                _Games.add(New Game With {.Team1 = t1, .Team2 = t2})
                                            End If
                                        Else 'different conference
                                            If j = y Then 'same division
                                                _Games.add(New Game With {.Team1 = t1, .Team2 = t2})
                                            End If
                                        End If
                                    End If
                                End If
                            Next
                        Next
                    Next
                Next
            Next
        Next
    End Sub
End Class

Module Module1

    Sub Main()
        Dim res(16, 1) As Integer
        Dim sameDiv As Integer
        For i = 1 To 10000
            Console.WriteLine(i)
            Dim s As New Season
            s.Play()
            For Each j In s.ConferenceWinners
                res(j.Wins, 0) += 1
            Next
            For Each k In s.WildCards
                res(k.Wins, 1) += 1
            Next
            For Each l In [Enum].GetValues(GetType(Conference))
                If s.WildCards.Where(Function(w) w.Conference = l)(0).Division = s.WildCards.Where(Function(w) w.Conference = l)(1).Division Then
                    sameDiv += 1
                End If
            Next
        Next
        For i = 16 To 0 Step -1
            Console.WriteLine("Wins: {0}, Div Winner: {1}, Wildcard {2}", i, res(i, 0), res(i, 1))
        Next
        Console.WriteLine("Same Div: {0}", sameDiv)
        Console.ReadKey()
    End Sub

End Module

Comment: How did the 14/2 record wind up with only a 99.9% chance of making the playoffs?  In my answer I said it was impossible to miss the playoffs with that record.  Did *I* miss something?
Comment: Yeah, I realized last night that this interpretation is wrong - I know what I did wrong; will fix when I have time


Building all holomorphic vector bundles from the tangent bundle

Question: Let $V$ be a smooth projective complex variety such that the canonical bundle is not trivial. We can construct some vector bundles over $V$ by starting with the tangent bundle and applying tensor products and Homs and taking subbundles, quotient bundles and extensions (including direct sums). Do we get all isomorphism classes of holomorphic vector bundles this way?
Comment: Vector bundles on $\mathbb{P}^n$ have continuous moduli for $n>1$. Every projective variety admits a finite morphism $X\to \mathbb{P}^{\dim X}$, so the same should hold for $X$. It therefore seems that examples of the kind you want do not exist among projective varieties (and perhaps also among proper algebraic varieties).
Comment: It's not a good idea to change completely a question when there are already comments and answers.
Comment: If you also allow direct sums, the rephrased question has a positive answer for all compact (connected) Riemann surfaces of genus $g\neq 1$.
Comment: If you assume that the canonical bundle is ample or anti-ample, then I think your question has an affirmative answer. As you noticed, the determinant of the tangent bundle is a sub-bundle of the $n$-th ($n = \dim V$) power of the tangent bundle. Up to a dual, you get an ample line bundle. Now, up to some twists by this ample line bundle, every vector bundle is a quotient of a trivial vector bundle (global generation up to twists).
Answer: I think it is a result of Verbitsky (probably proved in Coherent sheaves on general K3 surfaces and tori) that if $M$ is a very general (non-algebraic) K3 surface then the condition you want is satisfied.


How do I if possible, master reset?

Question: I don't know what I did but the app center no longer works. When I try to install something it says waiting and then install comes back up. Also in the terminal whenever I type in a Audi command it says that it's unknown.
Comment: What do you mean by an Audi command?
Comment: I understand from your question that you're looking for some kind of reinstallation keeping your data. There's an answer from @ThiagoJedi that, thought refering to "Freya" should be considered valid also for "Loki": http://elementaryos.stackexchange.com/a/2553/6398
Answer: Try running sudo apt-get update in the terminal, it worked for me at least.

How do I if possible, master reset?


Erase duplicate files?

Question: I have a 1 TB hard drive which I have been using for backups for a few years. The problem is I only did backups by hand. So now I have a lot of duplicates saved up.
Is there a software or a script that will scan the drive for duplicate files, let me choose what to keep and what to delete?
Bonus points if it shows me the time and date of last modification to the file.
Comment: Not an exact dupe, nevertheless the answers work here as well: http://askubuntu.com/questions/547437/find-delete-duplicated-files-on-multiple-harddisks-at-once/547791#547791
Answer: There is a good software with a GUI to do that called Fslint that you can install by your  default repositories:
apt-get update && apt-get install fslint

With this  software, you can detect duplicates files by using the names but  also the content (may be longer with content).

Erase duplicate files?


How would an X-ray mirror work?

Question: I was wondering if light can be reflected how can someone reflect X-ray of what material does it need to be made of and is its design completely different to that of our original mirrors? Does this mean during long-space voyages in which radiation is an problem why can scientists not develop large panels of X-ray mirrors and Gamma-Mirrors and simply reflect the radiation off rather than  worry about that?
Comment: For what it is worth, a lot of the radiation worry on space voyages comes from massive particles of various sorts.
Answer: Unfortunately X-ray and gamma mirrors are impossible to build the way you think - mainly because there is much less interaction with the matter comparing to UV - it will go through all materials commonly used for making mirrors. Even for EUV light (wavelength of 13.5nm) building effective mirrors is a royal pain.
As wavelength of X-Rays is very small (down to 0.01nm) you cannot build dielectric mirrors, as this would require depositing dielectric layers which are less than 1 atom thick.
It is only possible to reflect X-Rays at a very shallow angle (see Kirkpatrick-Baez X-Ray lens design), so you cannot use this for shielding of radiation coming from all directions. Gammas are even worse - the only thing you can do is to bring alot of mass.
Comment: @SidharthGhoshal required pressures would be impractical, it's not like we need 2-3 times more. we need magnitudes more. Think of a pressure inside neutron star.  Shallow angle reflection is our best bet.
Comment: Does this change by putting materials under high pressure? Presumably some very cold highly pressurized (and therefore very dense) material might be able to become more absorbing of smaller wave length forms of light. Under that same idea I would naively can ask such a material be more reflective to smaller wavelengths of light?
Answer: Yes it is possible but as BarsMonster points out it isn't like an optical mirror.  X-ray reflectors are used in the construction of nuclear weapons and are critical to increasing the yield.  How they work is the initial fusion reaction releases high energy radiation, this is then reflected back into the reaction mass increasing the energy levels of the reaction mass causing a sort of radiation implosion.

The reflector is typically a cylinder made of a material such as
  uranium. The primary is located at one end of the cylinder and the
  secondary is located at the other end. The interior of the cylinder is
  commonly filled with a foam which is mostly transparent to x-rays,
  such as polystyrene.
The term reflector is misleading, since it gives the reader an idea
  that the device works like a mirror. Some of the x-rays are diffused
  or scattered, but the majority of the energy transport happens by a
  two-step process: the x-ray reflector is heated to a high temperature
  by the flux from the primary, and then it emits x-rays which travel to
  the secondary. Various classified methods are used to improve the
  performance of the reflection process.

Since these type of reflectors are typically used in weapons research there is not much public data on them.  However here is a rough illustration of what an x-ray reflector looks like in the second stage (reference).
Comment: And in case anyone thinks "but it works..." it only works for a very, very short time until the reflector turns into lead / uranium vapor. But by then it's job is done.
Answer: There are a lot of X-ray mirrors in space and around the world. Applications are X-ray astronomy, synchrotron sources, some medical and litographical application. So it is not something theoretical.
All these mirrors have in common is to reflect light at grazing incidence, they are shaped in way to focus the light in a same way that happens for visible light with visible optics, however this is the reason why mirrors focus, not if and why they reflect X-rays.
Several physical principles are used to reflect light depending on the energy (metallic coating, multilayers or crystals). However the question asks if these mirrors can be used to deflect the radiation for human space travel, and the answer is no, because when radiation hit at a large angle they don't act as mirrors any more, but act more like shields.
At this point is more practical to directly use shields (absorbing material), depending on energy it can mean to carry a good amount of extra-weight in space.
Comment: You should give a link, for example https://en.wikipedia.org/wiki/X-ray_optics#Mirrors_for_X-ray_optics

How would an X-ray mirror work?


Engine dies when brake pedal is pressed

Question: 1995 Chevy Cheyenne C2500 dies when brake pedal is pressed. Run fine when started.
I changed the brake booster and the EGR valve and problem still there!!!!
Comment: Happens when car is stationary in neutral?
Comment: That sure sounds like a vacuum leak.  Did you check the brake booster to verify that it will   hold vacuum before you put it into the car?
Comment: Did you change the one way valve?
Answer: Many GM vehicles use a wiring grounding buss that the electric fuel pump, brake lights, taillights and back-up lights all share. The buss is a strip connector about 3 inches long and is located in the trunk on the left side down in the well behind the taillight assembly on some cars. You will have to remove the material insulation to get at it. Take the buss connector apart and clean all the connections thoroughly. My 1993 Saturn SC1 engine quit when the brake pedal was pushed because the brake light bulbs were competing with the fuel pump for a good ground and the fuel pump lost out.
My ground buss strip was completely corroded. I had to clean it on a power wire wheel and then use a jewelers file on each female connector after I released them one by one from the buss strip. I also used DeoxIT D5 on the buss before I put it back together. To ensure a good ground I drilled out the copper buss strip and added a 2nd ground wire with a machine screw and connected it to one of the bumper bolts after checking for a good ground. Make sure you use a wire brush or wire wheel on a cordless drill to get to bare metal on the bolt threads and nut. I added a second ground because I did not know how good the factory ground was and I did not want to crawl under the car and try to find it.
After you clean up the ground buss strip, and the car/truck is running great again, open the engine hood and clean up any grounds you can get to. You will be surprised to see how corrosion has built up over the years. Don't forget the DeoxIT D5. The stuff is amazing.

Engine dies when brake pedal is pressed


How to play a webm video file?

Question: I have tried vlc, Banshee and Totem but none of them recognize the webm format. Even the system does not recognize its mime-type. How do I play it ?
Answer: You will have add the PPA ppa:gstreamer-developers/ppa
To do that

Open Update Manager.
Click on Settings.
Go to 'Other Software' Tab.
Click 'Add'
Paste ppa:gstreamer-developers/ppa and click add source.
Click close , Reload when asked.
Install Updates.

Now you can view webm in the default media player(totem) .
Additionally if you want to make it automatically open in totem,right click and select open with other application and select Movie Player and tick 'Remember this application for webm documents'
Source

Same via the command line:
sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get update && sudo apt-get upgrade
# fixing a weird gstreamer installation error
sudo apt-get -f install

# now "totem <your .webm file>" will do the right thing )

Source
Comment: webm is an open format .
Comment: i have added the required steps from the video.
Answer: Firefox 4 and Chromium will play it.
Comment: only if you have the codecs for webm installed. Firefox and Chromium don't play it out of the box on some versions of ubuntu . For example ubuntu powerpc and I think in ubuntu for arm , firefox does not play webm videos
Answer: VLC
sudo add-apt-repository ppa:n-muench/vlc
sudo apt-get update
sudo apt-get install vlc

It runs almost every format, haven't used a format that it could not use.
From VLC 1.1.0 release log:

Support for WebM decoding and encoding
Answer: This is not a real solution i guess, but you can rename it to .mkv as it is based on matroska and most media players should be able to play it "as is" provided that you have all the necessary decoders, demuxers etc. for the included media streams already installed.
There used to be occasions where a player didn't recognize or accept the file extension, while it could open it and play back the content after it was renamed to .mkv though.
Answer: I simply right clicked on the icon, selected "open with" and found msplayer. Clicked on Msplayer and the video went on like a charm
Comment: Are you sure that is "msplayer"? Where can you download and install it?

How to play a webm video file?


Why 192.168.0.0 cannot be assigned to device?

Question: 192.168.0.0 can be an address of network and it cannot be assigned to any device in local network. But why? Couldn't router using mask (like 255.255.0.0) figure out what is the network address anyway?
Answer: From http://web.archive.org/web/20100821112028/http://www.3com.com/other/pdfs/infra/corpinfo/en_US/501302.pdf (page 14):
"Defining Host Addresses for Each Subnet
According to Internet practices, the host number field of an IP address
cannot contain all 0-bits or all 1-bits. The all-0s host number identifies
the base network (or subnetwork) number, while the all-1s host number
represents the broadcast address for the network (or subnetwork)."
More authoritative is RFC-943 at http://www.ietf.org/rfc/rfc943.txt:
<code>In certain contexts, it is useful to have fixed addresses with
functional significance rather than as identifiers of specific
hosts.  When such usage is called for, the address zero is to be
interpreted as meaning "this", as in "this network".  The address
of all ones are to be interpreted as meaning "all", as in "all
hosts".  For example, the address 22.214.171.124 could be
interpreted as meaning all hosts on the network 128.9.  Or, the
address 0.0.0.37 could be interpreted as meaning host 37 on this
network.
</code>
Comment: This restriction applies only to IPv4; IPv6 does not have a similar restriction, and the lowest network address is usable by hosts.
Comment: Wrong !. RFC 943 Obsoleted by RFC 960 Obsoleted by RFC 990 Obsoleted by RFC 1010 Obsoleted by RFC 1060 Obsoleted by RFC 1340 Obsoleted by RFC 1700 Obsoleted by RFC 3232. And the 3com document you linking is from 2001 !!!
Comment: @BartłomiejZarzecki - You're quite right. Unfortunately I can't delete an accepted answer.
Comment: Short version is: an IPv4 address with 0-s in the end is a network address. Long version at the proper university.


Is protein powder recommended for older people after workouts?

Question: This might be an odd question. My mom does walking exercises and aerobic videos and some very light weights (5lb). She knows that I make protein shakes (with spinach, berries, flax seed) after my workouts. Is whey protein recommended for elderly people (she's 62) too?
Comment: A little shouldn't hurt if she doesn't have any kidney problems. It may even help if she experiences soreness from her workouts. In all honesty, it doesn't sound like she works out at a high enough intensity for it to make a huge difference.
Comment: Seconding Evan. Protein is great, but it doesn't sound like she's doing enough strength training to need supplementary protein.
Comment: Also remember that protein from food is the best. However, if you find that you are lacking in the amount of protein you need then powders are a good substitute.
Comment: How is the rest of her diet? If she's getting adequate protein from her regular meals there is probably little to no benefit from a shake. On the other hand, if her protein is low she might benefit.
Comment: btw ,  try  adding  whey  protein  BEFORE workout as well as after.
Answer: Yes, whey protein can be helpful for elderly people also. The Journal of The American College of Nutrition, JACN, reports that the elderly have greater protein requirements than younger adults.  Given that your mother is exercising, ingesting whey protein (or other biologic sources of protein), especially immediately following exercise, may well help her minimize age related muscle wasting. Here are some references:
JACN  -

Protein tissue accounts for 30% of whole-body protein turnover but that rate declines to 20% or less by age 70. The result of this phenomenon is that older adults require more protein/kilogram body weight than do younger adults.

High levels of dietary protein will not affect renal function in an individual who does not have predisposing renal disease.

.. the requirements for exogenous protein is at least 1.0 gram/kilogram body weight with additional amounts needed to heal wounds or pressure ulcers, to fight infection, or to build new tissue to replace normal losses

Regular exercise will stimulate protein tissue turnover and maintain muscle mass. However, it is essential that adequate energy and protein be provided from exogenous sources so that muscle tissue and other protein components can be restored.

According to a study in the January 2008 issue of "Current Opinion in Clinical Nutrition and Metabolic Care",

Elderly individuals are still able to respond to both resistance training and the anabolic signals provided by protein ingestion, provided specific amino acids, such as leucine, are present. Whey proteins are a rich source of these essential amino acids and rapidly elevate plasma amino acids, thus providing the foundations for preservation of muscle mass. Several studies involving supplementation with whey protein have been shown to be effective in augmenting the effects of resistance exercise, particularly when supplementation occurs in the hours surrounding the exercise training.

Even though your mother's exercises may not be very intense, it sounds like she is on the right track and the addition of whey protein following her exercises can help maintain muscle mass and should not hurt (unless she has kidney disease as @Evain Plaice pointed out).
Comment: You are welcome.  Good luck to your Mom.


Why are there different statistics tests in NIST SP 800-90B and NIST SP 800-22?

Question: NIST SP 800-22 (published in 2010) lists out some statistical tests for telling good random bit generators from bad ones.  NIST SP 800-90B (published in 2018) has apparently the same purpose but lists out a very different set of tests.  Why?
Answer: Publication NIST SP 800-22 is a Standard, the NIST SP 800-90B recommendation might someday replace the current standard after it is ratified.

Sources for answer:
NIST SP 800-22: "A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications", Published: September 16, 2010

Abstract
This paper discusses some aspects of selecting and testing random and pseudorandom number generators. The outputs of such generators may be used in many cryptographic applications, such as the generation of key material. Generators suitable for use in cryptographic applications may need to meet stronger requirements than for other applications. ...
[Supersedes SP 800-22 (May 15, 2001): http://www.nist.gov/manuscript-publication-search.cfm?pub_id=151222 ].

News Release: "NIST is Proud to Announce the Release of 2 DRAFT Publications" (September 05, 2012):

NIST requests comments on two Draft publications for random bit generation: Draft SP 800-90B, Recommendation for the Entropy Sources Used for Random Bit Generation and Draft SP 800-90C, Recommendation for Random Bit Generator (RBG) Constructions.

News Release: "NIST Requests Comments on Computer Security Publication on Randomness" (January 27, 2016):

The Second Draft of Special Publication (SP) 800-90B, Recommendation for the Entropy Sources Used for Random Bit Generation, aims to help security specialists judge whether the source of random numbers they use as part of the data encryption process is sufficiently unpredictable. NIST is requesting public comments by May 9, 2016, on the draft document, which is available at NIST's CSRC website.

Series 800-90 Documents: "Random Bit Generation":

Project Overview
The following publications specify the design and implementation of random bit generators (RBGs), in two classes: Deterministic Random Bit Generators (pseudo RBGs); and Non-Deterministic Random bit Generators (True RBGs).

SP 800-90A, Recommendation for Random Number Generation Using Deterministic Random Bit Generators

June 25, 2015:  This Recommendation specifies mechanisms for the generation of random bits using deterministic methods. In this revision, the specification of the Dual_EC_DRBG has been removed. The remaining DRBGs (i.e., Hash_DRBG, HMAC_DRBG and CTR_DRBG) are recommended for use. Other changes included in this revision are listed in an appendix.

SP 800-90B, Recommendation for the Entropy Sources Used for Random Bit Generation

January 10, 2018:  This Recommendation specifies the design principles and requirements for the entropy sources used by Random Bit Generators, and the tests for the validation of entropy sources. These entropy sources are intended to be combined with Deterministic Random Bit Generator mechanisms that are specified in SP 800-90A to construct Random Bit Generators, as specified in SP 800-90C.

SP 800-90C, Recommendation for Random Bit Generator (RBG) Constructions

April 13, 2016:  NIST invites comments on the second draft of NIST Special Publication (SP) 800-90C, Recommendation for Random Bit Generator (RBG) Constructions. This Recommendation specifies constructions for the implementation of RBGs. An RBG may be a deterministic random bit generator (DRBG) or a non-deterministic random bit generator (NRBG). The constructed RBGs consist of DRBG mechanisms, as specified in SP 800-90A, and entropy sources, as specified in SP 800-90B.  The comment period closed June 13, 2016

On May 2-3, 2016, NIST hosted a workshop on Random Number Generation to discuss the SP 800-90 series of documents--specifically, SP 800-90B and SP 800-90C.
Comment: The question is on the statistics tests themselves contained in these two documents.  For example, from 2010 to 2018 has there been a revolution in the way RBGs are tested?  Why have the tests changed so much from 2010 to 2018?  (For instance, in NIST 800-22 there's the Binary Matrix Rank Test and the Discrete Fourier Transform Test, neither of which are present in NIST 800-90B.  Why not?)
Comment: Many numerical sequences will pass the BMRT, including files that have been compressed and the theoretical reference distribution of the DFTT statistic has not been derived. Better tests than the DFTT have been developed: [Randomness Test to Solve Discrete Fourier Transform Test Problems](https://www.jstage.jst.go.jp/article/transfun/E101.A/8/E101.A_1204/_article). Despite dissatisfaction with 800-22 it still must be passed to obtain that certification. Whether the new list is sufficient is under discussion: https://www.nist.gov/news-events/events/2016/05/random-bit-generation-workshop-2016


table = soup.find("table", { "class" : "infobox ww_ib ww_ib_1" }) is not working

Question: I'm trying to parse the table given at this location: "http://en.wikipedia.org/wiki/Quartz"
The property table is identified as the class = infobox ww_ib ww_ib_1.
I am expecting to obtain the values given in the table such as:
'Category, Oxide, Chemical formula etc..."
However, the table returns a None type.
Could someone please help me?
<code>from bs4 import BeautifulSoup
import requests
wiki = "http://en.wikipedia.org/wiki/Quartz"
header = {'User-Agent': 'Mozilla/5.0'}
req = requests.get(wiki,headers=header)
soup = BeautifulSoup(req.content)
table = soup.find("table", { "class" : "infobox ww_ib ww_ib_1" })
print (table)
</code>
Please do let me know if you know of better ways to scrape wikipedia!
Comment: And your expected output? No hints of that in your question.
Answer: I was able to figure out what the problem was. The class of the table is just 'infobox' and not 'infobox ww_ib ww_ib_1"


Gaining items after a match

Question: Are there any condition to when or what items will be given to a player at the end of a match? Or is this pure luck base, or in my case un-luck based, since I played about 20 matches I often see 4 or 5 players get an item, sometimes just a couple. However in all those matches, only a single time I got presented with an item.
Comment: It still feels weird, I see an average item count of 3. That means every 3.3 games i should get an item. After 15-20 games i only got one item. Or i am extremely unlucky, or most of the times i play vs people they coincidentally level and get there lucky shut on a random. Both of these are possible since i have only so much games played and started paying real attention on this the last 5 or so. Or there is still something not being said or clear to me.
Answer: This might be outdated.
You get items regardless of the match outcome, that is, no matter you win or lose you have the same chance of getting items. However, there are two things to consider:

You get one item 100% when you level up. Considering this, winning is actually beneficial to get items, because winning makes you level up faster, and leveling up gives you items.
Depending on your level shown in your profile, you gain the chance of getting more rare items. After around level 15-20(not entirely sure), you will be eligible to gain arcana(rarest droppable) items, so after 225-300 games (obviously depends on win/loss ratio) you have the chance to gain all droppable items.

However, there is no information about whether or not there is a difference of drop chance between a 10 level and a 150 level account.
Comment: Winning has no effect on how many battle points you're awarded, as far as we know.
Comment: The above comment is true. [Battle points only depends on the match length](http://dota2.gamepedia.com/Battle_Points), and I can confirm it... but it's moot since it's been replaced by [trophy system](http://dota2.gamepedia.com/Trophy) in Reborn.
Answer: There are a few ways of getting items.

Random drop after each match
Going up a level after every 1000 battle points
Market place
Trade with other players
Answer: Every time you "level" up your account (hit 1000 points) you get a guaranteed item.
You also randomly get chests and more rarely other items.
If you get a random item you can also get another item from leveling up so you can get at most 2 items per game from this.
Next to this there are also special items like Shopkeepers Surprise which causes a random person currently playing on the server (not necessarily in your game) to get an item.
Source: http://dota2.gamepedia.com/Item_drop_system
Answer: Make the game last 100+ minutes this should increase your chances on getting drops
E
Comment: A 100+ minute game does not guarantee drops for everybody though.

Gaining items after a match


Should I edit a question to address a new concern or create a new one?

Question: Say, there is "maxim" vs "aphorism" question. I want to know the difference between "tenet" and "maxim". Do I edit the first question, extending it with the new concern, or create a new one?
Comment: A question about **tenet** is at most "related" to the linked question about **maxim** vs **aphorism**. Besides, tenets are more about *beliefs*, whereas maxims and aphorisms are often just *sayings*, which you may or may not believe.
Answer: I think you have answered yourself: a new concern is a new question. One important consideration is that adding a new concern would invalidate, in part, every answer which has already been posted.
You should edit

to fix grammatical or spelling mistakes
to clarify the meaning of a post without changing it
to correct minor mistakes or add addendums / updates as the post ages
to add related resources or hyperlinks

[from edit questions and answers]

but should not edit to change the meaning of the post.


how to wire a light fixture to a plug?

Question: I have a light fixture that I want to wire to a plug-in wiring setup. The fixture has three white wires and three black wires, it also has a separate, bare ground wire. My plug style wiring is a normal 2x15A 300v plug. One side has a ribbed edge and the other has a smooth edge.
The fixture is a three bulb setup, thus, the three wire connection. I am just unsure how to safely wire this to a plug in wiring arrangement.
Thank you.
Comment: If only there were such as a standard plug.  Even if we knew what part of the world you are in we still might have to guess.  Photos of the lamp and plug would help greatly.
Comment: Yes, where the heck do the use 300V mains?
Comment: I guess 300V is (a typo or) the insulation rating on the plug and 2x15A means two-pin plug (no earth) rated at 15A. Given the black/white wire insulation that makes it likely a typical US 120V(nominal) 15A circuit.
Comment: You have not mentioned a switch.  How do you plan to turn the light on and off?
Comment: @Grant, is there an instance where ribbed to the white wires and smooth to the black isn't the right way to wire this?  Regardless of mains voltage?
Comment: Related, if not outright duplicate: http://diy.stackexchange.com/questions/29496/which-side-of-a-two-wire-cable-should-be-used-for-hot
Comment: Need more detail. Photos trump detail if you can post them.
Answer: I'm guessing that you are repairing or replacing the light fixtures plug? And if so you would like to know how the wires are connected? The lamp cord as you noticed, has a hot side (which is marked with 'ribs' on the plastic insulation. The other smooth side is the neutral. The repair plug you have is a 2 prong (male) type plug? Which means there is no ground for the fixture. The white wires at the fixture are twisted together and so are the 3 black wires. In order to connect the plug you must connect a white length of wire (and the same for the black) to the wires at the fixture. Twist them tight and secure with a wire nut. You should now have two wires connected to the fixture. ******Please read****:  This answer is assuming a lot from your question. If my second guessing is correct please say so in the comments section below and I will continue responding with an answer.*******

how to wire a light fixture to a plug?


What are the subjects that one must learn while an undergraduate to pursue an academic career in Biophysics?

Question: I am an undergraduate student pursuing a B.Sc(Hons.) degree in Physics. I want to pursue an academic career in Biophysics. So, I wanted to know which subjects are required for higher studies in Biophysics. In my course, we get to choose one ancillary subject for the first two semesters, then another ancillary subject for the next two semesters. The final two semesters are fully focused on Physics. I am about to complete my second semester, and I took up Mathematics as my ancillary subject. Now, I need to choose between Chemistry, Computer Science or Microbiology for the next two semesters, and I am not sure which one to choose. Microbiology is looking like the obvious choice but I think that knowledge of Chemistry and Computer Science is also going to have applications in Biophysics. So could you help me out by telling me which one of these subjects would be most beneficial in learning, keeping in mind that I want to pursue Biophysics in the future?
Comment: There are several "close" votes most likely because this question would be a much better fit in the Physics stackexchange than the Academia one, since it's not a general question about academia.
Comment: @RaghuParthasarathy Suitability for another site is not a reasonable close reason.
Comment: If you know who you might like to supervise your PhD, you should ask them.
Comment: My comment was not well written. The question is not a general question about academia and so is not within the scope of this site, and so will likely be closed. It is, by the way, a very appropriate question for the physics site.
Comment: Thank you for your comment and answer Raghu Parthasarathy, I will take this question to the Physics site as well. I am new at this site, so pardon me for my errors.
Answer: Specific biological domain knowledge will be something that you will learn in the course of doing research, and can be hard to predict at this point in your studies, because you have no idea what kind of graduate program you'll be admitted to or the specific research field of your prospective advisor.
Therefore, while all of those directions sound fine and won't be wasted if you choose them, I would lean towards the more foundational topics, i.e. Chemistry or Computer Science, that you could use no matter what direction you took in the future. Another option would be statistics, since nearly any biophysics research involving experiments will need a very solid understanding of stats to design experiments with high statistical power, and to make sense of the resulting data without getting tricked by spurious correlations.
Answer: Though I've commented that this question should be moved to https://physics.stackexchange.com/, I'll point out that all of these options are fine. Personally, I think a lot of the really exciting current work in biophysics intersects microbiology, but I am perhaps biased in that this is what my lab works on! I will also note that computational skills are extremely valuable (for experimentalists as well as theorists).
Answer: Assuming you were seeking to get your biophysics PhD in a physics department in the US, none of the subjects you listed are essential.  It would be very important to complete a physics major with good grades in physics subjects.  Research experience would also be very helpful.  Math/chemistry/computer science/biology would all be helpful, but none of them stand out as more important than the others.  I might suggest statistics/computer science because those are subjects that many biologists might not have studied or wish to practice, and therefore they might appreciate your skills.
After you complete your PhD, your undergraduate coursework will not be scrutinized much by employers.  You should have learned many skills that are not included in the undergraduate curriculum before you finish your PhD.
Answer: If you have scholarship money, financial aid money, or money to pay for extra classes, you don't have to pick and choose. You can take all those courses if they interest you but not all of them will go towards your degree. Your objective is to get your degree and I also see your desire to learn the most valuable information. Please go to your counselor and express this. I hope this provides some insight.
Answer: Check if your department has an undergraduate course coordinator - a person who's supposed to help undergraduates choose courses. He or she would be the person best-positioned to answer your questions, especially since the courses you should take depends on what your department offers in the first place.
If your department does not have an undergraduate course coordinator, ask your biophysics professor(s) instead.


How to calculate weight of an object on an angled surface?

Question: What formula could I use to calculate the apparent weight of an object on an angled surface, e.g, a 100 kg box on the side of a hill at 10° given that the measuring instrument is also at that same 10° from level?
Comment: You need to think first that force is a vector. On a plane surface you have the weight as you read it in the scale. If you have it on a tilted surface, then the weight is "distributed" differently along different directions.
Answer: Note :- reading of a instrument like weighing machine is not the actual weight of the object placed on it but the normal force applied but the object  on the scale .  so now from the image we can see for equilibrium of the block normal to incline we have $ R = mg cos( \theta) $  hence the reding would be not equal to the weight of the object but a little less than it.
Answer: The apparent weight is just the normal force. Using geometry you can figure out that the normal force is given by $$F = mg\cos\theta.$$


Atheist Arguments

Question: Has there ever been an atheistic argument for why Christianity? I've heard arguments about the "inconsistencies" and "divinity of Jesus" and etc. but I've never seen one that tries to explain why a person would want to be excommunicated from one's own family or synagogue or even to die for a man who was so radical for his time.
Answer: Atheists and sceptics have plenty arguments against the existence of Jesus, the divinity of Jesus, the resurrection of Jesus and even arguments that the early Christians were not persecuted.  There appears to be a reluctance to accept the four Gospel records and the Acts of the Apostles as historical evidence, although anything written by historians who were not Christians, who had never met Jesus or known him, might be accepted.
There is an argument that the Emperor Hadrian wrote a letter claiming that worshipers of Serapis called themselves Christians. The letter identifying Christians with Serapis-worshipers was supposedly written in AD 134, but the document from which the letter comes, the Historia Augusta has been shown to be a forgery dating to AD 395. Hadrian did not write the letter.  https://www.gotquestions.org/Serapis-Christus.html
Perhaps the fact that thousands of Christians were prepared to die for their faith and belief in the resurrected Jesus discomforts atheists and sceptics because it presents a powerful argument for the reality of Christianity.
It is true that those first Christians ran the risk of being made social outcasts, never mind facing imprisonment, torture and death.  Why would any sane and rational person risk all for a myth?  According to the historical record (The Book of Acts 4:1-17; Pliny's Letters to Trajan X, 96, etc.) most Christians could end their suffering simply by renouncing the faith. Instead, it seems that most opted to endure the suffering and proclaim Christ's resurrection unto death.
What makes the earliest Christian martyrs remarkable is that they knew whether or not what they were professing was true. They either saw Jesus Christ alive-and-well after His death or they did not. This is extraordinary. If it was all just a lie, why would so many perpetuate it given their circumstances? Why would they all knowingly cling to such an unprofitable lie in the face of persecution, imprisonment, torture, and death? We have the apostles Paul and James who willingly suffered and died for their testimony about Jesus, a fact which attests to the sincerity of their belief (see The Book of Acts and Josephus' Antiquities of the Jews XX, ix, 1).
For sceptics who disregard the written testimony of the people who lived with Jesus, who saw him die and then met with him after his resurrection, we have the non-Christian historical accounts of Flavius Josephus, Cornelius Tacitus, Lucian of Samosata, Maimonides and even the Jewish Sanhedrin corroborate the early Christian eyewitness accounts of these important historical aspects of the death of Jesus Christ. Information on the persecution of Christians by Nero and Domitian (who had 40,000 Christians killed in the year 95) in this link: http://www.biblicalcyclopedia.com/P/persecutions-of-christians.html
If anybody can come up with an argument against Christianity, I would be interested to see it.
Comment: Though I don't think any argument could be made on the Bible's coherence. I have read it through and studies some, and see no flaws of contradictory. Everything lines up.
Comment: I appreciate your ability to sum up my question so succinctly "Why would any sane and rational person risk all for a myth?"
Comment: I am a believer in the risen Christ Jesus and have been talking with a colleague of mine who is an atheist. Before I pose this question to him I thought I would give Stack Exchange a try and see if there was anything rational argument for the "Why" in Christianity. I came the the same conclusion that that you did, there is no good reason for throwing you life away for a "myth".

Atheist Arguments


Expected matching in a bipartite graph

Question: Consider a random bipartite graph constructed on vertex classes of size $n$ with each edge present independently with probability $p$. How could I go about calculating the size of the expected matching?
Answer: If $p$ is fixed and does not depend on $n$, then by a result of Frieze and Melsted (http://www.math.cmu.edu/~af1p/Texfiles/cuckoo2.pdf), the probability that there exists a perfect matching is 1-o(1). In another word, the size of the maximal matching is $n$ with high probability.
The paper of Frieze and Melsted has the following theorem: Let $\Gamma$ be a bipartite graph chosen uniformly from the sets of graphs with bipartition $L$, $R$, $|L| = n$,$|R| = m$ such that each vertex of $L$ has degree $d \ge 3$ and each vertex of $R$ has degree at least two. Then with high probability, the size of the maximum matching in $\Gamma$ is $\min \{m, n\}$.
Though the above theorem does not directly answer the question here, in our setting we have $m = n$ and the mean degree of each vertex is $pn \gg 3$. So the conditions of the theorem should be satisfied with high probability and there exists a perfect matching.
Comment: what if $p$ does depend on $n$?
Answer: Suppose that the expected number of matchings of size $r$ for some $r \leq n$ is at least $1$. That is, we expect to have a matching of size $r$. By linearity of expectation:
$$1 \leq {n \choose r}^2 r! \ {p^{r}}$$ that is you need to find the asymptotic for $r$ to satisfy this.
Comment: "The expected number of matchings is at least $1$" and "We expect to have a matching of size $r$" are not the same thing!  For example, consider the case where $r=n$ and $p=\frac{10}{n}$.  Then the expected number of matchings tends to infinity exponentially with $n$, but it can be shown that there will almost surely not be a matching (e.g. because with high probability there is an isolated vertex in the graph; this ties in with some of Pavan's other questions).
Comment: Ok just to clarify your calculation, the expected number of $r$-matchings is $\binom{n}{r}^{2}r!p^{r}$ this follows because there are $\binom{n}{r}^{2}$ ways to select a set of $r$ vertices from each class, then there are $r!$ possible matchings each which occur with probability $p^{r}$ Is this correct?
Comment: What if I changed the question to the expected size of the largest matching?
Comment: @PavanSangha you got my calculation right. This "treats" the case of the largest matching because the largest matching to occur will be typically with the largest $r$ such that the inequality holds.
Comment: @PavanSangha if you wish to make this more accurate, you need to calculate the probabilities of the maximal matching being of any given size. You can do this by taking my expectation and plugging it into some inequality (Markov, Chebyshev). Then will you be able to estimate the expectations using the estimates on these probabilities.
Comment: @KevinP.Costello theoretically you are completely right and I see the difference, but my point was that if you have a good expectation and use Chebyshev (this distribution is fairly concrete) you can derive bounds on the size of the maximal matching. Maybe for this to work well you cannot let $p$ go to $0$ too fast.

Expected matching in a bipartite graph


How to deal with employee who do lots of vacation?

Question: My father is facing a difficulty that one of his employee do vacation once after two days. Even though he is a very honest and hard working employee, and also takes holidays for genuine reasons, it still affects my father's business.
Comment: Does "a lot of holidays" means he takes every other month off, or he does many 1-2 days holidays frequently?
Comment: You might want to get used to use 'vacation' or 'PTO'='paid time off' instead of the term 'holiday', to avoid misconceptions. Christmas and New Years Day are 'Holidays', and the government defines them. Employees take 'Vacation'. Of course, your meaning is clear from context, but that's not what is the usual use of the term, at least in the US.
Comment: In America, perhaps. In some other countries what you refer to as vacation is referred to as holidays.
Comment: Is this employee expecting to be paid for days that he takes off?
Answer: There should be an employment contract that says how many days of paid holidays every employee has. If that isn't mentioned in the contract, then there are probably laws in your country that state the minimum.
Every employee has the right to take the holidays they are entitled to, and the reason why they take it is none of yours or your fathers business. Your father has to arrange his business to handle this. If they want more holidays, then they can ask their employer, and the employer either says "yes" or "no", and usually additional holidays would be unpaid.
Answer: The work location is helpful to know but in most developed countries paid holidays by law are between 2 and up to 4-6 weeks.
Anything more is usually unpaid or partially paid.
Furthermore holidays usually have to be agreed to by the employer and contractually or by law not guaranteed amounts won't need to be acquiesced by the employer.
Depending on the relationship and the employees mindfulness to the company it is always possible to plan holidays into natural business slumps or convenience for both parties.
If the employee is being unnescessarily difficult and frank conversations don't help there is always the door...


Dual insurance question

Question: Here is the scenario:  I am about to retire from the state of CA, but I will retain my State of CA health insurance (PPO--Anthem PERS Gold).  I am going back to federal employment, and I have several options in front of me, including a comparable insurance with Blue Cross, as well as a couple of HSA/HRA options.  I will be the primary on both insurances, have a spouse and two children covered (for now) under the State health insurance.  What is my best option here?  The copays/costs between the two Blue Cross policies is comparable.  I am wondering if I am even eligible for a HSA or HRA policy with the federal government.
Comment: you may be eligible for policy, but not eligible for HSA because of the other lower deductible coverage you still have
Comment: why do you want dual coverage? are both policies free?
Comment: Note that if two policies are providing the same coverage to the same person, you need to work with them to designate one as primary and one as secondary.... assuming they are willing to do that
Answer: You are not eligible for an HSA if you have other low-deductible insurance coverage.
OPM has an FAQ here

Who is eligible for an HSA?
You must participate in a High Deductible Health Plan, have no other insurance coverage other than those specifically allowed...

IRS Pub 502 has all the specific rules for HSAs.
Do you actually need this additional insurance? If you have insurance from CA through some sort of pension plan then it might make more sense to just waive the FEHB (fed insurance) and not spend money on the premiums.
Note that you might still be able to get the high-deductible insurance, just not use the HSA. But the HSA is kind of a big part of why you would choose a HDHP in the first place...
Comment: THanks all for your responses!  I particularly appreciate the help and verification of my understanding of the ineligibility of getting an HSA.  Major bummer. The pension plan insurance is free, the other is not but is a pretty minimal cost in terms of premium.  I can also cancel it by the end of the year if needed, during open season.

Dual insurance question


word/phrase for initial set of data or givens

Question: I'm searching for a neutral phrase that conveys the concept of the initial condition/situation/position/set of givens or factors impacting an outcome. For example, the idea of a 'headstart' conveys an advantageous initial position toward pursuing a goal. I am searching for something similar without the connotation of an advantage - but simply indicating the 'start' position, and a certain 'opening' configuration of facts.
Answer:
Mise en scène
Situation or composition (the initial setup of a chess problem)
Form, to which is applied a handicap
Comment: The sports or competitive analogy is apropo. I can't use the notion of 'odds' - because I'm not describing probabilities, but if there were a word for the sum of the abilities of a sports team - (individual averages, the team's prior successes etc.) as considered before the match begins - that would work as a good metaphor
Comment: @llana - A *handicap* is what judges (in horse racing, bowling, golf, etc.) apply to the situation you're describing in order to even the playing field.  So that's where I'm searching - what do handicappers call the situation **before** they apply a handicap?
Comment: @llana - I just remembered the word: **form**.  The [Daily Racing Form](http://www.drf.com/) is a paper dedicated to all aspects of racing, but in general terms "form" refers to a horse's record PLUS his race-day condition, while **the form** refers to the condition of all entrants in a race: "What's the form?"  It has also come to be used conversationally: "You're in fine form today, aren't you?"
Comment: I think I may just use 'handicap' for the context I need - Thanks!!
Comment: @llana - Fair enough, but be aware that your readers may take away a different meaning than you intend.  A handicap is a penalty added to the stronger competitor - in horse racing, faster horses must carry extra weight - or (as in golf) subtracted from the score of a weaker competitor.  It is *not* the initial position - that's the form.
Answer: How about:

Original

As in the original condition, or situation, position


Lucene demo comes with .class files. how to convert it to java files

Question: I am an absolute beginner in java.
I wanted to know how to convert the .class files in the lucene demo and i want to use the java version.
HOW SHOULD I DO THIS.
please help
Answer: .class file is compiled .java, just like .exe is compiled, e.g., .cpp. You can reverse by the process by using Java decompiler. However I'm pretty sure source code is also available, since Lucene is open source.
Which classes do you want to see? Most likely you'll find them in maven repositories or in source control repository of Lucene.
Comment: when i copy the demo source code into eclipse, i dont get to see any of the files and cant open it
Answer: To decompile java class files, you can use JAD Decompiler
If you don't like working with command prompt you can use DJ Java Decompiler
JAD is available for a lot of OSes, DJ is Windows-only
Answer: I'm assuming you have downloaded the code for this lucene demo, opened the project in Eclipse, and the demo uses the lucene library.
Of course this library uses the compiled classes, but you don't need to decompile them. You need to download the source code from lucene site that matches the library version (for instance, 3.6 or 4.0). Then in Eclipse when you go to project properties, libraries section (I think it's inside Build Path) you can add a folder that contains the source code for the desired library (in this case, the lucene jar). Once that is done, if you open a Lucene class you will see the associated Java source file.


How do I completely uninstall Google Chrome and Chromium?

Question: I'm having a problem with Chrome and one of its extensions, so I want to completely uninstall everything. I've uninstalled Chrome through the Software Center, but when I reinstall it, all of my extensions and preferences are still there.
If I want to start over from scratch, what do I need to do?
Comment: I'm going to make this into a more general question, since the directions here will cover both Chromium and Google Chrome.
Answer: Note: this recipe has been updated in

2023 to include instructions for Snap-based installations
2020 to more safely backup the files rather than using a recursive delete

Snap-based installation (Ubuntu 22.04+)
Uninstalling the Chromium Snap is relatively straightforward:
sudo snap remove chromium

APT-based installation (< Ubuntu 22.04)
To uninstall Chromium Browser, run these commands from your terminal:
$ sudo apt-get purge chromium-browser
$ mv ~/.config/chromium/ ~/.config/chromium.bak/

To uninstall Google Chrome, run these commands from your terminal:
$ sudo apt-get purge google-chrome-stable
$ mv ~/.config/google-chrome/ ~/.config/google-chrome.bak/

In both examples, the first command removes the package, while the second command will move custom settings, such as plugins, to a backup directory.
Comment: Don't forget there are also files in `~/.cache/google-chrome/` and `~/.config/google-chrome/`. And there are variants of Google chrome like `google-chrome-beta` and `google-chrome-stable`. If in doubt you can check you've got everything by running `locate google-chrome`. locate is a local search tool that can be installed with `sudo apt install locate`
Comment: Successfully uninstall 'Google Chrome' stable.
Comment: For me, `locate google-chrome` returned a lot of files that had already been deleted.  If anyone faces the same problem, run `sudo updatedb` to update mlocate database. (`locate` searches for entries in mlocate database)
Comment: This may have been correct at the time, but as of Ubuntu 22.04 you must "sudo snap remove chromium".  See https://askubuntu.com/questions/1401800/how-to-remove-chromium-from-snap .
Answer: For Google Chrome:
Deleting ~/.config/google-chrome (where ~ is your home directory) should be sufficient. Why don't you try it and see? (Of course, this will delete all your bookmarks too.)
If that's not sufficient, you may want to also remove Google Chrome from the Terminal using the sudo apt-get purge ... command (where ... is replaced by the package you want to remove or a space-separated list of the packages you want to remove), or remove it in the Synaptic Package Manager (which you can install in the Software Center if you don't have it; it's itself provided by the package synaptic) by right-clicking on the packages you want to remove and clicking "Mark for Complete Removal". These ways of removing packages will remove all global (i.e., non-user-specific) configuration files.
For Chromium (the completely open source counterpart to Chrome):
You can do it the same way, just delete ~/.config/chromium. You can also remove the package as mentioned above for Google Chrome. The package that provides Chromium in Ubuntu is called chromium-browser.
Comment: how do I remove Chrome from the terminal using apt-get purge .... ?
Comment: Bookmarks are saved in XMarks, so not an issue. I'll try deleting the folder and see if that helps. If not, I'll try the other suggestions. Thanks.
Comment: You can find where the Chrome file is using `which google-chrome` and deleting it there. It should be in `/usr/bin/`
Comment: this answer is incomplete because it doesnt note that chrome is called google-chrome-stable under apt-get.
Answer: I successfully removed Google Chrome by running the following command:
sudo apt-get purge google-chrome-stable

Comment: No need to write '-get' in Ubuntu version 18.04 or greater
Comment: You'll also want to remove /etc/apt/sources.d/google.list and its public keys that got added to /etc/apt/trusted.gpg.


Searching for video converter that maintains folder structure

Question: I'm searching for video converter software that maintains folder structure. I have a lot of videos that store to their respective folder, but what I want is to convert the entire folder and subfolders and the output path will remain the same.
Answer: Most decent encoders with watch folder support have an option to automatically encode to the same folder structure that the source came from.  I'd check the listing of any software you are looking at to see if it supports it or try a demonstration copy.  I know that Adobe Media Encoder does.
Beyond that level of detail, this is a product recommendation question which is off topic since software may or may not be available tomorrow and the options for video conversion software change frequently.


Should I list my work as dissertation or conference paper?

Question: I have a dissertation under the supervision of my advisor. Then my university hosted a conference and we decided to make it a paper. The paper will soon publish on the conference's website, but it won't have peer-review. Should I list my work as a dissertation or a conference paper?
Comment: Are you talking bout the CV?  Because typically you have a education section where you list your institution, degree, year, and title of the disertation.  Then in another section you have conference presentations, and the paper could go there.
Comment: Yes, I ask the question under the tag [tag:cv]. So you suggest that my work can have both form: dissertation and paper, am I correct?
Comment: Yes they are independent.
Answer: In a CV you try to organize your important personal information in a clear and useful way for others to see and gain a good perspective. In this case you have a thesis. It should clearly be listed so that it is clear it is one of the outcomes of your degree. It is commonplace for people to turn a thesis into papers but that usually involves rewriting the material substantially. Such papers will be listed under headings such as, for example, "Peer-reviewed articles", "Conference contributions", "Abstracts", etc. In your case you could add your article under a heading such as "Conference contributions", Non-reviewed articles" or "Other articles" (the later only makes sense if you have a heading "Peer-reviewed articles") and make sure it is clear that the heading also implies the articles are not peer reviewed.
If your article and your thesis is, in fact practically the same text with the same title, it would not be advisable to follow the guidelines outlined above. the reason is that it may seem to a reader of the CV as if you are trying to inflate your publication record. In that case you could perhaps make a note in the CV in conjunction with the thesis that it has also been published under the same name or to add it under a different heading but stating that the paper is the same as the thesis, thereby taking the possible edge of the double appearance.
In the end it is clearly not a problem to publish thesis material after a degree and still count both the thesis and the resulting article but the basic rule is that a specific text should not be counted twice. It would then essentially count as self-plagiarism. So just act responsibly and be open and honest about issues that can cause confusion or raise eye-brows.
Comment: Thank you so much. To clear my situation, I want to add that I'm just a graduate student, not PhD nor Ms. The article is a short version of my dissertation. The structure is change, the title is change, some part is cut off but basically there is no change in writing for the selected parts. Which solution is best for me?


How to update Python which download from official website?

Question: I'm mac user, and I downloaded Python from the offcial website. What if I want to update Python, what should I do? I also installed the Java JDK from offcial website, both of them are .pkg, can someone tell me how to update them if they can be updated?
Comment: Please add your system version `sw_vers` ;-)
Answer: If you have homebrew installed you can type in the terminal:
brew install python3

Otherwise you can just download it again from the website and install it.
If you don't know which version of python you have installed type python --version or python3 --version. Similar questions have been answered on SO and other websites.


Split Excelfile .xlxs with Powershell based on column values

Question: I need to split and save an excel file based on the values of the first column via a powershell script. Here is how the excel file is build up (app 30.000 rows)
´´´Column1 # Column2 # Column3´´´
´´´AA # data # data # data´´´
´´´AA # data # data # data´´´
´´´AB # data # data # data´´´
´´´AC # data # data # data´´´
´´´AC # data # data # data´´´
The result should be multiple files with filenames AA.xlxs, AB.xlxs, AC.xlxs and of course the according rows data.
What I have so far is the following code:
$objexcel = New-Object -ComObject Excel.Application
$wb = $objexcel.WorkBooks.Open("C:\Test.xlsx")
$objexcel.Visible = $true
$objexcel.DisplayAlerts = $False
$ws = $wb.Worksheets.Item(1)
$doc = $ws.Range("A:A")

foreach ($doc in $docs) {
$newfile,$objexcel = $objexcel.where({$doc -eq $doc})
$newfile | Export-Excel "C:\$doc.xlxs"
}

It just opens the file, but nothing happens.
It would be great if some coder could have a look at the code or provide a working one.
Thanks in advance.
Answer: Reason nothing is happening is because you are iterating over $docs which does not contain any elements. It is currently null.
When you make a reference to look up the data, you are using $objexcel, but thats your excel application.. not the worksheet that you want to iterate over. Use $as for accessing the worksheet.
You need to iterate over Cells of your $ws and take the data when cells.Item(x, 0) and create a new file based on that with values in other two columns.
Link to example on SO -> Create and Update excel file
Answer: Following is a working code that will iterate through unique elements in column one and make a copy of it in a new spreadsheet and save it.
Function Create-Excel-Spreadsheet {
    Param($NameOfSpreadsheet)

    # open excel
    $excel = New-Object -ComObject excel.application
    $excel.visible = $true

    # add a worksheet
    $workbook = $excel.Workbooks.Add()
    $xl_wksht= $workbook.Worksheets.Item(1)
    $xl_wksht.Name = $NameOfSpreadsheet

    return $workbook
}

$objexcel = New-Object -ComObject Excel.Application
$wb = $objexcel.WorkBooks.Open("C:\Temp\Test.xlsx") # Changing path for test.xlsx file.

$objexcel.Visible = $true
$objexcel.DisplayAlerts = $False
$ws = $wb.Worksheets.Item(1)

$usedRange = $ws.UsedRange
$usedRange.AutoFilter()

$totalRows = $usedRange.Rows.Count

$rangeForUnique = $usedRange.Offset(1, 0).Resize($UsedRange.Rows.Count-1)
[string[]]$UniqueListOfRowValues = $rangeForUnique.Columns.Item(1).Value2 | sort -Unique

for ($i = 0; $i -lt $UniqueListOfRowValues.Count; $i++) {
    $newRange = $usedRange.AutoFilter(1, $UniqueListOfRowValues[$i])

    $workbook = Create-Excel-Spreadsheet $UniqueListOfRowValues[$i]
    $wksheet = $workbook.Worksheets.Item(1)

    $range = $ws.UsedRange.Cells
    $range.Copy()

    $wksheet.Paste($wksheet.Range("A1"))
    $workbook.SaveAs("C:\temp\" + $UniqueListOfRowValues[$i], $xlFixedFormat)
    $workbook.Close()
}

Comment: I was thinking of making a similar suggestion, but yours is much better, nice one!
Comment: Thats amazing...Thanks Jawad. I needed to add this: `Add-Type -AssemblyName Microsoft.Office.Interop.Excel
$xlFixedFormat = [Microsoft.Office.Interop.Excel.XlFileFormat]::xlWorkbookDefault` because it throws an error while saving...anyway it does exactly what I was looking for.


How to play a video strip backward in blender 2.8?

Question: If I select a specific strip from a clip in video sequencer and in strip tab under video -> playback direction -> backward, something funny happens. Can someone tell me whether there is some other way to play the video strip backward.I
Answer: Check out your FPS readout in the Preview pane and the cache indicator in the Sequence view.
If your FPS is flashing red numbers that are lower rates than the source video, your machine's struggling to keep up.

Play in reverse Shift-Ctrl-Spacebar usually lags for me until the clip is mostly cached. You'll see the clip cache build as an orange bar below the tracks in Sequence.

Look into cache allocation via Blender's Preferences ... System ... Sequencer Cache Limit and into Proxies. These and other tips will help you squeeze more performance from your machine.


Testing Mail Server without changing MX records- trick DNS?

Question: I have setup a new mail server which will eventually replace a current mailserver.
Now, without changing the MX records to point to the new server, I will be unable to test this mailserver.
Is their a way that I can still test that the mailserver is working?
I've created a new domain alias (such as test.domain.com) and that is working fine- just wandering if there is any way through some DNS tricks that can trick an email program into sending the email to a different host (such as my new host) than the current email server?
Answer: There are 3 different methods I can think of to achieve the desired result. (see note at end)

Set up the box either with a different public IP to your real mail server, or even better connected to a firewall/router with a different ip to your mail server. Set up MX records for a different domain pointing to this and configure your mailserver to accept emails for this test domain. This way you can test internally and externally but you will have to use a different domain.
Set up a box where you can specify the mailserver IP rather than it looking up the MX record. Many multi function print/scan devices could do the job, or you could go further and set up something like a postfix box or a server 2003 box with IIS and set it to forward emails for your domain to your test server so you can use a variety of test boxes to send email. This will use your specified IP address for that domain rather than a DNS lookup of the MX record. This will only work internally, unless you have another public IP to send the mails to.
Set up a DNS server - something like Windows Server DNS or djbdns and then create your fake MX records and set the sender to use this machine for DNS. Again this will only work internally unless you have a 2nd public ip, and you will need to either allow your test DNS server to be accessed via VPN/WAN, or you will need to have a remote test DNS server.

Caveat - I haven't tried having both a production and test Exchange box serving the same email domain and on the same windows domain as a test Exchange box - I have a feeling they may not get on together but I'm not certain.
Comment: I generally use option #3 which is most reliable.
Comment: When testing isolated websites on new hosting, the "hosts" file maps unique domain names to the new IP addresses. Can someone explain why mail servers were not setup to be similarly tested in isolation? When I actually change my mailserver using the hosts file (under Windows, if if matters), emails to the new mailserver just bounce. I forsee email breaking when I switch over the DNS zones!
Answer: There is also the option of testing manually with telnet.
I had a similar need, and could test my setup without changing my DNS configuration.
<code>telnet yourserverip 25
EHLO yourdomain
MAIL FROM: someaddress
RCPT TO: other_address@yourdomain
DATA
From: someaddress
To: other_address@yourdomain
Subject: test it
Testing it
.
</code>


Why won't my new skin load?

Question: I've been trying to change my skin. I can see my skin, but everyone else sees me as Steve (the default skin). I need to change my skin or I will explode in anger. What am I doing wrong?
Comment: Hi Ari, welcome to Arqade. This question does not give very much detail, except as to your emotional state ;-) If you edit it to add some more detail about (for example) what you have tried and what error messages you face (if any), then you might find that the question it gets more attention. This will also help to clarify whether or not it is a duplicate of the questoin that 3ventic has linked above.
Comment: @3ventic Not a dupe, this is to do with the skin not appearing correctly for other people, not changing it in the first place.
Comment: If you are playing offline, or on a server with `online-mode` disabled, your skin cannot load from the profile servers.
Comment: did you upload it to minecraft? that's how I do it and now everybody sees me as a green Enderman.
Answer: Skin changes can take a little while to propagate (and there could be any number of points at which the skin is cached by other players). It should change within an hour, make sure everybody quits and restarts Minecraft to have the best chance of the new skin loading quickly.

Why won't my new skin load?


Unkown "create_claimable_balance" operations on my account

Question: I've just created a new account (in Public network) and have funded it with some XLM.
Only 2 minutes after, this same account has been subject to up to 9 "create_claimable_balance" operations.
I have used the Javascript SDK to create and fund the account so I'm certain these other "create_claimable_balance" operations weren't a result of my code.
Can anyone explain why this is happenning? Is it possible to avoid this?
I got the same result with another account that I created last week.
Thank you!
Answer: If you mean, that there are incoming claimable balances being sent to you, it is probably spam and can be ignored.
If you mean, that your account is sending out claimable balances, you should check your computer for malware.
Answer: Some wallets (e.g. solar wallet) show all operations regarding your account. This can be confusing as when someone sends you a claimable balances (probably spam, if that account did not interact with anything else before as you just described), it is shown there.
You can query all claimable balances your account is a claimant on to verify this:
https://horizon.stellar.org/claimable_balances/?claimant=<PUT_YOUR_ACCOUNT_HERE>


Non prod environments can share Common Service such as Xconnect and Processing

Question: We have a 10 non production System Integration test environments. Right now we have common shared Solr server. Likewise Is it possible to have shared Xconnect and Processing Webapps for multiple non production CD and CMS webapps?
Answer: If I understand your question, you are asking if it is possible to have a shared XConnect or Processing instance, that serves two separate Sitecore CMS instances (i.e. these have separate master databases etc).
This is not possible, because the configuration of those Xconnect / Processing instances point to databases / queues that are specific to the Sitecore instance in question. You could however, have multiple XConnect instances running on the same virtual machine. Each of those could be configured / dedicated to one specific Sitecore instance.
The reason it is possible with your shared SOLR server, is because one SOLR server can host multiple COREs. Those cores dont need to be related and can be access from multiple applications.
Comment: Thanks for your explanation, it make sense. Just thinking too loud, as we don't use much analytics but true it is tightly aligned with specific sitecore instance . When comes to personalisation it will pose an issues too.
Answer: Ultimately, it likely comes down to "why do you want to share your apps?" and then making a decision on what to share and what to isolate based on your priorities.
I echo @Dean OBrien on this one. You are sharing a SOLR server, but not sharing the actual indexes (you could share indexes, but that's not likely to work well!). You can do something similar with xConnect and processing web apps. You cannot share the database entries, indexes, apps, but you could deploy them to a combined server on a VM instead of using isolated web apps if you are looking to reduce hosting costs. If these are not meant to be performant environments, you may not notice the issue of running multiple environments app installs on a single VM.
An example could be like the following (simplified, there are other apps and services and databases too that you need, and this shows only 3):

xConnect VM

xConnect1
Processing1
xConnect2
Processing2
xConnect3
Processing3

SQL Server instance

xDB ShardManager1
xDB Shard1_1
xDB Shard1_2
xDB ShardManager2
xDB Shard2_1
xDB Shard2_2
xDB ShardManager3
xDB Shard3_1
xDB Shard3_2

This would allow you to share some resources and move towards an IaaS approach, although it will impact your performance and that shared SQL Server is going to start growing fast with all those xConnects writing to it.
This also breaks isolation of your environments meaning that your infrastructure-as-code approach is harder to achieve because you now have shared pieces that work across multiple environments. It would be harder to tear down just environment 3 than before when they are fully isolated apps.
Comment: Thanks Jason. This is really helpful.


$PV$ work for irreversible expansion vs. irreversible compression?

Question: Assuming we have an ideal gas expanding against a pistom in a cylinder isothermally, then the pressure drops due to viscous strain within the gas and we can extract less work than for an reversible expansion.
But if we want to compress the gas irreversibel, back to the initial state  the pressure must be higher than for the expansion to overcome the viscous strain.
What I do not understand is that the integrated PV work is higher for.the compression than for the expansion though we have as far as I know the same work loss as friction and the same Volume change. Could you please help me?-
Answer: If the process is irreversible and the gas is  undergoing viscous strain, then temperature and pressure gradients will exist throughout the volume in the gas during the process. So the process can't be considered isothermal as there would be no defined temperature (or pressure) throughout the volume of the gas until the end of the process when thermal and mechanical equilibrium is attained.
Hope this helps.
Comment: Thank you. It helps a bit. Do you have further tips?
Answer: The work done by the gas on the piston during irreversible expansion is less than the work done by the piston on the gas during irreversible compression.  In either expansion or compression, a rough approximation to the force F on the piston in the irreversible behavior of the gas is given by:
$$\frac{F}{A}=\frac{nRT}{V}-\frac{\mu}{V}\frac{dV}{dt}$$where the first term represents the equilibrium equation of state behavior of the gas, and the second term represents the viscous damping.  The parameter $\mu$ is proportional either to the actual viscosity or to the turbulent viscosity (depending on whether the flow is turbulent).  Note that, in expansion, the viscous term makes a negative contribution to the force on the piston, while, in compression, the viscous term makes a positive contribution to the force on the piston.
For more discussion of the mechanistic picture of irreversible expansion and  compression of gases (and the analogy to spring-damper systems), see the following link:  https://www.physicsforums.com/insights/reversible-vs-irreversible-gas-compressionexpansion-work/
Comment: My question was upon reading your text because I did not understand how this works. How can viscosity reduce the pressure for expansion but increases on the other hand the compressive force?
Comment: In expansion, dV/dt is positive and, in compression, dV/dt is negative.  To understand how viscosity can give rise to both compressive and tensile contributions to normal stress,  you need to familiarize yourself with the derivation of Newton's law of viscosity in 3D.  For this, I refer you to Chapter 1 of Transport Phenomena by Bird, Stewart, and Lightfoot.


In Civ 4 is the Dutch Dike building the only building that adds production to non-river water tiles?

Question: I'm looking for what would be the equivalent of Civ 2's offshore platform building, but it just looks like it's only the Dutch unique building of the dike which adds production to all water tiles. This seems strange to me since it seems like it would make the Dutch really overpowered in the late game
Answer: There are no regular coastal buildings that improve the production of water tiles.
However, the Wonder Moai Statues does have this effect, although this obviously can't be used in multiple cities.
Comment: @MCB I believe they are a top tier civ, also due to their leader having some of the best traits, Financial and Creative.
Comment: Thanks, am I right that this makes the Dutch overpowered in late game play? Because from Civ 2 I know that once you get offshore platforms you turn your peninsula cities into trade + production powerhouses. And it seems poorly balanced to only give one civ this option.


How should I modify my vanilla frosting to convert it into a chocolate frosting?

Question: I have a really good recipe for whipped vanilla frosting that I want to use, but I want to make a chocolate frosting.  What kind of chocolate should I add to the frosting to make it a chocolate frosting? How much should I add? Should I reduce the amount of vanilla in the recipe or keep it the same?
Comment: It depends.  You may wish to provide your base recipe to get some advise.  However, any addition of chocolate is going to change the ratios in the frosting, because you are adding fat (cocoa butter, with its own unique melting charactaristics) as well as cooca solids and sugar; if you are adding cocoa, it is quite dry, and also astringent which will change the recipe.  You are probably far better off finding a stellar chocolate frosting recipe that you like.  You might want to google "whipped ganache" for some ideas.
Answer: Whatever your type frosting is, ie Italian meringue or confectioners' frosting, you can simply add enough (cooled) melted chocolate or cocoa powder (sifted to remove lumps) until it tastes good to you. Since neither cocoa powder nor melted chocolate will curdle the frosting it is simply a matter of taste. However, if you are going to refrigerate the frosting, remember that the chocolate will solidify and thus your frosting will become firmer.
For some rough guidelines I recommend  1/4 cup cocoa powder for every 2 cups of frosting and 3 ounces melted chocolate for every cup of frosting.
Use a good quality dark chocolate, with a high proportion of cocoa solids, for a strong chocolatey taste. Or, if you don't like dark chocolate, use a half and half mixture of milk and dark chocolate.
Answer: Real chocolate would just be diluted by the sugar/butter in your frosting recipe. You can use it (as much as you want), but I suspect you will be underwhelmed if you do. With the price of chocolate these days, you'll probably be disappointed with the outcome.
Cocoa powder is what you want. Add 1 tablespoon at a time until you reach the desired flavor profile.
If you want big chocolate flavor, consider a chocolate ganache (or other form of nearly-pure chocolate frosting.)
Marcel Desaulniers Death by Chocolate has plenty of recipes that won't let you down (but will cost a lot of money).


Does Java produce object code or byte code?

Question: It's my understanding that the Java compiler produces "byte code", not "object code". First of all, is this correct?
Also, that's just what my book says, I was wondering why this is correct. What is the difference between byte code and object code?
Comment: Java compiler compiles the source code to byte code. I have never heard about "object code" yet.
Answer: Byte code is just the "object code" for the Java Virtual Machine. It's not native code (e.g. x86). To be honest, I rarely hear the term "object code" these days - it's generally clearer to talk in more specific terms.
Comment: @Bhaxy: No, I didn't say that. [Wikipedia](http://en.wikipedia.org/wiki/Object_code) describes it as "what a computer compiler produces". It's a somewhat vague term, but I'd say it's usually "a non-textual representation of a program, targeting machines rather than humans". The "machine" has is the JVM rather than the native architecture of the computer you're running on.
Comment: @Bhaxy yeah you got it :)
Answer: When you compile a java program, it goes to byte-code.  When you run the resulting artifact, the JVM of the platform then runs (well, interprets) the bytecode, turning it into machine level instructions.
Answer: C object code is in a form that only the OS on which it was compiled can interpret.
C code -> C compiler(e.g. gcc) -> object code -> os
The C compiler outputs object code for the OS that it was written for. If you want your C code to run on another machine, you have to recompile it.
 C code compiled on Windows won't run on linux without recompiling.
Java code-> Java compiler(javac) -> byte code -> jvm
The Java compiler puts out byte code that runs on its JVM. All the idiosyncracies of the OS are pushed down into the JVM, hidden from the Java code. So as long as your OS has a JVM, you can run Java bytecode on it without recompiling. Java code compiled on Windows can run on any other OS with the same version of JVM.
Also refer difference between object code and byte code
Answer: Java is platform independent. When you compile Java source code it is converted to byte code and when the application is run the JRE on the client machine executes the byte code.
Answer: Java compiler (javac.exe) takes in Java source (.java) files as input and outputs Java bytecode (.class) files (if your code compiles successfully). You then execute the Java launcher (java.exe) and point it to your bytecode. It is then up to the Java virtual machine (JVM) to take your code the rest of the way, and convert your bytecode into machine (or native) code.
You can think of it as object code being closer to the machine code, and bytecode as being further from the machine code. Also, bytecode is portable (which is one of the big advantages of Java language), while machine code needs to be "ported" by the means of a manual process (i.e. re-compiling for a different target platform or architecture).
Object code is "almost" machine code, it's kind of in the middle. It's like a portion of the resulting machine code. Because of the portability of Java language, you can't have the compiler translate your source code directly into machine code. Because the machine code needs to be different for different platforms and architectures. If someone runs your bytecode on Windows, JVM will translate your bytecode into one kind of machine code. If someone runs your bytecode on a Mac OS X, JVM will translate your bytecode into a different kind of machine code.
You can think of the JVM as an interpreter for your bytecode. Although, technically it's called JIT (Just In Time) compilation. The JVM is part of the JRE (Java Runtime Environment) and while Java programs are pretty much platform independent (any system that cun run JVM can also run Java programs), the JVM part of the JRE is platform-dependent.
The short version:

Java compiler produces bytecode (compilation half the way, platform independent, cannot run yet).
Java virtual machine produces machine code.
Object code is a portion of the resulting machine code.
Bytecode becomes object code at JIT time.
Object code becomes machine code (compilation rest of the way,
platform dependent, can run).

This may not be accurate 100% as I am also just starting to learn this stuff. But this is my understanding of this concept so far. I hope this helps.