What's the (business) term in English for an action where a customer returning product to seller because they are not satisfied?

Question: The closest term I can find is "return order", but I feel that it's very similar with "repeat order", so I'm afraid it has a double meaning.
Comment: The extremely technical term is RMA ([return merchandise authorization](https://en.wikipedia.org/wiki/Return_merchandise_authorization)), but that's not something that would be used in casual conversation. If you are reading technical reports from a manufacturing facility, you will see "RMA" used frequently.
Answer: I'm not saying that I'm one hundred percent sure whether this is the precise term they use in the business world, but purchase return is what instantly came to mind when I saw your post:

A purchase return occurs when a buyer returns merchandise that he or she has purchased from a supplier.

Another similar term would be product recall, but product recall usually only applies to situations where products are returned (or recalled) to the supplier on a mass scale typically due to the discovery of some sort of serious defect or problem in them:

A product recall is a request to return a product after the discovery of safety issues or product defects that might endanger the consumer or put the maker/seller at risk of legal action.
Answer: "Return" is the correct word. "Return" is a verb. We say, "The customer returned the product". We DO NOT call it "a return order". You can call it "a returned item" or "a returned product", or simply "a return".
Yes, a "repeat order" is ordering the same thing again, ordering something you had previously ordered again. There is no ambiguity with "return". We do NOT say "a return order" to mean ordering the same thing again. I suppose you could say, "The customer returned to the store and bought the same item again", but it would be "returned to the store [or, our web site] and made a repeat order", NOT "made a return order".
Comment: Yeah, I suppose I feel return is similar to repeat because in my native language, return and repeat means almost the same. Thanks!
Comment: Sure. The meanings are similar in English, too. I presume part of what makes it hard to learn a new language is figuring out what words are commonly used in each context. Dictionary definitions aren't always helpful.


$g\circ f$ bijective iff $f$ and $g$ bijective?

Question: Is the following true:

$g\circ f$ bijective iff $f$ and $g$ bijective?

Or can the requirements be weakened for $g$ (i.e. $g$ only injective or surjective)? Or $f$?
Comment: If $g\circ f$ is injective then $f$ is injective and if $g\circ f$ is surjective then $g$ is surjective.
Comment: If $g$ could be injective or surjective then $id \circ g = g$ would always be a bijection, a clear impossibility.
Comment: One of the directions you want to prove is true, the other one is false.
Answer: Let $x=(x_1,x_2,...)$ be a real sequence and define $Rx = (0,x_1,x_2,...)$ and
$Lx = (x_2,x_3,...)$. Then $L\circ R  $ is the identity but $R \circ L$ is neither injective nor surjective.
It is clear that if $f,g$ are both bijective then so is $f \circ g$.
Comment: Why the downvote?
Answer: Let $f:A\rightarrow B$ and $g:B\rightarrow C$
If $g\circ f $ is injective then $f$ is injective.
If $g\circ f$ is surjective then $g$ is surjective.

$g\circ f$ is injective if and only if $f$ is injective and $g_{f(A)}$ is injective.
Answer: 1) $f$ and $g$ bijective $\implies$ $f \circ g$ is bijective.
2) $f \circ g$ is bijective $\implies$ [$g$ is injective AND $f$ is surjective]
3) $f \circ g$ is bijective $\implies$ [$g$ is surjective $\iff$ $f$ is injective](but neither need be true.)
Proof:
1a)$x \ne y \implies g(x) \ne g(y) \implies f(g(x)) \ne f(g(x))$ so injective.
1b)$z \implies$ there is a $y$ such that $f(y) = z$; $y \implies$ there is an $x$ such that $y = g(x)$; and therefore $z = f(y) = f(g(x))$ so surjective.
2a) If $x \ne y$ but $g(x) = g(y)$ then $f(g(x)) = f(g(y))$; so $f \circ g$ injective $=> g$ injective.
2b) If there is no $y$ such that $f(y) = z$ then there is no $g(x)$ such that $f(g(x)) = z$; so if $f \circ g$ is surjective, $f$ must be surjective.
3a) If $g$ is surjective then for all $y, v; y \ne v$ there are $x, w; x \ne w$ such that $g(x) = y$ and $g(w) = v$. So  $f(y) = f(g(x)) \ne f(g(w)) = f(v)$ so $f$ is injective.
If $g$ is not surjective, however, it would be possible to have an $v, y; y \ne v$ where there is no $x$ such that $g(x) =v$, in which case $f(v) = f(y)$ would not be a contradiction to $f \circ g$ being injective as $f(v) \ne f(g(x))$ for any x.
3b) If $g$ is not surjective then there exist a $y$ such that there is no $x$ such that $g(x) = y$.  But there does exist an $x$ such that $f(g(x)) = f(y)$ but $g(x) \ne y$.  So $f$ is not injective.
====
An example where $f \circ g$ is bijective but $f$ is not injective and $g$ is not surjective.
Answer: Hint: one direction is true. For the other, consider
$A=\{0\}$, $B=\{1,2\}$, $C=\{3\}$. Define $f\colon A\to B$ by $f(0)=1$; define $g\colon B\to C$ by $g(1)=3$ and $g(2)=3$. Is $g\circ f$ bijective? Is $f$ bijective? Is $g$ bijective?


Would video buffing speed mean anything when using TOR?

Question: I was browsing on TOR the other day and watching videos on TOR. Normally from my experience, videos load very slow on TOR but this specific website was loading my videos at a fast speed. It raised a few red flags because I am scared that I might've stumbled upon a honeypot setup by a hacker. I did not give out any personal information or create an account. I browsed the website as a guest. I am a bit scared that by clicking and viewing the video, the video might've deployed a malware onto my computer and that the hidden service itself could've leaked my IP address. Sorry if I sound like an amateur, I am sort of new to using TOR so I am a bit paranoid. FYI, the contents of the website are legal.
Answer: Relays in the Tor network have varying CPU and networking performance. This means that the throughput of a circuit depends on the performance of the relays in the circuit. Some circuits will be slower and others will be faster. Having a video that loads quickly does not indicate any kind of attack, and you just may be accessing the website over a circuit using fast relays.
Answer: It's just a question of network paths and speeds on each step of them. Basically - in clearnet case the key difference is the only fact that the signal path is straight and open to the observer. All the other issues with a path segment speed, load ant throughput are exactly the same

In clearnet case you have dependency on the network channels speed, load, switches and routers' CPU loads et cetera...
In Tor case you have exactly the same issues as in clearnet case, because Tor is built on the top of it - and additionally the nodes involved in your path are also have their CPU loads, RAM speeds, Network speeds e.t.c.

..... so you was not compromised for sure! You was just unlucky when you've had a slow speed and long buffering - and your request went fine when you have had a fast experience


What is the benefit of YCbCr?

Question: Why would someone want to store images as YCbCr instead of RGB in RAM or in GPU memory?
Answer: Chroma subsampling is usually used with YCbCr, that makes pics smaller. Say, 512x512 pic in rgb takes 768 kb. While same pic in YCbCr with 4:2:0 subsampling will take 384 kb. Sure, that's good only for photos, or video-like images.
Other reasons might include image processing/analysis, when luma/chroma components needs to be separate.Or when you play video, and compression scheme involves luma/chroma separation (and optionally subsampling). It's much faster then to compose RGB image in pixel shader, rather than decode pic fully on cpu.
Comment: Please show calculation formula for 384KB.
Is it used in MPEG?
Comment: In case of 4:2:0 subsampling, chroma components is twice smaller on each side. So 512x512 pic takes 512*512 bytes for Y, and 256*256 bytes for Cr and Cb. Total would be 512*512+2*256*256 = 384kb. Yes, it is used in MPEG/JPEG/H26x/etc. See https://en.wikipedia.org/wiki/Chroma_subsampling
Answer: Vlad covered the common cases above. There's one other neat way I know of to take advantage of a chroma/luma split for compression, when using GPU-friendly compressed formats like S3TC, so I figured I'd add it on here:

DXT1 compression breaks an image into 4x4-texel blocks, and stores two endpoint colours per block, representing each texel inside as a blend somewhere between these two endpoints.
This can cause errors if, say, the block contains both red and green, each in light and dark varieties. The compressed format can only handle variation along one line in colour space, so about the best the compressor can do is blend between bright green and dark red, getting the wrong colour in places that want dark green or bright red.

Example of DXT1 cmpression - note colour bleeding & floating reddish texels around the edges of the face and life jacket.

The more heavyweight DXT5 compression stores colour information as DXT1 blocks, but also has an independent alpha channel.
We can use a colour model that splits out luma and chroma components to take advantage of this, storing only chroma information in the DXT1 colour block, and luma information in the alpha block. Now a single 4x4 block of the image can represent colours varying on two axes - the DXT1 block representing shifts in hue/saturation, and the alpha block representing shifts in lightness - better representing areas of the block with separate transitions in both chroma and luma. We also get higher precision devoted to the luma channel, which helps because our vision is more sensitive to luma differences.

Example of using this luma-chroma splitting technique to improve S3TC compression. The result is almost indistinguishable from the uncompressed source image, identical in resolution but one quarter the file size, and can be decoded fully on the GPU (the hardware handling the DXT5 decode, and a simple fragment shader converting back to RGB).

The images above are from this paper from NVIDIA detailing a technique for realtime compression into YCoCg-DTX5. YCoCg isn't exactly the same as YCbCr, but shares the core concept of expressing colours along luma and chroma axes rather than RGB.

What is the benefit of YCbCr?


Get wkhtmltopdf to recognize user font folder

Question: I think I have my problem pinpointed here...I've installed some non-standard fonts into my ~/.fonts directory and run 'mkfontdir' and 'mkfontscale'.  The fonts show up when I list them with 'fc-list'.  The problem remains that wkhtmltopdf doesn't recognize them.  Other system fonts like 'Courier 10 Pitch' are recognized...just not what's in my user directory.  So is there a way to get wkhtmltopdf (or for that matter, webkit) to recognize the fonts in my folder?  Is there something I have to do over ssh or is there an option I can set in ruby?
Answer: Does the problem still exist? I just tried with a virtual Ubuntu server and got fonts working without any problems even though the version I got from the repositories is 0.9.9 which is pretty old. My process:

Installed xserver, fluxbox, mupdf (viewer), chromium and wkhtmltopdf
Got an awesome font (PonyRides)
Ran mkfontdir, mkfontscale and fc-list (font showed up on list)
Made a test.html with a single paragraph that used the custom font
wkhtmltopd test.html test.pdf

I checked the pdf locally and then on another computer and the custom font even worked there even though I didn't have the font installed. http://temp-share.com/show/dPf3m39HW <- generated PDF (I hope the link is not too temporary).
Comment: Would this work if the fonts are stored in, for eg, css/fonts? I can't get wkhtmltopdf to work with my fonts either - I'm on a shared hosting plan. (btw, awesome font!:) )


