How many IP addresses can a device or an interface possess?

Question: Can one IP address be assigned to more then one device or interface? In which situations may this happen?
Can one device or interface posses more than one IP address?
Answer:
Can one IP address be assigned to more then one device or interface? In which situations may this happen?

If you actually stopped to think this through, clearly this can happen. All you need to consider is all the consumer/CPE devices that default their management interfaces to an IP address something like 192.168.1.1.
Generally speaking, in a single local network (i.e. flat network or VLAN) a single IP address can only be assigned to one interface/device at any given time. The reason why is that other devices need to learn a correlation between a MAC address and an IP address. This is what the ARP process provides.
However like many general rules, there are exceptions and in this case these are normally mechanisms used to provide some sort of load balancing and/or redundancy.
Let's say you have two devices that both want to provide the same service on the local network. They could be programmed in a fashion where one responds to ARP for queries where the source MAC address is odd, and the other for even (or hashes or some other mechanism to group sources). This will allow the load to be distributed between the two.
If your two devices can then also maintain some sort of "heartbeat" and have the ability to "take over" the other device's MAC address in case of a failure, then you now also have a means of providing redundancy.
The presences of these capabilities and exactly how they work would be dependent on the features available in the device.

Can one device or interface posses more than one IP address?

Yes, however this capability will depend on the device/operating system in question. Some may provide this capability by allowing you to create multiple "virtual" interfaces of some sort tied to the interface or device. Others may allow multiple IP addresses on one interface. Or they may be able to do both.
Here are examples of virtual interfaces (Linux pulled as example off web after quick search):
[root@here]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:28:11:22
          inet addr:172.16.16.125  Bcast:172.16.16.100  Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:237 errors:0 dropped:0 overruns:0 frame:0
          TX packets:198 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25429 (24.8 KiB)  TX bytes:26910 (26.2 KiB)
          Interrupt:18 Base address:0x2000

eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:28:11:22
          inet addr:172.16.16.126  Bcast:172.16.16.100  Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:18 Base address:0x2000

eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:28:11:22
          inet addr:172.16.16.127  Bcast:172.16.16.100  Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:18 Base address:0x2000

Here is an example of multiple IP address on an interface (BSD based load balancer IIRC):
vlan100: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet 192.168.1.30 netmask 0xffffffff broadcast 22.214.171.124
    inet 192.168.1.40 netmask 0xffffffff broadcast 188.8.131.52
    inet 192.168.1.50 netmask 0xffffffff broadcast 126.96.36.199
    inet 220.127.116.11 netmask 0xffffffff broadcast 126.96.36.199
    inet 188.8.131.52 netmask 0xffffffff broadcast 126.96.36.199
    inet 22.214.171.124 netmask 0xffffffff broadcast 220.127.116.11
    inet 18.104.22.168 netmask 0xffffffff broadcast 220.127.116.11
    inet 220.127.116.11 netmask 0xffffffff broadcast 22.214.171.124
    inet 184.108.40.206 netmask 0xffffffff broadcast 18.104.22.168
    inet 188.8.131.52 netmask 0xffffffff broadcast 184.108.40.206
    inet 18.104.22.168 netmask 0xffffffff broadcast 188.8.131.52
    inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
    ether 00:11:22:33:44:55

How many IP addresses can a device or an interface possess?

