Are books in pdfdrive.com legal or illegal?

Question: Is it legal to download books in PDF-format from https://www.pdfdrive.com/ ? How one can verify if the book given in the site is a legal copy or not?
Answer: You can't, in general, know whether a distributor of a work has permission to distribute, or is a pirate site. I verified that they have posted an illegal copy of a work that I created, and I know that I did not grant permission to them (or anyone) to infringe my copyright.
Both hosting and downloading works without permission is a violation of copyright law, so both parties are liable. Downloaders may erroneously rely on the "I didn't know!" defense, which in the US carries no legal weight. Even so, if you download my book, it will probably cost me vastly more to sue you for infringement than the damages that I might be awarded over your infringement. Usually, copyright holders go after the pirate sites, and only rarely go after particularly egregious serial downloaders.
Comment: It's not quite true that the "I didn't know" defense carries *no* weight in the US; statutory damages for innocent infringement are lower than for willful infringement.
Comment: innocent infringement is about 250 $, while the normal minimum is 750 $ and allows fee-shifting. However, *some* companies do sue people for dozens of infringements at once where it is reasonable to say "this is not innocent". Usually, such infringements happen via BitTorrent, and the companies are highly litigious, such as Malibu Media.
Answer: 3 of my books are up there without my nor my Publisher's permission. They've initiated legal action.
So no. It's not legal. Very little on the internet is "free", it is mostly stolen. Download only from reputable bookstores, Amazon at the very least.
This is a pirate site cloaking itself as a "public service".


What happens legally if a majority of both houses of Congress disappear?

Question: In the mass-dissapearance scenario from my previous question, what happens legally if both houses of Congress are in session and a majority of both houses disappear? Is Congress unable to do business because there is no longer a quorum? Or does the quorum become half of the remaining members?
Comment: There are infinitely many variants of the now-closed disappearance question https://law.stackexchange.com/questions/90213/millions-of-people-suddenly-disappear-without-a-trace-legally-speaking-are-the. Do you plan to ask all of them? In what way is "what happens" a legal question?
Comment: @user6726 no, this isn't a series. These are the only two I'm planning to ask. I changed this to be more specifically legal.
Comment: I would suggest migrating this to the "World Building SE".
Answer: Likely nothing.  Both houses cannot enact legislation without meeting a quorum, which is a more the majority number of members present, so any voting would be suspended pending seats being filled by emergency election or appointment.
Typically, in the U.S., when a Rep seat is unexpectedly vacated emergency elections are called, while the Senate would have vacancies filled by the state's governors until the end of the term as determined by the seat's election schedule.
Given that Representative terms are 2 years in duration, Congress has staffers who are there specifically to help freshman Congress members get up to speed on the nuance of Congress, as well as staffers.
If you want to look into a series that does look directly at a sudden loss of Elected Federal officials in the United States, the tv show "Designated Survivor" has this as part of the central plot, with the main character being the Secretary of Housing and Urban Development who was named the designated survivor for the State of the Union (during which, the capitol building was bombed in a terrorist attack) and finds himself suddenly the President of the United States.  One early episode deals with the plans for the reconstitution of Congress and another episode deals with the Reconstitution of SCOTUS.  While I'm not sure if it's an actual practice, at least one person from Congress is revealed to be the Congressional equivalent of a designated survivor, but I'm not aware if the role exists (Since leadership is voted on in each new session and sessions are two years.).
It's not always the most accurate, and at times tends to be a bit overly naive about U.S. politics but does deal with the sudden emergency decently.
Comment: So the members who disappear will not be considered to be dead, and thus will still be counted for the purpose of determining how many must be present for a quorum?
Comment: @Someone No, dead is dead.  But the seat sits vacant regardless.  Quorum would be the number of members that are in actual attendance when compared to the number of seats, vacant or otherwise.  If your dead, you can't attend... but your seat is still there.  In the house, the number for Quorum is 218 members of the possible 435 members and 51 members of the possible 100 members.  Anyone not present in the Quorum is marked absent on the vote count.  Votes pass with the required majority of Quorum (so if it needs 51%, then the minimum number to pass a vote in Quorum is 110 and 26 respectively.).


"was eaten" vs. "has been eaten"

Question:

It was eaten by a tiger.
It's been eaten by a tiger.

Do these basically mean the same thing?  Can they be used interchangeably?
Answer:

It was eaten by a tiger.

It's been eaten by a tiger.

Has been eaten is a present perfect passive tense which should be used at an unspecified time in the past. Consequently, don't use this tense when the time is specified, use simple past instead.
So in your question context, as no time is specified you may use either #1 or #2.
Obviously a distinction should be made:
Present simple implies a finished action in the past whereas, present perfect implies an action started in the past an continuing up to the present or having effects in the present.
Answer: The distinction Lucian Sava has correctly made may become clearer if we talk about hats instead of tigers.
Remember that old wool hat I had? It was rain-repellent and had a wide brim.
-- It was thrown into the trash when we moved from the apartment to the house back in 1998.
Have you seen my old wool hat?
--It has been thrown into the trash. I hope you weren't thinking of wearing it.
The present perfect (passive) in the second example expresses the idea that the event which happened in the recent past has potential relevance to the present moment.  The hat went into the trash quite recently.

"was eaten" vs. "has been eaten"


Hypermodernism definition

Question: What are the features of hypermodernism? I know that one feature is controlling the center indirectly (f.ex. fianchetto), and letting the opponent control it with pawns. But I am not sure if there are other features. Nimzowitsch, who was the inventer of the hypermodernism style, wrote several new ideas in his book , such as overprotection, prophylaxis, rook on the seventh rank, knight outposts an so on. Are these ideas also considered as a part of the hypermodern style or is there a clear definition on this?
Comment: I'm not going to try and define hypermodenism - to me it was more the younger players of the day pointing out to Tarrasch that he didn't have sole rights on the ideas behind chess strategy. But to say Nimzowitsch invented it is a bit strong - for instance "New Ideas In Chess" by Reti came out 2 years before "My System"
Comment: Just as a note, I am skeptical about the utility of hypermodernism. We see it in the highest level pretty much only as a black opening, King's Indian Defense, which isn't incredibly popular. There is no hypermodern white opening played in the highest level.
Comment: @CognisMantis - how about the English Opening? Or the Reti? Even the Benko, Bent-Larsen & Polish?
Comment: @Bad_Bishop Notice that the English opening does occupy the center right away, and usually has c4 and e4 present in the center. Reti transposes to d4 openings. Benko Gambit? BentLarsen and Polish? These aren't played at the top levels at all.
Answer: It seems to me you have the idea spot on already. Traditionally, chess theory was that the best way to control the center was to occupy it. Some players (like Nimzowitsch and others) showed that this was not necessarily true and that there is merit in letting your opponent occupy it while you undermine it from a distance.
I'm not sure if the idea was really novel at the time, but it became popular and as we do whenever we see a pattern we have to name it.
Beyond that I doubt there is much to learn from "hypermodernism" (which is not to say that there is not much to learn from the various rich and deep ideas behind each of the so labelled openings themselves).
Answer: From Wikipedia:

Hypermodernism is a school of chess that emerged after World War I. It featured challenges on the chess ideologies presented by central
  European masters, such as on Wilhelm Steinitz's approach to the
  centre. It also challenged in particular the dogmatic rules set down
  by Siegbert Tarrasch. The Hypermoderns challenged the guidelines of
  the previous generation and demonstrated with concrete games and
  victories that these challenges could be done successfully. Aron
  Nimzowitsch for example showed how games could be won through indirect
  control of the center, challenging Tarrasch's dogmatic view that the
  center must be occupied by pawns. Nimzowitsch advocated controlling
  the center of the board with distant pieces rather than with pawns,
  thus inviting the opponent to occupy the center with pawns, which can
  then become targets of attack. However, this was only part of the
  hypermodern framework, which Nimzowitsch encapsulated in the seminal
  chess book My System, which greatly influenced many chess players. It
  introduced and formalized concepts of the pawn chain, overprotection,
  undermining, prophylaxis, restraint, rook on the seventh rank, knight
  outposts, the dynamics of the isolated queen's pawn, and other areas
  of chess.
...
Hypermodern openings include the Réti Opening, King's Indian Defence,
  Queen's Indian Defence, Nimzo-Indian Defence, Grünfeld Defence,
  Bogo-Indian Defence, Old Indian Defence, Catalan Opening, King's
  Indian Attack, Alekhine's Defence, Modern Defence, Pirc Defence,
  Larsen's opening, Sokolsky Opening, and to a lesser degree the English
  Opening. Openings such as 1.a3 do not constitute hypermodern openings
  since, although they delay the occupation of the centre with pawns,
  they also delay piece development.
Comment: But I really wonder if prophylaxis is a part of the hypermodernistic school. It does not come clear to me.
Answer: Consult John Watson's books on strategy. He writes about this subject from a historical perspective. (Secrets of Modern Chess Strategy: Advances since Nimzowitsch, and there is also a newer one.)

Hypermodernism definition


How do you get a secure bastion host if your IP address is constantly changing?

Question: I am setting up AWS stuff and wondering how to setup a secure bastion host. They all say to only allow access to your IP address, but how can I do that if my IP address is changing every few hours or days (just in my house wifi, or going to coffee shops, etc.). What is best practice here, for SSHing into a bastion host and limiting access somehow to only specific IP addresses. If not possible, what is the next best alternative?
Comment: For AWS you can use the SSM agent to get a cli session on the machine without actually using SSH - you can open the session from within AWS
Comment: @ConorMancone but it uses HTTPS from my understanding. How is that any more secure than SSH? It is still exposing a port to the world... Is it because of the logging and the logging alone?
Comment: With the AWS SSM agent you don't have to export a port to the world since you're not connecting from your home/office. You connect to the instance through the AWS console.
Answer: In the case described above... Instead of changing the security group everytime you go somewhere I would strongly advise using the AWS VPN. The VPN allows you to connect to a static IP directly. You use a VPN to connect to the AWS enviorment securely and can allow the security group to access the ip from the VPN.
Comment: How does the VPN connect to the static IP address in the first place? At some level the IP address of my network is still changing, so I'm curious how a VPN solves this. More of a tangent to the main question :)
Answer: I resolve this by compromising and allowing connections from anywhere on the public internet, but I have safeties in place:

Use fail2ban to lock out persistent attackers
Disallow root from any sort of ssh login (PermitRootLogin no)
Disable passwords (PasswordAuthentication no & ChallengeResponseAuthentication no)
Follow other guidelines from Stribikia's Secure Secure Shell guide
Use an alternate port

If you don't feel that's sufficient, you can also implement a portscan detector that blocks public IPs that scan you (e.g. with PortSentry or even within fail2ban) and/or hide from them with port knocking, but note that port knocking is security through obscurity and a sophisticated attacker can observe you performing a port knock and then be able to replicate that elsewhere. There are ways to implement a cryptographic port knock (like the outdated cryptoknock), but I don't know of any that use modern cryptography.
I'd consider port knocking decently safe given fail2ban, port-scan blocking, regular rotation of your port knock sequence, and regular reviews of your logs (since fail2ban doesn't permanently ban anything; you'll have to ban persistent CIDRs manually). Remember: if you're concerned about attacks from a state actor, you will eventually lose without significant active defensive resources.


Which foods are good for fat-burning?

Question: Sometimes, I find difficult in lose weight. Besides doing exercises, are there any foods that help fat-burning process faster?
Answer: As far as I know, there are no foods that burn fat in any significant amount (Mayo Clinic).
To burn fat, a food would need to have "negative calories," which means less calories than the calories needed to digest that food. Theoretically this is possible, for example, water has zero calories and the process of water drinking and absorption requires some energy, so you would burn some calories just by drinking water. But the amount of calories burnt this way is so small that it does not have any practical meaning.
You may want to think how to decrease food craving:

Try to eat less quick carbs (plain white flour products, potatoes, white rice and sugars - soda, fruit juices) and more foods with insoluble dietary fiber (whole-grain bread and non-starchy vegetables). Avoiding anything sweet completely can greatly help prevent food craving.
Try to avoid/limit calorie-dense foods: cheese, chocolate, oils, nuts.

In short: Try foods that are not sweet, not calorie dense and have some insoluble fiber.
Comment: Just to be clear: I am not suggesting a low-carb diet here, but replacing quick carbs (no fiber) with slow carbs (with fiber).
Comment: +1 This is the correct answer; carb reduction helps people get dietary satiety and eat net-less calories. Eating sweets doesn't make you feel full.

Which foods are good for fat-burning?


Why electron has spin angular momentum?

Question: The classical concept of electron spin is wrong. From Stern Gerlach experiment we have seen that two separate beams are produced and that is why it is considered that electron has some property in magnetic field which is named as "SPIN" although it has no similarity with classical spin.
So my question is from where angular momentum  arises?
 For a moment I consider well there is no similarity also with classical angular momentum.