How to make a switched outlet, half switched, half hot

Question: In my garage I have an outlet in the ceiling that is fully controlled by a single switch due to a shop light being plugged into it. I would like to make half of that outlet always hot, so I can power the garage door opener.
Answer: You want to break the connecting tabs off the receptacle (bend back and forth with needle nose pliers until metal fatigue causes them to break off), then just wire one plug to always be hot, and feed the other one through a switch:
Comment: +1 But unless you are powering the two outlets from separate circuits, there is no need to break the tab off the neutral side
Comment: @bib Well, right, you can leave the tab connected on the neutral side and let both outlets share the neutral through the outlet. Just be sure you switch the hot leg, which you really should be doing anyway.


Older frameworks in Xcode

Question: I got the latest version of Xcode (3.2) When I open an older project in Xcode all the frameworks appear in red. When I replace them with the current frameworks i get a ton of errors in my code. I want to run the 2.2.1 simulator but it isn't in the list of active SDK's.
Is there a way to fix this?
Answer: Newer versions of the iPhone OS SDK installer package don't include all older SDKs, as people were complaining about the growing size of the installers.
The 2.2.1 Simulator doesn't run on Snow Leopard.  So you're out of luck there entirely.
Set your Base SDK to an SDK you do have (like 3.0), and set your iPhone Deployment Target to 2.2.1, and you'll be able to test on a 2.2.1 device, though still not in the simulator.
Answer: And to address the annoying/alarming red color (in Xcode 3.2.4 Prelease, developing for iOS4.1),
[1] select a red (mis-referenced) framework in the "Groups & Files" pane
[2] get its "Info" (command-I, or click the blue circle with the white italic "i")
[3] of the three tabs, "General", "Targets", and "Comments", choose "General"
[4] Use the "Path Type:" pop-up:
    change from "Relative to Current SDK" to "Absolute Path"
[5] Click the "Choose..." button to select a path like:
"/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/System/Library/Frameworks/UIKit.framework"
[6] Notice:
    the "Path Type:" pop-up returns to "Relative to Current SDK" automatically; and
    the framework's annoying/alarming red color is replaced by the normal/copacetic black.
No doubt, some later upgrade of Xcode will manage all this automatically.
Answer: Setting "Base SDK for All Configurations" to the prelease sdk (in this case, iOS Device 4.1) fixed my missing frameworks problem.

Older frameworks in Xcode


Why fight for a ruined city?

Question: Why do armies fight so hard to capture cities that are completely destroyed by shelling, fires, bombing etc? What's the purpose?
Comment: Leaving a collection of enemy forces in a bypassed city simply invites attacks from the rear...
Comment: That's pretty broad, do you have any specific examples that you are particularly interested? General reasons can include symbolic/religious/cultural significance, supply lines and resources, strategic significance and staging areas.
Comment: Do you have any examples of a completely destroyed city that was captured? Even Dresden (one of the most badly damaged cities of WWII) was not completely destroyed.
Comment: @Thomo made a comment almost worth an answer.
Comment: In addition to other excellent comments, some cities have more value in their location than in their infrastructure. e.g. Stalingard had geopolitical importance. It sat on approaches to oil rich caucasus fields and commanded the railroad structure towards south and it was also associated with name of Stalin. Thats why they fought for streets, houses and even rooms
Comment: Land sounds like a good incentive. The resources of the place, say the city might have abundant natural resources. It just adds to their economy.
Answer: Can have many different reasons,I will list up here some but since your question is not specfic, I also cannot answer you specifically, but anyway I will provide some generic examples so you can better understand:

The ruins might contain one or more persons or equipments you might want to destroy in order to win the war (e.g. the commander of your enemy hiding in a city even though it is already in ruins)
The place of the ruins might be strategically important because of
geography (e.g. important sea coast)
The place of the ruins might be strategically important because of
assets (e.g. important ressources like oil)
The place of the ruins might be strategically important because of
infrastructure (e.g. located on the only street to another important
places)
The place of the ruins might contain people and weapons who are
willing and capable to disturb you and attack you from behind when
you ignore them (thats why as an army you do not go just around castles, you have to conquer it or the castle will eventually conquer you)
The place of the ruins might have a significant propaganda importance
(e.g. you cannot afford to lose Mekka to a non-islamic country
without weakening the morale of muslims)
Your enemy might actively send reinforcements to these ruins in order to keep you fighting there on purpose (e.g. in order to prepare a strike on another point of interest which is now not-so-heavy guarded since you have all your troops fighting in these ruins)
It is better to pick an already devastated battle ground over a unharmed city full of resources and people, if you plan towards using these resources and peoples after the war and they do not have to be destroyed in order to achieve that (after all, your goal is usually (1) to stop the resistance of the enemys soldiers, not to destroy cities or civilians)

TL:DR - Battles are not about conquering cities. They are about conquering power.
(1) except you actively plan to harm civilians and destroy cities even though they offer no resistance
Comment: Good answer, it would be better however if you were to add one real life example for each case. e.g. 1. Berlin, 2. Sevastopol, 3. No idea 4. Stalingrad, 5. Iwo Jima/Okinawa 6. Moscow/Mecca/Rome/Constantinople
Comment: @NSNoob An important recent example is Stalingrad in WWII. One German goal at Stalingrad was to cut an important transportation rout, Volga river. Besides that taking or defending Stalingrad has huge propaganda value for both sides.
Comment: @Alex Yup I noted that in my comment on main question body.
Comment: @NSNoob: yes, you did, I did not notice: the system does not show all comments, one has to  click on "more comments" :-)
Comment: +1 for geography.  Cities tend not to grow (and especially not large cities) in areas that aren't around something important.

Why fight for a ruined city?


Is there a parser/way available to parse Wikipedia dump files using Python?

Question: I have a project where I collect all the Wikipedia articles belonging to a particular category, pull out the dump from Wikipedia, and put it into our db.
So I should be parsing the Wikipedia dump file to get the stuff done. Do we have an efficient parser to do this job? I am a python developer. So I prefer any parser in python. If not suggest one and I will try to write a port of it in python and contribute it to the web, so other persons make use of it or at least try it.
So all I want is a python parser to parse Wikipedia dump files. I started writing a manual parser which parses each node and gets the stuff done.
Answer: There is example code for the same at http://jjinux.blogspot.com/2009/01/python-parsing-wikipedia-dumps-using.html
Answer: Another good module is mwlib from here - it is a pain to install with all dependencies (at least on Windows), but it works well.
Answer: I don't know about licensing, but this is implemented in python, and includes the source.
Answer: I would strongly recommend mwxml. It is a utility for parsing Wikimedia dumps written by Aaron Halfaker, a research scientist at the Wikimedia foundation. It can be installed with
<code>pip install mwxml
</code>
Usage is pretty intuitive as demonstrated by this example from the documentation:
<code>>>> import mwxml

>>> dump = mwxml.Dump.from_file(open("dump.xml"))

>>> print(dump.site_info.name, dump.site_info.dbname)
Wikipedia enwiki

>>> for page in dump:
...     for revision in page:
...        print(revision.id)
...
1
2
3
</code>
It is part of a larger set of data analysis utilities put out by the Wikimedia Foundation and its community.


How to graph gravity as a function of depth, given radius and density?

Question: I need to do this for a planet that has uniform density, and a planet that has two layers. For the first part, I was given that the density was 550 kg/m³, so I made one column in an Excel spreadsheet that gave mass as a function of radius, then made another column that plugged that $M$ value into $g = \frac{GM}{r^2}$. Then I graphed my $g$ values against my radius, which gave a linear function. I'm not sure if that was the right approach, or of how to make a function for the planet that has more than one density. Does anyone have any ideas on this?
Answer: As long as we deal with a spherically symmetric planet, the mass of the shell above you does not influence the observed gravity; the little mass close by exactly cancels the large amounts of mass far away (you would float inside a planet if it looked like a pingpong ball and had all its mass centered on the surface!), this is called Newton's Shell Theorem.
You can then compute $g$, acting as if the mass $M$ is concentrated at a point on the centre of the sphere. Thus, combining your knowledge of the mass $M$ underneath you, and the radius $r$ towards the center of this planet, you can compute the gravity field using the equation you give!
For a constant density we have a volume $V=\frac{4}{3}\pi r^3$, thus mass $M=\rho_1 V$, and the gravity is given as $g(r)=\frac{GM}{r^2}=G\frac{4}{3}\pi r \rho_1$, linear like you found. For two layers, it is a sum of this first mass $M_1=\frac{4}{3}\pi_1R_1^3$ and second mass $M_2=\frac{4}{3}\pi_2(r-R_1)^3$ but ONLY when this mass is below you, i.e.
$$g^*(r) = \begin{cases}G\frac{4}{3}\pi \rho_1 r & r\leq R_1 \\ G\frac{4}{3}\pi( \rho_1\frac{R_1^3}{r^2}+\rho_2\frac{(r-R_1)^3}{r^2}) & r>R_1\end{cases}.$$
This should not be linear anymore due to the $R_1^3/r^2$ contribution!
Good luck!
Answer: For each point as you descend into your planet you have a balance between gravity due to a solid sphere below you and "counterbalanced" by the gravity due to a hollow sphere of the planet above you.  This last is what is interesting because you are located at a point on the inside surface of the hollow sphere and need to come up with an integral that sums the gravity due to each direction in the hollow sphere. Each direction is a different distance away and a different thickness.
At the center of the planet the inner sphere is gone and the outer one is uniform in each direction so the net gravity will be 0.  On the surface there is no outer sphere (assuming we can ignore the atmosphere) so g is totally calculated by a simple form of Newton's formula.
I hope this gives you enough clues to work out your solution.
Comment: Thanks, I'm fairly sure I've got it.  For both of them I get a mostly linear graph, where g deceases as depth increases.  My professor tells me that once inside the second layer, the gravity due to the outer layer will always be zero.  Does this sound right?  He said there is a proof, but its too complicated to bother with.
Comment: @spinelcity The proof isn't that complicated:https://en.wikipedia.org/wiki/Shell_theorem


Will removed default apps come back after an upgrade to a new release?

Question: I long removed Firefox, Evolution, Brasero and other apps that originally came with Maverick. Will the upgrade bring them back? If so is there a way to prevent this? Also, will other 3rd party apps still work even if they're based on Maverick dependencies? Thanks for your help!
Answer: No, the removed default application will not come back but the new default applications will be installed.
There are two cases:

When the default application is the same between upgrade it will not be installed e.g. Evolution between 10.10 and 11.04
When the default application has been changed e.g. 11.04 the default media player is changed from RhythmBox (10.10) to Banshee so even if you have removed RhythmBox, Banshee will still be installed.

