What are the differences between the 1st and 2nd printings of the "Fiend Folio"?

Question: RPGGeek lists two printings for the original Fiend Folio. So as to identify different printings, what are the observable differences (if any) between the first and second printing?
Comment: @ShadowRanger, the 1ed *Deities & Demigods* famously had whole mythos eliminated from later printings...Without asking, how is OP to know the Fiend Folio didn't have similar changes?
Comment: @ShadowRanger: often there were minor differences in cover elements (e.g. different logos) or other inconsequential differences between printings that allowed identifying printings. This is more a matter of identifying the exact printing of books, rather than impact on usage.
Comment: Do you have reason to believe it changed? Errata wasn't common in the 1E era; I wouldn't expect anything beyond minor typographic fixes, at most.
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] for more guidance.
Answer: According to the Acaeum, the 2nd printing has both the ISBN and TSR product number on spine & lower left corner of back cover, while 1st has only ISBN in both places. Instead of the TSR product number on the back, the 1st printing has copyright information: "1981 TSR Hobbies, Inc.  All Rights Reserved." and "The designation 'TM' is used to designate trademarks owned by TSR Hobbies, Inc." Internally, the printings should be identical.


Python Video Streaming beginner error in initializing the camera

Question: I want to make a video stream between my raspberry pi usb cam and my laptop
Client:
import io
import socket
import struct
import time
import pygame.camera

# Connect a client socket to my_server:8000 (change my_server to the
# hostname of your server)
client_socket = socket.socket()
client_socket.connect(('192.168.1.12', 8000))

# Make a file-like object out of the connection
connection = client_socket.makefile('wb')
try:
    with pygame.camera.Camera ()as camera:
        camera.resolution = (640, 480)
        # Start a preview and let the camera warm up for 2 seconds
        camera.start_preview()
        time.sleep(2)

        # Note the start time and construct a stream to hold image data
        # temporarily (we could write it directly to connection but in this
        # case we want to find out the size of each capture first to keep
        # our protocol simple)
        start = time.time()
        stream = io.BytesIO()
        for foo in camera.capture_continuous(stream, 'jpeg'):
            # Write the length of the capture to the stream and flush to
            # ensure it actually gets sent
            connection.write(struct.pack('<L', stream.tell()))
            connection.flush()
            # Rewind the stream and send the image data over the wire
            stream.seek(0)
            connection.write(stream.read())
            # If we've been capturing for more than 30 seconds, quit
            if time.time() - start > 30:
                break
            # Reset the stream for the next capture
            stream.seek(0)
            stream.truncate()
    # Write a length of zero to the stream to signal we're done
    connection.write(struct.pack('<L', 0))
finally:
    connection.close()
    client_socket.close()

but I have this
Error:`Traceback (most recent call last):
  File "camera.py", line 15, in <module> with pygame.camera.Camera ()as camera:
  File "/usr/lib/python2.7/dist-packages/pygame/camera.py", line 100, in __init__
    _check_init()
  File "/usr/lib/python2.7/dist-packages/pygame/camera.py", line 86, in _check_init raise     ValueError("Need to call camera.init() before using.")
  ValueError: Need to call camera.init() before using.

I am new to this programming language so I don't understand how to intalize a camera to use it and its function I found some tutorials online but didnt get the wrong part in my code
`
Answer: This occurs because you are not initializing pygame before call Camera()
First of all make sure you import all you need :
import pygame
import pygame.camera
from pygame.locals import *

Now you have to initialize pygame and pygame.camera:
pygame.init()
pygame.camera.init()

Finally create the Camera object as you did:
with pygame.camera.Camera ()as camera:
   blablabla...


What's the difference between 其処ら, 至る所, and そこら中?

Question: Trying to figure out how to say the word "everywhere" in Japanese, and I want to make sure I'm using the correct one. Usually there's some difference due to context or formality. Context of what I'm doing does not matter though, because I'd generally like to hear when and where to use each word.
Comment: I think context does matter here, because "everywhere" can be translated into a lot more than these three words, which together cover just a subset of the way the word is used in English. Some examples of what you wanted to convey might help. Otherwise, a good place to start for understanding "everywhere" constructions in Japanese would be here: https://japanese.stackexchange.com/questions/13074/%e3%81%a9%e3%81%93%e3%81%a7%e3%82%82-vs-%e3%81%a9%e3%81%93%e3%81%ab%e3%81%a7%e3%82%82-vs-%e3%81%a9%e3%81%93%e3%82%82.
Answer: 其処{そこ}ら is ambiguous between anywhere/any ordinary place and everywhere. So it overlaps with the other two mostly in the same way anywhere and everywhere overlaps in English. For example, そこらでみられる literally means can be seen anywhere or just common, which can be can be seen everywhere. It is similar to そのへん (cf this question). On the other hand, そこらで買った means bought around there. Since buying happened at one place and not everywhere obviously, it is different from そこら中で買った (which, being less likely, means bought things everywhere).
至る所 and 其処ら中 means everywhere/all over the place and are interchangeable as far as I can think of. The latter is perhaps more colloquial due to the nature of そこら.


When was David born?

