Dual boot computer , vm on both partitions, can I run os from other partition without re installing it?

Question: I have a dual boot Windows 7 and Ubuntu 16.04 computer. I have VM Ware on the windows partition with windows 10 as a guest on it. On Ubuntu I have Virtualbox with Parrot, Kali Linux, and Whonix as guest os's.  My question is, can I run the windows 10 (from my windows partition) on my Ubuntu Virtualbox without installing it on the Linux partition, thereby saving space on this one. Hope I have made this clear enough.  Thanks in anticipation.
Further to this, I would not mind removing VM Ware and replacing it with Virtualbox on the windows partition if it would simplify things. Thanks
Answer: Assuming you have access to the Windows drive from Ubuntu what you need to do is

Boot Windows 7.
Get W10 running in VirtualBox (Guide).
Reboot into Ubuntu.
Make a backup of VirtualBox.xml (Both Linux- and Windows-file in case you mess up something).
Copy the MachineEntry from VirtualBox.xml in Windows into VirtualBox.xml on Linux.
Replace the src= of the VM to correspond to the path where the VM reside.
Test

VirtualBox.xml locations:
Windows: C:\Users\<user>\.VirtualBox
Linux: /home/<user>/.config/VirtualBox/

Answer: Thank you for the info. I removed VMware Workstation and reinstalled Virtualbox, when i attempted to install thw Windows 10 virtual machine i got errors about other virtual software running (i dont remember the exact wording). I then switched to my Ubuntu and am currently in the process of installing Windows 10, but have selected a folder om my original Windows partition for the files. I have just checked and this works as I had hoped, that is it has installed on the Windows partition and left my much smaller linux partition size unchanged.  Once again, thank you very much for taking the time to answer my question and for your assistance.


Gboard settings keeps crashing

Question: I am running Resurrection Remix, Nougat 7.1.1 on a Nexus 6p. I have Gboard "220.127.116.11029707-arm64-v8a" installed. I can open settings, but when I choose one of the settings categories, I get the message saying "Gboard has stopped", How do I fix this?
Comment: I have the same issue. The answers around the net prove thatmost  people just don't read the question: "Going to the settings crashes the app." -> "Go to settings and make sure blbalba". Come on... Then you get an advice to report the problem... By going to the settings. Well done Google, you've got a problem that will never be reported, because the reporting channel is part of the problem. Anyhoo. I'm on a OnePlus X using Lineage 14, I used OpenGApps to get GBoard. Then I tried to wipe the cache and the dalvik cache, no cigar so far. I'll be sure to help you if I find anything.
Comment: @Doodloo Same here. I am using Gapps from opengapps.org and I think that that might be the problem.
Comment: I was able to get rid of the problem by updating Gboard from scratch. I also updated my OS to LineageOS.
Answer: Once you have made sure that Gboard is your default keyboard for your device, please check if you're able to navigate to the app's preferences by going to your device's Settings > language & input > Gboard > Preferences. Here you can choose your keyboard preferences for Gboard.
If the app still crashes, I'd suggest you report this to the product developers directly by sending a feedback. To submit feedback, go to your device's Settings > Language and input > Virtual Keyboard > Select Gboard > Tap on the menu icon on the top right corner > Send Feedback.
Comment: The OP just mentioned that the bug occurs when trying to go to the preferences, preciselly.
Answer: I am using a Samsung J7 2016 phone, and the only solution that works is switching to the Samsung virtual keyboard. That works fine and I am not receiving any crashes with it. I also believe that I can find other "virtual keyboards" to download on Google Play Store, but have not tried it, since the Samsung one works just fine.

Gboard settings keeps crashing


How does Adaptive Sampling works?

Question: On what criteria will this function adapt its number of samples?... Is there a particular situation where you could take advantage of this option ?
I usualy set up the min and max sampling value without knowing their coherence.
Answer: With adaptive sampling Cycles automatically reduces the number of samples in areas that have little noise, for faster rendering and more even noise distribution.
More info here: https://docs.blender.org/manual/en/latest/render/cycles/render_settings/sampling.html
Answer: When you render you can see the pixels being updated with new sample information according to the integration method used by the renderer.
With adaptive sampling on, every other sample is integrated just like that into a separate image buffer.  Every pixel is compared to the corresponding pixel for the final image.  When the difference between these pixels is less than your designated threshold that pixel is considered "done" and is skipped for any subsequent samples.
Unless of course you haven't hit the minimum number of samples, which you can also set.

How does Adaptive Sampling works?


Indicator light works in reverse to light on/off switch