The answer is based on my upgrade to 11.04 from 10.10
Comment: No, it will not as Evolution is still the default application. I will edit my answer to just keep it simple :)
Comment: This is what I meant: "I removed Evolution, will it be back after the upgrade"? I assume in this case the answer is yes, or am I wrong?


Problem creating an Embedded Jetty Endpoint in a NetBeans Platform Application using System.setProperty

Question: I created a Netbeans Platform Application using Netbeans 7.0.1 and the JDK 1.7.
I implemented my own Web Application on a normal module using Embedded Jetty 7.4.5 (consisting of a Web Service and a couple of servlets), and I created a Library Wrapper Module including all the Jetty jar files and the "jetty-j2sehttpspi-7.4.5.v20110725.jar" that I needed to be able to publish the Web Service's Endpoint. The Web module has a dependency on the Jetty module.
The code I'm using is this:
System.setProperty("com.sun.net.httpserver.HttpServerProvider",
   "org.mortbay.jetty.j2sehttpspi.JettyHttpServerProvider");

server = new Server();
JettyHttpServerProvider.setServer(server);

//We read the config file
String[] configFiles = {"etc/jetty.xml"};
for(String configFile : configFiles) {
   XmlConfiguration configuration =
      new XmlConfiguration(new File(configFile).toURI().toURL());
   configuration.configure(server);
}

// Web Services
QueryWeb qWS = new QueryWeb();
Endpoint.publish("http://0.0.0.0:" +
    (server.getConnectors()[0].getPort()) + "/ws", qWS);

// Servlets
HandlerCollection hc = (HandlerCollection)server.getHandler();
ServletContextHandler sch =
    new ServletContextHandler(ServletContextHandler.SESSIONS);
sch.setContextPath("/web");
sch.addServlet(stream.class, "/stream");
// We add the servlet handler to the server's context handler collection
// because it's the one used by the Web Service Endpoint
ContextHandlerCollection chc = (ContextHandlerCollection)hc.getHandlers()[0];
chc.addHandler(sch);

server.start();

When I try and run the application, I get the following error after the "Endpoint.publish" call:
Exiting C:\Program Files (x86)\NetBeans 7.0\harness\run.xml.
Exiting C:\Program Files (x86)\NetBeans 7.0\harness\run.xml.
C:\Program Files (x86)\NetBeans 7.0\harness\suite.xml:500:
    The following error occurred while executing this line:
C:\Program Files (x86)\NetBeans 7.0\harness\run.xml:225:
    The following error occurred while executing this line:
C:\Program Files (x86)\NetBeans 7.0\harness\run.xml:193:
    The application is already running within the test user directory.
    You must shut it down before trying to run it again.

As far as I understand, this is happening because the system can't find the "org.mortbay.jetty.j2sehttpspi.JettyHttpServerProvider" class. Therefore it defaults back to the web server included in the JDK, which causes a conflict since we get both web Servers (Jetty and the JDK's) trying to run on the same port (in this case it's 8081).
The only way I managed to fix this problem was by copying all the Jetty jar files into the JRE's "lib/ext" folder (copying only the "jetty-j2sehttpspi-7.4.5.v20110725.jar" results in no errors, but the server won't start). In this way the system can find the class it needs and all it's dependencies.
I suppose that what's going on is that even if NetBeans uses it's own classpath loader, the System.setProperty method is ignoring this and trying to access the standard classpath, and since a NetBeans Platform Application doesn't actually let you change the classpath directly (that would beat the whole purpose of having modules administered by the NetBeans platform), I don't really know how to make it use the library included in the wrapper module.
I can keep developing the application with the temporary solution I found, but honestly, copying stuff into the JRE folders is not an acceptable solution and will eventually result in distribution and installation problems in client machines (already tried it in a Mac OS machine and I didn't even know where the JRE kept it's libraries to try and do the same dirty trick).
Therefore I want to ask you guys if there is any solution to this particular problem or if anyone has a better explanation of what's going on and how I might fix it without having to recreate the whole architecture of my project (which actually works OK except for this little inconvenient).
Thanks in advance!
Answer: Write your question to the mailing list, email@example.com, and you're more likely to get an answer.


SSDT Project Will Not Publish or Generate Preview When Source and Target Partition Function Not Matched

Question: In a SSDT project there is a partition function defined in a file as follows.
CREATE PARTITION FUNCTION [pfSourceID](varchar(50)) AS RANGE RIGHT FOR VALUES (
'',
'COKE',
'DRPEPPER',
'MOUNTAINDEW',
'PEPSI'
)
GO

There is a scheme to go along defined in another file:
CREATE PARTITION SCHEME psSourceID
AS PARTITION pfSourceID ALL TO ([PRIMARY]);

Tables are defined in files using the following construct:
CREATE TABLE [dbo].[MyTable] (
    [MyTableID] INT NOT NULL,
    [SourceID] VARCHAR(50) NOT NULL
    CONSTRAINT [PK_MyTable] PRIMARY KEY NONCLUSTERED ([MyTableID] ASC, [SourceID] ASC) ON psSourceID(SourceID),
    CONSTRAINT [CIX_MyTableByPartition] UNIQUE CLUSTERED ([SourceID] ASC, [MyTableID] ASC) ON psSourceID(SourceID)
) ON psSourceID(SourceID);

All is well and this works out of the gate when no partitions have been defined on the target.
The problem occurs once the target and source partition functions don't match. (there are partitions at the target that do not match the SSDT project definition such as adding a new partition in ssdt). When the partition functions are un-matched, the deployment pipeline just spins and inside of Visual Studio, the "Generate Preview Script" also goes into a spin.
Maybe there is a need to determine data motion, however, all sql traces indicate very little SQL activity by the account running the deployment. While monitoring the deployment, there were a handful of very quick queries by the account running the publish and "DxSomething" app, then silence until the client process was halted non-gracefully and manually after ~2 hours.
There are two ways to get around the issue.

Make sure the PARTITION FUNTION in the SSDT project matches exactly what is at the target.
(and/or) Check "Ignore partition schemes."

From what was researched, when all data is aligned to an existing partition, using a SPLIT to add a new "BRAND" on the scheme should be relatively fast. The hope was to control this via SSDT, however, if 1 or 2 above are utilized then it would not make sense to use the SSDT :/
UPDATE:
Possible solution would be to split in a "PostScript"
IF NOT EXISTS (select * from sys.partition_range_values where value='NEWDRINK')
BEGIN
   ALTER PARTITION SCHEME psSourceID NEXT USED [PRIMARY];
   ALTER PARTITION FUNCTION pfSourceID() SPLIT RANGE ('NEWDRINK');
END

Then during the next release, the function defined in SSDT would be shored up with the latest. This will be tried tomorrow but still seems backwards or off a bit.
Answer: This was solved by the following steps:

Align the PARTITON FUNCTION checked in to source control with the target databases current state. (If moving properly up the deployment chain, this should not become an issue.)

When a new client comes on board and before loading data, create a release with a PostScript command to SPLIT for the new client and deploy.

Update the PARTITION FUNCTION after deployment to again match the current state.


Trouble starting a Python3.5 program as a systemd service

Question: I created a systemd service titled red-cartridgemom.service:
<code>[Unit]
Description=Red-DiscordBot-CK
After=multi-user.target

[Service]
WorkingDirectory=/home/twop0intfive/server1504/discord_stuff/Red-DiscordBot-CK/Red-DiscordBot/
User=twop0intfive
Group=twop0intfive
ExecStart=/usr/bin/python3.5 /home/twop0intfive/server1504/discord_stuff/Red-DiscordBot-CK/Red-DiscordBot/red.py
Type=idle
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target
</code>
However, when I start the service and monitor with journalctl:
<code>Aug 25 18:04:31 server1504 systemd[1]: red-cartridgemom.service holdoff time over, scheduling restart.
Aug 25 18:04:31 server1504 systemd[1]: Started Red-DiscordBot-CK.
Aug 25 18:04:31 server1504 systemd[1]: Starting Red-DiscordBot-CK...
Aug 25 18:04:31 server1504 systemd[3018]: Failed at step CHDIR spawning /usr/bin/python3.5: No such file or directory
Aug 25 18:04:31 server1504 systemd[1]: red-cartridgemom.service: main process exited, code=exited, status=200/CHDIR
Aug 25 18:04:31 server1504 systemd[1]: Unit red-cartridgemom.service entered failed state.
Aug 25 18:04:31 server1504 systemd[1]: red-cartridgemom.service failed.
</code>
...the service never properly starts.
The file at that path definitely exists. I tinkered around with this for awhile until it dawned on me that perhaps systemctl is seeing

/usr/bin/python3.5

as a file 'python3' of type '.5' - is this possible? If so, is there some way to get around this and have systemd 'see' /usr/bin/python3.5 correctly?
Answer: So!
Someone in a #support channel suggested running
do-release-upgrade
(which caused my bots to stop working last time I did it, which is the reason I was running Ubuntu 15.04 up to now) and now, on Ubuntu 15.10, I'm no longer having the issue above. The person who suggested that was running a nearly-identical script as the one I pasted above in Ubuntu 16.04.1 and not having the issue I was having.
It seems that the '.' in 'python3.5' indeed was the culprit here, but it also looks like this issue in systemd was fixed sometime in between Ubuntu versions.
tl,dr: this problem doesn't seem to exist on Ubuntu 15.10 and above. The fix for me was to upgrade to 15.10.
Thank you for your time!


Is the war pilot obligated to fly the same plane daily or must he change the plane according to every required mission?

Question: Can the pilot change his plane, or can he fly in any plane, obediently, to the same plane as the one trained on it?
Comment: a "war pilot"? do you mean a military?  If so, which kind? fighter? bomber? transportation? trainer?
Comment: Welcome to AviationStackExchange. In order to better your chances of getting a fact based answer, please limit your questions to those that are not opinion based. Also, narrow your questions to specifics. Details will provide clarity for the answerers.
Comment: Hi Haitham, do you mean that the pilot flies the same plane type (like Airbus 320), but just changes between different individual planes, or do you mean planes of different type (like Airbus 320 / 350)? Or maybe even planes of whole different category or manufacturer (like Airbus/Bombardier)?
Comment: Thanks for the edit, Haitham. I just saw it. I've already answered your original post to the best of my ability. Hopefully, a current military pilot can further expound upon it for your specific military interest.
Answer: Of which type of pilot are you asking:

Student
Military
Private (hobbyist)
Corporate
Airline