Question: I would like to know when David, the king of Israel, was born.
Comment: Welcome to Christianity.SE!  When you have a moment, please take our [tour] and visit our [help] to learn more about us.  This question might be more easily asked on our sister site, [Judaism.SE](https://judaism.stackexchange.com/).
Answer: David was born 1041 bc, maybe plus or minus a year.
David was 30 years old when he began to reign and he reigned 40 years.(2 Sam 5:4)
Multiple lines of evidence put the start of the reign of Solomon at 971 BC.
(However, there are two provisos:
First, there was a co-regency between David and Solomon, and the Bible does not tell us how long that was for.  The years of a co-regency would be added to the length of reign of both kings.  If the co-regency was for 2 years then David was born about 1039 BC.
Second, the Jews numbered the years of a reign by the number of New Year's Days within the reign plus one. So, if a king reigned just over one year but included two New Year's Days then the reign length would be counted as "three years". eg a reign from 31 December 2020 to 1 January 2022 would be counted as three years, a reign from 1 Jan 2021 to 1 Jan 2022 would be two years, and a reign from 1 Jan 2021 to 31 Dec 2021 would be one year, even though it is only two days shorter than the reign of three years. So David's 40 years could have been just over 38 years.)
The evidence for the year of the beginning of the reign of Solomon is found in:-

the work of Valerius Coucke, based not primarily on the Bible, but on classical sources, including Josephus. (See the wikipedia article on "Valerius Coucke");

Edwin Thiele's "Mysterious Numbers of the Hebrew Kings";

William Hamilton Barnes's evidence from the Tyrian King Lists.  Barnes was not aware of the work of Coucke in the 1920s but followed similar reasoning independently;

Kenneth Kitchen's evidence from Egyptian chronology;

1 Kings 6:1, Ezekiel 40.1 and Leviticus 25:9,10, together with the Seder Olam.

This 5th line of reasoning is the simplest.  The Seder Olam probably written in the second century AD says that Ezekiel's Jubilee in Ezekiel 40:1 was the 17th.  It was a Jubilee Year because in that year New Year's Day, Rosh Hashanah, was on the 10th day of the month (Ez 40:1, see Leviticus 25:9,10). For 48 out of 49 years New Year's Day happens on the 1st day of the month.  The Jubilee Year happens every 49 years.  Ezekiel 40:1 is counted from the destruction of Jerusalem 587 BC, and was in 574 BC.
A translation of the Seder Olam says:

And so it says (Ez. 40:1): "In 25th year of our exile, on the day of the New Year, on the tenth of the month, 14 years after the destruction of the of Jerusalem." When did he Ezekiel have this vision? At the beginning of a Jubilee period. If they stayed for 17 entire jubilee periods, how can there be an excess of 17 years?

See http://www.betemunah.org/sederolam.html and look at the section in part 2 under Joshua (chapters 11 and 12), and the paragraph starting "Caleb said to Joshua "I was 40 years old when Moses..", etc.
The author of the Seder Olam does not know how to find 17 "extra" years from the time of the beginning of the Jubilee Cycle to the 14 year after the destruction of Jerusalem (in 587 BC).  These difficulties of the author of the Seder Olam are not important to us.  What is important is that he says there were 17 Jubilee cycles: for this assertion he must have had access to information outside of the Bible held by the priests in Jerusalem.
Tishri of 574 BC is in the same Jewish year as Nisan 573 BC, and Nisan 573 BC + (17 jubilees * 49 years) = 573 + 833 = Nisan 1406 (year of entry into Canaan and year the Jubilee cycles first began)
1406 + 40 years in the wilderness = 1446 (date of exodus).
1446 - 479 (as per 1 Kings 6:1) = 967 BC (Temple of Solomon started to be built).
967 BC + 4 (as per 1 Kings 6:1) = 971 BC (Start of Solomon's, approx. end of David's reign)
971 + 70 (as per 2 Samuel 5:4) = 1041 BC (year of David's birth).
3 Extra Biblical evidences of the existence of David:-
In 1993 AD the "House of David" inscription was found at Tell Dan, the first time the name "David", relating to a king, was confirmed outside scripture.  The inscription related to events in the year 841 BC, and defeat of Ahaziah.  "We thus gain a clear mention of David as dynastic founder of the kingdom of Judah about 150 years after his death". (See "On the Reliability of the Old Testament" by Kenneth Kitchen, Eerdmans, (2003), pages 92,93 and 615).
The stela of Mesha king of Moab also mentions the "House of David" from about the same time.  "This was some six generations after his [David's] death" (Kitchen, page 93).  (The stele was bought in 1868 and is in the Louvre. But it was not until 1994 that Andre Lemaire showed it speaks of "the House of [D]avid".  See https://web.archive.org/web/20120331134523/http://www.cojs.org/pdf/house_of_david.pdf )
Shoshenq I of Egypt lists his achievements at Karnak.  One of the places he speaks of which is in south Judah/Negev region is a place called "Heights of David".  This would have been within 50 years of David's death (Kitchen, p93).
Postscript:
I should have provided a link to the archaeologist Eilat Mazar's article, first published early 2006:  "Did I find King David's Palace?" :-
https://www.biblicalarchaeology.org/daily/biblical-sites-places/jerusalem/did-i-find-king-davids-palace/
Eilat Mazar reasoned from the scripture where to find David's Palace.  She managed to raise the money to do a dig and found a palace built after the Tyrian style: according to scripture the Palace was built by Tyrians sent by Hiram, King of Tyre (2 Sam 5:11).
Post post script:
So David slept with his fathers, and was buried in the city of David. 1 Kings 2:10.
In 1913 Raymond Weill, a Jewish archaeologist, used Nehemiah 3:16, where the rebuilding of the walls of Jerusalem is being discussed, to do an archaeological dig. It reads:

After him Nehemiah the son of Azbuk, ruler of half the district of Beth-zur, repaired to a point opposite the tombs of David, as far as the artificial pool, and as far as the house of the mighty men  (Nehemiah 3:16).

Weill reckoned from the Scripture where the location was and did a huge archaeological dig, finding the remains of tombs inside the walls of Jerusalem.  (Burials in ancient Israel would always be outside the city, the only exception being royal burials.)  The verse in Nehemiah speaks of the sepulchres (plural) of David.  It seems to me it is speaking of the sepulchres of the kings of the House of David, not just David's tomb.  For more see the Youtube video by Joel Kramer here: https://www.youtube.com/watch?v=_k2k0qLFR74&t=11s
Comment: +1 This is the first answer to have the basic dates in agreement with scholarly evidence. Your supporting evidence is very thorough. I want to understand better the relationship of all these points.
Answer: According to the New International Version Study Bible, David began to reign in 1010 B.C. and died in 970 B.C. After King Saul died, David ruled over Judah from 1010/1011 and then conquered Jerusalem in 1004. His family line comes through Boaz and Ruth, then Jesse (Ruth 4:18-22).  The New Living Translation Study Bible notes make this comment:

The book of Ruth ends with a genealogy of ten generations,from Perez, the sonof Judah (Jacob's son),to David the grandson of Obed... That Ruth and Boazwere ancestors of Israel's greatest king is a majorreason for the inclusion of this small book in the O.T.

David was the youngest of Jesse's sons when Samuel anointed him (1 Samuel 16:10-13).  David is believed to have been twelve to sixteen years of age when this happened. The NIV Study Bible places this even at around 1025.
That would place David's birth around 1040 B.C.
God promised David a descendant to rule on the throne forever and the genealogy of Jesus is traced back to David in both Matthew and Luke's gospels.
Answer: The exact date of David's birth is not known, and there is no evidence of his reign or existence anywhere except for in the Bible. Most historians agree however that his reign was around 1000 B.C.1, and it is plausible that David died near 962 B.C. If he lived 70 years, then that would but his year of birth around 1032 B.C.

1 Encyclopedia Britannica
Comment: Sorry ShemSeger but this post is 25 years out of date.
Answer: If you add the lengths of the reigns of the kings of Judah in 1 & 2 Kings you get 393.5 years, which is very close to the 390 years of iniquity of the "house of Israel" (Samaria) in Ezekiel 4:4-6, Samaria never had a king who did right in the sight of the LORD and although the nation of Israel {Samaria} ended in about 722 BC the "house of Israel" or tribes went on, many of them moved or had moved to Judah, see 2 Chronicles 35:16-19.  If we count back from the accepted date of the Babylonian destruction of Jerusalem in 586 BC and add the 390 years (probably more accurate than the adding of the reigns), you get 976 BC for the split of the kingdom under king Rehoboam.  Then add 40 and 40 for the reigns of Solomon (2 Chronicles 9:30) and David (2 Samuel 5:4), you get 1056 BC for the beginning of David's reign.  David was thirty years old when he became king (2 Samuel 5:4), therefore it appears that David was born in 1056+30=1086 BC.

When was David born?


How to send fix amount of balance to contract address

Question: I'm working on a smart contract where I need to send a balance from a user account to the contract address. The amount to be sent is fixed and hardcoded in the contract. I have tried to figure out some ways, but the only thing I have found is self.env().transferred_value(). But I don't see any option to fix the amount with this method.
Answer: I believe what you are trying to achieve has to be done in the application layer. self.env().transferred_value() only returns the transferred value the user has set.
In the Smart Contract what you can do is check that the amount the user is transferring is equal to the hardcoded value you have and throw an error if is less:
let transfered_value = Self::env().transferred_value();
assert!(transfered_value < your_hardcoded_value, "insufficient amount!");


Is G sharp major a real key?

Question: I'm mostly self-taught, so I don't know much in the way of theory beyond the basics. I have heard of G sharp Major a few times. I believe a scale in the key goes as such: G♯, A♯, B♯, C♯, D♯, E♯, Fx, G♯. Is this key real (as in, has it ever been used in a notable piece)? Or, is it a "theoretical" thing? If it is real, does it have any significant relations to G major?
Answer: I'm not sure why you'd have any reason to question why it's real ... it's not really related to G Major though, no more than C# major is related to C Major.  It's enharmonically equivalent to A♭ major, just like C# Major = D♭ Major or F# Major = G♭ Major.
As for pieces involving it, Wikipedia mentions some.  In general, keys with double-sharps aren't used very commonly because their equivalents are easier to play.  With just intonation, however, G# is not actually the same note as A♭, nor are the keys the same.  For more information on that see my answer here and the answers on the question it links to.
Comment: With just intonation, G sharp isn't even the same pitch as G sharp (when the first G sharp is the third of an E major chord, and the second G sharp is the fifth of a C sharp chord).  Because just intonation depends on tuning to a particular key, it's meaningless to say that the keys of G sharp major and A flat major aren't the same.  No composer would write a piece in G sharp major and expect the performer to understand the reason for doing so.
Comment: "It's enharmonically equivalent to A♭ major" - Not always.
Answer: The larger question is why any composer would use a certain key signature rather than its enharmonic equivalent. For instance the choral music composer John Rutter is known for notating songs in C♭ major (with seven flats) rather than in B major (with five sharps). In the equal-tempered system, C♭ major and B major are the same key.
Despite the fact that this frustrates the heck out of piano accompanists, there is actually a good reason for it; C♭ major is the preferred notation for a harp player, due to the way that the harp is tuned and the pedals on the harp are used to transpose pitches. Rutter has written several pieces that may be performed by either harp or piano.
So in this example, the choice of key signature can be influenced by the instrument that the composer is primarily writing for.
Comment: This question discusses why a composer would select one key over another in more detail: http://music.stackexchange.com/questions/15221/whats-the-point-of-keys-other-than-c-and-am
Answer: Realize first that keys can be, and very often are, "temporary" within a piece.  That is, the tonality may modulate to a new key without changing key signatures.  Accidentals are used to indicate on notes that are in the tonality of that section.
With that in mind, I could imagine that G♯ Major would be used in a number of works, but not as a key signature.  Try looking for works that might modulate to G♯ Major.  c♯ minor could certainly do so, for instance, if the more "traditional" approach of modulating to the relative major were replaced by modulating to the dominant.  Sometimes, as in Chopin op. 10, no. 4, the composer will choose to write in A♭ Major instead for notational convenience.  Compositions in C♯ Major are fewer, but you may be even more likely to find the modulation in question in such a work.
Comment: Yes, this happens quite a lot especially when you are starting in keys with a lot of accidentals. There's a short bewildering section in the c-sharp major fugue from book 2 of Bach's Well Tempered Clavier where you land in the key of e-sharp minor (measure 22). There's a big cadence in a sea of double sharps from b-sharp 7 to e-sharp minor. I think he was just screwing with us.
Answer: These unusual keys are more likely with transposing instruments.  For example, if the non-transposing instruments are playing in F# major then the Bb instruments will have to play in G# major.  Some instruments are pitched in Eb so if the non-transposing instruments are playing in B major (not so unusual) then the Eb instruments will have to play in G# major.
If the piece is intended for these instruments then these keys are unlikely.  However, if you transpose on sight with these instruments then you need to be comfortable with some quite wild keys.
Addition suggested by phoog's comment.  G# major is so crazy that it would be more practical to rewrite it as Ab major provided that you regard that as the same.  However, this will be a surprising key for a saxophone player.  Nonetheless, if you are playing music in concert pitch by sight then G# might be slightly better as transposing up a major 6th will be familiar to many Eb instrument players (I have done it many times) but transposing up a diminished 7th will be much less familiar (I have never done it).  Fortunately, I have not been faced with a concert pitch piece in B major while playing the alto or baritone sax.
Comment: Given how horrific the key signature of G# major is, I strongly doubt that saxophone players get sheet music in it. (I speak as a fomer clarinet and bass clarinet player, who admittedly has only seen a maximum of 3 flats in the key signature of bass clarinet sheet music I've been handed.)
Comment: @phoog Yes and no.  Depends on your opinion of whether G# major and Ab major are the same.  Ab major would probably be a surprise to a saxophone player.  I'll add a comment.
Comment: @Dekkadeci Indeed, I doubt that anyone would be mad enough to print music in G# major.  I think that it is more an issue for transposing on sight.  Although G# major is mad, it is a more familiar transposition than to Ab major.  Orchestral clarinet players would have the option of an A clarinet.
Comment: This answer is incorrect.  When the concert instruments are playing in F sharp major, the B flat instruments will be playing in A flat major.  The same is true for E flat instruments playing a piece in concert B major.
Comment: badjohn, @Dekkadeci is right.  G# major has F double sharp in the key signature.  Nobody is going to print a part with that key signature, period.  That's just crazy talk.  It will be printed in A flat major or possibly without a key signature.  A flat major might be a surprise to a sax player, but G sharp major all the more so.
Comment: @phoog I acknowledged that ages ago.  I would not expect anyone to print music in G# major.  Odd as Ab would be to a saxophone player, it would still be better.  However, please reread my comments on transposition by sight.  Transposing up a major 6th is familiar (as a player of Eb instruments).  Although enharmonically the same, transposing up a diminished 7th is not.
Answer: In 12-EDO and equal temperaments that are multiples of 12, G♯ Major is redundant since G♯ and A♭ are enharmonically equivalent. You only ever hit these "theoretical" keys briefly as part of chord progressions or cadences.
However, if you go into other tunings, like 19-EDO (1/3-comma meantone), 31-EDO (1/4-comma meantone), 43-EDO (1/5-comma meantone), or 53-EDO (Pythagorean tuning), G♯ Major is a real thing, fully separate from A♭ major, since G♯ and A♭ are different notes.
Comment: Nobody's going to use G sharp major in any actual piece intended to be played by a human.  The double sharp in the key signature is too much to ask.
Comment: @phoog I'm well aware.
Answer: Here's how it's related to G major: It's a semitone higher.
I don't know about pieces scored in G#, but any time a guitarist puts a capo on the first fret because the singer is finding G too low, that's G#.
Comment: That is Ab Major.
Comment: So perhaps that guitarist actually wants to signify that they are raising the key signature by one semitone, is that what you were saying?
Answer: you can look at the "G# Maj." key in a couple of different ways, (1) as a disregarded, feared and denounced part of music and music theory, very much like the dreaded locrian and diminished modes - to be avoided at all cost. It's a theoretical problem much like arguing if there is such a key as B#/Cb Maj., E#/Fb Maj., in comparison to G# which is not at the same time enharmonically a whole tone note such as B#/Cb, E#/Fb are. (2) you can simply view the G# Maj. scale as such and follow the major scale formula (W-W-H-W-W-W-H) and substitute the double F# for it's whole tone name of G for convenience sake, so you would have 6 sharps instead of 6 + a double (actually a double sharp would count as 2, so you have 8 sharps). It doesn't matter how many sharps or flats a key has or if there is a theoretical complication, if you follow the simple formula it all works out automatically. (3) to make it even easier,(on guitar) it's both the 1st G major finger pattern and also the 3rd C Maj. finger pattern moved to the G#/Ab position- all major and natural minor keys are simply the C-major finger pattern transposed to a different tonic note. Of course this would also depend on if you have a chord progression or scale that is either ascending or descending in pitch, if the Maj.-chord progression/scale in this position descends it should be called an Ab Maj., but if it ascends it should be called a G# Maj. - as flat and sharp also show the direction of movement (higher to lower in pitch and vice-versa) for any and every musical structure.
Comment: Are you thinking that B# and Cb are actually the same sounding notes? Same with E# and Fb ? 'Cos they're not!
Comment: No of course not, you misunderstood what was written, it says "...is there such a key as B# or Cb Maj. , likewise with E# or Fb Maj...etc.", not that they are the same key or tone.
Comment: It's just the way it was phrased.

Is G sharp major a real key?


Creating bootable usb of windows

Question: I've been trying to create a bootable usb of windows 7 setup to do a clean installation on my laptop.I have a 32 GB Sandisk USB (3.0) and my hard drive is GPT. At first, I used Rufus in MBR partition scheme and selected target device as UEFI(CSM) because my UEFI device has support for legeacy bios ( I saw the option in my UEFI settings.) But everytime I tried to boot from the usb, it kept showing no media present. I thought rufus formatting my usb as ntfs was the problem( fat32 oprion was unavailable ). But when I tried making the bootable usb with YUMI with FAT32 selected, it said not enough disk space in the middle of the proccess(where 7zip extracts the files to the usb). I think it's because my iso is too large(over 5 GB). So in this situation, what do i have to do to successfully make working bootable usb of windows 7 ?
Comment: Does it has to be Windows 7? For Windows 10 you could simply use the MediaCreator tool by Microsoft and as you have a Window 7 license you could install Windows 10 and activate it using your Windows 7 license key.
Comment: Ik about media creation tool, but i wrote windows 7 for a reason. I have to install it for a certain purpose
Comment: Then I would simply ask around if one of your friends have a USB CD/DVD drive that you could borrow for the installation.
Answer:
fat32 option was unavailable

my iso is too large (over 5 GB)

Then it looks like you are not using an official Microsoft Windows 7 retail ISO. If you did, then your ISO would be smaller than 4 GB, and, when creating a drive for UEFI boot, Rufus would also allow you to select FAT32 as the file system.
I'm afraid that, because there is no way to tell how your unofficial ISO might have been altered, possibly in ways that completely break USB boot, you're probably not going to get much help here.
I would therefore encourage you to get your hands on an official Microsoft Windows 7 retail ISO, and see if that works better.
Comment: Unfortunately, i cant get an official iso because they are no longer available in the Microsoft website. I have a physical dvd of windows 7 lying around tho. But everytime i boot it from boot options, it doesn't recognize the media and skips into booting my hdd.
Comment: I believe Windows 7 ISOs are still available at https://www.microsoft.com/en-us/software-download/windows7.
Comment: I see. Thank you very much !

Creating bootable usb of windows


Accessing the dashboard in blogengine.net tries to download cshtml file instead of loading the page

Question: I have recently installed the blogengine.net application on both my local test server and my live web server. They are both Windows Server 2003 with IIS6. The application works fine on my local test server but it works partially on the live server. When I try to access the dashboard in the settings section, instead of loading the page, the browser tries to download the page. And when I click on themes (another cshtml page) I get a lot of strange text starting with <code>@using BlogEngine.Core.Packaging @{ Page.Title = Resources.labels.themes;</code>.....etc
I have been googling a lot but most answers seem to focus on IIS7 and the ones that seemed to apply for IIS6 did not seem to apply since they mentioned checking for missing DLLs (which isn't the case since the bin folder contains the exact same files as the one in the working server).
Things I have tried:
1) Resintalling the blog engine
2) Install MVC 3
3) Adding a mime type "text/html" to the ".cshtml" extension under the HTTP Headers tab in the web site properties (in IIS6)
4) Adding a dedicated application pool for the website
Some of the suggestions I found suggested that I should set the application pool to use .Net 4, but I don't know how to set that in IIS6 (unlike IIS7.5) and I set the asp.net setting in the website properties to 4.
Any help or pointers would be greatly appreciated.
Thanks!
Answer: OK. It appears that the problem has now been solved. For the benefit of other people having the same problem, here is how to do it:
1) In IIS Manager, go to website > properties > Home Directory > Configuration
2) Add two application extensions for .cshtml and .cshtm, setting both to:
executable = c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll
limit to = GET,HEAD,POST,DEBUG
Note that after doing this I was still having the problems with the browser trying to download the files rather then loading the pages. This was solved by clearing the browser cache (was using Chrome).
Comment: I'm having the same problem on Win 2008 Server. How would I apply your fix to IIS7?


Add-on not showing up in Blender 2.82

Question: Today, I downloaded Blender 2.82 and attempted to install an add-on that would allow me to export models in a format compatible with the program MikuMikuDance (MMD for short). After doing my research, I attempted to install the add-on while all the files were in a ZIP folder. However, no matter what I try - changing the add-on directory in the Preferences, getting rid of excess dots in file names - the add-on won't show up even though a message indicates it was successfully installed. I've tried looking at other questions regarding similar issues, but nothing seems to help, and I'm at the end of my rope here.
Comment: Hello :). I'm pretty sure it works with Blender 2.8 [available here](https://download.blender.org/release/Blender2.80/) but perhaps it wasn't updated for 2.82.
Answer: (I don't have the reputation to comment this: Powroupi's latest version of Blender MMD Tools works through version 2.90 (my version). Download it here.)
As mentioned by Kisracora, the plugin needs to be unzipped before the mmd_tools folder can be inserted into the addons folder. (If you're on Windows, you can simply enter the zip folder without unzipping and click-drag the mmd_tools folder in.) If doing that and enabling the plugin in Blender DOESN'T get it to show up, you may want to try rightclick > Properties > Unblock the zip (checkbox near the bottom of the Properties window).
Answer: MMD Tools is confirmed to work in the latest version of Blender, so this is not a version issue. However, make sure to double check you are downloading the 2.8+ version of MMD tools, and not a version for 2.79 and below.
Did you make sure to unzip the file before attempting to install the add-on? MMD Tools contains multiple plug-ins, so you may not be able to use Blender's built-in "Install" button.
Unzip the downloaded folder titled "blender_mmd_tools-dev_test"
Inside the unzipped folder, there should be a folder titled "mmd_tools." We are going to manually put this in the add-ons folder for our Blender Program.
The image below shows the file path for my add-ons folder.

Yours will possibly be the same, but it may be different.  If you cannot find it, go to "This PC" and search for "Blender Foundation" to find the folders.
Drag the folder "mmd_tools" into your "addons" folder.
Return to Blender. Go to Edit > Preferences > Add-ons and search for "mmd"
MMD tools should be in the list. If it is not, hit refresh and make sure that "Enabled Add-ons Only" is not checked.

Add-on not showing up in Blender 2.82


Is it possible to LUKS require both password and key file?

Question: My goal is to be able easily destroy medium with key file in emergency situation and make system unbootable, even is potential advisor knows right password for the system. I'd store this key file in secure place and restore it after critical situation. I tried add key file using command # cryptsetup luksAddKey /dev/<device> but I didn't achieve what I want. I want to cryptsetup require both key file and password, not to boot system if one is provided. How can I achieve this in cryptsetup?
Comment: see if your distro supports some flavor of encrypted keyfiles. then you need password (to decrypt keyfile) and keyfile in turn decrypts the LUKS partition. ( example https://wiki.gentoo.org/wiki/Custom_Initramfs#Encrypted_keyfile )
Comment: AFAIK LUKS works with just one password *or* keyfile provided, but requiring a login passphrase after LUKS is opened might be the closest I can think of. But I don't understand the goal listed first, how will a keyfile let you "destroy" the data (or the LUKS header)?
Answer: You can create a detached LUKS header: a LUKS header metadata that is separate from the LUKS protected data, instead of being right before this data. Just put it on an external device like an USB key and you're set: if the external device is destroyed (and no backup available), there is no way to recover the data even by knowing the keyslot password.
From LUKS EXTENSION:

To specify a detached header, the --header parameter can be used in
  all LUKS commands and always takes precedence over positional
  parameter.

You should always refer to this device with some detected metadata (see below) rather than directly (eg: /dev/sdb), to avoid obvious fatal mistakes (and probably same for the data part). So for example, assuming you have an USB key identified like this when inserted and shown with ls:
lrwxrwxrwx. 1 root root  9 Feb 17 10:46 /dev/disk/by-id/usb-SomeBrand_SOMESERIAL -> ../../sdb

Creating the LUKS partition with detached header like this:
cryptsetup luksFormat /dev/datadevice --header /dev/disk/by-id/usb-SomeBrand_SOMESERIAL --verify-passphrase

will store the metadata (including the password protected master key) on the USB device. Of course you can choose to partition and format a filesystem on the USB key instead and have the header be a file on this filesystem. I'm trying to minimize dependencies for this example. You'd probably have to do this manually somehow at install time, because it's probably not supported by any installer.
There is now at least one difference: in this case by default there's no room before the data anymore, so /dev/datadevice can't even be detected as LUKS at all, which can be good (stealth) or bad (automatic scripts will have a harder time working to unlock it). You can still put a parameter to get the usual headroom (--align-payload 4096 (usually witnessed from using cryptsetup luksDump /dev/... | grep ^Payload on a normal LUKS) ) and then create first a fake (never used later) LUKS header there just for sake of detection if you really want.
You can then put the corresponding informations in /etc/crypttab:
myluksprotecteddata /dev/somedevice none luks,header=/dev/disk/by-id/usb-SomeBrand_SOMESERIAL

and/or unlock it directly with a cryptsetup command (just add the --header=/dev/disk/by-id/usb-SomeBrand_SOMESERIAL) option.
WARNING: compatibility with systemd, especially for booting, is not guaranteed.


If the solar system is a non-inertial frame, why can Newton's Laws predict motion?

Question: Since there is no object in the universe that doesn't move, and the solar system likely accelerates through space, how did Newton's Laws work so well? Didn't he assume that the sun is the acceleration-less center of the universe? Shouldn't there be many psuedo-forces to account for planetary motion?
Comment: Haresh
11

About what was assumed (including pseudo-forces) see [Keppler's mechanics of celestial bodies](http://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion).
Answer: There's no doubt the solar system is accelerating. The milky way galaxy rotates, and we're quite on the outside. Hence, there's a permanent acceleration vector pointing to the center.
However, this is a phenomenally small acceleration. If you'd try to measure it here on earth, you run into all kind of practical problems when you try to isolate it. For instance, the earth's gravity isn't really that constant, at this scale. The tides move ocean water around, in reaction to the moon's gravity.
So, in practice, when Newton's law is a sufficiently good approximation (relativistic effects small enough), the Sun can be considered to stand still.
Comment: It might be worth just literally computing the centripetal acceleration of the solar system around the Milky Way's core, to show that's at a much lower scale than the centripetal accelerations binding together the solar system.
Comment: @Haresh To understand tides just expand Newton's gravitational law in a series about the affected body (in this case the Sun) and examine the the term in $\mathrm{d}r/r^3$.
Comment: @LuisMendo In Newtonian mechanics acceleration is *not* relative; that is, it is measured to be the same in all inertial references frames. The situation in relativity requires more math, but in essence special relativity also has a comparable property. General relativity is a whole 'nother ball game but can be completely neglected for this problem.
Comment: Is there a good textbook on mechanics that discusses this? I know math but not enough physics.
Comment: @jwimberly: Timaeus does this in [following comment](http://physics.stackexchange.com/a/161217/71493)
Comment: I'm always a bit confused by this kind of reasoning. Both the OP and this answer say things like "there is no object in the universe that doesn't _move_", or "the solar system _accelerates_". But "_move_" or "_accelerates_" must be _with respect to a given reference frame_. What does it mean to just say "the solar system accelerates"? Accelerates with respect to what?
Comment: @dmckee Hmm. I think I'll post a full question about this, as I don't understand it
Answer: There are two main reasons it is practical to ignore the pseudo forces due to the rotation of the earth/sun about the galaxy. First, the accelerations are pretty small, and second, they are pretty uniform.
The sun moves around galactic center at about 800,000 kilometers per hour, but it takes around 250 million years to complete a single orbit of galactic center.
Using $v=2\pi r/T$ we get $r=vT/2\pi$.
So for a circle $a=v^2/r=v2\pi/T\approx 2\times 10^{-10} m/s^2$ which is pretty small.
The other factor is that the acceleration is pretty uniform.  Tidal forces fall off like $1/r^3$ instead of $1/r^2$ so they are even smaller for large distances.
Answer:
Shouldn't there be many psuedo-forces to account for planetary motion?

In theory, yes. In practice, no.
Consider the third body perturbations induced by Alpha Centauri (a two solar mass star system at a distance of 4.37 light years) on Voyager 1, which is currently about 130 astronomical units from the solar system barycenter. This is on the order of 10-16 m/s2. The result of this tiny of an acceleration is completely unobservable, even over a long span of time. The third body perturbations by the galaxy as a whole is almost an order of magnitude smaller that the perturbations induced by Alpha Centauri.
By way of comparison, the tiny Pioneer anomaly, now attributable to asymmetric thermal radiation, is roughly seven orders of magnitude larger than the perturbations induced by Alpha Centauri. Those extra-solar third body perturbations are so very, very small that they are essentially unobservable.
One possible exception would be a star that comes closer to the Sun than 4.37 light years and perturbs the orbit of an object that orbits the Sun well beyond 130 astronomical units. Another name for such a perturbation is "long period Oort cloud comet." Even then, it will take millions of years for those perturbations to take hold.
Answer:
Since there is no object in the universe that doesn't move, and the solar system likely accelerates through space, how did Newton's Laws work so well? Didn't he assume that the sun is the acceleration-less center of the universe? Shouldn't there be many psuedo-forces to account for planetary motion?

Newton assumed his laws were valid with respect to absolute space (special reference frame, something like all-pervading solid body that does not hamper rectilinear motion of other bodies). He did assume that Sun moves with negligible acceleration with respect to this absolute space. And it worked well.
Today we do not think the idea of absolute space is that necessary, but simply apply Newton's laws with respect to some reference frame (Earth, solar frame, galactic frame...) and see if the description corresponds well to actual motions. If it does, we say the reference frame is inertial enough. If it does not, we say the frame is not inertial enough and either seek another frame or introduce pseudo-forces.
Often the frame of the most massive body in the system of interest with fixed orientation with respect to distant stars is inertial enough. If the bodies have not that different masses or the frame is not inertial enough for other reasons, we may try the frame of the center of mass of the system or seek another frame until the laws apply well.
In the case of solar frame S, it works well and no pseudo-forces are usually needed. This does not mean the solar frame does not accelerate with respect to some other frame G, only that acceleration of the bodies of the solar system with respect to G is so uniform across the solar system that it can be neglected in the frame S.
Comment: Would it also be worthwhile to note that when the difference between the predicted motions for a uniform inertial reference frame and the actual reference frame is small relative to measurement uncertainties, any efforts at correcting for the reference frame will simply be numerical noise?  To use an analogy, if one wants to determine the starting height of a lead weight which took 0.5+/-0.1 seconds to reach the ground, there's no reason to factor in air friction since its effects will be small relative to the +/- 0.1 second uncertainty in the measurement.
Answer: Newton's laws work well but if one considers the relativity theory, one finds things not explained by Newton's laws. A well-known example is the "anomalous" precession of the perihelion of Mercury, explained by the general relativity.
Answer: When 1686 Newton writes "Principia...", the inertial frame concept does not exist yet. However, we can find in it Corollary IV (introducing the center of mass CM concept for any interacting body set), Corollary V (Galileo's Principle of Relativity, applied to any limited body set with CM at any uniform velocity), and the today almost forgot Corollary VI (a generalization of the V from CM acceleration zero to any variable one). The application of Corollary VI to the Solar System determines that all occur inside it (as if it were a Galileo's ship) in the same way (same 1686 Newton's Laws and other natural ones), no matter at all its CM acceleration, known or not.
Rafael A. Valls Hidalgo-Gato; Institute of Cybernetics, Mathematics and Physics; Havana, Cuba.
Comment: I am not sure if I understand your answer.


Is silicon dioxide more acidic than the oxides of nitrogen?

Question: Is silicon dioxide more acidic than the oxides of nitrogen? How to find acidic strength of compounds which don't have hydrogen atoms?
Comment: https://chemistry.stackexchange.com/questions/22189/how-to-decide-acidic-or-basic-nature-of-oxides
Comment: Possible duplicate of [How to decide acidic or basic nature of oxides](https://chemistry.stackexchange.com/questions/22189/how-to-decide-acidic-or-basic-nature-of-oxides)
Answer: I think your question boils down to:
What is the meaning of acidic strength of oxides? How do we determine the acidic strength of oxides?
In general, the electropositive character of the oxide's central atom will determine whether the oxide is acidic or basic. The more electropositive the central atom, the more basic its oxide. The more electronegative the central atom, the more acidic its oxide.
Electropositive character decreases from left to right across the periodic table and increases down a group.
The trend of acid-base behaviour is from strongly basic oxides on the left-hand side to strongly acidic ones on the right, via an amphoteric oxide (for example, aluminium oxide) in the middle.
This trend applies only to the oxides of the individual elements  in the highest oxidation states for those elements. The pattern is somewhat less clear for other oxides.
A non-metal oxide's acidity is defined in terms of the acidic solutions formed as a result of reaction(s) with water. For example, sulfur trioxide reacts with water to forms sulfuric acid.
In general, acidic oxides are oxides of nonmetals and basic oxides are oxides of nonmetals.
Note: There are three nonmetal oxides from the upper right portion of the periodic table, $\ce{CO}$, $\ce{NO}$, and $\ce{N2O}$, which have low (not the highest possible) oxidation numbers for the central atom that they give neutral aqueous solutions.
Since the acidity of a cation rises rapidly with charge, d-block elements which exhibit a wide variety of oxidation numbers may have one or more oxides that exhibit only basic properties and one or more oxides that exhibit only acidic properties.
In general, the higher the oxidation number, the more acidic the corresponding oxide (similarly, reverse trend for basic character of oxides). Chromium makes a decent example here, as it exhibits a variety of oxidation states. $\ce{CrO}$ is basic, $\ce{Cr2O3}$ is amphoteric and $\ce{CrO3}$ is acidic.

P.S.
Let me introduce you to a theory developed by Hermann Lux and Håkon Flood, named Lux-Flood theory to explain the acidic or basic character of oxides. Here's what they had to say:

An acid of Lux-Flood is an acceptor of $\ce{O^2-}$
  A base of Lux-Flood is a donor of $\ce{O^2-}$

For example:
$\ce{CaO}$ is a base of Lux-Flood because $\ce{CaO}=\ce{Ca^2+}+\ce{O^2-}$
$\ce{SiO2}$ is an acid of Lux Flood because $\ce{Si}$ has vacant d orbitals, allowing it to accept more $\ce{O^2-}$ ions.
The two compounds may react to give you $\ce{CaSiO3}$.


What is the point of taking hostages in Payday?

Question: I'm playing Payday for steam's free weekend, and notice that I can take civilians hostage.  Other than preventing them from getting up and getting shot, is there any point to doing so?
Answer: The hostages system gives you the opportunity to free one of your teamates from jail.  Since you can't really "die" in Payday, this is their "revival" system.
You can take civilians as hostages by shouting at them and zip tying them, or even cops.  Taking cops as hostages is a bit more tricky; you may need to hit them first (with a non-lethal shoot or with your melee attack) and then shout at them until they handcuff themselves, which will save you a pair of zip ties.  Also note that you cannot accomplish that during an assault (indicated by the red triangle at the bottom of the screen).
If one of your teammates gets arrested, you'll have to wait to the end of the assault plus the eventual time malus (if they killed civilians) to proceed to the trade.
Be careful with your hostages, as they are slow to be moved.  So if you leave them without surveillance, they can be freed by the cops.
Comment: When this was posted, the game may have had different mechanics.  I am fairly certain you can get a cop to arrest themselves during an assault.  Back in 2012, that may have been different. I've updated your answer with current game mechanics except for the above.
Answer: If one of the players gets arrested (aka killed), Bain (the guy who gives your orders) will start negotiating with the police.
After a while (depending on how many civilians were killed), a hostage is selected and if you free him/her, the arrested player respawns.
Comment: It is also sometimes linked to trophies: The Blood in, blood out trophy requires that you trade all 4 butchers by taking them hostage and then releasing them to free your teammates in the Slaughterhouse mission.  Also I believe your negotiations take longer (it takes longer for your teammates to have a chance to trade hostages to free you) if you kill a hostage.  I think 5 seconds are added each time.
Answer: You should always get hostages (police or civilian) and ensure they are nit only intimidated, but tied down using cable ties for civilians or the cop's ties for a dominated police officer. Once you have got a hostage, make sure you guard them, or the police will attempt to free them. If you kill a hostage you get fined, and you also get a trade delay which means it will take Bain longer to negotiate with the cops to trade you; if you end up in custody. If you kill no civilians, the trade delay will be 5 seconds, once the assault wave is over. Once Bain has negotiated a hostage trade, a remaining team member will need to go up to the marked hostage and free them and the teammate in custody will be released, with full health and ammo, but their equipment will not be replenished.
Comment: (since this, Payday has receieved _many_ updates, this answer is now invalid)
Answer: Do it, for the love of god take hostages, in pd2 on Deathwish an assault will take place every 10 seconds (as soon as one ends you have 10 seconds to get a hostage) unless you have a hostage. In other words Having a hostage will delay an assault giving you more time to do stuff.


Mysql database replication (failover solution)

Question: Is there anyone know how to do "mysql database replication" with appfog ? In simple word, just want to use 2 databases sync (2 locations) and set one as master database, and other one as slave. if master server down, instantly slave server should act as master database. Actually databases are hosted on 2 shared servers. because lack of the space provided by appfog. :)
Answer: Facebook's DBA YOSHINORI MATSUNOBU has developed MHA :

A primary objective of MHA is automating master failover and slave promotion within short (usually 10-30 seconds) downtime, without suffering from replication consistency problems, without spending money for lots of new servers, without performance penalty, without complexity (easy-to-install), and without changing existing deployments.

The project link : http://code.google.com/p/mysql-master-ha/
Max.


Saving & deleting saved objects IOS

Question: I have a fairly simple class that represents a game being created by a player for another player, before they game is sent to the other player by the server I would like to implement a sort of persistence in case something goes wrong i.e a crash. So the current state of the game they are creating is saved so they can just resume creation if something goes awry.
Looking through the various ways to save objects and such it seems, NScoding with NSKeyedarchiver is my best bet as it is not a massive amount of data... My question is can you then delete anything saved though NSCoding? as i do not want to retain the object on the phone once it has been successfully sent to the other player as at the moment my thought's are to check if there is anything saved on start up and if there is anything it represents a game in creation unfinished, this is also assuming i am saving to [NSUserDefaults standardUserDefaults].
Another question can you save more than one of the same object to standardUserDefaults and it knows how to differentiate between them or do they just override? if this is the case i may have to consider unique file paths for each.
there are many other questions but these are the most important ones and will hopefully convey my idea across enough to get a some what clear answer.
Thanks in advance.
EDIT: So i know you can delete docs so this may pretty much be answered i will report back when i get it working in the meantime any insights would still be helpful as to maybe speed up my approach.
Answer: So yeah You can save and delete outside of NSuserDefaults no problem...If you would like to know how here
http://www.raywenderlich.com/1914/how-to-save-your-app-data-with-nscoding-and-nsfilemanager
This helped immensely

Saving & deleting saved objects IOS


Windows Server 2012 R2 configure as wifi access point / router

Question: I have a windows server at home which handles all DNS and DHCP for my network. Recently my upstairs router exploded and I need to find a new way of providing Wifi for my home. The server has a new Wifi card in it currently and I thought why not use the server as an access point.
My network ip range is 10.1.1.0/24 with the server's IP being 10.1.1.2 and the gateway's being 10.1.1.1. The problem comes when I try and configure netsh hostednetwork none of my devices can connect to the internet or see any other device on the lan. The server can ping the devices but anything on the wired lan can't.
If I try and setup ICS it wants to put everything into the stupid subnet 192.168.137.0/24 which is not practical.
Is there anyway to bridge the hostednetwork and the main lan so that all the Wifi devices appear on the network and have access to the internet?
It's a shame the server has to be running windows because I could easily setup this on linux.
Answer: I did several attempts to make it working. My wireless network connection has created 2 Virtual miniport Adapters by running active WLAN service.

I tried to bridge original connection to LAN interface - no luck.
I tried to manually setup IP addresses on miniport Adapter - no luck, I was not able to connect any wireless device like smartphone.

Also complication I have - is already bridged internet interface which excluded possibility to enable ICS.
The only way forward I see, to setup NAT on windows Server edition - Routing and Remote Access Service + DHCP Service.


Is it easier to kill a dragon with a machinegun or a bazooka?

Question: Faced in a mortal combat with a dragon* would a squad of humans be better equipped mostly by medium machineguns or by portable rocket launchers? Would a 7.62×51mm to the eye or armpit maim an magically un-shield dragon? Would a Javelin payload penetrate the scales? Would magical shielding against missiles be more effective against the gun or the launcher?
* - armored flying wizard weighting about a ton
Comment: If the rules of the game say whether DnDragons are more vulnerable to machine guns or to bazookas then what the rules say is gospel. If the rules of the game *do not* discuss machine guns or bazookas it means that machine guns and bazookas are not available in the game. Since DnDragons exist *only* in DnD games, and machine guns or bazookas are not available in the games, it follows that the question is easily answered: a squad of humans (or of any other DnD characters) *cannot* be equipped with machine guns or rockets launchers when confronting a DnDragon.
Comment: You're going to need to describe the capabilities of your dragon. Keep in mind that we have a strict one question per post policy so following up by asking about magic should probably be edited out. Should you want to ask about magic, you will need to describe the capabilities of magic in your world.
Comment: Asking about existing worlds (ie 3rd party worlds) is off-topic here, since it's more likely you're not "building" a world and instead ask about an existing one. I'd advise to leave out the Dungeon and dragons reference and give a clear description of your dragon instead : Size, scales specificity and material comparison (vs steel or iron, etc.), notable weakpoints, etc. It can look similar to D&D ones, but you should give enough details of your own so that we can answer through worldbuilding tips rather than reference material.
Comment: @sphennings I argue protective magic should stay part of the question because dragons often use magic in combat so the creature will be prepared, to the best of it's abilities, for the encounter.
Comment: We have a strict one question per post policy. The body of your post asks 4 distinct questions. [edit] your post to fix this. While every one of those questions doesn't have enough information provided to be answerable the non-magic questions only need information about the dragon to be answerable. The magic question also needs information about the effectiveness of magic in your world at protecting dragons from guns and missiles. We require that questions be answerable. [edit] your post to provide all the information necessary to answer your *single* question.
Answer: The question of payload effecitveness on a dragon's scales requires a lot of assumptions to answer. Most of those assumptions are based on the impact resistance of the scales, the internal biology of the dragon, and the nature of "magical shielding" specifically with regards to how it interacts with impact and concussive force. I will make the following assumptions:
Dragon scales, which are commonly referred to as being as hard as iron, will be assumed to have similar characteristics of iron.
Dragon biology will be assumed to be similar to a large creature with similar heartiness, i.e. an elephant
Dragon will be assumed to be able to fly at maximum speeds equivalent to a WW2 propeller-based fighter aircraft, on the order of 400mph.
Dragons are also typically depicted as being heavy. While weight will not factor much into the discussion, it is important to consider from a general maneuverability standpoint.
Given that the scales of the dragon are very hard as compared to the biology of most large creatures, it would be fair to immediately remove the machine guns from the equation. The vast majority of small-arms fire would have little effect on the creature, and even with literally tons of ammo the damage potentially is probably not worth the expenditure. However, as compared to rocket launchers, the rifles would be far more effective against large amounts of other creatures, and could still do considerable damage against unarmored portions of the dragon. This makes the proposition of equipping the combatants with automatic rifles a lot more tenable in the grand scheme.
A rocket-launcher, by contrast, would have a much more immediate effect with less need to discriminate against the targeted areas. The blast from the warhead alone should cause sufficient shock as to damage the internal organs of the dragon regardless of the impact location. Further, modern warheads on personal rockets tend to feature shaped charges. These explosives are designed to direct the blast energy into a smaller area, which would likely devastate even the toughest of dragon scales. The major limitation here is, of course, the ammo capacity. A single load has a single shot, and while that one shot could most likely do the trick against a single dragon, if the shot misses or there are more than one, it doesn't matter. To carry multiple rounds requires far more space, and this greatly decreases the useful of the weapon in this context.
Where magic is concerned, things get a bit stranger. If a dragon were wearing any kind of primary shield that could deflect mass, the rifles would be useless. Against a shield, as long as shockwaves could travel through it, then a rocket launcher would be effective.
At any rate, it seems to me that the explosive would be the best call against this specific target, but there are use cases where the rocket is less overall useful than the rifles.
Comment: Thank You for the insights! Together with the assumption that a guided rocket will seek the warmest area (chest? groin? head? that's a medical question) I think I have a clear enough picture as to proceed creating my humorous RPG game :-)


Best free Talend learning resource?

Question: Does anyone have any recommendations for Talend tutorials/training? Specifically I am looking for Salesforce data integration/updates if possible. I am completely new to the tool.
Comment: I am experienced with SFDC. I am looking specifically for talend info.
Answer: I have had a search online and these all look like good resources:
http://www.talendbyexample.com/talend-salesforce-reference.html
https://www.talend.com/resources/podcast-videocast/integrating-with-salesforce
https://appirio.com/tech-blog/using-talend-to-export-data-from-salesforce-com
http://thirdsectorit.org/blog/migrating-data-from-sql-server-to-salesforce-com-using-talend-part-1/
http://www.datalytyx.com/automating-salesforce-routine-tasks-with-talend-open-studio/
https://www.talendforge.org/forum/viewtopic.php?id=22179
Comment: There are great, thanks. I also searched but did not come across a few key ones there. Best regards

Best free Talend learning resource?


BPEL Add-on

Question: I´m not sure if this is the right place to ask, however.....
I need help from someone who has experience in Modeling BPEL Diagrams. I´m thinking of writing an Add-on for a BPEL Modeling tool. I want to write some Add-on, which really is useful to the Business Analysts.  I´m playing around with the idea of simulating and testing the BPEL Diagrams. Is there something more useful.....what do you think of the idea to transform UML to BPEL (bottom up approach)....please give me some feedback
Answer: There are some opensource Graphical BPEL Editors like Eclipse BPEL Editor, it is better if you can improve and contribute to these tools rather than starting from the scratch.
Answer: Graphical modeling: good. WS-BPEL is XML, which is painstaking to write by hand at the best of times.  There is no standard graphical notation, though.
Simulation: I'm all in favor of simulation, but simulating what?  Performance?  Functionality?
Comment: I already got a Graphical Interface, so I thought it is a good idea to simulate the workflow like it is possible in Aris

BPEL Add-on


SQL Server: Upgrading databases

Question: We've got a product that uses a Microsoft SQL Server database. We've got customers using various older versions of the product.
How do people write/structure their database upgrade scripts in this situation?
Answer: You need a set of release-to-release patch scripts.  On production systems with live data this is a bit trickier as you may also have to manipulate data in these scripts.
Redgate SQL Compare Pro is quite a good tool for generating these scripts or doing QA functions on scripts (obviously you shouldn't really use it for both roles).  Because you have live customer data involved you will have to regression test the upgrades.
I don't think there's an easy way to do this.  You will have to develop the script and test any data manipulations that it does.  Do the tests from version to version for some useful set of upgrades.  The key here is to arrange a production mirror test environment that you can test the patches in before you apply them to a live system.
P.S. don't forget to back up and test restore on the production database before you actually finally run the patch script, but you already knew that ;-}
Answer: We have one SQL script that does both a clean installation and an upgrade.  After installing SQL Express or full SQL server, we run this script that does the following:

Creates the tables if they don't exist with CREATE TABLE.
Delete and recreate all stored procedures
Make modifications to tables such as field changes, field additions etc.

We keep on extending this script, so each release will only add to this SQL script file.  This means we can run this script on production systems to update them to the latest schema use the script for new installations to create the schema from scratch.
This way we're guaranteed that the upgrade script will bring even the oldest installation up to the latest version.
Comment: How do you cope with continually updating this script? Doesn't it make it hard to read if you have to look at the initial table creation, and then a collection of column inserts, potentially spread over a bunch of following scripts?
Comment: Well no, I never look at the original table creation.  I simply make the modifications that needs to be made based on my latest release.  So I only add a couple of alterations after each build.

SQL Server: Upgrading databases


Why does a piece of paper travels up when inserted into a kite's thread?

Question: When I was young, I would insert a piece of paper into a kite's thread. The paper would travel upward till it reaches the head of that kite. What makes it to go up against the gravity even if the kite's head is about hundreds of meters away from the ground?
Answer: Because the kite thread is never vertial, it is inclined in the direction of the wind:
So the wind will push your paper in the same direction, and the thread will force it to go upwards.
For more detail, in the paper there will be 3 forces:

Gravity. It pulls down.
Wind. It pushes to the right.
Reaction of the thread. It will force the paper to move in line with the thread.

If the force of the wind times the cosine of the angle is greater than the weight of the paper, then it will go up. Else, it will go down.
Answer: Kite fliers call it a "line climber" and here's a video of one called a "Popper." It opens like an umbrella and it will climb the line much faster in heavier wind!
Comment: Welcome on Physics SE :) Please try to edit your post to include the link. Also, the original question was about the *reason* for this behaviour - you might want to elaborate on this topic a bit more :)


SQL Job Management

Question: I've been handed a project to document and manage all of our SQL agents jobs.  I found this great tool from Idera but the only problem that I have its not exportable.  I need an application that can provide me with a gant chart or timeline so that I can share with our developers.  Thanks for your help
Comment: can you share more requirements about what you need to docuemnt? is it just the start times of your jobs?
Comment: In the past, we have issue with server contention for resources from jobs that were run in parallel.  Idera works great but you need to have admin privileges and our environment it cannot be allowed.  I need a tool that I can publish for example on our intranet so our devs can view the scheduled jobs and allocate a block of time to prevent contention on the server.  Thanks
Answer: AFAIK, there isn't a good tool to do this. The Idera tool is the same one from SQL Sentry under an OEM license.
If you are looking for an export, why not try a screen shot?
Answer: I hit something like this a long time ago. It seems like an obvious thing to do, and I think I've heard of tools that might do this, but I've never used or actually found one.
What I did back when was attempt to roll my own. This required building queries against the various sysjob* tables in msdb (particularly sysjobs and sysjobschedules), which required some serious deciphering -- some of their structures are pretty obtuse. Security/access will be an issue, as by default very few permissions are granted to those tables.  (It is possible to add a Role and suitable permissions in msdb, but would the DBAs let you?)
If you can't find a tool somewhere, building your own may be the only way to proceed.
Answer: not sure about the permissions, but Capacity Manager from Quest software did have a view of the SQL Agent jobs.
unfortunately, if the tools require admin access, then you are going to be forced to roll your own solution and request read access to the msdb database.

SQL Job Management


Driving on suspended license

Question: I got a ticket for driving on suspended license. I appeared for arraignment but the court did not have any record of it. How long does the officer have to file that ticket in the state of Michigan.
Answer: Whatever the deadline, at a minimum, the officer certainly has to file that ticket before the arraignment date on the ticket that is served upon you.
This said, you could be served with a reissued ticket with a new arraignment date in the future, and as long as that reissued ticket was filed in a timely fashion and was served and filed within the statute of limitations for the offense, the charge would not be dismissed with prejudice.

Driving on suspended license


What should the job title be of the person who runs a Project Management Office?

Question: What would be a good job title of the person who is typically tasked to run and manage a PMO?
Answer: Good Job Titles Describe Officeholders' Roles

I'm looking for a job title as an answer in both questions.

The underlying problem is that you're assuming there's a canonical answer to your questions about organizational structure and job titles. There isn't.
Instead, you should focus on describing the role. According to Wikipedia:

The PMO strives to standardize and introduce economies of repetition in the execution of projects.

What this actually means within the context of any given organization will vary. You can spoon around titles as you please. The important thing about titles isn't what you call something; what matters is that the title communicates effectively about the named role. As long as the titles are meaningful within your organization, and serve as a useful shorthand to describe the scope of the PMO's services within your company, that's all that matters.
Having said all that, if your PMO is a one-man operation, the title of "PMO Facilitator" suggests itself. You are essentially describing a process coach or facilitator role, but one with very limited authority. Calling this person a facilitator clearly communicates the scope of the role without implying an executive or managerial function that hasn't been formally delegated.
Your best bet is to meet with the stakeholders to whom the PMO reports, and ask them to describe the role of the PMO as they see it. If all the stakeholders can agree on what the role is, they can then collectively agree on the appropriate title to describe that role succinctly.
Comment: Thank you for taking the time to edit and answer, I appreciate. A "PMO Facilitator" might be a proper title, thanks. May I ask you directly: in your experience, what were the titles of the officers running PMOs that you've encountered? I've never met a person running a PMO so I wouldn't know. I think PMs have just collectively updated some dark corner of network share called "stuff from old projects". :) My point: a PMO might no be well-used concept in the field and my ignorance might be a reflection of that.
Comment: In my organisation one is called a 'Project Support Officer' and the other is called an 'IT Administrator'


SharePoint online reader role in Admin Center

Question: Is there any role in o365 admin center that can be designated only reader access for SharePoint Admin center.
Answer:
A little late to the party but I was looking into the same thing and
  found this:
https://docs.microsoft.com/en-us/office365/admin/add-users/about-admin-roles?view=o365-worldwide
You can set them as a Global Reader in customized admin. This does
  exactly what you need. Maybe it was a recent addition in the last 6
  months but it's there now.

Source
You can assign Global reader role - Has read-only access to all management features and most data in all admin centers. Assign the global reader role to users who need to view admin features and settings in all admin centers that the global admin can view. The global reader admin can't edit any settings.
Comment: Global reader role doesnt apply to sharepoint, Privileged Access Management, Customer Lockbox, sensitivity labels, or the following features within Teams: Teams Lifecycle, Reporting & Call Analytics, IP Phone Device Management, and App Catalog.
Answer: I made some tests and Global Reader will not be an option. For that, If you want to grant read-only permission in SharePoint sites, you will need to grant the permission in that site. Admin role in admin center will not work for that.
Comment: i would like to have a read only permission for sharepoint admin center not sharepoint sites.
Answer: MS has just released an update that Sharepoint online reader role will be avaibale from march 2020


Blender 2.91 Linear Animation acting like a Bezier

Question: i got a Weird Problem since i updated to 2.91, then i try to loop my animation by changing the interpolation type to Linear the Result almost looks the same as Bezier, i did try it with a new scene and a simple Cube with a Armature and a single bone. the Animation seem to be faster with Linear but the end and start from every key frame is still eased in/out.
Comment: Can't reproduce this on my computer. The best would be to upload your file where this happens. Follow this link: https://blend-exchange.giantcowfilms.com/
Comment: [](https://blend-exchange.giantcowfilms.com/b/7WkmRPQ8/)
Comment: hmmm...really weird. i tried it in 2.81 and it looks same....
Answer: The problem is that you're using Quaternion (WXYZ) Rotation, which is the default setting for bones in Pose Mode. Set the Rotation method to XYZ Euler and animate the Y Rotation from 0° to 360°.
You should also set the last keyframe with 360° on frame 101 instead of 100 if you want a looped animation from frames 1-100, because 0° = 360° and the animation would look as if it pauses for one frame.
Comment: So this seem to work but why is Quaternion so smoothed out and Euler isnt? wouldn't it be more practical to use a Quaternion so i have axis lock in my Animation.
Comment: It's not that the interpolation is smoothed, it's just that the way quaternion works result in a motion that, unlike euler, doesn't follow the 3D axes per say.
Answer: So the reason why it never occurred to me before was because i was using less keyframes for my Animation, it seem to be the case that Quaternions starting to slow down and wooble a lot then your animation is longer than 100 Keyframes. So for the Future i will use Euler in Technical Animations for persistent Animation Cycles.


Magnetic Launcher for a Spacecraft

Question: Is it possible to launch a spacecraft into space with a magnetic accelerator? If so, what materials would it require?
Answer: It is completely possible, with the right materials. Carbon nonofibers can be used to make a space elevator, and the magnetic ramp could accelerate the spacecraft to 11km per second, which will make it escape earth gravity
Comment: Do you have any references or calculations to back up your assertions?

Magnetic Launcher for a Spacecraft


Are loss functions what define the identity of each supervised machine learning algorithm?

Question: For supervised machine learning algorithms (ie: regularized logistic regression, SVM, decision trees, etc), are their specific loss functions the main/only reason they differ from one another?
Comment: This [question here](https://stats.stackexchange.com/questions/215696/do-all-machine-learning-algorithms-separate-data-linearly) is very relevant to your question.
Answer: No. You can use different algorithms with same loss function, for example you can minimize squared errors using linear regression, neural network, random forest etc. Each of those algorithms would give different results, will achieve them in different ways and will differ in performance. So nonetheless that they used same loss function, you will get different results.
More formally, usually we think of machine learning in terms of finding best set of parameters $\theta$ of some function $f$ that approximates your target variable $y$ by minimizing the loss function $J$
$$
\underset{\theta}{\operatorname{arg\,min}}\; J(y, f(X; \theta))
$$
So there are two main components of machine learning model:

The function $f$ that approximates $y$. You can have many different functions, think of linear regression, regression tree, neural network, $k$-nearest neighbors regression, they all will produce very different kinds of functions.
The loss function $J$. It (only!) tells us how bad is our approximation of $y$.

Additionally, there is also the algorithm for minimizing the loss function, it is the procedure that we apply to find the optimal parameters. In many cases it is just a matter of choosing an optimizer that we use, but in other cases th algorithm defines the model (e.g. $k$NN)
Answer: There are different scenarios for which certain algorithms may be more appropriate. Decision trees are often used when it is necessary for a human to be able to understand the decision (for example, in medical diagnoses). However, it's easy to overfit single decision trees, which can be mitigated by using ensembles of decision trees, or random forests. Another example is that convolutional neural networks are widely used in current research, especially image recognition, because the convolutional kernels can capture many aspects of images, especially invariance to translation. In many cases, the specific domain of your problem has a large effect on the best learning algorithm to use.
Comment: Hi I appreciate your answer but I think you might have misinterpreted it, I understand different algorithms work better in different situations. My question is are different ML algorithms primarily differ in their loss function? In other words, are loss functions what distinguish one algorithm from the others?


Maximizing TCP connections on HAProxy load balancer

Question: I am currently using HAProxy in order to load balance tcp connections from clients to my Erlang app server. The connection is persistent, which means I'm limited to roughly 64K clients on an optimized server (I'm currently running HAProxy on an m1.large EC2 instance). My app server is designed to horizontally scale based on the number of TCP connections. What's worrying me though is I'll need an equal number of HAProxy servers as app servers since it's a 1:1 connection. Is there currently a way to "proxy" the tcp connection to the app server so that once HAProxy sends the client off to my Erlang server, it can free up the connection, ready to serve another client? Are there any papers, existing solutions out there I can read so that I only have to worry about the 64K limit on my app servers, and not on the load balancing servers themselves?
Comment: Where are you getting a 64K limit from?  Is that a limit for one of your app servers?
Answer: What makes you think you are limited to 64K clients? You should be able to serve more than that. It's not the port count that is the limiting factor, but the memory and CPU power that limits the amount of connections you can have open at any given time. Check: http://www.kegel.com/c10k.html which is dated, just think of it as a c100k or c1M problem instead. :-)
By the way the haproxy site has an excellent article on the subject of load balancing and haproxy's architecture:
http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
Regarding connection limit, this is a theoretical limit that normally you wouldn't reach as you'd run out of resources before that.
Quoting http://www.quora.com/TCP/What-is-the-maximum-number-of-simultaneous-TCP-connections-achieved-to-one-IP-address-and-port
"The TCP standard sets up unique connection identifiers as the tuple of local IP address, local TCP port number, remote IP address, and remote TCP port number. In your example, the local numbers are both fixed, which leaves approximately 2^32 remote IP (version 4) addresses, and 2^16 TCP port numbers, or an approximate total potential simultaneous TCP connections of 281,474,976,710,656 (2^48, or 2.81 * 10^14, or 281 trillion)."
Answer: Introduction
64k concurrent IDLE connections is peanuts for HAProxy and Erlang.
The first thing to do is enable the statistics page on HAProxy. It is a MUST have for monitoring and performance tuning.
Then let's get into limits.
The OS Connection Limit
There can only be 1 connection per tuple client_IP:client_PORT:server_IP:server_PORT. It comes from the way connections are stored and retrieved in the kernel (i.e. hashtable). Same on Linux and Windows.
I will have to disagree with aseq about that. It is NOT a theoretical limit at all. It is a very practical limit likely reached by anyone doing moderate load testing.
Let's suppose there are 3 computers in your current setup:
        [Test Computer]     [HAProxy Computer]     [Erlang Computer]

(front)   test_IP:????<------>haproxy_IP:80
(back)                        haproxy_IP:????<------>erlang_IP:80

All the IP are fixed and the webserver port is fixed. That leaves only one port as variable parameter thus the maximum amount of connections is limited by the amount of ports available on any single computer. There is little headroom here (see Ephemeral Ports Range). You have to get more instances, both Erlang instances AND load testing instances.
Note: Notice that users come from lots of IP naturally whereas load testers (curl, Apache ab, JMeter) are usually run on a single box with a single IP (JMeter and similar tools can scale using distributed slaves).
Note: HAProxy connections are always in pairs (one to the client + one to the internal server). Bear that in mind because most system limits must be 2*N to allow for N users.
Ephemeral Ports Range
Only a few ports are used for creating new connections. They are called ephemeral ports. Linux default are from 32768 to 61000.
Extend the range. Check first whether there are any running services using them on your servers.
sysctl net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 20000    65000

That tweak can only give 60% more ports. It won't be enough to go web scale with a single server.
Short Lived Port
Be aware that a port cannot be reused for an entire minute after being closed (see TCP states), which can make the port pool quite small (e.g. 10k port/s anyone?). There are kernel settings to change closing duration and to allow reusing closing ports.
You ain't gonna need these tweaks for persistent connections, as far as they live long enough (a couple minutes before renewing at least). It's important to be aware of the potential issue nonetheless.
HAProxy maxconn
Configure the maxconn setting in HAProxy. It is the maximum amount of opened connections allowed at any time.
It can be configured in global, per frontend or per backend. The statistics page shows what is the active setting for each and everything.
Linux ulimit
The ulimit is the maximum amount of files opened by a single process (sockets are files on linux). Linux default is somewhere between 1k and 10k.
HAProxy automatically configures its process ulimit based on the maxconn parameter.
You will probably need to tweak the ulimit manually for the Erlang process.
Comment: Per your note on Load Testing tools.  Your focus is clearly on application layer tools.  There are a whole class of tools and vendors which specialize in the network space whose tools can generate millions of unique MAC and IP addresses for benchmarking network architectural tiers for simulated load.  My favorite in the group happens to be Ixia Communications, but there are several others ( Spirent, Agilent, ....)
Comment: Newbie doubt: If the HAPRoxy gets 1 million concurrent connections, with the 64K port range, how does it makes the connection to Erlang server? Or does it mean that if I add 20 Erlang servers, I can make 50K connections to each of them? In this case, IP_HAProxy:Port_p1 to Erlang1:80 is taken already - right? How can it make connection to IP_HAProxy:Port_p1 to Eerlang_2:80?
Comment: Assuming the `Erlang Computer` is much in idle-mode: Instead of launching more instances of it to multiply the number of available ports could one also just make the erlang computer make liste on more ports (i.e. the web-application running on it)?
Answer: I think the best way to answer your question is to point out that you shouldn't need a 1:1 mapping between HAProxy and your app servers.  A persistent connection is possible with HAProxy through several methods.  I would suggest searching the documentation for "persistent" to learn more: http://haproxy.1wt.eu/download/1.4/doc/configuration.txt.
For example, with just TCP connections, adding balance source to your config should provide persistence for you.
Answer: 64k per host is a definite hard limit but the appserver handling it typically runs out of memory before that. Typically Java appservers run at 2000 concurrent connections before the 32 bit vm runs out of heap.


ColdFusion ImageWrite to Amazon S3

Question: This is a strange one - I have 'virtually' identical code on 2 pages, it works on one but not the other.  The incredibly unhelpful error message, "S3 Error Message." doesn't shed any light on where I'm going wrong with this.
The code below is identical on both pages - the only (very slight) difference between the 2 pages is the way imgLink is generated - on the working page it is obtained from a single source (an XML feed) and cfset, on the none-working page imgLink is initially set as 'none' and then a number of sources are checked until it finds one - it's still cfset in the same way, and I have a cfif to make sure it's valid before processing.  HOWEVER - I have also tried hardcoding the source (i.e., pasting in the value that would usually be in the imgLink cfset) and it still fails.
I've debugged this in every way I can possibly think in the last day, without success.  So, I guess I'm looking for pointers as to what else I should look at that could be causing it to fail.
The full error returned is -

An error occurred when performing a file operation create on file s3://mybucket/1577-67BC4EF7-1B21-866F-32E95DF67F3336C6-f.jpg.
         The cause of this exception was: org.apache.commons.vfs.FileSystemException: Unknown message with code "S3 Error Message."..

And my code is;
<cfscript>
        this.name ="Object Operations";
        this.s3.accessKeyId = "accessKey";
        this.s3.awsSecretKey = "secretKey";
        this.s3.defaultLocation="EU";
</cfscript>

<cfset perms = [{group="all", permission="read"}]>

<cfset imageuuid = '#CreateUUID()#'>
<cfset imagefull = '#getid.id#-#imageuuid#-f.jpg'>
<cfset imagemain = '#getid.id#-#imageuuid#-m.jpg'>
<cfset imagethumb = '#getid.id#-#imageuuid#-t.jpg'>

<cfimage action="read" name="img1" source="#imgLink#">

<cfif img1.height GT img1.width>
    <cfif img1.width GTE 505>
        <cfset ImageResize(img1,'505','')>
    </cfif>
<cfelseif img1.width GT img1.height>
    <cfif img1.width GTE 505>
        <cfset ImageResize(img1, '505','')>
    </cfif>
</cfif>

<cfset ImageWrite(img1, "s3://mybucket/#imagefull#")>
<cfset StoreSetACL("s3://mybucket/#imagefull#","#perms#")>

<cfif img1.height GT img1.width>
    <cfif img1.width GTE 251>
        <cfset ImageResize(img1,'251','')>
    </cfif>
<cfelseif img1.width GT img1.height>
    <cfif img1.width GTE 251>
        <cfset ImageResize(img1, '251','')>
    </cfif>
</cfif>

<cfset ImageWrite(img1, "s3://mybucket/#imagemain#")>
<cfset StoreSetACL("s3://mybucket/#imagemain#","#perms#")>

<cfif img1.height GT img1.width>
    <cfset ImageResize(img1,'52','')>
    <cfset fromX = img1.Height / 2 - 26>
    <cfset ImageCrop(img1,0,fromX,52,52)>

<cfelseif img1.width GT img1.height>
    <cfset ImageResize(img1,'','52')>
    <cfset fromY = img1.Width / 2 - 26>
    <cfset ImageCrop(img1,fromY,0,52,52)>
<cfelse>
    <cfset ImageResize(img1,'','52')>
    <cfset ImageCrop(img1,0,0,52,52)>
</cfif>

<cfset ImageWrite(img1, "s3://mybucket/#imagethumb#")>
<cfset StoreSetACL("s3://mybucket/#imagethumb#","#perms#")>

Comment: Does this happen with any files or just specific images? I would try to isolate the problem, for example first write image on disk (or better in ram fs) and next copy it as file to the bucket.
Comment: @Sergii - it was with all files.  However, I have just figured out where the problem was - the file in the 'none working' version resided in a folder with it's own Application.cfc.  I can't answer my own question yet apparently, but I'll post full details of what happened later, for the benefit of others searching in the future.
Answer: Just realised I hadn't added my solution to this, so here it is- The folder in which the 'non-working' code was in had it's own Application.cfc, which didn't include the  S3 elements in the code posted above.  The 'working' code did have that in the corresponding Application.cfc.
Not quite sure why that had to be in Application.cfc when it was at the
Answer: The this object in application.cfc is an application component and this on ColdFusion page is just a structure variable. Put <cfdump var=#this#> in both places, application.cfc and yourfile.cfm, to see the difference.

ColdFusion ImageWrite to Amazon S3


How to Bulk find and replace MySQL for post image url

Question: after the website migration, I find there are some image URL for some posts are misplaced. suppose the image URL for the article should be in /2021/07/, however it became /2020/07, and the image dead 404. I have to replace the image URL manually from the Gutenberg editor. https://ibb.co/bggdX7V
If I want to do it with SQL Command, how should I do it in a safe way? is it correct to find all wp-content/uploads/2021/07/, replace as wp-content/uploads/2021/07/ from the wp_postmeta table?
Thanks
Answer: You can use this tool for the bulk updates.
but make sure to back up the database before using this tool.
link to git is here


Do Canon 430EXII speedlite flash units have an optical slave function?

Question: Before I buy , i want to make sure:
will a 430exII fire by "seeing" the light burst from other flash sources? and if not, what canon speedlite can do this?
Comment: This should be easy to find if you look in the manual for the 430exII, which is available on Canon's website.
Comment: The manual that came with my 430EX II doesn't mention optical slave performance at all other than in the context of when used with a Canon E-TTL compatible master unit, which leaves the reader to assume one way or the other whether the 430EX II is or is not capable of being triggered by a generic burst of light from a non-Canon master flash.
Answer: No, the 430EX II does not trigger by generic photo slave.
However, it can be remotely triggered using a compatible Canon system flash trigger. Those include the ST-E2, or a 580EX/EXII, 600EX flash units.
In addition, some of the newer Canon cameras, supporting what Canon calls the "Integrated
Speedlite Transmitter feature" (popup flash) can also trigger this flash, Those include the  60D, 70D, 7D, and the T3i(600D). There may be some even newer bodies that support this as well  but not older bodies like 40D, XTi/XSi.
Comment: Although Canon doesn't promote it as such, the 90EX designed primarily for the EOS M system will also act as a master unit to control other EOS flashes when mounted on the hot shoe of any E-TTL II compatible camera body. Obviously Canon would rather sell you the $500 USD 600EX-RT than the $99 USD 90EX.
Answer: No, the 430EXII does not have a "dumb" optical slave built in.  None of the Canon EX speedlites do—the only "slave" capability that's built in is for use in Canon's proprietary light-based triggering system.  The 430EXII can act as a slave to a Canon master unit (pop-up flash in a 600D or later dRebel, 60D or later XXD, 7D, and 1DX, ST-E2, 90EX, 550EX, 580EX, 580EXII, or 600EX).
To get "dumb" slave capability, you have to add-on an optical slave unit, and again there is something odd in the Canon EX circuitry that means a great many of the more generic add-on optical slaves may not work.  The green-based Sonia slaves are known to be compatible with Canon's EX speedlights, and they come with male PC or 1/8" miniplug connectors (see: this Syl Arena blog article on Canon speedlites and optical slaves).
Which means to use an optical slave on a 430EXII, you also have to add a hotshoe-to-sync port adapter. At which point, the cost may well be the same or more than cheap radio triggers, like the Yongnuo RF-603II (or whatever the cheapie du jour trigger is when you read this).
Speedlights that have a "dumb" optical slave built-in, however, do exist outside the Canon lineup. Nikon's SB-700 and SB-910 both have "SU-4 mode" which is a built in "dumb" optical slave mode. Most plug-in studio strobes have optical slave sensors. And current Godox, Lumopro, Yongnuo, Metz, and Nissin flashes also have dumb optical slave modes built in that can ignore a pre-flash. In fact, most 3rd party speedlights have two dumb optical slave modes: one that fires on the first flash it sees, and one that fires on the second flash it sees (so your "master" flash can be in TTL and fire a metering pre-burst without triggering the slave flash until the main burst); these are typically called S1 and S2 modes (although I believe Nissin calls them SF and SD).


Injective hull of a simple module

Question: Let $M$ be an indecomposable injective  right module over a right Artinian ring $R$, so $M$ has exactly one associated prime ideal $P$ (Lectures on Modules and Rings, T.Y. Lam). Now, $R/P$ is a simple Artinian ring having a simple $R/P$-module $V$ (which is also a generator) viewed as a simple right $R$-module. I want to show that  $M$ is isomorphic to the injective hull of  $V$. Any suggestion would be appreciated!
Comment: Look at Theorem 3.52 in Lectures on Modules and Rings. The characterizations in (2) and (3) should get you there.
Comment: @moonlight Since $R/P$ is simple Artinian we have $R/P≅V^n$ for some $n$ as $R/P$-modules so also as $R$-modules. By taking injective hulls, we get $E(R/P)≅E(V)^n$. But, by the proof of Theorem 3.60, $E(R/P)=M_1⊕...⊕M_k$ where $M_i$ are (isomorphic) indecomposable injective $R$-modules with $Ass(M_i)=P$, so by Krull-Schmidt theorem we have $E(V)≅M_i$. Now, I am not sure why $M_i$ is isomorphic with the module $M$ in my question.
Comment: @karparvar Can you show such an $M$ has an essential socle? If so, the socle is simple by indecomposability, and then $M$ is the hull of that simple submodule.
Comment: I posted my earlier comment as an answer and deleted it.
Answer: This answer uses the equivalent characterizations of injective indecomposibles from Theorem 3.52 in T.Y. Lam, Lectures on Modules and Rings.
In particular, it follows from this theorem that $M$ is uniform and that $M$ is the injective envelope of each of its nonzero submodules.
Since $P$ is an associated prime of $M$, there exists a nonzero submodule $N \subset M$ such that $\operatorname{ann}(N)=P$. Then $N$ is an $R/P$-module. Since $R/P$ is simple Artinian, it has a unique simple module $V$, and $N \cong_{R/P} V^{(I)}$ for some index set $I$. Viewing $V$ as an $R$-module, also $N \cong_R V^{(I)}$. However, since $M$ is uniform, it cannot contain a submodule which is a proper direct sum. Thus, $N \cong V$. Since $M$ is the injective envelope of each of its nonzero submodules, $M=E(N)\cong E(V)$.

Injective hull of a simple module


Integration with Emma

Question: Does anybody knows what tags are used to get Emma integration with EE (http://myemma.com/email-marketing-integrations/cms-email-integration/expression-engine) to work on templates?
Answer: I have updated MyEMMA GitHub code to get working with EE 2.7.x
To display simple subscribe form use tags below
<code>{exp:emma:subscribe} {/exp:emma:subscribe}
</code>
More here https://github.com/InteractM/integration-emma-expression-engine
Answer: There is an add-on for MyEmma integration (found here), but it is for EE 1.x
You can contact developer for porting it over to EE2, or do that yourself.
Comment: I know about that. EMMA offers their own integration, mentioned above, but there is a lack of documentation how to get this to work (create forms, what tags are using, etc).

Integration with Emma


How to enable right click mouse in gvim?

Question: I can use right click mouse in vim. It can't be used in my gvim. How to enable right click mouse in gvim?
Comment: Do you have popup menu on right click when `gvim -Nu NONE`?
Answer: First see if your mouse works at all (:help 'mouse', :set mouse?).
Then see what the right button is supposed to do (:help 'mousemodel', :set mousemodel?). Maybe it works, but not the way you expect.