This will be entirely dependent on what limitations are present in the device/operating system. Without knowing a specific device/operating system (and version), this is not a question that can be answered.
Answer: As long as an IP address is isolated from a network containing the same IP address, there is no problem, and no conflict. One of the benefits of the Private IP Address ranges is that they can be assigned many times. They are used by just about every home and company on the Internet. They cannot be routed on the Internet for the reason that they are the same addresses used in many places. This does pose problems when two companies using the same private IP address ranges merge. NAT can be used as a temporary solution while one side or another is re-addressed. (I have been through this many times, and it is never fun.)
Another use for using the same address in multiple places is the concept of anycast. In anycast, multiple hosts have the same IP address, and the routing protocol will route traffic to the nearest one. For instance, servers like DNS, NTP, etc. could be set up in a company with a wide geographic area and many sites. These servers could be dispersed around the country in central locations, and all have the same IP address per function. When a host needs the services of one of the servers, the routing protocol will make sure it reaches the closest server. That way, only one IP address for each function needs to be configured across the entire company. When the route to the nearest server goes down, the routing protocol will send the traffic to the next nearest server with the same IP address.
One interface can certainly have multiple IP addresses, and this is mandatory with IPv6, but is a bit more difficult in IPv4, although software has become more accepting of this for IPv4.
Answer: Depends on the device really. Most end user devices' NICs can handle at least one IPv4 and IPv6  (and have been able to for years).
Routers (and other network "infrastructure" devices can be assigned a lot more, mainly with the idea of subinterfaces. Basically, these are virtual interfaces that use the physical interface as a transmission medium.
I will say that your question is a little ambiguous without a reference or more detail. But I hope I gave you some sort of answer before it gets flagged.
Comment: Which part is ambiguous?
Comment: Well I mean, you say device, but it's really up to the type of device that would provide the answer.
Comment: What? No, we're not 'devising' anything. Device is the right word. I think you're misunderstanding,  what I'm saying is, depending on what device you're referring to (server, pc, router), the answer to your question will vary greatly.
Comment: I am asking the question for any type of device. A general question. Need a general answer
Answer: As has already been noted, it's practically universal for hosts to have more than one IP address:

In general practice, routers will have an IP address per interface, and possibly some secondary IP addresses for various reasons
Every end-point host computer will have an IP address, typically one per interface, and almost every host will have a loopback interface.

However, in a spirit of empiricism:
If there any limits for a given system depends entirely on that system.
Just for an experiment to see if there were small limits, I tried putting very many secondary addresses and found that even with what I'd consider a ridiculous number of addresses, nothing broke immediately.
A Cisco router behaved perfectly well with a 1,000 secondary addresses like this:
interface Loopback0
 ip address 10.0.1.1 255.255.0.0 secondary
 ip address 10.0.1.2 255.255.0.0 secondary
 ...
 ip address 10.0.10.100 255.255.0.0 secondary
 ip address 10.0.0.1 255.255.0.0

A very small Linux server (32-bit, kernel 3.5) still behaved reasonably well with 10,000 secondary addresses like this:
ifconfig lo:101 10.0.1.1 netmask 255.255.0.0
ifconfig lo:102 10.0.1.2 netmask 255.255.0.0
...
ifconfig lo:10100 10.0.100.100 netmask 255.255.0.0

Running ifconfig to list the interfaces does take over 30 seconds, however nothing was obviously going wrong.
Answer: A device can have more than one interface
An interface can be assign by :
One ipv4 address and one ipv6 address with one ip gateway and more than one ip dns
Have nice day, ty
Comment: An interface can have more than one IPv4 and IPv6 address. See for example IPv6 privacy extensions.


Export Crystal Report to CSV Format

Question: How to export the crystal report to .csv file format?
Answer: Are you using the free version of Crystal reports that comes with .NET?
If so, apparently you can't. There is a post here that states

The free version of VS.NET doesn't have the CSV export options. You have to upgrade to get that capability.
Answer: Assuming you have a nice structured ResultSet, you can export your crystal reports to Excel format, and then do a simple export from Excel into CSV. There are plenty of code snippets out there on how to programmatically work with Excel spreadsheets.

Export Crystal Report to CSV Format


airpods flashing orange and sound is gone in left

Question: I have had my airpods for about a couple months and they have worked completely fine. I charge my airpods every 2nd night, today after charging them they have been flashing orange and the sound is gone in the left. I know that orange means it needs to be charged but i am charging them right now and they are still flashing orange. When i remove one pod from the case, the light changes to green but when I put them both in together it flashes orange. Also they won't connect to anything device it doesn't know and won't reset using the button. pls help
Answer: Press the reset button on the white case(you can miss this as it is flush with the case) hold the button until the light goes white. Then pair it with Bluetooth again... hey presto


Where does it make sense to store Indexes for partitioned tables?

Question: Prior to table partitioning, all the indexes were stored on a separate drive, per this question.  Now that I partitioned a couple of tables, SSMS is offering to store indexes in the partition scheme.  Is this a good idea?  Or should I be storing indexes on a separate drive, like I was before?  What are the pros or cons of either?
Answer: Putting an index on a partition scheme is exactly the same as putting a table on one. All it means in terms of storage is that the storage for the index is partitioned according to the partitioning column that you select. The partitions in a partition scheme still end up pointing to filegroups eventually, so you can still point the partition scheme at filegroups that are on your separate drives.
So the pros and cons are pretty much exactly the same as for table partitioning, and the query optimiser will make very similar choices in terms of partitioned .v. not. However, from my own experience, I can say that partitioning makes a lot of sense if you are regularly making queries that can be fully satisfied with the data from a single partition - and the sample applies to indexes.


Amplitude, constructive and destructive interference in the real world, in quantum waves

Question: A light bulb puts out a stream of photons with various wave amplitudes.   If we add more light bulbs in the room, how can we just assume that the light intensity increases to greater levels; that would be the wave amplitude increases?  Wouldn't there be a wide range of constructive and destructive interference in the waves?  So isn't it just as possible that all of the interference is destructive?  Obviously this is incorrect, but how do we understand and calculate the constructive or destructive interference in the real world, where we have a number of sources?
Answer: Normal light sources emit photons with different frequencies/different wave lengths. Therefore, the inference would be restricted to the tiny fraction of the photons that happen to have the same frequency. Also the interference fringe pattern (i.e. the locations of bright and dark spots) depends on the frequency of the interfering photons and thus the patterns produced by photons of different frequencies are different with no net cumulative effect to be observed.
It is also important to realize that the interference does not change the overall intensity of the light. So even if we have two light sources with the same frequency (like in the double slit experiment) and we do observe an interference pattern, a reduction in intensity in one location is always accompanied by an increase an another. Otherwise, energy is not conserved.
Answer: The problem is saved the fact that power goes as the square of the field. If the 1st source has a field $ \vec E_1 $, then the average intensity is
$$ I_1 = \frac 1 2 c\epsilon_0||\vec E_1||^2$$
If you add another random source, $\vec E_2$, then:
$$ I = \frac 1 2 c\epsilon_0||\vec E_1 + \vec E_2 ||^2$$
$$ I = \frac 1 2 c\epsilon_0\big(||\vec E_1||^2 + ||\vec E_2 ||^2 + 2\vec E_1\cdot \vec E_2 \big)$$
$$ I = I_1 + I_2 + c\epsilon_0\vec E_1\cdot \vec E_2 $$
So there is an interference term, but when you time-average it over all field directions, it is zero.


What to call the spray of sea water?

Question: When I was at the beach, I occasionally felt the spray of sea water.
Is there any word for it?
Answer: I think it's called "sea spray."
Answer: Are you looking for spindrift ?

Spindrift usually refers to spray, particularly to the spray blown
  from cresting waves during a gale. This spray, which "drifts" in the
  direction of the gale, is one of the characteristics of a wind speed
  of 8 Beaufort and higher at sea. (Wikipedia, "Spindrift")
Comment: That's interesting -- my first though on reading you answer was "no, spindrift is *snow* blown off the surface".  Apparently I only knew the less-common meaning.

What to call the spray of sea water?


Renouncing the registration system

Question: I want to completely remove the registration page from my web app (for obvious simplification and uniformity) and only use "connect with Facebook" and "connect with Twitter" the website is a technical one regarding the web and such so the public is somewhere above average (I presume), would this be a "safe" decision ?
Answer: Depends if you mean safe as in secure, or safe as in for the benefit of your website.
In theory using twitter/facebook is more likely to be secure than rolling your own registration - this very website made the decision to use openID as supposed to rolling its own, so your in good company.
The most immediate thing which springs to mind is what if people don't have twitter or facebook?

Renouncing the registration system


How to Tell "On" meaning "one" or "we"

Question: I had someone say they were looking for a dance school "où on peut apprendre des danses de salon". In this context is it more likely to mean "where one can learn to ballroom dance" or where "we can learn to ballroom dance". I believe it could be either but any French speakers lean towards one translation more? Is there any good way to tell "on" as "we" vs "one"?
Comment: The best way is through the context. In your example and in many cases, it could actually be both. This is valid also for English I guess, at least in your example, the meaning is not totally different and for the people speaking the "quest" is the same. I have a hard time finding an example where the meaning would be very different, but maybe is it because I'm not yet fully awake :-) Please note also that in informal speach, there's a tendency nowadays to use less and less the "nous".
Comment: @LaurentS. yea I was afraid context would be the only clue. So since it's less common to use nous. i guess that makes it more "likely" to be us dancing but not perfectly clear. I guess I'll just have to get more clarification. Thanks!
Answer: As already answered in a comment, the context is generally telling how to interpret on in a sentence. Usually on is either "one" or "we" but it might also be any other personal pronoun. depending on the sentence. Really ambiguous cases are rare.
In your example, because of the generic present, there is no doubt the meaning is "a place where ballroom dancing is taught".
If the speaker wants to include themself in the learners, that would more likely be we using the conditional that way:

...un endroit où on pourrait apprendre des danses de salon.

Note that the pronoun nous hasn't disappeared in spoken or informal French. What has almost completely disappeared in everyday spoken French is the first person plural verb forms (pouvons, pourrons, pourrions...)
That means nous is no more a direct subject but it can still be an affixed one like in:

...un endroit où nous, on peut apprendre des danses de salon. (here, the question implies there are places where ball dancing is taught but not for us for some reason).

Note also that nous is the only choice as a complement:

C'est nous qui apprenons les danses de salons.

This form is a rare case where the first person plural is still used in the conversation, although you might also hear or read in very relaxed informal French :

C'est nous qu'on apprend...
Answer: I don't know in English but in French, the meaning of '' où nous pouvons apprendre '' and '' où on peut apprendre '' is not the same. '' on '' is informal here, '' nous'' is not. In this situation if you say "nous", it means you are talking for a precise group of persons and you include yourself. If you use "on", it's not someone specific, it' s people in general

How to Tell "On" meaning "one" or "we"


Is there anything equivalent to Portal 2's linked_portal_door in any other engines?

Question: I need the functionality of the linked_portal_door that's in Portal 2. I've searched a little in UDK and mostly got people trying to duplicate the portal gun. Does anyone know if UDK, CryEngine, Unity3D, or any other engine has something similar? I'm not against using Source, I just want to know what my options are.
Comment: Few of the big established engines do, since most are derived from Quake or use similar techniques.  Smaller or less well known engines have used portals as their core scene culling technique. I recall that CrystalSpace used to use portals to connect all sectors (similar to how Doom/Doom2 worked, but in full 3D).  You might try that engine.  I haven't kept up to date on its development, so I don't know if it has switche to another scene management technique or not.
Answer: I'm pretty sure that the Source Engine is the only engine that will support this out of the box. You can read about some of the technical issues in an article I found on Gamasutra, copied here for future readers:

"Another problem we ran across was the need to change distance-based
  systems such as level of detail (LOD) for models, because with our
  game, distance is relative to the portal locations.
This means that the distance calculations became a choice of three
  lines connecting two points, rather than just one line. Also, line of
  sight can pass through a single portal more than once to reach its
  target.
The Source Engine does many pre-computed visibility optimizations for
  culling. Allowing users to bridge visibility leaves with portals added
  another level of complexity.
For better rendering, we implemented a stencil buffer drawing method
  for portal views, which gave us a lot of flexibility for handling the
  portal recursion depth. This allowed us to render an infinitely deep
  number of portals (limited only by performance), which made our
  "infinite" hallways look pretty neat.
Stencil drawing also helped us solve the problem of integrating
  properly with other technology in the Source engine like HDR blooming.
  Since we have to render our scenes an additional two times for our
  portals we poured a lot of our effort into making portals render as
  fast as possible, such as special view frustum culling based on the
  portal's edges, and render list optimizations for portal drawing."

I also remember reading somewhere that there are a lot of special cases, like having portals on opposite sides of the same block. Making portals is not a simple task.
EDIT:
Found an other good article containing this:

Quickly, we realized that we needed a more robust method for rendering
  the portals and allowing the player and other objects to move
  seamlessly between them. This required us to dig a little deeper into
  the Source engine's rendering and physics code, and we had to program
  our own portal system.
Basically, we had to tell the Source physics system to make a
  temporary hole on only one side of a wall, and that everything behind
  the portal is connected to geometry in another part of the map.
  Getting this to work and optimizing the solutions to run in real-time
  was a major challenge.
Comment: It's worth notIng that a lot of these problems were the difficulty of adding portals to the existing Quake2-derived Source engine.  There are other engines that have been portal-based for scene culling since day one.
Comment: What are some of the engines you're referring too?
Answer: You can in Unity3D, using render textures and teleporting the player behind the other one if he looks into the portal, and turning off the collision detection for the other portal, and then when the player moves out of the surface you could turn on its collision detection, or if he just goes through it without looking at it, just teleport him to the other portal (just a guess, dont know if it would work..), don't know about the other 2 though..


What replica in Availability Group should System Databases be backed up

Question: Just wondering what is the best practice for backing up system databases in Availability Group i.e should it be backed up in Primary, secondary or in all replicas please. Thanks in advance
Answer: Since they are independent of each other, backup all system databases, for each individual instance hosting a replica.
Answer: TLDR; if you can do your backups on your secondary, run them there, but system databases need to be done per server.
Our main consideration for this is licensing, if your secondary node is passive then you can't take backups on it, if you're using it as a read replica then that's not an issue.
Second consideration is what synchronisation method are you using if your actually in synchronous mode then your secondary node is up to date as the data is written at the same time.
So if you're on an active secondary with synchronous commit then you can happily run the backup on the secondary node to release pressure on the primary node.
The AG group is sensible enough to tell the Primary replica that the backup has been taken and will clear the transaction log out on the primary accordingly (all of our backups are done on secondary) hereby no backups never need to be done on the primary node.
Any databases that aren't in the AG (aka master, model, msdb and any other locals) need to be backed up independently still
Comment: good shout, done


Cannot update Intel G31/G33 Graphics Controller

Question: My last computer ended with a burning smell when I was trying to install more memory. My Samsung SSD is up-to-date with 18.04 Ubuntu. I put it into another used computer which has a G33/G31 Express Integrated Graphics Controller. Ubuntu is working fine, except that it hangs up at the splash screen during boot-up, and I need to boot-up every time from the GRUB menu. Also the screen resolution is not right. The terminal says "unable to get EDID for xrandr-default: unable to get EDID for output". Intel no longer supports the G33/G31 drivers for Ubuntu. Regarding updates for this driver, their website says "Users may be unable to use the native resolution of some displays when using Intel chipset graphics." "The display EDID is not read properly when connecting to a subset of Digital Flat Panel (DFP) displays." "Intel has released this driver to specifically address this issue   .   .   ." Unfortunately, the updated driver is only for Windows. I bought the computer for $200 and have spent at least 40 hours trying to find answers. Did I waste my time and money? Can I fix it, or should I just buy a new computer? There may be other issues that I do not know about, but the computer seems to work fine, except the graphics are not right. If I run lshw in the terminal, it says "*-display UNCLAIMED". When I opened "Activities" and typed in "Displays", the resolution I needed(1280 X 1024) was not listed. Thank you :)
Answer: PARTIAL SUCCESS: I opened "Activities", typed in "Displays", clicked on "Color", clicked on "Default Monitor", clicked on "Add Profile" at the bottom of the menu. On the drop-down list was Samsung SyncMaster. And I just happened to have an older Samsung SyncMaster monitor. I put a checkmark on that option. And I was able to get that monitor to work in the right resolution (1280 X 1024). :)   The 1280 X 1024 option even showed up in the "Displays" menu :)  The first monitor still will not start with the right resolution, but if I start the computer with the Samsung monitor, then switch the cable to the other monitor, it will also work in the right resolution. However, I still must boot-up the computer from the recovery menu in GRUB. It's after midnight. I'm going home.