I will be using the term licensed to loosely mean certificated, current, and proficient with the proper endorsements and documentations.
The short answer is no. They are not obliged/obligated to fly the same aircraft. The pilot can choose to fly in any aircraft they want. They will more than likely choose an aircraft that fits their mission.
The long answer depends on the mission. This might determine if the pilot gets the opportunity to fly at all. Or, what "mission" (job, employer, flight school, opportunity) they choose to seek. But, all aircraft fly a differently from each other. In the same make and model, the differences may be slight. In the same category and class, the differences may be very challenging. In different categories, classes, and types, the differences may be too great to overcome without specific training.
Students:
Most instructors will want their students to stick to one type of aircraft for their initial training (first 35-80 hours). That does not mean it will be the exact same aircraft. Large schools may have several identical aircraft of the same make, model, and avionics (when possible). The students will be expected to fly whichever aircraft is available at the time of the lesson. Although, the instructor can endorse the student to fly solo in any aircraft the instructor feels the student can handle on their own. This is essential in developing habits, muscle memory, and structure.
After initial training, the student (then private pilot) is then only limited to flying the same category and class of aircraft in which he/she was trained. Although he student can seek training in another category and/or class. I flew both single engine land airplanes, and helicopters.
Private (hobbyist):
A private pilot can fly any aircraft for which they are properly licensed. The license will only stipulate category and class of aircraft for which a type rating is not required, type rating, and other flight category ratings. Type ratings are usually required for large and/or turbine aircraft. Some other ratings are based on flight categories (VFR vs IFR). There are some restrictions based on medical requirements. And, some flight categories will require specific endorsements (tailwheel, high altitude, high performance, complex, aerobatic, etc.) They can also fly in aircraft for which they are not properly licensed if a properly licensed Pilot-in-Command is also flying at the controls.
There is a class of hobbyist pilots who are very limited in the type of aircraft that they fly. These pilots need endorsements for any aircraft outside of their specific category, class, or type of aircraft.
As a practical matter, a hobbyist pilot may fly several aircraft based on availability. There are flying clubs and aircraft rental companies that give pilots access to aircraft as they wish. Provided the pilot has the proper license and is able to perform adequately on a flight evaluation. I regularly fly several different Piper Cherokee varieties, Cessna 150/2, 172 and 182 varieties, SportCruisers, Robinson R-22s, etc. Availability and cost both play a factor.
Corporate & Airline:
Generally, these types of pilots will hold type ratings in specific makes and models of aircraft. Since it is a pretty large expense to maintain currency of these type ratings, which ones they will be able to exercise might be limited. Which specific aircraft they fly within their license requirements will be up to the needs of their employer at that time. They may fly different aircraft day by day, or even flight by flight on the same day.
These pilots can still exercise the privileges of their private pilot certificate and many do. In which case, they are free to fly any aircraft for which they are licensed. Their employer may limit them to only fly on a for-hire basis for the employer, solely. That does not limit them from flying as a hobbyist.
Military:
The military is going to determine which aircraft the pilot flies. It is the military after all. What the pilot flies is going to be based on the needs of the military. The pilot can make requests. But, being in the military means that the pilot has volunteered (in the U.S.) to do what they tell him/her to do.
Generally, that is going to be mission and budget based. The military will train the pilot for a specific type of aircraft, for a specific type of mission. If the pilot or aircraft does not suit the mission, they use a different pilot. If the military chooses to use the original pilot, they send them back to training for that specific aircraft, for that specific mission.
Both the trained pilot and the aircraft they are flying are very valuable assets. They are expensive tools that the military will handle with care (sort of). Mistakes cost lives and money.
What this means from a practical sense is that a pilot will not flip-flop between types of aircraft. There would have to be a very compelling reason to do so (like change of duty station or aircraft inventory). For the most part, the pilot will be assigned a specific individual aircraft unless the mission dictates otherwise. After all, it is their weapon. They must be proficient with it.
Think of it this way. You are not obliged/obligated to drive a certain car. You drive the car that fits your needs and budget. But then again, you are not obliged/obligated to work for an employer who may require you to drive a certain company vehicle.
Comment: Not all nation's military pilots are assigned an individual aircraft. Take the RAAF for example. The assigned aircraft is determined by a lot of external factors including lifing, configuration of external fuel tanks, serviceability, etc. Just because their name is on the jet, doesn't mean anything. Birds are swapped between units to suit the mission so it might not even have the right squadron markings.
Comment: @Craig - Thanks. Your comment is duly noted. Assigned is a very tricky term. For instance, an infantryman will be assigned a rifle. That does not mean the rifle is theirs to keep forever. Depending on the mission, they could be assigned a different weapon system all together. Or, may even be assigned a weapons system from a different unit. That weapon is their responsibility until signed back in to the armory. But, anyone could be called upon to use that weapon in the heat of combat. Whatever the military needs. Not necessarily by individual choice.
Comment: Combat aircraft often were assigned to single crew for their tour of duty, which is how all the bombers could have names and unique images on them and fighters the name of pilot and marks of their aerial victories. But the same was never true of cargo aircraft when e.g. on The Hump (India-China air bridge) they were approaching 20 hour a day utilization towards the end. That means the aircraft were almost constantly flying or loading and unloading when not being overhauled and constantly changing crews as one crew only flew 60–70 hours a month (750 flight hours in a year).
Comment: @JanHudec - Thanks, Jan. I'm assuming the OP is asking more about pilots jumping from plane to plane rather than one plane having multiple pilots. Something like a pilot flying a fighter/interceptor like an F-16 on Monday to secure the airspace. Then jumping in an A-10 on Tuesday to provide troops ground support. Or, even a transport aircraft like a C130 or C17, if the mission required it. I would imagine even changing to a different type of weapons system on the same airframe would require some amount of training. I could be wrong, though.
Comment: @DeanF., I don't think they needed type ratings for C47 and C46 back then, just multi-engine endorsement, but these days they certainly have some kind of type rating for most types just like civilians do.


How to host and play videos in a drupal site?

Question: Just that, I need to host and play videos in a drupal site. I mean not using vimeo, youtube...
Comment: You probably want to host videos on amazon (S3). Theres a module for youtube http://drupal.org/project/media_youtube but not sure about vimeo.
Comment: I mean to host the videos file in my own hosting.
Answer: Something along the lines of the Video module?

Video module allows you to upload video in any format, play video in
  any format, transcode video to H.246, Theora, VP8 using Zencoder or
  FFMPEG automatically creates video thumbnails, stream videos from
  cloud, HTML5 videos with mobile device playback compatibility. Very
  reliable API for converting videos and auto thumbnail, embed video to
  node body using WYSIWYG module (D7 only) and many more.
Answer: Another viable option is the MediaElement.js module. I've had great success with it, and it's HTML5 too! If your site is on Drupal 7 of course. This module also does sound files as well.
Comment: WHat is its benefit? Does it mean I do not need a video transcoder? I am looking for self hosted video transcoding option. There is ffmpeg, but not all hostings support it.
Answer: You can host and play video using Kaltura module

Kaltura is the world's leading Open-Source Video Platform, providing
  video management, publishing, authoring, distribution and monetization
  solutions for media companies, enterprises, educational institutions
  and service providers. Our customers include HBO, ABC, Disney, Best
  Buy, Texas Instruments, NYU, MIT, Cornell, and many others.

