In XNA 3.1, is it possible to disable texture filtering?

Question: I want to disable texture filtering (since I'm making a retro-style game where it looks bad if a texture gets filtered like that), but since I'm on XNA 3.1 there seems to be no option to set a SamplerState with SpriteBatch.Begin or anything. Is it possible to do this?
Comment: I'd strongly suggest moving to XNA 4.0.
Comment: Why don't you update at least to 3.1?
Comment: Sorry, i forgot i was actually on 3.1 >.>
Comment: You should also update the question's title to 3.1 so it's clear.
Comment: @AndrewRussel: At this point, I have a nontrivial amount of shader interaction code written, and IIRC it's a pain to convert it. Moreover, I don't even really have room on my HDD right now for VS 2010 :P
Answer: The behaviour of SpriteBatch in XNA before 4.0 is rather ugly. Note that this answer only applies to XNA pre-4.0.
This is a list of render states that SpriteBatch controls (pre-4.0).
When SpriteBatch applies those settings depends on the SpriteSortMode parameter. The only reliable way to modify those settings is with SpriteSortMode.Immediate.
The way this works that, in immediate mode, SpriteBatch will set its render state when you call Begin. Immediately after calling Begin you can set your own render state, before you call SpriteBatch.Draw.
(States that SpriteBatch does not control can be set outside of the Begin/End block.)
The states you want to change (as r2d2rigo mentioned) are:
GraphicsDevice.SamplerStates[0].MagFilter = TextureFilter.Point;
GraphicsDevice.SamplerStates[0].MinFilter = TextureFilter.Point;
GraphicsDevice.SamplerStates[0].MipFilter = TextureFilter.Point;

Answer: Call
GraphicsDevice.SamplerStates[0].MagFilter = TextureFilter.Point;
GraphicsDevice.SamplerStates[0].MinFilter = TextureFilter.Point;
GraphicsDevice.SamplerStates[0].MipFilter = TextureFilter.Point;

before using SpriteBatch.Begin. And remember to restore the values after SpriteBatch.End.
Comment: Not quite right. See my answer for a description of when to set those states.
Answer: This is very possible. You can use a custom shader with spritebatch. The source to the default spritebatch shader is available from the XNA 'education catalog'. What you will need to do is get this shader and change the texture filtering in the shader from linear to point filtering, and then use your new version of the shader with spritebatch. To use it with spritebatch, call spritebatch.Begin, but set the sprite sort mode to immediate (This effectively means no batching). Then, apply the correct technique on your new effect. Then draw your sprites. Spritebatch will draw them immediately with whatever effect is currently applied.
IIRC using a custom shader with spritebatch is far simpler in XNA 4.0.
Comment: While this will actually work, compiling a custom shader is a bit of overkill when you can just change the render state directly.


Changing an objects origin just changes its location

Question: Whenever I try to set the origin of this patch of grass to the 3D cursor all that seams to happen is it moves the object location to the 3D cursor. Whats happening here?
Answer: Changing the origin point wont move the object, it changes where the object is "attached to".
Lets say you wanted to pick up a cup, you can pick it up by the handle, you can pick it up by the tip, you can pick it up by lots of ways. Wherever your skin touches the cup, thats the "origin point".
What are you trying to do with the grass? You can upload the .blend here
http://blend-exchange.giantcowfilms.com/


How can I setup a dev copy of EE before license purchase?

Question: I have built over 70 EE sites in thej last few years.  I noticed now in EE 2.8+ that it is now required to enter a license number even on a local copy.  Is there a new method to allow us to build and test before getting the license?  Maybe like using a .dev or .local domain extension or something?  I have many client licneses I can use if needed, but I do not like that option.  The reason we like to build a bit of the CMS in advance is that we typically we demo it with a client to see if the like the way it works for basic editing.  What do you all do now for your local dev copies of EE?  Is it possible to get a dev license?
Comment: Most people I know have a base install that is ready to go and they duplicate the files and database when starting a new project. They also perform and test upgrades of EE (and add-ons) against this default install.
Answer: We start building before our licenses are purchased. We just put in a random number until we actually get the real license. EE doesn't currently do an authorization call on install to validate your license. We use stuff like: 1234-1234-1234-1234.
Comment: That is awesome.  I will do that on next install.  We have 5 sites in development and we typically purchase at site launch.
Comment: That doesn't mean that the people at ellis labs won't be adding that "feature" soon. If they do, you might need to either just buy the license or use the free version and upgrade later. Also, be sure to mark this question as answered.


How to update data on unrelated components?

Question: So I have two unrelated components on one page. And when items are added\deleted on the first one they need to be displayed in second  component. I use this: eval("$A.get('e.force:refreshView').fire();");
window.location.reload(true); for page reload when data is added\deleted on first component.But it causes some issues. What would you suggest? Thanks
Answer: Have you heard about Lightning Platform Events / message Channels ?
Basically the component that needs to get information can "subscribe" to an event fired by the other components where items get added. This documentation
has the details but if you need a bare bones implementation , i have one here


Restore the original array after merge Sort based on it's steps

Question: i'm trying to write an algorithm to reconstruct the original array from the sorted one. considering input value is a string of 1s and 2s which 1 means in merging part of merge sort, element from left subarray is chosen and 2 means element from right subarray is chosen. how can i do it? specially i have problem on that part that merge sort appends what ever is left from a subarray to final list. for example: it's given 12212 as input string on an array of numbers [1,2,3,4]. it means that there is a permutation of numbers 1 to 4 that if you give it to merge sort, it will give you 12212. that permutation is 2 4 3 1 .
Comment: Cross-posted on SO: https://stackoverflow.com/q/77708297/2402272
Comment: Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068).
Answer: For simplicity I will assume that the number $n$ of elements is a power of $2$. The same idea works in general (by suitably rounding the sub-array sizes according to the implementation of Mergesort at hand).
Let's pretend that, whenever two arrays of size $x$ are merged in the mergesort algorithm, they contribute exactly $2x$ digits to your input "merge string" $m$.
In the last call of the mergesort algorithm the final sorted array $S$ was constructed my merging two sub-arrays $A$ and $B$ with $n/2$ elements each.
These sub-arrays $A$ and $B$ can be recovered by looking at the last $n$ digits of your input "merge string" $m$ and proceeding backwards.
In details, you can start with two empty arrays $A$, $B$ and a string $m_S$ containing the last n digits of $m$ and repeat the following step $n$ times:

Let $x$ be the last digit of $m_S$.
If $s=1$, add the last element $S$ to the beginning of $A$.
Otherwise (if $s=2$), add the last element of $S$ to the beginning of $B$.
Delete the last element of $S$ and the last digit of $m_S$.

Moreover, the remaining digits in $m$ (all but the last $n$ digits) can be (evenly) split into $2$ sub-strings $m_A, m_B$, where $m_A$ (resp. $m_B$) is the "merge string" resulting by using mergesort from sorting the first (resp. second) half of the elements into $A$ (resp. $B$).
Then you can apply the above strategy recursively on the sorted array $A$ with "merge string" $m_A$ and on the sorted array $B$ with "merge string" $m_B$.
Eventually you'll reach a call in which the sorted array is just a single element, which  must coincide with the input of the corresponding call of Mergesort.
A high level pseudocode could be the following:
<code>// Returns the original order of the elements in S
Recover-Array(S, m):
  if |S| == 1:
    Return S

  Decompose m into three parts m_A, m_B, m_S such that |m_A| = |m_B| and |m_S|=|S|
  Split S into A, B according to the digits in m_S (as described above)

  A' = Recover-Array(A, m_A)
  B' = Recover-Array(B, m_B)

  return the concatenation of A' and B'