How to play wmv3 videos

Question: Is there any way to play wmv3 videos on Ubuntu? Tried using VLC player but it says it cannot play the video and there is no way to fix this.
Answer: Medibuntu (Multimedia, Entertainment & Distractions In Ubuntu) is a repository of packages that cannot be included into the Ubuntu distribution for legal reasons (copyright, license, patent, etc).
Some of these packages include the libdvdcss package from VideoLAN and the external binary codecs package (commonly known as w32codecs) used by MPlayer and xine.
follow this ubuntu guide : here
Comment: Note to other users: I found this works with MPlayer but not vlc though.
Answer: This tutorial shows you, how to do that, because it provides a:

native decoder for Windows Media Video 7/8 (WMV1/WMV2), and Win32 DLL decoder for Windows Media Video 9 (WMV3), both used in .wmv files

How to play wmv3 videos


Skip "Sign in to Google" when setting up new Android device

Question: I recently got a new Nvidia Shield TV. On the first start, after asked me to set up my language and connect to my wifi, it prompts me to "Sign in to Google." The only options on the screen are "use your phone or laptop" and "use your password." How can I bypass this step?
Comment: You can not. They call it android, but in fact it's alphabet.
Comment: It's more like Google doesn't need to know more about me. But this isn't just a Google thing; most modern OSes (Mac OS, iOS, Windows) push you to sign in.
Comment: Basically, what are you going to gain out of bypassing this step? i mean if you dont want to give your google account details, just create another one...it dosent cost one cent to create one. Hopefully, your issue will be addressed after this
Answer: My Shield TV worked just fine for three years without a Google account, but the Oreo update appeared to lock me into a signup page; This is pretty obnoxious.
You can double-tap the home button and dismiss all the active applications; once you do that the launcher will come up without requiring you to login to a Google account or give them your phone number to create one.
You will have a permanent notification suggesting you sign in, though.


Generator connection to two service panels at same time?

Question: I have a single inverter generator with a floating ground that connects to my house panel using a manual interlock and double breaker. It works well.  I have a garage and shop on a separate meter and panel about 20 feet away.  It is a separate feed from the power company transformer.  Same transformer that feeds the house.  Can I add an interlock and generator inlet box to the shop panel and feed both at the same time using a splitter cord on the generator?  My main concern is that there are two separate grounds.  Could I create a potential between those grounds?  Any other hazards?
Comment: Is the garage panel fed from the house panel? If so, just keep the breaker to the shop panel on. If not, please describe the feed to that garage panel.
Comment: That would be _very_ useful info to [edit] into your question. Not everyone will read all the comments, and they might get deleted in the future.
Comment: Thanks. My first post, so I will edit.  I tried to communicate that it was a separate feed from power company saying it had a separate meter but maybe that wasn't clear.  Thanks for the advice.
Comment: No, the garage panel is fed from the same pole mounted transformer as the house. Two service drops to two meters.
Answer: I'm not certain whether there's a literal violation of electric code in this scheme but I do see a violation of principle.
The problem is this: you'll be tying the neutrals of the two services together. A two-pole circuit breaker interlock type transfer breaks only the line conductors, so regardless of whether the present interlock is selecting generator or grid power, the neutral is connected from transformer to panel to generator. If you now add a feeder from the generator to the shop building you'll create a ring of neutral. Current drawn by a load in the house will return to the house panel, where it will divide so that part returns to the transformer on the house service and part returns to the transformer via the generator and shop service. If one of the services is smaller than the other there could be a possibility of overloading the smaller neutral as well.
I believe if you used a 3- or 4-wire transfer switch at both locations rather than circuit breaker interlock everything would be okay.
Comment: Yeah, you need to switch the neutral at both panels for this to be OK (otherwise, you wind up with what's effectively paralleled/looped neutrals, violating the intent of 300.3(B) and 310.10(H).  See [my Q&A in the ATS context](https://diy.stackexchange.com/q/169029/27099) for details
Comment: That makes sense. I'll operate the two panes with independent generators or time share power to a panel one at a time.  Thanks
Comment: @SteveB Time sharing with interlock breakers won't fix the problem - the problem is the non-switched neutral. Independent generators, 3-/4- wire transfer switch, or cord-and-plug "transfer" all avoid the parallel/loop neutral. To be clear, with cord-and-plug, you'd have a male inlet socket that wires to the interlocked breaker, and all of that duplicated for the second building. Then you use a cord from the generator to the output to the inlet of the building you want to power. This is common with portables; not so much with permanent standby generators.


Hashing : Insertion to a Deleted Slot

Question: I'm new to hashing and here's my question:
Can you insert in a DELETED slot of the hash table?
Comment: Yes, but which language do you use?
Answer: Yes, you can insert to a deleted slot. But...
At first you should know that there is soft-deletion and hard-deletion. In soft-delete you just flip a flag and mark your slot as "deleted", in hard-delete you empty the slot.
Let me explain why we need soft-delete: For example you're using a hash table with linear probing and somehow your hash function maps 3 input values to the same slot. By using linear probing you place these three elements by advancing linearly on the table until you find an empty slot. In this case if you use hard-delete for deletion, you will break the hash table since there will be an empty slot while try to retrieve a value so one value will become unreachable.
On the other hand; if you have a perfect hash function you are OK to use hard-delete. A perfect hash function maps every input value to slots uniquely. So no probing scheme is needed and hard-delete doesn't break your table.
Now coming back to your question, you should also consider and figure out how to avoid duplicate insertions.

Hashing : Insertion to a Deleted Slot


Object Oriented Directory No Return?

Question: I'm working on an assignment that uses object oriented design for a directory lookup/database. I'm having trouble with my code not returning anything after I input the command and names. If someone can explain to me why this is happening, it would be greatly appreciated!
Answer: Never close your standard in/out/error streams ;)
arg....doing this with a tablet stinks.
in your Directory#inDirectory method, your for loop never increments, so never completes.
Comment: I've removed the following code from DirectoryWithObjectDesign, however, it still does not return anything after input. I believe there's something wrong with my Directory.java, but I can't seem to find anything wrong with it.
    `stdin.close();
    d.closeDirectory();`
Comment: Sorry, i need to move to a computer...if you have no response by then, i'll assist.  Tablet formatting is impossible ;(
Answer: I ran your code and here is what I found.
Its throwing an "java.lang.IllegalStateException" in your  DirectoryWithObjectDesign class because you are trying to access the scanner which you have already closed .
Just add a break after your "d.closeDirectory();" command and your code should work fine .
Hope this helps!
<code>import java.util.Scanner;
</code>
public class DirectoryWithObjectDesign {
    public static void main(String[] args) {
<code>    String directoryDataFile = "D:/stackoverflow/StackJava/src/Directory.txt";
    Directory d = new Directory(directoryDataFile);
    Scanner stdin = new Scanner(System.in);
    System.out.println("Directory Server is Ready!");
    System.out.println("Available commands: find add delete");
    System.out.println("Format: command <name>\n" + "Enter ^Z to end\n");

    // Create/initialize the directory object
    // Tell the user the system is ready and waiting to execute commands
    while (stdin.hasNext()) {
        String command = stdin.next().trim();

        String name = stdin.next();
        System.out.println("command:" + command);
        System.out.println("name:" + name);

        if (command.equalsIgnoreCase("find")) {
            if (d.inDirectory(name))
                System.out.println(name + " is in the directory");
            else
                System.out.println(name + " is NOT in the directory");
        } else if (command.equalsIgnoreCase("add")) {
            if (d.add(name))
                System.out.println(name + "has been added");
            else
                System.out.println(name + "is already in directory");
        } else if (command.equalsIgnoreCase("delete")) {
            if (d.delete(name))
                System.out.println(name + "has been deleted");
            else
                System.out.println(name + "is NOT in the directory");
        } else {
            System.out.println("Please try again");
        }
        stdin.close();
        d.closeDirectory();
        break;
    }
}
</code>
}
Comment: My assignment requires the program to loop, therefore I can't use the break.

I found that I removed std.close(); it fixed the problem. However, I can't decipher why 'find' does not return anything nor can I enter anything else.
Comment: You for got to increment i in your Find method , add "i++" in your for loop. it going in to an infinite loop with mike mike mike mike  .....
Comment: Thanks for pointing that out. I've should've seen that earlier!

Object Oriented Directory No Return?


Does cosmological argument prove that anything that exists has a cause of its existence?