But then why it plays an important role to generate total angular momentum?
Comment: Spin is an intrinsic property of an electron. It consist in a term of angular momentum that can be summed in different ways to the orbital angular moment (for instance, take a look at spin-orbit coupling, LS coupling, JJ coupling,...). Experiments have shown that this term is necessary (just as an example, it can explain the phenomenon of ferromagnetism in crystals where you have a quenching of the orbital angular momentsum) but, as you said, it can't be interpreted in classical terms. I think that "why" and "from where it arises" is not a completely proper question: experiments show that...
Comment: Nature is like that, and that's it. On the other hand, question about its importance is wonderful but really vast (and dependent on your background in quantum mechanics): I invite you to take a look at spin - orbit coupling, methods for summing the angular momentum and classical and quantum theories about magnetism.
Comment: You may want to take a look at the paper [What is Spin?](http://people.westminstercollege.edu/faculty/ccline/courses/phys425/AJP_54(6)_p500.pdf) by Ohanian.
Answer: In fact there are similarities between spin and classical angular momentum, which is why historically the result of the Stern-Gerlach experiment was understood in terms of some sort of angular momentum.
The energy levels of an atom placed in a weak magnetic field will split according to their $m$ values.  For a state of angular momentum $\ell$, there will be $2\ell+1$ magnetic substates, and their energy difference will increase linearly with the applied external magnetic field (provided the field remains sufficiently weak).  Basically, this is the Zeeman effect.
The same holds for spin.  The energy level of the last electron in a silver atom - this electron is in an $\ell=0$ state - is split into $2$ sublevels with spacing proportional to the applied external magnetic field.  This indicates that $s=1/2$ (so that $2s+1=2$).  Since half-integer values of orbital angular momentum are not possible because the magnetic quantum number $m$ must be integer, spin cannot be orbital angular momentum but otherwise "behaves as if it were angular momentum".
Just to be sure this was not some complicated multi-electron effect, Phipps and Taylor [ T. E. Phipps,  and J.B. Taylor "The Magnetic Moment of the Hydrogen Atom". Physical Review. 29 (2) (1927): 309–320.]
redid the Stern-Gerlach experiment with hydrogen in its ground state and got the same type of splitting.
Finally, in levels where $\ell\ne 0$, the splitting is precisely as if spin and orbital angular momentum could be combined, so it makes perfect sense to think of spin as angular momentum, albeit not "classical" or orbital angular momentum.
Answer: The spin was deduced from theoretical ideas and from the structure of the atoms:

The existence of spin angular momentum is inferred from experiments, such as the Stern–Gerlach experiment, in which particles are observed to possess angular momentum that cannot be accounted for by orbital angular momentum alone.

The Stern-Gerlach-experiment was carried out in 1922 and at this time it was known that subatomic particles have intrinsic (permanent existing) magnetic dipole moments. The alignment of the particles magnetic dipole moments in a changing external magnetic field induces electromagnetic radiation, moves the particles sideways and disalignes the particles again. This is constantly repeated and is called the Lorentz force.
Since the macroscopic phenomenon of gyroscope precession is well know since a long, long time and the reason for this behavior could be explained only since the discover of the magnetic dipole moment and the photon emission during deflection the cause and effect are interchanged.

First claiming a rotation of the particles (the intrinsic spin) it was stated that by this the particles receive a magnetic dipole moment.
In our days it would be better to show that the magnetic dipole moment runs the phenomenons of EM induction (and the gyroscopic effect).
And the theoretical deduction about the two possible states of the magnetic dipole moments for charged particles is indeed right. It is observed that for an electron the direction of the magnetic dipole moment and the directions of the photon emission and the direction of the resulting deflection is unique AND is opposite to the emission and deflection of the positron (and the proton).
So your question

Why electron has spin angular momentum?

should be replayed that charges have magnetic dipole moments and in an varying external magnetic field they get deflected and this is historical connected with a spin angular momentum.
And honored scholars please tell me which of the mentioned phenomenons and deduction steps is not well established knowledge.
Comment: What do the "Output axis" and "Input axis" correspond to here in terms of spin?
Comment: @ZeroTheHero According to the linked Wikipedia page about Gyroscope: "The axle of the spinning wheel defines the spin axis. The rotor is constrained to spin about an axis, which is always perpendicular to the axis of the inner gimbal. So the rotor possesses three degrees of rotational freedom and its axis possesses two. The wheel responds to a force applied to the input axis by a reaction force to the output axis."The sketch is from the same page
Comment: I know what's a gyroscope but your link talks about - for instance - a gimbal and I can't see how this fits into the picture of the electron spin.
Comment: @ZeroTheHero "First claiming a rotation of the particles (the intrinsic spin) it was stated that by this the particles receive a magnetic dipole moment.
In our days it would be better to show that the magnetic dipole moment runs the phenomenons of EM induction (and the gyroscopic effect)."
Comment: What does a gimbal have to do with the spin of an electron?  From Wikipedia: *A gimbal is a pivoted support that allows the rotation of an object about a single axis.*

Why electron has spin angular momentum?


Excel VBA Multiselect and Set Workbooks as Variables

Question: Previously I had a block of code that would use GetOpenFilename for a single file, set variables, ask if you wanted to select another file(Y/N), execute more code to open 2nd file, etc. If user selected 'NO' at any point, it would skip remaining code.
What I am attempting to do is have a macro stored within a workbook open up to 3 files. It then needs to make each workbook it's own variable because it needs to find a string in each of the workbooks before passing those variables onto another Module. I can't figure how for the code to Set each workbook. Appreciate any help.
Dim files As Variant
Dim i As Integer
Dim WBtemp1 As Workbook
Dim WBtemp2 As Workbook
Dim WBtemp3 As Workbook
Dim RF As String

    files = Application.GetOpenFilename(FileFilter:="Excel workbooks (*.xls*),*.xls*", Title:="Please select up to 3 Files", MultiSelect:=True)

    If Not IsArray(files) Then Exit Sub

    If UBound(files) < 3 Then
        MsgBox "You have selected more than 3 files."

    End If

    For i = 1 To UBound(files)

    Workbooks.Open files(i)

    Next

    Set WBtemp1 = Workbooks(1)
    Set WBtemp2 = Workbooks(2)
    Set WBtemp3 = Workbooks(3)

    RF = WBtemp1.Worksheets(1).Range("V3")
    RF1 = Mid(RF, 12, 8)
    RF = WBtemp2.Worksheets(1).Range("V3")
    RF2 = Mid(RF, 12, 8)
    RF = WBtemp3.Worksheets(1).Range("V3")
    RF3 = Mid(RF, 12, 8)

        Call Macro2(WBtemp1, WBtemp2, WBtemp3, RF1, RF2, RF3)

Answer: To set your variables to point to the 3 selected workbooks, you need to use the values stored in the files array and extract the filename without the folder path and then use it to refer to the workbook:
Dim filenames(1 To 3) As String
For i = 1 To 3
    filenames(i) = Right(files(i), Len(files(i)) - InStrRev(files(i), "\"))
Next i
Dim WBtemp1, WBtemp2, WBtemp3

Set WBtemp1 = Workbooks(filenames(1))
Set WBtemp2 = Workbooks(filenames(2))
Set WBtemp3 = Workbooks(filenames(3))

Or instead, even better, you can assign each workbook to a variable as you open then by doing:
Set WBtemp1 = Workbooks.Open(files(1))
Set WBtemp2 = Workbooks.Open(files(2))
Set WBtemp3 = Workbooks.Open(files(3))

Comment: So that triggers a 'Subscript out of range' on the
    Set WBtemp1 = Workbooks(files(1))
whether it opens 1 file or multiple.
Comment: Thanks. That's what I found too. However,  that causing excel to reopen the workbooks?
Comment: You would have to replace the lines where you open the workbook by those where you assign it to variable to avoid opening the files twice.
Answer: Here is code that I think you can actually use. It shows how to create and handle the array of workbooks and creates a similar array for Rf. I have added a Macro2 sub which takes the arrays as argument as well as a function which takes only one of the array members (a Sub would be called in the same manner).
Option Explicit

Sub SelectFiles()

    Dim Files As Variant
    Dim WbTempl() As Workbook
    Dim Tmp As String
    Dim Rf() As String
    Dim i As Integer

    Files = Application.GetOpenFilename(FileFilter:="Excel workbooks (*.xls*),*.xls*", _
                                        Title:="Please select up to 3 Files", _
                                        MultiSelect:=True)

    If IsArray(Files) Then                  ' avoid jumps: let the code flow
        For i = 1 To UBound(Files)
            If i > 3 Then
                MsgBox "You selected " & UBound(Files) & " files." & vbCr & _
                       "Only the first 3 will be processed.", _
                       vbInformation, "Too many files selected"
                ReDim Preserve Files(1 To 3)
                Exit For
            Else
                ReDim Preserve WbTempl(1 To i)
            End If
            Set WbTempl(i) = Workbooks.Open(Files(i))
        Next i

        ReDim Rf(1 To UBound(WbTempl))
        For i = 1 To UBound(WbTempl)
            Tmp = WbTempl(i).Worksheets(1).Range("V3").Value
            If Len(Tmp) < 20 Then
                Tmp = String(20, "R")
            End If
            Rf(i) = Mid(Tmp, 12, 8)
            If IsTemplate(WbTempl(i), Rf(i)) = True Then
                Tmp = " "
            Else
                Tmp = " not "
            End If
            MsgBox WbTempl(i).Name & " is" & Tmp & "a template", vbInformation
        Next i

        ' using meaningful names isn't a useless exercise
        ' using nondescript names will cost you much more time eventually
        Macro2 WbTempl, Rf
    End If
End Sub

Private Sub Macro2(Wb() As Workbook, _
                   Rf() As String)

    Dim i As Integer

    For i = 1 To UBound(Wb)
        Debug.Print Rf(i), Wb(i).Name
    Next i
End Sub

Private Function IsTemplate(Wb As Workbook, _
                           ByVal Rf As String) As Boolean

    Debug.Print "Here is Function 'IsTemplate'. Current Rf = "; Rf
    IsTemplate = (Wb.FileFormat = xlTemplate)
End Function

Answer: Amended to this. Added an On Error Resume Next in the module.
On Error Resume Next
Dim MyFiles As Variant
Dim i As Integer
Dim WBtemp1 As Workbook
Dim WBtemp2 As Workbook
Dim WBtemp3 As Workbook

    MyFiles = Application.GetOpenFilename(FileFilter:="Excel workbooks(*.xls*),*.xls*", Title:="Please select up to 3 Files", MultiSelect:=True)

    If Not IsArray(MyFiles) Then Exit Sub

    If UBound(MyFiles) > 3 Then
        MsgBox "You have selected more than 3 files."

    End If

    For i = 1 To UBound(MyFiles)

    Workbooks.Open MyFiles(i)

    Next i

    Set WBtemp1 = Workbooks.Open(MyFiles(1))

    If UBound(MyFiles) < 2 Then GoTo Sng Else GoTo Mult

Mult:
    Set WBtemp2 = Workbooks.Open(MyFiles(2))
    Set WBtemp3 = Workbooks.Open(MyFiles(3))

        RF = WBtemp1.Worksheets(1).Range("V3")
        RF1 = Mid(RF, 12, 8)

        RF = WBtemp2.Worksheets(1).Range("V3")
        RF2 = Mid(RF, 12, 8)

        RF = WBtemp3.Worksheets(1).Range("V3")
        RF3 = Mid(RF, 12, 8)

Sng:
    Set wb1 = ActiveWorkbook

        Call Macro2(WBtemp1, WBtemp2, WBtemp3, RF1, RF2, RF3)


Cron jobs run 1 hour off, in total disagreement with system times

Question: Example of issue:
* 9 * * * echo 9
* 10 * * * echo 10

The above will fire off an email to the user every minute, but all the "9" responses will happen at 10:00AM -> 10:59AM, while the "10"s will come in at 11:00AM->11:59AM.
Running a job of
* * * * * /bin/date ; /bin/date -u

Returned the expected (correct) date and time. this was true for both UTC and local time (America/Denver). Change this job to run every minute at a specific hour results in the offset (jobs told to run at 9 run at 10, etc etc).
Current debug I have completed:
Okay, thats odd. Maybe my timezone file is somehow messed up? Lets check that
diff -s /etc/localtime /usr/share/zoneinfo/`cat /etc/timezone`
Files /etc/localtime and /usr/share/zoneinfo/America/Denver are identical

I have checked the hardware clock to see if this is off or somehow disagrees with my local settings (run as root).
date ; hwclock
Wed Oct 26 10:50:13 MDT 2016
Wed 26 Oct 2016 10:50:14 AM MDT  -0.204171 seconds

Looks to be off by a second, but that shouldn't make my cron jobs run a full hour off schedule, right?
I am also sure of the following:

Has my timezone changed recently? No
Did you try manually fixing the timezone anyway? Yes
Did you reset cron after fixing the timezone? Yes
Have I made sure that the cron service was restarted? Yes
Have I restarted the cron service? Yes
Are you really sure that cron was restarted? 100% sure Cron has been restarted

Other potentially relevant information:
Running Debian.
cat /etc/debian_version
8.6

Current Kernel
uname -a
Linux BigBox 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

Updated Debug:
Ran 'hwclock --systohc', not noticeable changes to behavior. Ran this command to check
date;hwclock
Wed Oct 26 12:39:09 MDT 2016
Wed 26 Oct 2016 12:39:11 PM MDT  -0.875328 seconds

I cannot run 'cat /etc/sysconfig/clock' as this file does not exist. Running a find command under the /etc/ tree to find 'clock' confirms that I have no file by that name there.
Checked to see if anything I am aware of has set the CRON_TZ variable. It is not set at the user level, nor at roots level. Have cron echo them out gives no output.
Comment: Is the `CRON_TZ` env var set anywhere?
Comment: try `hwclock --systohc` just for completeness, and add `cat /etc/sysconfig/clock` to question ?
Comment: Added both suggestions to my information, sadly neither provided much of value. CRON_TZ isn't set under any environment I can see, re-syncing the hwclock gave the same results as before (checked anyway to see if it changed, it did not) and I don't have an '/etc/sysconfig/clock' file.
Answer: One more place to look: the start-at-boot script(s) for cron, or the old school system crontab file /etc/crontab .  It's possible that the TZ environment variable gets set in, say, /etc/init.d/cronie or /lib/systemd/system/crond.service, I'm not sure what Debian uses for init system.
I've seen something like this when I tried to have crond run things every other hour:
0 */2 * * * /opt/dbms/rainstor/archiving/ama_term

crond ran the script on odd-numbered hours. I suspected, but never proved to myself, that it had to do with a daylight savings time confusion.
Comment: /etc/init.d/cron is grabbing the `/etc/timezone` file.  TZ=`cat /etc/timezone`. That file appears to be correct (Ran a checksum just to be double sure its identical to what it should be.). /lib/systemd/system/crond.service doesn't seem to want to modify any TZ variables.

I'm going to check the */2 suggestion to see if I am seeing the same thing.


Why don't I see a file being copied right away with ls?

Question: Is it due to the buffering in memory?  I did cp /network/large_file . & and I kept doing ls -lh to monitor progress, but the file didn't appear until it was about 400MB.  Linux 2.6 kernel, Bash 4, 4GB swap, 16GB RAM.
Comment: You'll probably get better answers if you tell us how you're copying this file from the network.
Comment: The file is on a CIFS share, mounted with mount.cifs to /mnt/network being copied to an EXT4 filesystem using the commands I listed.  What else would you like to know?  The file is ~ 260 GB.
Comment: Also  The local hard disk is virtualized in VMware (vmdk format) and the backing datastore is a hardware RAID 5 with 5 disks using a PERC controller in a Dell R620 server.
Answer: This is likely to be dependent on your underlying filesystem, possible hdd buffers, raid controller buffers (if you are using raid), etc. When a file is copied, it first starts the stream in memory, notifying the disk there is a pending write operation - and the disk takes care of it from there. It's very common for a write to have "completed", but the file is actually still being written by the disk. Some filesystems prevent this "lag" such as ZFS and I believe BtrFS (this is known as copy-on-write). Other filesystems will report the copy/write operation is completed when it's not really -- which can lead to file corruption if power is lost, etc. ZFS and BtrFS don't report back to the OS that a file write operation is completed until it is fully complete -- preventing this situation.
To test this, try doing a copy of something largerish - such as a DVD iso of your favorite distro from one directory to another. The command line will return to the prompt in a short while, but if you immediately type sync and send the command, you'll notice it will hang the command line until the write operation is fully complete. (if you have disk activity lights, you'll also notice they are still blinking)


Vocabulary contains too many choices

Question: Hello I've created a vocabulary which contains a lot of ingredients can i make it easier to choose them. At the moment it is a long list. If it is somehow possible to make a search form where i can select multiple ingredients it would be great. Modules or other soloutions?
Comment: Are you selecting from a list on a node edit form? Have you tried using the autocomplete widget?
Comment: Yes at the moment i'm using checkboxes/radio - I have tried autocomplete widget but that didn't work me.
Answer: I would suggest trying the Chosen module. It provides autocomplete functionality with multiselect capability. Using the multiselect field you can hold ctrl while selecting to keep the list open. Here's a demo.
Comment: Thank you that was what i was looking after. - How can i use it as a filter in view?
Comment: I'm not familiar with implementing the module, but the under the usage header on the module page it indicates it should work on any 20+ item select list by default. You may need to add a selector to target the views filter specifically on the Chosen module administration page.

Vocabulary contains too many choices


Megane in limp mode, obd reader says p0380, changed all four glow plugs yet same code and issue persists

Question: i have a Renault Megane 1.5 dci. I was on the motorway and my car went into limp mode, no warning lights came on dash or anything. I plugged in the obd reader and got a P0380 Glow plug/heater circuit A code. So I took it to mechanics and had all four glow plugs changed, however the car is still in limp mode and the same code shows. I did a proper diagnostic check from a mechanic and the same code P0380 still shows up. I don't know what to do and ran out of ideas why this issue is occurring and why the car is in limp mode.
Thank you.
Answer: The P0830 indicates a clutch pedal switch fault. The glowplugs aren't involved. Especially if the engine is already warm (it happened on the motorway, as you told).
I don't think that your mechanic is acting in a professional manner when he changes all your glowplugs without further diagnosis (as they are quite easy to check, even if installed)
Comment: My apologies i made a mistake it is meant to say P0380 not P0830, sorry for misunderstanding.


COVID-19 pandemic as mitigating factor for sentencing in the UK

Question: Are there any cases from the UK, whether from the Supreme Court or any other courts, saying that the COVID-19 pandemic can be considered as a mitigating factor for sentencing?
Answer: Yes,
R v Manning includes the following (my emphasis)

We would mention one other factor of relevance. We are hearing this
Reference at the end of April 2020, when the nation remains in
lock-down as a result of the Covid-19 emergency. The impact of that
emergency on prisons is well-known...

The current conditions in prisons represent a factor which can properly be taken
into account in deciding whether to suspend a sentence. In accordance
with established principles, any court will take into account the
likely impact of a custodial sentence upon an offender and, where
appropriate, upon others as well. Judges and magistrates can,
therefore, and in our judgment should, keep in mind that the impact of
a custodial sentence is likely to be heavier during the current
emergency than it would otherwise be. Those in custody are, for
example, confined to their cells for much longer periods than would
otherwise be the case – currently, 23 hours a day. They are unable to
receive visits. Both they and their families are likely to be anxious
about the risk of the transmission of Covid-19.


Is there a Windows equivalent of the Unix "strings" command?

Question: strings in Unix and Linux extracts printable strings from a binary file.  Is there a version of this for Windows?  I couldn't find one.
Answer: Not (AFAIK) built in, but there is one available from SysInternals (live link).  The SysInternals strings isn't a straight port of the Unix tool; it was written to find Unicode strings as well as ASCII:

Working on NT and Win2K means that executables and object files will many times have embedded UNICODE strings that you cannot easily see with a standard ASCII strings or grep programs.
Comment: how can I use this in Windows 10, please?
Comment: It should work for Windows. Just download the tool, and run it on the command line like this: `strings FILE_PATH`
Answer: A quick simple solution:
more < FILE_PATH.exe | findstr "."
This will print all strings from any kind of file ( with a little extra junk ), separated by a new line.
What actually happens is more < FILE_PATH.exe prints an ascii view of FILE_PATH.exe into the console, and the findstr "." filters out anything that isn't a string ( define a minimum length by adding more '.' e.g. findstr "....." will filter for only strings of length 5+ ).
strings -n 4 FILE_PATH => more < FILE_PATH | findstr "...."
strings -n 8 FILE_PATH => more < FILE_PATH | findstr "........"
And of course you can use findstr to make a more exact filter ( see findstr /? )
Comment: This is a good answer, but I find that the command never releases back to the console, and I have to press CTRL-C to break it after a few seconds. I suspect 'findstr' is not realising that the stream from 'more' has ended...
Comment: Note that this solution only works in Command Prompt (`cmd`), not PowerShell.
Comment: UNICODE strings could be included, but many are not quite readable in output of this command. For me the command also didn't finish, I had to break it with CTRL+C.
Answer: I believe MinGW contains a Windows version of GNU binutils, which in turn contains the strings program. You could try that.
Comment: and of course *binutils* is included in the Cygwin environment (http://www.cygwin.com/).  it doesn't seem to be included in GnuWin32 and UnxUtils, two other ports projects that provide unix utilities on Windows.
Answer: For a GUI-oriented alternative try 'Extract Text' in this utility collection by Juan M. Aguirregabiria. Quick and easy to use with persistent customization of which characters to match as strings. Probably doesn't support Unicode though.
http://tp.lc.ehu.es/jma/win95.html
Softpedia link included in case the link above dies
http://www.softpedia.com/get/Programming/File-Editors/Extract-Text.shtml


Is there a difference between Nintendo 64 controllers used on PAL and NTSC systems?

Question: Is it possible to use the controllers from an NTSC (Japanese / US) Nintendo 64 system on a PAL (EUR) system? Are they the same item or is there a difference?
Comment: @fbueckert - It appears the original NES controllers were region locked: http://retro.mmgn.com/NES/Forums/Nes-Controller-NTSC-to-PAL-Conversion
Comment: I don't see why they'd be different; just the power supply and display output devices for consoles should differ from region to region.
Comment: Interesting.  I hadn't known that was a thing.
Comment: @xiaohouzi79 So, did you try?
Comment: @xiaohouzi79 Which controllers were you trying to connect?
Answer: As far as I know, the controllers are identical, I'm fairly sure the controllers themselves are not going to have any region-specific differences.
Answer: Actually there is a difference between the cables of the controllers. Some controllers (I think the controllers from PAL systems) have a ferrite bead at the end of the cable. There are also different types of ferrite beads (I think 2).
Answer: I answered a similar question with additional details here.
Basically @electronbeam is correct the standard controllers for all regions send the exact same signal down the wire.
Comment: I can also confirm that I have now tried many (at least 50) Japanese controllers on PAL consoles and there is no difference. This includes using rumble packs and Pokemon transfer packs from PAL regions inside "Japanese" controllers and they all work the same. This includes controllers that were exclusive releases in Japan.


how to get buffer for file specified on command line?

Question: Let's assume I invoke EMACS (24.3.1) always with just one file name to visit.  How do I get the buffer for that file while in my .EMACS startup?  I tried it and the function (current-buffer) will return my scratch buffer.
Answer: You can use the variable command-line-args to get a list of elements making up the command line used to invoke emacs. If your command line consists of just two elements — "emacs" and the filename to visit — you can get the buffer associated with the file visited like this:
(get-buffer (file-name-nondirectory (cadr command-line-args)))

However, this won't work in your .emacs startup file because the buffer for the file being visited isn't available yet. Instead, you can add code to your .emacs file to add something like the above to the emacs-startup-hook, which is run after command line arguments are handled. For example, this code augments the hook to set a variable named cmd-line-file-buffer to the buffer of the file being visited:
(add-hook 'emacs-startup-hook
      (lambda ()
        (if (= 2 (length command-line-args))
            (setq cmd-line-file-buffer
                  (get-buffer (file-name-nondirectory (cadr command-line-args)))))))

Answer: There are two issues to solve: the .emacs file is loaded too early, and there are multiple buffers in a running instance of Emacs, even just after startup.
The first issue is solved by putting your code in emacs-startup-hook, as pointed out in the other answers.  The second issue is solved by ignoring any buffers that don't have any associated files:
(defun my-file-buffers ()
  (remove nil
          (mapcar #'(lambda (buffer) (and (buffer-file-name buffer) buffer))
                  (buffer-list))))

(add-hook 'emacs-startup-hook
          #'(lambda ()
              (message "The following buffers are interesting today: %s"
                       (my-file-buffers))))

Answer: I guess this is because the init file is loaded and run before the file to visit is loaded.  You could use the hook after-load-functions to run code just after the file to visit is loaded.  For example, put this in your init file:
(add-hook 'after-load-functions (lambda (f) (setq my-buffer (current-buffer))))


Massive number of XML edits

Question: I need to load a mid-sized XML file into memory, make many random access modifications to the file (perhaps hundreds of thousands), then write the result out to STDIO.  Most of these modifications will be node insertion/deletions, as well as character insertion/deletions within the text nodes.  These XML files will be small enough to fit into memory, but large enough that I won't want to keep multiple copies around.
I am trying to settle on the architecture/libraries and am looking for suggestions.
Here is what I have come up with so far-
I am looking for the ideal XML library for this, and so far, I haven't found anything that seems to fit the bill.  The libraries generally store nodes in Haskell lists, and text in Haskell Data.Text objects.  This only allows linear Node and Text inserts, and I believe that the Text inserts will have to do full rewrite on every insert/delete.
I think storing both nodes and text in sequences seems to be the way to go....  It supports log(N) inserts and deletes, and only needs to rewrite a small fraction of the tree on each alteration.  None of the XML libs are based on this though, so I will have to either write my own lib, or just use one of the other libs to parse then convert it to my own form (given how easy it is to parse XML, I would almost just as soon do the former, rather than have a shadow parse of everything).
I had briefly considered the possibility that this might be a rare case where Haskell might not be the best tool....  But then I realized that mutability doesn't offer much of an advantage here, because my modifications aren't char replacements, but rather add/deletes.  If I wrote this in C, I would still need to store the strings/nodes in some sort of tree structure to avoid large byte moves for each insert/delete.  (Actually, Haskell probably has some of the best tools to deal with this, but I would be open to suggestions of a better choice of language for this task if you feel there is one).
To summarize-

Is Haskell the right choice for this?
Does any Haskell lib support fast node/text insert/deletes (log(N))?
Is sequence the best data structure to store a list of items (in my case, Nodes and Chars) for fast insert and deletes?
Answer: I will answer my own question-
I chose to wrap an Text.XML tree with a custom object that stores nodes and text in Data.Sequence objects.  Because haskell is lazy, I believe it only temporarily holds the Text.XML data in memory, node by node as the data streams in, then it is garbage collected before I actually start any real work modifying the Sequence trees.
(It would be nice if someone here could verify that this is how Haskell would work internally, but I've implemented things, and the performance seems to be reasonable, not great- about 30k insert/deletes per second, but this should do).

Massive number of XML edits


Can a private company challenge an allegation made by the government and sue for damage?

Question: Can a private company challenge an allegation made by the government and sue for damage? Let's say that you own a chocolate factory in Cuba, but you were blacklisted for allegation of using slave labor by the DOJ or DOC or the U.S. military, can you go to the U.S. and challenge the allegation in an U.S. court?
Comment: What do you mean specifically by "blacklisted", and who is doing it to you?  The US government?  The Cuban government?  Your suppliers or customers?
Comment: If this is really happening, consult an oompah-loompah with legal experience.
Answer: One approach would be to sue the government for defamation. Sovereign immunity limits your ability to file such a suit, though sometimes you can sue the government. Under the Federal Tort Claims Act, there is a limit on the causes of action which is more stringent than ordinary liability. In particular, you can sue for

Any other civil action or claim against the United States, not
exceeding $10,000 in amount, founded either upon the Constitution, or
any Act of Congress, or any regulation of an executive department, or
upon any express or implied contract with the United States, or for
liquidated or unliquidated damages in cases not sounding in tort,
except that the district courts shall not have jurisdiction of any
civil action or claim against the United States founded upon any
express or implied contract with the United States or for liquidated
or unliquidated damages in cases not sounding in tort which are
subject to sections 7104(b)(1) and 7107(a)(1) of title 41.

Or, in short, "if the government does something illegal". There is no federal defamation statute (regulation etc) so it's not "against the law" in this specific sense for the government to defame you. And that assumes that there was a defamatory claim.
Whatever you mean by "blacklisting", it has to reduce to some restriction on commercial transactions under some regulation, such as the sanctions against Iran. Such restrictions are authorized by Congress, and generally involve a presidential order pursuant to a federal determination of unlawful behavior by parties "over there". For example, Huawei has been "blacklisted", but not all goods from China are blacklisted. Here are the current Cuba sanctions. Since this is a fairly broad and hypothetical question, let's assume that a company is on a list because of X, but X is not actually true. Then putting the company on the list is not legal (the statutory conditions are not satisfied), and the company can sue the government. But hire a really good attorney, because the underlying authority may involve "sole determination" or "at the discretion" of the President.
Products produced with forced labor (even in part) cannot be imported. The legal details regarding that restriction are here, but basically there may be an investigation into an allegation of forced  labor. AAnd then

(f) If it is determined on the basis of the foregoing that the
merchandise is subject to the provisions of the said section 307, the
Commissioner of CBP, with the approval of the Secretary of the
Treasury, will publish a finding to that effect in a weekly issue of
the Customs Bulletin and in the Federal Register.
(g) Any merchandise of a class specified in a finding made under
paragraph (f) of this section, which is imported directly or
indirectly from the locality specified in the findings and has not
been released from CBP custody before the date of publication of such
finding in the Federal Register shall be considered and treated as an
importation prohibited by section 307, Tariff Act of 1930, unless the
importer establishes by satisfactory evidence that the merchandise was
not mined, produced, or manufactured in any part with the use of a
class of labor specified in the finding.

You might sue under the theory that required procedure wasn't followed; you might even sue under the theory that no reasonable finder of fact could think that the goods were the product of forced labor. However, the courts generally defer to the judgment of regulatory agencies, so you will probably lose that lawsuit. But also, you would not be suing over the allegation, you would be suing over the restriction. The government can allege away to its best judgment, however bad that may be.
Answer:
Let's say that you own a chocolate factory in Cuba, but you were
blacklisted for allegation of using slave labor by the DOJ or DOC or
the U.S. military, can you go to the U.S. and challenge the allegation
in an U.S. court?

You cannot successfully sue the government (or government officials acting in their official capacity) for money damages for intentional torts (including defamation, but excluding certain civil rights violations) in court due to their sovereign immunity.
You can generally sue for injunctive or declaratory relief to be removed from a formal government classification that has legal consequences (e.g. forbidding you from bidding on U.S. government contracts). Most such statutes have a formal process for doing so, but if the statute does not, you can still sue in an ordinary court case of that government's courts. There are often significant procedural limitations on such lawsuits (such as short statutes of limitations and a requirement that administrative remedies set forth in the statue or regulation be exhausted).


Dragon scratching glass a lot

Question: My dragon is a hatchling from the pet store. I've got him in a 10 gallon tank for now which stays 95 °F in hot end and 75 °F in cool end. He surfs glass a lot. I have checked all the sites on this subject to find out why and I even covered inside tank on three sides so he can't see reflection. He eventually goes in his rock a little after I switch to night lamp but when I pull him out and put him on chest he wiggles in between chest and blanket and goes to sleep.
So my question is: is this normal or is there something I'm doing wrong?
Comment: I know absolutely nothing about dragons, if it was a mammal, I would say it was bored.  Do you have anything it can play with?
Answer: I've seen this countless times. Beardies are fairly social with their people. He wants out, give him some cuddle/play time and see if the behaviour reduces after you put him back. If you pull him out after bedtime, it makes sense that he just wants to go to sleep. It's great that he's comfortable enough with you to do so. Keep up spending time with him, he'll learn that scratching glass means he comes out.
Downside: You spend so much time playing with beardie, you get nothing else done ;)
Answer: This is a pretty common "I have nothing to dig in" symptom. If you aren't using a substrate he can dig in, get a pot or container and fill with some loose soil so he can have somewhere to scratch his digging itch.
Also, please consider getting a bigger tank soon. 10 gal is probably ok for a hatchling, but that's going to get real cramped real quick. And having that large of a temperature gradient over that small of a tank seems like it would be pretty hard to maintain. And of course be sure there are plenty of hides all over so he can hide in a comfortable temp.

Dragon scratching glass a lot


All my music has been deleted off my phone, and I don't know how to get it back!

Question: I put all my music on a playlist seperate from the rest of the music on the iTunes library, so I could easily get to what music I wanted to listen to, instead of my brother or sister's music. My brother recently got an iPod nano, and didn't know how to use iTunes, after explaining it to him, he deleted my whole entire playlist. I didn't know, so when I hooked my phone up to the computer to sync some songs I was going to buy, all the music on my phone disappeared. I've tried re-doing the playlist and syncing all of it to my phone again, but it won't work. I've also tried turning off my phone for certain periods of time, still nothing.
I lost about 200 songs (thankfully not more), and I don't know how to get it back.
Comment: Did you tried re-selecting that playlist in iTunes's iPhone settings?
Comment: Here are some things you could add so we could help you out: Where are the songs you first synced to the phone? Why not copy them to this computer?
Answer: If your brother deleted the songs themselves they are gone unless your computer is backed up.
If your brother just deleted the playlist you need to recreate the playlist and then re-sync it.  Here is a how to article on how to do that. - http://www.ehow.com/how_2214496_sync-playlists-iphone.html


Does "reset this pc" work on a Bootcamp Windows 10?

Question: I want to Reset my Windows 10 back to its factory state. I installed Windows 10 thru bootcamp partition. Does the "Reset this PC" option work on it? If not how should I reset my windows partition?
Answer: You can try the Reset this PC option and if it doesn't work, simply copy and files to iCloud, OneDrive, etc or a hard drive and then remove the Bootcamp partition from macOS and reinstall Windows 10.
Comment: What will happen to the bootcamp drivers?
Comment: Drivers should remain but just in case back up your files and be prepared to redo Bootcamp if it doesn't work.
Comment: I will try it and let you know :)
Comment: Great! Also, you can reinstall Windows Support Software from Bootcamp if drivers do get corrupted or deleted.
Comment: My drivers died where should I install it?
Comment: Boot Camp Assistant > Action > Download Windows Support Software. Then, you will need to install it.
Answer: I did it, and things got weird.  It reset to like an old version of Windows Home, something I didn't have on any ISO when I made the partition in bootcamp.  It was super laggy, looked like garbage, so I ended up just erasing the whole partition and starting over from zero.


I am 16 years old boy & i don't want to get married because I like to live alone & i can control my sexual desires is it ok in Islam?

Question: I am 16 years old boy & i don't want to get married because I like to live alone & i can control my sexual desires is it ok in islam ?
Answer: salaamu alaikum,
Marriage is preferred but it is neither mandatory nor obligatory.
Allahu A'lam
Answer: السلام عليكم
Marriage is a legal union between a man and woman without which they cannot be together. The Prophet (peace and blessings be upon him) considered marriage to be a part of Sunnah, then added: "whoever turns away from my Sunnah is not from me."
In another narration, he said: "O young people, those of you who can support a wife should marry, for marriage controls the gaze and protects the private parts from prohibited acts. And if one is unable to marry, he should fast for it is a shield." (Bukhari and Muslim)
In al-Sharh al-Kabir, concerning obligatory marriage it says:
"If a person fears that he may commit fornication, it (marriage) is obligatory on him." In Fath al-Wahhab, it says: "For the woman who has (physical) desires, marriage is sunnah, just as it is for the one who needs maintenance and the one who fears being taken advantage of by immoral persons."
me speaking: if you think you're going to have this mindset in a few years do as you please. but you can commit zina with your eye, ears, and hands. Masturbation is haraam. marriage is the best thing so you won't fall into theses test. الله أعلم


In Android app,I changed all px to dp and sp. Now it is not opening. What is wrong?

Question: I had many objects using px. I changed everything in my app to dp and textsizes to sp. Now my app won't open.  When I use the debugger and go step by step it does open and then displays this. I did not change any code from before when it was working, just the px. By the way, I am using tabHost and their should be 5 tabs on the bottom.  It splits it into about 30.  It is just very strange stuff going on.  Do you know what is wrong and how to fix it?
Thank you.
This image is the error message:

This image is using the debugger.
Answer: Read about DDMS and logcat to obtain a stacktrace and to see what the problem is: http://developer.android.com/guide/developing/debugging/debugging-projects.html
This is what you are looking for:
Answer: Revert all sp and dp back to px, and make sure it works again. then start doing small incremental changes to isolate which UI element is causing the problem. When you find which one did it, look through your code to see if you're making any assumptions and calculations based on the size of that UI element.


Why doesn't the defer attribute work on script tags that don't source an external js file in Firefox?

Question: Why doesn't the defer attribute work on script tags that don't source an external js file in Firefox?
lets say an ancient cms only allows me to add javascript to templated pages via in-page [script]...my code...[/script] tags and strips any html tags entered into the content area field, thus preventing me from embedding scripts just above [/body].
But since all my code does is manipulate the DOM I need it to not run until after the page has loaded and I don't feel like jumping through the hoop of attaching a function to the window's onload which then calls another function which then runs my code.
So, what was the reasoning behind not allowing the defer attribute on script tags that don't use the src attribute?
Answer: You can't rely on the defer attribute because it's not widely supported. Use something like this, if you want to execute scripts when the document is loaded.


How to change Oracle MAF's default springboard icon and alignment?

Question: How can I convert given springboard toggle button from:
This -- Right aligned menu icon, opens dropdown menu on click

To This -- Left aligned with bars icon, directly open spring board on click.
Answer: We can also do the following to achieve this.

Disable the default Springboard toggle button by unchecking the "Show Springboard Toggle button".
Drag and drop the method gotoSpringboard() method from ApplicationFeatures data control as a command link in the primary facet in all the pages.
Remove the text and add an springboard icon for the link or add an css class to achieve the springboard icon.

My code looks like this.
<code><amx:commandLink actionListener="#{bindings.gotoSpringboard.execute}"
                   disabled="#{!bindings.gotoSpringboard.enabled}" id="cl2" styleClass="fa fa-bars fa-2x">

  </amx:commandLink>
</code>
Answer: Just modify the CSS.
You should be able to find the correct CSS selectors an then override their css attributes by using a self defined skin.
More info about MAF skinning: http://docs.oracle.com/middleware/mobile200/mobile/develop-oepe/oepe-maf-apps-create.htm#CIHCCFIG
Answer: The Mobile Alta skin has the springboard icon on the right. But , If you use mobileFusionFx skin, the springboard is designed to be on the left by default. Either you can use the mobileFusion skin or override the CSS property of the MAF Skin by adding stylesheet. The link is already provided in the answer given by User404.


Factor analysis between two measures with different age range

Question: is it totally meaningless or impossible to do factor analysis between two measures with different age ranges? For example, I want to test if two personality measures are testing the same underlying broader construct (like latent factors...), but the two measures are tested in different ages of the same group of people (age difference like 5-7 years), is it statistically meaningless to do so because I can not ignore the age difference between the two measures?
Answer: It's not statistically meaningless. It will tell you about the factor structure.
There may be interpretation difficulties - what if a factor emerges that is really just an artefact of age? For example, if you measured height and math ability in children, these would be likely to load on the same factor.  But that's just because older kids are taller and better at math.  If you did that factor analysis in adults, or in kids of one age group only, you'll get a different factor structure.
Similarly, the same question might mean something very different to people of different ages. "I like playing games" or "I like going to parties" mean very different things to a 5 year old, a 13 year old, a 20 year old and a 50 year old.
There are methods for assessing whether factor structures are consistent across groups - these are known as factorial invariance analysis.  You can compare item intercepts, error variances, loadings and factor means and variances across groups. These are typically done using confirmatory factor analysis, but there are also approaches using exploratory factor analysis.


Can you tap a card whenever you want?

Question: If I have a colorless 1/1 untapped creature that has no abilities, can I just tap this card whenever I want? Or let's say I have a artifact/enchantment/planeswalker with no abilities. Can I just tap it?
Comment: If you have something to add to your question, just edit it into the actual question text. There is no reason to repeat information in a comment.
Comment: Are you looking for a quick off-the-cuff answer, or a deep rules-lawyering answer?
Answer: nope
2 relevant rules:

110.5c A permanent retains its status until a spell, ability, or turn-based action changes it, even if that status is not relevant to it.

and

110.5. A permanent's status is its physical state. There are four status categories, each of which has two possible values: tapped/untapped, flipped/unflipped, face up/face down, and phased in/phased out. Each permanent always has one of these values for each of these categories.

it retains its status until something changes it, and tappedness is part of that.
a sort-of meta-guessing "here's how I would design a game" answer, while we're at it: There's no way they would have printed Gilder Bairn or Immovable Rod without closing that loophole.
Comment: The entire idea of untapping as a cost (rather than an effect) is questionable if you could just tap a card whenever you want. There is a functional difference in that an effect goes on the stack and a cost doesn't, but it's still questionable.

Can you tap a card whenever you want?


How to open path in Double Commander from Terminal

Question: If I type open $(pwd) or open /anypath/ I will get the path opened in Finder. How I can achieve similar results but with the path opening in Double Commander instead?
Answer: By default Double Commander is programmed to open with two Tabs each set to the current location of the Double Commander.app application bundle.  If one then changes to a different location other then the default on one of the Tabs and then closes Double Commander and reopens it, it opens to the last location before being closed.
Here's a way to open Double Commander to a specific path from the command line similar to opening Finder to a specific path using Terminal.  This covers the default of two Tabs.
Use the following syntax in a Terminal:
open -a Double\ Commander --args -path location ...

Example:
open -a Double\ Commander --args -path ~/Documents

This will open Double Commander to your Documents folder in the left Tab and the right Tab will open to the last location opened.
If you want to set the location of the both Tabs use:
open -a Double\ Commander --args -path location location

Example:
open -a Double\ Commander --args -path / ~/Documents

This will open Double Commander to the root of the boot volume, typically Macintosh HD, in the left Tab and your Documents folder in the right Tab.
If there is a way to set just the right Tab while letting the left Tab default to the last saved location I do not know the syntax for it, if it's even doable.  I did try several attempts using different delimiters but none gave the wanted results in testing.

Update to address the comment by s.newave:
I'd add a function to your .bash_profile file as in the following example code:
function odc () {
        pkill doublecmd; open -a Double\ Commander --args --no-splash -path "$1" "$2"
 }

Then from the command line in Terminal you can simply use odc or e.g.: odc / ~Documents
Note that if the Double Commander > Configuration > Behaviors > [] Allow only one copy of DC at a time, check box is not checked, you can use the following variant to open a new occurrence of Double Commander to the desired paths leaving other occurrences of Double Commander running.
function ondc () {
        open -n -a Double\ Commander --args --no-splash -path "$1" "$2"
 }

Then from the command line in Terminal you can simply use ondc or e.g.: ondc / ~Documents
Note that in either case you can also pass a single argument as well, e.g. odc ~Documents or: ondc ~Documents
The function names odc and ondc stand for open double commander and open new double commander, respectively.
Comment: is there a way to make this work if Double Commander is already open? Using the same command doesn't seem to work.
Comment: @s.newave,  See updated answer to address your comment. Note that you can use the commands shown within the two functions by themselves on the command line, they do not need to be used as functions however it makes more sense to do so.


What is analysis in Latin?

Question: The word "analysis" is found in some form in a number of languages, and it is of Greek origin.
I could not think of a Latin term meaning "analysis" (as the word is used today, which may or may not be the same as the original Greek meaning).
The word can be adapted to Latin easily enough, but I am looking for a more Latinate word, if any.
I would assume that at least Cicero found a word for this purpose.
What classical Latin word would be good for "analysis"?
Comment: Everyone: **Can you please post suggestions as answers?** Any suggested translation is an answer (it doesn't have to be perfect to be worthy), comments are intended for requesting clarifications and otherwise improving the question.
Comment: But opinions alone sholudn't be answers, that's what makes this site better than Yahoo answers or Quora. I know a sister site where people upvote opinions, and people with honest questions get the wrong answers b/c the right ones arrive later. Maybe I should move this to meta, but I'm on the phone now
Comment: @Rafael That is a good topic to bring up on meta. I think opinions make good answers, as long as they are more expert opinions than personal ones and are clearly marked as such. If an answer is prefaced with "I found no sources to back this up, but my intuition as a Latin teacher suggests", I know where it's coming from. I prefer a suggested translation to be given in an answer, so that we can vote and comment on that suggestion. (I know not all will agree with me.) Admittedly, it is a problem across the entire network that fast and easy answers come first and rank higher than they should.
Comment: How about _intellego/intellectio_, from inter+lego? Just a guess, though
Comment: Lexicon Recentis Latinitatis mentions the word partitio.
Answer: Smiths shorter English:Latin has an odd extended vocabulary designed to help Sixth-formers compose Hexameters on any given subject.
It mentions explicatio, but suggests the field of the 'unfolding' of complications needs to be specified. As ...

subtilis alicujus rei;  Cic.

For Chemical analysis, Bacon: 'corporum separatio et solutio.'
also M.L. 'compositum ad principia redigere.'
Analysis, -eos is appropriate in the context of analysis, and synthesis.
Answer: The first thing to note is that the meaning of "analysis" has developed considerably from its Greek origin. Etymonline notes that its use for a "statement presenting results of an analytic process" started in the 1660s.
The Greek verb, ἀναλύω, means, "unloose, undo." It was used, for instance, of Penelope's "undoing" of her web every night in the Odyssey. From this it developed the extended meaning (provided by the LSJ) of "resolution of a problem by the analysis of its conditions." It is opposed to σύνθεσις ("synthesis"), which is a kind of composition.
In terms of its component parts, the precise Latin equivalent is resolutio:

re- = ανα- (ana-)
solvo = λύω (lyō)

Unfortunately, resolutio cleaves much more closely to the original, literal meaning of ἀναλύω. The dictionary entry provided glosses it as "an untying, unbinding, loosening" and only provides a couple entries that approach the "solution" meaning we expect in English. Solutio is a little more promising, and, in medieval Latin, meant pretty much the same thing as English "solution." (Reading Latin manuscripts, a common trope is to get a long list of objections, after which comes a "solutio" in which the author answers the objections.)
If you want something more akin to the current (post-1660s) meaning, which emphasizes the "statement of the results" rather than the actual "breaking down process," the first word that comes to mind is expositio.
Answer: The adjective analyticus seems perfectly acceptable in modern Latin. If I'm allowed to introduce a personal note, the first paper that I ever published (in 1960) was in the journal Analytica Chimica Acta.
https://www.sciencedirect.com/journal/analytica-chimica-acta
Comment: @joonas Ilmavirta  I'm surprised that you even found it. That must be just about the longest word ever to find its way on to the LLSE!
Comment: The word *analysis* has indeed made its way to modern Latin, but presumably not classical. Euler's [*Introductio in analysin infinitorum*](https://en.wikipedia.org/wiki/Introductio_in_analysin_infinitorum) is a classic. (The personal note is interesting; perhaps I should find out what p-dimethyl-aminobenzylidenerhodanine is...)

What is analysis in Latin?


Old IP keeps coming back

Question: I got a new router, and my raspberry pi keeps adding the old IP to my system everyday. I have tried assigning a static ip, flushing the interface, making sure that the old ip is in none of the files, but everyday it adds the old route back. I use my pi as a pihole, so my wifi goes down everyday until I remove the old route. Can anyone help me out?
Comment: Please edit your question and post the contents of /etc/network/interfaces and /etc/dhcpcd.conf (without the comment lines).
Comment: `keeps adding the old IP to my system` - what do you mean exactly?
Comment: @abolotnov   Everyday, it adds the old IP address (192.168.1.x) to the route table as the default even though I have the new IP (192.168.50.x) set as the default. This causes it to try to use the old IP, crashing my network because I use my pi as a pihole.
Answer: Your question is not clear, however, you can add ifconfig eth0 192.168.1.X netmask 255.255.255.0 up to the rc.local. This file is located to /etc, So, do the following:
1.sudo nano /etc/rc.local.
 2. Add ifconfig eth0 192.168.1.X netmask 255.255.255.0 up to /etc/rc.local. Note that add this command between fi and exit 0 and X is the IP's host id.
 3. sudo reboot.
You can also add ifconfig eth0 192.168.56.X netmask 255.255.255.0 down to disable the unusable IP.
The  rc.local  script runs on each startup.
Comment: So I should add the working IP to rc.local?
Comment: Yes, And also disable the unusable IP.
Comment: That broke it completely. It broke the dhcpcd service and I had to reset that.
Comment: Please take note that using `/etc/rc.local` has limitations due to [Compatibility with SysV](https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities/). We have seen many problems here on this site using it. Following the recommendation of the developers from **systemd** you should avoid using it.

Old IP keeps coming back


IDXGIFactory->CreateSwapChain sets system error 0X594

Question: I am working on a system where I want to intercept Direct3D calls to create tiled displays. I am using an APITrace like interceptor to create a message stream and recreating the calls in a second program, much like the old Chromium project. The application side works fine but the program that processes the message stream does not. What I find is that when I call CreateSwapChain() the function returns S_OK but GetLastError() returns 'error = 0x00000594 : Cannot set nonlocal hook without a module handle.' I check the error state with GetLastError() just prior to calling CreateSwapChain() and there is no error. This error makes no sense to me. Can anyone shed any light on this?
Answer: I found the problem. The parameters for the CreateSwapChain function the pDesc structure includes an output window handle. Since the message stream is packed with the arguments for the message processing side the window handle has to be replaced with correct handle before the function is called be the processor side.


When should I use the word 'that' between parts of sentences?

Question: What is the correct syntax:

I'm quite sure that your record was successfully created

Or

I'm quite sure your record was successfully created
Comment: Maybe this will help: http://ell.stackexchange.com/questions/6835/when-can-i-remove-the-word-that-in-a-sentence
Answer: As Derek mentioned, either is incorrect and neither is wrong, but there might be instances that would prompt someone to include a that.
For example, a that is often inserted is when you want to emphasize that you are paraphrasing a quote. Compare:

(1) Linda said, "Tom has never been to that restaurant."
  (2) Linda said Tom has never been to that restaurant.
(notice that (1) and (2) are exactly the same, word-for-word, save for the punctuation)
(3) Linda said that Tom has never been to that restaurant.

If Linda's exact quote was,

"I don't think Tom has ever tried Alice's Restaurant."

then it might be best to include the that, to indicate a paraphrase, rather than a quote. However, as one website indicates, using the word that is not mandated:

Another reason might be for the sake of readability. In some contexts, the extra word might be seen as superfluous, so a writer might leave it out. In other contexts, a sentence may have an unnatural flow without the word, so it might get included.
For example, let's say a friend of ours named Susan was pretending that she has lost one of her shoes, when, in reality, she knew the shoe was still in her car. I might ask:

Who knew Sue knew where her shoe was?

but that reads much like an awkward tongue-twister, particularly since the first four words all rhyme. So, I think I'd be more inclined to say:

Who knew that Sue knew where her shoe was?

even though the first isn't ungrammatical.
Answer: Either is acceptable, though the second is more common nowadays. I think the difficulty arises because as well as being used as a conjunction in your example, "that" is the opposite to "this". So you might be asked "Do you want this car?" and reply "No I want that one". Then when you consider that meaning to "that" and place it in your first sentence there's some confusion what the "that" is doing. In common speech "that" is dropped these days
Answer: Syntactically, the use of the word that denotes a change in the clause. It is also used to introduce a reported part of the speech, what is most often called Indirect Speech. Colloquially, it has become convention to use a sentence without that because it tends to decrease the ambiguity and the redundancy.
For example, consider conversion of the following sentence to Indirect Speech :

She said, "That was a great meal."

The indirect speech is :

She said that, that was a great meal.

Notice the double use of that. The correct syntax is given above where the first that is followed by a comma. But modern language usage does not require strict adherence to this rule and it has led to the complete omission of that as a clause separator. Both forms (with and without that) are accepted as correct in the current context.
Another point to mention is when to use that as a clause separator. As mentioned in the example above, the presence of more than one adjacent that's in the sentence can make it unseemly and redundant. In such cases, I have found it more comprehensible to replace the that in the speech to it or some related pronoun or by the use of the noun to which that refers to.
Hence, the more modern way to say the above sentence is :

She said that it was a great meal.


User changes folder name in SP 2013 and link doesn't work?

Question: This might be a simple one, but has created a folder with various files, puts a link to it in an email, but if they change the name of the folder the link doesn't work. I thought that links in SP 2013 were dynamic and linked to the files even if the folder name was changed?
Answer: You can enable document ID service and configure it.
SO new documents in the site collection will automatically be assigned new IDs. And it will track items regardless of their location or the name of folder in which document is present.
Refer this link - https://support.office.com/en-us/article/Enable-and-configure-unique-Document-IDs-ea7fee86-bd6f-4cc8-9365-8086e794c984


H264 video works using src attribute. Same video fails using the MediaSource API (Chromium)

Question: http://www.youtube.com/html5 indicates that Google Chrome is compliant with MediaSource Extensions & H.264.
I make a simple test checking that my video is supported by Chromium, using the
    <video id='player' autoplay='true'>
        <source src='/test.mp4'  type='video/mp4' />
    </video>
The video plays smoothly.
A second alternative that also works fine consists in loading through AJAX the byte chain and converting the buffer to a URI object. Then asigning such URI to the (video) source.src attribute.
Finally I try to load the same video through AJAX and inject it into a MediaSource Buffer. It fails with the error 4. (Source Not supported).
The code used is similar to:
var mediaSource = new (window.MediaSource || window.WebKitMediaSource)();
window.video = document.getElementById('video1');
window.video.addEventListener("error", function onError(err) {
    alert("window.video error detected:");
    console.dir(window.video.error); window.worker.terminate();
});
window.video.pause();
window.video.src = URL.createObjectURL(mediaSource);
var onMediaSourceOpen = function (e) {
    mediaSource.removeEventListener('sourceopen', onMediaSourceOpen);
    window.videoSource = mediaSource.addSourceBuffer('video/mp4;codecs="avc1.4d001e,mp4a.40.2"');
    injectVideoIntoBuffer();
}

mediaSource.addEventListener('sourceopen', onMediaSourceOpen);

var injectVideoIntoBuffer = function onResponse() {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', "test.mp4");
    xhr.responseType = 'arraybuffer';
    xhr.addEventListener("readystatechange", function () {
         // Next line raises a MediaError, code: 4, (MEDIA_ERR_SRC_NOT_SUPPORTED)
         videoSource.appendBuffer(new Uint8Array(xhr.response));
          ...
    }, false);
    xhr.send();
}

I tried different mp4 files, generated either with ffmpeg/avconv or MP4Box. Not luck at this moment. A similar code works fine with VP8/WebM test files.
Thanks in advance for any help/hint or link!
Enrique
Answer: Thanks all for your answers. Looks like newer versions of Chrome fix the problem.
I wrongly assumed that if a codec is supported by the browser, it will automatically be supported by MSE. In practice, that's not the case. A browser can support a set of video codecs (h264/webM/theora/...), it can also support MSE, but just a subset of video codecs when "injecting" the video into MSE buffers.
The compatibility matrix between MSE and codecs doesn't only depends on the browser but also on the OS. So for example, Google Chrome Supports MSE+h264 on Windows and Android but not (yet?) on Linux. VP9+MSE is supported on Windows and Linux but not on Android.
Youtube has a very useful test page to check browser support for MSE & h264/VP9 codecs:
https://www.youtube.com/html5
Answer: Try this:
var injectVideoIntoBuffer = function onResponse() {
   var xhr = new XMLHttpRequest();
   xhr.open('GET', "test.mp4");
   xhr.responseType = 'arraybuffer';
   xhr.addEventListener("readystatechange", function () {
       if (xhr.readyState == xhr.DONE) {
           videoSource.appendBuffer(new Uint8Array(xhr.response));
       }
      ...
   }, false);

It could be that you're only appending a fragment of the mp4. This would be fine if the fragment from the AJAX request is in whole mp4 atoms, i.e moov, moof, mdat. But i'm thinking that might not be the case.
If it still fails, you could try to transcode the movie again with: (NOTE! This will remove the sound)
ffmpeg -an -codec:v libx264 -profile:v baseline -level 3 -b:v 2000k -i in.mp4 out.mp4

and MP4Box with:
MP4Box -dash 10000 -rap -frag-rap out.mp4

Just to see if the movie works.
Comment: Hi, thanks for your hint!. no luck at this moment. In fact, as you guessed, I'm appending fragments. I tested injecting the same fragments directly as BLOB in the video.src and it works, so it does when appending to a buffer in IE11.
Answer: I think Chrome might only support WebM with media source extensions for now.


Gain at critical frequency for Butterworth and Chebishev filters

Question: In Chebyshev filter the critical freq occurs with gain Gp But in butterworth filter it is always at -3dB; why does this happen? Can anyone explain intuitively on this?
Answer: If I understood your question correctly, Butterworth filter is maximally flat (no ripples) in the passband frequencies, and at the cutoff frequency, the gain is down by 3dB (3.01 to be exact). But disadvantage is slow roll off from passband. See https://en.wikipedia.org/wiki/Butterworth_filter especially the figure showing magnitude roll off.
For Chebyshev filter type 1 filter, the roll off is more sharp but result is ripples in pass band. You can control this ripple, which will in turn vary the Gp that you mentioned. See https://en.wikipedia.org/wiki/Chebyshev_filter. If you specify $\delta$ as the ripple factor in dB scale (like 1dB), $\epsilon = \sqrt{10^{\delta /10}-1}$ in linear scale. The gain Gp = $\frac{1}{\sqrt{1 + \epsilon^2}}$ in linear scale. The sharpness of your passband and passband ripple specification will affect $\epsilon$ which will inturn affect Gp.
Comment: Thank you for your response sir
Actually my doubt is say if we are about to design a Band Pass Filter from Normalized LPF of a Butterworth filter We will be calculating the critical frequency and the order of the NLPF then convert the NLPF to a LPF with that critical frequency and then substitute s by (s^2+Wp1*Wp2)/(s*(Wp2-Wp1)).  But this step is not required in Chebyshev design.  In case of Chebyshev once we get the order of NLPF we directly substitue s by (s^2+Wp1*Wp2)/(s*(Wp2-Wp1)) without calculating Wc. Why is it so?


Preliminaries to start linear algebra?

Question: Title says it all, are there also any specific online courses or books you would recommend for the prerequisites?
Thanks
Comment: not much. all modern books i am aware of introduce basic set theory and start from scratch.
Answer: It depends on how abstract you want it to be. If it's just and introductory course without a ton of abstractions and proofs, then honestly not much is needed as a prereq, maybe some basic calculus. If you want an abstract and proof heavy course then maybe some groups, rings, and fields (these would be necessary for a high level linear algebra course), set theory, and most importantly how to do proofs would probably be necessary. All of that is covered in a college discrete mathematics or introduction to proofs course.
So it's really up to you.
Assuming you know at least calculus then these are some good resources for an introductory course:
Linear Algebra: a geometric approach by T Shiffin and M.R. Adams
The Essence of Linear Algebra by 3blue1brown
For an intermediary course in linear algebra (proof based and abstract but still undergraduate level):
Linear Algebra and its Applications, by Peter D. Lax,
Linear Algebra Done Right by Sheldon Axler
For a graduate level course in linear algebra (very proof based, very abstract):
Advanced Linear Algebra by Steven Roman
Answer: There is a nice book called Linear Algebra by A.R. Rao and P. Bhimasankaram for development of theory and for problem book and problem solving tricks you can see Linear algebra and linear models by R. B. Bapat but in in these book not cover the topic linear transformation approach and further reading I suggest the book Matrix Algebra From a Statistician's Perspective by David A. Harville this book contain huge ammount of topics.
Answer: Basic arithmetic and set theory were the only prerequisites for the linear algebra that I learned in undergrad.
Answer: To start you can read Stanley Grossman's linear algebra book, it is a basic book that allows you to understand some important concepts and has a number of good exercises and examples. Once you have studied this book, you can read Pita Ruíz's linear algebra book (it is in Spanish, I don't know if it has an English version) this book is of a higher level of difficulty than Stanley and very good.
Also, I suggest Gilbert Strang's text for linear algebra. That book is a treasure.
If you want to dig deeper into the topics, then the ideal is the linear algebra text by S. Friedberg A. Insel L. Spence. I still use the text as a reference for my classes.

Preliminaries to start linear algebra?


Illustrator: how to align different elements of a layer without them collapsing together

Question: I'm quite new to illustrator, but I'm having hard time trying to align the whole layer to the center of the artboard without its element collapsing all together, would you have any suggestions  how to do it? Thank you very much
Answer: Group all the pieces in your first image.
Select them all and hit Command/Ctrl+G (or Object > Group from the menu).
Illustrator will then treat the group as a single object, and problem solved.
Comment: Although that has the downside that if the elements are in different layers (which here they aren't) they are now organized under the group in current layer. Which may affect drawing order and this can be a problem. But alas there is no good alternative to this workflow.
Comment: Yes, however, not much reason to use layering for this particular situation.


How do I ruin my own base?

Question: I have a Clash of Clans Town Hall 1 base and I want to mess it up. How can I ruin it? What are the ways to lose everything?
Answer: The best way to "ruin" it is to start a new account and remove the old one. Then the Town Hall is gone forever.
You can't downgrade buildings / upgrades, but you can make the Hall an easier raid target by separating all the buildings as far apart as possible. Similarly, you can avoid building or upgrade anything so as to not improve your hall. Essentially, do not play the game after making your base as easy to raid as possible.

How do I ruin my own base?


Magitech Utility Items

Question: Assuming a prevalence of magic and a large number of magic sweatshops, for lack of a better word. What non-combat items would be mass produced first in a pseudo-medieval setting?
Comment: What kind of magic does your world have?
Comment: Welcome to the site, Java-N00b. This is extremely broad. There are far more "non-combat items" than there are "combat items" (unless we consider weapons of opportunity as "combat items," then "non-combat items" are a subset of "combat items"). Additionally, please note that the [tag:magic] tag requests you specify how magic works in your world. If you could [edit] your question to provide details about your magic system and the society and question, we may be able to provide a definitive answer.
Comment: This question is too broad. Without specifying more about your world or how magic works, there are too many possibly answers, and it is primarily opinion based as well. I'm voting to close, but please ask a better specified question.
Comment: Tech in general is made to make life easier for the user. example, hoes make farming easier. Priority will be usefulness/effort to make. So realistically, magitech would evolve the same tools sci-tech has, but with a different power source. So just take what you have around the house and replace 'because electricity' with 'because magic'.
Answer: It will probably be magic that helps with everyday problems and needs:

Healing supplies. Got a cold? Take this pill, gone. Food poisoning? This potion cures it. So many uncomfortable conditions that magic can heal at an instant. Also, things like massage spells would probably sell well. And anti-pregnancy magic. Oh, and not to forget that you don't have antibiotics, so magic can be the only rescue for SO MANY lethal medieval sicknesses.
Cleaning spells. No more doing the dishes, cleaning your cart, doing the laundry. Also, getting rid of lice and fleas...
Teleportation and flying spells (for superfast travel)
Entertainment: trinkets that give vivid and exotic dreams, illusion spells, shapeshifting potions, these kind of things... also, to be honest, sexual entertainment would probably be a thing. I mean, there already are massage and illusion spells... right?
Communication: long-distance communication can only be done via magic, so it would definately be a thing.
Illumination: candles were super expensive, so after dark, there wasn't much to be done. Magic lamps might be a big game changer, here.
Anti-Smell Charms: Considering the situation in big cities, especially in waste and feces disposal, i think anti-smell charms are going to be a best seller...

As a rule of thumb: Whatever you can imagine that would make peoples lifes easier, is fun or can be misused in a sexual way, someone might produce and sell.
Answer: Depends on the schools of magic available. Most common I'd rate are those that fill basic needs like illumination (Crystals or lamps), utility (A fire starter wand, water purifier) and healing items.
Answer: If the setting is that magic users are common and abused, why not put them to work maintaining the city shields against an overwhelming enemy? In this situation, magical items would actually be disdained and magic users considered lower-class citizens (the poor working class).
If you want a product then, it could be related to the survival of the city... such as porting in water or genetically-magicified food, and clothing. (Again because of class society, only the lower class eat this food, while the REAL food is reserved for the upper classes and warriors.)

Magitech Utility Items


What is the wavefront quality of VCSELs? How does the wavefront quality of VCSELs compare to Fabry-Perot laser diodes and DPSS lasers?

Question: I am currently looking at this VCSEL. According to the datasheet, it has a narrow spectral linewidth and emits a Gaussian beam, which are both properties that I find interesting. But I'm also interested in the wavefront quality. However, despite my research, I cannot find any sources that discuss the wavefront quality of VCSELs. What is the wavefront quality of VCSELs? How does the wavefront quality of VCSELs compare to Fabry-Perot laser diodes and DPSS lasers?
Answer: Companies that sell optical components often help customers choose the best component. This includes understanding them, how they work, tradeoffs, and so on. Your link has a Complete Product Details button, which has a tech support link. Use it.
Also a good general source for information on optical components is the RP Photonics Encyclopedia and Buyer's Guide. For example, see Vertical Cavity Surface-emitting Lasers and Fabry–Perot Laser Diodes.
Comment: I am aware of this. I have asked Thorlabs, but they do not know what the wavefront quality for that particular diode is. Therefore, I am asking here to get a rough idea of the *general* wavefront quality of VCSELs. I have done my own research on this, but I have not been able to find anything, so I was curious if the more knowledgeable people would know anything (or have any references that explore this).


Derivation of electromagnetic plane waves in free space (Zangwill 16.3)

Question: Zangwill derives electromagnetic planes waves by:

Showing that wave-like solutions to the Maxwell equations exist.
Supposing that plane wave solutions to the wave equation depend on one spatial variable:

$$\vec{w} = \vec{w}(z,t) \text{ (where w is a plane wave solution)}.$$
From (1.) and (2.), it follows that $\vec{E}(z,t)$ and its associated $\vec{B}(z,t)$ constitute components of a valid electromagnetic plane wave. Zangwill starts with $\vec{E}(z,t)$ and derives $\vec{B}(z,t)$ via Faraday's law (in free space).
It is shown via Gauss's law and Ampere's law that the $\hat{z}$ component of $\vec{E}(z,t)$ is at most a constant. For simplicity, I think, we then "safely" set it to zero.
Because $\vec{E}(z,t)$ is also be a valid solution to the wave equation, it takes on the form:
$$\vec{E}_+(z,t) = \vec{f}_\perp(z+ct) \text{ and } \vec{E}_-(z,t) = \vec{g}_\perp(z+ct).$$
Because $E_z = 0$ (the $\hat{z}$ component of the electric field) and using Faraday's law in free space:
$$\frac{\partial}{\partial t} \vec{B}_+(z,t) = -\hat{z} \text{ }\times \text{ } \frac{\partial}{\partial z}\vec{f}_\perp(z+ct) = -\hat{z} \text{ }\times \text{ } \frac{1}{c}\frac{\partial}{\partial t}\vec{f}_\perp(z+ct).$$
I've ommitted the (-) component. My questions are:

How do you get to the right hand side of the above equation?
Zangwill states:

"Integration of the first and last terms in (16.26) gives the magnetic field up to a function of z alone. The latter may be dropped because we are only interested in time-varying fields. Therefore,
$$ c\vec{B}_+(z,t) = -\hat{z} \text{  } \times \vec{f}_\perp(z+ct)." $$
What does he mean by this quote? Why do we not just equate the left most and right most term and show that the integrands are equal, resulting in the same result.
Answer: The answer to 1) is chain rule.