What ways are acceptable to ask about the time (clock)?

Question: What ways are acceptable to ask about the times (clock)?
I know two or three ways such as: "what is the time?" or "what time is it?" + "What time is it now?", "what is the time now?"
Answer: Shadow Paz said:

The most common way to ask is: What time is it?

I think that indeed the most common way I would ask a friend, coworker, or family member.
Simon Nicholls suggested:

Do you have the time?
   Could I have the time?

I think those are the most common ways I would ask a stranger for the time:

Excuse me, do you happen to have the time?

Finally, you asked about:

What time is it now?

I would say your wording there is grammatical, but the now at the end is unnecessary, and that, overall, it would sound more natural and idiomatic if you omitted the word "now." When asking about the time, the default meaning is the current time, unless you somehow specify that you're asking about another time. For example:

What time does the play start tomorrow?
  What time did you finally go to sleep last night?
Comment: I think the way for asking questions should be with "please" in the end. "Could I have the time please?"
Comment: @Arch - There's nothing wrong with that, of course, but I think you can still be polite even without the "please" at the end. In this case, I think that saying "Excuse me..." with the right intonation is another way to be formal and polite.
Answer:
Do you have the time?
  Could I have the time?

That's about it. Most regular phrases are do you have the time and what time is it in my experience.
Answer: The most common way to ask is:
What time is it?


Is there a way to programmatically set a proxy server in my Android app?

Question: Is there a way to programmatically set a proxy server in my Android App?
I'm writing an Android App that uses some WebViews. Is there a way to set a proxy server for all network connections in my app, i.e. all content that is shown in the WebViews should be routed through the proxy?
All other Apps on the device should not be affected by this proxy settings.
Answer: Surprisingly I don't see a mechanism listed, but maybe there is one.
Ultimately, if the webview is running in your process and implemented sensibly you can programmatically patch the existing code to route network calls through some custom code which could redirect it through a proxy (or just do whatever the proxy would), but this is very complicated low level C/assembly language programming, will require even more care to make portable across reasonable platform upgrades, and shouldn't be undertaken unless you want a very 'interesting' and educational project and you have done enough research to be sure there is no better way.
Comment: Thanks for your answer, but this seems to be (too) tricky and error-prone.
Answer: After some research I'm coming to the point that there is no (official) proxy support in Android 2.2 (and most likely also in 2.3); See this issue report with over 1000(!) comments: http://code.google.com/p/android/issues/detail?id=1273
I found some potential solutions for rooted devices, e.g. setting up some new iptables rules. I did not try any of this suggestions since I need a solution that works on any devices.
Answer: We can set the proxy in android. proxysetting 1.0 is an android app to set the proxy. Don't know further details about it. But it is clear that there is a way out.


Zener diode and input voltage noise

Question: I want to use a zener diode to clamp the input voltage. Input voltage is 12V with a +-4V noise. I want to know that if the noise in input voltage can affect zener voltage or not? If I have noise in input, will I have noise in zener too?
Is this true?
Comment: It depends how dynamic your load is relative to no-load and zener load then impedance ratio determines noise Attenuation ratio
Comment: 4.7V Zeners are not that "rigid" with their output voltage (their dyn. resistance is quite high). A 431 shunt reference will give you much more stable voltage at quite low cost. I find it hard to see application potential for normal Zeners (not TVS)
Comment: Have you tried to simulate it?
Answer: In AC, the usual circuit having a resistor R and a zener in series forms a voltage divider with the diode's dynamic resistance.
Check zener datasheet for Rd, "Dynamic resistance" or "Differential resistance" of the zener (it depends on current).
Example: BZX84C-6V2 at 5mA Rd=6 to 10 ohms
Therefore, output voltage variation will be input voltage variation multiplied by Rd/(R+Rd).
The PSRR is not usually that good with zeners, unless a current source is used.

Here's an input voltage DC sweep. Top graph is voltage on zener. Middle graph is zener dynamic resistance. Bottom graph is PSRR in dB.
Whether this matters or not depends on what you want to do.
Answer: Yes, you will have some noise left, even if the Zener removes most of it.
Zeners only have the rated voltage over them at rated current. So with a simple resistor-Zener circuit, varying the input voltage will cause the Zener current to vary too, which varies the output voltage.
Comment: ...and using an additional constant current source with a discrete Zener blows it out of proportion compared to a 431.
Answer: Zener is used to clamp excess voltage (noise) in the circuit. So I guess the answer to your question is no, Zener won't have noise and can effectively remove the circuit's noise. But, you have to select a Zener with voltage rating according to what you want.
Comment: I think you're making a common mistake about Zener diodes: seeing them as 'magic voltage drops' that produce a fixed and exact voltage drop across themselves, whatever the weather. Actually, they have quite dynamic behaviour and the drop across them varies with current, temperature etc. Downvoting for that reason, I'm afraid.
Comment: Glad to help and appreciate your spirit of co-operation here, it's welcome asset to the site. You can delete your answer if you prefer to, which I think removes the downvotes from your reputation.
Comment: @TonyM I guess I'm wrong. Thank you for the information.
Comment: @TonyM Nah, my mistake might actually help someone so they don't have to make the same mistake.

Zener diode and input voltage noise


linear programming with $n$ choose $r$ variables

Question: Given parameters $r < n$, define $m = {n \choose r}$ and let $A$ be the $n\times m$ matrix whose columns are all the vectors with $r$ $1$'s and $n-r$ $0$'s. Let $b$ be a positive $n$-vector. Is there a simple solution to the linear program:
$$ \max \sum_i x_i$$
subject to
$$ Ax \le b$$
and
$$ x\ge 0\,?$$
Answer: Let $\|\cdot\|=\|\cdot \|_1$ be the $1$-norm.
Let $C$ be the convex cone generated by the columns of your matrix. So you need to find $b^*\in C$ such that $b^*\leq b$ (entry-wise) and $\|b^*\|$ is maximal (the required maximum will be $\|b^*\|/r$).
Notice that all generators (and hence all $y=[y_i]\in C$) satisfy the following constraints:
\begin{align*}
  y_i&\geq 0, &i&\in[n];\\
  \sum_{i\notin \mathcal I}y_i&\geq \left(1-\frac{|\mathcal I|}r\right)\|y\|, &\mathcal I&\subset[n], \quad 1\leq |\mathcal I|\leq r-1. \tag{$*$}
\end{align*}
Hence, if we assume that $b=[b_i]$ with $b_1\geq \dots\geq b_n\geq 0$, then we have
\begin{equation}
  \|b^*\|\leq \mu(b):=\min_{0\leq j\leq r-1}\left(1-\frac jr\right)^{-1}
    \sum_{i=j+1}^n b_i. \tag{$**$}
\end{equation}
We will show that the equality can always be met (in particular, ths yields that $C$ is determined by the above inequalities).
Induction on $n+r$. If $r=1$ or $r=n$, the claim is obvious. If $b_n=0$, then we may decrease $n$ by $1$. So, in the sequel we assume that $n>r>0$ and $b_1>0$.
Let $j_0$ be the maximal minimizer in $(**)$. Two cases are possible.
Case 1. $j_0>0$. Notice that
$$
  \left(1-\frac {j_0}r\right)^{-1} \sum_{i=j_0+1}^n b_i\leq
  \left(1-\frac {j_0-1}r\right)^{-1} \sum_{i=j_0}^n b_i,
$$
which yields
$$
  (r-j_0)b_{j_0}\geq \sum_{i=j_0+1}^n b_i=\frac{r-j_0}r\mu(b),