Question: Does the cosmological argument "prove that anything that exists has a cause of its existence", or is that just a premise of the argument?
Comment: As normally articulated this is a premise. Can you better explain why you're asking this question? That might help to formulate an answer that helps you with your conundrum.
Comment: @abluezebra I think you are asking after [the difference between soundness and validity](http://www.iep.utm.edu/val-snd/): *A deductive argument is said to be **valid** if and only if it takes a form that makes it impossible for the premises to be true and the conclusion nevertheless to be false. Otherwise, a deductive argument is said to be **invalid**.  A deductive argument is **sound** if and only if it is both valid, and all of its premises are **actually true**. Otherwise, a deductive argument is **unsound**.* In other words, the CA could be valid but unsound (logical but not true).
Comment: My doubts are in the terms of a statement being a 'premise'. In this case, the premise would that "anything that exists has a cause of its existence". If any argument is true, does it prove its premises true as well? Or does the success of the argument only prove the truth of the 'conclusion'.
Comment: I'm not following your English...
Comment: @abluezebra is there anything the existing answers didn't address properly?
Answer: There is no such thing as the cosmological argument. Rather, there is a class of arguments that share similar themes and (sometimes) logical structure, but that rely on different premises that are all referred to as cosmological arguments. For instance, a cosmological argument defended by Aquinas depends on the impossibility of an essentially ordered infinite regress. On the other hand, the Leibnizian cosmological argument depends mostly on the Principle of Sufficient Reason.
Given the wording of your question, you are most likely referring to the kalam cosmological argument, which has a premise that is similar to, but importantly different from, what you stated. The argument is usually formulated as follows:

Whatever begins to exist has a cause.
The universe began to exist.
Therefore, the universe has a cause.

So, instead of "anything that exists has a cause of its existence," the premise is closer in meaning to "anything that begins to exist has a cause." The kalam cosmological argument does not even attempt to prove that "everything that begins to exist has a cause," but assumes this as a premise. This premise is often defended as self-evident or as following from a commonly accepted proposition (such as the Causal Principle), but these defenses are not part of the kalam cosmological argument per se.
Answer: If I understand your question correctly, then the answer is no. The cosmological argument takes as its premise that anything that exists must have a cause either in fieri (like me causing these words to appear by typing them) or in esse (like the words showing up on my computer screen is caused in part by the electricity supplied to it and will go away when the electricity does). The conclusion is that there must, therefore at least have been a God in order for the cosmos to exist.
The fact that all things have a cause was derived by induction from our experience that such a law seems to be in place.
In fact arguments against the cosmological argument come in part directly from the fact that this is simply presumed to be true (such as Russell's counter argument which cites the Problem of Induction in that we cannot deduce that all things have a cause from the fact that all things we have experienced have a cause).
Comment: No, the argument is that anything that BEGINS to exist has a cause. God has always existence, hence did not ever BEGIN to exist, hence doesn't need a cause. That's the trick in the argument.
Answer: OP: Does the cosmological argument "prove that anything that exists has a cause of its existence", or is that just a premise of the argument?
There is no need to prove that anything that exists has a cause : the existence of a thing is the rationalisation of how it appears.  Rationalisation is the process of making sense of causes, so for example, the coffee cup before me exists because I acquired it (after someone made it) to drink coffee and it is right here because I am drinking coffee now.

In line with the trait of modern thinking that moves in the realm of
Reason, Kant also thinks within and in terms of the dimension of
Reason. As the faculty of fundamental principles, reason generally is
the faculty of representing something as something. "I place something
as something in front of myself" is the stricter formulation of the
ego cogito of Descartes, of the "I think." Therefore the dimension of a critique, of theoretical, practical, and technical Reason is the
I-ness of the I: the subjectivity of the subject. It is in relation to
the I as subject that beings, placed before the I in representation,
have the character of an Object for a subject. (Heidegger, The
Principle of Reason, p. 77)

The principle of sufficient reason relates directly to existence as the discrimination of objects beyond raw sensation and undifferentiated matter.  The latter are beyond grasp.

The term "Principle of Sufficient Reason [principe de raison
suffisante/principium reddendae rationis]" was coined by Leibniz,
though Spinoza is thought by many scholars to have preceded Leibniz in
appreciating the importance of the Principle and placing it at the
center of his philosophical system. ...[in] the 1663 geometrical
exposition of Descartes' Principles of Philosophy (which may or may
not reflect Spinoza's own views at the time). The eleventh axiom of
Part I of the book states:

Nothing exists of which it cannot be asked, what is the cause (or
reason) [causa (sive ratio)], why it exists.

– quoted from § 1. & 2. SEP - Principle of Sufficient Reason


Migrating From WAMP to Ubuntu Desktop

Question: I am moving my Wordpress site from a WAMP stack on Win7 to Ubuntu Desktop 13.10.
Upon export i realized that all the tables had been written as InnoDB rather than MyISAM, so i did a find/replace to correct that.
Is there anything that i should look at as far as incompatibilities between WAMP and a LAMP stack?
I'm getting this error:
Warning: mysql_connect(): Can't connect to MySQL server on 'x.x.x.x' (111) in /var/www/wp-includes/wp-db.php on line 1147

line 1147:
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );

my process was:

create a database with the same name as the original db.
import the .sql file that was exported from the old WAMP server into this new
db    (again, had to change the InnoDB to MyISAM
create a db user with the same name and pw as the orig db
copy all the contents from my wordpress site into /var/www
open a browser and point to  http://x.x.x.x/wordpress (both the ip and 'localhost') give the same error, but i built my site using the IP rather than 'localhost'
test going to just http://x.x.x.x and i get the "It Works!" page.

i was able to start a new wordpress site from scratch, so i'm pretty confident my setup is fine with respect to the LAMP stack.
i just don't know where to look any more.
any thoughts would be greatly appreciated.
Comment: Some ideas: Did you check if database server is accepting connections from other IPs in your network? Also, after step 4, did you go over any configuration files to check for any changes like paths, etc?  I would have done it with different order, like first make a clean installation of wordpress, make sure it works, then 1, 3, 2, using the database owner account to import the data.
Answer: I figured out what was wrong.
In the original site, I had changed everything to look for the IP address rather than "localhost" so everything (export.sql database, wordpress wp-config.php file, apache's httpd.conf file) were all trying to make sense of the hardcoded IP address which no longer existed.
I had done that due do something I had read about having other computers on the LAN not being able to connect to the wordpress server and that I needed to use the servers IP instead of localhost.
To fix it I just changed the IP of the new server to match the old one.  This got everything up and running at which point I was able to go in and switch everything back to "localhost".  and FWIW, testing LAN connections to the server seems fine using localhost now so I have no idea what was up initially - all I know is that I couldn't connect using localhost, but I could connect using the IP, but now that seems to not be the case.

Migrating From WAMP to Ubuntu Desktop


Why is my oven bulb so hard to turn?

Question: My oven light burned out. When I try to turn the new light bulb in my Kenmore oven it's like sandpaper against sandpaper. Why is this?
Answer: The socket is probably corroded or has debris in it, using oven cleaner sprays is very hard on that socket because it is not coated with porcelain enamel like the rest of the oven. It is bare metal, usually aluminum. Cleaning it can be tricky but if you endeavor to do it, unplug the oven first or turn off the circuit breaker if the oven is hardwired and wipe it with a damp (not wet) sponge or cloth and let it dry thoroughly before plugging the oven back in. Then you can spray a spritz of cooking spray on a paper towel and wipe it onto the bulb threads (not the button on the end though) before screwing it in. If it were not an oven you could use a little rub of bar soap on the bulb threads, but that will impart a flavor to your food in this case.
Comment: It is quite likely that the oven is hardwired. I suggest changing "unplug the oven first" should be **unplug the oven or turn off the circuit breaker**
Comment: @manassehkatz, feel free to make such edits yourself. This is a community-edited network.
Comment: It is important to note that if you elect to use a cleaning chemical, it must be non conductive, or make sure all of its residue is cleaned off before reinstalling the lamp and activating the circuit. I usually use denatured alcohol.
Comment: I would suggest that unplugging an oven is a mistake.  It typically requires moving the stove, often messy, insertion/removal forces are extreme while access angles are ungainly, and this socket is not made for frequent plug/unplug.
Answer: Carbon can form in a hot electrical environment. Use a PLASTIC vacuum nozzle to suck out the socket. OR use a clean dry toothbrush to clean it out by rotating the toothbrush, and then vacuum out the socket. Wear gloves for protection against shock and broken bulb glass.
Answer: If either the socket or bulb base is aluminum , it has probably galled. No nice fix; turn off power and twist, you will likely need to replace both socket and bulb.

Why is my oven bulb so hard to turn?


What is the point of the Superchix?

Question: I read The Dark Knight Strikes Again recently. I remember being confused as to why these so-called "Superchix" continued to appear. Are they supposed to tie in to the larger story of heroes and government? What's the deal?
Answer: The Superchix are groupies whose predisposition for supporting metahumans made them instant celebrities when Batman's war against the corporate and government controlled criminality came to light.
They have no powers save the media's response to them. Only one of them ever makes any real sense during most of their appearances, but the media and the media-obsessed public attribute meaning to whatever it is they do say whether it be useful or not. Observe:

Why do they even matter during the course of the story?
Because Lex Luthor had stolen, killed, or blackmailed most superheroes out of the crime-fighting business. He then turned the people against superheroes using psychological manipulations of government-controlled media.

The SuperChix are a story-telling element (focused on the Human events in the story) allowing the reader to maintain a connection with how people are responding to the cataclysmic events of the superhumans in the story.
Comment: Minor question, is that Bat-Mite? Because that looks like Bat-Mite.
Comment: I believe it is an avatar for one of the commentators. Imagine a newscast where people use their online avatars to represent them in the public mediasphere. That day is coming...
Answer: According to one literary analysis of the book that I've found, they are meant to represent the "triumph" of Batman's forces, freed from their presidential ban against performing, and indicating the superheroes entering a more interactive role with pop culture.
Depending on your point of view, they could be seen either as a triumph of freedom, free speech in the favor of superheroes after governmental oppression, or they're a sign that the victory is relatively hollow. Yes, the society is no longer as oppressed by the government, but the most visible indication is three "scantily-clad publicity hungry superhero groupies" who are now free to be on the public airwaves. That would be like the triumph of free media being Miley Cyrus being able to perform "Wrecking Ball" on TV again.
For reference
Comment: Thank you, Valorum. I'm having issues with the editer

What is the point of the Superchix?


How to add System.Drawing.Image object to Asp:Image Control

Question: How to add System.Drawing.Image object to Asp:Image Control  but I dint have imageId in my table.Image field is in another table..i retrieve image from database in Image object.i want  to display it in asp:Image control or grid view.how to do it?? pls send reply... C#
Answer: The Image class and <asp:image> control are completely different thing.
You need to have a page or http handler to write the Image object as an image file such as .jpg / .png / .gif. And then use the <asp:image> control to access the URL of your page or http handler to get the image file you generated and display it. <asp:image> basically only render a HTML  tag with the URL of the image.
Answer: You can use this ASP.NET module and the SqlReader plugin to serve images directly from the database.
You can then reference the images like so:
<asp:Image runat="server" ImageUrl="/sqlimages/[imageidhere]" />


How do I explain a lack of sufficient data in my essay?

Question: In the essay that I'm writing, I claim that women are more likely to be victims of abduction than are men. As evidence, I cite a study on child abduction (the NISMART, if you must know) stating that the majority of kidnapped children were females.  Because abductions rarely happen, any data on abductions in general (child and adult), if it exists, is very difficult to find, even with a search in my college library's databases.
Comment: Usually the police and related institutions create and publish criminal statistics. If kidnappings are not listed separately, you could inquire with the relevant institution of your country.
Comment: For example, here is the data for Australia: http://www.aic.gov.au/dataTools/facts/vicGenderCrime.html
Comment: If you have problems finding resources for your country, [OpenData.SE](http://opendata.stackexchange.com/) is the site to ask.
Comment: @what: For United States crime data, I look at the United States Federal Bureau of Investigation's Uniform Crime Reporting data (a compilation of data from the FBI and local police agencies) or the National Crime Victimization Survey data. Unfortunately, adult abductions are so much of a non-concern that I could not find usable data.
Comment: @moonman239 Have you tried contacting the FBI? There is probably a note attached to that publication saying which office or officer compiled the data, and you could ask them if the data yoi seek is available. If your reason to request that data is valid, they migjt actually give you that information. If you work or study at some institution such as a university, use your official email address, gice details about what you do and who you do it for etc. I've often found that people are quite helpful if they think what you do is meaningful.
Answer: If you don't have enough reliable data to support your claims, then you should state that your findings are based on certain assumptions. It would further help your cause if you then give explanations for why you made those assumptions. Before you do this, however, you should probably make more of an effort to locate data to support your position. Relying solely on your college library is going to be very limiting.
Comment: Sometimes you need to be willing to do some real research if you want to have some real data. Having said that, I found four sites on Google with very relevant data, so you may want to reconsider what you are looking for. One in particular was a gold mine of information, but sometimes you have to work a little harder to find what you need. Some states have better information than others, but there is information out there.
Comment: "Before you do this, however, you should probably make more of an effort to locate data to support your position. Relying solely on your college library is going to be very limiting." Couldn't find the information on Google, either.
Answer: As this answer says, it's important to state your assumptions, whatever they are.
Sometimes there just isn't enough data, though, and I understand your question to be about what to do in that case.  There are two basic approaches:

Only write about things you can back up.  For example, Consumer Reports publishes ratings, including predicted reliability, of all new cars once a year.  They list everything, but where they have insufficient data they just leave out the predicted reliability.  That doesn't stop them from reporting other things about those cars or making recommendations.  They're saying "we don't know this, but we can say these other things".
Be more liberal in what you write but be explicit about what data you're basing it on.  You'll sometimes see news analyses of, say, crime patterns, with a note like "in 2011, the last year for which data is available, ..." -- well, it's 2015 now and 2011 data might not tell us enough, but it's the best they have so they extrapolate from it.  In this approach you leave it to the reader to decide how much that matters.

In your essay, if you need to talk about abductions in general and you only have data for child abductions, you can take the latter approach.  Say what you base your conclusions on, and perhaps you can anticipate and pre-emptively address arguments about why that data isn't representative.
The other approach is to focus your essay on what you can directly support with data, in this case writing about child abductions rather than all of them.


Are Transponder Mode A and C still in use?

Question: Are the ATC transponder Mode A and Mode C still in use (according to ICAO or FAA rules)?
Comment: Mode A+C are still used all over the world. It might be easier to answer if you provide a bit of context and explain why you are asking.
Comment: I can't find a source but I suspect that Mode A only transponders have not been sold since the mid-1980s (or even earlier) so you aren't likely to find any currently installed. Mode C transponders all have the ability to turn off the altitude reporting capability if ATC is receiving bad data and act like Mode A transponders. I don't normally fly where ADSB is required so I'll keep mine until it stops working.
Answer: Yes. According to Title 14 CFR §91.215   ATC transponder and altitude reporting equipment and use.
Specifically:

(a) All airspace: U.S.-registered civil aircraft. For operations not
  conducted under part  121 or 135 of this chapter, ATC transponder
  equipment installed must meet the performance and environmental
  requirements of any class of TSO-C74b (Mode A) or any class of
  TSO-C74c (Mode A with altitude reporting capability) as appropriate,
  or the appropriate class of TSO-C112 (Mode S).

the use of Mode A or Mode C (e.g.: Mode A with altitude reporting capability) is acceptable for flight under Part 91. That covers all of general aviation (GA), of which a large percentage use Mode A/C transponders.
With the upcoming ADS-B mandate, many GA operators are switching to Mode S to get the 1090 MHz ES ADS-B.  But others are keeping the Mode A/C and adding a 978 MHz UAT to meet the ADS-B requirement. In any case, there are still a large number of Mode A/C transponders in use and likely will be the case for quite a while.
Mode S is optional and only required for operations under Parts 121 (Air Carriers) and 135 (Air Taxi).
For Part 121, a Mode S transponder is required by §121.356   Collision avoidance system.
For Part 135, Mode S is required by §135.143   General requirements.


How much time for an orange weapon?

Question: In Dead Island, orange-rarity items spawn in loot drops (e.g., weapon chest) at a high, if not 100% chance (outside of vendors) after a certain amount of time. This information was largely propagated by DeathMule across fora. DeathMule claims that the interval between this guaranteed-orange-weapon-spawn-chance (owsc) is five hours. I feel that this claim draws an arbitrarily high time beyond and rather than the true value. Is it true that it takes exactly five hours or does it take a shorter length of time?
Comment: so what exactly was your question? im a little confused now.
Comment: @Marco He's asking if he can glitch a game to manipulate a bug within the game to his expectations. My answer? **"YES, but you may cause the end of the world by doing so."**
Comment: No, I'm not asking if I can glitch a game. I already know how to. The questions that I ask may be related to glitching, but I could phrase them in such a way to never mention glitching at all. The fact that orange weapons are guaranteed to spawn after a certain amount of time (and only then, outside of vendors) is a fundamental game mechanic which doesn't involve glitching.
Comment: I've removed the secondary question. I asked it because it was esoteric enough not to warrant its own question, but related enough that I figured that I could get it answered as well. Learning about the time-based orange-weapon-spawn-chance and ability to manipulate its repeated spawn in a short time spawn would allow the secondary question to be tested much more easily.
Comment: I've removed the following phrase to avoid my question's association with glitching: "I've confirmed this by manipulating the save/checkpoint system to spawn multiple orange items in a row." It is clear, Ender, that you see my question in a bad light as a result of your misinterpretation. I merely added the phrase to add veracity to the phenomenon that I introduce.
Answer: In my experience, there is no set period of time before the game provides you with an orange-rarity weapon. Across multiple playthroughs I can attest that while the weapon distribution seems random, it generally orients to your character level. At higher character levels your character is more likely to find higher quality weapons in searched containers.
Other than the post you've linked I have not seen any other indicator that weapons are distributed on a timed schedule. If it were true, few players would find more than five orange-tier weapons in a typical playthrough - far less than I've actually collected on playthroughs of my own.
When your character approaches experience levels where they can start regularly finding orange weapons I would claim to find a new one around every 45 to 75 minutes of playtime - a far shorter timeframe than DeathMule states. Regardless, it seems random as I have found two orange-rarity weapons within a ten minute period on more than one occasion.
If you are in search of powerful weapons try making use of skull mods to receive potent developer blueprints, instead.

How much time for an orange weapon?


Diffie Helman obtaining $g^y \bmod p$ from $g^{xy} \bmod p$ and $g^x \bmod p$

Question: This may seem like a strange question. Lets say I have $g^x \bmod p$ and $g^{xy} \bmod p$. How can I efficiently obtain $g^y \bmod p$? I assume I must use modular inverse but I don't know where.
Answer:
Lets say I have $g^x \bmod p$ and $g^{xy} \bmod p$. How can I efficiently obtain $g^y \bmod p$?

We hope that there is no efficient method (without using knowledge of $x$ or $y$)
Here's why: if you can solve that problem, you can solve the (computational) Diffie-Hellman problem; here's how:

Suppose that you did have an Oracle that, given $g, g^x, g^{xy}$, returned $g^y$

Then, you can use that to create an Oracle that, given $h, h^x$, returned $h^{x^{-1}}$
Here's how, you'd call your Oracle with $g=h, g^x=h^x$ and $g^{xy} = h$.  These conditions hold only if $x^{-1} = y$, and so when your Oracle returns $g^y$, that's also $h^{x^{-1}}$

With that Oracle, you can generate a squaring Oracle (given $h, h^x$, return $h^{x^2}$, and with that, computing DH is straight-forward.
Comment: @mathman123123: I don't see how those modifications would change my answer; with the Oracle, it would still be able to compute unmodified DH, so unless you're in a group where DH was weak, it looks impossible


Parallel computing: Distributed systems vs multicore processors?

Question: I was just wondering why there is a need to go through all the trouble of creating distributed systems for massive parallel processing when, we could just create individual machines that support hundreds or thousands of cores/CPUs (or even GPGPUs) per machine?
So basically, why should you do parallel processing over a network of machines when it can rather be done at much lower cost and much more reliably on 1 machine that supports numerous cores?
Answer: I think it is simply cheaper. Those machines are available today, no need of inventing something new.
Next problem will be in complexity of the motherboard, imagine 10 CPUs on one MB - so much links! And if one of those CPUs dies, it could destroy whole machine..
You can write a program for GPGPU of course, but it is not as easy as write it for CPU. There are many limitations, eg. cache per core is really small if any, you can not communicate between cores (or you can, but it is very costly) etc.
Linking many computers is more stable, more scalable and cheaper due to long usage history.
Answer: What Petr said.  As you add cores to an individual machine, communication overhead increases.  If memory is shared between cores then the locking architecture for shared memory, and caching, generates increasingly large overheads.
If you don't have shared memory, then effectively you're working with different machines, even if they're all in the same box.
Hence it's usually better to develop very large scale apps without shared memory.  And usually possible as well - although communications overhead is often still large.
Given that this is the case, there's little use for building highly multicore individual machines - though some do exist e.g. nvidia tesla...


Measures of class separability in classification problems

Question: An example of a good measure of class separability in linear discriminant learners is Fisher's linear discriminant ratio. Are there other useful metrics to determine if feature sets provide good class separation between target variables? In particular, I'm interested in finding good multivariate input attributes for maximizing target class separation and it would be nice to have a non-linear/non-parametric measure to quickly determine if they provide good separability.
Comment: I read about Karhunen Loeve expansion allows using class information for feature extraction. Furthermore, there are extensions to PCA like using the weighted average of class covariance matrices instead of a global matrix. Apart from this information, I am also interested in possible answers to your question.
Answer: Variable Importance Measures (VIMs) from Random Forests might be what you are looking for. A brief overview over two of these is given in a paper Overview of Random Forest Methodology and Practical Guidance with Emphasis on Computational Biology and Bioinformatics by Boulesteix et al.
The idea for the Gini VIM is that you get some statistics of how often a random forest has made use of a certain attribute as the splitting criterion. Informative features are chosen more often here.
The permutation VIM is based on the idea that the error-estimates of the RF-classifier are compared between

the original dataset and
an artificial dataset where values for ONE attribute have been permuted.

The resulting error-estimate-difference will be big for important features.
As far as I remember, VIMs can also be used to discover dependencies between features.
Answer: Finding an optimal features set can be quite computationally expensive. The main categories of available solutions can be grouped in two sets: either bind to a specific classifier (Wrappers) or simple ranking of features based on some criterion (Filter methods).
Based on your requirements (quick/non-parametric/non-linear) probably you need candidates from the Filter methods. There are quite a few examples of those described in literature. For example Information Gain - that evaluates the worth of an attribute by measuring the information gain with respect to the class; or Correlation that evaluates the worth of an attribute based on the correlation between the attribute and the class.
The wrapper methods are bind to a classifier and may end up to a better set of features for the classifier of interest. Due to their nature (full training/testing in each iteration) they can not considered quick or non-parametric, however they can deal with non-linear relations of features (your 3rd requirement). An example would be Recursive Feature Elimination that is based on SVMs, thus targets on maximising the margin between the classes and can deal with non-linear relations of features (using a non-linear kernel).


List of files those are updated in upgrade Magento 2.2.x1 to 2.2.x2

Question: I need to list all the files which are modified as we upgrade Magento 2.2.x1 to 2.2.x2.So that I can figure out the rewrites and the other plugins which I have made are working properly after the upgrade.
Answer:
I have found a workaround to list out the plugins and preferences used in our code by the Magento 2: get a list of all plugins (interceptors) and preferences
 question.

For getting all the available list of plugins:
Go to vendor/magento/framework/Interception/PluginList/PluginList.php find method merge

public function merge(array $config)
  {
     // default code
      echo "
";
      print_r($this->_data);
      die();
  }

- For getting all the available list of preferences:
`vendor/magento/framework/ObjectManager/Config/Mapper/Dom.php` find method `convert`

public function convert($config)
{
    // default code
    echo "
";
    print_r($output);
    die();
}

Though these methods need to improve as it shows all data not only the custom one. Any help appreciated.

And to list down the files which updated during the upgrade I have used the following two methods.
a.) Using git's following command.
 git diff --name-only f3f8975c3f 50f974b0c8 > updated_files_m223_m225.txtHere f3f8975c3f and 50f974b0c8 are commit ids for Magento2.2.3 and Magento2.2.5 respectively.
b.) Using the directory compare software Beyond Compare.


Closet server versus Colo?

Question: As a programmer I need a place to store my stuff. I've been running a server in my parents closet for a long time, but I recently came across a decent 2U server.
I have no experience dealing with hosting companies, beyond the very cheap stuff, and I'm wondering what I should look for in a colo or if I should just keep my closet server.
Answer: There are three major factors here.

Cost.  The colo will obviously be more expensive than sticking a server in your parents' closet.
Quality.  The colo should be a lot more reliable than the server in your parents' closet.  They aren't as likely to go down when there's a power surge.  They should provide some support if things do go wrong on their end.  They will also likely give you better bandwidth.
Convenience.  It is a lot easier to fix a broken box when you can walk over to it and plug up a monitor.  Going to the colo to troubleshoot is probably not going to be convenient, if it's even possible.  Transferring files from your laptop to the server in the closet is also going to be a lot faster than transferring over the Internet.  On the other hand, if it's your box in the closet, you have to deal with the hardware problems, so it can balance out.

Personally, I pay for a (shared) server.  I find that having someone else handle the server is worth it.  Uploading large files can get really frustrating, but having to maintain an extra box in the closet is too much hassle for me.
You really have to decide what you value most.  Is it worth the extra money to you to have a more reliable, more hands-off server?
Answer: If it were my source control server, I would not want to a) pay the added cost, or b)have to drive to the colo because I can't connect to my repository.
Answer: I'd absolutely go for the server that's located under my roof, as long as I don't need it to be connected to the internet with a static IP.
Why:

It's a target for hackers, as soon as it is reachable from the net
Any problems with the machine? I'd rather walk to the closet instead of calling a hotline - and probably pay for the service
Connection speed (from me to the server)
I can turn it off as long as I don't need it. Less power consuption, which is better for the environment.
The hosting of a machine costs money all the time. Even when you don't need it.

Closet server versus Colo?


Building an XNA Game Engine: How to load sprites outside of LoadContent()?

Question: I'd like to build an engine in XNA, primarily for a 2D RPG. At first, I began abstracting out some classes and built a Sprite class which wrapped a Vector2 and a Texture2D, and tried loading in content from the Sprite class' constructor. However, this didn't work. Now, it appears that I have to load all of the sprites within the Game class' LoadContent method. Is there anyway around this? I'd like to separate the actual Game Content from the inner workings of the engine, if possible.
Answer: The LoadContent method is simply called after the graphics device has been initialized. You can load content at any point after that, not just in the LoadContent method.
If you were, for instance, to instantiate your sprite class within the LoadContent method, or within the Draw or Update calls, you wouldn't have any problem.
Now, as far as design goes, having the sprite load the content it needs typically isn't a good idea. To keep with the single responsibility principle, and dependency inversion principle, you might want to accept a Texture2D as a parameter to the Sprite constructor. That way you'll be able to have the same "BadGuy" sprite, but be able to pass it two different textures (for say, a red bad guy and a green bad guy).
Answer: You don't need to load all content within the LoadContent method, you could load it in a method called by that, or at pretty much any time after that (once the GraphicsDevice is set up).
A very simple example might be having a list or similar structure in your game engine, then before loading the user of the engine would add the locations and types of content to load. Then you'd call your engine's LoadContent method from your game's LoadContent method. The engine would then loop through the added resources and load them for use in the engine.
This is of course a simple example, you'd probably need some kind of resource manager to manage loading/unloading/making resources available to what needs them etc.
Answer: Back in the day when I was using XNA I need to load textures at runtime.
I just spent 1hr digging around trying to find this, it uses a stream to read the file from disk and then loads the stream into a texture2d and you can then pass that of to your spritebatch or do what u need with it.
 Dim Texture As Texture2D
 Using FS As New FileStream(imagepath, FileMode.Open, FileAccess.Read)
 FS.Seek(0, SeekOrigin.Begin)
 Texture = Texture2D.FromStream(GraphicsDevice, FS)
 FS.Close()
 End Using

Hope that helps or is close to what u need.
Answer: what if you have this constructor? (i mean, is this possible?)
Sprite(Microsoft.Xna.Framework.Content.ContentManager content){
    Texture2D something = content.Load<Texture2D>("someImages");
}

Comment: Answer if you know, comment if you guess.


End kernel panic - not syncing (amd-vi completion wait loop time out)