</code>
Let's now consider the case in which the merge operation of mergesort stops contributing digits to the merge string as soon as all the elements from one of the two input arrays are merged (since the leftover elements in the other array can simply be appended to the output).
Once all complete merge strings for all the recursive calls of Mergesort are known then you can also recover the original array using an approach similar to the previous one.
In order to recover the complete merge strings imagine visiting the recursion tree of mergesort in postorder (i.e., you start with the leftmost leaf, then visit its sibling, then their parent, etc). This is exactly the order in which merges are performed.
Whenever you visit a generic internal node $u$ whose subtree has height $h$, the corresponding merge procedure of Mergesort merged two arrays $A$ and $B$ of size $2^{h-1}$ into an array $S$ of size $2^{h}$ and appended a contiguous sequence of bits, which we will call a trace, to the our input merge string. (Leafs have empty traces).
The idea is that, when $u$ is visited, we will have already recovered the complete merge strings for all its proper descendants and we will also have removed the bits corresponding to their traces from the input merge string. In this way the current fist digit of the merge string corresponds to the first decision taken by the merge procedure for $u$'s call.
To recover the complete merge string $m_u$ for an internal node $u$ find the shortest prefix $m_S$ of the current merge string that has either $2^{h-1}$ ones, or $2^{h-1}$ twos. This corresponds to the comparisons performed to merge all elements from one of $A$ and $B$ into $S$, i.e., $m'_u$ is exactly the trace for $u$'s call. To complete it into $m_u$, it suffices to add the missing $2^h - |m'_u|$ digits as a suffix (which corresponds to copying the leftover array). Then, we delete the trace $m'_u$  of $u$ from the input merge string and continue with the postorder visit.
Comment: Your strategy for recovering the complete $m_s$ does not look right to me.  The substring ${m'}_s$ determined as you describe does not necessarily correspond to the start of a merge.  To complete it, it might be necessary both to append absent digits *and* to include additional preceding digits.  For example, in a 2+2 merge, you might have a trace 1, 2, 2, , but your approach will mistake that for (1 from a previous trace), 2, 2, , .
Comment: i think your algorithm doesn't cover situations where one of subarrays left or right just got appended to list. So to split m to ma and mb, one of them can be much less and ma! =mb. If it does, can you elaborate more? How does full psudocode look like?
Comment: @JohnBollinger you are right. Thank you! I edited my answer to reconstruct the complete traces from the beginning of the string, which avoids this ambiguity.


Is there a trick to the right exposure for sky photos?

Question: I am a new photographer and have had some lessons in photography.  I understand how to shoot in manual, but the hardest part for me is outdoor shoots against a bright sky.  I have been taught to meter on the subject, preferably on a neutral area.  I was shooting some hot air balloons a couple of weeks ago and no matter what, I was getting under exposed shots.  Now it took me a few shots to get the right exposure by moving my shutter speed down, but I guess I feel I should be able to get the right exposure in maybe 2 shots, not 4 or 5.  I just wonder if there is a trick to this or is it something that I will gain with more experience.  Or does it sometimes take a few shots to get it right?
Comment: This is very related: [What camera settings should be used to capture sky shots without over exposing the clouds?](http://photo.stackexchange.com/questions/15204/what-camera-settings-should-be-used-to-capture-sky-shots-without-over-exposing-t).
Comment: Your camera measures reflected light, like all cameras it is trying to correctly expose by measuring light and making calculations for that amount of light to be 18% gray, when you have a really bright sky the camera is calculating the amount of light and getting it to 18% gray, If you are shooting manual you can try incrementing by 1 stop,  or whatever, when you get more experience this will be very fast just by looking at the scene.
Answer: Generally it should be possible to nail the exposure on the first try, the old analog masters did it, too.
When you're metering a small, far away object, the metered area will be much larger than the object and you get a lot of sky metered, consequently.
I like the concept of Ansel Adams' Zone System for this:
You have to use spot metering for this, if you camera provides this function with a narrow enough spot.
Or, you can meter against the sky, remembering that the sky could need to come out a lot brighter than neutral in the image, depending on the weather. A deep blue sky is actually close to neutral, for a white sky dial in some +EV exposure compensation.
If your subjects are in shadow (you are shooting the balloons against the light), you'll need to overexpose, too, probably ~ +2EV to lift the sky to zone VII (still detailed).
The trick to the zone system is to meter against something and then adjust +-EV to lift/lower that subject to the desired zone. Neutral grey is V, zone II is barely discernable dark, zone VIII is nearly pure white.
Comment: Closer to +3EV if shooting raw, because most of the exposure meters in cameras are calibrated in such a way that the midpoint is somewhere between 9% and 13%. Normally, spot-meter from the brightest area where you want to keep the details, add +3EEV, and shoot raw. However if the range between the important shadows and important highlights is more than 7 EV, stop and think.
Comment: 2EV seems about right for my 600D, 3 would be ETTR already.
Comment: 600D in raw brings midpoint to 3.3 EV below saturation.
Answer: Try using a polarizing filter over your camera lens. You will have to test different areas of the sky to determine the best angle for the deepest blue while dialing your filter for effect. You'll see the sky darken/lighten as you turn the filter ring. Once established, your exposure should work on auto. You'll also get richer colors on the balloons, landscape, etc.


Anatomically Correct Pacman

Question: Imagine a spherical creature the size of a 18 wheeler without the trailer, how does it moves in search for mates? Would rolling around be easier and consume less energy than bouncing or wiggling? How can it prevents from feeling giddy when it rolls to safety in a short burst and keeping balance on level ground? Last but not least how does it prevents itself from losing too much fluid due to the surface area vs it's mass?
Comment: I'm voting to close this question because Pacman is a commercial third party intellectual property. WB.SE isn't for satisfying idle curiosity about other people's work.
Comment: It slides along on a trail of slime, like a snail...
Comment: "*how does it prevents itself from losing too much fluid*" it keeps eating these hydrating pellets :P
Comment: yes, there are 4 races and each have their own personalities also they can be shy at times by blushing spasmodically... in case one should ask.
Comment: The title Anatomically correct is kinda misused here. You are not asking how such a creature can happen...
Answer: A spherical creature can move by tilting its balance. It simply needs to contract its muscles to shift some of its mass, the resulting imbalance creates movement due to gravity pulling the creature. By repeatedly doing this your spherical creature can accumulate speed by barely moving.
A spherical creature needs proper grip on its terrain. For reference look at the way earthworms move. Their segments are lined with setae (small bristles) that grip on the ground while they slide forward. By using this method your creature can grip a surface and and tilt its body to grip somewhere else and move. This also serves to stay still and grab objects.
Rolling is indeed very energy efficient, however it only works on stable ground. You can roll down a hill but climbing it would be very difficult.
Rolling requires proper balance and since your creature is made for rolling it would not feel dizzy. In fact its sense of equilibrium will probably be very developed. We sense our center of gravity using the vestibular apparatus in our inner ear.
Its mass is greater than its surface area so it won't lose fluid. Due to the square cube law if its size increases two fold its mass increases three fold. Since your creature is spherical it has the smallest surface area possible. The only real risk of losing fluid is spilling its guts, sweating or bleeding.

Anatomically Correct Pacman


Adding shared fields to a Sharepoint Calendar to sync with an Outlook Calendar

Question: I have set up MOSS 2007 Enterprise with a Calendar that I added to custom columns to. We have synced this calendar in Outlook, and it works great creating and editing events from either Sharepoint or Outlook. The issue is that I want to be able to add two extra fields to the New Event form in Outlook that I have added to the Sharepoint Calendar. I went into Outlook's Form Designer. I go to the second tab to add the extra data fields, but I can't figure out how to be able to map to those two extra fields for the Sharepoint calendar. What's the best way to solve my problem?
Comment: AFAIK you cannot, but I would love to hear a solution...
Answer: Toni is right, and this is not possible. See this kb article for more info. It is talking about task lists, but it applies to other list types as well:
http://support.microsoft.com/kb/920278
You can remap "other columns" as the article suggests. In my testing, I've only been able to get the Categories column to remap, but have seen other people talk about using other columns:
http://www.grailboy.blogspot.com/2008/07/display-sharepoint-custom-columns-in.html
Answer: You can try the third party product for Outlook called ProperSync. It exposes custom columns for task and calendar items in Outlook. You can find it at http://www.propersync.com.


How do I hijack an Atlas?

Question: How do I hijack an Atlas?
I have managed to shatter the cockpit glass but I do not see any option to hijack it when I get in close and it blows if I kill the pilot.
Comment: I'll note that you *can't* hijack the first Atlas in the Grissom Academy level! You can only hijack the ones in the last area, after you're given the empty atlas to steal. Spent over an hour trying. If you kill the pilot in the early atlases, the Atlas blows up, ALWAYS. Extremely frustrating.
Answer: If it blows up you damaged the Atlas too much. You need to both shatter the cockpit and kill the pilot, you'll see no prompt to hijack it before you kill the pilot.
I'd try to kill the pilot with a lower damage weapon, to avoid blowing up the mech at that point. An upgraded high-damage sniper rifle might deal to much damage at once for this to work.
Comment: I've unloaded 9 Black Widow X shots to an unshielded Atlas cockpit on Insanity and it didn't break. Am I doing it wrong?
Comment: Ok, 5 shots with the Widox X, the most powerful sniper rifle in the game - still no luck. Do I need to shoot precisely at the pilot's head?
Comment: @Kotekzot you have to get rid of the shields first, and then fire a few shots at the glowing dome where the pilot sits.
Comment: @yx. That's what I was doing without success.
Comment: I managed to do this but the Atlas ended up being in poor condition and blew up after being hit a few times.
Comment: The best way to keep the Atlas in good shape is when a Cerberus engineer is near. When the mech's shields are gone, just shoot the glass of the cockpit and wait for the repairs.
Answer: I found that with 3 shots with the black widow V with pierce IV and extended barrel IV while under adrenaline rush will kill the pilot and shatter the glass and only drop about 1/12th of the mechs health. (this is all after the shields have been dropped)
Comment: pretty sure you don't need the pierce mod since the black widow has inherent piercing properties
Answer: You need to use the Graal Spike Thrower V.  Make sure you aim for the cockpit.  I shot it about 4 times after the shields were down.

How do I hijack an Atlas?


Google chrome cannot work properly in windows remote desktop?

Question: I want to run only google chrome program in remote desktop, so I set the program path and filename to chrome.exe as follows:
Program Path And FileName:
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Start Path:
C:\Program Files (x86)\Google\Chrome\Application\
please refer to the following picture for more details:
program settings of Remote Desktop
After connnecting successfully to remote windows server, chrome started, but it cannot work, no matter what website I type, there is no response.
chrome does not work
Any advice is appreciated. Thanks in advance.
Note:

If I use Internet Explorer instead of chrome in the same way, everytings is ok.
If I unset the program settins in remote desktop above, connect to remote server and then run chrome, it works.
Answer: "%SYSTEMDRIVE%\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-no-sandbox-job


Where can this FAQ be found on an official site?

Question: On this site, there is a list of crayon rail games FAQ and accompanying answers, presumably from Mayfair games.  I don't want to doubt the authenticity of that list.  Rather, I'd like confirmation that the information given in there really is from Mayfair Games.  Ideally, I'd like an FAQ from an official source, but confirmation that this is really from Mayfair would work.
Answer: There doesn't seem to be any information about why the FAQ is being hosted at the fan site, and not at Mayfair Games itself, but there are several circumstantial pieces of evidence.

Mayfair Games don't have a FAQ for Empire Builder.
Mayfair Games links to the fan site (implying endorsement) from their official Empire Builder page.
That site is also the developer of the official computer version (i.e. licensed from Mayfair Games).
The resources for the game are comprehensive. It's unlikely they would make the FAQ up and then claim it was from the publisher.
There is another FAQ on the same site which indicates it is the set of rules by which the largest tournaments are played. That argues that this site is indeed the keeper of the de-facto most "official" FAQ.

For completeness, I did do some digging in the Internet Archive for a FAQ from 2008 hosted at Mayfair Games, but found nothing.
Interesting question. The linked FAQs look detailed and helpful. Now I'm curious as to why you require proof of provenance.
Comment: I guess I don't _require_ it, I just really wanted confirmation, which you helped provide.  In particular, the way I play involves only being able to build out of a major city for free ONCE, so that is potentially a big change.
Comment: The 1988 rules clearly say: "A player may not build more than two track sections from a major city mileposts during one turn."   So your play is wrong to start with.


What User permission required to upload chatter images?

Question: I am looking for profile permission to upload chatter images for other users.
Answer: The answer is "it depends" on how the file is shared and on what permissions a user already has in your organization. This help page, File Sharing Settings and Permissions probably explains it best.
There are three permissions that will allow you to upload files to chatter to share with others. The most basic is Chatter Internal User. Two others are "Deliver Uploaded Files and Personal Content" plus one called "Create and Share Links to Chatter Files". For a more extensive list of permissions, see What does each permission on a user's profile mean?


Update android application using OTA

Question: I am having my own apps store where all android applications are hosted. Some apps are modified. So How i can send updates to clients/users using OTA. So clients will come to know about new updates and he will be able to download it.
Answer: Found an interesting solution on HN a month back. This is related directly update the app on the client without any user interaction. And since you have your own app store, shouldn't face any problems as listed in the HN thread.
The solution working snippets from the website-

...intercepts all calls to startActivityForResult, getResources, and some other functions. When you try to start an activity, Evolve generates a dummy class and sets its superclass to the activity you want to start.
...dynamically generates the bytecode for a new class
...then changes the intent to start the appropriate class

This is still in alpha mode, so would require some effort from your side to integrate.
Link to solution - http://blog.vivekpanyam.com/evolve-seamlessly-deploy-android-apps-to-users
Assuming this is what you are expecting, hope this helps!
Comment: I think this is REALLY awesome! Unfortunately, we can't use it for Google Playstore apps, and the implementation seems to download the entire updated apk. I wonder if it's possible to just download a bunch of .java classes and dynamically compile them on the fly, or bytestream the new code into the old .java files located in the old apk file (although I worry this might need one to recompile the apk)
Answer: 1.Create a Web Service which your app can poll whenever the app launches or based on some time limit that can check if there is new version out there.
2.This Web service should return the lastest Version of the apk file that is hosted on the Server along with the URI of the application file that has the new version.
3.When your app gets the response from the Web Service, it will parse the JSON and check your app version to the lastest version that is available on the server.
4 If your app version is lower than the latest version it will prompt the user to start the download process.
5.The download of the new app is handled by the Download Manager.
The download manager will notify your app using Broadcast receiver when the download is complete.
6.Upon completion of the latest version of the application file the you can start the activity to install that file.
At this point user needs to say OKAY, lets do it.
 Check this https://code.google.com/p/auto-update-apk-client/
Comment: I done same way as you mentioned but in this case client apps every time checks whether there update is available or not when it started. I want to notify client only if update is available by using OTA (Over the air).
Comment: that is a simple logic. send one Boolean value with the server if the update is there
Answer: If you have your own app store, then you must have a client app running on the relevant devices that allows them to install/update apps from that app store.
As part of that client, you can have a service, that enumerates the installed apps on the device and checks with your store whether updates are available.  If yes, then it presents the user with a prompt to visit the store to update the corresponding apps - or do whatever else is appropriate in the situation.
You may also want to register this service to receive broadcasts of network connection events so that if there is no internet connection, the service will receive a notification when the connection is available again.

Update android application using OTA


Should my live-in significant other and I both have renter's insurance?

Question: My significant other and I both have our names on the lease for our shared apartment. We are not married. She has a renter's insurance policy that she claims is enough to cover both her belongings and mine (I'm not 100% sure on this, I would have to thoroughly evaluate everything we own and verify that her policy covers all of it). Our apartment requires renter's insurance but they seemed satisfied that only one of us had a policy. Should I get my own renter's insurance policy anyway to protect myself or is this a waste of money?
Comment: Is your name on her policy as an insured party?
Comment: I'm fine with the pronoun change; I was initially confused over the reference to "nuptials" in the answer where no such relationship was hinted in the modified question. (Maybe it was never relevant, but editing a question to invalidate an existing answer is generally frowned up.) (And I think in this case, what is a good answer for platonic roommates may not be as good for a couple in a committed relationship.)
Comment: Probably not. I will have to ask her about this.
Comment: I've rolled back the changes made to the question over the last few months, as they don't seem to provide any substantial difference to the question but made some references in the 8-year-old answer confusing.
Comment: @chepner FWIW, my guess was that OP may have made the recent pronoun edits out of respect (even in a pseudonymous forum) for someone who's transitioned since the question was originally written.
Answer: The apartment complex is satisfied because they have a clear company to go to in case of a problem.  However, this has nothing at all to do with your belongings.
Renters insurance will cover the people listed on the policy.  If you aren't listed, then you and your stuff isn't covered.
It's better for you to acquire your own policy.  As she has her own, you wouldn't need to include her.  Once nuptials are tied (if ever) then consolidate.  However, you two break it off then, well, this is one less thing to worry about.
Comment: If she sets his crap on fire, she's liable in both civil and criminal courts, so I reject your worst-case scenario.
Comment: @jared: That was the "messy" part.  I'm sure that she would be found guilty/held liable.  However the legal cost to the OP could exceed the value of the destroyed items.  Never mind that it would take a long time.  With insurance, the payout would be very quick.
Comment: Each renter's insurance policy will cost around $120 for the year, so it feels like it's a waste for both folks to get their own policy. Isn't it possible for both folks to chip in $60 each for the one renter's policy, and on that policy making sure both individuals are Named Insured, or one is Named Insured and the other is Additional Insured? It should be easy enough to cancel and get a refund of the unused months if anything changes mid-term.


What is this wire clamped between my cold and hot water pipes?

Question: What is this black "wire" type thing clamped between my cold and hot water pipe? What is its purpose?
Answer: It is a ground cable. It completes the ground between the hot and cold water pipes.
The ground path through the water heater might not be complete. This cable will make sure there is a ground path between hot and cold water pipes.
Comment: With copper plumbing, the plumbing unions on the top of the water heater are usually dielectric to avoid galvanic action where the copper and steel pipes are joined. These fittings would electrically insulate the joint so the building codes usually require a bonding jumper across the hot and cold pipes near the water heater.
Comment: @KoKo: with metal pipes it doesn't matter where the ground is, as long as it's connected all the pipes are grounded.


Mass of the particle and gravitational field

Question: Which mass of the particle is the source of gravitational field? If we define mass as a pole of the propagator, and calculate loop corrections to the pole we get infinities. Now the way we get rid of these infinities defines what is our renormalized propagator and what is its pole. What is the mass of the particle is dependent on which renormalization scheme we choose. Now, gravity field knows about everything that happens to the particle (as any energy gravitates), all contributions of whatever virtual particles contribute to the mass of particle (up to very short distances).
Comment: If you have a soft graviton emission from a particle, and the particle fluctuates into other stuff, you must also include the soft graviton emmission from the fluctuations, and you get the same soft-graviton emission as from the physical mass, because the energy momentum is conserved at each vertex. The graviton couples to a conserved energy-momentum. So the answer is that gravitons don't care what procedure you use, whatever the physical masses end up being, these will source the overall field. The source of gravity is energy-momentum, not the scalar mass, so the pole position is immaterial.
Answer: Classically, the source of the gravitational field is the energy momentum tensor $T_{\mu\nu}$.  In the absence of a full quantum theory of gravity, a semiclassical approach is  often taken, whereby the source of the gravitational field is the expectation value $\langle T_{\mu\nu}\rangle$.  The procedure is quite tricky to carry out though, because $T_{\mu\nu}$ generally contains products of fields, and in the quantum case we would then be evaluating an expectation value of operators at the same spacetime point, with the obvious problem that causes.  There are various schemes for handling this, discussed, for example here.
Edit: Here is an online reference talking about the semiclassical approach.
As these references point out, even the definition of a particle is not trivial in curved spacetime.
Answer: The correct answer is "observable mass".
Renormalization can be used to get rid of infinities, but it provides no answer about the values of observable masses. And the problem is not in using different renormalization schemes. One can use the same scheme for electron and muon, and it is known from experiment that the result must be different.


Why is Query Store missing details?

Question: This is slightly complex to explain, but very easy to reproduce.
Short version:
For about 10%-30% queries (by count) significant amounts of Query Store data is not available. I have looked at SQL 2016 and SQL 2017 where Query store had been running for weeks+, where there was activity on the database(s).
The query below will return two sets of data, the top set does not have a value for query_store_query.last_execution_time, while the bottom set does have data in the field.  The 'have nots' are also missing most the run time stats data.
EXEC sp_query_store_flush_db;  --Same results without this, but just to rule it out in the examples.
go
Select * from sys.query_store_query
where query_store_query.last_execution_time is null -- there are bunch of these, also missing other data, why?

Select * from sys.query_store_query
where query_store_query.last_execution_time is not null

Problem Solving:

I Initially discovered this using exported Query Store data My data is in an Excel sheet, I sorted and compared and did not find any common factors separating the 'haves' from the 'have nots'
To rule out data export issues, I used the code above to get data directly from the system dataview.  Similar results to findings in exported data.
To rule out the system dataview, I used "Tracked Queries" to report from the root data. (Query Store > Tracked queries > Configure)
3.A. For the 'haves', the query plan(s) and such are displayed, just as you would expect
3.B. For the 'have nots', there is no query plan and no metrics
The only scope limiting factor I have found is that on very active databases, the 'have nots' are limited to the last few hours.  But on slow databases, the 'have nots' can have initial_compile_start_time dating back several weeks.  (I suspect the 'have nots' are being purged then recreated the next time the now "Never seen before, new" query is run)
The 'have nots' can have any range of compile counts, number of plans, etc.

Question
What do the 'have nots' have in common? Why are they missing data when others are not?
Why this matters: If as I currently suspect, the run time data is not being captured correctly on the 'have nots' some/all of the most resource intensive queries may not be reported in query store reports.
Update: Query Store Capture Mode All does not eliminate this issue.
Using the suggested setting by Erin Stellato I have Query Store Capture Mode set to Auto, as pointed out in a comment and answer this could be the cause. But after testing (purged the QS on one of my database and set it to ALL), I am still seeing some 'have nots' after the database has run for a while
Answer: I see this on my SQL Server 2016 instance as well (same settings as yours: 15 min data flush, and 1 hour stats collection).  I noticed that the plans with missing information correlated with AG failovers and maintenance-related reboots (which I found by looking in the SQL Server error log).
If you are following the best practices related to "mission critical servers" like I am, you may have taken these steps:

Use trace flags on mission critical servers
The global trace flags 7745 and 7752 can be used to improve availability of databases using Query Store. For more information, refer to Trace Flags.

Trace flag 7745 will prevent the default behavior where Query Store writes data to disk before SQL Server can be shut down. This means that Query Store data that has been collected but not been yet persisted to disk will be lost.

Trace flag 7752 enables asynchronous load of Query Store. This allows a database to become online and queries to be executed before the Query Store has been fully recovered. The default behavior is to do synchoronous load of Query Store. The default behavior prevents queries from executing before the Query Store has been recovered but also prevents any queries from being missed in the data collection.

This explains all of the missing runtime stats in my setup.  While it's not explicitly called out in this article, it appears that the queries and plans might get into the query store without aggregated runtime stats.  This might vary based on your "Data Flush Interval" and "Statistics Collection Interval."
Answer: TL:DR It happens, it is not unusual, it is by design.

An answer and a comment, that are both no longer present here, suggested that setting the Query Store Capture Mode to Auto might cause this behavior.  I can validate that setting to ALL does not eliminate the issues, it is unclear from available documentation and testing if 'insignificant queries' get any entry in sys.query_store_query.

Auto - Infrequent queries and queries with insignificant compile and execution duration are ignored. Thresholds for execution count, compile and runtime duration are internally determined. Source

I have validated that it can be at least partially related to the 'Data Flush Interval' as per answer by Josh in the example below I ran EXEC sp_query_store_flush_db in a single execute with the two quiries, Query_id  "213" is reported both without AND with a last_execution_time

I have also validated that it is also at least partially related to "AG failovers and maintenance-related reboots" as per the answer by Josh
It is possible that some data is purged due to lack of space. You can check current the Query Store size and limit with the query below, in my case I am using 871MB of 1000MB, it is unlikely lack of space is the issue.

SELECT current_storage_size_mb, max_storage_size_mb FROM sys.database_query_store_options;

A large percentage of the 'have nots' include an INSERT or Index modification. Both of which could lead to a recompile.

One hypothesis is that a query that leads to a recompile does not get fully tracked, and impacted queries lose part of their tracking pending the recompile on next run.

It does this by dropping the existing plan from the procedure cache forcing a new plan to be created the next time that the procedure or trigger is run. Source

There are multiple reasons query plans are flushed from the cache see Parameterized Plan Flushed & Can a plan "age" reach zero? On closer review the majority of the plans missing data seem to meet one or more criteria that could result in flushing. At the sametime, there are very similar queries that keep their plans.

My final hypothesis is that plans are flushed as part of standard recomple scenarios, with loss of Query Store data, this is by design. The exact mechanism of how some data is kept and other data is lost, is unclear. It happens, it is not unusual, it is by design.
NOTE: Query Store is reporting times in UTC, error logs are in local times.
Comment: Great follow through and analysis on this answer!  I don't know if this is helpful in your research, but I thought [this post](https://www.sqlskills.com/blogs/erin/queries-with-recompile-and-query-store/) from Erin Stellato was interesting in that it shows that queries that *never even get cached* (because of a `RECOMPILE` hint) can make it into the Query Store with runtime stats.

Why is Query Store missing details?


How to display all of my running EC2 instances

Question: I switch to different regions frequently and sometimes I forget to turn off my running instance from a different region. I there a way (a website provided by Amazon?) to display all the running instances regardless of region?
Answer: You can find all your running instances regardless of region and the cost they incur by going to the Account Activity page of your management console.
That dashboard is not real time and does not show one line per instance but it should help if you forget to turn off running instances.
Comment: The link now seems to redirect to the Billing Management Console: https://console.aws.amazon.com/billing/home?#


Can withers be created in a mushroom biome?

Question: I'm currently playing Minecraft on a factions server where raiding is a pretty common occurrence. Obsidian is an effective defense against tnt and creepers, but a wither can still get through it. Would building my next obsidian base in a mushroom biome force enemy players to spawn a wither far away and lure it to my base, or can one be built in a mushroom biome?
Answer: Well, when it comes to this kind of questions, the best way is to try...

And the answer is yes.
P.S. No mooshrooms were harmed when conducting this experiment.
Comment: `No mooshrooms were harmed` - I don't believe you...
Comment: @fredley I quit and deleted the world before the Wither's health bar is full. Unless you count deleting world as harming them...
Comment: @AlvinWong You monster!
Comment: @AlvinWong idiot.
Answer: Withers can be built anywhere. The only things to observe is that the last block cannot be placed in soul sand and that it cannot be assembled by pistons.
Answer: Sadly, yes you can build withers in the mooshroom biome.
Comment: Sadly? Why sadly?
Answer: Yes. You can make withers anywhere.
Comment: how is this different from the other answer?
Comment: Welcome to the site @Gamehacker19, as good practice, you should not supply a duplicate answer to an already answered question, unless your answer contains more detail (testing, links to information, photos)


Unique IDs for Post Types and Taxonomies

Question: Sometimes I have duplicate IDs between Post Types and Taxonomies, I know this happens because they are stored in different tables but I wish it was possible to have a unique ID for each thing in WP, is there a way to achieve this?
Comment: Which columns specifically are you referring to? I understand `wp_posts.ID` is one, but what is the other? Also, can you explain your use case here? I can't think of any reasonable means to do this, and I can't think of a reason to _want_ to do this.
Comment: @phatskat the tables I am referring to are wp_posts and wp_terms, the use case is for a translation meta-box that I show on both post and term screens. For each language the meta-box shows a select field where I can indicate which is the translation for that particular language. The select field is populated by terms on term admin screens and by posts on post admin screens. On the frontend I need to show a language switch, this would take the queried object id and show the link to the corresponding translated object.
Comment: I think you should try restructuring your data. Maybe create a posts_translation table and a terms_translation table. The columns for each would be `id | type | language | translation`. Then when you make a translation, add a row for the given object ID and type (e.g. ID = 20, type = post or ID = 1001, type = term), translation, and language. When the language changes, use that reference table to pull the translated values. There are also plugins for this kind of thing. Beyond that, you should show what you've tried and where you're stuck if you want to get any useful answers.
Comment: @phatskat that's an interesting approach, thanks. I just realized I can distinguish the query type by using get_queried_object() and get_class(), this would return either WP_Term or WP_Post, not unique IDs but at least I can tell each other apart...
Answer: The only way I could think to achieve this would be to query the DB and build a list of ids, then check to make sure none of the ids match, but that might be a very taxing query. You would also need to change the way the id's for each table would be updated which could get a bit messy, but I believe it's possible it would just take quite a bit of effort.
You might be able to use something like: https://developer.wordpress.org/reference/functions/wp_unique_id/ to increment your unique ids, but this will probably take a lot of effort.


Ubuntu 16.04 LTS for Pi3

Question: I'm still struggling to get Ubuntu 16.04 LTS on my Pi3. Official images don't work. Where did you find the image: ubuntu-minimal-16.04-server-armhf-raspberry-pi.img.xz? Or, have you found a different 16.04 LTS image that works?
Answer: I found this link and the ubuntu-16.04-preinstalled-server-armhf+raspi3.img.xz image got properly installed in Raspberry pi 3. One thing to note is that it is a server image so no UI will be there by default.
I took an empty SD card and then use the instructions mentioned in the same page for "Making a microSDHC". After rebooting it started with ubuntu with kernel version 4.4.0-1009-raspi2.

Ubuntu 16.04 LTS for Pi3


Within same regex expression , performing multiple regex operations

Question: How can i perform a new regex operation to a regex group , all within same regex expression ?
"Nested Regex Operations maybe?"
Greetings , i kind of understand how regex works but i havent been able to perform this operation yet using regex , which i can do with c# combined with regex.
As in example.
"The quick 1234brown fox jumps over the lazy 1234dog"
The regex   (quick 1234brown fox jumps over the lazy)
yields to "quick 1234brown fox jumps over the lazy"
And im looking for that "1234" . From that first result.
Like
Using regex (1234)  to "quick 1234brown fox jumps over the lazy"
Which will return "1234".

In c# im able to make this work by using regex multiple times.
<code>    string test_string = "The quick 1234brown fox jumps over the lazy 1234dog";
    string clipped_text = "";
    string end_result = "";

    var match = Regex.Match(test_string, "quick 1234brown fox jumps over the lazy", RegexOptions.Singleline);
    if (match.Success)
    {
        clipped_text = match.Value;

        match = Regex.Match(clipped_text, "1234", RegexOptions.Singleline);
        if (match.Success)
            end_result = match.Value;
    }
</code>

I want to do the same thing with just one regex expression.
Of course , the example is very simple and can be done with /w .* [] etc, other basic regex rules.
But i had to simplify my example down to this level , in order to get a clear answer.
Assuming the above c# example regexes itself again , i face situations where i need to regex the result multiple times more .
Obviously this comes from being a c# programmer and im not very familiar with regex yet but im learning.
In my confusion , i got stuck and currently i cant go any further with tutorials without frying my brain.
So any help about how to solve this in a nested regexes way will be greatly appreciated, thank you very much !
Comment: I am not sure what you are specifically trying to achieve? Are you looking for a number that repeats further in the same string? Requiring a *back-reference*?
Answer: From your description it sounds like you need to use the backreference construct
Backreference Construct :MSDN
There are examples in the linked page. Using this you can refer to repeated occurrences of a substring within a string.


Fetching Facebook Status updates using NodeJS

Question: I want to Fetch  Every Facebook Status update i make from my Fb Account  using NodeJS and print it in my console ...Can this process be event driven,Is there a way wherein a event is generated and the NodeJs server is notified when a new facebook status update is made without polling for it  ???
Answer: This sounds to me like a webhook is what you are looking for. I do not know whether or not Facebook offers webhooks. If they do, that should be your solution.


Closest packing of equal balls in $\Bbb{R}^4$

Question: I know how to find the closest packing of equal spheres in $\Bbb{R}^3$.  I'd like to know how to find the closest packing of equal balls in $\Bbb{R}^4$ with the standard Euclidian metric.  I suspect it's going to be something like the $\Bbb{R}^3$ FCC or HCP packing layered in hyperplane 'slices', but I'm having a hard time formulating an equation that I can use to compute the central points for the balls.
Comment: The densest 4-d lattice packing is achieved by the lattice $D_4$ which can be constructed by taking the integer lattice and include only those points whose coordinates sum to an even number:

$$D_4 = \big\{ (x,y,z,w) \in \mathbb{Z}^4 : x+y+z+w \equiv 0 \pmod 2 \big\}$$

Its optimality is established by Korkine and Zolotarev 1872?. It is not known whether this is the densest 4-d packing.
Answer: According to MathWorld, it is not known what the densest hypersphere packing in more than 3 dimensions is. The densest lattice packing is known up to dimension 8 (in four dimension the 4D analog of face-centered cubic is the densest), but it has not been proved that there is no denser non-periodic packing.
Comment: I think the lattice packing is what I'm looking for (was not familiar with that term.)  My goal is to create a set of points that I can use to efficiently 'sample'  over a known volume.  My first approach was to use a simple hypercube spacing, but I'm thinking I can reduce the number of points I need to use (and reduce the number of neighbors, which benefits some other calculations) if I pack more efficiently.
Answer: To get the 4D analog of HCP, you can think about how HCP is built up through the dimensions.  In 1D it is just a series of line segments placed end to end along the $x$ axis.  To make the 2D version, change the segments into 2-balls (disks).  Your line becomes one line of the 2D packing and you put another line offset in the new $(y)$ direction.  The new 2-balls make an equilateral triangle with the old ones and you repeat the pattern.  To go to 3D, change the 2-balls into 3-balls and use that as one layer.  Make a new copy that you put displaced as little in $z$ as possible.  That makes each new ball make a regular tetrahedron with three of the old ones.  The new ball is located in $x,y$ over the centroid of the 2D triangle.  To go to 4D, you do the same.  Make your existing 3-balls into 4-balls and that is one layer.  Find the $(x,y,z)$ coordinate of the centroid of a tetrahedron.  One of the balls goes at $(x,y,z,w)$ so that it makes a regular 4-simplex.  That will give you the layer spacing in the fourth dimension.  So in 3D the centers are $(0,0,0), (2,0,0), (1,\sqrt 3,0),(1,\frac 13\sqrt 3,\frac 13\sqrt 6)$ and the new point becomes $(1,\frac 13\sqrt 3,\frac 1{12}\sqrt 6,\frac 14\sqrt{10})$  You can add that vector to all the points of the 3D lattice to get the next layer in 4D and keep on to build up the whole 4D lattice.  You can then repeat the construction to get 5D and so on.
Answer: As your profile says you are in the business, recommend three books I have, the first can probably be read from cover to cover:
THOMPSON
EBELING
CONWAY + SLOANE
W. Ebeling was nice to me; I should write to him, tell him the article that included material from his book appeared. I do know that he was not able to include my, well, application of his notes, into his third edition, there was not enough time.   Conway and Sloane is usually referred to as SPLAG. It is up to a third edition, at least.
Mild detail: Ebeling's first chapter has a nice bit on going from codes to lattices. Also more than I had realized on root lattices, which are your current concern. The big discussion of root lattices is HUMPHREYS. In the first edition of SPLAG  Table 1.2 on page 15 seems to be the densest packings. The introduction is a bit roundabout, I guess it is dimensions 1-8 and then 24 where the best lattice packing is known and proved best...


Bug with sn-jnl affiliations. Some superscript do not show up

Question: I am currently finalising a document that has 25+ authors and 22 related affiliations, using LaTex and the class file sn-jnl.
When declaring author names and their affiliations, I use the author command as follows:
\author[1]{\fnm{Forename} \sur{Surname}}
\author[11]{\fnm{Forename} \sur{Surname}}

And after I am done calling author names, I add affiliations as follows:
\affil[1]{\orgdiv{foo1}, \orgname{bar1}, \orgaddress{\city{lala1},  \country{blabla1}}}
\affil[11]{\orgdiv{foo11}, \orgname{bar11}, \orgaddress{\city{lala11},  \country{blabla11}}}

The problem is that, when I compile the .tex file and I obtain the pdf, the affiliation superscript next to author name does not appear for affiliation 11 and 22, but the names produced by the affil lines appear.
I believe this is due to a bug in the sn-jnl.cls file. I haven't a solution but I tried the following:

Substituted the \author[11] with another non-problematic number \author[12]. The code compiles as expected in this case.
Substituted the  \author[11] with  \author[1,11]. In this case both 1 and 11 appear as superscripts of the author s name!
On the other hand, \author[11,1] does not produce any superscripts.

I believe that somehow Latex thinks that 11 represents two 1's and is confused as to what to show as superscript, however I am not really familiar with Latex macros etc.. so I am not sure on how to solve this.
If anyone has a solution or any hints, it would be gladly apreciated.
Answer: I think this is a bug in the sn-jnl.cls file. In the .cls file, in lines 519 and 531, substitute
\ifx#1
with
\ifx{#1}.


Hardware requirements for one instance Geoserver/PostGIS

Question: What hardware minimun requirements do you recomend for one instance of geoserver and postgis and 20 concurrent users?
Vectorial data stored in PostGIS is around 20 MB only.
I need the ammount of RAM, disk space, bandwith, server cores and processor velocity.
Answer: That depends on a lot of things. But if all your data is 20 mb you shouldn't need very much of anything.
Maybe java and geoserver will need some ram to feel good. But PostGIS shouldn't need any more than the OS needs for such a job.
So if you run some Linux distro I don't think you will find a computer that can't handle that load.
Maybe 1 GB of RAM is recommended and any decent 5 year old cpu.
For disc you will need maybe 7 GB to have some extra space for future updates.
How fast your users will experience your maps depends more on how you build things than the hardware.
Will you serve in some vector format or as wms-service or what.
Will you cache the output?
and so on....
Comment: 1GB off RAM is not enough but 2 should be
Comment: @user30184 Well, if you cache the output so the server only serves static data I gyess 1 GB will give quite decent performance. And to render and cache 20 mb of data in all zoom levels shouldn't be that heavy, should it? But maybe geoserver is demanding, that I don't know so well.
Comment: From my experience it is necessary to give 1 GB for the jre to run GeoServer and GWC smoothly and operating system and PostGIS needs a few hundred MB more. It is not so much about performance, it is more about making it work at all. If jre must start to swap data to the disk then everything is pretty slow.
Comment: I would say 2 GB also, Java being such a memory beast, but frankly it would be hard to find a machine with a spec low enough that the above requirement would cause a problem. All on one machine, though, that is where the problems will begin :D
Comment: Great, then I understand. GeoServer and Java is the bottleneck. But as you say it shouldn't be any problem.


How to find Frenzy forum homepage on my Joomla site?

Question: I am a noob to joomla migrating from drupal. I found a nice forum module called Frenzy. Its administration menu is nice but I am not able to find the forum page itself. I searched the menus for a hidden link but couldn't find it. I know that joomla is not the same as drupal that's why I am asking here. Where can I find the homepage of the module ?
Answer: Unfortunately the link to the Frenzy module you provided is no longer working, although I suspect that this is not actually a module but rather a component.
If that is right, then you need to create a menu item for this component - to do this go to the relevant menu and click on the "new" icon (green plus, top right). The frenzy component should appear on the next screen for you to select from.
If it is actually a module, then you will need to publish it to a valid module position within your template, using the module manager function under the extensions menu.
Hope this helps! As the frenzy link is no longer working, I can recomend the Kunena
component which you can obtain from this link.


Does Okami HD on PC support smooth run/walk blending?

Question: Most games, when played with an analog controller stick, allow you to seamlessly walk or run at any speed you like.
When I tried a borrowed Switch Pro controller with Okami, I was startled to discover that I could only walk slowly or run at full speed, with no in-between. Instead, it had a sharp, jarring transition about halfway to the edge.
I don't know if this is from the game itself, the controller, or some quirk of the pipeline in between. I've also never played any version before this, so I don't know if it was a limitation of the original, as well.
Does Okami HD for PC support analog speed control with a capable controller?
Answer: I later tried the game on PC with a PS4 controller, and it still has digital walk/run. Looks like the game just doesn't support it, on PC at least.


How to scale a write intesive application with a SQL Server 2014?

Question: I am studying about many databases lately and the one thing I can't get the hang of is how to scale a write intensive application in SQL Server, I'm talking about native features, not third party software. I read about Federated Databases that seems to be something close to this, but I'm not sure if it is the best way since it seems to me that is way more read focused than write focused. I make myself clear that it is just an hypothetical situation and I do not have precise information of budget and pain points, I'm just assuming that I have a write intensive application (let's say 30/70) and I diagnosed that the bottleneck is on the database because it doesn't have enough CPU power and I want to scale with more servers therefore making a cluster, something like Oracle RAC.
Comment: Please provide a lot more background information such as the current pain points, budget restraints, current methods being looked at and so fourth.  Unfortunately with the data provided this question will be closed very soon.  Federation is just 1 of many solutions out there and you might be just grasping at straws at the moment.
Answer: As you are using SQL Server 2014, you could have a look at In-memory OLTP tables (nee Hekaton).  They are suitable to write-intensive applications and there is a published pattern called Shock Absorber.  Start here.


Breaker vs Wire Size

Question: I have a 60 amp 208 single phase circuit using 4 AGW Aluminum wire 75-100 feet away from panel.
I need a 30 amp 208 single phase circuit for an expresso machine demo.
Can I just change out the 60 amp breaker with a 30 and use for the day or will the larger wire size not be safe.
Comment: I take it this 208V circuit is derived from two hot phases on a 208Y/120 three phase system?
Answer: Having larger wire is ok by changing to a smaller breaker you are protecting the coffee maker, this is fine in code just make sure the new outlet is rated for aluminum wire.
Answer: The most likely problem will be in connecting the larger conductors to the devices designed for smaller ones. You may have to use a "pigtail" arrangement, but that means lots of room in the box.

Breaker vs Wire Size


problem with cron job for every 2 minutes

Question: I have a cron job for very 2 min and somebody told me that some servers do not allow 2 min cron jobs. basically from 30 min. it is true?
Answer: No, this is not true. The minimal step is one minute. But depend of service you want to run. Please share more details
Comment: the step is one minute. But you may have services (as jboss for eample) which will start for several minutes. So you should educate users :)
Comment: I'm working on a product for users so users may use any kind of services , that we do not know, ! that is why i'm asking you bro


Does partial distance occurs in distribution transformer?

Question: I've seen that in some substations online transformer inspection is performed through partial discharge detection sensors. As partial discharge depends on voltage so I was wondering if these kind of devices would work for distribution transformer (11KV - 440V) inspection?
Answer: Yes it is Widely used, and there are many types of PD sensors and applications.  These are caused by a voltage breakdown or detonation of tiny particles or voids in an otherwise homogeneous pure insulator.
With a small capacitance
the particle charges faster and May breakdown or cause a tiny detonation.  This can vary from 1 per minute to >1 per cycle and vary randomly in size.  The result is carbon trails in epoxy and dissolved Hydrogen in oil.
On the outside it is called corona, where more contamination may occur from dust and Moisture.


wide table in a two-column document

Question: I have a two-column LyX document. I want to add a table that will be as wide as the entire page, so that it will not have to be squeezed into a single column. I found some suggestions: table too wide for twocolumn-mode document Page-wide table in two-column mode , however, I have no idea how to implement them in LyX...
Comment: You can use the `table*` environment that uses the full width, and will float its contents at the top of a following page.
Answer: LyX knows already about that problem. Open the float settings (e.g. by right click on "float: Table" and choose "Settings...") and select "Span columns". The float will be called "float: Table*" now (note the star).
This works also for other floats (e.g. Figure).
Comment: I wonder how this can be assigned by default to a custom float definition for a custom LyX layout file.
Comment: This solution always pushes the table to the absolute bottom of the page or absolute top of the page (at least with RevTeX 4). When clicking "span columns" I can no longer click on "here definitely", for example. How can I force the page-wide table to appear somewhere in the middle instead of the bottom or top?
Comment: @user1271772: By removing the `[h]`. https://latex.org/forum/viewtopic.php?t=12214.

wide table in a two-column document


Calculating pixel length of an image

Question: May I know what are the ways to calculate the length of 1 pixel in centimeters? The images that I have are 640x480. I would like to compare 2 pixels at different places on the image and find the difference in distance. Thus I would need to find out what's the length of the pixel in centimeters.
Thank you.
Comment: Perhaps you can explain to us what it is you are trying to do where you need to know the length of 1 pixel in centimeters?
Answer: A pixel is a relative unit of measure, it does not have an absolute size.
Edit. With regard to your edit: again, you can only calculate the distance between two pixels in an image in pixels, not in centimeters. As a simple example, think video projectors: if you project, say, a 3×3px image onto a wall, the distance between the leftmost and the rightmost pixels could be anything from a few millimeters to several meters. If you moved the projector closer to the wall or farther away from it, the pixel size would change, and whatever distance you had calculated earlier would become wrong.
Same goes for computer monitors and other devices (as Johannes Rössel has explained in his answer). There, the pixel size in centimeters depends on factors such as the physical resolution of the screen, the resolution of the graphical interface, and the zooming factor at which the image is displayed.
A pixel does not have a fixed physical size, by definition. It is simply the smallest addressable unit of picture, however large or small.
Answer: This is fully dependent on the screen resolution and screen size:
<code>pixel width = width of monitor viewable area / number of horizontal pixels

pixel height = height of monitor viewable area / number of vertical pixels
</code>
Comment: are you confusing this with the number of (font) points in an inch cos thats 72 by definition. screen resolution is usually higher than that
Answer: Actually, the answer depends on where exactly your real-world units are.
It comes down to dpi (dots per inch) which is the number of image pixels along a length of 2.54 cm. That's the resolution of an image or a target device (printer, screen, &c.).
Image files usually have a resolution embedded within them which specifies their real-world size. It doesn't alter their pixel dimensions, it just says how large they are if printed or how large a "100 %" view on a display would be.
Then there is the resolution of your screen, as others have mentioned, as well as the specified resolution your graphical interface uses (usually 96 dpi, sometimes 120)—and then it's all a matter of whether programs actually honor that setting ...
Answer: The OS will assume some dpi (usually 96 dpi on windows) however the screens real dpi will depend on the physical size of the display and the resolution
e.g a 15" monitor should have a 12" width so depending on the horizontal resolution you will get a different horizontal dpi, assuming a 1152 pixel screen width you will genuinely get 96 dpi

Calculating pixel length of an image


iTunes store purchased media items: usability in another country?

Question: An Apple account with a Canadian billing address and payment method is used to buy movies on the Canadian iTunes store. Will an Apple TV 4k located physically in another country (say, Vietnam) be able to stream these movies if it is logged in with this same account? (The account's payment and address remain Canadian.)
Answer: welcome to AskDifferent. I can't tell you if it works in your specific combination. Normally Apple does not restrict content via Geolocation blocking. I'm able to download and watch all Content (Music, Movies, TV-Shows and also Apps) in Germany and USA. I have an austrian Store Account.
Does this example of mine help you?
Comment: It's a positive signal so it does! +1


Can AES use PKCS#5 padding

Question: From What is the difference between PKCS#5 padding and PKCS#7 padding, I understand that PKCS#5 is defined for 8 byte block sizes. Does this rule it out as a padding option for AES since AES has a 16byte block size. I have seen some conflicting usages and would like to get a definitive answer
Comment: I sincerely hoped I covered this question with "Most cryptographic libraries use either PKCS#5 or PKCS#7 to define the same padding mechanism. Officially PKCS#7 would of course be the only correct one if block sizes other than 8 are used within the calculation." I'll make it more clear in the answer.
Answer: PKCS5 padding is a narrowly defined subset of PKCS7 as per its specification.
PKCS7 padding is identical to PKCS5 when applied to an 8-byte block only.
The PKCS5 specification is actually defined only for DES, not 64-bit block ciphers in general.
However, PKCS5 by specification MUST created an invalid padding string when applied to a block size that is longer than 8 bytes, and where more than 8 bytes of padding are needed, since it explicitly defines the value 8 for the block size and divisor in bytes. If 9 bytes of padding are required, PKCS5 will create only 1 byte of padding with a value of 0x01.
That being said, I would suspect most in the wild implementations of PKCS5 padding actually use the block size of the cipher used rather than the predefined value, and it is certainly possible that application of padding will not cause an error. This is not hard to test.
So yes, it does rule out PKCS5 as a padding option for AES, or for any block cipher with a non 64-bit block (and technically for anything not DES or 3DES), but may sometimes work anyway.
Comment: Is is. `"PKCS5Padding"` is probably used either out of convenience (as it already existed for DES) or to make it possible to use AES where previously DES or tripple DES was being used. Now maybe they *should* have added `"PKCS7Padding"` as an identifier to specify the padding.
Comment: My context for this was that in the JVM, the cipher name used for AES is "AES/CBC/PKCS5Padding". But I guess internally PKCS7Padding is used
Comment: I can confirm from attempting to decrypt Java AES/*/PKCS5 using OpenSSL (all the way back to 1.0.2) and CryptoPP that they will not work. Both flag the Java ciphertext as having invalid block padding.

Can AES use PKCS#5 padding


If Chainlinks price feeds are free to consume, what is the point of requesting data directly from node operators?

Question: If Chainlinks price feeds are free to consume, what is the point of requesting data directly from node operators which would cost LINK? Do platforms such as DEXs or lending platforms like AAVE pay to use price feeds? Or do they just use the free ones? I am assuming regular people deploying smart contracts will not pay for price feeds. In this case, what is the point of the LINK token if only one user has to request data and publicize it for free?
Comment: sssshhhh....   you'll wake up the trolls
Answer: Chainlink price feeds are technically not free, they are sponsored by protocols dependant on the information. These platforms are paying LINK to make the requests and then you're allowed to tag along and read the information.
However, they take a lot of work and coordination for node operators to set up, and they won't have all the data that you might want - so optionally you can request data from node operators directly and pay a LINK fee.


rapidly growing mold on flat surface

Question: For an experiment I'm conducting, I need to grow mold on a 2 foot square piece of white fiberglass. I'm in Florida, with high heat and humility, so mold already grows easily. I've seen elsewhere that mold needs organic matter to feed on, to grow rapidly. Ironically, I've seen mold grow on the side of fiberglass motor-homes and showers with no present organic matter. Any suggestions on how to grow mold rapidly on my piece of fiberglass? I thought of locating fiberglass outside, in sun. I could mist it every hour or 2 to create more moisture. Maybe there is something I could rub/spray on the fiberglass sheet to encourage rapid growth? Any other suggestions about applying moisture, light, etc?
Comment: Hi Andrew, (great name) what type of mold is it?
Comment: I'm not sure of type of mold. I'm trying to replicate the mold growth which naturally occurs here in Florida, USA.  Could be a few species of fungi. Just trying to figure out how to grow dense mold quickly.
Answer: Mold is a general name for many species of Fungi, which are heterotroph so they need organic material to feed on. You can see them grow on fiberglass because many organic material can accumulate near or on fiberglass (skin cells, plants root hairs, microbes, oils) and become substrate for the mold.
If you want to grow a specific mold you should first identify it to find the best substrate for that species and not for other. If you simply want mold you can use some kind of starch on the fiberglass and keep it moist (not wet, wetness will give you also oomycetes and bacteria). No need to spray it every 2hrs. You can close the fiberglass with a box, dark box is better (bacteria grow best with light).
You can take (with mask and gloves) some mold and put it on your fiberglass to promote the growing of that mold.
Describing your mold or posting a picture can help to identify. If you see two different colors report both of them and location (center, periphery)
Comment: Thank you. What are some general examples of starches I can use to accelerate growth of mold, densely and quickly?
Comment: I use potato but any should work. Depending on the Fungi paper of cardobard can be more selective towards it

rapidly growing mold on flat surface


Does gas stations have to file restriction order after being asked to leave?

Question: Long story short I informed the owner of the gas station that (after many attempts) the manager would not pay me my winnings from a pull tab game at the station. The manager and I then had an exchange of words (no physical threats) and was told to leave and is no longer welcome there. I have gone in since then and the owner served me no problems and never said anything about me not being allowed in. I went back in today and the manager again told me to leave and would not serve me. I'm from Ohio,USA. My question is, does the gas station have to file anything to keep me from coming in, trespassing list, or is the manager just on her high horse?
Comment: @kisspuska: Of course, banning the customer from the property doesn't resolve the dispute over the game; any liabilities they had still exist.  But the customer can pursue a resolution without needing to enter the property (by phone, by letter, through attorneys, by suing in court).  So the existence of this dispute doesn't affect the property owner's right to ban the customer from the property.
Comment: Hold on for a second, neither the owner nor the manager can escape their duties under a contract that they voluntarily agreed with this customer by simply not letting them in. And the cause and effect relationship is clearly established here. That leads to unjust enrichment at best and potential jail time at worst. Just because it sounds like some loiterer 7-Eleven loiterer take issue with a local gas station owner/manager it's not necessarily a loiterer that "wonderers" into a store.
Comment: @kisspuska the question is about the "You are not welcome here" part, not the game.
Comment: @Nate Eldredge I guess you guys are right.
Answer: A property owner can tell you that you are not permitted on the property at any time; they can change their minds as often as they want; and they do not have to file paperwork or go through any process for that order to "take effect". A manager who is not the property owner can do likewise, acting as an agent for the property owner. Then, if they tell you to leave but you don't leave they can call the police, who can arrest you for trespassing.
One generally has a privilege to be in a public place of business, but not in a stranger's house. Being on someone's property without a privilege to do so is against Ohio law. So you cannot just wander into a residence, but you can wander into a public business, up to the point that there is some notice that you can't go there (e.g. employees-only sign, no entrance etc). This includes a verbal order to leave: when they tell you to leave, you have no privilege to remain, and now you are in violation of the law. Per your description, they have not been entirely clear on whether you lack the ordinary privilege that others would have as customers. They might call the police who might arrest you for trespassing, but you might be able to defend yourself against criminal charges on the grounds that it is not clear beyond reasonable doubt that you lack the privilege to be there. Especially since the owner and manager have different policies, there is reasonable doubt that you have committed a crime.
Comment: oddly enough, the website is not reachable.
Comment: the privilege only works for people the shop wants to contract with, e.g. customers. If the shop says "We will not sell to you anything because of (a reason that is not a protected class)" you don't have the legal capacity to be a customer of them. Notice of bans also can be verbal or implicit.
Answer: The relevant law is § 2911.21 of the Ohio Revised Code (ORC).

(A) No person, without privilege to do so, shall do any of the following:
(1) Knowingly enter or remain on the land or premises of another;
(2) Knowingly enter or remain on the land or premises of another, the use of which is lawfully restricted to certain persons, purposes, modes, or hours, when the offender knows the offender is in violation of any such restriction or is reckless in that regard;
(3) Recklessly enter or remain on the land or premises of another, as to which notice against unauthorized access or presence is given by actual communication to the offender, or in a manner prescribed by law, or by posting in a manner reasonably calculated to come to the attention of potential intruders, or by fencing or other enclosure manifestly designed to restrict access;
(4) Being on the land or premises of another, negligently fail or refuse to leave upon being notified by signage posted in a conspicuous place or otherwise being notified to do so by the owner or occupant, or the agent or servant of either.

Let's restate the facts of our hypothetical simpler:
Bob did get into a fight with Adam. It is not relevant what the fight was about. As a result, Bob was informed by Adam, who's agent of the owner Charlie, that they are no longer allowed on the property and that there will be no contracts (=sales) with him anymore with words that amount to "Leave, you are no longer welcome here."
Onto the analysis
The Gas station is a private property of Charly and is open to customers during the opening hours. Outside the opening hours, nobody but the owner and their agents is allowed there.
However, Bob can no longer be or become a customer, as the owner's agent used the delegated freedom to contract of the owner to stop any future sales to Bob. As a result, Bob is not part of the group to which "the use of [the property] is lawfully restricted to certain persons [e.g. customers]". Bob was informed of this, so he is knowingly entering the premises while not part of the group that is allowed there. So he is Trespassing under ORC $ 2911.21(2).
It gets a little complicated as Adam either didn't inform Charly or didn't do so in a clear enough manner, that they put Bob on the no-serve list. However, that doesn't change that Bob was knowingly entering the premises after Bob was told they were banned. The words of Adam that amounted to "Leave, I will not serve you" did either affirm the ban or reinstate it, should Charly have lifted it in the meantime. As a result, Adam is fully entitled to enforce the ban by calling the police, should Bob not leave.
Charly is allowed to lift the ban and allow Bob on the premises and as a customer again at any time, or to instruct Adam to do so, but Bob is not entitled to this. On the counter, Charly is also allowed to reinstate the ban at any moment, if it is just clearly communicated to Bob. It is up only to the discretion of Charly. As Charly's agent, Adam can do so just as much, unless he is specifically instructed by Charly not to.

The reason for the argument is an entirely separate claim and can be brought in small claims court against the business of Charly, as Adam was only acting as an agent in the argument.
Answer:
does the gas station have to file anything to keep me from coming in,
trespassing list?

No. The gas station, through its authorized agents, may exclude you from its property and deny you service in its sole discretion, without legal process, for a non-discriminatory reason, and the reason in your case is not an illegal or discriminatory reason.
If you disregard their instructions, you can be prosecuted criminally (or in a civil lawsuit for money damages) for trespassing without prior legal process.
Comment: @kisspuska Payment can be demanded by mail or through a third-party if necessary. Being owed a payment doesn't entitle you to physical presence on the property.
Comment: @kisspuska that is a *separate* claim. "I won a game" does not make you part of a protected group. Some games of luck are only paid at the local station up to a specified amount. Usually, any winning above that number needs to go through the office of the lottery and is not paid at the place you bought the ticket.
Comment: @kisspuska No. You can not demand arrest **at all**, the only people that can demand someone to be arrested are the district attorneys. Also, read the TOS of the lottery who is responsible for paying out your winnings. It is not fraud if they are not responsible.
Comment: @I beg to disagree on the illegal reason. Their reason being that he demands a presumably rightful price is nor just or lawful. Is there a point where he must resort to call the police or go to civil or small claims court why you say that?
Comment: Yeah, these are reasonable points. Could he call the cops with a reasonable degree of certainty that they would arrest the owner for criminal fraud if he at least witnessed them to do this with one other customer and knew the other customer would be willing to testify?


Train disembarking: why don't trains allow exit at any point1890 v 2023

Question: In the 1890s, trains allowed access/egress at every cabin in a car: this obviated the need for a hallway and saved space.
Why was this eliminated as early as the 1920s?
1890's style car:
Answer:
Difficulty with ticket checking.
Catering / service trolley.
Safety of passengers.
Doors everywhere!
Wheelchair access.

The reasons have probably got little to do with engineering and more to do with the points above.
They were still around when I was a child and great fun. You could pull down the windows and poke your head out. You could even open the exterior door handle if so inclined! A point of interest: the British style door handles were tee-shaped and when fully locked the handles were horizontal. The guard just had to scan the carriages to check that all doors were fully closed before giving the driver permission to proceed.
Answer: It was impossible to close the carriage on a cold morning. There were always some open doors somewhere after each station. And the doors were narrow, which made access difficult or impossible for prams, walkers, and wheelchairs.
But I think, like everything else, it comes down to cost: it was more expensive to put in more doors.
Those multiple doors made entrance and exit much faster for bulk masses of people at major stations. As the number of people taking commuter trains decreased towards the end of the last century, and handicapped access became more important, and automated doors were implemented for safety and control, the sheer speed of dumping hundreds of people all at once became relatively less important, and trains moved to fewer doors.
Something similar happened with trams and busses. Trams and ommni-buses like the San Francisco cable tram, which allowed fast exit, were replaced with single or double-door vehicles which forced the passenger past the operator for single-operator ticket sales and control. If you look at the SF cable tram now, you'll see that although they've kept the old vehicles, entrance and exit is strictly controlled.


Transfer iPhone 5 photo library on to a Network Storage Device

Question: I'm running out of space on my iPhone and would like to transfer my iPhone photos to a NAS and then delete them. I like to view my pictures from NAS via an app.
Can somebody recommend a good NAS and app that can help me achieve that?
Answer: Instead of using a local solution for your media, you could consider using Dropbox. With Dropbox you can stream videos, photos, and even use it for storage. You get roughly 2 GB for free (more if you refer users), but if you need more space you can easily upgrade your account, for a fee, to the Pro version which provides much more storage.
Answer: Synology NAS hardware offers this, take a look to the apps[1] I think it is what you are looking for.
[1] Photo Station is the app: https://www.synology.com/en-global/dsm/5.2/multimedia
Comment: Could you offer a link to an app that satisfies the OP's needs?
Comment: Added some links...


Call event receiver for many custom document library

Question: I have many custom document libraries. I would like to create and attach an event receiver for all these Library. With <Receivers ListTemplateId="101"> they don't work.
Any help is appreciated
Comment: Can you post your whole elements.xml here , bcoz  is the correct way.
Answer: You can programatically attach the event receivers to your document library as
list = web.TryGetList("ListName");

 if (list != null) {
    list.EventReceivers.Add(SPEventReceiverType.ItemAdding, Assembly.GetExecutingAssembly().FullName, "Namespace.ClassName");

    list.Update();

Or you can create a content type and attach event receiver to that content type and after that add that content type to your document library.


Can you retrive a specific marked version for an entire SOLUTION?

Question: I'm extremely new to TS and it's not apparent to me. It's seems to me that it must be in there. Could someone please point out how to go about marking a whole solution with a version number or label and then retrieving that specific version back from the repository?
Thx
Answer: Applying the label isn't the easiest thing to find. You can get to it by right clicking on the folder containing your solution file in the Source Control Explorer window (which you can get to by double-clicking on the Source Control node in Team Explorer).  When you apply the label, apply it to the folder containing the things you want included in the label.  Then ensure that the next screen shows you the contents of that folder (i.e. all the files you want to label)
In TFS a label is a bit like a tag.  It is actually something that can be edited and you can have files of different versions included in it if you really needed to.
There is also the concept of "Changesets" in TFS.  A changeset is a number that always increments on a particular server (or Project Collection in TFS2010).  The number represents a unique point in time for that server instance.
To get the files from a particular version, in Solution Explorer right click on your solution and do "Get Specific Version..."  In the Version group box you can change the type from the default Latest Version to specifing the Changeset, Date or Label if you want to get a version from an older point in time.
Hope that helps.
Martin.
Comment: When I specify that I want to "Get a Label", it prompts me for the Label name, let's me browse and search for a label, all very cool, but when I find it, it seems not to let me click on it so it will be carried ocver to the previous screen where teh Label name is required. Hitting Close does not select it and double clicking on it brings up another screen where I can edit what files are affected by the label.
So I seemed to be forced to hit the close button and manually type in the label name. Obviously, it's not a show-stopper but I'd like to know if I am missing something. ty for your help!


Is it acceptable to copy my question(s) from Draw3Cards to Board & Card Games?

Question: Draw3Cards is a SE 1.0 site for MtG.  I am not active there anymore, but I have asked a couple questions there that I believe would be beneficial to have asked here.  Obviously, copying every non-duplicate question from there seems unethical so I only want to ask my questions here.  Would this be acceptable?
Answer: There are no plans to wholesale import data from SE1 sites anymore.
That said, there is nothing stopping you from asking those questions here.
Comment: I am aware that there are no plans to import this data.  My main concern was if this kind of activity would be considered reputation farming or some other heinous act.
Answer: As the owner of Draw3Cards, I can say that there's nothing in our TOS to stop you from doing that. I don't know about the ethics of Board Games or SE in general though - this could be considered rep farming.
Can I ask why you would want to do this? Were the questions not answered properly on D3C? Or are you just trying to "artificially boost" the content in Boardgames SE?
I won't complain, no matter how you do this.
One thing though - right now, the way I see it, Magic is the #1 game tag on Boardgames, way past any other tag. I and others strongly think that there is room for a dedicated Magic SE site. If you agree, I think a better move would be to support the proposal for a dedicated site, and perhaps wait until it opens and ask your questions there. I'm not sure if Boardgames is sustainable or not without the Magic content - but it is my opinion that Magic deserves a dedicated SE nonetheless, even if this means a substanial dilution of Boardgames SE.
Comment: @OrigamiRobot - well, if it's only 1-2 questions, I really don't see any problem in re-asking them, especially if you feel they're important.
Comment: The question was answered properly on D3C (I answered it myself) and I am not trying to artificially boost my rep here.  The question simply addresses a mechanic that I believe is frequently overlooked and I want to spread this information as much as possible. I am already committed to the MTG proposal, but there are other places for that discussion.  I "left" D3C because I am hoping the MTG proposal moves into beta soon....ish.
Comment: Oh, and btw - why did you leave D3C in the first place?
Comment: @OrigamiRobot - well, if you already support that proposal ... which seems to be under way, I don't think you should start adding a bunch of questions here from D3C, only to migrate them later. But then again, migrating is relatively easy within in SE, so maybe it's not such a big deal. The larger question is will all Magic questions be migrated to Magic SE from Boardgames.
Comment: I thought about that, but it might be a while.  I only *asked* 2 questions on D3C and this is the only one I feel needs to be spread as far and wide as possible.
Answer: The only issue I can think of is that it will set a precedent for that behavior. While you happen to be the person who asked those questions (or so you say1...), what's to prevent me or another user with nefarious rep-farming intent from going and asking every question that's been posted on Draw 3 Cards?
I couldn't actually find anything about Draw3Cards' Terms of Service - IANAL, but it might not actually be legal to duplicate that content here.  In contrast, at the bottom of all SE pages there's the following blurb:

user contributions licensed under cc-wiki with attribution required

Given that it's entirely unrelated to Stack Exchange, if it does happen to be legal, the worst that can be said is that it'll hurt D3C in it's page ranking (in that the exact same content on D3C will be competing with SE).
[1]: I actually know @OrigamiRobot in real life, he's the person who asked those questions on D3C.


How can I use a confusion matrix in image captioning?

Question: I read that a confusion matrix is used with image classification but if I need to draw it with image captioning how to use it or can I draw it in the evaluation model phase for example if yes how can I start?
Answer: There's a confusion: a confusion matrix is a standard tool for evaluating a classification task, i.e. one where the target is a categorical variable. The confusion matrix is a table which allows observing the number of test instances which have true class X and are predicted class Y, for every class X and Y. This is practical only with a small number of classes of course, otherwise the confusion matrix is not readable.
The task of image captioning is not classification. The target is unstructured data (text), not a categorical variable with a finite set of possible values. Therefore it requires a different (and more complex) evaluation method. It's often similar to machine translation, based on a measure of similarity between the gold standard caption and the predicted caption. Usually one should use the state of the art evaluation method, i.e. the method used in recent papers published on this task.
Comment: Thanks a lot but if I need to take for example the results I got from captioning and predict if it is true or not based on the original caption > like "boy" how can I interpret the confusion here I mean it consists of 4 values (TP,TN,FP,FN) i mean the difference between them, please
Comment: @Lei Well in general it's not always possible to say whether a caption is correct or incorrect, it can often be partly correct. This is why standard captioning evaluation is not done this way. Do you mean that you are able for every caption in your data to categorize in this way? If so you could calculate an accuracy score, but it's a bit unusual. Obviously you cannot have the notion of gold positive or negative, because the gold standard caption isn't binary. This is why the confusion matrix doesn't make sense.


A book on the parallels between styles in music, theater, architecture, visual arts,

Question: I have been looking into different periods in music history (medieval, renaissance, baroque, classic, romantic, 20th century, modern). I am now looking for a book that similarly covers a long period of history (1800s-2000s at the minimum, covering the western world) but with a broader scope; that is, not only how music evolved over the years, but also how, say, architecture, design, visual arts, poetry, etc. evolved over the same years, and preferably there is some focus on the common grounds (e.g., societal? political? philosophical?) of the different/similar evolutions across those disciplines.
Comment: This is, broadly, *Humanities*. Look for terms like "interdisciplinary humanities survey". They do exist, not all are easy reading. I was assigned some in art school, one specifically about Vienna. Interesting stuff, but no way I can recall the titles from 30+ years ago
Answer: I'm not aware of a book covering this. Some time ago I found CD booklets attempting to cover other aspects of art and politics happening at the same time as the recorded compositions.

I could only find the label Teldec providing such information in the 1990 years, see an example here, taken from "Vivaldi Il proteo: double and triple concertos":


How to locate a phone without user knowing

Question: I have a daughter that goes to a secondary school and has a S5 phone. I want to be able to locate her without her knowing, as in receiving any pop ups or notifications. Can you help me please?
Comment: It's not exactly anyone's place to tell you what to do, but I'm going to throw my two cents in; this is the one surefire way to ruin any kind of trust relationship you could have with your daughter. Maybe, instead of tracking her, you communicate with her and respect her privacy?
Answer: I think the best option is to tell her you are going to track her. She will find out, unless you deploy some borderline illegal methods.
Life360 is a few app. It will notify you where she is. No pop ups on her phone.
Don't be a prick and spy on your kid. Just be honest if you want you kid to respect you.
Answer: The best thing you can do is get her Google password whichever account is active for that device and use Google device manger for the same. But she will be aware because whenever we locate device popup will be shown on her phone, well we can disable notifications for Google Play Services and she won't get the popup. This way you can get her location with existing methods.
Cons using this method :

GPS and Internet should remain active
Getting her password is hassle
Answer: While I'm completely agree with the rest of the answers, You CAN use carbonite app which can locate the device without showing any UI.
There are multiple apps on play store which can do the same. Or if you're capable, you can even install your own app.
Having said that, as @Rthomas529 noted, this will ruin any trust your daughter has on you irreversibly. And frankly, she is entitled to her privacy. Most apps on play store for this type of function are designed for theft prevention rather than invading privacy. If this is noted by any authorities, you may be looking at legal prosecution depending on the law where you live and your daughter's age.
You can also simply ask her permission and install Google Device Manager (which does pop a notification when remotely located).
I VERY STRONGLY suggest you reconsider your options.
Answer: When she Gets Home, Go on her Phone and Go to settings, about Phone, More info and write down her Phones IP ADRESS
Then when she is out, go to   IP Tracker, type her IP address in and lookup where she is on the map..
Hope it helps!
Comment: Also: IP addresses can be as accurate as 2 miles or as inaccurate as half a country.
Comment: You know that this will display the WiFi IP address, in case the device is connected to WiFi. Also this IP changes from cell tower to cell tower.