$$
so that $b_1\geq\dots\geq b_{j_0}\geq \mu(b)/r$. Informally, this means that we may harmlessly use the vectors having ones at coordinates $1,2,\dots,j_0$.
So, now consider $b'=[b_{j_0+1},\dots,b_n]$, and set $n'=n-j_0$ and $r'=r-j_0$. For a new set up, for every $0\leq j<r'$ we have
$$
  \sum_{i=j+1}^{n'}b_{i+j_0}\geq \left(1-\frac {j+j_0}r\right)\mu(b)
  =\frac{r-j-j_0}{r-j_0}  \sum_{i=1}^{n'}b_{i+j_0}=\frac{r'-j}{r'}\sum_{i=1}^{n'}b_{i+j_0}.
$$
This means that $b'$ satisfies the inequalities $(**)$ and thus, by the hypothesis, $b'$ is represented as a nonnegative combination of the  $n'$-columns with $r'$ ones in each. Augmenting those vectors by the prefix of $j_0$ ones we get a required vector
$$
  b^*=[\underbrace{\mu(b),\dots,\mu(b)}_{j_0},b_{j_0+1},\dots,b_n]^T
$$
with $\|b^*\|=\mu(b)$.
Case 2. $j_0=0$. This means that $b$ satisfies all inequaliies in $(*)$; moreover, they are all strict.
In this case, subtract from $b$ a positive multiple $\alpha\mathbf{1}$ of the all-ones vector (which is clearly in $C$) so that either the last coordinate vanishes or some inequality in $(*)$ turns into equality (so that the new vector $b'=b-\alpha\mathbf{1}$ will have a positive minimizer in $(**)$). Then apply the above arguments.


Invert certain colors in a bitmap (Android)

Question: and welcome to my very first question on stackoverflow.com :)
I'm trying to invert specific colors of a Bitmap in Android app.
the idea is to have a night mode reading for kids story.
the story pages are colorful, including the text..
when I load the image in the normal mode; it will be displayed as is.
but when the user activates the night mode (press a button during reading) I want to invert the colors of the image.
BUT NOT all colors,,, only any black colored pixel to be inverted to white,,, and keep other colors as is,,,,
Following is an illustration of what I want to do (the upper part is inverting all colors,,, I want to achieve the lower part of the illustration):
I used the following code,,, but still anti-aliased black pixels are not inverted very well!!
//Code snipet
Bitmap copy = myBitmap.copy(myBitmap.getConfig(), true);
int length = copy.getWidth() * copy.getHeight();
int[] array = new int[length];
copy.getPixels(array,0,copy.getWidth(),0,0,copy.getWidth(),copy.getHeight());
for (int i=0;i<length-(length/10);i++){

    //trying to overcome text anti-aliasing
    if ( (array[i] & 0x00FFFFFF) <= 0x00222222)
    {
      array[i] = 0xffffffff;
    }
}
copy.setPixels(array,0,copy.getWidth(),0,0,copy.getWidth(),copy.getHeight());

The ACTUAL sample image i want to invert its colors
Comment: http://stackoverflow.com/questions/7237915/replace-black-color-in-bitmap-with-red
Comment: Thanks, I already used this approach it works fine; but it doesn't work well with anti-aliased graphics :(  If there is a solution using the setColorFilter(ColorMatrixColorFilter(float[])) it would be perfect!
Answer: If you definitely want to invert every colour then that could be done through code at runtime.
However, for performance and simplicity, if you know what the images are in advance, It may be better to create the inverted images in an image editing tool like Photoshop beforehand. That way you have complete control over them. Load them both into the activity but with the inverted image hidden.
Use
view.setVisibility(View.INVISIBLE) and view.setVisibility(View.VISIBLE)

initially set the visibility to invisible, then change it to visible when desired.
Comment: This was posted as an answer, but it does not attempt to answer the question. It should possibly be an edit, a comment, another question, or deleted altogether.
Comment: Hi @Alt-Cat, as mentioned in the question: I don't want to invert all colors! I only want to invert any BLACK color (taking into account anti-aliasing) and keep other colors without change,,, I added a new illustration of the actual sample of an image I want to invert (activate the night-mode reading)... I also added code snipet
Answer: "BackBitmap" would be the Bitmap object you are trying to convert.
Step 1 is to store all Colors of the pixels in an array by getPixels(...) method. (This will store the Colors row-by-row. This is critical to understand for the next step).
Step 2: create a second one-dimensional array where you store each individual pixel in the Bitmap by calling the getPixel(...)
Step 3: convert necessary colors by of the desired range by using a if statement "if ( (array[i] & 0x00FFFFFF) <= 0x00222222 || your Black color range)" and then simple equation that converts a positive image to negative and vice versa: neg_col = 0xFFFFFF - orig_col; .: array[i] = 0xFFFFFF - array2[i];
//step 1
    int length = BackBitmap.getWidth() * BackBitmap.getHeight();
    int[] array = new int[length];
    BackBitmap.getPixels(array, 0, BackBitmap.getWidth(), 0, 0, BackBitmap.getWidth(), BackBitmap.getHeight())

//step 2
    int[] array2 = new int[length];
    int a2 = 0;

    for(int col = 0; col < BackBitmap.getHeight(); col++){
                for (int row = 0; row < BackBitmap.getWidth();row++){
                    array2[a2] = BackBitmap.getPixel(row,col);
                    a2++;
                    }
       }

//step 3
    for (int i=0;i<length;i++){
        if ((array[i] & 0x00FFFFFF) <= 0x00222222){
           array[i] = 0xFFFFFF - array2[i];
           }
       }

//the next line is here just to "override" this Bitmap's immutamility
            BackBitmap = BackBitmap.copy(Bitmap.Config.ARGB_8888, true);

            BackBitmap.setPixels(array, 0, BackBitmap.getWidth(), 0, 0, BackBitmap.getWidth(), BackBitmap.getHeight());

Hope this helps to the people who are struggling to convert a bitmap into a negative picture. In that case disregard the if statement.
Answer: just loop over each pixel of the bitmap and inverse it's color as follow:
private void inverseBitmapColors(Bitmap bitmap) {

    for (int i = 0; i < bitmap.getWidth(); i++) {
        for (int j = 0; j < bitmap.getHeight(); j++) {
            bitmap.setPixel(i, j, bitmap.getPixel(i, j) ^ 0x00ffffff);
        }
    }
}

^ is XOR - Sets each bit to 1 if only one of the two bits is 1
we apply this operation for the pixel color with the 0x00ffffff value
and that because the bitmap color value stored on 32 bits in this form:
1th 8 bits for alpha (transparency)
2th 8 bits for red
3th 8 bits for green
4th 8 bits for blue
we need to inverse the colors so no need to touch the alpha so we apply xor with the value 0x00 (first 2 numbers of the value 0x00ffffff) (00000000 in binary) so the alpha will never change the opposite for the red green and blue we need to get the complement of them so we apply xor with the value 0xff (11111111) for each one


Difference of data transmission between wired and wireless networks

Question: Is data transmission different between Wired and Wireless network? In other word, when talking about TCP/IP, does it mean that TCP/IP stack is not suited for wireless networks?
Answer: IP is a layer-3 protocol, and TCP is a layer-4 protocol. Your wired or wireless networks are a combination on layer-1 and layer-2 protocols. IP doesn't care in the least what layer-1/2 protocols carry it. IP has been run on barbed wire.
In modern times, ethernet is the most common wired layer-1/2 protocol, and Wi-Fi is the most common wireless protocol. Wi-Fi runs on a half-duplex medium (radio waves), but ethernet originally did, too, and it still can.
Both ethernet and Wi-Fi have pros and cons, but IP and TCP simply don't know or care which carries them.
Comment: Thank you. To my knowledge, TCP packet maintains the standard format in wired network but it gets encapsulated in wireless environment based on 802.11 standard to be transmitted correctly. Is my reasoning valid?
Comment: A TCP segment gets encapsulated by an IP packet, which gets encapsulated by a layer-2 frame, whether it is an ethernet, Wi-Fi, or other layer-2 protocol frame. Each lower layer encapsulates the upper layer as payload, except layer-1 just encodes the bits of the layer-2 frame for the medium.
Comment: Alright, got it. Kindly one more question: Can I reason that routing protocols for wireless and wired networks do not care about the format of packets, they just care about how to route packets efficiently?
Comment: Routing happens at layer-3, and routers actually strip off layer-2 frames and discard them before inspecting the IP packets for routing. A router will create a new frame for the next hop in the packet's path.


Import Order/Invoice/Credit Memos/ Transaction/ Comment History

Question: Is there anyways we can import the Order/Invoice/Credit Memos/ Transaction/ Comment History to M2 from M2.
Answer: In your case, to add extra data to the existing tables, write script to copy the records from one table to another.
Method 1:

Connect with the database
Get the data from CSV file (Export/Download the data in CSV format)
Insert the data into new table

Method 2:
Place table1(data that you are going to transfer) and table2(destination table) to same database

Connect with the database
Write script to copy the records from table1 to table2


Could the Q destroy the universe?

Question: If a Q or the entire Q Continuum, decided to destroy the Universe, would they be able to?
Comment: Not an answer, but in the book [I, Q](https://en.wikipedia.org/wiki/I,_Q) the Q certainly don't try to *stop* the end of the Universe.  In fact, their response is to hold a party!
Comment: This is a fascinating subject - but you're asking more than 1 question here. "what are the limits to their power?" is a little vague and open-ended, you should probably just remove that. and "can 1 Q destroy the universe?" is a very different question from "can all the Q destroy the universe?". could you pick one? or post them as separate questions?
Comment: I'm having troubles not VTCing as opinion based. The question can be obviously reworded so to not being opinion based, but as it is now it's mainly the incipit of a discussion.
Comment: In the EU novel QandA, we learn that the universe's existence is entirely dependent on a single planet remaining untouched. Q could snap his fingers and destroy it in an instant, indirectly resulting in the destruction of the entire universe "*"But what is this place? What is Gorsach IX?" "Weren't you listening?" Q snapped. "It's a construct that holds back entropy, that keeps the universe from collapsing in on itself."*
Answer: It depends...
The universe is - per defintion - all of spacetime and everything within that. However in Star Trek, there seem to be things beyond spacetime itself. So the question is if the definition of universe had to be expanded is left open as far as I know.
Qs per se can exisit out of time. This is seen in "All good things..." (TNG S07E25/26). Here, Q more or less tricked Picard in several points of time to create anti-time which - if letting it come to conclusion - would annihilate with time an as thus spacetime itself. (Nonsense from our physics point of view, but in ST-verse the accepted theory and confirmed by Q as a paradox that can exist.)
So even Federation technology is capable of annihilating the universe and Qs are clearly beyond that.
However Qs do have limits as that Qs have been imprisoned by other Qs like Quinn. They can be made into any species and stripped of their powers by other Qs. They can be killed by other Qs like Amanda Rogers parents and they can be harmed by humans that have been enabled to enter the Q continuum and equipped with Q "weapons" as seen during the Q civil war.
Just how far their powers actually go is never exactly explained, but unmaking the universe as in unmaking spacetime is possible. If they can unmake what they are themselves however, which a new definition of "universe" should also entail, is never stated.
Answer: No
The word universe literally means absolutely everything. This would include the Q continuum. In the episode the The Q and the Grey they show the Q continiuum is embroiled in a civil war. If any given Q could wipe out the entire universe they could logically take out all of the Q they consider to be an enemy. The civil war proves they can't do that.
If unopposed a Q might be able to wipe out all of what would be considered our part of the universe - all of the planets, stars galaxies etc. as they claim to be omnipotent and omniscient. However it is unlikely they would be unopposed as there are other omnipotent beings in the Star Trek universe such as the Douwd and Trelane who would presumably block the Universe being wiped out.
The limits to their powers would be whatever someone else, possibly another Q, doesn't prevent them from doing.
Comment: @TheLethalCarrot Sorry, I must not have gotten my point across correctly. The civil war shows that no single Q can just wipe out all the others instantly. If they could do so then the civil war would be over in an instant with one Q just wiping out their opposition. If they can't take out the rest of the Q continuum then they can't take out the universe since it would require taking out the rest of the continuum as part of doing so.
Comment: I'm not sure your civil war logic makes sense -- perhaps the Q who is contemplating destroying the universe simply doesn't see that as a viable option because it would destroy *everything* including him/herself (i.e. it's not selective enough).  I haven't dropped a nuke on my annoying neighbor yet for the same reason - cost of collateral damage is too high... doesn't mean I couldn't.
Comment: Your "civil war" and "other omnipotent beings" points seem to contradict each other. If other omnipotent beings could block the Q doing something why do you find it unreasonable that the Q could block other Q from doing something?
Comment: There are multiple universes, not just one
Comment: @Valorum By definition that isn't true. The uni part of universe means one. You could talk about parallel realities or dimensions, but there is only one universe.
Comment: @AllanMills - and while that may be true in our non fictional universe, it isn't true in the world of Trek
Answer: Yes, they could.
As shown in various episodes, the Q have the power to create new dimensions, alter the very fabric of reality in any way they see fit and they can even hurt and kill themselves and each other and bring untold destruction on their own continuum.
In Qpid (TNG S04E20), Q creates a temporary pocket dimension based on the story on Robin Hood, with the officers of the Enterprise playing Robin Hood and his Merry Men, much to the dismay of Worf. Q is able to create this dimension, give it an end time and even prevent himself from being able to interfere with it or know what's going to happen.

PICARD: We will no longer share in this pointless fantasy of yours.
Q: Fine. stay here and do nothing. By midday tomorrow, your crew will be safely aboard their ship. Of course, you will have to accept the consequences of your inaction.
[...]
PICARD: Q, I ask you to put and end to this before someone gets hurt.
Q: Oh, that's impossible. You see, I've given this fantasy as you call it, a life of its own. I have no more idea what's going to happen than you do. But of one thing I am absolutely sure. If you dare come to Nottingham Castle, blood will be spilt.

In Deja Q (TNG S03E13), we learn that the Q Continuum decided to strip Q of his powers, due to his repeated shenanigans and his ignorance of Q laws, showing that several Q are able to overcome the power of one individual Q.

Q: I haven't the vaguest idea what you're talking about and I have a much more serious problem. I'm no longer a member of the Continuum. My superiors have decided to punish me.
PICARD: And punish us as well, it would seem.
Q: They said I've spread chaos through the universe, and they've stripped me of all my powers. You don't believe me, do you? Do you think I would humiliate myself like this?
RIKER: If it served your purpose, yes.
Q: It's the truth. I stand before you defrocked. Condemned to be a member of this lowest of species. A normal, imperfect, lumpen human being.
TROI: They made you human as part of your punishment?
Q: No, it was my request. I could have chosen to exist as a Markoffian sea lizard or a Belzoidian flea. Anything I wished as long as it was mortal. And since I only had a fraction of a second to mull and I chose this and asked them to bring me here.

The dialogue shows that there is a hierarchy of powers in the Q Continuum, confirmed later in Q2 (VOY S07E19) when Q's son passes in judgement in front of three Q Judges and is condemned to remain human for his actions. Q appeals of the verdict and later explains to Janeway that he had to come to an agreement with the judges.

JANEWAY: So, the Continuum crumbled like a Gelbian sand sculpture?
Q: Yes. Some of them even got on their knees and begged me to stay. It was pathetic. If you must know, I had to agree to a few minor conditions.
JANEWAY: Oh? Such as?
Q: Eternal custody of the boy. Wherever the little brat goes, I go with him.
JANEWAY: I hope he won't spoil too much of your fun.

Still in Deja Q, Q suggests that the crew alter the gravitational constant of the universe in order to move a moon in a safe orbit. Something he could apprently easily do if he still had his powers.

DATA: Can you recommend a way to counter the effect?
Q: Simple. Change the gravitational constant of the universe.
LAFORGE: What?
Q: Change the gravitational constant of the universe, thereby altering the mass of the asteroid.
LAFORGE: Redefine gravity? How am I supposed to do that?
Q: You just do it. Where's that Doctor, anyway?

There is also the case of Amanda Roger's parents, killed by the Q Continuum for having a child despite being ordered not to procreate when they decided to abandon the Continuum to live as humans on Earth (TNG S06E06 True Q), Quinn the suicidal Q who was prevented from killing himself by being imprisoned in a comet for the rest of eternity, until Voyager inadvertently broke him free (VOY S02E18 Death Wish), and the Q Civil War (VOY S03E11 The Q and the Grey) where we can see many Q, including the one we know best, be injured by their own weapons in the illusion based on the US Civil War.
Thus, the Q could very easily destroy the universe, every dimension there is, and themselves, if they so wished.
Comment: none of these examples indicate a power to destroy the universe itself, and some of them rely on taking deLancie Q's word at face value, which is a dubious proposition
Comment: Well, if we can't use inference and witness statements, I'm not sure what proof could exist beyond their actually destroying the universe.
Answer: A lot of decent answers are here, but I will add one possible interpretation that was not covered:
We obviously cannot know for sure if they could destroy the universe, there is not enough information to make a solid judgement.  We can however speculate on the matter.
As far as individual Q, such as the Q (John De Lance) that we know from TNG, probably not.  He seems to have a sort of "nigh-omnipotence" and/or at the very least high tier reality warping.  That said, those powers appear to be overshadowed by the Continuum itself, and possibly some other individual Q's powers.
Now however looking at the Continuum as a whole, I would argue probably yes.  If you think of them in the way of the Borg, in that working and utilizing their powers together, you get something much greater than any individual could accomplish.  Thus, this would magnify their already massive power to an amount unfathomably higher than that.  This would allow for some very "Omnipotent-Like" powersets, and likely the ability to do whatever they wanted with the Universe.
Basically that's it, given what we have seen so far in Star Trek canon, I believe this to be true.  Mind you, it is always possible that there exists something even greater than the Q, and while they might be able to destroy the universe, this greater faction/entity might not allow it.  I find that unlikely however as the Q Continuum have been fairly consistently shown as the top power in the Star Trek universe.
Comment: Can you cite any sources or evidence for this?
Comment: @DavidW On which points?  Most of it is very straightforwards, and "we can speculate on the matter" covers a fair bit of the rationale.  As far as specific references for individual Q, in episode Deja-Q Q is stripped of his powers by the Continuum as a whole proving they are more powerful.  Given that one Q can do almost anything as called for, and the Continuum is that much more exponentially powerful, I believe it stands to reason this fits my answer.  As for further instances of proof, I'd just say at that point "watch the series again".

Could the Q destroy the universe?


Where can I hunt wild boars for free in Southeast Texas?

Question: It is said that Southeast Texas is overrun by wild boars. However, I have only seen sign of them within national park borders-where hunting is not allowed-and all google search results return paid hunting ranches which I regard as "pig farms". Where can I go hunt wild pigs in southeast Texas without paying?
Comment: In Texas you can shoot boars without a permit, but you do need a hunting license. See http://www.tpwd.state.tx.us/huntwild/wild/nuisance/feral_hogs/#hunt
Comment: Free is unrealistic, you'll probably have to pay for a permit of some kind if you're not on a private ranch.
Comment: The parks and wildlife site goes to great lengths not to say explicitly where you can hunt those wild boars. I'm not sure if that means that feral boars are such a nuisance that you can hunt them anywhere it's not specified otherwise, or if it's somehow confidential. Either way, you should give that department a call and find out, and then post the answer here as long as they don't tell you not to.
Answer: Short answer: there's a lot of public land, most likely state owned (not federal), that's available for hunting.

(source: state.tx.us) 1
There might be limitations for nonresidents and/or based on what you plan to hunt with (e.g. firearm, black powder, bow) but this looks like a great starting point for information:
Public Hunting and Access to TPWD Lands
"Texas Parks and Wildlife Department (TPWD) offers a variety of hunting opportunities through two public hunting systems."[2]
Here's the Texas page for licensing:
http://www.tpwd.state.tx.us/business/licenses/online_sales/
Here's a breakout of licenses with associated fees for both residents and non-residents:
http://www.tpwd.state.tx.us/business/licenses/public/recreational/index.phtml
If you can add a bit more information about what you're looking for I can try to be a bit more specific.
1 http://www.tpwd.state.tx.us/huntwild/hunt/public/lands/table_contents/7houston.phtml#offerings
[2] http://www.tpwd.state.tx.us/huntwild/hunt/public/
Side note, as for search terms try, "texas game and wildlife hunting license" and "texas public hunting land".  I suspect you'll get fewer ranch ads if you're specifically including the word "public" in your query.
Comment: There is also a lot of National Forest land in TX. A surprise to some because when TX joined the Union  there was very little land transferred to the US Government. But, as i understand, during the 30's much E TX forest land was taken  for non-payment of federal taxes.  There is a chunk of this land behind my house, complete with hogs , come and get them.  Look up Sam Houston National  Forest rules. I know it is an open season.


Elementary examples of the Weil conjectures

Question: I'm looking for examples of the Weil conjectures---specifically rationality of the zeta function---that can be appreciated with minimal background in algebraic geometry.  Are there varieties for which one can easily calculate the numbers of points over finite fields and witness the rationality directly?  Of course, there are entirely straightforward examples coming from projective space and Grassmannians (or anything with a paving by affines).
Comment: Artin computed a bunch of examples by hand in his thesis. In Weil's paper, he does "Fermat" varieties (sum of n-th powers). The latter is reproduced in detail in Ireland and Rosen. None of these examples need any algebraic geometry, but they might require a bit of number theory.
Comment: I'm not sure if this is too elementary, but the case of elliptic curves can be worked out pretty concretely.  Silverman does this in his first book on elliptic curves, for example.
Comment: See the exercises at the end of chapter 11 in Ireland and Rosen's "A Classical Introduction to Modern Number Theory"
Comment: Even the Grassmannian example is not entirely trivial, since you get almost for free the generating function (generating polynomial, in this case) for the number of affine cells of each dimension.
Comment: There is an elementary proof of the Riemann hypothesis for curves (of any genus) over a finite field by Stepanov. See the Bourbaki talk by Bombieri (June 1973).
Answer: Weil himself verifies the conjectures "by hand" for diagonal hypersurfaces, that is, hypersurfaces defined by an equation of the form
$$a_0x_0^{n_0}+a_1x_1^{n_1}+\cdots+a_kx_k^{n_k}=b.$$
The argument is pretty elementary--it essentially uses only character theory.  It seems to me likely that this argument heavily influenced Dwork's original proof of rationality.
The paper is quite readable; I learned of it from Akshay Venkatesh.
Answer: One elementary example comes from the theory of elliptic curves, as in Silverman's book.
Namely, given an elliptic curve over a finite field $\mathbb{F}_q$, the number of $\mathbb{F}_q$-rational points is the degree of $1-F$ for $F$ the Frobenius -- that is, it's the kernel of the isogeny $1-F$. Now you can compute the degree as $(1-F)(1 - F)^t$ (where $F^t$ is the dual isogeny) and this is $1 - (F + F^t) + q$ since $q$ is the degree of the Frobenius. So the key quantity to compute is $F + F^t$, which is an integer -- it's secretly the trace of $F$ on $l$-adic cohomology. If you replace $F$ by $F^n$, this gives you the rationality of the zeta function of an elliptic curve. You can also get the Riemann hypothesis by purely elementary means by using the fact that the degree is a positive definite quadratic form and a Cauchy-Schwarz type inequality.
My guess is that something like this should work with higher-dimensional abelian varieties (the $l$-adic cohomology is an exterior algebra, as with the topological cohomology of a torus) as well.
Comment: The argument in Mumford's Abelian Varieties book (which I presume was essentially the same as Weil's) does use the trace of Frobenius on the $\ell$-adic Tate module (which is essentially what you are doing); of course this is secretly dual to the $\ell$-adic $H^1$.  That said, if all you care about is rationality and the functional equation for curves, you only need the idele class group.
Comment: Akhil, the endnotes of Milne's article on Jacobian varieties in the Cornell-Silverman book "Arithmetic Geometry" give the fascinating history. The functional equation and rationality for curves were known via RR before Weil, whose adelic contribution was an adelic proof of RR (pre-Tate!). The real contribution was RH, which he proved via intersection theory on $X \times X$ (and wrote his book to make intersection theory rigorous in positive characteristic). His 2nd proof was via Jacobians, for which he created yet more fundamental ideas (birational group laws, abstract varieties, etc.).
Comment: Indeed this does work in general for Abelian varieties; one may also deduce the Weil conjectures for curves this way by applying similar arguments to their Jacobians.  That said, my feeling is that imitating Tate's thesis is the most "elementary" way to see rationality for curves--since developing the theory of Jacobians is pretty involved.
Comment: @Daniel: Ah, so was this Weil's argument? I idly wondered about this once but never looked into it too carefully.
Comment: Very interesting!
Comment: But the most elementary proof of RH for curves is that of Bombieri,
which uses nothing more than RR for curves, and avoids any higher dimensional algebraic geometry.
Comment: @Paul Monsky: Right you are, but this is sort of like the most elementary proof of the prime number theorem (by Erdos and/or Selberg): a "proof of concept" in terms of how elementary one can get, but it doesn't leave one with any sense of insight into why the result is true.  Without knowing the rigorous details behind Weil's intersection theory proof one nonetheless can grasp from it an intuitive reason for the result to hold (as motivated Weil in his work), but the amazing Bombieri-Stepanov proof just leaves one stunned that it all worked out in the end.
Comment: @ayanta: Thanks for the reference! I wasn't aware of this adelic approach (or that there was anything before intersection theory).
Answer: It's possible to give a semester course in number theory, free from overt algebraic geometry,
that handles the zeta functions of curves over finite fields, proving the functional equation and Weil's RH for them. (And also does Mordell-Weil for elliptic curves over number fields). I taught such a course to second year grad students some 20 or 30 years ago.
One gets around the geometry of curves in 19th century Dedekind fashion, working with their function fields--finite extensions of k(t)-- and valuations, just as one does with number fields. Riemann-Roch is done as in Chevalley's book using "repartitions". Rationality and the functional equation follow directly from Riemann-Roch. The RH is done by Bombieri's elegant technique--first one uses Riemann-Roch to get a good upper bound for the number of rational points, then one combines this upper bound with the functional equation to get a good lower bound. (Ayanta thinks the proof is miraculous but uninformative; this may be true of Stepanov's original version, but I find Bombieri's argument to be natural).
Of course there are defects to this approach. Algebraic geometry is far more enlightening. But it can be learned later, in whatever form the student finds appropriate. And there are also advantages.  To do Weil-style algebraic geometry one would have to worry about "fields of definition". And Grothendieck's version (which continues to intimidate me), would only appeal to the rare student at this level. That such beautiful mathematics can be presented in such an accessible fashion seems to me a boon.
Answer: The grandfather of all examples is by Gauss:
http://en.wikipedia.org/wiki/Weil_conjectures#Background_and_history
Of course Gauss didn't mention finite fields other than the prime field. I think it is in the nature of a remark that the method carries over, but I haven't written it down.
Answer: Any variety which admits a cell decomposition gives an example. Cell decomposition of $X$ is a stratification $X=\bigcup\limits_n X^n$ such that $X^n\setminus X^{n-1}=\coprod\limits_{i=1}^{k_n}\mathbb{A}^n$ is a disjoint union of affine spaces.
Then $\#X(\mathbb{F}_q)=k_0+k_1q+\dots+k_dq^d$ so zeta-function of $X$ is a product of zeta-functions of affine spaces hence rational.
Examples of such varieties are given by flag varieties of reductive groups(Bruhat decomposition).
More generally, rationality of zeta-functions of moduli spaces  of some objects can be proven elementary by counting these objects over finite field. For example, for quiver varieties it is done by V. Kac in "Root systems, representation of quivers and invariant theory".
Edit: Another, less elementary example is given by rational surfaces. For them Chow groups satisfiy the axioms of Weil cohomology theory, as explained in Manin's book "Cubic forms", so the rationality follows.
Answer: Perhaps the following two examples would be of interest to you; my apologies if they are too simple.
Notation: (in accordance with Koblitz's p-adic Numbers, p-adic Analysis, and Zeta-Functions)
Given $f \in \mathbb{F}_{q}[X_1, \ldots, X_n]$ let us define a sequence $N_s = |(H_{f} (\mathbb{F}_{q^s})|$, where $H_f(K) := \{(x_1, \ldots, x_n) \in \mathbb{A}^{n}_{K} | f(x_1, \ldots, x_n) = 0\}$.
The zeta function is then defined for a hyperplane $H_f$ and field $\mathbb{F}_q$ by:
$$Z(T) := \exp\big(\sum_{s=1}^{\infty} N_s T^s /s\big)$$
Before giving a few examples of the rationality of $Z(T)$, we recall the Maclaurin series
$$-\log(1 - T) = \sum_{s=1}^{\infty}T^s / s$$
Example 1. $f(x_1, \ldots, x_n) \equiv 0$. Then $N_s =|{\mathbb{A}}_{\mathbb{F}_{q^s}}^{n}| = q^{ns}$, so that we find $Z(T)$ becomes
$$\exp\big(\sum_{s=1}^{\infty} N_s T^s /s\big) = \exp\big(\sum_{s=1}^{\infty} (q^n T)^s /s\big) = \exp(-\log(1-q^n T)) = 1/(1 - q^n T)$$
Example 2. Let $f = x_1 x_4 - x_2 x_3 - 1$. We now consider two cases:
Case 1. $x_3 = 0$. Then $x_1 x_4 - x_2 x_3 = 1$ becomes $x_1 x_4 = 1$. Since $x_2$ is out of the equation, it can be any element of $\mathbb{F}_{q^s}$. Thus, there are $q^s$ choices for $x_2$. Meanwhile, $x_1$ can be any nonzero element of $\mathbb{F}_{q^s}$, and in each case this will determine $x_4$. Hence there are $q^s(q^s - 1) = q^{2s} - q^s$ points in $H_f$ when $x_3 = 0$.
Case 2. $x_3 \neq 0$. Then $x_1$ and $x_4$ can be any elements of $F_{q^s}$, and $x_3$ can be any nonzero element of $F_{q^s}$. But this completely determines $x_2$, so that there are $q^s q^s (q^s - 1) = q^{3s} - q^{2s}$ points in $H_f$ when $x_3 \neq 0$.
Therefore, $N_s = q^{3s} - q^{2s} + q^{2s} - q^{s} = q^{3s} - q^{s}$, whence the zeta-function $Z(T)$ is
$$\frac{\exp(\sum_{s=1}^{\infty}q^{3s}T^s /s)}{\exp(\sum_{s=1}^{\infty}q^s T^s /s)} = \frac{1 - qT}{1 - q^3 T}$$
Note: The case for an affine variety $H_{f_1, \ldots, f_m}$ follows from the affine hypersurface $H_f$ case by a simple application of the Inclusion/Exclusion Principle. Bearing this in mind, it shouldn't be too hard to construct examples similar to those above over a variety for which the rationality can be witnessed directly. I imagine this would be somewhat tedious, though.
Comment: Dear Benjamin, One way to think about your example 2 is that you write your 3-fold as $(\mathbb A^1 \setminus \{0\})\times \mathbb A^1 \coprod  \mathbb A^2 \times (\mathbb A^1 \setminus \{0\}) = (\mathbb A^2 \setminus \mathbb A^1) \coprod (\mathbb A^3 \setminus \mathbb A^2) = \mathbb A^3 \setminus \mathbb A^1,$ and so the zeta-function is the ratio of the zeta function of $\mathbb A^3$ by that of $\mathbb A^1$.  (In other words, zeta functions behave like a multiplicative version of Euler chars.: they are multiplicative w.r.t. disjoint unions.)  Regards, Matthew
Comment: Both of these examples fall into the case of "paving by affines" (or affines minus several points) that Jonathan mentions in his question.  Your note is a nice point---this reduction is essential to Dwork's proof of rationality.  I see this as an indication that the hypersurface case is quite hard, though.


Will I miss out on anything by not playing Mass Effect 3's multiplayer?

Question: Following on from Does the Mass Effect 3 multiplayer component has any effect on the Single Player component and vice-versa?
If I choose not to play the multi-player aspect of Mass Effect 3 and stick to the main single-player story, will I miss out on any single-player content? Will there be an alternate ending that I'll be denied?
Or is it more like Mass Effect 2, where you don't have to recruit and make loyal all of the companions, but it makes things easier and more satisfying in the final mission if you do?
Background, I've played 1 and 2 on the PC, and am going to be continuing with that game on the PC for 3, but don't like the PC multi-player experience and will be sticking to single-player there. I'll also be getting ME3 on the Xbox where all my online gaming friends are, so will be doing multi-player there.
Answer: BioWare has stated previously that you can gain "effective military strength" through any combination of single player or multiplayer.  Single player play contributes "War Assets" while multiplayer contributes "Readiness Rating."  These two things multiplied together are a big factor in your ending.

[...] SP can still be played all by itself without any kind of multiplayer or third party and you can still get the absolute best ending. [Multiplayer] just gives you new options to be able to get that ending.

Also in a different interview with Penny Arcade:

You can get best possible outcome in the game by just playing single player if you want, as long as you are willing to do a lot of the side missions and content. However, maybe you only want to do a critical path run of the single player. Well, by playing multiplayer you also increase your galactic readiness rating can affect the final outcome. Using the iPhone Datapad app and the iPad Infiltrator game will also tie into Galaxy at War and update this final rating.

However, it might be challenging to just play the single player.  From this PC gamer review:

The game's still story-driven, and it doesn't end until you've completed the main series of missions. But when you do, what happens in the final cut-scene depends on how many War Assets you have accumulated.
It is possible to get the best ending in single player without playing multiplayer, but it's twice as hard. All your War Assets only count for 50% of their potential value.

Their intent is to allow people to rush through the single player campaign (if they don't care for the story or side missions) and play a bunch of the multiplayer, and still get the "best ending."

Now that I've finished the game, there's a couple of things I'm going to add to what BioWare has said.  While BioWare claims that you can get the "best ending" without playing multiplayer (or the tie-in titles for other platforms), I find this statement to be misleading at best.
It's incredibly unlikely that you will be able to get enough war assets for the "highest tier" endings to Mass Effect 3 without anything increasing your Readiness Rating.  You'd have to have played ME1 and ME2 pretty thoroughly, making all the "correct" decisions in your save to import into ME3.    Alternatively, you'd have to start from a "perfect" ME2 save import in order to get anywhere close to the number of War Assets you'd need.  If you're not importing a previous save, your chances at playing only the single player and seeing the "best" ending are abysmal.
Additionally, you'd have to play this game through very carefully, making sure to maximize your War Assets.  Most decisions in the game effect your war assets, and if you don't know ahead of time what the "best" decisions are, you're likely to end the game with significantly fewer assets than you need for some of the "best" endings.
I played fairly well through both previous games, skipped the DLC, and got nearly every war asset possible in ME3.  I still fell a good 20-25% short on War Assets required for the "highest tier" ending.
Having said this, the endings are extremely similar.  Regardless of how you play, you're highly likely to have very similar options in your ending choices, and each of the endings plays out extraordinarily similarly.
Comment: If it's a case of finding all of the side-missions, then I was planning on doing that anyway! Remember being shocked about how early the "completed the majority of the game" achievement popped in ME2, can remember doing a LOT of side-missions after that!
Comment: Technically you can't gain *readiness* with single player (not counting ME:Infiltrator), you can just gain enough war assets to get the best ending.
Comment: @BenBrocka, yeah, I answered this before I had a good handle on the "technical terms" that Bioware was using.  Updated to reflect how it is actually called out in-game.
Comment: I got the "highest tier" endings without playing any multiplayer at all... though I did also *"play ME1 and ME2 pretty thoroughly".*
Answer: There are reports that it is incredibly tedious to get to full galactic readiness without playing the multiplayer:

That part is kind of cool. But the balance is incredibly harsh: I did
  every proper quest I could find in Mass Effect 3, made sensible
  decisions that didn't conflict with my choices in the previous games,
  and brought people together. But I still got a gallingly bleak ending.
[...]
The only quests I had left were ones to scour certain systems for
  planets that aren't marked on your map, scan them, then fire a probe
  and return to the Citadel. Even compared to Mass Effect 2′s
  resource-scanning, these are dull.

PC Gamer
From that description, doing all the subquests (that could still be reasonably called real quests) doesn't seem to be enough, you need to do all kinds of resource collection in combination with certain choices made in your previous games. It's unlikely that your previous choices will be optimal, so it might be very hard or even be impossible to reach full galactic readiness.
Answer: To add to this with the BSN post by Jarrett Lee, Senior Marketing Manager - Mass Effect Franchise:

A note about multiplayer in relation to the endings
Hi everyone,
I've seen some posts where there is a bit of confusion about the
  ability to get the best endings by only playing single-player, because
  if you don't play multiplayer (or the iOS game, Infiltrator) your
  Galactic Readiness stays at 50%.
You do NOT have to play multiplayer to get the best single-player
  endings.
Here's a bit of clarification:
Your ending(s) are determined by your "Effective Military Strength"
  (let's call it EMS for now) bar. Focus on that bar - that is your
  indicator of how well you will do in the end-game.
You can maximize your EMS just by collecting War Assets in the
  single-player game. There is a certain threshhold of these you would
  need to exceed (I can't get too specific) but I can tell you there are
  MORE than the required amount that can be gathered in the
  single-player campaign.
"Galactic Readiness" is a modifier you can improve by playing
  multiplayer. That is to say, if you play a lot of multiplayer, you
  will need less War Assets from single-player to fill up your EMS bar
  (ie it will balance out the requirements to account for you playing in
  both modes).  Single-player game play does not impact that bar.
EMS = success. EMS can be maximized via collecting war assets alone,
  even if your Galactic Readiness is 50%.
UPDATE: changing post title, "perfect" ending may create confusion.
  This post indicates how military strength, war assets and galactic
  readiness affect the endings.
Answer: Mathematically, the best possible ending requires the player to acquire a certain number of points, which are accumulated through all 3 installments of the game. These points are calculated at 50% of their acquired values.
without relying on extended content, ie: DLC's, multiplayer or specific cross platform games, it IS possible to acquire enough points which, when calculated at the normal 50%, still award you the prestigious "best possible ending".
However, since these points are accumulated from 3 separate sources, it can be very difficult to acquire enough. Bioware has left little margin for error, and players may find themselves loading up savegames from earlier ME games to reimport characters with more points into ME3. Average players may have an excessively difficult and unenjoyable time meeting the necessary conditions without the use of a guide.
DLC's offer more static "points" to this number, but are still only calculated at 50 %
Multiplayer sessions, and specific cross platform games will increase the % at which your points are calculated. This reduces the content needed to achieve the maximum points, by moving the "tedious single player grind" to a more dynamic and potentially more enjoyable multiplayer experience.


Sitecore 9.3 SIA Prerequisites Installation Fails

Question: After completing some of the initial developer environment setup, I downloaded the Sitecore 9.3 "Graphical setup package for XP Single" from here. I ran the .exe, and while attempting to install the prerequisites I saw this error (0x800f0954):
Answer: Leading up to this installation, I recalled that I had some trouble getting previous prerequisites installed; specifically those mentioned here.
Even more specifically:

Adding IIS via "Add / Remove Features" dialog
Installing Web Deploy 3.6 for Hosting Servers (Use Web Platform Installer to install)

It turns out that due to a group policy setting on my machine, installation of .NET 3.5 was failing.
The fix is outlined here:

Temporarily bypass WSUS server using the following registry edit (requires administrator privileges).

Right-click Start, and click Run
Type regedit.exe and click OK
Go to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
In the right-pane, if the value named UseWUServer exists, set its data to 0
Exit the Registry Editor
Restart the Windows Update service or restart the PC.

After performing these actions I was able to install everything necessary without any more errors.


Why are RSA keys encoded with ASN.1 for TLS?

Question: Browser vendors use ASN.1 encoding for RSA certificates in the TLS protocol. RSA public keys are just a number, so why do we need encode them to something else? That increases the risk of security problems.
Answer: Think about this, say my public key is
9821347676528476512348612390874073765227653408545634205496835 (note this is not a valid public key, just randomish typing).
What does that mean? Big or little endian? Hex or decimal? Specifically for RSA, where is $e$, where is $N$? What is this public key authorized to do (encrypt, sign, etc)? Who has signed this key? To whom is the key linked?
While a public RSA key is "just a number" there are a lot of reasons to encode the key in a standard way so that every computer everywhere knows how to understand it, what it is authorized to do, who it belongs to, etc.
Comment: @roger, but there is a need to say exactly how things are encoded. For example if I say the answer is 10 what does that mean? If it is in decimal, then it is ten; if it is hex, it is sixteen; binary, two; octal, eight; and so on. Even just saying e is on one line, N is on the next, that is an encoding. Sure if public keys are only ever used to encrypt client session key's fine, but public keys are also used to validate digital signatures, etc.
Comment: There are exploits that target buggy implementations of ASN.1, but not ASN.1 itself. In the same way, there are also exploits for XML implementations, but that does not mean that XML is bad. There could be also exploits for you custom hex encoding, no matter how simple.
Comment: what is big or little endian ? we can always use hex as an standard no need to say. for e and N we can send a text file and let put first line be e second be N. public key authorized to encrypt clien't session key and send it to service provider (just think about it what is SSL for ...). i don't see any reason to send something like javascript which make security problem for user and sadly nobody will block SSL on their side...
Comment: ♦ we can use hex always there is no problem with just using hex as an standard. and for using a text file that first line is e second line is N thats really safe its not an encoding. the reason i hate ASN.1 is that there is already exploits that use ASN.1 to remote code execution! for what we mostly use is just Encrypt for browser SSL. the signature is not very important for us
Comment: @roger ASN.1 does *not* allow for arbitrary code execution, it's just a way (which is already used in many other standards!) to unambiguously code data, like a sequence of big integers (as we need to do, among other things). The *parsing* library can be bad and have bugs, but it's not the encoding that is the problem. Data is just data... And javascript has nothing to do with it. (I don't understand that remark at all)
Comment: @Henno Brandsma the exact problem is people don't understand it and that's why they doing it. its not about ASN allow exploit or not, it already exists you need just google. instead of sending data safely we send a shell code! problem is everybody do it and nobody wanna change it because they don't understand … i already explained how to do it safely not in a shell code way ...
Comment: likewise you can make an exploit to target a buggy implementation of a hex parser.    probably easier, since asn.1 has more eyeballs on it


image nesting issue in tiny mce

Question: I have a drag drop interface from which user can add elements to page. For example, I want to nest an image inside a paragraph. To make the text elements editable and apply styles to it, I'm using a tine mce instance. I can load contents of text element (paragraph) in the mce successfully, along with its id, class and styles until, it has a nested image inside it. Once the paragraph has a nested image, on loading the content into editor, the whole content is moved out of the original p tag (the one with id and class). I tried to write clean up processes. I found the process added on onInit of mce, worked successfully in FF, but in IE, it failed completely.
Kindly advice me, whatever I'm trying to do is feasible or not ? What can be the different ways to accomplish this ?
Thanks in advance
Answer: I got it :).
div is not a valid child element for p. I removed the wrapper div around the image and it was fixed.

image nesting issue in tiny mce


How do I get a Double out of a resultset instead of double?

Question: When working with a JDBC resultset I want to get Double instead of double since this column is nullable.  Rs.getDouble returns 0.0 when the column is null.
Answer: You can check for wasNull on your ResultSet to find out if the value was null.

Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.

If you really need a Double afterwards, you can create it from the double returned.
Answer: An alternative to the aforementioned ResultSet#wasNull() is to test ResultSet#getObject() on null so that you can nicely put it in a single line in combination with the ternary operator:
Double d = resultSet.getObject("column") != null ? resultSet.getDouble("column") : null;

instead of
Double d = resultSet.getDouble("column");
if (resultSet.wasNull()) {
    d = null;
}

Comment: @Yoni: There's certainly no performance penalty in invoking a simple getter. The data is *already* there since `next()` has been called.
Comment: Interesting point, although there is a performance penalty here for calling a getter twice in the common case when the value is not null. Maybe it is possible just to cast the result of getObject to a Double?
Comment: but also note what the documentation of ResultSet says: `For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.` :-@
Comment: @Carlos: that was specified over 15 years ago. This is really not an issue nowadays.
Answer: Use ResultSet.wasNull -> http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html#wasNull%28%29
Basically it works for all primitive types, you first use getDouble, getInt, etc., and then only if the result is 0 you use wasNull.
Answer: You could just do:
Double d = (Double) resultSet.getObject("column");
then you don't have to worry if it was null.
Comment: Be careful, you may end with having an error like "ClassCastException 'java.math.BigDecimal cannot be cast to java.lang.Double'"
Answer: In kotlin:
private fun ResultSet.getDoubleOrNull(columnIndex: Int): Double? when {

     this.getObject(columnIndex) == null -> null

     else -> this.getDouble(columnIndex)

}


What is a 4x 10gbe QSFP-QSFP cable?

Question: I was looking for QSFP cables on Ebay and came across a Brocade 58-0000033-01 marked as 4x 10GE even though it has one QSFP connector on each end. I don't understand what this cable is for, will it work with a 10GBE/40GB Infiniband HCA?
Answer: QSFP means, literally, "Quad SFP" connector. In other words, it is a single SFP connector that carries four link.
From wikipedia:

The Quad Small Form-factor Pluggable (QSFP) is a compact,
  hot-pluggable transceiver used for data communications applications...
  It is an industry format jointly developed and supported by many
  network component vendors, allowing data rates from 4x1 Gb/s for QSFP
  and 4x10 Gbit/s for QSFP+

From the same page, you can read that a QSFP+ connector should support QDR Infiniband. That said, I would really check with my HBA vendor for compatibility.
Comment: Thank you, that's very logical. I guess I was thinking the "Q" mean "for QDR".

What is a 4x 10gbe QSFP-QSFP cable?


"Players failed to load content" when starting the Midnight mission

Question: I am unable to play the Midnight mission in Halo 4. The error message I get is Player failed to load content. A player maybe missing downloadable content.
I have inserted the second disk and downloaded whatever I needed from that disk. Nothing is working, I do not have XBox Live, do I need XBox Live to access this mission or is the game messed up?
Answer: Midnight is one of the campaign missions, and it's included on the disc.  There's no DLC involved.  One of two things may be happening:

The game is trying to load some content from the Disc 2 install which has become corrupted on your hard drive.  You can remove this data and reinstall, which might fix the problem.  Since this data is primarily for War Games and Spartan Ops, I think this is somewhat unlikely, though.
Your disc is bad.  It's possible it's defective or has been damaged.  In this case, your best bet is to contact the store you purchased it from or Microsoft directly and ask for a replacement.


Did Arius teach that time existed before the Son existed?

Question: Arius wrote that the Son was "begotten timelessly by the Father … before aeons … begotten timelessly before everything" (Letter to Alexander – See RPC Hanson, The Search, page 8). But Alexander of Alexandria stated that Arius also wrote that "there was a time when he did not exist" (RPC Hanson, The Search, page 16). Did Arius contradict himself? How could there be time before the Son existed if he was "begotten timelessly before everything?"
Comment: @User14 RPC Hanson stated, "He (Arius) and his followers insist again and again that the Son was produced before times and ages yet they hold onto the conviction that there was a time when the Son did not exist. … Perhaps they took the Platonic view that time only existed when the heavenly bodies, by which time is measured, were created, so that the Son, who was at some point brought into existence, but before the heavenly bodies, could be said in a sense to be 'before times'" (The Search for the Christian doctrine of God, 22).
Comment: For your question to be answerable we need to know when time began.   Most will say time began when the physical universe was created.   Arians and non Arians would agree the son of God existed before that Since all things are created  through him
Answer: If your first source is correct (with the missing ellipsis bits not making any difference to the rest), then the quote of Arius a few pages further on surely does show up a contradiction in the man's statements.
However, you have the advantage over others who do not have that book to hand because a study of it might find the author, Hanson, explaining away any apparent contradiction. Or, if he does not, could you just simply state plainly that Hanson does not do that?  For sure, there is not nearly enough in the minute quotes from Arius to give us any idea as to what he taught about time existing before the Son existed (or not.)
The same kind of problem arises with Origen's statements on the Logos / Word in no way having been created or begotten in time. Here this scholar notes:

"This is ironic since Arius, the archenemy of the doctrine of the
Trinity in the fourth century, claimed Origen as the source of his
subordinationism of the Son in which he declared that "there was when
the Son was not"." The Story of Christian Theology, pp 109-110, Roger
E. Olson, Apollos 1999

Olson then goes on to show how radically different Origen was to Arius. Origen stated the exact opposite to Arius's last quote. Hence the irony of Arius claiming Origen in support. Chaper 9 deals with the differences. Back then, there were some who believed that

"Jesus Christ was the incarnation, not of God, but of a great creature
of God, the Logos, who had a beginning in time and remained forever
subordinate to the Father, not only in terms of his role but also in
terms of his very being." Ibid. p.142
"Indeed, the agreement of the ancients is clearly seen here, that in
the Council of Nicaea, Arius dared not make a pretense on the basis of
the authority of any proved writer." Ibid. p.158

A further difficulty trying to answer any apparent contradictions of Arius is his reputed record of verbal duplicity. Long before our Politically Correct Era, John Calvin said this about Arius:

"Arius confessed that Christ was God and the Son of God... yet in the
meantime he did not cease to prate that Christ was created and had a
beginning, as other creatures. The ancients, to drag the man's
versatile craftiness out of its hiding places, went further, declaring
Christ the eternal Son of the Father, consubstantial with the Father.
Here impiety boiled over when the Arians began to hate and curse the
word homousious [ft. - consubstantial, the word of emphasis in the
Creed of Nicaea, 325, by which Arianism was rejected.]
... If it came to a debate, he was accustomed to confess that he
recognized the Father as God, the Son as God, and the Spirit as God,
but afterwards a way out was found, contending that he had said
nothing else than if he had spoken of God as strong, and just, and
wise. And so he re-echoed another old song, that the Father is the
Son, and the Holy Spirit the Father, without rank, without
distinction. To shatter the man's wickedness the upright doctors, who
then had piety at heart, loudly responded that three properties must
truly be recognized in the one God. And that they might fortify
themselves against his tortuous cunning with the open and simple
truth, they truly affirmed that a trinity of persons subsists in the
one God, or, what was the same thing, subsists in the unity of God."
Calvin : Institutes of the Christian Religion Vol. 1, page 125 ed. by John T. McNeill, Westminster

Whatever Arius taught about time existing before the Son [of God] existed is suspect due to his idea that there was a time when the Son was not. It is that later part of the question that should dictate how to view the first part of the question, though others may disagree. Those who agree with Arius will certainly disagree with my answer but I will not argue or debate with any of them.
Comment: Truth does not depend on Hanson. Hanson was not the last word on Arius. Rowan Williams wrote a book (revised 2002) specifically on Arius' theology. Olson called Arius "the archenemy of the doctrine of the Trinity." Williams, in contrast, concluded that "In many ways - and here is a still stranger paradox - his apophaticism foreshadows the concerns of Nicene theology later in the fourth century, the insights of the Cappadocians, or even Augustine. If he had his problems with the Lucianists, he would have found the 'neo-Arians' of later decades still less sympathetic" (page 233).
Comment: Many things in the Bible seem to be contradictions. For example, some people gather all free will texts. Others focus on the predestination texts. But if one is able to develop an understanding that allows for both categories, the result is much deeper truth. Arius said both that the Son is God and that He is created. If we remain at a superficial understanding of how Arius used these terms, we will not arrive at the truth. The Trinitarian Bishop Rowan Williams described Arius as "a thinker and exegete of resourcefulness, sharpness, and originality" (RW, 116). Calvin did not have the resources
Answer: Arius, the fourth-century presbyter after which Arianism is named, taught that God created all things through His Son. For example, Athanasius, in his paraphrase of Arius' writings, wrote:

"When He (God) wanted to make us, He then made a certain Person and
called him Word and Spirit and Son so that he could make us" (RH, 13).

If God made all things through His Son, then the Son must have existed before all things. Consistent with this concept, Arius wrote that the Son was:

"begotten timelessly by the Father … before aeons … begotten
timelessly before everything" (Letter to Alexander, RH, 8).

However, Arius also frequently said that the Son did not always exist. For example:

The Son "did not exist before he was begotten" (Arius' letter to
Eusebius of Nicomedia - RH, 6)

This gives us Arius' famous phrase that was anathematized by the Nicene Creed: "There was when He was not."
In the very little of Arius' own writings that survived until today, Arius never said there was "time" before the Son was begotten. But, according to Athanasius and Alexander, Arius did say that. For example:

"There was a time when the Son of God did not exist" (Alexander, RH,
17).

So, did Arius contradict himself? How could Arius say that there was "time" before the Son existed if he was "begotten timelessly before everything" and created all things?
"Gwatkin characterizes Arianism as … a crude and contradictory system" (RW, 10). However, the Trinitarian Bishop Rowan Williams, after a detailed intense study of Arius' theology, concluded that "he is a thinker and exegete of resourcefulness, sharpness and originality" (RW, 116). We need to, therefore, assume that Arius did not contradict himself.
Alexander taught that there was no gap between Father and Son (RW, 189). In other words, the Son is co-eternal with the Father. The Arians did not accept this view because it would mean that there are two "unoriginated ultimate principles" (two Beings who exist without cause and which gave existence to all else), which all agree cannot be (RH, 57). Furthermore, they argued that the titles "Father" and "Son" mean that the Father gave existence to the Son (RH, 57).
Arius, in contrast to Alexander, taught that a gap exists between the Father and Son.

Alexander attempted to force the Arians to admit that the phrase "He
was not" means that there was a gap of normal time when the Son "was
not." (RW, 189)
However, Arius wrote that it is not a gap of normal time. Arius
said that the gap is "logical," and if that gap involves some literal
time, then it may be "an infinitesimal reality." (RW, 189) Arius does
not want to use "the same sort of language for the 'interval' between
Father and Son as for that between creator and creature more
generally" (RW, 189).

Williams also explained the Arian view as follows:

"Faced with the notion that there was no 'interval' between Father and
Son, Eusebius (of Caesarea) is not necessarily being inconsistent in
stressing the Father's pre-existence. From our point of view, in the
world's time, Father and Son co-exist; from the Father's point of
view, so to speak, they do not and cannot." (RW, 172)

Perhaps we can rephrase Arius' view as follows:

This universe, including time, was created through the Son. But,
beyond our universe of time, space, and matter, exists an
incomprehensible and timeless infinity. In that ineffable infinity,
the Son was begotten. Therefore, there was no literal "time" before
the Son was begotten. From the perspective of our existence within
time, the Son has always existed.

Sources
This article is largely based on two books:

The Search for the Christian doctrine of God - The Arian Controversy
318-381, 1987 by Bishop RPC Hanson (Referred to as "RH" in this
article)
Arius: Heresy and Tradition - by Archbishop Rowan Williams, 2002
(Referred to as "RW" in this article)
Comment: If the Son is the Logos (a fairly substantial position) and the Logos is not merely spoken word but also rational mind behind that which is spoken (a very acceptable definition) then to imagine a 'time' prior to Logos is to imagine a 'time' before God had a rational mind.
Comment: @MikeBorden That is correct - to understand them, we need to put ourselves in the ancient mindset and understand the ancient context. The identification of the Son as the Logos of Greek philosophy was a standard teaching when the Arian Controversy began.


What did I do wrong and how to know if my question got reviewed

Question: I had a question here https://worldbuilding.stackexchange.com/q/250438/106249 and it said it is getting reviewed how do I know if its been done. Also what did I do wrong in this question.
Comment: I wanted to say since you told you were nervous : It's OK, there are a lot of people who make a lot questions much, much worse than yours. Yours has worldbuilding context (some don't even have any) and it was pretty clear. You just got unfortunate that it fell just right in a specific kind of questions which is not accepted here .
Comment: If you wish a less stress-inducing experience, the [sandbox](https://worldbuilding.meta.stackexchange.com/q/9981/80336) Sphenning suggested is a good place. It's made to keep judgement to a minimum : No downvote, no closure, only here to help you write a good question...
Answer: This site is different from other Q&A sites. If you read through our [tour] you'll see that not every worldbuilding question is suitable for this site. Our goal is to build a library of detailed answers to every question about worldbuilding. Certain worldbuilding questions aren't conducive to the creation of such a library.

Not all questions work well in our format. Avoid questions that are primarily opinion-based, or that are likely to generate discussion rather than answers.

Don't ask about...

Anything not directly related to worldbuilding
Questions that are primarily opinion-based
Questions with too many possible answers or that would require an extremely long answer

When a question is edited it automatically gets entered into a review queue moderators and members who have earned the reopen votes have access to this queue. If a mod or 5 voting members deem that in it's current form the question is suitable for this site it will be reopened. You can see the progress (or lack) of the review process by looking under your question, to the left and below the tags. There are several links: Share | Edit | Follow | Reopen (x) | Flag. Reopen (x) indicates how many members have voted to reopen your query as is.
Your question has been deemed likely to have many equally valid answers based in opinion rather than facts. Whether you believe humans are a fearful species or not there's a wonderfully large and diverse range of things that we can value. It's unclear how being fearful would impact this. Given the nature of the core of your question you'll likely need to make fundamental changes to it before it could get reopened.
The best way to do this is to start by identifying your reason for asking the question. Then construct the simplest single sentence version of the question. If this core ask is suitable for this site (What should I ask?, What is off-topic?) then flesh it out with the necessary details and clarifying information to enable askers to provide helpful answers.
In the future you may want to take advantage of the sandbox to get feedback and help improving questions before posting them.
Answer: Adding some specifics
I up voted @Sphennings' answer. It's excellent and I hope you carefully read it. I wanted to point out a specific issue about ambiguity. You asked:

I'm wondering what kind of things they value and would see as a virtue.

We have no idea why that question is important. As a result, it's ambiguous. The answer could credibly by anything (too broad, not focused). Worse, it could be a choice.
Value and virtue are matters of choice. Even when it's a need, it's a choice to give it value. For example, a desert-dwelling people would value water, but that suggests it's something worth trading for, something worth fighting a war for... that's different than a lizard (which can't make as many choices, if any) simply needing water to survive.
The Help Center states:

If ... you aren't sure what a character (be it an individual or organization) should do, that is out of scope for the site.

And that's the problem with values and virtues — they're choices. What makes water more valuable to a desert-dwelling people than (e.g.) metal? In fact, it may not be more valuable than metal. It's those differences, the judgement of something being more valuable and something being less valuable that falls over the line. Whether discussing an individual, a society, or a species, you've asked us to tell you what they would choose, and because that can literally be anything, it becomes opinion-based and out of scope (off-topic).
Remember, the Help Center says we're here to help you build your world, not tell your story. Separating the story from the worldbuilding question requires practice. When asking any question here, it's important to ask yourself "why am I asking this question?" before striking the Submit button. If the answer is, "I need it for my story," then you're almost guaranteed to have the question closed. If the answer is (e.g.), "because I'm trying to achieve effect X in my story and I believe it should be a basic attribute of my creatures," then you need to explain what X is and why you need it in your post.
As written, your post appears to be looking for attributes that are no different than what color the fur should be, how long the horns should be, and other purely aesthetic choices that have everything to do with the story, but little or nothing to do with the world.
Remember, ask us for help solving a problem. A list of values might solve a problem, but you didn't explain a problem that would be solved with a value or virtue.
Infinite vs. Finite
Finally, one more thing. You'll notice in the Help Center that we discourage brainstorming. In fact, the Help Center prohibits open-ended questions and questions that lead to all answers having equal value. As written, you're asking for an off-topic infinite list of things. In other words, the list could be anything with no expected, specific, and focused reason for one being better than another.
We do permit questions that result in a finite list of things. Note that I say "result." You're still expected to ask a fundamentally objective question with the expectation of selecting a single best answer. "How can I change the human arm to allow it to lift 200 pounds easily?" may result in 3-5 different things that must change to permit the one, specific expectation, but the question is still asking for just one thing, not a list of things.


Find the server name for an Oracle database

Question: Is there a way of finding the name of the server an Oracle database is hosted on?
Answer: If you don't have access to the v$ views (as suggested by Quassnoi) there are two alternatives
select utl_inaddr.get_host_name from dual

and
select sys_context('USERENV','SERVER_HOST') from dual

Personally I'd tend towards the last as it doesn't require any grants/privileges which makes it easier from stored procedures.
Comment: +1 for `sys_context()` as the easiest and most appropriate solution.
Comment: You can use `sys_context('USERENV', 'SERVICE_NAME')` to get the database service name instead of the machine name.
Comment: The only reason not to use `sys_context` is that it lower cases the name, which the other 2 don't. It's rare that that will make any difference at all, but sometimes Linux is picky.
Answer: SELECT  host_name
FROM    v$instance

Comment: Technically, as multiple servers can mount an Oracle database, `select host_name from gv$instance` would return all hosts.  The query above does show the host you're currently connected to in that session, however.
Answer: The query below demonstrates use of the package and some of the information you can get.
select sys_context ( 'USERENV', 'DB_NAME' ) db_name,
sys_context ( 'USERENV', 'SESSION_USER' ) user_name,
sys_context ( 'USERENV', 'SERVER_HOST' ) db_host,
sys_context ( 'USERENV', 'HOST' ) user_host
from dual

NOTE: The parameter 'SERVER_HOST' is available in 10G only.
Any Oracle User that can connect to the database can run a query against "dual".
No special permissions are required and SYS_CONTEXT provides a greater range of application-specific information than "sys.v$instance".
Answer: I use this query in order to retrieve the server name of my Oracle database.
SELECT program FROM v$session WHERE program LIKE '%(PMON)%';

Answer: Did you ask this question to use the same query in multiple environments and display wither this is Prod vs. UAT vs. Dev environments? Many companies have a standard suffix or prefix indicating the environment. Building on the answer above, here is a query that returns the environment, assuming last letter of 'p' - Prod | 'a' - UAT | 'd' - Dev.
select sys_context ( 'USERENV', 'DB_NAME' ) db_name,   /* Use this for determining Environment, where the last letter is p/a/d for Prod/uAt/Dev. */
       case substr ( sys_context ( 'USERENV', 'DB_NAME' ), -1 )
         when 'p' then 'PROD'
         when 'u' then 'UAT'
         when 'd' then 'Development'
         else 'Unknown'
       end Environment
  from dual


When shipping a guitar, what is the best way to package it?

Question: What is the best way to package a guitar to ensure if will arrive in its destination without any harm? Lots of bubble wrap? A box within a box? Loosen the strings? Should acoustic and electric guitars be packed the same way?
Answer: Loosening the strings is a must if your guitar is likely to fly.  I took a flight to Germany in 2001 without loosening the strings of a Strat I had at that time, the guitar was in a hard-case; when I got there the springs had somehow slipped of the back of the tremolo causing the tension of the strings to pull the tremolo up to an obscene angle.  I put this down to the difference in pressure in the cargo hold of the plane (the plane I flew in that day was very old; short haul Lufthansa flight from Amsterdam; it had propeller engines); though I'm still not entirely sure why.  The guitar turned out to be fine, but ever since then I have either tried to get them on as hand luggage; or semi-detuned the strings.  Whether you need to do this with a modern plane I'm not sure, but perhaps better safe than sorry.
Also a hard case would be advantageous; then put the guitar contained within the hard case in a box padded with this kind of stuff (this is how a manufacturer might send you one).  Make sure the box is sturdy and made of pretty thick cardboard.
If you don't have a hard case; then bubble wrap round the guitar/or a soft padded gig-bag, then put that within a box; then put the boxed guitar in a larger box, padded as described above.
I think acoustics should be no different; again a hard case is preferable.
Comment: Air pressure wouldn't cause any problem for a guitar, especially a solid body. The case would equalize the pressure, unless it was specially designed to be water-proof, and then you'd know if the case was at a different equalization because it might be hard to open if you started at a higher altitude and landed at a lower one. Pressure might affect a guitar with air-tight sealed chambers if the wood was really thin, but I've never heard of such a design.
Answer: For maximum safety, do this:
- loosen the strings
- put the guitar in a hard case
- pad the case (on the inside) with newspapers or something similar; the point is to make sure the guitar doesn't move around
- close up the hard case and put it in a slightly larger box
- fill aforementioned box with packing peanuts, cardboard, bubble wrap etc.
Here's a link.
Good luck!
Answer: I would place bubble wrap around the guitar and then place it in a hard case. In all the empty spaces that could cause the guitar to move around I would stuff with a soft material (foam/bubble wrap), and that will stop the guitar moving around in the case during transit.
Pay attention to the neck, wrap it in bubble wrap fully. If the guitar has a Strat-style 'whammy' bar, I would unscrew and remove it.
Loosen the strings, and throw in a new pair of strings as a good courtesy, in case a string breaks in transit. If you are selling via eBay then this may earn you more positive feedback (it shows your thought and courtesy)
If the guitar is flying in any way, then the hard case is the most important thing. No matter how much 'Fragile' tape is put on it, we all know what can happen at baggage handling.
Hope this helps.


Altium: PCB Layers configuration when importing footprints

Question: This is my first time using Altium and I'm still a beginner with PCB design. I want to import the symbols and footprints of the components from different sources (Websites, existing projects...) but I'm concerned about the layers configuration, because the footprints might be using different layers. So I want to know how to solve that problem without having to redo the footprint?
Also would importing all the components symbols and footprints from the same website (for example, SnapEDA) mean that they all have the same layer-configuration?
Comment: If you mean by "layers" you mean top and bottom sides of the board, then that is automatically handled by Altium.  Parts are created as Top layer parts, but you can switch parts to the Bottom layer in a PCB doc, and it will make the changes automagically.  There is no need to create footprints for top and bottom sides.
Comment: Unless you're doing something very special, most footprints only have features on one layer (top or bottom, and the associated silkscreen, etc.). Or they place pads on all the internal layers, but are exactly the same on all internal layers. If you want to control what gets put on the documentation layers or use a mechanical layer as a courtyard layer or something, you are best off making your own library to meet your own standards.
Answer: On the PCB, you can:

Enable all layers (bottom-left tab in PCB view, "LS" (Layer Sets), or D T A key sequence; or there may be another shortcut / menu in newer versions, I use AD16)
SHIFT+S (single layer mode) and flip through layers (or NUM+, NUM-, etc.), see which layers are used and which need to be swapped to your preference
Select the components that have incorrect layers, untick "Lock Primitives" in Properties (suggest leaving Properties dialog/panel always open on the side for quick reference)
Go to those layers, select objects, and change the Layer parameter in Properties
Remember to re-lock primitives on all modified parts! (The selection can be stored and recalled with CTRL+1 and ALT+1 (or other numbers) respectively, if you like.)

This is a somewhat brittle solution, as updates from library will wipe the changes.  You are encouraged to either update the libraries themselves (saved locally, they're yours to play with, license terms notwithstanding), or build your own by copy-pasting components or library contents into others.
Advanced: this can also be done without unlocking primitives, using the query system.

Open the Query panel/dialog
Enter query: OnLayer('Mechanical 7') (or whatever layers shouldn't be used); this will select all objects on the quoted layer.  Note name must be an exact match; check L (Layers / View Configuration) for names (also D K (Layer Stackup) to edit copper layer names).
In Properties, change the Layer parameter to the correct value.

For some reason, objects selected and edited in this way are not prevented by the primitives lock.
Footprints can also contain copper layers; if no useful objects have been placed on them, they can be removed in the Layer Stack Manager.  (Double-check your layer and dielectric thicknesses, names and ordering; they may be messed up as a result.)
Comment: What does "Remember to re-lock primitives on all modified parts! " mean?
Comment: Reference step 3.


Youtube video only play for 50 seconds to a minute and a half

Question: When i go to watch a Youtube video it will play for 50 seconds to a minute and a half. Why is it doing this? I have cleared my cookies and all other browsing history and re installed chrome and it still doing this.
Comment: I had the same problem. For me it was Google's own **Chrome Toolbox extension** who was the culprit. If you have it installed try disabling it.
Comment: It is not my internet connection. As there is more video buffered out before it stops
Comment: Is there enough space on the disk where it stores the temporary files?
Comment: Wow it was "Chrome Toolbox extension". But is there a way to have it enabled and videos still play. Because i really want tab scrolling
Comment: Nope, none of the settings (and changing them) in Chrome Toolbox seems to change the fact that it causes the freezing of Youtube after 1-1,5 minutes. I think we need to wait for an update from Google. Also the Chrome Toolbox update is from May so it must be something in the new version of Chrome (or YouTube) because it started just last week.
Answer: I'll add this as an answer because it turned out to be the cause:

The problem is that since the first week of October 2013 YouTube freezes its playback after 1 to 1,5 minute. I found that the most likely cause of this freezing is Google's own Chrome Toolbox extension (it was for me). When disabling this extension the playback of YouTube continues as normal.
I have also found that none of the settings in the extension have any influence on this disruption. Because the last update of the Chrome Toolbox extension (1.0.32) is of May 2013 the cause has to be found in a new Chrome update or YouTube. As of half September Google has made a lot of changes to YouTube (for example removing the old subscription box). Also as of last week my videos start muted (needing to adjust the volume slider to get audio) So maybe Google is tweaking YouTube with some bugs as a result.
We need to wait for a fix from Google while keeping the Chrome Toolbox disabled until then.
Answer: Here's a hotfix:
Navigate to C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\Extensions\fjccknnhdnkbanjilpjddjhmkghmachn\1.0.32_0\floating_bar.js
Add two forward slashes before line 157, as so:
//.addEventListener('mouseout', hidden , false)

Commenting out this line removes the error.


BT Mouse disconnects after upgrade to 12.04

Question: After upgrade to KUbuntu 12.04 my BT Mouse disconnects after some time not using it. This may be normal, but when I am back to my Notebook and want to proceed work, it does not reconnect. Befor upgrading it either did not disconnect or it did and reconnected without my notice. I read already there could be some sort of timeout (maybe energy saving) but I did not find a solution. Till now I have to press the small Button on my Mouse bottom side (named "Connect") and second I have to press the connect button in the BT Applet in Kubuntu, (named "Blue Devil"). Quite annoying... Any hints ? Thanks a lot
Answer: I have the same problem with a HP625-Laptop.
In the System-Log you can see the following:
<code>...kernel....[....] usb 5-4: USB disconnect, device number 21
...kernel....[....] Bluetooth: hci0 urb ffff880089af0480 submission failed
...bluetoothd[992] Adapter /org/bluez/992/hci0 has been disabled
</code>
I think, that is a problem with the kernel.

The problem is solved:

De-Installing fglrx-Driver
De-Installing broadcom-sta-wlan-driver

After that everything works fine.
Now you can install the fglrx-Driver again.
The kernel supports the broadcom wlan- and blutetooth-device!


Is it possible to train a Support Vector Machine to a specific accuracy?

Question: From my understanding, support vector machines run on the premise of minimizing some error function, usually with the goal of maximizing accuracy overall. However, there are a lot of contexts, particularly in the social sciences, where people don't aim for 99%+ accuracy, but instead aim for 95% accuracy (e.g., 95% CI, p-values, etc). I'm wondering if there is a way to train SVMs with the goal of developing the best model that achieves 95% accuracy. Obviously, depending on the context, 95% accuracy might be out of reach and researchers are just aiming for the best predictive models they can get; but when an SVM can train on some dataset and repeatedly get above 95% accuracy, I'm wondering if there is a way to trade off some of that accuracy for generalizability, namely by say reducing the complexity of the decision boundary (e.g., fewer folds) or by maximizing another function, say achieving 95% accuracy on a medical test while also trying to maximize the number of true positives.
Comment: I am afraid you sound confused; the target of the highest accuracy possible has absolutely nothing to do with 95% CI, neither it is typical to aim for 99% accuracy, as you claim. You question is based upon wrong premises.
Answer: There is no deterministic way to trade accuracy for generalizability.
Integral part of machine learning is splitting your available data into a training set and test set (or even an intermediate validation set, depending on the amount of available data). With that said you train the model on the training set and then apply the model to the 'unknown' test set. In case it performs (much) worse on the test set your model likely overfits the training data, so you would generally try to achieve similar results on the test set as on the training set. By repeating this process of model building you achieve the 'best possible model' while guaranteeing generalizability on data that the model hasn't seen before. Of course there's more to it, but this would be the general approach to balance accuracy and generalization.
As it seems to be a classification problem you are trying to solve, you can also optimize your model in regard to precision/recall or sensitivity and specificity, respectively (ROC curve etc. might help here). Quantifying those metrics would be part of model evaluation on the path to an optimal model outcome.


Can you explain the resistors in this PIR circuit?

Question: The circuit is a motion detection alarm circuit, I know what the circuit does but I want to know about the resistors attached (R2 is attached to the transistor for amplifying the output to 5V). Why R1 and R2 are attached? Anything do with the delay? Can you explain to me the relay circuit of npn transistors?
Comment: Yuk.  It hurts to look at that fuzzy image.
Comment: To limit the current to the LEDS to keep them in spec and not burn them out.
Comment: by removing R1 and led can i replace it with a DC motor? if so then what voltage DC motor should i use?
Answer: R1 protects led 1 from dying.
R2 protects q1 from dying. It also sets the base current that is multiplied by the gain of the transistor to allow that much current through the C-E junction.
Diodes like led 1 and the base of a transistor must be current limited so they don't go into a overload condition and burn out.
The delay is completely internal to the PIR module.
Comment: Yes, by replacing the 5V of the circuit with 8V. Then you have to change the resistors too so that the leds don't break. And if the PIR module or buzzer don't work with 8V. Change them too. Or you could disconnect the 5V from led2/the buzzer and connect just that to 8V. The transistor does not amplify or double the voltage. It acts like a switch.
Comment: so that is 5v through the C-E junction in this cause ,any way of increasing the output voltage to 8v ???
Comment: by removing R1 and led can i replace it with a DC motor? if so then what voltage DC motor should i use?


Opening email attachment with roo

Question: I need to manipulate xls files which are read from email attachments. Due to performance reasons I need to use the Roo gem. The problem here is passing the attachment to the Roo. Spreadsheet gem could read StringIO directly but Roo doesn't seem to have such capability. (Is there any way to get Roo to accept StringIO objects in place of files?)
I have found this solution
<code>attachment = mail.attachments.first
file = Tempfile.new(['attachment', '.xls'], :encoding => 'ascii-8bit')
file.write StringIO.new(attachment.body.decoded).read
excel = Roo::Excel.new(file.path)
</code>
But it involves writing a temporary file to the file system which I would like to get rid of.
Is there a way to create a virtual file?
Answer: There is no better way to open an excel from email attachment with Roo.

Opening email attachment with roo


Does staking more than 32 ETH increase my chance of becoming a validator?

Question: When people say "The more you stake, the more likely you will be selected as a validator," what do they mean exactly? My understanding is that I am only supposed to deposit 32 ETH (but nothing more) to a deposit contract. So to increase my probability of becoming a validator, I have to deposit into multiple contracts. Is my understanding correct? Thank you!
Answer: Yes, but you have to stake in chunks of 32 ETH.  If you have 64 ETH, you can run 2 validators, and you would double your probability of one of your validators being selected as a block proposer.


What is the best way to thaw chicken for use tonight?

Question: I bought some frozen, boneless chicken breasts that I wanted to cook tonight. Should I leave in the package and immerse it in hot water, or should I thaw it in the microwave (in or out of the package)?
Answer: There are four approved ways to thaw food:

In the microwave
Under cool running water
In a refrigerator
As part of the cooking process

Of course, these methods are chosen for safety, not how they affect the product.  Depending on your chicken, you may want to use only the cool running water method, as it is least likely to scotch the outside, while still being relatively fast.
Comment: running water FTW!
Answer: Are you cutting up the breasts for your application, or keeping them whole? I ask because boneless chicken breasts (as well as just about everything else) are easier to slice cleanly if they're a bit (but not completely) frozen.
How much time do you have between "I have hard frozen chicken breasts" to "I want to start cooking"? If it's morning where you are and you want to cook tonight, just throw them (still in the package) into the fridge. If they're not completely defrosted (and you want to keep them whole) when you're ready to cook, just run under cold water (still in the package, just for convenience sake) for a bit. It won't take long, once you can easily separate individual breasts, just a couple of more minutes separate and out of the package under cold water will give you a product ready to go.
Whatever you are doing, there is no harm in the very center of the breasts still having a bit of a frozen chill when you start. Boneless skinless chicken breasts are notorious for drying out (becoming overcooked) before the surface reaches a nice brown. A slight frozen chill at the center is a good thing.
Answer: Fill your kitchen sink with hot water, put the amount of chicken you will use in a plastic Ziploc bag, put the bag in the water, and wait.
Comment: This may or may not be safe, depending on the total amount of time the chicken will spend in the danger zone. Please do not post answers like this that may endanger someone unless you include the appropriate food safety information.