Question: Any help is greatly appreciated!
Edit: also forgot to include that launching on my Windows SSD boots perfectly. And the odd time it will launch with hanging at the Mint logo (not sure how to reproduce, seems random as no settings changed just a reboot)
Today I removed my CPU and applied new thermal paste then insert it back in. BIOS appeared as though everything was fine, temps were fine as well. However on launch it appeared with "new cpu installed" then brought me to BIOS.
I simply closed BIOS and proceeded to launch Linux Mint.
I have 2 SSD's in my PC, one has Windows installed which I never use , it was just an old drive.
Upon loading Linux Mint, it appeared with an error saying kernel panic.
My first time installing Linux Mint on the PC was over a year ago. I ran in to some similar issues transitioning from Windows to using Mint. I do not remember exactly how I fixed it as it was some time ago and I spent probably 2-3 days researching and trying different things.
I believe I fixed it by editing the kernel parameters at the time and managed to get it to successfully install.
Ever since, every time I boot Mint it appears with the "amd-vi completion wait loop timed out" for about 15-20 lines and then it appears with the boot logo, then boots fine. This became normal and I was used to it as for years it appeared this way.
Now when booting it appears with the same thing, only instead of booting to Mint it then proceeds to show many lines of text before pausing upon the "end kernel panic"
I have spent 2 days researching and tried many suggestions. I will list a few below.
Attempted to change to "Legacy OPROM" for "Boot Device Control". After booting it brings me straight to BIOS, I assume it does not recognize the drives. So I reverted to "UEFI and Legacy OPROM"
Disabled "SVM Mode" (CPU Virtualization) in CPU configuration. First boot after this it brought me to login screen of Linux Mint, I logged in only for it to appear with my mouse cursor and all black screen. As if nothing was loading. I tried to replicate this and get it back to that point but have not been able to since yesterday.
Tried a long list of different kernel parameters. Most cause it to launch into BusyBox shell.
Tried changing the boot kernel in "advanced options" from GRUB menu. I tried all 5 listed, including the recovery mode version for each. No difference, all bring me to end kernel panic.
(Probably overkill) I changed the kernel parameters for all 5 kernels including recovery mode ones, to see if any of them would work.
I am trying to remember what K had to do in order for Linux Mint to install correctly last year, I believe it was one of the IOMMU kenerl parameters that solved it, but I do not know for sure.
The kernel parameters I attempted were the ones listed here: amd-vi completion wait loop and other errors/messages in my attempt to install Arch Linux on blank SSD
Linux Mint version is 19.3
Kernel versions are: 5.3.0-42, 5.3.0-40, 5.0.0-32, 4.15.0-91, 4.15-0-54
Answer: Solved.
For anyone reading this in the future.
If you can get to the BusyBox shell, I got there from editing the kernel parameters to "IOMMU=off", then you enter the following commands
"Exit"
Will return the location of your filesystem, mine was "/dev/sda2"
Next enter "fsck /dev/sda2 -y"
Replace /dev/sda2 with the location of your filesystem.
After a little time it showed the filesystem was modified and completed. Next reboot. Should work


"Insufficient Storage Space" problem with Titanium Root, preventing backup

Question: I'm in a pickle I have no idea how to fix. I turned off the often suggested "Mount Namespace Separation" option in SU, and it doesn't work with this issue. I uninstalled/ reinstalled Titanium Root, no luck. Restarted the device after toggling off the namespace option, no dice. I have no idea what to do. It's not entirely a loss, as some games will backup just fine, just one brand is being stubborn. The Flutter series, where you collect butterflies and such. They're huge files, and it backs them up for a long while before hitting the memory space issue. It is confirmed and set to the Titanium Backup file on my SD card, where I backed up other games. Any suggestions?
Answer: I have no idea what happened, or how, but I had to use a different browsing method for Titatium Backup. Even though I had selected sdcard/titaniumbackup (example), it wouldn't work even though it was listed as an option. I believe I had to use a different backup storage option, in which it showed me a list. After I selected "SD" from this new interface, it fixed everything and now the weird games will backup.
I apologize for this idiocy of mine. Since only one group of games were acting up, I thought it was something of specific conflicting data.
Answer: Move some of your saved games to the computer to increase the space of your sdcard. Once you finish copying the rest you are joining it in parts.


SharePoint Timer Job not working properly when run on schedule but fine when running manually

Question: I've got a SharePoint timer job that takes a document library and puts the documents, converts them to PDF and puts them into a SQL server every night. Problem is, the timer job doesn't seem to work when it's called on the schedule. If I install it and then using a little console app I wrote, call execute on the job it works properly. When it runs on schedule it doesn't.
The reasons I know the job is running:

The timer job status says that it completed at ~12 minutes past midnight (starts on midnight)
The target database table has been truncated (the job is ment to do this before an export)

The reasons I know something is wrong:

The database is empty and contains no documents. Running it manually fills it with documents
The very first line of code should output to the event log but it doesn't do this once. Running the job manually logs correctly several times. Another timer job to test writing to the log works correctly on this server.

Now I was thinking it's something weird to do with permissions when running under owstimer opposed to a console app. But the fact is, first thing it does is log to the windows event log and this isn't happening but in a timer job that only does this, it does work.  And the truncate code is being hit which is after the event logging which doesn't seem to happen.
Comment: Have you tried debugging the timer job?
Answer: When you run the job via the console app, it is running in the security context of your user.
When the job is run via the timer it is running in the security context of the user running that process.
Check which user is running the timer job, check the rights of that user.
There should be an error in the event log or the sharepoint log files.


Middle-level semantic concept?

Question: What is a middle-level semantic concept? I came across it in a paper that explains how videos on the Web can be annotated more clearly, and I didn't fully understand the term.
Thanks.
Comment: Can you please link to the paper for some context?
Comment: By the way, welcome to StackOverflow, Trista! Keep the questions coming!
Answer: The term comes from a sophisticated approach to automatic image classification known as "Multi-level Semantics." The ultimate goal of this science is to develop software algorithms that are capable of viewing a picture and automatically assigning meaningful labels. The idea (very loosely) involves categorizing a picture hierarchically; that is, the picture is initially assigned a "high-level" semantic meaning (e.g., "crowd" or "outdoor landscape"), and then progressively assigned more meaningful "middle-level" semantics based on feature-recognition within smaller homogeneous regions of the image. A similar approach has been used for years in document classification (for textual categorization and summarization), and is being extended for use with videos as well.
The whole idea is built around the concept of "ontologies", which can basically be thought of as hierarchical classification categories (like the ones we used to use in the early category-based search engines, in which you could drill down into increasingly more specific categories). For a more precise and technical description of this whole topic, you might try to skim this paper: "Ontology-based large-scale image classification, indexing and exploration" (Y. Gao, pgs. 9ff)
Note that I am by no means an expert in this field. You could no doubt get a much more precise and informative answer if you post this question over at the "Signal Processing" stackexchange forum.

Middle-level semantic concept?


How to script number pad key

Question: We use an auto login script using ARD to avoid visiting each station in our lab. Mountain Lion no longer works so that a cursor appears at the login screen. I've tried numerous scripts to activate the cursor to no avail. Pressing 5 on they numerical pad will do it as will a generic mouse down action. To avoid having to do this at each computer, how can I script one of these actions in an osascript?
thank you in advance.
Answer: Try using the key code command:
osascript -e 'tell app "System Events" to key code 87'

See Events.h for the key codes. Here are the key codes for all numpad keys:
65 KeypadDecimal
67 KeypadMultiply
69 KeypadPlus
71 KeypadClear
75 KeypadDivide
76 KeypadEnter
78 KeypadMinus
81 KeypadEquals
82 Keypad0
83 Keypad1
84 Keypad2
85 Keypad3
86 Keypad4
87 Keypad5
88 Keypad6
89 Keypad7
91 Keypad8
92 Keypad9

Comment: Thanks, Lauri. I had tried that and it didn't work. If I control stations one at a time in ARD and press the 5num key it works but not within a script.

How to script number pad key


How can i migrate community builder from joomla 1.0 to joomla2.5

Question: I am migrating my site from joomla 1.0 to joomla 2.5 and facing a critical problem.
I'm using a component named community builder and as I'm getting that its tables field's name are different from the joomla 1.0 . Please can anyone help me and tell me how I can  migrate this component easily?
Answer: You can't directly migrate from Joomla 1.0 to 2.5, however I really can't understand why you are still running such an old version of Joomla.
You will firstly have to migrate to Joomla 1.5. More information on how to do this can be found at the following link:
http://docs.joomla.org/Migrating_from_1.0.x_to_1.5_Stable
Once done, ensure you are running 1.5.26, which is the latest release of the 1.5 series. You will then need to install JUpgrade which is a component that easily migrates your Joomla 1.5 sites to 2.5.
http://extensions.joomla.org/extensions/migration-a-conversion/joomla-migration/11658
Please do note that the migration process only updates core files and extensions. It does not update 3rd party extensions, so you will need to install the version of the extension that is compatible with your Joomla version.
This is going to be a big process, so please also consider starting from scratch as it might turn out to be the easier option.
These might also come in handy for you:

Why should I keep my Joomla version up to date?
Extensions to improve security

Hope this helps


How is the Gamma Quadrant called by its inhabitants?