Drupal 7 compliant (Kaltura also offers a module for Drupal 6)
Easy upload of video, audio and image, with automatic transcoding
Import video directly to your site or record from a webcam
User Engagement - allow users to add video and audio comments on any page
Reach your users anywhere and on any device (including iPhone and iPad, web, and set-top boxes
Full control of the player and content – play your own ads and create your own related content
Hosting, streaming and automatic transcoding of media - all seamlessly performed on the Kaltura cloud (or on your local Kaltura installation)
Easy skinning, theming and integration with other Drupal modules
Flexibility and granularity - Each media file is created as a Drupal Video Field
Drupal permissions integration – Administrators decide who can view/edit content and metadata, with granular permissions at field level
Full integration with Drupal Views - including predefined views
Full synchronization of content, metadata and tags between Drupal and the Kaltura system
Comment: But it is not straight forward to install it. I saw it, but did not understand how to install the community edition.


Plasmid Expression Vector

Question: If I am going to transform a plasmid into a bacterium, which will then be fed to a C. elegans, the expression vector needs to be bacterial correct? The other option is to have a worm expression vector, but I just wanted to make sure that I was correct in my thinking. Thank you.
Comment: Are you trying to express the plasmid's contents in *C. elegans*, so that its cells are producing the gene product, or do you want the bacteria to produce the gene product so that *C. elegans* can consume the protein?
Comment: I am trying to express the plasmid's contents in c. Elegans so it's cells are producing the product
Comment: _C. elegans_ do not express the genes of organisms they eat. To create  transgenic worms you either need to microinject purified DNA, or use biolistic transformation (using microparticles coated with DNA). Ingestion does work if you are trying to use RNAi to knockdown expression of a _C. elegans_ gene, but in that case the double-stranded RNA is expressed from a bacterial expression vector. You can also synthesize dsRNA _in vitro_ and soak the worms in that, which I believe also enters when the worms "eat."
Answer: You are trying to express the plasmid in C. elegans, so it should be a worm expression vector and promoter. Otherwise, it will be expressed in the host bacteria, but not in the worm, so you won't get the phenotype you're looking for.
One thing you can do is add a bacterial origin of replication to the vector (if one isn't already present) so the bacteria produce multiple copies of the plasmid after transformation. Otherwise, the amount of plasmid consumed by the worms will be rather low.
Comment: Perfect, thanks a lot for your advice, I appreciate it.

Plasmid Expression Vector


Fock Space, Propagator

Question:
Is it correct to say that a classical time-varying wave function is a map $\mathbb{R}\times\mathbb{R}^3\xrightarrow{\psi}\mathbb{C}$ (saatisfying certain conditions at infinity)?
Is it correct to say a quantum field is a map $\mathbb{R}\times\mathbb{R}^3\xrightarrow{\phi}\mathbb{F}^\mathbb{F}$ (satisfying certain conditions at infinity, $\mathbb{F}=\bigoplus_n\mathbb{H}_n$, and $\mathbb{H}_n$ is a Hilbert space)?
In his book "Quantum Field Theory and the Standard Model," Matthew D. Schwartz on page 30 remarks that "kinetic terms are bilinear, meaning they have exactly two fields." As an example he mentions $\frac{1}{2}\phi\Box\phi$. Is it not standard notation practice in QFT to elide the composition operator $\circ$, so that this example could be written $\frac{1}{2}\phi\,\circ\,\Box\phi$? If $\Box\phi$ is derived from $\phi$, then how is this an example of "exactly two fields"?
In his Lecture notes, Chapter 3, Feynman Calculus, Professor Etingof explains that calculation of coefficients "$A_i$ reduces to calculation of integrals of the form $\int_VP(x)e^{-B(x,x)/2}dx$ where $P$ is a polynomial and $B$ is a positive definite bilinear form (in fact, $B(v,u)=\partial_v\partial_u(c)$)." Should this not be "nondegenerate" positive definite bilinear form? In his statement of Wick's theorem he writes, "Let $B^{-1}$ denote the inverse form on $V^\ast$." Does this bilinear form relate directly to Schwartz's remark in my question 3.? If $B^{-1}(l_i,l_{\sigma(i)})$ in his Theorem 3.1 is indeed a (Feynman) propagator, how exactly does it relate to Schwartz's $\Pi=-\frac{1}{\Box}$ on page 41?
Comment: Professor Etingof's [notes in question](https://ocw.mit.edu/courses/mathematics/18-238-geometry-and-quantum-field-theory-fall-2002/lecture-notes/)
Answer:
It is unclear what is meant by "classical time-varying wave function". For example:

The quantum state of a particle without spin in three dimensions is a function $\mathbb{R}^3\to \mathbb{C}$. Its time evolution gives a map $\mathbb{R}\times\mathbb{R}^3\to \mathbb{C}$. But this isn't "classical".
A classical complex scalar field in $\mathbb{R}\times\mathbb{R}^3$ is also a function $\mathbb{R}\times\mathbb{R}^3\to\mathbb{C}$. But this isn't a "wave function" (at least, in its usual meaning: some kind of quantum state).

It is true that a quantum field is (roughly) a map from space-time ($\mathbb{R}\times\mathbb{R}^3$) to the endomorphisms of a Hilbert space $F$. However, if the $H_n$ are the Hilbert spaces of $n$-particle states, then it isn't true in general that $F$ is decomposed as their direct sum. That is only true for the free theory.
The kinetic term is $E(\phi,\phi)$, where $E$ is the bilinear map given by $E(\phi_1,\phi_2)=\phi_1\circ\square\phi_2$. This is the sense in which the kinetic term is bilinear and "has exactly two fields". Perhaps it's clearer to say that the kinetic term is quadratic in $\phi$.
$B(\phi, \phi)$ is the quadratic part of the action. That includes the kinetic term plus possibly a mass term $\sim m^2 \phi^2 $. For a massless theory, the quadratic part equals the kinetic term. We can rewrite a bilinear form $B$ as a linear transformation $\tilde{B}$ followed by a scalar product:
$$
B(\phi_1, \phi_2)=\left<\phi_1,\tilde{B} \phi_2\right>.
$$
The inverse form is $B^{-1}(\phi_1,\phi_2)=\left<\phi_1,\tilde{B}^{-1} \phi_2\right>$. In the case in which $B(\phi_1,\phi_2)=\int d^4x \phi_1\square\phi_2$, we have $\tilde{B}=\square$ and therefore the propagator is $\tilde{B}^{-1}=\frac{1}{\square}$.
Comment: (1) Of course I ought not have used the word "classical." (2) The elements of A for a map A x X ---> X are _operators_ on X. I would say a map E ---> A is a _field of operators_ on E. (3) & (4). I understand that a bilinear form B : V x V ---> F on a vector space V over a field F corresponds to a matrix relative to a basis for V, and that B is non-degenerate iff the matrix is invertible. My *real* question is to understand exactly the abstraction in Professor Etingof's version of Wick's Theorem relative to the concrete version of Wick's Theorem in, say, Peskin-Schroeder pp.88-90.
Comment: @EllisDCooper About (2): I agree with you, but I don't ser how what you say in the comment is related to what I say in the answer. I'm stating that the space $X$ ($F$ in the concrete case of the question and answer) is the Fock space of $n$-particle states only in the free case
Comment: About(2): The minor point is that whatever F is, a direct sum or a quotient or whatever, a quantum field is a field of operators defined on spacetime E which are endomaps of F. (I would note that lectures by Scott Glasgow on creation and annihilation operators define  bosonic Fock space as a direct sum of Hilbert spaces. So, a reference to the Fock space for the interacting case would be important to me.) Regarding (3)-(4): I am still befuddled by Etingof's definition of B as the Hessian of a function S. And, he says it is the Hessian evaluated at a minimum of S. I have yet to see.
Comment: @EllisDCooper About (2): I don't know how to say this in different way: first, a field of operators on $E$ **is** (roughly) a map from $E$ to $F^F$ (and I don't see how what we say about this differs in any way); second, *$F$ doesn't need to be a Fock space* (but it clearly is in the free case)
Comment: @EllisDCooper About the Hessian thing: roughly speaking again, a function $S$ of several variables is Taylor expanded around a minimum as $S(\vec{x})=b_{ij}x_ix_j+\cdots$. The coefficient of the quadratic term $b_{ij}$ is the Hessian evaluated at the minimum.
Comment: About the Hessian thing: [Reference: Deligne et al, "Quantum Fields and Strings: A Course for Mathematicians"] The _correlator function_ may be defined one way in the Operator Language, and formally in a different way in the Path Integral Language. The former is in terms of a time-ordered product of operators (presumably F ---> F !). The latter is in terms of solutions of Euler-Lagrange equations as critical points of the action functional, hence considering the non-degenerate positive definite symmetric bilinear form: the Hessian of the action S, hence the "kinetic energy" term, which is B.
Comment: @EllisDCooper That's true! I didn't realize I was switching from one formulation to the other so I forgot to mention when was I using which one. Sorry for that if it confused you more.
Comment: Things are really coming together for me because of this conversation with you. Most importantly is Appendix 2 Page 15 of Zee's book, which really brings home what you have suggested, leading to the Hessian Thing. (I had to go look up a basic fact in Morse theory about critical values. My course on that with Kuranishi at Columbia was around 1968.)
Answer:

Is it correct to say that a classical time-varying wave function is a map $\mathbf{R}\times\mathbf{R}^3\xrightarrow{\psi}\mathbf{C}$ (satisfying certain conditions at infinity)?

It could be modeled that way, sure. But this describes a single wave function. If we were interested in the space of wave functions, we would be looking at some subspace of $L^{2}(\mathbb{R})$.

Is it correct to say a quantum field is a map $\mathbf{R}\times\mathbf{R}^3\xrightarrow{\phi}\mathbf{F}^\mathbf{F}$ (satisfying certain conditions at infinity, $\mathbf{F}=\bigoplus_n\mathbf{H}_n$, and $\mathbf{H}_n$ is a Hilbert space)?

Hmmm...this is misleading, I think because quantum fields are operator densities, whereas I'm not certain $\mathbf{F}^\mathbf{F}$ captures this aspect to them. (Now, I may be ignorant of various theorems mathematical analysis which supply the necessary & sufficient conditions for an operator density to be represented by a function, so just be aware of that caveat.)
When I say "operator density", I mean -- physically -- we ought not ask the question "What's the value of the field at this point?" But it is meaningful to ask "In this region, what is the average value of the field?"
I keep arguing back and forth whether $\mathbf{F}^\mathbf{F}$ provides the right domain for this. The number operator lives there, but it's also implicitly defined over a region of spacetime. The creation and annihilation operators live there too, and they're operator densities.
There's also subtleties surrounding interacting field theories...

In his book "Quantum Field Theory and the Standard Model," Matthew D. Schwartz on page 30 remarks that "kinetic terms are bilinear, meaning they have exactly two fields." As an example he mentions $\frac{1}{2}\phi\Box\phi$. Is it not standard notation practice in QFT to elide the composition operator $\circ$, so that this example could be written $\frac{1}{2}\phi\,\circ\,\Box\phi$? If $\Box\phi$ is derived from $\phi$, then how is this an example of "exactly two fields"?

Well, two things:
First, Schwartz is a little sloppy here. By they "have exactly two fields" he means that there are two factors of the same field in a given kinetic term, or derivatives of the same field. So there are two factors in this kinetic term: the field $\phi$ and the D'Alembertian of the field $\Box\phi$.
Second, remember composing functions $g\circ f$ requires the codomain of $f$ to be the domain of $g$. We cannot write $\phi\circ\Box\phi$ because $\phi\colon\mathcal{M}\to\mathrm{``something"}$ a field is a "function" which takes in a point in spacetime $\mathcal{M}$ and produces "some value"...not a point in spacetime. So composing $\phi\circ\Box\phi$ is a "meaningless" (wrong) statement.
Comment: (1) I should not have used the word "classical" in my question. (2) Is an "operator density" like a probability density? (3) If f is a real-valued function of a real variable, then f' is also a real-valued function of a real variable, Therefore, f and f' can be multiplied, and they can be composed. Multiplication is commutative, but composition not necessarily.
Comment: @EllisDCooper (2) Well, "operator valued distribution" might be a better phrase, not related at all to probability theory. (3) But a quantum field is not a real-valued function of a real variable (remember: $q$-numbers are not $c$-numbers), but even classically your reasoning breaks down when talking about functions of $\mathbb{R}^{n}$ unless it's an $\mathbb{R}^{n}$-valued function...and even then, there's subtleties (confusing spacetime with the internal space, etc.).
Comment: @EllisDCooper Also, composing functions is not the same as multiplying them. If $f(x)=x^{2}$ and $g(x)=\sin(x)$, then $(f\circ g)(x) = f(g(x)) = \sin^{2}(x)$
 whereas $f(x)g(x)=x^{2}\sin(x)\neq\sin^{2}(x)$.
Answer: Pretty much everything I was trying to understand on this question is handled by A. Zee, "Quantum Theory in a Nutshell." Basically, my confusion was not appreciating that there are multiple approaches to understanding what a Feynman Diagram is. The "canonical" approach versus the "path integral" approach, for me, loses out in terms of my personal "principle of least thought." This is basically that I seek understanding in terms of the least number of steps, each of which is no greater than my intuition can handle.

Fock Space, Propagator


Create local table and foreign table from the same SQL

Question: I want to build a set of PostgreSQL databases that derive from a separate structure definition. The structure is defined as a set of .sql files that will be imported using docker-entrypoint-initdb.d during start.
One of the databases will have regular tables that are created e.g. like this:
CREATE TABLE data."origin" (
    origin_id serial PRIMARY KEY,
    name text UNIQUE
);

Another database needs to be connected to this one using foreign tables that should have the same structure, e.g.
CREATE FOREIGN TABLE data."origin" (
    origin_id serial,
    name text
)
    SERVER localdb
    OPTIONS (schema_name 'data', table_name 'origin');

So the question is, whether there is an elegant way to use the original .sql files from the first database to construct the second one as well.
The only way that we have in mind is to fiddle with sed or similar magic during the image build to add the FOREIGN and the SERVER … stuff in there, remove the PRIMARY KEY etc. This will most likely break sooner or later.
Answer: I think I'd try to get a list of tables from the .sql file (or directly from the server to which you applied the .sql file), then feed that list of names to IMPORT FOREIGN SCHEMA ... LIMIT TO (...).  That seems less error prone than what you are envisioning.


Embedded Python - Blocking operations in time module

Question: I'm developing my own Python code interpreter using the Python C API, as described in the Python documentation. I've taken a look on the Python source code and I tried to follow the same steps that are carried out in the standard interpreter when executing a py file. These steps (sequence of C API function calls) are basically:
<code>PyRun_AnyFileExFlags()
  PyRun_SimpleFileExFlags()
    PyRun_FileExFlags()
        PyArena_New()
        PyParser_ASTFromFile()
        run_mod()
            PyAST_Compile()
            PyEval_EvalCode()
                PyEval_EvalCodeEx()
                    PyThreadState_GET()
                    PyFrame_New()
                    PyEval_EvalFrameEx()
</code>
The only difference in my code is that I do manually the AST compilation, frame creation, etc. and then I call PyEval_EvalFrame.
With this, I am able to execute an arbitrary .py file with my program, as if it were the normal Python interpreter. My problem comes when the code that my program is executing makes use of the time module: all time module operations get blocked in the GIL! For example, if the Python code calls time.sleep(1), this call is blocked and never gets executed.
Obviously I am doing something wrong that blocks the GIL (and therefore blocks the time module) but I dont know how to correct it. The last statement in my code where I have control is in PyEval_EvalFrameEx, and from that point on, everything runs "as in regular Python interpreter", I think.
Anybody had a similar problem? What am I doing wrong, so that I block the time module?
Hope somebody can help me...
Thanks for your time. Best regards,
R.
Comment: I imagine your sleep is whats blocking the GIL. Any compelling reasons to be running a homebrew interpreter?
Answer: You need to provide more detail.

How does your interpreter's behavior differ from the standard interpreter?
If you just want to run arbitrary source files, why are you not calling one of the higher level interfaces, like PyRun_SimpleFile? Did your code call Py_Initialize?


Can I truncate inventory_source_item table?

Question: I deleted all the products in the admin, but I noticed that the table inventory_source_item is still full of all the products that do not exist anymore. So, I suppose deleting the products does not delete the relation of product stock in this table. Can I truncate it safely?
Answer: It's generally not recommended to directly manipulate the database tables without understanding the impact it may have on your application. Truncating the inventory_source_item table can potentially cause data integrity issues, especially if your application relies on this table for any inventory-related functionality.
Instead of truncating the table, you can try using the command line interface or API provided by your e-commerce platform to update the inventory information. This way, the changes will be reflected in both the inventory_source_item table and any other relevant tables.


How can I know in which websites I have created accounts using my Gmail ID?

Question: For sign up in any website like Facebook, Pinterest we need to give our email ID. I have been using my Gmail ID almost in every case but after three, four years I have forgotten some sites in which I had created accounts.
Answer: Go to your account, click on Dashboard under Account in the left pane.
Find Authorize Account Access and click on the link. Sign in again and you should get a list of all sites accessing your information through your google account.
Answer: There are several different paths you can take to get to the list of authorized sites. Here's one:

Go to your Google Account Settings
Click on Security (in the left menu)
Scroll to the bottom under "Connected applications and sites" click the Manage access button

You will probably need to re-enter your password as a security measure

You are presented with a list of all the sites where you've used your Google Account (a.k.a. Gmail address). (You can revoke access for any of these by clicking the button next to it)


What is the difference between object tracking and trajectory prediction?

Question: In autonomous driving, we know that the behaviour prediction module is concerned with understanding how the agents in the environment will behave.
Similarly, in the perception module, the tracking algorithms are responsible for getting an estimate of the object's state over time.
Comment: Can you please provide a link to a reference that says that autonomous vehicles are equipped with a "behaviour prediction module" and a "perception module", which makes you think that they are different? Note that I'm not saying that this is or not the case. I just think that this post is not fully clear, especially because I don't immediately see the connection between what you wrote in the title and in the body of your post. Can you please connect the two in a clearer way?
Answer: Although both processes might be doing estimations (because data sources aren't perfect and/or have noise), there is a key difference:

Object tracking cares solely abouth where objects are now. That means that there is actual sensor data that can support the current position. For example: from a camera and a lidar, the computer predicts where a vehicle stands.

Trajectory prediction is done with the main purpose of predicting where objects will be in the future, meaning that there is no sensor data yet. For example: from past data, the computer predicts where a vehicle will be after 1 second from now.

However, both processes might need each other. In order to predict a trajectory, it could be easier to work with curated positions given by an object tracker than raw sensor data. On the other hand, past predictions might be given as input to an object tracker, in order to mitigate noise in the sensor data and acting so as a belief-based filter.
Comment: Your definitions look reasonable to me, but I am not an expert in this area, so I cannot assess the correctness of this answer. Are these definitions common in the context of computer vision (or whatever the context is)? Maybe you should provide a link to a reference for more details (given that the OP was also mentioning _autonomous vehicles_ and it's not clear if your definitions apply to that context or, in general, apply to any computer vision applications), but I guess this is not necessary, if you more or less familiar with these topics.
Comment: there is a presentation made by kris kitani in robust video scene understanding workshop,start from 5:55 https://www.youtube.com/watch?v=bwIgpxmWnWM&t=22137s


How to derive the time period equation for a spring mass system taking into account the mass of the spring without involving energy analysis?

Question: I want to know the way to derive the time period equation of a spring mass system accounting for the mass of the spring but not using the energy analysis method but by proceeding in the same way as we do by ignoring the mass of the spring. Please help. I did not find any texts at my level. Any links would suffice gratefully.
Comment: If you account for the mass of the spring, you end up with a wave equation coupled to a mass at the end of the elastic medium of the spring. The result of that is a system that does not just have one period, but a whole continuum of solutions. If you don't want that, you have to place the mass of the spring somewhere along the spring. If you place it on the fixed end, the spring mass doesn't matter. If you place it on the mass end, it simply adds to the mass. If you place it anywhere else, then you have a system with two massless springs and two masses, which has two frequencies, again.
Comment: Placing the mass of the spring any where along the spring as an assumption in the beginning yields an incorrect expression. I know from energy analysis that the effective mass of the whole spring mass system is M+(m/3), where M is the mass of the block attached and m is that of the spring. But I want to use the method of integration and differential equations rather than taking the kinetic energy and potential energy to see the effect.
Comment: If the mass of the spring is homogeneously distributed along the spring, then the system is not a simple harmonic oscillator with an effective mass but it's an elastic medium that follows a wave equation. As far as I can see, it does not matter what you do, the effective mass treatment is plain wrong with either assumption.
Comment: I think every infinitely small element on the spring taken as an individual mass undergoes simple harmonic motion. http://en.wikipedia.org/wiki/Effective_mass_(spring%E2%80%93mass_system) and there must be a way to integrate those small shms to find the equation of motion of the whole system.
Comment: Only if you additionally assume that M>>m AND that none of the degrees of freedom of the spring are excited. Then you can imagine replacing each small mass element $dm$ with a massless rod and an equivalent mass element $d\tilde{m}$ moving with the main mass M. Since the individual mass elements $dm$ that are closer to the wall are acting on a shorter (and therefor stiffer spring), the effective mass of their virtual counterpart $d\tilde{m}$ moving in parallel with M must be smaller than those $dm$ that are closer to M. If you integrate the weight factors, you should end up with the 1/3.
Answer: I needed to solve the same question. Here is what i did:-
Suppose that we have a spring of mass $M$ with a mass $m$ attached to it, suspended against gravity. Assume that the mass of the spring is distributed evenly through its length. So, we can imagine our spring to be divided into infinitesimally small springs. Each small spring will have its own rate of oscillation depending upon the effective mass felt by it. Suppose the length of the spring lies along $x$ axis with origin at the bottom tip of the spring.
Now, assume that we have completely compressed the spring such that it can no more be compressed against its solid self. Let the length of the spring in this state be $L$. Now, for a small spring element located at a distance $x$ from the bottom in this state, time period $T$ of oscillation will be given by-
$T=2\pi \sqrt{\frac{\frac{M.x}{L} +m}{k} } $
Here, $k$ is the spring constant of the spring element.
So, frequency $f$ of simple harmonic motion can be given by-
$f=\sqrt {\frac{k} {\frac{M.x}{L} +m} } $
We realize that every spring element will have different frequency of oscillation. To simplify and approximate, we can imagine the entire spring to have the frequency of the spring element located at the middle of the spring.
So, for the time period of the entire spring, we get-
$T=2\pi \sqrt{\frac{\frac{M}{2} +m}{k} } $
Problem solved...!
Note that this solution will be valid only for a small time duration after the spring is allowed to oscillation. For example, if we let the spring oscillate for several minutes, we will start observing discrepancy. But for small time duration since the beginning of the experiment, the results will be quite accurate.
Edit: I just checked my physics lab manual, which has following equation for $T$:
$T=2\pi \sqrt{\frac{\frac{M}{3} +m}{k} } $
So, my answer was close. My approximation turns out to be too crude, and instead of assuming the frequency of the whole system to be close to that of the spring element halfway, we can get a better approximation if we assume it to be one-third from bottom, for the sake of calculus...
The equation in the book is also approximate, one must remember.


Questioner's Remorse

Question: One way to reduce the volume of low-quality questions would he to allow the OP to remove a question (perhaps only if it had gotten no responses). I have a question posted right now, collecting "close" votes, that I would like to delete. Maybe this one is another. :-) If there is a way for me to delete the question, it is not obvious enough for my brains.
Comment: Are you suggesting that making it safe to ask low quality questions will reduce the number of low quality questions?
Comment: @user192936 -- Yes, [downvotes are different on meta.](http://meta.stackoverflow.com/faq#vote-differences) Also, see kiamlaluno's answer as to why people may "disagree".
Comment: Don't delete, improve.
Comment: I really do not understand the slap-downs. Does disagreement with a suggestion warrant a down-vote? User192936 is deeply wounded. When I posted the question on StackOverflow that I would like to delete, it did not occur to me that it was off-topic. Otherwise it is a fine question. The only way to improve it (for StackOverflow) would be to change it into something completely different. I actually thought of doing that, but I could not think of a good question offhand. Everyone makes mistakes. To err is human, to forgive is not allowed. Edit: Just got slapped up again.
Comment: If you need it to be migrated, you can either wait for the close votes to kick in or flag it for moderator attention.
Answer: Users are already allowed to deleted their own questions without an answer with a score higher than 0 (which includes also a question without any answer). In such case, the OP is allowed to delete her/his own question, even without closing it first.
Keep in mind that deleted questions are considered a bad sign, and you could be blocked from asking any further question, if you have too many deleted questions.  (Note that this is just one of several factors taken into consideration.)
Deleted questions are not a sign of less low-quality questions; it is rather the opposite. If some of your questions are deleted, it means they were low-quality questions, or they would not have been deleted. If they are not low-quality questions, they are surely questions not appropriate for the site where you asked them, which means they could be too localised, not real questions, or not constructive.
Comment: @PopularDemand - Fear not. I had already put away the razor blades. Pardon me while I go shut off the engine of my car. It is idling in the closed garage.
Comment: Welcome to Meta, @JiveDadson! That's not sarcasm; I, for one, am always happy to see a new face here. As Ernest said in his comment, downvotes here don't work in quite the same way they do on other sites. Please don't take it as us being harsh or trying to slap you down, because that's neither what it means nor what we intend. We always appreciate posts made in good faith, whether or not we agree with the specific suggestion.
Comment: I missed the little "delete" clicker. Was looking for it in the editor. Gosh you guys are harsh.

Questioner's Remorse


Kernel initialization in UEFI mode

Question: When using old legacy BIOS (consider X86 architecture), the boot loader jumps to a location at the real mode kernel (offset 512 which is defined in header.S assembly file) and starts the real mode code. The real mode code then prepares a stack and heap and jumps to main.c again in real mode. What about UEFI boot mechanism? Is the real mode kernel code still used? Does the boot loader jump to that same part of header.S and give control to that same code in real mode? More exactly, what is the difference of kernel initialization at the moment the boot loader jumps to OS code between legacy BIOS boot and UEFI boot?
Comment: If you want a Linux-specific answer, you probably should tweak this question to say "Linux" somewhere.  Ironically, there's an alternative question, that wouldn't refer to `header.S` and `main.c`, that would address this process in a manner that is _not_ Linux-specific.  After all, the mechanism that you are asking about actually isn't.
Comment: @JdeBP My question is clear and is asked hopefully in the right place. If you have the knowledge to share and answer this question I appreciate if you do so, otherwise I don't see a reason for you to remind me of how a correctly structured question looks like.
Answer: Real mode code is not used when the EFI stub mechanism is used. The firmware (executed from flash ROM on the motherboard when the machine is booted) switches the processor to protected mode before loading the kernel image. The kernel image header is constructed to look like a PE executable as mandated by the UEFI specification. For more information see this Intel article.
Edit: added some info demanded in the comment below. arch/x86/boot/header.S contains the definitions that make the file look like a PE binary when compiled with CONFIG_EFI_STUB. The firmware calls the entry point placed in the header; the entry point is efi_pe_entry in arch/x86/boot/compressed/head_64.S. This routine calls make_boot_params and efi_main in arch/x86/boot/compressed/eboot.c. The former constructs a boot_params structure, and also loads an initramfs if specified on the command line. The kernel command line is also handled differently: UEFI takes care of it too, but because UEFI uses UCS-2 encoded strings (a subset of Unicode), they are converted to ASCII. Both header.S and head_64.S contain a lot of code that is common between the EFI stub and traditional way of booting.
Ps. UEFI may some day make it possible to get rid of Real Mode in x86 processors for good. It is only used for booting modern operating systems.
Comment: Thanks but I have not gotten my answer of how the kernel initializes then? Parts of some important initialization code are in real mode kernel, so those jobs must be done somewhere else when real mode code is not used. What code (which kernel files) tackle the same responsibility of real mode code? To what location does the boot loader jump? I want to read the code at that place. (the c or assembly file) Unfortunately it's not documented in Linux boot protocol clearly.

Kernel initialization in UEFI mode


Using Windows 7 to access files on a Ubuntu PC

Question: I have a laptop that I'm currently using to dual boot Win 7 and Ubuntu 12.10. Works great... no problems with that part.
I've recently been given a couple of old hand-me-down Dell PCs with moderately sized hard drives to do with as I see fit. As I'm sure most of you know, more storage is always a good thing, so I was playing around with the idea of using these PCs as sort of an external storage drive or server. I have some other hard drives laying around and I was hoping to install Ubuntu on one of the smaller ones, and then use the other two drives from the Dell PCs purely as storage.
I'm relatively certain I could achieve that goal easily enough. My question is how would I go about connecting that "new" PC to my laptop in a way that Windows could not only detect, but also read and write to those two extra hard drives? I mostly want to fill those drives with my music collection to free up some space on my laptop's drive... and maybe back up some important files. So those extra drives would have to act as an external, basically.
I'd thought about turning the desktop into a local server.. which would serve the purpose of backing up my files, but I'm not sure how storing music would work... I also don't really want to have to FTP everything to the drives.
Answer: Samba may be a good solution, it is a service that allow sharing folders between windows and linux machines. Heres a setup guid, hope it will help you.


History of Fargues-Fontaine curve

Question: In this paper, Pierre Colmez wrote about some history of the Fargue-Fontaine curve. In this schedule of London Number Theory Study Group, Fargues was said to give a talk on November 15th on " Where does the curve and the conjecture come from? What happened in Trieste, Orsay and Berkeley? ". " What happened in Trieste " is well-documented by Colmez. Is there any reference about "what happened in Orsay and Berkeley"?
Comment: Berkeley course notes: http://math.bu.edu/people/jsweinst/Math274/ScholzeLectures.pdf
Comment: @nfdc, that's a link to 100 pages of notes. Can you narrow it down a bit?
Comment: @nfdc23, the Berkeley notes is the origin of my query. In the polished version (http://www.math.uni-bonn.de/people/scholze/Berkeley.pdf), Scholze & Weinstein mentioned that Fargues formulated the conjecture during the semester, but they kept the original perspective of the notes without highlighting the conjecture.
Comment: @GerryMyerson: All I meant was that one thing relevant which happened in Berkeley was that the course introduced the theory of diamonds (which provides a context for some of Fargues' ideas).
Answer: The notes for the talk are indeed available in Fargues' website:
https://webusers.imj-prg.fr/~laurent.fargues/Expos%C3%A9%20Imperial%20.pdf

History of Fargues-Fontaine curve


Hard start and squeeling

Question: My 1996 Pathfinder has over the past few weeks started squeeling and acting like it isn't going to start but after a few tries it starts and in a few minutes it stops squeeling and runs fine, but when you get in it again it does the same thing again. Please help.
Comment: Loose or worn belts?
Answer: I would check your alternator / serpentine belt.
Squealing is most often an issue of a loose / worn belt that's not making enough contact to travel with the pulley it's attached to, resulting in the pulley that's turning it 'slipping' with the belt not moving... resulting in the squealing sound you're hearing.
The bit about it being intermittent - This is a factor of the amount of load being placed on your alternator and how loose the belt is.
It may not be extremely loose; just enough to slip when you're starting and cause what I'm imagining is a sub-par charging scenairo w/ your battery... if it's becoming difficult to start, then your battery may not be charged all the way while you're driving (common if belt is slipping).
Check your battery voltage the next few times you try to start your car - before cranking the engine, that is - and see if it's low. Fully charged battery should read 12.7v-12.8v.
If it's sitting at like 12.3 or below I'd get it checked out to ensure it's charging properly.... either way you should investigate replacing the serpentine belt with a new one as a potential solution. Could also adjust tension on belt, but if it's due to age you should definitely replace it.
This is something you should be able to do yourself if you choose, and the belt itself - the only part you'll need - is usually around $10-20 at your local parts store.
Another potential issue is if your alternator is seizing up... if the pulley for the alternator is not turning, but the belt is moving past it, it would also cause this squealing noise and would better explain the issues starting the car.

Hard start and squeeling


Design of MySQL

Question: My supervisor asked to design a database by using MySQL.  This database is used to store information about evaluation surveys.  The survey has a lot of questions, and each question has 5 choices, the user choose the answer, and then the system evaluate the scores by the answer.  Basically, my supervisor wants me to create a database that stores information about surveys, and also the results of each survey.  Could anybody give me an idea how to start it?
Answer: I don't have any experience in this domain, but a quick Google of "open source survey software mysql" gives 874,000 results. What I recommend that you do is to download a few of these - see how they organise their database schema(s) and adopt and adapt your own schema to what's been done already. As Newton said, stand on the shoulders of giants. You could also take code if you can read the particular langauage in which it's written - (PHP, Perl, Python - whatever).
Your question is very broad and vague and probably outside of the guidelines for the forum - take the tour and also the "help us to help you" blog - both at the bottom of the page. These forums are a great resource and you will gain a lot by following the guidelines.
Answer: First, think of a database (in MySQL or otherwise) as a place to store raw data.  After you design that, then think about how the data needs to be processed.  It may -- or may not -- be possible for SQL statements to do some, or all, of the processing.
Your specification has possibly left out some information, such as what you need to store about the users that take the survey.
So, perhaps one Database with a few Tables:
<code>CREATE TABLE Users (
user_id INT UNSIGNED AUTO_INCREMENT,
user_name ...
etc...
PRIMARY KEY (user_id)
);

CREATE TABLE Questions (
q_id INT UNSIGNED AUTO_INCREMENT,
question VARCHAR(200) NOT NULL,
PRIMARY KEY (q_id)
);

CREATE TABLE Answers (
user_id INT UNSIGNED NOT NULL, -- for JOINing to Users
q_id INT UNSIGNED NOT NULL, -- for JOINing to Questions
answer CHAR(1) NOT NULL, -- 'a'..'e' -- assuming those are the possible answers
PRIMARY KEY(user_id, q_id)
);
</code>
Maybe that will help you get started.  Suggest you take the online MySQL tutorial, too.

Design of MySQL


Can a custom header be sent with a Cognito Form webhook?

Question: I have a need to send a custom header with the webhooks from a form. Is that possible? How?
Answer: It is not currently possible to send custom headers from Cognito Forms when posting JSON data to custom webhooks.  However, you can create a proxy handler that catches the hook from Cognito Forms and forwards the JSON on to the destination server with the additional custom headers.


Can I persist a Yarn install through different stages in a GitLab pipeline?

Question: I was thinking about a pipeline with the following steps:

Install image dependencies (such as java, node, yarn and openssl)
Install node packages needed for the build
Install PMD
Do a code Analysis
Build
Deploy
Run tests on the server
Clean up

But the issue here is that I require the tools installed on steps 1 and 2 for the rest of the build. There's a package that is used to run steps 5 to 7, for example, and OpenSSL is required to decrypt a server key in the repository (so GitLab can connect to the server).
I can't seem to find a way to persist Yarn's install through different stages. When the pipeline moves from stage 1 to stage 2, it will use yarn commands and will fail with the 127 error code (command not found), like this:
$ yarn global add sfdx-cli
/bin/sh: eval: line 81: yarn: not found

ERROR: Job failed: exit code 127

Is it possible to persist the "environment setup" through all the stages? Can artifacts be used for this? If so, will I need to setup the commands for every stage? For example: Yarn might be installed in a folder which will be cached, but I need to point the 'yarn' command to the correct binary, right?
Answer: We install things in the before_script section of the .gitlab-ci.yml that way on every run of the runner we know what packages exist for each stage.


Google Cloud VMs has dissapeared

Question: This is my problem. I had payed for 3 VMs on google cloud for 2 years. My service has ended 3 months ago and I couldt renovate that services for budget problems. Nowadays I have the budget and I need to continue with my VMs but they just have dissapeared, my VMs console does show nothing . I don't know if I lost all my work and information. what can I do?
Answer: It looks like you have disabled billing on the your GCP project. If that's the scenario, resources like GCE VM might had removed from that project after a certain period of time.
At this point, I would highly recommend you to contact the 'billing and payment support' team to get further assistance.
Since you have stopped paying before 3 months ago, the possibility of the removal of a Google Compute Engine resource(Ex: GCE VM) from that unpaid project account is high.
Answer: Once the service has ended, the resources might be removed. Mainly because, even if the VMs have been stopped, there are still the persistent disks which are incurring charges. These resources cannot be recovered.
Comment: It's the same thing. Once your free trial is completed, so does the billing. The main root cause of this issue is that there is nowhere to bill the resources which is why eventually they were removed
Comment: Hi, please edit if it apply, as your link is talking about the data retention in trial, where the OP was in a paid subscription, before stopping paying.

Google Cloud VMs has dissapeared


Video files are larger after conversion

Question: I'm converting video files to watch on my iPad from .mkv to .mp4 as per the settings in avc.
What i'm finding thou is that the original .mkv of 147mb is being converted to .mp4 of size 560mb.
Nearly increasing 4 times.
Any advice?
Comment: What specific program, bitrate, resolution etc. At least attempt to add details
Answer: MKV and MP4 are container formats. AVC is encoding format. File size does not depend much on container type, although some containers allow for smaller file sizes, like MKV takes less space than TS because metadata is not repeated in the stream.
The single defining parameter of file size is data rate. Depending on the encoding format, frame size and frame rate you should select a reasonable data rate when encoding. Say, 5 Mbit/s for MPEG-2 Part 2 may be too low for HD video, but more than enough if you choose AVC/H.264.
Also, "mb" means "millibits". If you wanted to write "megabytes" you should have capitalized both "m" and "b".

Video files are larger after conversion


What are the odds of making a royal flush after the flop in Texas Hold 'Em?

Question: My sister was playing no limit Texas Hold'Em at a table with six players and after the flop she made a royal flush. Can you tell me the odds on that happening?
They must be astronomical.
Comment: Can your sister buy me a lottery ticket?
Answer: There are 2598960 unique 5-card poker hands (C(n,r) = C(52, 5) = 2598960). 4 of those are royal flushes. So, the odds of one specific player flopping a royal flush would be 4-in-2598960, or 1-in-649740.
Comment: Yes.  Although if a pair of 4's are dealt to you, the odds of making a royal flush after the flop is significantly lower :)  If you're dealt two suited cards between 10 and A, then the odds improve to 1-in-19,600.
Comment: If you ask a somewhat vague question, you tend to get the easiest specific answer. :)
Comment: ??  @Chris farmer, for your 4//2.5 million hands, I take it that also does include a RSF that is on the board ONLY, meaning you'd split the pot and wouldn't "win" anything.  If true, then you'd have to eliminate 1/7th of the 1/650k possibilities to beat the others (and assume they don't get their own RSF at the same time and tie).  Correct?  [[ Pokerstars result a few days ago, which is why I care:)  "Hand #193344547027: DaaBoss wins pot (2,646) with a Royal Flush" ]]
Comment: @DaaBoss the question is on flopping the royal flush, not rivering it. So only the first 5 cards matter. Altho i agree with Drfbag, the assumption is you hold 2 of the 5 RF cards.
Comment: @sakon no, there is no assumption made in the question. There is nothing written about hole cards already being dealt. The question simply is if you sit down at a Texas hold'em poker table, what are the odds that you have a royal flush after the hole cards and the flop are dealt. Above is the correct answer to that question.
Comment: @azimut if you say so :)
Answer: I would disagree Chris with your probabilities.
There is only possibility of one royal flush occurring in any one round. So it be 1 in 2.6 million of that occurring.
But the odds slightly increase on turn and river.
Unlike 5/7 card stud poker, then it be 1 in 650,000 of it occurring.
Comment: Op specifically asked about flopping a Royal Flush, so the answer provided by Chris is accurate.


Sink 15 W from USB power supply

Question: my question is simple but USB standard and how it works, let me going crazy.
I need to sink up to 3 A (5 V) from a USB type C connected to a 15 W (5V @3A) wall power supply.
My board should have only a type C connector (receptable) with 5.1K resistors on CC1 and CC2 lines, no more hardware.
Is this enough to sink up to 3A from power supply?
I don't worry about compliance with USB standard, it's a custom board.
Someone says that with no hardware control on CC lines in the board, the suppply can't deliver more than 500 mA, but I think is the supply that should monitor CC lines on DFP side and according to its pullup resistors delivers up to 3 A.
Comment: Depends on the USB supply. Many just do 5V at whatever their rated current is without any control/handshaking. This makes it cheaper, easier and not offically USB compliant, but it works. Others DO have control and handshaking (especially those which are higher power as they can vary the voltage up to get more power). We don't know which you have.
Comment: A "(5V @3A) wall power supply" will supply 3A at 5V no matter what.

If you don't plan to connect your device to any TYPE-C ports other than your own specific power supply,  you can do whatever you want, no resistors are necessary.
Answer: What you propose should work in your case, even if it does not follow USB specs.
It's the USB charger that tells to the device how much current is available based on the pull-up resistor on CC.
A 3A charger should be assumed to be able to provide 3A, but in some cases a single 3A supply might be shared between two charging ports, so when you have two devices connected, the signaling can change to allow only up to 1.5A for each port, and therefore, as per the specs, a device must monitor how much is available and must not consume more than available.
But if you are sure the charger will always signal that 3A is available, then there should also be no problems always drawing 3A without checking.
The charger just needs to see the resistors on CC pins to activate the output. No other negotiation should be needed from your receptacle side.
The other current limits you mention are true, but don't apply when you have a native Type C supply that can provide 3A.
In all other cases, when the power is supplied by e.g. a PC, you might have a limit of 500mA, 900mA, or 1500mA, depending on which kind of port on PC is used (USB 2.0, single-lane 3.2 or dual-lane 3.2). So don't try connecting a 3A load to a PC or you will burn something, at least a fuse if nothing else.

Sink 15 W from USB power supply


RHEED (Reflection high-energy electron diffraction) spot size is small why does it can reveal the quality of large size sample

Question: RHEED (Reflection high-energy electron diffraction) spot size is 60um to 1mm, so it reveals that the surface property of an area about 60um to 1mm. However, literature usually use RHEED pattern as an identification of sample quality. Why is that?
Answer: Because the incident angle of electron beam in RHEED is very small, typically 1-2degree. Even though the spot size is small, the area where the electron beam cast on can be very large. For example, if spot size is 60um, and incident angle is 1degree, the area in its length should be 3437um(3.4mm).
Answer: RHEED as a surface analysis tool provides feedback over features or lack thereof at length scales, which are significantly larger than transmission electron microscopy (TEM) images, but on the other hand much shorter than what you could resolve with optical microscopy. I'm aware that I'm mixing in-situ and ex-situ techniques here, but for the sake of what you can see with different tool, I guess this comparison is fine.
A typical RHEED system operates at acceleration voltages somewhere between 5 and 15 kV, which translates into de Broglie wavelengths in the range of 0.01-0.02 nm. This length scale is below the lattice constant of relevant materials and therefore in principle allows to resolve information at the order of single bonds or crystal unit cells.
RHEED can be used to determine surface reconstruction patterns, which are a few unit cells in length, but due to their periodicity give nice diffraction spots on a RHEED screen. In principle, one can monitor effects like Stranski-Krastanov formation of quantum dots, but such features are typically very faint and only visible in somewhat ideal cases. On the other hand, RHEED can also be used to determine the diffusion length on terraced surfaces. Broadening of individual diffraction spots can also give you an estimate on the crystal quality at larger length scales or the presence of an amorphous layer (e.g. the native oxide on semiconductor wafers).


Probability same football square wins all four quarters

Question: A local casino has a Super Bowl football squares promotion going on. All the 100 squares are guaranteed to be filled by the customers. The casino will pay a certain amount to the winner of each quarter and then is thinking of paying a large bonus if the same square wins all four quarters.
I started thinking about estimating the probability that the same square will win all four quarters. See if you agree witH my analysis as follows:
The first quarter score is guaranteed to be won since all 100 squares are filled. And that same first quarter square will win the second, third, and fourth quarters if and only if these other three quarters have a score of "0"(e.g., 0, 10, 20, 30 etc) for each of the two teams. Now, the probability a teams score in any given quarter will be "0" can be estimated by anamlyzing previous games. In all 49 previous super bowl games there have been 49x4x2 = 392 quarterly scores by the teams involved. The number "0" was scored in 105 of these 392 quarterly scores. Thus the (approx) prob that a team scores "0" points in a quarter is 105/392 = 0.2679.
So, the approximate prob that quarters Two, three, and four will result in scores of "0" for each team for each quarter is
0.2679x0.2679x0.2679x0.2679x0.2679x0.2679 = .0004 .
Thus the prob that the same square will win all four quarters is approx
.0004
Comment: Much about the situation you're describing is unclear -- indeed the second half I am not sure I followed at all. But even in the first half of the question it's not quite clear how the winning squares are obtained. (Are they equally likely to be winning squares, for example?) ... Could you edit your question to clarify how the thing works? Assume many of us don't know what these things are or how they work (I sure don't).
Comment: I agree with your analysis Burt - pretty unlikely!!!
Answer: The analysis is essentially correct but comes up short of being correct because 1) you also need to include an approximately 70% factor that the teams have a different first quarter score and, more importantly, 2) teams' scores from quarter to quarter are not independent. That is, consider a team that scores 0 in a quarter ... it is more likely to score 0 in a future quarter (the offense is not playing well). A quick count in the first 50 superbowls shows 82 times a team has scored at least one "0" (i.e. 0, 10, 20,...) in a quarter. 51 times of that 82 (0.622), the team has scored at least one other "0" in a quarter in the game.
So, a better estimate would be:
0.7 (first quarter anything but a tie) x 0.2679^2 (both teams score a 0 in Q2) x 0.622^4 (both teams score "0"s in Q3/Q4 given they already have a quarter equal to 0) = 0.75%. This is much larger than your 0.04%.
Actually, 4953 professional football scores have been analyzed (footballsquares.blogspot.com) and used to simulate all the score correlations that are present. The simulation finds 0.24% of a probability of the same square winning all four quarters. Indeed 12 out of 4953 (very close to 0.24%) games had a single box win all four quarters.