Question: I am trying to add a 7 volt light to remember to turn off cellar lights. Wiring white to white or the reverse-either way, the indicator light goes on & off in reverse of the switch. What have I done wrong?
Comment: I presume you mean 7 watt 120V (or 230/240V depending what country you are in, but the black and white tends towards 120V countries. A 7V light would make a bright flash exactly once....
Comment: Are you wiring the light *across the switch*?   How many *cables* come into the switch box, and how many *wires* does each one have?  Disregard bare ground wires (they matter but not to us).
Comment: Can you post photos of the inside of the switch box in question please?
Answer: You appear to be connecting your light to the switch, not to the lights. The switch appears to be wired as a switch loop, and the behavior you have seen is exactly what's expected in that case.
A switch loop is an old, but acceptable if it was installed when still acceptable method of wiring a switch using /2 cable with just black, white and ground. The white should be "always hot" and the black should be "switched hot" - the white shiould be marked at both ends with tape, paint or some other method to indicate that it is hot, not neutral.
Power consisting of hot and neutral comes to a light location, and the switch loop connects "switch loop white always hot" to incoming "black always hot." that goes to the switch, where the switch connects it to "switch loop black switched hot" and it returns to the light, where it connects to the fixture hot. Incoming power white neutral connects to fixture neutral.
Your "pilot light" needs to connec to the switched hot and neutral, but there's no neutral wire at your switch location - so your pilot light needs to connect to the switched hot and neutral at the light location.
Comment: No, No, No No, No. You do **NOT** use ground as neutral. You run a wire to the light location and pick up switched hot and neutral there.
Comment: So do I do black to black & the white of the light to the grounded wire?
Comment: I don't know what you mean by running a wire or the light location. I have a switch in the upstairs hall that switches the cellar lights on & off.  I am looking for a simple way to put an indicator light on the switch to remember to turn it off.
Answer: Wire more lights off a light, not a switch
Electrical wiring does not bring all wires everywhere, that would be a waste of money.
"The wires you need to run a light", are found at a light, at the risk of stating the completely obvious.
You are trying to find them at a switch, and that does not work that way.  Bringing a lamp-needed wire (neutral) to a switch would be pointless, at least prior to 2011 when it was mandated to support smart switches.
You cannot misuse safety ground as neutral.  If you do, and anything else goes wrong, it can create a fire or lethal situation.  Safety ground has one job.


Is there a way to delete all indents (left, right, hanging, etc), tabs, margins, and any other page-formatting item?

Question: I just used OCR software to scan a document consisting of 20+ pages into Word 2007.  The result is a bunch of pages with their own margins and indents.  I appear to have been able to reset the margins, but things like indents appear to be relative to the margins.  Therefore, reducing the margin size has caused some paragraphs to go off the left side of the page because the indent got set to a negative value.  I'd like to clear all page-formatting and keep visual formatting like font face, font size, font color, bold, underline, italics, etc.  This way, I can start from scratch and reformat the page layouts the way I want.
Comment: Can't you select everything (Ctrl+A), then specify the margin, tabs etc. for the entire file in one go? You can also get rid of all tabs by double-clicking any of the tab stops on the ruler (you'll get [this dialog](http://i.stack.imgur.com/fAmzF.png)).
Comment: http://help.isu.edu/index.php?action=knowledgebase&catid=38&subcatid=67&docid=673
Answer: I'm not sure if that's option for you, but you could use other, plain-text-based format (like TeX or HTML) and try to filter out the information by a scripting language like Perl or Python, (or, provided that the output is "simple" enough, even using a smart text editor and regular expressions could do the job).
Note that while you can use Word to export to that format, but if you can use the format right away in the OCR software, I'd definitely try that one first.  As a general rule for WYSIWYG editors, files exported in markup formats tend to be extremely complicated.


How does this happen to Felix in Saltburn (2023)?

Question: Did Oliver poison Felix, or did he die from drug overdose? It's quite unclear because if Oliver did poison him, why didn't the cops do an autopsy or find the bottle (as shown in one scene) as evidence?
Comment: The fact that Oliver feels he should hide the bottle does imply at least deliberately doing something to him.
Comment: it's pretty clear in the flashback at the end.
Comment: The impression I had from the film is that Felix is already taking drugs, cocaine I believe, and Oliver added more cocaine to the champagne bottle. So even if an autopsy was done and found a cocaine overdose, it would look like an accidental overdose, not a poisoning.
Answer: The script makes it abundantly clear that Oliver poisoned Felix.

FLASHBACK 2007: the night of the party, Oliver pours a vial of drugs into the champagne bottle and swills it around.
OLDER OLIVER (V.O.): No natural predators.
EXT. SALTBURN - MAZE CENTER - NIGHT
FLASHBACK 2007: the moment Oliver turns to throw up and hands Felix the bottle. Oliver waits, hunched over, feigning sickness, until Felix drinks it.
EXT. SALTBURN - LAKE - NIGHT
FLASHBACK 2007: Oliver throws the bottle into the lake.
Saltburn - Screenplay

It's not clear what drugs he used, but there are many that are fatal but not easily detectable, especially in someone who's already been taking a bunch of illicit pharmaceuticals.
Answer: Oliver poisoned Felix.
In talking to the comatose Elspeth towards the end of the film, Oliver states that the rich have "no natural predators... well, almost none..." (meaning they are his prey.) There are then flashbacks of all he did to kill the family and alienate his competition (Farleigh) from them. In one of the flashbacks, you see Oliver dumping something from an ampule into the bottle of champagne he then gives to Felix while he pretends to be sick. Felix takes a drink. You then see Oliver dispose of the evidence, meaning he either waited for Felix to die to take the bottle or he took it before Felix dies, certain of the outcome.

...why didn't the cops do an autopsy?

The family is very rich and know many influential people. Felix's parents think he died of an overdose because Farleigh had brought drugs to the party. The father tells Farleigh that he won't tell the police, but that's all he'll ever do for him again. Though it's not in the film, it's easy to believe that a word from Sir James to the police would quash an autopsy. This also fits nicely with the fact that appearances (and the denial of reality) were everything to the family, and they would likely want to avoid any "unpleasantness" associated with a drug overdose (they don't even suspect a poisoning) as the cause of Felix's death.


How to read a frame from YUV file in OpenCV?

Question: How to read a frame from YUV file in OpenCV?
Answer: I wrote a very simple python code to read YUV NV21 stream from binary file.
import cv2
import numpy as np

class VideoCaptureYUV:
    def __init__(self, filename, size):
        self.height, self.width = size
        self.frame_len = self.width * self.height * 3 / 2
        self.f = open(filename, 'rb')
        self.shape = (int(self.height*1.5), self.width)

    def read_raw(self):
        try:
            raw = self.f.read(self.frame_len)
            yuv = np.frombuffer(raw, dtype=np.uint8)
            yuv = yuv.reshape(self.shape)
        except Exception as e:
            print str(e)
            return False, None
        return True, yuv

    def read(self):
        ret, yuv = self.read_raw()
        if not ret:
            return ret, yuv
        bgr = cv2.cvtColor(yuv, cv2.COLOR_YUV2BGR_NV21)
        return ret, bgr

if __name__ == "__main__":
    #filename = "data/20171214180916RGB.yuv"
    filename = "data/20171214180916IR.yuv"
    size = (480, 640)
    cap = VideoCaptureYUV(filename, size)

    while 1:
        ret, frame = cap.read()
        if ret:
            cv2.imshow("frame", frame)
            cv2.waitKey(30)
        else:
            break

Comment: For YUV 4:2:2, the frame_len is multiplied with `2` and the shape will become `self.shape = (self.height, self.width, 2)`, also the convert color code also needs to change to one of YUV 422 family codes.
https://docs.opencv.org/3.1.0/d7/d1b/group__imgproc__misc.html#ga4e0972be5de079fed4e3a10e24ef5ef0
Answer: As mentioned, there are MANY types of YUV formats:
http://www.fourcc.org/yuv.php
To convert to RGB from a YUV format in OpenCV is very simple:

Create a one-dimensional OpenCV Mat of the appropriate size for that frame data
Create an empty Mat for the RGB data with the desired dimension AND with 3 channels
Finally use cvtColor to convert between the two Mats, using the correct conversion flag enum

Here is an example for a YUV buffer in YV12 format:
Mat mYUV(height + height/2, width, CV_8UC1, (void*) frameData);
Mat mRGB(height, width, CV_8UC3);
cvtColor(mYUV, mRGB, CV_YUV2RGB_YV12, 3);

The key trick is to define the dimensions of your RGB Mat before you convert.
Comment: This is the right answer.

I was handling the NV12 variation of YUV and these helped me understand the format:

https://wiki.videolan.org/YUV/#NV12, https://commons.wikimedia.org/wiki/File:Common_chroma_subsampling_ratios.svg
Answer: UPDATE there's a newer version of the code here: https://github.com/chelyaev/opencv-yuv
I'm posting some code that will read a single YUV 4:2:0 planar image file.  You can directly apply this to most YUV files (just keep reading from the same FILE object).  The exception to this is when dealing with YUV files that have a header (typically, they have a *.y4m extension).  If you want to deal with such files, you have two options:

Write your own function to consume the header data from the FILE object before using the code below
Strip the headers from *.y4m images (using ffmpeg or similar tool).  This is the option I prefer since it's the simplest.

It also will not work for any other form of YUV format (non-planar, different chroma decimation).  As @Stephane pointed out, there are many such formats (and most of them don't have any identifying headers), which is probably why OpenCV doesn't support them out of the box.
But working with them is fairly simple:

Start with an image and it's dimensions (this is required when reading a YUV file)
Read luma and chroma into 3 separate images
Upscale chroma images by a factor of 2 to compensation for chroma decimation.  Note that there are actually several ways to compensate for chroma decimation.  Upsampling is just the simplest
Combine into YUV image.  If you want RGB, you can use cvCvtColor.

Finally, the code:
IplImage *
cvLoadImageYUV(FILE *fin, int w, int h)
{
    assert(fin);

    IplImage *py      = cvCreateImage(cvSize(w,    h), IPL_DEPTH_8U, 1);
    IplImage *pu      = cvCreateImage(cvSize(w/2,h/2), IPL_DEPTH_8U, 1);
    IplImage *pv      = cvCreateImage(cvSize(w/2,h/2), IPL_DEPTH_8U, 1);
    IplImage *pu_big  = cvCreateImage(cvSize(w,    h), IPL_DEPTH_8U, 1);
    IplImage *pv_big  = cvCreateImage(cvSize(w,    h), IPL_DEPTH_8U, 1);
    IplImage *image   = cvCreateImage(cvSize(w,    h), IPL_DEPTH_8U, 3);
    IplImage *result  = NULL;

    assert(py);
    assert(pu);
    assert(pv);
    assert(pu_big);
    assert(pv_big);
    assert(image);

    for (int i = 0; i < w*h; ++i)
    {
        int j = fgetc(fin);
        if (j < 0)
            goto cleanup;
        py->imageData[i] = (unsigned char) j;
    }

    for (int i = 0; i < w*h/4; ++i)
    {
        int j = fgetc(fin);
        if (j < 0)
            goto cleanup;
        pu->imageData[i] = (unsigned char) j;
    }

    for (int i = 0; i < w*h/4; ++i)
    {
        int j = fgetc(fin);
        if (j < 0)
            goto cleanup;
        pv->imageData[i] = (unsigned char) j;
    }

    cvResize(pu, pu_big, CV_INTER_NN);
    cvResize(pv, pv_big, CV_INTER_NN);
    cvMerge(py, pu_big, pv_big, NULL, image);

    result = image;

cleanup:
    cvReleaseImage(&pu);
    cvReleaseImage(&pv);

    cvReleaseImage(&py);
    cvReleaseImage(&pu_big);
    cvReleaseImage(&pv_big);

    if (result == NULL)
        cvReleaseImage(&image);

    return result;
}

Comment: The code I posted handles YUV 4:2:0.  Since your video is in YUV 4:2:2 , then my code will definitely not work on your video directly.  You will need to adapt the code to handle your format.  For more details, see: http://en.wikipedia.org/wiki/Chroma_subsampling#4:2:2
Comment: I have the same Problem now, I'm trying to open and work with a video that has UYVY(4:2:2) as codec , I tried you code but it didn't work I know that you mentioned that in your answer but can you tell why ?? thanks in advance for you help
Answer: I don't think it is possible to do, at least with the current version. Of course, it wouldn't be that difficult to do, but it is not such an interesting feature, as:

OpenCV usually works on webcam stream, which are in RGB format, or on coded files, which are directly decoded into RGB for display purposes ;
OpenCV is dedicated to Computer Vision, where YUV is a less common format than in the Coding community for example ;
there are a lot of different YUV formats, which would imply a lot of work to implement them.

Conversions are still possible though, using cvCvtColor(), which means that it is of some interest anyway.
Answer: I encountered the same problem. My solution is
1. read one yuv frame (such as I420) to a string object "yuv".
2. convert the yuv frame to BGR24 format. I use libyuv to do it. It is easy to write a python wrapper for libyuv functions. now you get another string object "bgr" with BGR24 format.
3. use numpy.fromstring to get image object from the "bgr" string object. you need to change the shape of the image object.
Below is a simple yuv viewer for your reference.
import cv2
# below is the extension wrapper for libyuv
import yuvtorgb
import numpy as np

f = open('i420_cif.yuv', 'rb')

w = 352
h = 288
size = 352*288*3/2

while True:
    try:
        yuv = f.read(size)
    except:
        break
    if len(yuv) != size:
        f.seek(0, 0)
        continue

    bgr = yuvtorgb.i420_to_bgr24(yuv, w, h)

    img = np.fromstring(bgr, dtype=np.uint8)
    img.shape = h,w,3

    cv2.imshow('img', img)

    if cv2.waitKey(50) & 0xFF == ord('q'):
        break

cv2.destroyAllWindows()

Answer: For future reference: I have converted @xianyanlin's brilliant answer to Python 3. The below code works with videos taken from the Raspberry Pi camera and seems to output correct color and aspect ratio.
Warning: it uses the numpy format for specifying resolution of height * width, e.g. 1080 * 1920, 480 * 640.
class VideoCaptureYUV:
    def __init__(self, filename, size):
        self.height, self.width = size
        self.frame_len = self.width * self.height * 3 // 2
        self.f = open(filename, 'rb')
        self.shape = (int(self.height*1.5), self.width)

    def read_raw(self):
        try:
            raw = self.f.read(self.frame_len)
            yuv = np.frombuffer(raw, dtype=np.uint8)
            yuv = yuv.reshape(self.shape)
        except Exception as e:
            print(str(e))
            return False, None
        return True, yuv

    def read(self):
        ret, yuv = self.read_raw()
        if not ret:
            return ret, yuv
        bgr = cv2.cvtColor(yuv, cv2.COLOR_YUV2BGR_I420, 3)
        return ret, bgr


asp.net custom onfocus event for textbox

Question: Is it possible to create a custom onfocus server side event for a textbox control?
I would like to simply fire a server side method when a textbox has focus.
Answer: There's nothing built-in, because focusing a textbox doesn't cause the page to submit itself. You could always attach an event to the focus on the client side, and then submit some AJAX request to the server, but I'm curious to know what exactly you're trying to achieve here.
Answer: I would strongly recommend using client side validation for this.  You can use the ASP.NET Validators for this.  One of the properties on the validator is to set focus on error.  This should be more than enough for what you are trying to do and it also limits the number of server side roundtrips.
If you're really feeling creative, you can look at some of the other validation options and AJAX Control Panel extenders.  There are some pretty snazzy validator controls out there.  Another option would be to consider using some jQuery validation.
You should still validate on the server, but what you are describing sounds like a perfect it for client validation first.
Answer: Ok, i got a web form and on submission validation takes place,  if there are errors on the page then these errors get stored in state and a warning sign gets displayed.
Now, when the user goes through the errors, i wanted a popup box to be displayed by the side of the textbox they are currently correcting.
for this to happen i wanted to have an event attached to an onfocus type handle.
Comment: The ASP.NET AJAX library offers exactly that.  Take a look at the ValidatorCallout control here: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ValidatorCallout/ValidatorCallout.aspx
Answer: Is a server-side onFocus really the right solution for that?  If you want validation popups and such, you're probably better off with client-side solution.  Having a form submit when you simply tab to a textbox would not be good usability.
Answer: You could do this using a custom validator hooked up to some AJAX call, however you only need to do a server trip if there is data on the server that you current data needs to be validated against.


How to change screen resolution?

Question: I am using HP G62 laptop and it has intel HD graphics. Screen resolution in ubuntu OS is fixed at 1024 x 768. Plz tell me how to change the screen resolution. Apparently there is no option once I goes to system settings/ display
Answer: You can use xrandr -q to see what resolutions are available for your display
From the manpage

Xrandr  is  used  to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size.

To change the screen resolution to 1024 by 768, you would type:
xrandr -s 1024x768

Just use that to change it to the size you want.
Answer: Click Here
 $ xrandr --output VGA1 --mode 1024x768 --rate 60
  $ xrandr --output LVDS --mode 1024x768 --rate 75
  $ xrandr --output LVDS --mode 1024x768 --rate 75

How to change screen resolution?


is this explanation of 2nd law of thermodynamics correct?

Question: Second law of thermodynamics states that we cannot take heat from a hot source and make it 100% useful work. Is this because the heat is high disordered energy (ie molecules moving in a disorder manner) so we cannot harvest all these movements, because to make work we need movements to one direction only? Is this legit? If not how can we explain the reason behind the validity of 2nd law in its molecular basis? Also, how Carnot proves 2nd law? How are these two connected?
Answer: The second law of thermodynamics simply says that heat doesn't move from cold to hot on its own. That is the fundamental definition of temperature. It's this simplicity and independence of any microscopic physics that makes thermodynamics so useful. You should embrace this simplicity instead of trying to find (non-existent) proofs for it from other principles. This is (probably) the most simple form the description of thermodynamics can take.
You can compare this to the analogous case of Newton's second law, which is the definition of inertial mass, the definition of force and which establishes a fundamental relationship between both and acceleration. We don't have to know anything about what mass is or what causes force to use Newton, but a large and useful body of physics can be derived from it.
Similarly, we don't need to know anything about molecules, order, disorder and statistical mechanics to use the second law of thermodynamics. Carnot's results and the absolute thermodynamic temperature scale can be derived from it (and the other laws) easily.
On the other hand, we can't derive the laws of thermodynamics from anything else without further assumptions, and the connection between statistical mechanics and thermodynamics requires the ergodic hypothesis, which is invalid for some rather trivial systems and which is hard to prove for others. Compared to the simplicity of the first, second and third laws, that's a huge can of worms and not that much more useful.


What would you call it when somebody complains about something that is given to them?

Question: Like when people who receive free government aid, and complain about regulations on it. Not what the person would be called, but what it is called that they're doing.
Comment: How about "gifthorsemouthlooker"?
Comment: Fred gave me his cold.  Is it looking a gift hoarse in the mouth if I'm not grateful?
Comment: I'd reserve the gift horse thing for something else.  Not that it doesn't work... kinda.  But I'd say this has something more to do with gratitude; the lack of.  OOPS... see below
Comment: There is a difference between something which is given freely by an individual or a chartitable organisation and a benefit provided by the state: the state benefit is a legal entitlement whereas the others are voluntary. The state aid is more like payment of an insurance claim which the company must honour. Benefit recipients have a responsibility to abide by the rules of the benefit scheme but, as citizens and potential votors, also have a right to challenge the rules if they think they are unnecessarily onerous. The gift horse's mouth has nothing to do with state benefits.
Answer: Looking a gift horse in the mouth.

Don't question the value of a gift. The proverb refers to the practice of evaluating the age of a horse by looking at its teeth. This practice is also the source of the expression "long in the tooth," meaning old.

[Dictionary.com]
Comment: The obvious word @Skeebop is *ungrateful*, or perhaps *thankless* ;-)
Comment: Hi, Dan. Your answer was flagged automatically as low quality for its length (or probably link-only answer). I've edited your answer. Please take a look.
Comment: That's the closest thing i can think of to what I'm trying to say. But i feel like there is a single word for it.
Comment: @Dan Always my pleasure. Note some users downvote answers when they review them in the low-quality posts review queue.
Answer: Not one word, but I would call this biting the hand that feeds you.
The Free Dictionary:

bite the hand that feeds
  you:
  to severely criticize the person or organization that helps you or
  pays you
Answer: Ungrateful is just about the closest thing to a one-word solution that I can think of. You would call them ungrateful and you would say that they are being ungrateful. Of course, ungrateful describes many other situations than just the one you're asking about; there are many more ways to be ungrateful than just complaining about something that was given to you for free. Which is likely why the idiom "to look a gift horse in the mouth" came about.
You look in a horse's mouth to determine whether or not the horse is healthy. So, when given the gift of a horse (which would be akin to being given an automobile today), looking it in the mouth instead of just accepting the gift would be considered rude as it would be a show of ingratitude, as if you might not accept the gift if it isn't good enough.
Looking a gift horse in the mouth is not quite the same thing as complaining about regulations on free government aid. They are both phrases that describe an act which would be considered ungrateful, but the first because one does not refuse a gift and the second because the aid was requested; it is not so much a gift as a FAVOR and it is considered ungrateful to complain about that at ALL.
Hope this helps.
Answer: Such people are just being unappreciative - not appreciating the value that something provides (and hence nitpicking on other, even minor aspects).
ODO:

unappreciative
ADJECTIVE
Not fully understanding, recognizing, or valuing something
'So often football supporters are accused of being unforgiving and
  unappreciative.'
Answer:
What would you call it when somebody complains about something that is
  given to them?

Someone who is not grateful is UNgrateful
but someone who complains is an INgrate and thus INgrateful.


Is the cost to send n batch transactions linear?

Question: Curious approximately what the fee multiple might be to send ETH to 1, 10, 100 and 1,000 addresses in a single transaction?
Answer: The so-called multiple is actually the number of addresses.
For more information please refer to Ethereum YellowPager
Answer: You can't send Eth directly to multiple addresses with one transaction. One transaction is always to one address. And one Eth transfer (with no payload) costs 21000 gas - full cost depends on the used gas price.
What you can do, however, is create a contract which distributes the Ether to N receivers. So you can loop over the addresses and send Ether to each one.
The cost of executing this is probably easiest to test. The following with three addresses costs 49064 gas and with four 82076 gas, so adding one more address costs 33012 gas. Therefore adding 100 more addresses should cost about 3301200 gas.
Please note that this is not an elegant solution, not the most gas efficient and is only for testing purposes.
<code>pragma solidity ^0.8.0;

contract A {
    function distribute() payable public {
        address[3] memory addresses = [address(0x0), address(0x1), address(0x2)];
        uint share = msg.value / addresses.length;
        for (uint i = 0; i < addresses.length; i++) {
            addresses[i].call{value: share}("");
        }
    }
}
</code>
Comment: Amazing answer, how can it be more gas efficient?


Alternative to Eclipse's Abstract Syntax Tree parser for code manipulation

Question: Background
I am writing a program that will do some bulk renaming of members and functions in a directory of java source code to de-obfuscate the code based on a look-up table .csv file passed in to the program.
What this is for is the source code I have was written against a obfuscated jar. I have a de-obfuscated version of the jar that was run through a customized version RetroGaurd and I would like to parse the mapping file that was passed in to RetroGaurd to de-obfuscate the function calls my source code makes in to the jar. If I just compile my code and run it through RetroGaurd too when I decompile I loose all of my nice commenting and formatting (unless there is a option on RetroGaurd that I missed).

Problem
I found the Abstract Syntax Tree parser built in to Eclipse and it looks perfect for my uses, however I am not planning on writing my program as a plugin for Eclipse, this is going to be a stand alone jar that can be run on any machine.
My main concern is as I write my code I am getting a lot of dependencies on internal jars that Eclipse uses. I know that if I conform to the EPL for the library jars I will have no issues distributing it, but I am concerned about this project getting bigger and bigger as I write it as more and more jars from Eclipse's SDK are required.
Are there any other projects out there that would give me the ability to parse Java source code to do find and replace reliably like AST will allow me to, or is there a way to use RetroGaurd (or a program like it) to run the same de-obfuscation but keep my comments and functions the same without needing to run the de-obfuscated program though a de-compiler afterwards?
Comment: Welcome to Java, and getting the transitive closure of a library call.
Answer: If you're worried about the need to run Eclipse GUI to execute your code, then you could consider running the plugin in headless mode. This would allow your plugin to be run from command line. See this SO thread.
You could also use any other open source java compiler. For e.g., openjdk's Java compiler. Please refer to the Resources section.
Hope it helps.


The number of cyclic groups of order 2p in a group

Question: Let $t_{k}$ be the number of elements of order $k$ in the group $G$. It known that if $|P|=p$ (where $P$ is Sylow $p$-subgroup of $G$), then $t_{2p}$ is a multiple of $t_{p}$. Now let $|P|=p^{2}$, the number of Sylow $p-$subgroups be $1$ and the number of cyclic subgroups of order $p$ be $p+1$. Also let the number of cyclic subgroups of order $2$ be $p(p+1)/2$. Is it true the number of cyclic subgroups of order $2p$ is a multiple of $p+1$?
Or: Is it true $t_{2p}$ is a multiple of $t_{p}$? Thanks in advance.
Comment: You asked the same question on Math StackExchange, where I have given a counterexample.
Comment: @Derek Holt: My question asked 7 hours ago and you have given a counterexample 2 hours ago on Math StackExchange.
Comment: It's usually better not to ask the same question in several places at the same time. This leads to duplication of effort, so it shows a lack of respect for the time of the people you are asking to help you. At the very least, you should post a link to the other question when you cross-post.
Answer: Not sure that this is a research level question: however.... . Under these hypotheses, $p$ is odd. An involution is an element of order $2$. If $t$ is an involution of $G,$ then $t$ must normalize an element of order $p$ (in fact, must centralize an element of order $p$). For otherwise $[G:C_{G}(t)]$ is divisible by $p^{2}.$ But $G$ is assumed only to contain $\frac{p(p+1)}{2}$ elements of order $2.$ But $G$ has a normal Sylow $p$-subgroup. Hence $C_{G}(t)$ contains $1$ or $p+1$ subgroups of order $p$ ( $1$ if $t$ does not centralize $P$, $p+1$ if $t$ centralizes $p$). The number of cyclic subgroups of order $2p$ maybe expressed as
$\sum_{t} [G:C_{G}(t)] n_{p}(t)$, where $t$ runs over involutions of $G$ up to conjugacy, and $n_{p}(t)$ denotes the number of cyclic subgroups of $C_{G}(t)$ of order $p$. By assumption,
$\sum_{t} [G:C_{G}(t)]$ is $\frac{p(p+1)}{2}$. This leaves uncounted $\sum_{u}p[G:C_{G}(u)]$ subgroups of order $2p,$ where $u$ runs over involutions of $C_{G}(P)$ up to $G$ conjugacy.
I see no a priori reason why this last number should be divisible by $\frac{p+1}{2},$ which it would need to be for your question to have a positive answer.
Comment: Since Derek Holt has given a counterexample, this partial answer is redundant.


Client-side validation Javascript or Server Side validation PHP

Question: I have a form which submits data which is entered in the database. Is is recommended to perform both client side and server side validation ?
Answer: A lot of answers here deal with trust but that's not exactly what the OP is asking.

Is [it] recommended to perform both
  client side and server side validation
  ?

Yes, in modern web applications users expect fast responses and if you can do some simple data quality checks up front, do them. Doing so can only make the user's life better. On the same token you must do server side validation for security reasons. I live by the following rule...
Do client side checking for usability and do server side checking for data integrity and security.
Comment: Since the OP put server side validation second only, the point that server side validation is the primary validation needed to be driven home first. ;o) Good answer though, +1.
Answer: Yes. Client-side validation is to help customer enter correct data, instead waiting for a time and then receive an error message from server. Then server-side validation is used to stop malicious attack, such as SQL-injection by fake request.
Answer: Yes. Client-side validation is only for the convenience of avoiding a round-trip for the user.  It absolutely can't be relied on in any way to keep data clean for the web app.
Answer: Validation always happens server side.
Duplicating the validation in Javascript is nice for the user experience, but it's not validation!
Answer: You should go with server side validation because never ever trust user input. Client side validation can be by passed so it is always better to have it server side.
Answer: Never trust client side validation. Ever.
Client side validation is only there for one reason: to prevent data that does not fit into a certain condition from even being submitted to the server in order to save server-side processing that will always return false, so why submit it in the first place?
If you don't have server-side validation, you don't have validation. That is all.
Answer: Both, Client Side for user convenience and server side for our.


Is this type of wing design structurally sound?

Question:

Is the simple wings
frame(spar,ribs)of this maxair hummer structurally sound? I am asking because I'm considering using thesame wing design on my homebuilt ultralight.
Comment: The wing has to withstand forces without breaking and at the same time have little weight. A very simple construction will be heavier than an optimized, more complicated design. Your choice.
Comment: This looks like a standard fabric-covered construction. That's how all aircraft were built in the first, say, 20 years (except the ribs were full, which is the only way to make them from wood and would probably be better when using metal too). Simple, but not extremely so (constructions like Rogallo wing are simpler still).
Answer: The simple answer is yes. There are many examples of working tube and fabric aircraft, both ultralights and larger designs, that make use of wing designs similar to your example.
The more complex answer is that it depends on a lot of things:

Did the designer anticipate flight loads correctly?
Did the designer model flight loads correctly when validating the wing design?
Do the materials used to construct the wing have physical properties close enough to the model used during design?
Was the aircraft built correctly according to the design?
Was the aircraft damaged such that the structure was compromised?

I don't want to discourage you from designing and building your own aircraft--one of the most exciting things about ultralights is how accessible they are to people with little or no formal training. Before you build and fly though, you should either learn how to determine the safety of a wing design using analytical methods, or stick to copying proven designs exactly.


How to check thermostat is working?

Question:
This is the wiring of my Honeywell T8411R. I noticed my room was not warming up. I moved the switch to Em.Heat and still no warm air blowing in ducts. I would like to test if my thermostat is sending signals. How do I do that with the given wiring configuration? My fan is working. How do I first test with Emergency Heat? I have split system.
Comment: Do you have gas or electric emergency heat?
Answer: With that thermostat it would be easier to tell if the air handler and heat pump are working rather than the thermostat.  The thermostat doesn't send a signal it closes switches just like a few automatic light switches. So you just need to see if the switches are closing. With that thermostat it may be a little difficult especially if it is not battery powered.
To test the air handler connect a jumper wire to the R terminal and to the G terminal. That will turn on the fan. To test the emergency heat connect a second jumper from R to W2. This would turn on the emergency heat. Remove the jumper from W2 and place it on Y/W1 to turn on the compressor.  Placing a third jumper between R and B will energize the reversing valve and cycle between heat and coil. Whatever you do, do notjump anything to C or at best you will blow a fuse and at worst let the smoke out of several components.  If all that works but does not work after reconnecting the thermostat it is most likely a thermostat problem.
If the thermostat is battery powered you could use an ohm meter to tell is each switch is closing or not. Each one of those pins on the bottom go to a terminal. Find which terminal they go to using an ohm meter. Then insert test leads into the corresponding holes in the thermostat and do the same as above except instead of different pieces turning on your ohm meter will go from OL to 0
Answer: Well the thermostat has to be in place to do the testing.  The testing will be done at the furnace or air handler.  If and when you have a heat pump it is more difficult because you have to activate the reversing valve in the heat mode and different systems do it differently. It sounds like you are describing a heat pump system.  The yellow will be energized to suck the compressor relay together.  The green will be energized to start the indoor blower.  And either the orange or brown with either be on or off depending on the system to put the reversing valve in the right position.
With a fossil fuel furnace, it is far easier.  With a call for heat the white will be energized.  The IFC (integrated furnace controller) takes care of the rest.

How to check thermostat is working?


Why does the stability of ascorbic acid decrease (increased rate of oxidation to dehydroascorbic acid) when pH increases?

Question: I am doing a Chemistry IA on the stability of ascorbic acid in different pH, and found that the stability decreased (there was a lower final concentration of ascorbic acid) as pH increases. Why is this so?
Answer: The decrease of ascorbic acid is probably mostly due to oxidation.
Oxidation is loss of electrons.
Increased pH means more ascorbate, thus negative charge and higher electron density.
Higher electron density means easier loss off electrons, thus more oxidation and less ascorbic acid at the end.


How do I increase my percentage of Clergymen

Question: In Victoria 2:A House Divided the tool tip recommend me to have 2% of my population as clergymen.
How do I increase this percentage?
Answer: Leon is right. You will need to use your national focus (ideally in your most populous territory) to increase your clergy to 2%.
You can also promote your lower class to clergy quicker by providing them with more personal wealth...eg lower taxes. You can use high taxes to demote your aristocracy in this way also. Job switching from bureaucrats, artisans and officers can also occur if middle class taxes are high, education is well funded and admin/military are poorly funded.
If you have a poor literacy rate or are uncivilised, you will find it beneficial to reach 4% clergy, as this boosts literacy and leads to more research points.
Answer: In Victoria 2, Not sure if you noticed that when you click on a province, there the little window that shows up detailing information about the province with little icons, there is a button that allows you to select a "National Focus". Use this to make the state use up a National Focus point in that province to create more Clergy. 2% population as clergymen is used early on in the game to obtain higher literacy and increase research points. Normally I find its only useful up until maybe the 1860s, after that rapid industrialization tends to come in with the available techs then you want to start making a lot of Clerks as they help you more towards the middle-game to end game with increasing profits, literacy and research points.
Also if you click on the population information and select a province, it tells you how much in percentage increases or decreases in any given category. Highlight the clergy section and there are little "Criteria" that must be fulfilled to either INCREASE or DECREASE the percentage of conversions into Clergy


Is there a "way" to assassinate people in skyrim?

Question: In skyrim, I've noticed that sometimes, when fighting, a cutscene occurs, and my character kills the enemy I was fighting. Is this random, or is there a specific way I can do this? Could I use this to, say, sneak up behind an enemy with a dagger and backstab them or something?
Comment: possible duplicate of [What determines when you do a finishing move?](http://gaming.stackexchange.com/questions/35077/what-determines-when-you-do-a-finishing-move) and [Is there a backstab animation in skyrim?](http://gaming.stackexchange.com/questions/117958/is-there-a-backstab-animation-in-skyrim)
Answer: This is just a random kill cam. While it used to be restricted to just melee weapons a patch to the game has introduced it to just about every weapon in the game including spells now.
As for the triggering, it can happen when your attack would kill the target not you kill the target because it happens. So to that end, it can not be used as a way to instantly kill things... Although an 'assassin' type person can often one hit kill most things from stealth and thus will see this animation quite often.
Answer: There no other way to make the cutscene on COMBAT appear to your likes. But the cutscenes on backstab, you can make it.


Group ring confusion

Question:
This actually causes a lot of confusion. For a finite group $G$ and a commutative unit ring $R$ I'm trying to prove that $h\in R[G]$ defined as $h=\sum\limits_{g\in G}g$ is in the center of $R[G]$. How do you write $h$ as an element of $Maps(G,R)$? How do you interpret the coefficients $c_g$ in $R[G]=\{\sum\limits_{g\in G} c_g\cdot g \ :\ c_g\in R\}$ relative to an $h\in R[G]$?
Comment: When rewriting a function of finite support as a formal linear combination, the coefficient of an element $g$ in the linear combination is the value in $R$ on that $g$ of the corresponding function. So $h$ has coefficient $1$ for each $g\in G$, meaning $h$ is the function $g\mapsto 1$ for all $g\in G$.
Answer: The notation $f_g$ is just an alternative functional notation for $f(g)$. That's what the comment is referring to.
The element $h=\sum_{g\in G} g=\sum _{g\in G}1\cdot g$ can be interpreted as a map $G\to R$ by saying that $g\mapsto 1$ for all $g\in G$.
The coefficients are simply a listing of where the map sends each $g\in G$. So if you know the coefficients, you know the map, and if you know the map you know the coefficients.
Is it absolutely necessary to prove it's in the center via the map interpretation? Isn't it much easier to notice that multiplying $gh=h=hg$ for all $g\in G$? Then since $h$ commutes with everything in $R$ and $G$, it commutes with everything in $R[G]$.
(Personally I've never got any use out of the functional interpretation, but then again I don't have a lot of representation theory training.)
Comment: @StanislasHildebrandt it is the exact same, from two different formal points of view.
Comment: @StanislasHildebrandt just like a complex number $a+ib$ can be seen as a function $\{1, i\}\to \Bbb R$, mapping $1$ to $a$ and $i$ to $b$.
Comment: So $h$ is a map that sends everything to $1$ but it is also the sum of all the elements of $G$ multiplied by $1$ on the left... so which is it?
Comment: @StanislasHildebrandt The beauty of interpretations is that it doesn't *have* to be one or the other. It can be both, and you learn different things about it that way.
Comment: @ArnaudMortier,  you are recommending (as I do also) the fourfold vision in mathematics. The more different ways we know for viewing a mathematical phenomenon, the better we can understand it.
Answer:
How do you interpret the coefficients $c_g$ in
  $R[G]=\{\sum\limits_{g\in G} c_g\cdot g \ :\ c_g\in R\}$ relative to
  an $h\in R[G]$?

The coefficients are part of the definition of a group ring. A group ring $R[G]$ is the set of linear combinations of elements of the group, with coefficients in the ring, endowed with the natural operations (notably the product in $R[G]$ combines the product in $R$ and that in $G$).

$$h=\sum\limits_{g\in G}g$$ How do you write $h$ as an element of
  $Maps(G,R)$?

Each element of $R[G]$ is characterised by the coefficient in front of each element of $G$. Therefore $\sum_\limits{g\in G}c_g\cdot g$ can be thought of as the map $g\mapsto c_g$.

Group ring confusion


What is the difference between "Check it", "Check it up" and "Check it out"?

Question: Is there any differences between "Check it", "Check it up" and "Check it out"?
Comment: Hello, again :-). I've seen the same avatar and the same question on ELL, so I guess I'm dealing with the same person - my comments on ELL apply here as well... Also, it is better to check the help centres of both websites and decide for which is the question suited better, and post only on one. If it would be more on-topic on the other website, someone will migrate it for you :-).
Comment: yup, that was me! and is it possible to remove the post on the other site sir/madam! ? I am not really accustomed with stack rules actually -_-
Comment: Uh, oh - well, since you are now getting answers in both places I'm not sure what's the best thing to do (this is why in the future it will be better for you if you have your question in one place - you would have your answers in one place as well). Generally, the moderators and high rep users have the power to migrate and close questions - you can always get their attention by flagging your own question and asking them to do move/close/delete the question for you. But I think someone else would know better what to do in this particular situation (I'm giving you tips for the future).
Comment: I'm voting to close this question as off-topic because it was cross-posted from ELL.
Answer: "Check it" is either slang, as in attention grabbing, or it's an imperative command such as "The tire seems to be low on air..." "Check it."
"Check it up" it not something I've ever heard or read, but it sounds similar to "check it out" in the attention directing sense.
"Check it out" could be used instead of "Look at that!" or it could be used in the context of an item that is checked in and checked out, such as a library book.
TL;DR - meaning changes based on context.
Comment: Almost understood! but lets have an example. Let's assume that the we want to order someone to go and check if the computer is turned on or off. What should we use? "Go and check computer if it is turned off" or "Go and check the computer up if it is turned on"? And according to your answer i think we can not use "check out"  because it is often used for making attention.
Comment: I can only answer as a native English speaker, the ELL stack exchange usually has much more technically in-depth answers for learners. Anyhow, about your example-- in such a case I would say "Go check if the computer is on", "Go see if the computer is on", or "Make sure the computer is on", or "Tell me if the computer is on" depending on what I actually want you want to do.

What is the difference between “Check it”, “Check it up” and “Check it out”?


The probability distribution for the number of points in a randomly sampled area of a plane covered with $N$ points (placed with uniform probability)

Question: With uniform probability, I place $N$ points on a plane of dimensions $D_x \times D_y$ and  sample a region of area $A \leq D_x*D_y$ which has arbitrary geometry.  What is the probability distribution for the number of points in this area?  Also, as a function of the area of the region I sample, how accurately can I guess the total number of points on the bounded plane?
Answer: Imagine that the points were placed one at a time, independently of course. Let $P_1,P_2,\dots,P_N$ be the points, listed in the order they were placed. The probability that $P_i$ is in our set is $\frac{A}{D_xD_y}$. Call this $p$.
We want the probability that exactly $k$ of the points are in our set. The distribution is binomial, and the required probability is $\binom{N}{k}p^k(1-p)^{N-k}$.
The obvious estimator of $N$ is $\frac{D_xD_y}{A}X$. We have not worked out a measure (with proof) of its reliability.
Comment: How would we estimate a confidence interval for $N$ provided the number of points in the sampled area?
Comment: I have not done the calculation. A crude guess is that we can se the estimator as a good enough guess of $N$ for the purpose of estimating the variance of $X$. Use that to estimate the variance of our estimator, and crossing one's fingers, hope that the estimator is close enough to normal. That gives us a confidence interval, one that I would feel moderately comfortable using at least for ballpark estimates when the ratio of $A$ to total is not too small. However, my derivation is too informal for an official answer.
Comment: Thanks a lot for your answer - it's very helpful.  However, I'd love to see a proof!


Countable support product of Sacks forcings and selective ultrafilters

Question: If $U$ is a selective ultrafilter on $\omega$, then $U$ generates an ultrafilter in $V^{\mathbb S}$, where ${\mathbb S}$ is Sacks forcing. The same is true with ${\mathbb S}$ being replaced by ${\mathbb S}_n$, the product of $n$ copies of Sacks forcing, $n<\omega$ (Halpern and Pincus, 1981), and I can see a proof of that. How about ${\mathbb S}_\omega$, the full (= ctble.) support product of $\omega$ copies of Sacks forcing? People refer to R. Laver, "Products of infinitely many perfect trees," 1984, for a positive answer, but I don't find this answer in that paper (cf. Theorem 6 of that paper which states a weaker result). Is it true that if $U$ is a selective ultrafilter on $\omega$, then $U$ generates an ultrafilter in $V^{{\mathbb S}_\omega}$?
Answer: The collection of possible large sets is analytic, namely: $\{A\subset \omega: \forall i<\omega\ \exists U_i\subset T_i \text{ $U_i$ is perfect and } f\restriction \bigcup_{n\in A}\Pi_{i<\omega} U_i(n) \text{ is constant}\}$ (here we can assume the length of the roots of $T_i$ goes to infinity so the coloring $f$ is coded by a real). The finish by a theorem of Mathias: if $P\subset [\omega]^\omega$ is analytic, and $U$ is Ramsey, then there exists $A\in U$ such that $[A]^\omega\subset P$ or $[A]^\omega\cap P =\emptyset$. The first option must appear by density of the set under $\subseteq$.
I saw  this argument first from Olga Yiparaki's thesis: On some tree partitions.
To trigger another problem, it may be interesting to think about what happens if the ultrafilter is merely a P-point. Then I think we need to get to the nitty-gritty of Laver's proof.
Comment: Restricting to levels in $A$, namely let $T^*_i=T_i\restriction \{l_n: n\in A\}$. Color the nodes according how it decides $n\in \tau$. Apply Laver's theorem to $\Pi_{i<\omega} T_i^*$ with the coloring.
Comment: Yeah I was once convinced that the same statement holds for P-points as well but now I find no other way than getting into the Laver proof (even so I don't see things immediately work). On another note, I believe the ultrafilter generated in the forcing extension is still selective: any decreasing sequence of elements in $U$ (the sequence may not be in $V$ but each individual element can be WLOG assumed to be in $V$), then we use the Sacks property of the forcing plus fusion to determine each element with possibily finite error.
Comment: I think the characterization in terms of selectivity is key: for any $\langle A_n\in U : n\in \omega\rangle$, there exists $A\in U$ such that $A\backslash n \subset A_n$ for all $n\in \omega$. This is a finer pseudointersection which guarantees Ramseyness.
Comment: Okay, if $\tau$ is a name for a subset of $\omega$, then there are densely many $p = (T_i : i<\omega) \in {\mathbb S}_\omega$ which come with some $(l_n : n<\omega)$ s.t. for each $n$, if $i<n$, then $T_i$ has $2^n$ nodes of length $l_n$, and if $i \geq n$, then $T_i$ has one node of length $l_n$, and if $(s_i : i<\omega)$ is a sequence s.t. $s_i$ is a node in $T_i$ of length $l_n$, each $i$, then the condition $((T_i)_{s_i} : i<\omega)$ decides ``$n \in \tau$.''
Comment: Fix such a $p$, $(l_n : n<\omega)$. You say (if I understand you correctly) that if $A \in U$, then there is an infinite $A' \subset A$ and some $q = (T'_i : i<\omega) \leq p$ s.t. if $n \in A'$ and $(s_i : i<\omega)$ is a sequence s.t. $s_i$ is a node in $T'_i$ of length $l_n$, each $i$, then the condition $((T_i)_{s_i} : i<\omega)$ decides ``$n \in \tau$'' either always positively or always negatively, independently from the choice of $n$, $(s_i : i<\omega)$. How do you prove that?
Comment: Ah, thanks, that makes sense! So this does need the proof of $HL_\omega$ of Laver's paper; I was hoping that it could be avoided.
Comment: This argument shows that the ultrafilter generated in the extension will be a p-point. Why will it also be a q-point?
Answer: I'm not allowed to comment yet but your question looks equivalent to having the set $A$ in $\mathrm{HL}_\omega$ (see Laver's paper) belong to the ultrafilter. I do not recall how flexible Laver's proof is for this to be possible. I would look at the proof of "selective is Ramsey" for inspiration.
Comment: I agree with what K. P. says concerning "$A \in U$," but I don't see the answer to this more specific question either, which is one of the reasons why I asked my original question.


Need help with shipping charges

Question: I am running a client store and they want to give free shipping in India and shipping charges 2000 for all other countries how to achieve this?
Comment: i think you are try Table Rate Shipping Method and check this link ---- https://www.mageplaza.com/kb/how-to-configure-shipping-method-magento-2.html
Answer: You're best of using the native Magento Tablerates extension.
<code>System > Configuration > Shipping methods > Tablerates, set Condition to Price vs. Destination
</code>
and next switch to the website you want to apply it to.
set amount 0 for india, 2000 for others.
read this for further information
https://docs.magento.com/user-guide/shipping/shipping-table-rate.html
Answer: First set 2000 as shipping amount for all the available countries on your site for your shipping method.
Now, you can achieve this by Cart Price Rules
Go to Marketing > Cart Price Rules > Add new rule

Create a rule if the shipping country is India

Now apply the action for the condition when this condition is matched.

So if the country is India, the shipping amount of 2000 will be discounted in total

You can also achieve this programmatically by using event on checkout and observer matching condition if the order shipping country is India, it should change shipping amount to zero and so. But above given solution seems good to me if there's no other requirement.

Need help with shipping charges


Why do camera phones have lenses of inferior quality?

Question: I've heard that mobile phone cameras have lenses of inferior quality to those in DSLRs and point and shoot compact cameras. Is this true, and if so, why?
Comment: I'm sure there are some smartphones with good lenses outthere (Carl Zeiss for example) and DSLR with bad lenses too.
Answer: The lenses in mobile phones are typically made from molded plastic elements rather than ground glass elements, and these are in optically inferior to glass in general (higher dispersion, lower refractive indices). However molded elements have a big advantage in that they can be made into absolutely any shape, whereas glass is very difficult to grind into anything other than a sphere. Highly sophisticated designs thus are possible with every element being ashperical (high end DSLR lenses typically have only one or two aspherical elements).
Mobile phone camera lenses are in some ways better than DSLR lenses in that their resolution in terms of line pairs per millimeter is higher. But the sensors they are used with are so small that the total resolution across the image is lower. They also have to be faster (wider maximum aperture) to avoid diffraction, attempting to achieve the total image resolution of the best DSLR system is simply beyond the capabilities of the materials, given the size of phone cameras - which is the ultimate limiting factor.
Answer: The main difference between a DSLR and a mobile phone camera is not the lens, but the sensor. The sensor in a typical consumer DSLR is around about 24 x 16 mm, but that in a typical smartphone (the iPhone 6) is around 4.8 x 3.6 mm - or in other words, the DSLR sensor is around 22  times larger than that in a smartphone.
As Matt has answered, the lenses in a smartphone are also typically made of plastic rather than glass, but it doesn't really matter what they're made of - even if you put a super-engineered glass lens on a smartphone sensor, you still wouldn't get near the image quality of a large sensor camera.
Comment: The iPhone 6 is hardly a typical smartphone, and its sensor is *much* smaller than you state, only 4.8mmx3.6mm


IPad mini repeating playlist without my permission

Question: Previously, my iPad would play a playlist and stop. Now it keeps repeating endlessly. The only buttons I can find are play, stop, restart and skip ahead. There is no "repeat" button!
How do I make it stop repeating the playlist?
Answer: There is a repeat button in Apple Music. It is shown in this image: http://cdn.cultofmac.com/wp-content/uploads/2015/09/Repeat-icon.jpg
All you need to do is deselect that option. Don't be misled by the small '1' that shows up on the icon- you need to deselect it entirely.
If you don't have a button, please provide a screenshot so I can give different advice, but you should have it... It's easy to miss though
Comment: I am not signed up for Apple Music. I use iTunes.
Comment: Also I took a screenshot, but i don't know how to send it to you.


Klein Gordon equation in tensorial form

Question: The problem is to show that $$\psi=\psi_0e^{iP_\mu x^\mu}$$ is a solution to Klein Gordon equation $$(\partial _\mu \partial ^ \mu +m^2)\psi=0$$ if and only if the 4-momentum $p _\mu$ satisfies the relativistic dispersion relation. Tensor calculus is a new subject for me so I do not really know how to solve it but I assumed that $p$ is a momentum operator such that $$\partial _\mu \psi=i p_\mu \psi \mathrm{\,\   and \,\ } \partial^\mu \psi=ip^ \mu \psi$$ and then $$\partial _\mu \partial^ \mu \psi=ip^ \mu ip_\mu \psi=-p^2\psi=-m^2\psi\implies p^2=m^2$$ which leads to the answer. How do I solve it explicitly using differentials and not momentum operators?
Comment: In order to prove the  _"if and only if"_ statement you must demonstrate both the directions of the sentence. In the answer you shown the backward one (using the definition of $p_\mu$). Now try to prove the other direction (hint: put directly the expression of $\psi$ into the KG equation and do the derivatives)
Comment: Please take a minute to read our [guidelines for homework and exercise questions](https://physics.meta.stackexchange.com/q/714) as well as [check-my-work questions](https://physics.meta.stackexchange.com/q/6093). We intend our questions to be potentially useful to a broader set of users than just the one asking, and we prefer *conceptual* questions over those just asking for a specific computation.
Answer: You can show your result $\partial_\mu \psi = i p_\mu \psi$ by applying $\partial_\mu$ to $\psi$:
$$
\partial_\mu \psi = \partial_\mu \left(\psi_0 e^{i p_\nu x^\nu}\right) = \psi \partial_\mu \left(i p_\nu x^\nu\right) = i p_\nu \psi \left(\partial_\mu x^\nu\right) = i p_\nu \delta_\mu^\nu \psi = i p_\mu \psi
$$
Comment: Thank you but why in step $$\psi \partial _\mu (ip_\mu x^\mu)=ip_\mu \psi(\partial_\mu x^\mu)$$ the momentum $p_ \mu$ is factored out in front of the differential? Isn't the differentiation carried over it as well as position?

Klein Gordon equation in tensorial form


Why does Gandalf say he is Saruman when he comes back as 'Gandalf The White'?

Question: I've tried looking up why Gandalf claims to be Saruman but I keep finding things saying 'Gandalf is trying to show that he is as Saruman should have been - how he shouldn't be corrupt' is this correct?
Comment: I've always thought he was using "Saruman" as a title, instead of referring to the person. So by saying "I am Saruman" he is saying he is now the chief wizard, head of the white council. The second part of his statement shows that it is the role Saruman was meant to play before he was corrupted.
Comment: @childcat15: I am sure you are right about the sense, but I don't think you have to think of "Saruman" as a title for that, he is just saying that he is what Saruman was meant to be — that is what the words, quoted in The Fallen's answer, clearly indicate..
Comment: in a nutshell, I think that would be a fair statement
Comment: Related: [Why does Gandalf say that he is Saruman?](http://movies.stackexchange.com/q/61422/49)
Answer: The relevant quote is:

Yes, I am white now,' said Gandalf. 'Indeed I am Saruman, one might almost say, Saruman as he should have been.

When the Istari arrived in Middle-Earth, they were as emissaries from Valinor. They no longer wanted to interfere directly in the affairs of Middle-Earth, so the 'wizards' were sent to help the free peoples of middle-earth in their fight against Sauron. You can discern this intent by what Cirdan the Shipwright said when he gave the elven-ring Narya to Gandalf:

"Take this ring, master," he said, "for your labours will be heavy; but it will support you in the weariness that you have taken upon yourself. For this is the Ring of Fire, and with it you may rekindle hearts in a world that grows chill."

They were, however, forbidden to "dominate the peoples of Middle-Earth or match power with power". Saruman was set up as the leader of the order, and as such bore great responsibility in carrying out this task. Thus, when he accumulated power for himself and attempted to dominate the peoples of Middle-Earth, he was in direct opposition to his orders.
Therefore, Gandalf, when he was 'promoted' after his resurrection, cast Saruman from the order. He then took the lead in inspiring the free peoples fighting against Sauron. In this capacity, he was fulfilling the role Saruman was sent for, indeed "Saruman as he should have been."
Comment: I think the phrase "one might almost say" is the key here. Gandalf explained it pretty well himself.
Comment: In addition to Keith's comment, it also jumps out at me that 'Gandalf' and 'Saruman' were their names on middle earth.  My understanding is that they did not take those names until they arrived there.  So they may not associate those names with their identities the way they would their 'real' names, adding to the confusion.
Comment: @Nicholas - I don't think that's it. We never see Gandalf or Saruman rejecting those names in any way, or indicating they viewed them lesser. The fact that Gandalf says he is Saruman is because the people he was speaking to *knew them as Gandalf and Saruman*.
Comment: @SSumner I think I might be trying to say something similar to you.  More like the names were titles than "names", like they described their role on Middle Earth rather than their identities as Maiar.  I'll readily admit that I'm far far from an expert, though.
Comment: @Nicholas - that's not really what I was trying to say. I was saying the names were just names, and he used them in the context of which names his audience knew
Answer: In Christian theology, Adam represents all humans, their potential and their fall.  (Adam literally means "Human" or "Earth"). As told by Romans 5, Christ is the new human. He is what Adam should have been.
Tolkien was deeply religious. I suspect he may have seen Gandalf as the foil of Saruman, as representing what Saruman could have become.
Comment: The part of what you wrote that directly addresses the question is opinion, and ought be expressed in a comment, not as an answer.


Using Display S, M, L, XL, 2XL instead of H1 -H6 for typography in a Design System Manager (DSM)

Question: I find using specific H1 - H6  is confining since different pages may need a different size H1 and so on. Also instead of making 2 sets for desktop and mobile this would work as one file. Does anyone work like this and use something similar in handoff?
Comment: What exactly is your UX problem?  You say you want to use alternatives to H1-H6, but you don't really explain what the problems with H1-H6 are.
Answer: I happen to agree with the poster. I think the problem that we are mixing hierarchy with size, and you quickly come across a problem if you want to use a large size but not use an h1 for example. I try to think more on a component level, and think of the h1 of the component. I think ChatGPT says it better:
"Don't use H1-H6 tags for styling: Avoid using H1-H6 tags solely for styling purposes, such as to increase the size of text. Use CSS to style the text instead."
Comment: (a) Most of us don't seem to like ChatGPT in answers, for a *lot* of reasons; (b) One of the ways to use CSS is to use it *with* tags, such as h1 - h6 - i.e., so that h1 tags style a particular way.


Homomorphic Encryption and Conjugation

Question: In the implementation of HEAAN, they have implemented the conjugate function. It computes conjugate of a polynomial. Effectively they have reverted the positions of the coefficients and negated their values. Can anyone please explain me how does it work (mathematically).
Answer: What they have implemented is close to the notion of reciprocal polynomials.
For
$$p(x) = p_0 + p_1 x + \dots + p_{n-1} x^{n-1}$$
these are given by
$$p^*(x) = p_{n-1} + p_{n-2}x + \dots + p_0 x^{n-1} = x^{n-1} p(x^{-1}).$$
This is not precisely what is done though, as what HEAAN implements is instead
$$p_*(x) = p_0 - p_{n-1} x - p_{n-2} x^2 - \dots - p_1 x^{n-1}$$
Still, for $x$ such that $x^{n} \equiv -1$ (equivalently, when working in the polynomial ring $\mathbb{Z}[x]/(x^{n}+1)$), one can easily check that
$$p_*(x) = - x p^*(x) = p(x^{-1}) = p(-x^{n-1}).$$
This third expression is probably the easiest way to understand them.
They are simply evaluating $p$ at $x^{-1}$, where one is viewing $x$ as an element such that $x^n\equiv -1$, e.g. it is (formally) a root of unity (either in $\mathbb{C}$ or a finite field), and therefore it is sensible for it to have an inverse.
Comment: Thanks, @Mark. Given the link (you provided) and the explanation, I understood it. It totally makes sense. I am grateful for the answer.
Comment: Sorry for the drive-by comment, but I wonder in what case the reciprocal is useful in the context of HEAAN? It seems like it is a means to provide some useful automorphism that is not a rotation, but I wonder what sort of higher-level operations make use of this.
Comment: @JeremyKun It is mostly to shrink ciphertext sizes iirc. The HEAAN authors like to embed $\mathbb{R}^N$ into a certain subspace of $\mathbb{C}^N$, see section 2.3 of [the HEANN paper](https://eprint.iacr.org/2016/421.pdf). I believe the condition that $z_j\equiv \overline{z}_{-j}$ can be alternatively written as $p(x) = p_*(x)$. This is perhaps more obvious in their other writings, see for example [this](https://eprint.iacr.org/2023/1788.pdf). They refer to discarding the later $N/2$ coordinates as these being "conjugates" of the prior coordinates. One can also more easily see that
Comment: claimed relationship $p(x) = p_*(x)$ holds (at least, if one knows that $5^i$ generates $\mathbb{Z}_{2^k}^*$).
Comment: As for how this may be independently useful, it is one way to embed the Euclidean inner product $\langle \vec x, \vec y\rangle = \sum_i \vec x_i\vec y_i$ into $\mathbb{Z}[x]/(x^n+1)$. In particular, the constant coefficient of $p(x) q_*(x)$ is $\langle \vec p, \vec q\rangle$ (if I remember correctly). I don't think this is a particularly good way to compute $\langle \vec p, \vec q\rangle$ though. In particular it "wastes" many coefficients of the output polynomial, which things like the [Diagonally Dominant](https://eprint.iacr.org/2014/106) matrix-vector multiplication algorithm doesn't.

Homomorphic Encryption and Conjugation


Is there Japanese audio for "The Daily Life of the Immortal King"?

Question: I tried to watch it and the audio isn't Japanese and I would prefer to watch it with Japanese audio and English subtitles or English audio. Do any of these exist and if so where can I watch them?
Comment: Note to answerers: take note that this site doesn't condone piracy, so links to questionable sites will be deleted without prompt. Thanks.
Answer: I know that there isn't a dub in English, but I doubt there will be one in Japanese either.
It also hit me pretty hard when I realised it wasn't Japanese in the first 20 seconds of it, but honestly? I've been putting off learning Mandarin for so long and this just made me finally commit.
It's unique. It's different. Just enjoy it the way it's supposed to be.
Comment: Crunchyroll has some of it in English now
Answer: I do not believe so because it is produced by Bilibili. They often don't have their anime in Japanese dub or English dub.
Answer: Since you asked in the body of your question whether English audio is available, an English dub for the first season of the anime is now available at Crunchyroll. (User Joe W also mentioned this in a comment under another answer.)
Some information regarding the English cast, etc. can be found at the Anime News Network.


What are positive divisors of degree 2 on Elliptic Curve $y^2=x^3-x-1$ over $\mathbb{F}_3$?

Question: Let (E) be an elliptic curve $y^2=x^3-x-1$ over $\mathbb{F}_3$, $a_0=1$, $a_n$ is the number of positive divisor of degree $n\geq 1$. $a_1$ in this case is the number of points of E, i.e., $a_1=1$ only a point $\infty$.
The Zeta function $Z(t)=\sum_{n=0}^{\infty}a_n t^n$ is computable
$$Z(t)=\dfrac{1-3t+3t^2}{(1-t)(1-3t)}=1+t+4t^2+13t^3+...$$
My question is: What are positive divisors of degree 2 on Elliptic Curve $y^2=x^3-x-1$ over $\mathbb{F}_3$?
Is a positive divisor of degree 2 a sum of 2 points of E? If it is true, I can't explain $a_2=4$. Thank you for your helps.
Comment: You also have divisors coming from $\mathbb{F}_9$-points, which should give you the remaining divisors counted by $a_2.$
Comment: The three $\mathbb{F}_9$-points are the points corresponding to $(0,i),(1,i)$, and $(2,i),$ where $i$ is a square root of $-1$ in $\mathbb{F}_9$.
Comment: An effective divisor of degree 2 either comes from a sum of two points of degree $1$ over your base field or from one point of degree $2$ over your base field. Similarly an effective divisor of degree $3$ on your curve would either be a sum of $3$ $\mathbb{F}_3$-points, a sum of a $\mathbb{F}_9$-point and a $\mathbb{F}_3$-point, or a single $\mathbb{F}_{27}$-point.
Comment: @dhy: can you explain more? I don't understand which divisors coming from $\mathbb{F}_9$-points? Could you give me an example or reference? Thanks.
Comment: @dhy: there is only one point $\infty$ over $\mathbb{F}_3$, i believe it is degree 1, so there is one effective divisor of degree two $2\infty$. What are another three points of degree 2 in this case?
Answer: For a nonsingular cubic curve $X \subset \mathbb{P}^2$ over a finite field $\mathbb{F}_q$, if $a_1$ is the number of $\mathbb{F}_q$-points of $X$, and $a_2$ is the number of effective degree two divisors on $X$, there is a relation $$a_2 = (q+1)\cdot a_1.$$ So in the example you consider, $a_1 = 1$ implies $a_2 = 4$.
This is a consequence of the following geometric observation: any degree two effective divisor determines a line in $\mathbb{P}^2$ passing through it, and the third intersection point of the line with the curve. Conversely, any rational point on $X$ and a line $L$ through it determines a degree two divisor obtained as a residual intersection of $L$ with $X$. The $(q+1)$ multiple in the formula comes from the fact that there are $q+1$ lines through a point in $\mathbb{P}^2$.
This geometric observation works in higher dimension and for singular cubics as well and allows to relate the symmetric square of the cubic to the Fano variety of lines on it in the Grothendieck ring of varieties thus relating their number of rational points over finite fields, Hodge structures and so on, see our paper with Sergey Galkin: https://arxiv.org/pdf/1405.5154.pdf. What I explained above is formula (5.2) from the paper with $d=1$ and the two right-most terms being equal to zero.
UPDATE: When applying the procedure above to the curve $y^2 = x^3 - x - 1$, one finds that lines through the point at infinity are given by the equation $x = \alpha$, where $\alpha = 0,1,2$, and intersecting these lines with the curve one finds points $(0, \pm i), (1, \pm i), (2, \pm i)$ as in dhy's comments. The last divisor is $2 \cdot \infty$ obtained from the line infinity triple tangent to the curve.
Answer: Riemann-Roch together with the fact, that there is a unique point implies that Picard group is cyclic and line bundles are uniquely determined by their degree. So you have a unique line bundle of degree two, that gives you a hyper-elliptic double-covering map to $P^1$, and effective divisors of degree two are exactly the fibers of this map. Concretely this map is given by the projection from the unique $F_3$-point.
Also note that $13 = |P^2(F_3)|$, so all effective divisors of degree three are just given by thirteen lines in $P^2(F_3)$.


Why is research on grammatical gender important?

Question: I was wondering why is research on grammatical gender important? Why is exploring this area of linguistics of any interest to linguists? What can it tell us about language (especially with regards to cognitive linguistics)?
Comment: Have you read _Women, Fire and Dangerous Things_? It's a long time since I read it, but there is a lot there of relevance to cognitive linguistics, about theories of classification.
Comment: Tense and gender are things that Western (particularly Indo-European) languages think a lot about, but they hardly register in many Austronesian languages, where social aspects are much more important. They are not so important in English as they used to be, too. But "grammatical gender" is the same sort of phenomenon as lexical classifiers, like the _buah_ in  BI _dua buah buku_; the same categories apply in big systems.
Answer: There are a few million answers (32, if I'm not mistaken), here is one. Bantu languages have a complex system of grammatical gender where nouns have some gender, and things that agree with nouns agree in gender (we call them "classes"). The marker that you get depends on a lexical property of the noun, but also on whether it is singular or plural. What happens when you conjoin singular nouns and you have to agree with that conjunction? If they are the same class, it's just the "corresponding" plural form; but what if they are in different classes? Then things get very complex. In some languages, there is a hierarchy of the type "If A & B then agree in the plural of B; If C & B, then agree in the plural of C" – in other words, order the classes A < B < C and take the highest class in the conjunction. How exactly does this business of resolving differences in grammatical gender work? That's a very interesting question.
Answer: Grammatical gender is a subset in systems of noun classes, which occur in different forms in many languages. Noun classes describe how a language categorizes nouns for the purposes of counting, morphology, relating to verbs and adjectives, etc. Gender is also related to number (e.g. singular, dual, plural) and lexical classifiers (as noted in the comments).
Noun classes have implications for cognitive linguistics (see the huge literature based on Robin Lakoff's book mentioned above), but the fundamental reason why people study them is to better understand the mechanics of each language, just as scientists study the physical characteristics of animals and viruses.


How to specify a robot go always right relative to itself from absolute perspective (north west east south)

Question: I have a robot that has a start and goal position within a maze. Each point in the maze-grid is simply a Position object containing x and y. I need an algorithm that specifies the robot only moving to its relative right only using goEast, west, east and south from the perspective of the maze.
There is an implementation already (with uml and mathod names) that does not support degrees or heading. Just current position, next position and then directions in absolute terms. And the logic that goes for the robor for going only to it's relative right.
Comment: Sorry, but still there is no problem here, what you have posted is underspecified at best. We do not see uml or your problems from post or comments. If you know positions via x,y coordinates, use them for directions. If you do not know starting direction, do not have any frane of reference, the problem is only solvable via exploration (nearest obstacle vs starting position to tetrive direction), if this is not an option, the problem is unsolvable. If say starting position is 2,3, and the next position is 3,3, it was east. This coordinates tell you what is the heading.
Comment: I do apologize for the vague problem specification, and I realize that I should have explained more. This is a uni assignment and I was afraid to be branded a cheater/to actually cheat, or to let the assignment to be found on stackoverflow. I have learned that either I fully define the problem as much as I can or I don't. It was simply too abstract in this case. In the given UML we were supposed just edit one and implement two classes, robots. But only absolute coordinates were provided. I was hesitant to ask, but as suggested here, I was also supposed to create robot's frame of reference.
Answer: I'm not sure what the difficulty is, here. If the robot is facing north, its right is east; if the robot is facing east, its right is south; etc.
Comment: @Senethys Please specify the problem fully by editing the question.
Comment: Need to specify that it doesn't have any directions as such.
Comment: So create frame of reference. If it is facing south, keep directions as it moves.
Answer: As suggested in another comment, a viable solution would be to keep track of the heading of your object.
Your goEast function would look something like this:
<code>while(heading != south)
    turn right 90 degrees
</code>
Same thing for the rest of the directions
Comment: There is an implementation already (with uml and mathod names) that does not support degrees or heading. Just current position, next position and then directions in absolute terms.


Dark brightness / gamma with Nvidia drivers

Question: I have this problem... When Im on Ubuntu 16.04 (LTS) or basicly every Linux distro that i tried before, i have a bug. On open-source drivers, my brightness and gamma are normal, but when i use any nvidia driver (newer, older, doesnt matter), my gamma and brightness are way too dark. Im using a workaround with xgamma on startup, but its kinda not a permanent solution (because i use fullscreen apps and they reset the gamma upon exiting). So is there a way to set the same gamma that open-source driver has? Or do i have to use open-source driver until nvidia fixes it?
Answer: Have you tried 'Nvidia Settings'?  It's in the repositories. Then you can set Gamma and Colors to your liking. even per app, or overall.


Is quark electric charge also confined?

Question: Since we will (maybe) never observe free quarks which has fraction charge, is it logically correct to say that the fraction (1/2,2/3 etc) electric charge is also confined. I.e. the charges that we do se (+1,-1 etc) are "white" in the sense of color?
Comment: As currently formulated the question is nonsensical. Electric charge is a different quantum number than color and it does not make sense to ask if electric charge is color neutral: they are orthogonal.
Answer: I don't see the analogy.
Isolated color charged particles (quarks) have not been observed, this is not the case electric charge particles (like electrons) because we observe total net electric charge.
You might mean that fractional color has not been observed, neither fractional electric charge. In that case, it's true, but this is not what confinement means.
Comment: Fractional charge has been observed! Because the top quark lifetime is shorter than confinement time you can measure it's charge: see http://arxiv.org/abs/1307.4568
Comment: @jk88 They'd been observed [before](http://physics.stackexchange.com/questions/60356/how-quark-electric-charge-directly-have-been-measured?rq=1), though the analysis is admittedly more involved.
Comment: Perhaps I should be clearer. I mean that as long as quarks are confined, so is their 1/3 or 2/3 fraction electric charge.
Comment: I think that you could say something like that, because you always observe integer charge. But the reason of quark confinement is strong interaction (color).
Comment: I edited the question a little.
Comment: @ jk88 well that was news...
Answer: No- because electric charge can be measured (in principle) up to an infinite distance from the source, i.e. it's range (and influence) is infinite.
Colour charge can only be measured up to a range close of approximately $r_p$, the radius of the proton, i.e. its range (and influence) is confined to below a fixed distance.
As for whether the quark's electric charge is confined - no. The proton is electrically charged- but this is 'actually' the charge of the quarks in the proton. The influence of this electric charge (mixed with quantum mechanics) is why electrons can interact with protons to form atoms.
Comment: (I edited the question a little) Yeah, I know that the proton has charge but have you measured a fraction charge? What I'm saying is that perhaps measuring a fraction charge is equivalent to measuring a single color: i.e. if you can measure one you could probably measure the other too.
Comment: Ah but fractional electric charge has been measured (see my comment on jinawee's answer). The reason why a quark's colour charge can't be measured is fundamentally due to the nature of the strong force.

Is quark electric charge also confined?


Charging for apps. in the software center?

Question: I have been wanting to switch from Windows to Linux, but I noticed Ubuntu software center charges for some apps. I thought Linux/Ubuntu is a free Open Source!
Comment: Free software as in freedom, not free beer. http://en.wikipedia.org/wiki/Free_and_open-source_software
Comment: Closely related: http://askubuntu.com/questions/625002/how-can-open-source-programs-make-money/625012#625012
Answer: This is a bid discussion, first you shall know what is the meaning of open source and what is meaning of free. Plus you should have some knowledge on licenses and different types of licences.
In simple words:
What is open source software?

Open source software is software whose source code is available for
  modification or enhancement by anyone.
"Source code" is the part of software that most computer users don't
  ever see; it's the code computer programmers can manipulate to change
  how a piece of software—a "program" or "application"—works.
  Programmers who have access to a computer program's source code can
  improve that program by adding features to it or fixing parts that
  don't always work correctly.

What do you mean by Free?

A program is free software if the program's users have the four
  essential freedoms:

The freedom to run the program as you wish, for any purpose (freedom
  0).
The freedom to study how the program works, and change it so it does
  your computing as you wish (freedom 1). Access to the source code is
  a precondition for this.
The freedom to redistribute copies so you can help your neighbor
  (freedom 2).
The freedom to distribute copies of your modified versions to others
  (freedom 3). By doing this you can give the whole community a chance
  to benefit from your changes. Access to the source code is a
  precondition for this.

Selling Free Software
Many people believe that the spirit of Free software is that you should not charge money for distributing copies of software, or that you should charge as little as possible—just enough to cover the cost. This is a misunderstanding.

The word "free" has two legitimate general meanings; it can refer
  either to freedom or to price. When we speak of "free software", we're
  talking about freedom, not price. (Think of "free speech", not "free
  beer".) Specifically, it means that a user is free to run the program,
  change the program, and redistribute the program with or without
  changes.
Free programs are sometimes distributed gratis, and sometimes for a
  substantial price. Often the same program is available in both ways
  from different places. The program is free regardless of the price,
  because users have freedom in using it.
Nonfree programs are usually sold for a high price, but sometimes a
  store will give you a copy at no charge. That doesn't make it free
  software, though. Price or no price, the program is nonfree because
  its users are denied freedom.
Since free software is not a matter of price, a low price doesn't make
  the software free, or even closer to free. So if you are
  redistributing copies of free software, you might as well charge a
  substantial fee and make some money. Redistributing free software is a
  good and legitimate activity; if you do it, you might as well make a
  profit from it.


Is there a limit past which bigger textures has no effect?

Question: I have a human model with 8k textures. will reducing the textures to 2k have an impact on visuals or performance? can I get away with compressing just the specular and bump map and keep the diffuse map at full size?
Comment: Human eyes cannot perceive much better than 4K and most monitors cannot even display 4K. Build your textures in 4K but reduce to at most 2K in your projects. I use Substance Designer to build my procedural textures and can generate a version up to 4K res at any time just by changing a slider.
Comment: @hatinacat2000 How much you can perceive in terms of resolution will depend on the magnification, and the distance to the person. The eye can definitely see beyond 4k, it all depends on how close, and the size of the pixels... 5K, 6K and 8K monitors do exist and will need images on such resolution.
Comment: True, but we can only parse a pixel density of about 338 pixels/inch no matter how close we get to an image. A 4K game texture is as useful as the camera is close enough to show off that detail. If OP is doing a portfolio piece, he only needs to keep the resolution high enough for that detail to be seen, so maybe if we wants to fly the camera directly over the skin texture, 4k or even 8K would make sense.
Answer: Yes reducing the resolution of the textures will eventually make the pixels large enough to notice, but will improve performance.
Compressing one map and not another depends on your node setup or in a external application it's limitations, but it should be fine.
Answer: Texture size will definitely have an impact on the performance of your computer. A larger texture will use more resources, and the resources on a computer are limited.
A texture in 4K will use 4 times more resources than one in 2K, and an texture in 8K will use 4 times more resources than one in 4k... so it is quite easy to push your computer past it's limit without much effort...
Compressing doesn't help either. A compressed image has to be decompressed in blender, so even if on disk it seems smaller, once it is decompressed in blender it will use more resources.
Read: Why does Blender use so much memory for large textures?
At the end it all depends on how large the textures will be on the screen. It makes no sense to have 4k textures on objects that will only be a few pixels on the screen. Use large textures for objects that will be displayed quite large on a screen (like object that are close to the camera). 3D is a balancing act between quality, expectations and the real capabilities of your computer.


Can i travel alone within the eu with my article 10 family permit from italy?

Question:
I would like to go on holidays without my eu family member, i use to travel alone with my residence card from italy  but am not sure of this particular permit(article 10)
Answer: Without your EU family member, you can normally use that card (in combination with your passport) to go anywhere a Schengen residence permit will take you.  That includes the Schengen area and all but two of the non-Schengen EU countries.  The two countries that are not included are the UK and Ireland.
However, in a comment you have indicated that you do not reside in Italy.  Therefore, the Italian residence card is probably no longer valid, and you should not rely on it for travel to the Schengen area or for any other purpose.  Instead, you should apply for a Schengen visa.  Because you will be traveling without your family member, you will have to pay the fee and go through the normal application procedure.
(Your UK residence card is probably a "residence card of a family member of a union citizen," in which case you could use it to travel to other EU and countries without a visa as long as you are traveling with or joining your family member there, but that is not the case here.)
Comment: @BellaVeronika if you reside in the UK then your Italian *carta di soggiorno* is probably no longer valid.  I would not try to use it if I were you.
Comment: @BellaVeronika you don't live in Italy.  The permit is probably void.
Comment: @BellaVeronika in general, you will lose your right of permanent residence in Italy after two years of absence.  At that point, the document becomes invalid because the conditions under which it was granted no longer prevail, even if the document itself has not expired.  If you have lived in the UK for less than two years then maybe you can use it.  But you should not be surprised if you are questioned at the border or at check-in for your flight.
Comment: Haha ok, im in the uk for only 2months .. does that mean i can tour the schegen or need a visa
Comment: @BellaVeronika As alluded in the previous comment, I suppose you can probably get away without a visa since you've been away from Italy for less than 2 years.  But having a UK residence card *and* an Italian one at the same time is a bit odd, and there's no guarantee it won't cause problems.  You can avoid those problems by getting a visa.
Answer: No, you must have a visa issued based on your own rights.
In most cases a multiple entry visa is issued once for the lifetime of a passport.

With an Article 10 or 20 Residence Card you can

travel with or join the EU-Spouse

to the countries in the Schengen Area.
To travel without the EU-Spouse or to be joined later by your EU-Spouse

you must apply for a Schengen Visa

for visits to other countries in the Schengen Area.
Comment: This answer is incorrect.  An article ten card issued by a Schengen country is a "residence permit" as that term is used in the Schengen Borders Code.  It therefore allows the bearer to travel to other Schengen countries without a visa, subject to the 90/180 rule, when traveling independently from the EU/EEA/Swiss family member.  (When traveling with that family member, Directive 2004/38/EC applies, and the 90/180 rule does not.)  Furthermore, Schengen visas are limited to 5 years' validity, so "once for the lifetime of a passport" is also incorrect.


Import public Stack Overflow into Stack Overflow Enterprise

Question: Can you import all of public Stack Overflow into your private instance of Stack Overflow Enterprise? Or, link it to your private Enterprise instance while keeping locally created content private?
Comment: Is this a feature request or a support question?  What exactly do you need to do?
Comment: Are you really saying that you want to import all of the bajillion SO questions? That seems like it defeats the entire purpose of a private Instance.
Comment: Why would anyone want to do this to themselves
Comment: Some people enjoy hair shirts, and long walks over burning lava?
Answer: I'm not entirely sure I'm addressing your question because it's not really clear what you are trying to do. But however you frame this, the answer is almost certainly no — or at least it would be terribly impractical.

Stack Overflow Enterprise is designed for large developer organizations to share internal knowledge about their organization's projects (see about Enterprise). This isn't a small undertaking (or expense) that someone is going to take on without great benefit.
Stack Overflow (public) has over 33 million posts with almost 8,000 new questions coming in daily. The storage and bandwidth needed to transfer all that content (questions, answers, votes, comments, flags, meta data, activity) is gargantuan. The responsibilities and mechanisms needed to keep that all up to date are substantial.
Stack Overflow Enterprise is a separate product from the public website. It includes features, behaviors, and security considerations specific to the an internal, privately-hosted resource. Even if you managed to copy over all the data from the live SO site, anything proprietary you added would be wiped out by the next update. The two system are just not designed to look out for each other.
Comment: @rene No, we do not support that use case. I'm still not clear on why a company would want to pay to host a closed, static, proprietary copy of a free public website that is updated and growing constantly. It doesn't make sense.
Comment: Could you seed it once at the start with just all questions from a certain tag, say: Haskell?
Comment: Instead of importing it all could you stitch the two sources together in one UI?
Comment: No, these Enterprise systems are installed behind secured private networks for a reason. Nobody wants their company's internal enterprise calling out to a public website to exchange posts at great risk of making private information very public. It's a security nightmare.