Question: Gamma Quadrant is a term invented and used by the sentient beings of the Alpha Quadrant - yet, how do the "natives" of the Gamma Quadrant call the area of space they inhabit?
Comment: At the very least unless the "quadrant" designation is based on some unmistakable feature of the reason there is no reason to expect the local even to conceive of it as a unit of reference at all. That is to say if a "quadrant" is a set of map references then it's importance lies only in the map used by the Federation.
Comment: They call it "home".
Comment: I always assumed it was something like how we call something "Western Hemisphere", after choosing an arbitrary line of longitude as zero. The other option is: universal translator magic will take care of the conversion...
Comment: @dmckee Stardates are based off of some sort of galactic reference, so there is a chance quadrants are as well
Comment: Formally, "Number One Best Quadrant in All of The Space". Informally, "Top Left".
Answer: There is no canonical answer to this question. We always hear Dominion characters translated, with their cartographical references translated as well. Unfortunately, the writers never provide even a throw-away line suggesting how Dominion astrocartographers (or, for that matter, Klingon or Romulan ones) might view the galaxy.
Comment: Aside: Star Trek astrocartoraphy is an absurdity. To the degree that a galaxy has 'natural' boundaries, they're the spiral arms and the very large gaps between them. The Federation and all its allies and enemies probably only take up a very small portion of one spiral arm, which makes their tendency to act like they represent an entire quadrant kind of silly. Douglas Adams tells us, "Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is." Star Trek routinely fails to get this right.
Comment: You may think it's a long way down the road to the chemist, but that's peanuts compared to space.
Comment: Technically, they take up a small chunk of the Alpha and Beta quadrants (small enough that they don't even get near the Delta and Gamma quadrants).  The Federation's demarcation line is its capitol, Earth, which lies on the line between the Alpha and Beta quadrants.  The constant usage of "Alpha Quadrant" seems to be a relic of TOS days (IIRC, that was where Earth was), when there were hundreds of "quadrants" splitting up the galaxy.
Answer: In the Deep Space 9 episode "One Little Ship", there is tension between the old breed of Jem'Hadar and the new breed. The distinction between the breeds/generations is where they were born. Those born on the other side of the wormhole are referred to as Gammas, those born on the Federation side are referred to as Alphas. At least in this situation, they seem to have adopted the same terminology the races of the alpha quadrant use.
Why they do this is unexplained -- they may have picked up the terminology from alpha quadrant races, or it may be how the universal translator decides to translate whatever native terminology they have.
Comment: yet that could be the transculturation at work during the translation, e.g. they could be using words for "this side of the hole" and "that side of the hole" and we'd just get them translated in familiar terms.
Comment: Hm..  And their short lifespan would certainly amplify the learning rate as we see it..
Answer: This whole thing reminds me of a great xkcd strip:

The word "West" speaks of a direction relative to one's own location, but in many parts of the world the phrase "the West" has come to be synonymous with a loose collection of nations in Europe and North America; a political entity, more than a geographical one.
So, I suspect, is the case with this talk of Alpha Quadrant vs. Gamma Quadrant: The Alpha Quadrant powers are actually a loose collection of political entities from various parts of the Alpha and Beta Quadrants ... and at least a few Alpha Quadrant governments actually decided to side with the Dominion.
It's quite possible that because their first and foremost contact was with people who referred to this side of the wormhole as "the Alpha Quadrant", the name - or some aspect of it - stuck.  However, as riffraff mentions, we don't actually know how these alien species refer to the Alpha Quadrant powers in their own languages; all we know is that when they speak English, or are heard in English through a universal translator, they appear to say "Alpha Quadrant".
Comment: The subtle racism of the Mercator Projection. Still a problem in the 24th century.


How to enable the semi-transparent mesh that indicates the walls of my room in SteamVR?

Question: I looked up the Knowledge Base page about how to set it up, but it describes a step where I manually designate the area boundaries, and yet I did not see such a step in the Room Setup configuration menu. How do I set up the play area boundaries?
Answer: During Room Setup, you will have 2 options for the kind of room configuration you want to set up:  Room-Scale and Standing Only.

You will only get the option to designate room boundaries in the Room-Scale setup path. It seems that you can't designate walls if you choose the Standing Only path.


Why would a military use hybrid jet-propeller planes?

Question: Hybrid jet-propeller planes in real lift where a weird thing that existed in the 40s & 50s, no type of them ever saw combat use or even limited production. In modern day not even much research is done on them. But what could allow them to see significant military use? The level of technology is near future.
Comment: What is a "hybrid jet-propeller aircraft"? The answers mention the [Republic XF-84H](https://en.wikipedia.org/wiki/Republic_XF-84H_Thunderscreech), but that was an ordinary turboprop aircraft, not any kind of hybrid. (There are many turboprop aircraft in former or current military use, from the [Embraer EMB 314 Super Tucano](https://en.wikipedia.org/wiki/Embraer_EMB_314_Super_Tucano) to the legendary [Tupolev Tu-95](https://en.wikipedia.org/wiki/Tupolev_Tu-95).)
Comment: @OT-64SKOT The problem of a hybrid like XP-81 would be that it is usually more efficient to just take more fuel rather then whole additional engine. At high speed propeller itself becomes major source of drag and may slow you down even if powered, so jet+prop just do not work. You would either use jet engine or turboprop (it is sort of combined jet and prop in single engine)
Comment: @AlexP this is a better example: https://en.wikipedia.org/wiki/Consolidated_Vultee_XP-81
Answer:
what could allow them to see significant military use?

If there was no material enabling the construction of pure, jet only engines, turbo-propellers would become the limit for airplane propulsion, and therefore make this the cutting edge of technology.
They would probably need to be improved from the early prototypes like the Republic XF-84H

The XF-84H was almost certainly the loudest aircraft ever built, earning the nickname "Thunderscreech" as well as the "Mighty Ear Banger". On the ground "run ups", the prototypes could reportedly be heard 25 miles (40 km) away. Unlike standard propellers that turn at subsonic speeds, the outer 24–30 inches (61–76 cm) of the blades on the XF-84H's propeller traveled faster than the speed of sound even at idle thrust, producing a continuous visible sonic boom that radiated laterally from the propellers for hundreds of yards. The shock wave was actually powerful enough to knock a man down; an unfortunate crew chief who was inside a nearby C-47 was severely incapacitated during a 30-minute ground run. Coupled with the already considerable noise from the subsonic aspect of the propeller and the T40's dual turbine sections, the aircraft was notorious for inducing severe nausea and headaches among ground crews. In one report, a Republic engineer suffered a seizure after close range exposure to the shock waves emanating from a powered-up XF-84H.
Answer: Asymmetric Warfare anti stealth
Having just looked up the XF-84H the first thing that springs to mind is a cruise missile.
The JU87 Stuka had a siren mounted under the engine that gave it its infamous scream - adding a psychological effect to dive bombing.
Imagine a warship launching a cruise missile powered this way.  Missiles are normally fired broadside, and the shock waves travel sideways from the direction of flight, which would initially be rocket powered in any case while the wings, props, air intakes and things unfolded, so the crew would be unaffected.
After that this thing would hurtle toward its target at as low an altitude as possible at well over 800kph making the most awful racket, clearly audible to anyone it passed right out to the horizon.  It may even damage structures it passed over directly.
Everybody in the target area knows somebody just had a really bad day.
Provided the opponent was unable to shoot this kind of aircraft down it would be an appalling terror weapon, while being as tactically useful as any other remote/self guided precision weapon system.


Please explain this put option

Question: Earlier today, I purchased 2 put options on GME. The opening price was around $295. The price dropped $30 in 45 minutes to below $265. Why am I not making any money? I looked at all of the put option contract prices and all of them say a loss of 10% today. Please explain.
Comment: What strike are the puts?
Comment: what's the expiry date on the two puts ?
Comment: March 5th is the expire
Answer: I don't know what they are right now because GME is halted but in the past week, bid/ask spreads have been wide for GME options.  That's a small reason why your put  may not be increasing as fast as you'd like.
The major reason is that options gain in value when implied volatility increases and they lose value when implied volatility decreases.  So if there's a large underlying price move in your put's favor (GME drops 30 points) and the put loses money, it's because there was a sharp contraction in implied volatility.
However, given that GME is down $111 when halted, your should be rewarded for your cohones (buying GME options in this environment) if it doesn't rise sharply when trading resumes.
Given the lag in option spreads becoming sane, you can lock in the gain by buying shares if you have the cash to do so.
Comment: I think the 3rd and 4th lines might not be relevant given we don't know strikes/premium paid. Every drop in price decreases IV significantly since everyone seems to be expecting sharp drops for GME, so think 2nd line is the primary cause.
Comment: @HartCO All else being equal, puts gain value when the underlying price drops, regardless of strike or cost. Since IV is the next largest contributor to price, it's the most reasonable explanation for a put dropping when the underlier drops.
Comment: You're correct.  He could have purchased puts when GME was lower (puts were more expensive) and coupled with a huge IV contraction, the gain might be small today and he's net negative.

Please explain this put option


What is the relationship between Raman peaks and phonon vibration modes?

Question: I've seen Raman spectra, such as here, where peaks at certain wavenumbers were identified with phonon vibration modes (TO, LO, TA, LA). What is the relationship behind this, and how could I make such associations? Would the process be different for Raman Spectra involving different types of silicon such as crystalline silicon, amorphous silicon, polycrystalline silicon, etc?
Answer: Raman process can be described as inelastic light scattering - that is, part of the incident photon energy goes into internal degrees of freedom of the scattering medium. By looking at the energy spectrum of scattered photons one can deduce energies of these internal degrees - in your case these are phonon vibration modes.
Identifying modes - i.e. saying whether a peak is TO, LO or some other mode - is not straightforward and usually requires prior knowledge (maybe, someone measured it before) or ab initio calculations.
Comment: Is there any way to gain this prior knowledge by studying certain topics? Or is it strictly found through first hand records of initial calculations? Also, can these phonon vibration modes associated with the peaks explain the existence of certain micro-crystals within a sample? I am getting the impression that the energy of scattered photons at certain wavenumbers in a spectra is unique to certain materials? Thanks!
Comment: The vibration modes depend on the crystal structure so yes, the Raman spectrum is like a fingerprint of a material. I don't think that you can predict exact energies beforehand, but you should be able to tell from the crystal structure, which modes would be visible in Raman spectrum and which not. I know that it is possible for individual molecules.


How can I buy single items from a merchant in NWN?

Question: I'm playing Neverwinter Nights (iOS version, if it matters), the Shadow of Undrentide campaign, and I'd like to buy one ruby from a merchant. However, her inventory is showing two rubies and it seems I can only buy them together. Neither the radial menu nor the inspection option offers the option to split or buy only a single item. Rubies are pricy so I'd rather avoid buying them both (I probably shouldn't have sold them in the first place, but hindsight is 20/20 ...)
Answer: You can't, unfortunately. Items in a merchant's inventory are provided "as-is", including stack count. Normally items sold by the vendor will be singles, except for ammunition, but items you sell to them stay stacked as you've seen. The only way to end up with one ruby would be to buy both, split them, and sell one back (at the normal vendor rate).
As far as I know, this is true for all platforms, versions, and expansions.
Comment: Hmm, I'm playing SoU on PC at the moment and this is really annoying, especially for e.g. magic ammunition, which can be *very* expensive if you have to buy 99 of them at once. Are there no mods that can allow the player to split stacks when purchasing?
Comment: @Time4Tea I'm not aware of any. Mods in NWN can affect objects defined in data (like classes or items) and can change/run scripts, but they can't affect core interface actions like buying and selling.
Comment: Ok, thanks for your reply. Perhaps there is one that can at least replace the 99 stacks with several smaller ones. Will have a look.