Performing an order_by operation on an SQLAlchemy query, where the objects being sorted have the same value, always returns them in the order that they are in the database. Is there a function to additionally shuffle those results that are the same?  Practical example: ITEM         PRICE  hamburger    20 burrito      10 sandwich     10 quesadilla   15  Running db.session.query(FoodItem).order_by(FoodItem.price).all() would return them in the following order:  Hamburger Quesadilla Burrito Sandwich  burrito would always precede sandwich as it is earlier in the database, no matter how many times you ran the function. I've tried to randomly sort the results before ordering, as so: from sqlalchemy.sql.expression import func  db.session.query(FoodItem).order_by(func.random()).order_by(FoodItem.price).all()  However, this doesn't have the desired effect - the final order is still retained according to the database. Is there a way - sqlalchemy or a Python lambda expression/function - to achieve the desired result of sorted items, with items having equal values shuffled?

How do I select one or more random rows from a table using SQLAlchemy?


When Neo takes the red pill all kinds of things start to happen. In the matrix the mirror turns into 'The Blob' and smothers his body, in the real world he claws his way through his pod membrane, a machine suddenly appears and grabs him and looks him over then the control cables are detach from his spine and he's flushed to the sewer. How does that work?  For clarification; The two other related questions' answers talk about placebos, metaphors, sleeping pills and finally "a program to wake Neo up". Good answers for the context of those questions but they all focused on 'Neo', no explanation to what physically happens and how it happened. Is it a virus designed to cause the machine nursemaid to 'abort' the infection?

When Morpheus offers the pill choice to Neo, they are still in the Matrix. That leads me to belive that none of the pills are real thus having no particular effect in the real world. Was it some sort of placebo effect that freed Neo from the Matrix or do the pills have an actual effect?


Hash mismatching while running sudo apt update. sudo apt clean && sudo rm -rf /var/lib/apt/lists/*  both of this command not working it is happening with every mirror evevn from main server the error message is here :- E: Failed to fetch http://mirror.cse.iitk.ac.in/ubuntu/dists/focal-updates/main/binary-i386/by-hash/SHA256/016259cc5a05a24d9eaa7f7d2e72f00d5f4094c9cae52ab2f6914aa40ae9ec97  Hash Sum mismatch    Hashes of expected file:     - Filesize:203432 [weak]     - SHA256:016259cc5a05a24d9eaa7f7d2e72f00d5f4094c9cae52ab2f6914aa40ae9ec97     - SHA1:92c84628833d08e7fd4cab4fb6c60f0cb5526908 [weak]     - MD5Sum:bab37a523ab35365753f89ccb90a0bbb [weak]    Hashes of received file:     - SHA256:4c03123d14ede9726beca8dac893b54ef1abf221191a65eaaf40d9a39837d116     - SHA1:80fbcd190a8038c024e0534c6ee79073d203d73c [weak]     - MD5Sum:56fe008e11233dda4c8810189b542503 [weak]     - Filesize:203432 [weak]    Last modification reported: Thu, 03 Sep 2020 01:14:19 +0000    Release file created at: Thu, 03 Sep 2020 03:30:39 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead.

When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead.


What I am trying to do is pretty simple, but I couldn't find how to do it.   Starting with 1st element, put every 4th element into a new list. Repeat with the 2nd, 3rd, and 4th elements.   From:  list = ['1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b']   To:  list1 = ['1', '5', '9'] list2 = ['2', '6', 'a'] list3 = ['3', '7', 'b'] list4 = ['4', '9']   In other words, I need to know how to:   Get the Nth element from a list (in a loop) Store it in new arrays Repeat

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I'm just learning best practices on partitioning. I want to move my swap partition to the right end of my disk.    Am I not breaking anything if I delete the swap? How about it being partition number 3?

According to  I just expand my sda4 to include unallocated space, my question is after create 2 new partitions sda7, sda8, do I need to move the swap partition to the most right of the disk? (I really don't know this, I saw  which moving the swap partition to the right side)  Thanks.


Say I call the function openFile in my main function: int main() {     FILE *fptr;     char *file_name = "myfile.txt";     fptr = openFile(file_name, 'r');     // ... }  FILE *openFile(char *name, char *mode) {     FILE *file = fopen(name, mode);     if (file == NULL) {         fprintf(stderr, "Error opening file.\n");         exit(1);     }     printf("Opened file.\n");     return file; }  If fopen encounters an error and returns NULL, would it be better practice to handle the error in that if block as shown in the code above, or would it be better to return (NULL) like fopen does and then handle the error upstream in my main function? Or is there another method that is better for handling errors?

What do you consider "best practice" when it comes to error handling errors in a consistent way in a C library.  There are two ways I've been thinking of:  Always return error code. A typical function would look like this:  MYAPI_ERROR getObjectSize(MYAPIHandle h, int* returnedSize);   The always provide an error pointer approach:  int getObjectSize(MYAPIHandle h, MYAPI_ERROR* returnedError);   When using the first approach it's possible to write code like this where the error handling check is directly placed on the function call:  int size; if(getObjectSize(h, &size) != MYAPI_SUCCESS) {   // Error handling }   Which looks better than the error handling code here.   MYAPIError error; int size; size = getObjectSize(h, &error); if(error != MYAPI_SUCCESS) {     // Error handling }   However, I think using the return value for returning data makes the code more readable, It's obvious that something was written to the size variable in the second example.  Do you have any ideas on why I should prefer any of those approaches or perhaps mix them or use something else? I'm not a fan of global error states since it tends to make multi threaded use of the library way more painful.  EDIT: C++ specific ideas on this would also be interesting to hear about as long as they are not involving exceptions since it's not an option for me at the moment...


I cant comprehend how the tension on the string become less when the body is accelerated downwards?

This is the question:      A rope brings a 50 kg object downward at an acceleration of 0.75. What is the tension force of the rope?    I thought that, since the tension and the weight are both "going" downward, the net force would be Weight + Tension = Mass x -Acceleration. The acceleration is negative because it is going downward. But if I do it that way I get the wrong answer. The answer is only correct if net force is Weight - Tension, and if acceleration is positive, neither of which makes sense to me. Can someone explain this?   It could be a silly arithmetic error that I haven't noticed.


I would like to set a motto after the chapter title. While the title is set left-aligned the motto should be set left-aligned too, but the longest line of the motto should be aligned to the right outer border of the page:  The Title is Great That is the subtitle if there is one  The Authors name                           There was a young man of Quebec                          Who was frozen in snow to his neck.                          When asked: ‘Are you friz?’                          He replied: ‘Yes, I is,                          But we don’t call this cold in Quebec.   1. Maybe the section title And last but not least the text of the essay and what else I do not know...   This is a working example, but what I need to know is, how to set the whole 'block' with the poetry to the right border (that the longest verse hits it)?  \documentclass[10pt,twoside]{memoir} \usepackage{blindtext} \newcommand{\chapterauthor}  \makeatletter \DeclareRobustCommand\authortoctext[1]{% {\addvspace{10pt}\nopagebreak\setlength{\parindent}{0em}\relax \rightskip \@tocrmarg\relax \itshape#1\par\addvspace{-7pt}}} \makeatother \newcommand\authortoc[1]{\needspace{3\baselineskip}%   \gdef\chapterauthor{#1}%   \addtocontents{toc}{\authortoctext{%     \needspace{2\baselineskip}%   Vgl. http://tex.stackexchange.com/questions/134016 #1}}} \renewcommand{\afterchaptertitle}{%  \vskip\onelineskip\begin{large}\normalfont\textit{\Large\chapterauthor}\end{large} \vspace{4ex} \vskip\onelineskip}  \newcommand\Chapter[3][]{   \chapter[%   \if\relax\detokenize{#1}\relax #2%   \else #1\fi. #3]{#2\\[2ex]\Large\Large#3}   \chaptermark]{\markboth{%   \if\relax\detokenize{#1}\relax  #2%   \else  #1\fi }{}%   }}   \begin{document} \authortoc{The Author} \chapter[]{The Title of the Chapter} \settowidth{\versewidth}{I will pour out my spirit on all people}  \begin{verse} In the last days, God says, \\ I will pour out my spirit on all people. \\ Your sons and daughters will prophesy, \\ \ldots \\ And everyone who calls \ldots ’’\,’ \end{verse}  \section*{The section Title} \blindtext   \end{document}

I recall seeing a package to make quotes like that of the following image at the start of a chapter, but I can't seem to find it again.    (This image is from the book Combinatorics and Graph Theory by Harris, Hirst, and Mossinghoff)


So I was asked to determine and justify the convergence or divergence of $$\sum_{n=1}^\infty\left(\sqrt[n]{n}-1\right)$$ and I think it diverges and was trying to use the Comparison Test by finding a function less than it that diverges but I am not sure what the function would be...  Thanks in advance for any help!

A student was recently asked this question by his instructor:  $$\sum_{n=1}^\infty{\left(\sqrt[n]{n}-1\right)}$$  Converge or diverge?  I feel a little dumb for not being able to answer it. The following tests fail to prove convergence or divergence:  nth term test for divergence (limit is 0), ratio test (limit is 1), root test (see ratio test), limit comparison with $\sqrt[n]{n}$ (not sure why I thought that'd work)  Something I did try was using the fact that  $$x^n-y^n=(x-y)(x^{n-1}+x^{n-2}y+x^{n-3}y^2+\cdots+x^2y^{n-3}+xy^{n-2}+y^{n-1})\;,$$  to rewrite $\sqrt[n]{n}-1$ as  $$\frac{n-1}{n^{1-1/n}+n^{1-2/n}+\cdots+n^{2/n}+n^{1/n}+1}\;.$$  However, I'm not sure what to compare this to. According to wolfram alpha this series "diverges by the comparison test", but comparison to what? There is a similar problem in Baby Rudin, but for $(\sqrt[n]{n}-1)^n$, and a simple nth root test resolves that series [convergence] in a hurry. Any ideas? Have any of you encountered a similar looking series before? Thanks.


I have two classes that are inter-dependent. I am pretty sure, I am designing it in a wrong way but I don't know how to fix it.  So, I have a situation like following- My car class includes the truck class.  #include "stdafx.h" #include "truck.h"  using namespace std;  class car {     int wheels;     float speed;  public:     car(int wheels, int speed);     int numberOfWheels();     float speedRate();      bool isFaster(truck & truck); };   and then my truck class needs to include the car class-  #include "stdafx.h" #include "car.h"  using namespace std;  class truck {     int wheels;     float speed;  public:     truck(int wheels, int speed);     int numberOfWheels();     float speedRate();      bool isFaster(car & car); };   I am getting the include itself error and I know why but I can't find a way to get around that.  Can anyone please help me with it.

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


What is the procedure of Training, Testing and Validation Test? Explain it thoroughly. Or give some link for related articles

When you are trying to fit models to a large dataset, the common advice is to partition the data into three parts: the training, validation, and test dataset.  This is because the models usually have three "levels" of parameters: the first "parameter" is the model class (e.g. SVM, neural network, random forest), the second set of parameters are the "regularization" parameters or "hyperparameters" (e.g. lasso penalty coefficient, choice of kernel, neural network structure) and the third set are what are usually considered the "parameters" (e.g. coefficients for the covariates.)  Given a model class and a choice of hyperparameters, one selects the parameters by choosing the parameters which minimize error on the training set.  Given a model class, one tunes the hyperparameters by minimizing error on the validation set.  One selects the model class by performance on the test set.  But why not more partitions?  Often one can split the hyperparameters into two groups, and use a "validation 1" to fit the first and "validation 2" to fit the second.  Or one could even treat the size of the training data/validation data split as a hyperparameter to be tuned.  Is this already a common practice in some applications?  Is there any theoretical work on the optimal partitioning of data?


This problem appered in my textbook and i cant solve it, it's in the chapter of the chinese reminder theorom so that's probably related. A solution or hint would be great.

I am stuck with this exercise:     Show that $\forall s >0 \quad \exists N >0$ such that $$x^2 \equiv 1\pmod N$$ has more than $s$ solutions.   I think I cannot use the theory if quadratic residues, because the modulus is not prime, so maybe I must prove it with square roots or roots of unity, but I don't know how to approach it at all.  Thanks for any help.


It seems that I cannot reference tables when they are placed inside onlyenv, but . This applies to both of \cref and the traditional \ref    The topic  is not an answer to this question because my question is asking about referencing a table, not inserting its number in a caption.  Here is the MWE. This should be run twice to get the real result.  \documentclass[aspectratio=169, xcolor={x11names}]{beamer}   \usecolortheme{seahorse} \useoutertheme{miniframes} \useinnertheme{inmargin} \usefonttheme[onlylarge]{structurebold} \setbeamertemplate{caption}[numbered]  % Command to change margins for a page wide \makeatletter \newcommand{\framePageWide}{     \def\Gm@lmargin{5mm}%     \def\Gm@rmargin{5mm}%     \textwidth=\dimexpr\paperwidth-\Gm@lmargin-\Gm@rmargin\relax     \hsize\textwidth     \columnwidth\textwidth     \setlength{\linewidth}{\textwidth}     \hoffset=\dimexpr-\beamer@leftsidebar+\Gm@lmargin-0mm\relax } \makeatother \newcommand{\framePageWideEnumI}{\setlength{\leftmargini}{10mm}}       \usepackage{adjustbox}     \usepackage{ragged2e}     \usepackage{tabularx} % BEGIN_FOLD          \newcolumntype{C}{ >{\arraybackslash \Centering}X }              \newcommand{\scalelinespace}[1]{                 \rule{0pt}{#1\normalbaselineskip}                                         }  % END_FOLD      \usepackage{booktabs}     \usepackage{makecell}      \usepackage{amsmath}     \usepackage{amssymb, amsfonts}      \usepackage{cleveref}     \crefformat{table}{Table #1}   \begin{document}  {\framePageWide  \begin{frame}{Tables}  \begin{onlyenv}<1>      \framePageWideEnumI      \begin{itemize}         \item Item 1         \item Item 2     \end{itemize}  \end{onlyenv}  \begin{onlyenv}<2>      \begin{table}          \begin{adjustbox}{minipage={0.5\textwidth}, valign=t}              \caption{Time, in seconds, needed to calculate a single ${Z}_{bus}$ Element}             \label{table:results2}              \begin{tabularx}{\linewidth}{c C C}                  \toprule                  System Size & Our Method & Brown's Method                 \\                 \addlinespace                  200-bus & $4.3\times10^{-6}$ & $0.092$                 \\                 \Xhline{0.25mm}                  2383-bus & $3.8\times10^{-6}$ & $166.2$                 \\                 \Xhline{0.25mm}                  3120-bus & $3.2\times10^{-6}$ & $398.8$                 \\                  \bottomrule              \end{tabularx}          \end{adjustbox}         \hfill         \begin{adjustbox}{minipage={0.43\textwidth}, valign=t}              From \cref{table:results2} we see that              \begin{itemize}                 \item Our method is fast                 \item By contrast, Brown's becomes very slow when the system is large             \end{itemize}          \end{adjustbox}      \end{table}  \end{onlyenv}   \end{frame}  }  \end{document}

For space reasons I want to break up the contents of an itemize list into separate slides, which I have been doing without much problem using \only.  However, the following minimal document complains that the label eq:formula is not defined:  \documentclass{beamer} \begin{document} \begin{frame}{Title}  \begin{itemize}  \only<1>{   \item Item 1.  }             % Comment   \only<2>{     % these lines   \item Item 2, with equation   \begin{equation}    \label{eq:formula}    xyz   \end{equation}    \item Item 3, with reference \eqref{eq:formula}.  }  \end{itemize} \end{frame} \end{document}   As you can see, it is clearly defined.  The problem goes away if you comment out the marked lines (thus, printing everything on one slide).  I see using \tracingmacros that there is a serious redefinition of \label in beamer, and as such it appears that this is a bug with detecting what slide the label is printed on.  Is that right, and what is the solution?


Do I need some sort of transit visa returning to Hawaii from Stuttgart, Germany with an 11 hr 50 min layover in London LGW then connecting on to Seattle, WA and on to Lihue, Kauai, Hawaii?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


So we just started a new campaign with new characters. Two of the characters aren't afraid to get their hands dirty to get what they want. In the very first session the one character, who plays a homebrewed Yeti race roared at another player to intimidate them so they would scram. With most social interactions there's a contested roll to see how it effects the other person. But the problem we had is we had no idea which skill to use. So which skill should be used to contest the intimidation?   One of us is leaning more towards pure charisma while another is leaning towards insight. Would this actually be an intimidation roll or should they just purely roleplay it out? But then if it was a NPC instead, what would the NPC roll for? They tried interrogating one previously and intimidating them and rolled really high to get info from them. However, I, as the DM, didn't want them to know any info and played the NPC as someone who would rather die than spill any information.

During our last play session (it was our second session, so everyone is first level) my fighter dwarf had a conflict with another player's human fighter. My dwarf became annoyed at the human's dismissive reaction to a roar outside the village that sounded like ogres (my dwarf has a bad history with ogres).   So, in order to emphasize the seriousness of this situation, my dwarf grabbed the human by shirtfront and pulled him closer (done with a successful roll). Still bent double, the human drew his sword and pointed it at my dwarf's belly (dwarf wearing chainmail). At this point the DM made the other player roll an Intimidation (Charisma) check, and me a Wisdom check to resist. I lost and my dwarf, chastened, let the human go.  That was pretty funny situation, but one thing is bothering me. By using a Wisdom check against Intimidation (Charisma), my dwarf (who has −1 Wisdom modifier) was at a disadvantage (literally, not in the D&D disadvantage mechanic sense) against the threats. Although he is a strong and capable warrior, he is not that wise.  But I have to wonder: is willpower really represented by Wisdom in 5e? I think that many not-so-wise creatures/characters can stand bravely against threats.  What ability/skill should be used in a contest to resist intimidation?


Prove if $|z| < 1$ and  $ |w| < 1$, then $|1-zw^*| \neq 0$ and $| {{z-w} \over {1-zw^*}}| < 1$Given that $|1-zw^*|^2 - |z-w|^2 = (1-|z|^2)(1-|w|^2)$I think the first part can be proven by saying $|1-zw^*| = 0$ if and only if $zw^*$ = 1.  And given the conditions that cannot be true. However I don't know if this part is right.

This is the question I'm stumbling with:   When $|\alpha| < 1$ and $|\beta| < 1$, show that:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < 1$$    The chapter that contains this question contains (among others) the triangle inequalities:   $$\left||z_1| - |z_2|\right| \le |z_1 + z_2| \le |z_1| + |z_2| $$  I've tried to use the triangle inequalities to increase the dividend and/or decrease the divisor:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < \cfrac{|\alpha| +|\beta|}{\left|1-|\bar{\alpha}\beta|\right|}$$  But it's not clear if or why that would be smaller than one.  I've also tried to multiply the equation by the conjugated divisor $\cfrac{1-\alpha\bar{\beta}}{1-\alpha\bar{\beta}}$, which gives a real divisor, but the equation does not appear solvable.  Any hint would be much appreciated.


I was searching about how SO authenticate and manage users sessions across multiple sites/domain and found this question from 2010:    However, I didn't found anything about it in 2020. Does it still use localStorage and StackAuth iFrame to share login tokens in the actual days?

Update: Universal login is in place and considered "done". If you see anything weird, please submit new bug reports.   As y'all know, our current flavor of "global authentication" leaves a few things to be desired. It's flaky, requires a page refresh, etc. etc. Wouldn't it be nice if you could just sign in once and be automatically logged in across the network?  We are ready to roll out Stage 1 of Project "Make Authentication Suck Less". It is live as of a few minutes ago. What this means right now:  When you log into any Q&A site on the stackexchange.com domain, you will be automatically logged into all other Q&A sites on the stackexchange.com domain + stackexchange.com itself.   is excluded from this.   , , and other Q&A sites with their own domains will still use the old flow.  We are going to recognize you in some ways on sites where you don't have a profile. This is still a work in progress, but most notably you will see "join this community" in the top bar instead of "sign up" and "log in".   But I use multiple accounts! What do? We aren't intending to break the ability to run multiple accounts. The same guidelines as before still apply — we don't officially support that, you might end up with an accidental automatic merge if you're not careful with your credentials, any interaction between the accounts is right out, and so on. If you're already using different browsers or different browser profiles for your accounts, nothing will change for you. If you are somehow logged into multiple accounts in the same browser... I'm sorry to say, but that's a bug even for our current global auth setup. You will now only be able to log into one at a time, and you'll need to log out when you want to switch. (Or start using different browsers.) What's next:  Remember  we tested a few months ago? It's coming back. Stage 2: bring other domains into the fold (this is also live now) Stage 3: make cross-domain experience smoother and support browsers that reject third-party cookies in all conditions (looking at you, Safari) - this is not currently feasible. Safari users and users who reject third-party cookies will need to sign in separately to every second-level domain (e.g. stackexchange.com, stackoverflow.com, etc).  If you see any issues… Good luck, because you probably can't log in to report them here. =) But seriously, let us know via the contact form linked at the bottom of any page. If you are able to log in, report issues here on meta as normal. So, in conclusion…


Prove that $||a|-|b||\leq |a-b|$ for all real numbers  I was thinking divide it into $a\geq b$ and $a<b$, but then I realized I need to include situations when they are greater than zero and less than zero, will that too comlicated? Is there a simpler way to show this?

I've seen the full proof of the Triangle Inequality  \begin{equation*} |x+y|\le|x|+|y|.  \end{equation*} However, I haven't seen the proof of the reverse triangle inequality:  \begin{equation*} ||x|-|y||\le|x-y|. \end{equation*} Would you please prove this using only the Triangle Inequality above?  Thank you very much.


def dinner_completed():         counter=0         if counter==0:             k=False         if counter==1:             k=True         counter+=1         print('counter',counter)         return k      while not dinner_completed():         print('1')  Each time I check the function in a while loop, counter is getting initialized to 0 . I don't want to use global variables and my function have to return False only once and True the rest of times.

What is the idiomatic Python equivalent of this C/C++ code?  void foo() {     static int counter = 0;     counter++;     printf("counter is %d\n", counter); }   specifically, how does one implement the static member at the function level, as opposed to the class level? And does placing the function into a class change anything?


I am facing a problem regarding the datetime manipulation of ISO 8601 format. The problem is that I have a date string like this     string date = "2014-09-05T23:39:57-04:00";    I need to add 2 additional seconds to this date.   But when I tried to convert this string using the DateTime.Parse method for adding 2 seconds, the DateTime.Parse method is changing the date to "9/6/2014 9:09:57 AM". But I need the result like this  string calculateddate = "2014-09-05T23:39:59-04:00";   How to achieve that?  Thanks  Utpal Maity

Given:  DateTime.UtcNow   How do I get a string which represents the same value in an -compliant format?  Note that ISO 8601 defines a number of similar formats. The specific format I am looking for is:  yyyy-MM-ddTHH:mm:ssZ


Which tools SO uses to validate the code?   Is Code Analysis used? Which rules are included?   To validate the code style   Which tool is used? Which rules are included?

What tools and technologies are used to build the Stack Exchange Network?  See also:


This is a post I read about pi while looking for stuff about tau -which is two times as much as pi.    This makes me wonder, why does only pi contain such randomness? Don't other non-repeating and non-terminating numbers (like $sqrt(2)$) also have the same quality? Is this just a silly post that is only being biased towards pi, or is this random behavior only inherent to pi?

Possible Duplicate:          This is not a practical problem. I am asking out of curiosity.  Any links/references are most welcome.  Say, we write the digits of $\pi$ in base $10$.  Does this sequence of digits contain every possible finite length digit sequence?  What about $e$, $\sqrt{2}$ or some other commonly known irrational numbers?  Is this property of numbers independent of base?  If a number has this property when written in base $10$, will it also have it in base $2$, $3$ and all other bases?


Let $A$ be a $227\times227$ matrix with entries in $\mathbb{Z}_{227}$, such that all the eigenvalues are distinct. What is the trace of $A$?

Let $A$ be a $227\times 227$ matrix with entries in $\mathbb{Z}_{227}$ such that all of its eigen values are distinct. What would be its trace? I think it is zero by adding all 227 elements but i am not sure.  Edited: Here I have assumed that eigenvalues are in a base field.


I need to estimate 90th percentile of a normal distribution. Assuming that I have a small sample(<30) of the population of this distribution how can I estimate the 90th percentile? what assumptions can I make regarding the distribution of the sample. I think CLT is not applicable here because I dont want any CI for the mean. Note that the standard deviation of the population is unknown.

Based on a sample $(x_i) \sim_{\text{iid}} {\cal N}(\mu, \sigma^2)$, how can you get an exact or a well-approximated upper tolerance bound (i.e. an upper confidence bound of a quantile of the distribution) of $\dfrac{x_i}{\sigma}$ ? Here, we assume both parameters $\mu$ and $\sigma^2$ are unknown.


Ok. So I've read multiple questions and answers on the progress for this badge and I'm still no wiser.  Repeating     It's simple, isn't it?   Isn't really making it easier to understand.  So I'd like to ask this yet again, in the form of a picture:    What do I need to upvote in order to get this badge.  How many questions do I need to upvote? (I assume zero) How many answers do I need to upvote? Do the answer votes need to be on separate threads?  You may pretend that I'm an idiot, because I am...

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I have a table that has 3 rows per record and a blank row following that. I want to consider those 4 rows as a single row when sorting using the tablesorter plugin. Please help!!!

I have the classical table with expandable and collapsible records that if expanded show several subrecords (as new records in the same parent table, not some child div/child table). I am also using tablesorter and absolutely love it.  The problem is that tablesorter isn't keeping expanded child records next to the parent records. It sorts them as if they were top level. So each time the table gets sorted by a column the child rows end up all over the place and not where I want them.  Does anyone know of a good extension to tablesorter or specific configuration that enables tablesorter to keep child rows grouped together with the parent row even after sorting? Or do I have to give up tablesorter in favor of some other API or start the ugly process of writing my own widget? Should I avoid the css-based approach of hiding individual rows of the table to represent collapse rows?


From the first chapter of The Half-Blood Prince (The Other Minister) the following things are known:   The Ministry finally realized that Voldemort was back. (End of The Order of the Phoenix)    Death Eaters were out in the open wreaking havoc on the Muggle and wizarding world .(Most probably on Voldemort's orders, in order for Voldemort to blackmail Fudge to give him access to the Ministry). Voldemort needed Dumbledore out of the way and had enlisted Draco for the job. Killing Amelia Bones (and maybe killing a few more people).   Apart from this, for the rest of the duration of the book, there is hardly any information about what Voldemort did for an entire year.  I know the book narration is from Harry's point of view but I am curious to know if there is any canon or any other interview/text by JKR where any details of Voldemort's activity during Harry's sixth year has been given?

We have no mention of Voldemort in Harry's sixth year. So, I was wondering- what could Voldemort have been doing?


One quick question. I plan on getting a bank letter for my Canadian visa (Temporary resident visa) application and the question I would like to ask is quite simple.  Can I present a bank Letter in place of my bank statements? which details that I have certain Funds in my bank account? Kindly let me know as soon as possible.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


Is it acceptable to contract the phrase in the subject the way above (at least in a spoken English) without raising eyebrows?

While reading a book, I came across the word I'd've, as in:     I'd've argued against it.   While it was obvious what it meant, it left me puzzled. Is I'd've a proper word?


Which syntax is more correct:     to prefer something over something else   or     to prefer something to something else   or maybe both are correct?

Many say that "prefer X to Y" has a more formal ring to it than "prefer X over Y". Are there any dialects where you wouldn't use "prefer X to Y" in colloquial speech at all? Conversely, are there any manuals of style that discourage using "prefer X over Y" in formal writing?


Currently, when a user rejects and edits a suggested edit, Community♦ rejects it with the following reason:     This edit did not correct critical issues with the post - view the revision history to see what should have been changed.   The problem is that when I reject and edit, I would like to provide more feedback to the editor than just that. Sometimes some edits can be bad for one of the reasons mentioned in the list of reasons for rejecting, and I would therefore like to reject them for one of those reasons, but the original post contains some completely different issues that I would like to correct.  I currently see two solutions to this problem:   Simply reject the edit without editing and then hope that others also reject it and come back when they have done so. The problem is that I'm very likely to have forgotten all about it once this is done. Reject and edit anyway and hope the editor understands why the edit was rejected. This could work if someone else has already rejected the edit, but generally not.   None of these solutions are really good, and when I face this situation, which one of them I choose depends entirely on the circumstances.   is one example of an edit that I rejected and edited but that I would have liked to give a more specific reason for rejecting. That edit formats unformatted code, which is useful, but it also removes a lot of code from a question. The code that it removed may or may not have been useful, but since the edit summary didn't mention anything about the removed code, I thought that it's better to keep useless information than remove useful information, so I rejected it and edited it to format the unformatted code myself. However, I would have preferred to reject it as "clearly conflicts with the author's intent" than "does not correct the critical issues with the post", because it does correct the critical issues with the post, it just causes other issues which may be even worse.  Here is another example of a suggested edit which I have never actually reviewed, but I think it's a good example to illustrate my point.  should clearly be rejected as vandalism. However, I think that the the indentation in the code is completely useless and should be removed (). If I would have got this suggested edit I would have liked to reject and edit with the reason "vandalism", which is currently impossible.  I therefore think that when rejecting and editing, the user who rejects and edits should have a choice of a reason for rejecting it, instead of always having the same reason. These reasons should be the same as those for simply rejecting an edit, possibly changing the formulation a bit or including the reason that's currently always chosen.

Since we are rejecting their edit, we should still be able to add a comment to the reject reason when reviewing a suggested edit as "Reject and Edit".  For example, take  which attempted to add a <!-- language --> comment to the post. He put the comment at the beginning of the post, which means the comment doesn't do anything at all (I tested, it didn't get used). The comment has to be placed directly above the code block it affects.  This means I had to go in and improve the edit just to move it to a different spot. I chose "Reject and Edit" instead of "Improve Edit" because it wasn't helpful. The edit he made was incorrect since it was in the wrong spot. But that suggested edit permalink page only marks it as "Rejected by Community ♦" with the canned reason that the edit didn't correct critical issues with the post. It would be nice to be able to explain to the user that they put the comment in the wrong spot, and how to properly insert language comments. Also, the canned comment wasn't really correct in this case.  Note: I know some people might argue that I should have instead chosen "Improve Edit" since it made me make the correct edit or whatever, but that is a bad argument. You have to remember that choosing that option adds that incorrect revision to the revision history. It's far better off only having the correct revision. Also, the suggester will likely just ignore it, and make incorrect edits of the same type later on.  Also, expanding off a , the reject reason should be listed under my username rather than Community, listing Community as a second reject-user only when another user hasn't rejected the post as well.


I am learning on a PSD file, the final picture like below, I really want to know how to make such a shadow effect.    I hidden all the above layer, and the shadow layer is this:    Does anyone know how to do it?? I have this question for days, I asked in other place, but nobody answer my question.

I want to create a new icon for my application according to the new . Is there any way to get my 2D silhouette and automatically extrude it to create the 3D effect?


I have an Nginx server and a PHP application running in PHP-FPM. The application is restful API. The problem is I get OPTIONS request which the application understands and supports, but the server blocks the request which never gets to the application and just displays HTML 405 Error.  Is there some directive to make Nginx serve OPTIONS the same way it serves other methods?  I found many tutorials to enable a response to OPTIONS directly from the Nginx but it doesn't solve my problem as only the application knows which methods are allowed for the URL.  Or am I missing something?

I have an Nginx server this is returning a 403 when a client uses the HTTP OPTIONS method. It sounds like Nginx does not support the OPTIONS method, but I couldn't find conclusive evidence of this on the Interwebs.  Right now Nginx is running on Centos5. Is it true that Nginx does not support this and is there a module that could be enabled for Nginx to support OPTIONS?  Thanks.


I cant imagine, what philosophers do in 21 centuary. My question is if is any hot topic in philosophy in these days?  Ps. i am so sorry if this tag is not right to my topic, but dont know which is the right one.

I've been reading about a lot of different types of philosophies, religions, ways of thinking etc. I was wondering what are the most recently created philosophical ways of looking at the universe? Where can one find out about new cutting edge ideas?  Example: Before we had Marxism, Communism, Zen, Christianity etc. Now X,Y, and Z have been created building on and evolving the ideas of A,B,C.   Everything I read about are ideas that were created a long time ago. What is new and updated?


I was just now led to , which appeared under "Hot Network Questions". However, it is locked since yesterday. Certainly, questions which are closed or locked should not be advertised as hot questions, so I believe this is a bug.

appeared on the hot network question list for me, even though it was locked 7 hours ago due to off-topic comments.  Questions that have a problem severe enough to warrant a moderation lock shouldn't appear on the hot question list - that'd only add fuel to the fire once they are unlocked. Instead, show it to people for the first time once it's been fixed up.  This is different from  in that that question had a historical question lock, not an off-topic-comments moderation lock.  This is still happening in February 2017, with  appearing on HNQ.


I havve recently set up a website, I've forwarded it to my Ip and I'm able to access it. However I have also bought a domain which I would like to use for my website which I host through my own pc using xampp.  From what I understand I would need to create a dns server, but do still not understand how to do it.  So my question is, How do I point my newly bought domain to my website which is being hosted using xampp?  Thanks

I have a static IP and hosted my site in this.Working fine. But I want to change the URL name (static IP) to a domain name. I have one domain name already registered.  I have http://xx.xx.xx.xx/ but I want to use something like http://www.mydomain.com  How can I achieve this?


Since there are so many classes and methods called from my class method, the debug log generated is very huge and getting truncated. How can i see the full debug log ? Is there a way through which i can set that log contains only those statements where i use System.debug().

I have a massive log file which breaks the 2Meg limit and hence truncates.  There is some information I need that I am logging by doing  System.debug   However, I don't get to see because of the logfile truncation.  I change the logging settings so that everything is logged at ERROR except apex code but this still does not bring logging under 2 Meg.  Any ideas?  Thanks.


Initial state: dual boot laptop to either Windows 7 or Ubuntu.  What I tried to do: change my partition of Ubuntu to Ubuntu-Mate.  First problem: first booting for the installation worked fine, but I didn't create a partition with the free space obtained from the previous one.   What I tried to solve it: I restarted the computer and unplugged the usb in order to create the partition in Windows.  What really happened, and final problem: grub rescue is displayed, no matter what boot source used. (Edit 3: I wanted to gain access to my Windows partition, so that I could rearrange my partitions)  Thank you very much for any suggestion.  Edit: I've tried using a bootable Ubuntu usb to get the Boot-info, but it keeps giving an error: "unknown filesystem".  Edit2: I've tried via Boot-Repair-Disk, but even so it doesn't work, to   check whether the iso is correctly burned, I'll try it in another computer.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


suppose you reading a PDF with document viewer now you want to search a word in PDF you press CTRL + F search your word.the list appear you click on one of them see the passage . So now you want to come back and countinue reading pervios part . Is there any way in document viewer ? If not do you know a PDF reader from repository to do that?

I am satisfied with basic functionality of Evince (3.4.0 on Ubuntu 12.04). Unfortunately in this viewer I am really missing history navigation i.e. possibility to go back to previous views and optionally go forward in the viewing history like most of the web browsers have Alt+← and Alt+→. I think this function is very important when using hyperlinks and searching during browsing.  For Evince I did not find this function on the standard keyboard shortcuts, in the menu, in the documentation.  Does Evince have this function and how can it be used?  Which other PDF viewers maintained for Ubuntu have this function?


In C, is it possible to enter the correct amount of digits entered by user for a double? For instance, say I have the following code in the main body:  double num;  scanf("%lf", &num); // User inputs 3.41  printf("%lf", num); // required to display 3.41 instead of 3.410000   As I mentioned above, is there any way to display no more than the number of digits that the user entered?

I keep stumbling on the format specifiers for the printf() family of functions.  What I want is to be able to print a double (or float) with a maximum given number of digits after the decimal point.  If I use:  printf("%1.3f", 359.01335); printf("%1.3f", 359.00999);   I get  359.013 359.010   Instead of the desired  359.013 359.01   Can anybody help me?


The norm of an element $(\gamma_k)=x \in l^{\infty}$ is defined to be $\sup_k \gamma_k <\infty$. The norm of an element $(\gamma_k)=x \in l^p$ is defined to be $(\sum_k \gamma_k^p)^{1/p} < \infty$, even for $p=1$!   I can't see how $\displaystyle{\lim_{p \to \infty}} (\sum_k \gamma_k^p)^{1/p} = \sup_k \gamma_k$ holds?    And, if they just are separate definitions, then why the case '$p=\infty$' is in the 'category' of $L^p$ spaces?   Added - Understanding answers to  requires a knowledge more than an undergraduate Analysis, i.e. my current level. Simple detailed answers would be much appreciated.

Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$?    I don't know where to start.


I'm working on a camera switching feature. I'm thinking about the arrangement of the label of the button. To me, we can prompt the user to slide right to enable the front camera and in order to enable the back camera, the user will slide left. The reason for my opinion is: We should show the instruction in the button rather than showing the current status. Is there any user research or different thought? Thanks in advance.

I have a quick question about buttons that toggle between two states. (Think Play/Pause, or Shuffle/Regular Play.) As the title says, should the toggle show it's current state or the state to which it will transition?  I think people are used to the Play/Pause convention. But the Shuffle/Regular play might be more confusing if you show the transition state instead of current. For example, the built-in music player on the Xbox 360 does it this way: when it's in shuffle mode, it shows the icon for direct play and vice versa and it always confuses me (am I in shuffle mode or straight play).  I see it this way: Play/Pause is more like action as in begin playing or pause playing. Yes behind the scenes it is a state transition but to the user, there is an action. Whereas Shuffle/Straight Play is an option and it's best to show the current state (and possibly have only one icon and change button to show that the option is enabled/disabled). Thoughts?


Ive recently been looking into bard as a class choice and am confused on a bit about bardic music. It says   "Starting a bardic music effect is a standard action. Some bardic music abilities require concentration, which means the bard must take a standard action each round to maintain the ability. Even while using bardic music that doesn’t require concentration, a bard cannot cast spells, activate magic items by spell completion (such as scrolls), spell trigger (such as wands), or command word. Just as for casting a spell with a verbal component, a deaf bard has a 20% chance to fail when attempting to use bardic music. If he fails, the attempt still counts against his daily limit.   This makes no mention of how using a weapon and playing an instrument interact. and i am curious Can a bard attack with a weapon while he play's bardic music? a Magic item found in the Magic Item Compendium called crystal Echoblade prompted this question. it does extra damage during your bardic music performances which inevitably means one must attack.

If a bard is Performing and he's playing, say, the flute, can he attack during the Performance?  At first, I'd say "no"; how do you swing a sword while playing? But then in  I read:     Maintaining a bardic performance is a free action, and does not interfere with other activities (such as spell casting, moving, attacking, etc.).   How is that?


When speaking of an airline ticket, I have heard the term open ticket which has to do with dates not being fixed I believe.   What exactly is an open ticket? How do you get an actual flight from one? What are typical restrictions?

I’ve been doing some research on traveling to South America and staying for an extended period of time (working vacation). The usual sources for flight info (Kayak, Expedia, Hipmunk) don’t have any info on flights with open return dates.  The other option would be to just buy a one-way ticket, then buy a return flight when I want to leave, but I’ve heard that international flights from South America are quite expensive.  What would be the most cost-effective solution?


This user (who has never upvoted or accepted an answer) has four posts, two with the new-user icon and two without:  Question 1 (2018-08-15), no icon:    Question 2 (2018-08-20) icon:   Question 3 (2018-08-21) icon:   Question 4 (2018-08-24) no icon:   Is this expected?

According to :  The new indicator works by the age of a user's first visible post. This could be a question or answer, and the association bonus won't influence the behavior. While you might not be new to our engine, everyone is new when they first join a new community, so the indicator is shown.   How old does one's first visible post have to be for the indicator to be removed?  Is the indicator status calculated on the fly when loading a post, or is it permanently attached to a post and only removed on later posts?  Finally, what happens if the first visible post gets deleted? Is the calculation still based on that post, or is it based on the next post that continues to be visible? In other words, if I posted a few years ago and later post again, and I delete my post from a few years ago, will the indicator start showing up?


I put an article on the Arxiv, submitted it, it got cited before being accepted, and now is accepted with minor revisions. Some of the minor revisions can be implemented elegantly be referencing the article that cited the preprint version of the article.  Is it oke to do so? Or should this circular referencing be avoided?

I have coauthored two papers, which are strongly related. The younger paper is thus citing the first and the older paper is annoucing the second along the lines of “a study of aspect X will be published elsewhere“. As ArXiv enables you to update your papers, it would be possible to include a citation to the new paper in the old paper after the aforementioned sentence. This might save a reader of the old paper some time with finding the new paper.  However, this breaks some paradigms that were inherently fulfilled by any pre-internet citation, i.e., that you could not cite future work¹ and that there are no loops in citation graphs (i.e., there can be no papers A₁, …, such that A₁ cites A₂, which cites A₃, which cites …, which cites A₁). Thus I find it conceivable that such a citation into the future may cause some problems, for example some weird software behavior (ignoring for the example’s sake that this would arguably be the software’s fault).  Is there any such issue, which would make the aforementioned citation into the future a problem?     ¹ Of course, will be published elswhere existed before, but it could not be accompanied by a regular citation.


Could I predict what frequency of RAM should be knowing frequency of CPU ?

I am seeking advice on which memory to use with my motherboard and CPU. Below are my components and some relevant information extracted from their official websites.   NOTE: Although this is a very specific case, a general answer is equally good for me — and also alot more useful for everyone else!  CPU: AMD Phenom II X4 810   ASUS M4A785TD-V EVO listed as one of many  motherboards.   Motherboard: ASUS M4A785TD-V EVO   4 x DIMM, Max. 16 GB, DDR3 1800(O.C.)*/1600(O.C.)/1333/1066/800 ECC,Non-ECC,Un-buffered Memory Dual Channel memory architecture (Complete list of specs: ).   NOTE II: I wouldn't want to do any overclocking as I have no experience with that. So I think the 1333 MHz is the most appropriate. Since the higher frequencies are marked with "O.C."  Questions:   How can I be certain that a specific RAM will work well (or not work) together with my CPU and motherboard? (The Qualified Vendor List is a good starting point, but it's a bit limited and sometimes a bit outdated). Is it true that choice of memory is not independent of the processor? How?    I'm worried I'll be missing something essential when buying my next RAM chips :)


Let R be a commutative ring with identity.   Prove: every nilpotent is inside every prime ideal.  Don't know what to use with this problem. Any help is usefull :)

If $\mathfrak p \subset R$ is a prime ideal, prove that for every nilpotent $r \in R$ it follows that $r \in \mathfrak p$.   The only hint that my tutor gave me was to use induction. Can someone explain what he means by this?  Thanks for the help!


Why does the work done on a particle is equal to W=F.dx but not W=x.dF ? Where F is the applied force on the particle

I was reading the first law of thermodynamics when it struck me. We haven't been taught differentiation but still, we find it in our chemistry books. Why is small work done always taken as $dW=F \cdot dx$ and not $dW=x \cdot dF$?


iPhone popped the new update ready to install screen and I accidently hit install instead of later as I always do. It's now in the process of installing. How may I revert back to previous 13.2 once installation is complete?

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I have a circuit where I have a capacitor (2F) in series with a resistor (1 Ohm) and a voltage source (v(0) = 10V). Now I am supposed to calculate v(t) for different t, like t=1s, t=2s and so on.   How do I do that? Is there a formula available for this? I need some ratio between the Farad of the Capacitor and the time it takes for it to load i guess...

For the circuit shown below what is the time it takes for Vc to rise from 0 V to 5 V in (second). Assume Vc(0+) = 0 V    The answer is \$ t = 2\ln{2}\$, but I am unsure why. What I have so far:  $$ V(t) = [V(\infty) + V(0)]e^{-t/T} \qquad \text{where $\;T = RC$}$$ R = 2e3 and C = 1e-3 , so T = 2  $$ V(t) = [V(\infty) + V(0)]e^{-t/2}$$  at t= infinite, the capacitor acts like a broken circuit so V(inf) = 0 but the problem also states that V(0) = 0 so that would set whole thing to 0   Am I doing something wrong, or am I even on the right track here?


I'm configuring a vps to be used as webserver, and everything is going well, but now I am coming to the point of DNS. The VPS has two working IP Addresses assigned to it.  Now I need to get a primary DNS running on one, and a secondary DNS on the other IP Address (I know it is better and safer to run it on two different machines, but that I don't have).  I can find loads and loads of articles on the iNet on how to configure one DNS on one machine, or two on two different machines, but nothing about how to configure two dns'es on one single machine. Anyone who can help me? I'm using Centos 6.3

I'm very confused.  I basically understand how DNS works. Here's an example that helps illustrate what I'm having trouble understanding.  Right now, I run a small web-server. I use my provider's DNS manager, so I don't have a DNS server hosted on the machine.  Let's say for a second, that I don't use my host's DNS, and I decide to set up a DNS server on my server. Hypothetical scenario: my server (entire) server goes down - DNS included. Why do I need backup DNS? If the server is down, who cares if the DNS server is down too, considering that even if I had DNS up (it wasn't on the crashed server), it wouldn't be able to forward requests anyway since the server would be down?  Is the point of having secondary DNS, to be able to change the IP addresses that your DNS server points to, so if your webserver was down, you could redirect traffic to a backup? How would you switch to the secondary provider, in the event that your main DNS provider becomes unavailable? Is a backup DNS system basically up all the time? How is it configured? Is it just an exact clone of the DNS server you would have on your server? Do they run simultaneously?  Hopefully someone can see what I'm hung up on, and provide some guidance.


A friend had this sticker placed on his passport by a security officer at Schiphol airport. It was while waiting at the gate, after what seemed like an almost informal chat (but yet he was pulled out of line by the officer), prior to boarding a flight to NYC.  What is the meaning of this sticker, and can it be removed now (this happened more than a year ago)?

I am currently travelling in the USA and when checking in on the boarding flight to enter the country, the security personnel attached a small yellow-white sticker to my passport (see a somewhat terrible photo below):    This happened on Stockholm Arlanda (ARN) when I was waiting in queue for check in, and by one of the security personnel that inquired about my business in USA.  Does this have any special meaning? Why would they do it anyway? Can I take it away before I leave the country, or should it stay on?


There's a question over on AskUbuntu... you know the one.  Its a hot question. It also happens to be mod locked (not closed).  This means no new answers, no new comments, and no new votes.  Because of the excessive immaturity of users commenting on the question over there (and given the comments I saw that are likely deleted - from over here rather than there) and the... lets just say "provocatively phrased title" (which isn't at issue here - I have opinions about it though if you want to read about that elsewhere) it is locked.  And that is the issue - it is locked.  There is no interaction that anyone can have with the post from HNQ.  So remove it from the HNQ pool.  There is no reason for a locked post to ever be in HNQ because of the lack of interaction that people can have with it. Protection says "no newbies".  A locked post says "everyone, just go away."  Please let that message apply to the HNQ pool.  And please, it is the very last thing I want showing up in a other community advertised post in a big box for my manager to see on the side of my browser.

appeared on the hot network question list for me, even though it was locked 7 hours ago due to off-topic comments.  Questions that have a problem severe enough to warrant a moderation lock shouldn't appear on the hot question list - that'd only add fuel to the fire once they are unlocked. Instead, show it to people for the first time once it's been fixed up.  This is different from  in that that question had a historical question lock, not an off-topic-comments moderation lock.  This is still happening in February 2017, with  appearing on HNQ.


I know this is a series of an arithmetic and geometric progression product which looks like  $$\sum\limits_{n=0}^{\infty} (2n+1) \left(\frac{1}{2}\right)^n$$  but I don't know how to calculate the sum. Any help would be appreciated!

I'm trying to find the infinite sum that is defined by:  $$ 3 \cdot \frac{9}{11} + 4 \cdot \left(\frac{9}{11}\right)^2 + 5 \cdot \left(\frac{9}{11}\right)^3 + \cdots $$  However, I do not know of any known formula to do this. Am I missing something really simple? Thanks!


I was trying to run chmod on some files and accidentally specified the wrong directory. Now, sudo doesn't work, and I rebooted. I can log in, but I can't do anything as root. How can I fix this?  This is different than  as this describes what to do if you can't boot your system. It also addresses problems that may be encountered if you ran chmod on another directory or just accidentally specified /, like I did. It also explains how to fix sudo when/if it gets broken.

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


are there two non-zero functions $f, g$ in $L^1(\mathbb{R})$ such that $f\ast g=0$ a.e?

Assume that the functions $f,g: \mathbb{R}\rightarrow \mathbb{R}$ are integrable and equal to zero on $(-\infty,0)$, (i.e $f,g \in L^+$). Then by Titchmarsh's theorem:  $f*g$ is zero almost everywhere iff $f$ or $g$ is zero almost everywhere.  Hence the Banach subalgebra $L^+$ of $L^1(\mathbb{R})$ has no zero divisors.  Is the same true for arbitrary integrable $f$ and $g$ on $\mathbb{R}$ ?


Let $D=\{z\in \Bbb C:|z|<1\}$.   Show that there exists a holomorphic function $f:D\to D$ such that    $f(\frac{3}{4})=-\frac{3}{4}$ and $f^{'}{(\frac{3}{4})}=-\frac{3}{4}$   Show that there exists no holomorphic function $f:D\to D$ such that    $f(\frac{1}{2})=-\frac{1}{2}$ and $f^{'}{(\frac{1}{4})}=1$   By Schwartz Lemma we can at best say that $|f^{'}(z)|\le \dfrac{1-|f(z)|^2}{1-|z|^2}$  If I substitute the values of the two given problems in the equation then I can say that $|f^{'}(z)|\le 1$ which is satisfied in every case.  How can I show existence/non-existence in two cases of the problem? Please help.

Let, $D=\{z\in \mathbb C:|z|<1\}$. Which are correct?   there exists a holomorphic function $f:D \to D$ with $f(0)=0$ & $f'(0)=2$. there exists a holomorphic function $f:D \to D$ with $f\left(\dfrac{3}{4}\right)=\dfrac{3}{4}$ & $f'\left(\dfrac{2}{3}\right)=\dfrac{3}{4}$. there exists a holomorphic function $f:D \to D$ with $f\left(\dfrac{3}{4}\right)=-\dfrac{3}{4}$ & $f'\left(\dfrac{3}{4}\right)=-\dfrac{3}{4}$ there exists a holomorphic function $f:D \to D$ with $f\left(\dfrac{1}{2}\right)=-\dfrac{1}{2}$ & $f'\left(\dfrac{1}{4}\right)=1$.   With the help of Schwarz lemma & its applications, we find that $(1)$ is false & $(3)$ is true.  But, I can not think about options $(2)$ & $(4)$.


on Intel's website says that the "T" suffix represents a "Power-optimized lifestyle", which, as far as I understand, means better power efficiency, but doesn't say anything about the "E" suffix (except for the older Core 2 processors, where it seems to have a similar meaning to the current generation "T").  The i3-6100T and i3-6100E also exist, both with a TDP of 35W, just like the i3-6100TE. The main differences i can see while  on Intel's website are that the two processors with the "E" have:   a lower clock speed (2.7 GHz vs 3.2 GHz) something called "Embedded options available" (maybe this is it?)   So does anybody know what the "E" means?

I just bought a Core i7 second generation machine which shows the processor in the BIOS as:     Intel Core i7-2620M CPU @ 2.70Ghz   I have seen i7 3rd and 4th generation processors on Google but I don't understand the suffix (i.e. what is meant by M). I have also seen other processors with suffixes like MQ* and **QX.  What do these suffixes mean?


I am designing a staff data manager which will allow the users to add, edit and view the staff details.  In the code I  have a JFormattedTextField defined as follows.   SimpleDateFormat dateDOB = new SimpleDateFormat("dd/MM/yyyy");  JFormattedTextField DOBBX = new JFormattedTextField(dateDOB);   When I want to edit the staff data, I load the date to the JFormattedTextField as follows:  DOBBX.setText(""+retrievedStaff.getDOB());   After editing if I save the data, the value for DOB is null and I get a java.lang.NullPointerException. This only happens if I leave the value for DOB unedited. If I make changes to DOB or enter it again then DOB value is correctly saved.  Also if I add a new staff and then try to edit the staff data without closing the program, the date is properly saved to the binary file with no nullpointer error.  How do I fix this?   (I have no idea how to provide an MCVE for this as my code is quite long and consists of many classes)  Before saving the date to binary file I use the following method to convert it to a string:  public String getDOB() {     SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");     try{     String textDate = df.format((DOB));     return textDate;     }catch(Exception e){e.printStackTrace();}     return null;  }   In the StackTrace it is mentioned that the error is produced by this part of the code:  String textDate = df.format((DOB));

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


first of, my search skills may be not as good as I hoped, so maybe this kind of question exists already. If so please tell me..  See this code below:  new BigDecimal("5").add(new BigDecimal("7"));   vs  new BigDecimal("5").add(new BigDecimal("7"), mathContext);   In which situations would I really need a mathcontext (except divisions)?  I never use a mathcontext unless I divide something. As far as I know this always worked, so what may be the drawbacks here? Do I need a mathcontext on add, subtract and multiply? I'm not so good into the BigDecimal, I simply want to use it to not lose any information like when using doubles. As I sometimes see code with mathcontext on adding something, I'm too afraid to just remove it only because it's my opinion that it is useless...    I read that  but didn't really find a proper answer to my specific question... I begin with BigDecimals without mathcontext and then calculate with them. So my question is, will I ever have drawbacks with this regarding information loss / precision etc? Or will this simply lead to maximum information and that's it?  Edit: I don't want to round, never. In cases of a division like 1/3 I would have to, of course, but in the cases of add, multiply and subtract I don't want any rounding. Do I then need a mathcontext in any circumstance?

Recently I tried understanding the use of java.math.MathContext but failed to understand properly. Is it used for rounding in java.math.BigDecimal. If yes why does not it round the decimal digits but even mantissa part.  From API docs, I came to know that it follows the standard specified in ANSI X3.274-1996 and ANSI X3.274-1996/AM 1-2000 specifications but I did not get them to read online.  Please let me know if you have any idea on this.


What's a good one-liner to generate an easily memorable password, like xkcd's correct horse battery staple or a Bitcoin seed?  EDIT 1:  This is not the same as  since random strings are not at all memorable. Compare to the ...

For start, we know how can we output random lines from a txt file:   perl -MList::Util -e 'print List::Util::shuffle <>' words.txt   But we need a general solution (perl is usually installed on every unix-like OS) to output 4 random words from a txt file, how can we do it?    $ cat words.txt ... alpha beta gamma delta epsilon ... $   The "..." represents many other words.   Example output (without newline between them, but one unix newline is needed at the end, spaces should separate them):  $ perl SOMEMAGIC words.txt gamma alpha delta beta $   Using only perl, the shortest possible solution (oneliner).   It will be used as human memorable password generator:    Since afaik perl is enough good to be named "random generator".   Example common english wordlist with 32768 unique lines:


public class SubiectLicentaTrei {     public static void main(String args[]) {         double d = 12.34;         ScadeUnitate su = new ScadeUnitate();         su.scadeUnitate(d);         System.out.println(d);     } }  class ScadeUnitate {     public void scadeUnitate(double d) {         d = d - 1.0;     } }   Outputs 12.34 when I expect 11.34.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


We would like to change the following URLs as follows: (old versions to the left, being changed to new versions on the right)   www.ex.com/xxx/full-seo-term -> www.ex.com/half-seo-term1/half-seo-term2 - leaving out random keywords and instead only having seo phrases www.ex.com/seo-word/seo-word -> www.ex.com/seo-phrase/seo-phrase/ Replacing seo words with seo phrases at all levels www.ex.com/seo-word/seo-word/seo-phrase/ -> www.ex.com/seo-phrase/seo-phrase reducing number of levels in site structure and keeping seo phrases early www.ex.com/* having the full website in only one level below the domain

Let’s take an example of a movie site. So a well structured set of URLs for this site can be:     Movie page - example.com/movies/the-matrix Review for movie - example.com/movies/the-matrix/reviews Trailers for movie - example.com/movies/the-matrix/trailers Specific trailer for movie - example.com/movies/the-matrix/trailers/trailer1   where it’s possible to navigate the resource even by directly deleting/appending resource name seamlessly.  For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query "the matrix trailer"    example.com/movies/the-matrix/trailers example.org/trailers/the-matrix/    `     Google might prefer the second URL as it has the keyword "trailer" at first level comparing to first URL which has "trailer" at 3rd level (a resource deeper in URL hierarchy may be less important).    If it is correct, one may be tempted to create URL hierarchy somewhat like      Movie page - example.com/movies/the-matrix Review for movie - example.com/reviews/the-matrix/ Trailers for movie - example.com/trailers/the-matrix/ Specific trailer for movie - example.com/trailers/the-matrix/trailer1     which will break the seamless hierarchy.    My questions are:   Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?   Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization?


I have a game and my tilesheets are placed in the images/ folder.  If a user edits the tilesets, they can make them transparent (I use white as my transparent color on them) and in game basically remove all obstacles and stroll to the level exit.  What's the common or most sensible way of sorting out so the user can't tamper with them?  EDIT: I've already encrypted the file, if the user replaces the file with anything else with the same name it still attempts to load it and place transparent tiles, allowing the user to exit unhindered.

What options are there for saving game data in a secure manner? I'm interested in solutions specifically tailored for C++.   I'm looking for something that is fast and easy to use. I'm only concerned about storing simple information such as   Which levels are and are not unlocked The user's score for each level   I'm curious again to know what's out there to use, any good libraries to use that give me nice, secure game data files that the average player can't mess with.   I just found  here which looks very nice, but it would be great to get some opinions on potential other libraries/options out there.


I am working on laying out video stills in a book. I am pretty new to using the command line and discovered ffmpeg just yesterday.  Right now, I want to extract 8fps from a video between, for example, 00:05:30 and 00:42:30. This is what I have written. I am not sure how to include the out point or if I am using the right option to begin with (-ss).   ffmpeg -ss 00:05:30 -i video.mp4 -vf fps=8 out%05d.png   As another approach, I know this segment is 37 seconds. So:  ffmpeg -ss 00:05:30 -i video.mp4 -t 00:00:37 -vf fps=8/16 out%05d.png  I am also wondering if -ss has to be specified before the input or if it can be placed after. I guess I'm confused about syntax. Could it be ffmpeg -i video.mp4 -ss 00:05:30 ... as well? It seems to be running, but slower.

I have a video file of 30 minutes, but I want to extract a video from 00:09:23 to 00:25:33.   I can define the startposition with -ss, but I couldn't find one for the end position. Any help please?


What do we call the person who comes back with clever replies when someone insults them?  Also what is this ability (personality trait) to cleverly thrash rivals on-the-spot called?     Example:      Person A: "I can't bear fools."      Person B: "Apparently, your mother could..."   What should I call Person B in this?  What is the personality trait he possesses that made him comeback so cleverly against the insult?

What is a word to describe "people who can very quickly think what to say". I mean like funny people who have great timing. Is there one exact word for that ability. Not "smart", "canny", "savvy" or "shrewd". Thank you.


Show that any number of partitions of 2r + k into r + k parts is the same for any k using ferrers diagram.  Already tried to do by checking transpose etc. but cannot come up with a solution.

Show that any number of partitions of $2r + k$ into $r + k$ parts is the same for any $k$.   I've tried this, but I haven't come up with anything; hence why I have nothing written here. But in any case, any sort of help is appreciated.


I have a string (essentially an abbreviation - e.g. USA, with all letters in capitals) and a list of texts. I want to select those texts containing all the letters in the string (case-sensitive match). For example,  string = "USA"  texts = ["United States of America", "United States", "United States of America and Iraq"]  #Result shoud be:  results = ["United States of America", "United States of America and Iraq"]   I have tried with (?=U)(?=S)(?=A) (which is what the answers to the duplicate question suggests) but this doesn't seem to work as the regex expects the letters to be occurring in exact sequence. Also, I do not want to check small letters and spaces following each of the Capitals i.e., [?=U]([a-zA-Z]*[\s]+)*[?=S]([a-zA-Z]*[\s]+)*[?=A][a-zA-Z]* as these would be simply redundant (while not working perfectly).  What I am looking is to try with an expression equivalent to [USA] - which instead performs an OR operation to select texts containing at least one letter of the string. Is there any expression as elegant to carry out an 'AND' operation in regex?

Obviously, you can use the | (pipe?) to represent OR, but is there a way to represent AND as well?  Specifically, I'd like to match paragraphs of text that contain ALL of a certain phrase, but in no particular order.


I want to write a matrix having 20x20 dimension. But in latex (using the package amsmath) number of columns is limited to 10. Please solve my problem.

I'm using bmatrix environment from the amsmath package, and I'm trying to do something like this:  \documentclass{article} \usepackage{amsmath}   \begin{document}      \begin{equation}          \begin{bmatrix}              1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\\          \end{bmatrix}     \end{equation}  \end{document}   However, pdfLaTeX returns an error: "Extra alignment tab has been changed to \cr", and in the output the extra element is moved to the next row. (If I remove one element, then it works perfectly fine). I guess this means that I've hit some hard limit on the number of tab stops in a matrix. Is there a way to change this?  The elements in the matrix are short and could fit perfectly on a single row.


I have created a list as following:  possible_team = [(t, h, dps1, dps2, dps3)                  for t in all_T                  for h in all_H                 for dps1 in all_DPS                 for dps2 in all_DPS                 for dps3 in all_DPS]   But if there are more elements in the list, such as 2t, 6h and 17dps, how can I avoid to write all the element names? such as:  possible_team = [(t1, t2, h1, h2, ... h5, dps1, dps2, dps3 ... dps17)                  for t1 in all_T                 for t2 in all_T                 ...                 for dps1 in all_DPS                 for dps2 in all_DPS                 ...                 for dps17 in all_DPS]   I have tried to write the keys as (t)*2, (h)*5 and (dps)*17:  possible_team = [([t] * 2, [h] * 5, [dps] * 17)              for t in all_T              for h in all_H             for dps in all_DPS]   but they are returned with duplicate values, and each in a list.  Is there any simple method to get a list as [t1, t2, h1, h2, ... h5, dps1, dps2, ... dps17], with each element in a single loop?

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I searched a couple of times today for an answer and received 0 results. I then asked a question, and was immediately downvoted due to it being a duplicate question. And it was almost a word-for-word duplicate. The weird part was that the search I did was almost word for word the title of the question that almost existed. So, I tried a couple more searches and received some interesting results.   I have included the 3 searches I performed to demonstrate what seems to me to be a faulty search. The first 2 searched returned 0 results, even though the second search was almost word-for-word; and the third had the answer I was looking for as the first answer.  Is this the expected search behavior?

I tried to find a related question here, but was unsuccessful.  Someone on SO asked ... I tried searching SO and was presented with the search options page. Even Google fails at this search.  So my question is, is there some way to search for an exact word (in quotes) that won't cause it to fail?


I have a method which returns [2] array, each value returned are doubles:  public class additions; {      public double [] Number ()     double [] z;     z = new double [2]      z[0]= 12+5;     z[1]= 58-8;      return z;// I would assumed values returned are stored in "Number"; }   Then in the main class, I have        additions  calculus_1 = new additions();      System.out.print(Arrays.deepToString());//neither of them seems to be working      System.out.print([0].Stringform());      System.out.print(calculus_1.Number());   I am unable to print the answer, Can you use a loop? where should I printing out the answer in the main class?  I am looking for a dynamic since I would be changing the calculation for Z.

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I have a list that I want to give a metal/metallic background for each item in the list using DOM manipulation.  List using Bootstrap 4

Item 1

Item 2

Item 3

Item 4

   This is my attempt to style the background of the class.   var backGroundMetallic = document.getElementsByClassName("list-group");  for(var i = 0; i < backGroundMetallic.length; i++) {   backGroundMetallic[i].style.backgroundColor = '#7fffd4'; }   I'm only able to put use one CSS color. Is there a way to reference a CSS class so I can use more than one style in order to style the background for the list to achieve making it metal/metallic?

I have an element that already has a class: <div class="someclass">     <img ... id="image1" name="image1" /> </div>  Now, I want to create a JavaScript function that will add a class to the div (not replace, but add). How can I do that?


Is it possible to classify those groups whose order is $n^2$ for some natural number $n$ but which do not have any subgroups of order $n$?  To be a bit more specific (in case a full classification is not known): Will a solvable group of order $n^2$ always have a subgroup of order $n$?  In fact, I have not been able to find any examples at all of such groups (obviously, the order would have to be fairly large).  My motivation for asking is that in my question  it turned out that having a subgroup of order $n$ is sufficient for being able to arrange the composition table to form a sudoku, but it seems unknown if this condition is necessary, and a natural starting point for determining if it is would be to look at examples.

For which $n$ is there a group of order $n^2$ without a subgroup of order $n$.  Such groups can not be nilpotent.   This question is related to .


I have a question about performing stepwise regression. I realize that there are issues with using stepwise methods, but I have about 30 or so predictors and have constructed an lm object.  m1 <- lm(LEADSforester ~ . , data=dat) m2 <- lm(LEADSforester ~ 1 , data=dat) step(m1, m2, direction = "backward")   However, when I run the following line of code, I get an error message.  backBIC <- step(m1, direction="backward", data=dat)  Error in step(m1, direction = "backward") :    AIC is -infinity for this model, so 'step' cannot proceed   The same problem occurs when I run the following:  m1 = lm(LEADS ~ ED + Fa + Pu + New + Gr + Vol + Dur + Boun + Visit + views + Nw +                  Uniq + sits, data=dat) step(m1, direction="backward")  Error in step(m1, direction = "backward") :    AIC is -infinity for this model, so 'step' cannot proceed   What am I doing wrong?

I am trying to perform stepwise regression for variable selection in R.  In matlab, the stepwisefit function is able to work in n < p problems. Trying to use step() for such problems i get the error message AIC is -infinity for this model, so 'step' cannot proceed. Is there a way to modify parameters so i can use step function?


I accidentally posted a question in the wrong site. I tried to delete from iPhone app, but I can not find the way.

I had posted a question on this site; someone pointed out that there was a valid duplicate, so I tried to delete it on the new iPhone app.  It appears that this is not an option: there is a little clicky-button on the bottom right of the question with the following options:   Open in Safari Favorite Share Edit Flag Close   I was able to delete the question on this site - but the option appears to be missing in the app?  I would like to request this as a feature.


What is the easiest way to extract just the value set in a XML file? For example the data in the XML file is   <node name="host">   <map>     <entry key="cipher_strength" value="low" />     <entry key="port" value="78234" />     <entry key="over_ssl" value="false" />     <entry key="using_fips" value="true" />     <entry key="ssl_keystore" value="lib/ssl" />   </map> </node>   I just want to display low from the script.  Here is the sed command i am using that does return the full string  sed -n '/cipher_strength/{s/.*<cipher_strength>//;s/<\/cipher_strength.*Value=""//;p;}' test.xml   Following on from a comment, I can't use xmlstarlet as this is not available on my version of suse and is locked down by the vendor so unable to install.

I'm in the process of retreiving some data from a xml file, it is actually a SSIS package file (dtsx).  I've read about using xmllint, however I'm having a hard time retrieving what I want.  I'd like to ask some helps from folks here.  This is what my xml looks like:  <?xml version="1.0"?> <DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts"   DTS:refId="Package"   DTS:CreationDate="7/22/2019 4:18:27 PM"   DTS:CreationName="Microsoft.Package"   DTS:CreatorComputerName="ADMIN-8DF005D47"   DTS:CreatorName="ADMIN-8DF005D47\Administrator"   DTS:DTSID="{8CCA1D42-642A-4932-AAEC-E02175A4B2DB}"   DTS:ExecutableType="Microsoft.Package"   DTS:LastModifiedProductVersion="15.0.2000.68"   DTS:LocaleID="1033"   DTS:ObjectName="HardestNestedWorkflow2"   DTS:PackageType="5"   DTS:VersionBuild="12"   DTS:VersionGUID="{FDD9B190-1A03-4A19-8794-FA86F4F46A93}">   <DTS:Property     DTS:Name="PackageFormatVersion">8</DTS:Property>   <DTS:ConnectionManagers>     <DTS:ConnectionManager       DTS:refId="Package.ConnectionManagers[ADMIN-8DF005D47.AdventureWorks]"       DTS:CreationName="OLEDB"       DTS:DTSID="{A32A68DF-3D53-4057-AF80-1B8D524F82BC}"       DTS:ObjectName="ADMIN-8DF005D47.AdventureWorks">       <DTS:ObjectData>         <DTS:ConnectionManager           DTS:ConnectionString="Data Source=ADMIN-8DF005D47;Initial Catalog=AdventureWorks;Provider=SQLNCLI11;Integrated Security=SSPI;Application Name=SSIS-HardestNestedWorkflow2-{A32A68DF-3D53-4057-AF80-1B8D524F82BC}ADMIN-8DF005D47.AdventureWorks;Auto Translate=False;" />       </DTS:ObjectData>      <!--snipped-->      </DTS:ConnectionManager>   </DTS:ConnectionManagers> </DTS:Executable>   I'm looking to get the value "8" out of this line  <DTS:Property     DTS:Name="PackageFormatVersion">8</DTS:Property>   so, what I did was to issue a command  xmllint --xpath "//*[local-name()='Executable']/*[local-ame()='Property']/text()" HardestNestedWorkflow2_latest.xml   .. and it was good, I was able to extract the value "8"  Now, I wanted to extract the value   Data Source=ADMIN-8DF005D47;Initial Catalog=AdventureWorks;Provider=SQLNCLI11;Integrated Security=SSPI;Application Name=SSIS-HardestNestedWorkflow2-{A32A68DF-3D53-4057-AF80-1B8D524F82BC}ADMIN-8DF005D47.AdventureWorks;Auto Translate=False;   I issued this statement  xmllint --xpath "//*[local-name()='Executable']/*[local-name()='ConnectionManagers']/*[local-name()='ConnectionManager']/*[local-name()='ObjectData']/*[local-name()='ConnectionManager']" HardestNestedWorkflow2_latest.xml   and it returned this   <DTS:ConnectionManager DTS:ConnectionString="Data Source=ADMIN-8DF005D47;Initial Catalog=AdventureWorks;Provider=SQLNCLI11;Integrated Security=SSPI;Application Name=SSIS-HardestNestedWorkflow2-{A32A68DF-3D53-4057-AF80-1B8D524F82BC}ADMIN-8DF005D47.AdventureWorks;Auto Translate=False;"/>   how can I omit the tags DTS:ConnectionManager DTS:ConnectionString?  I'm sorry I'm not much knowledgeable on using xmllint.  Thanks in Advance


I have a binary dataset and I want to build a classifier. I understand that to monitor performance I need to split to training/test set and report accuracy or any other metrics that interest me on the test set. Now, I have a new example for which I do not know the label and I want to predict it using my classifier.  My question is: should I use the classifier that I built using the training set only or merge both training and test set, build a classifier based on all available data and then predict my new example while still reporting the accuracy based only on a the test set?

TL:DR: Is it ever a good idea to train an ML model on all the data available before shipping it to production? Put another way, is it ever ok to train on all data available and not check if the model overfits, or get a final read of the expected performance of the model?    Say I have a family of models parametrized by $\alpha$. I can do a search (e.g. a grid search) on $\alpha$ by, for example, running k-fold cross-validation for each candidate.   The point of using cross-validation for choosing $\alpha$ is that I can check if a learned model $\beta_i$ for that particular $\alpha_i$ had e.g. overfit, by testing it on the "unseen data" in each CV iteration (a validation set). After iterating through all $\alpha_i$'s, I could then choose a model $\beta_{\alpha^*}$ learned for the parameters $\alpha^*$ that seemed to do best on the grid search, e.g. on average across all folds.  Now, say that after model selection I would like to use all the the data that I have available in an attempt to ship the best possible model in production.  For this, I could use the parameters $\alpha^*$ that I chose via grid search with cross-validation, and then, after training the model on the full ($F$) dataset, I would a get a single new learned model $\beta^{F}_{\alpha^*}$   The problem is that, if I use my entire dataset for training,  I can't reliably check if this new learned model $\beta^{F}_{\alpha^*}$ overfits or how it may perform on unseen data. So is this at all good practice? What is a good way to think about this problem?


I was trying to add a few decimal points initialized as variables and the output of the number was extremely long:   var a = .1 ; var b = .2 ; var c = a + b ; document.write(c) ;   The c variable returns a number of 0.30000000000000004, Ive searched high and wide and can't find an explanation why some floats return perfectly rounded answers and some dont.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I upgraded to the RC some time ago and the sources.list is sort of screwed up, meaning I'm getting a lot of 404's when updating. Could someone please post an original sources.list for Maverick?

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I have the feeling I am missing something obvious, but if I knew I wouldn't be asking ... every time I create a new browser window in Firefox on Ubuntu 20.04, the window size of the new window fills the entire screen. On a 4K monitor, that's a bit excessive for a web browser window. How do I set the default size of new browser windows to be something smaller?

Each time I open any application, it zooms to fill-up the entire desktop and so I am always forced to use "Unmaximize" using Alt+Space menu.


I can't seem to install steam. Everything in the Software Center seems to run smoothly, but then this happens. (Excuse my possibly obvious question, I installed Ubuntu about 30 minutes ago with not much prior knowledge :/) Terminal opens up asking for my password (below)  Steam needs to install these additional packages:  libgl1-mesa-dri:i386, libgl1-mesa-glx:i386, libc6:i386 [sudo] password for pixelspark:   When I put in my password, this happens:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-    0ubuntu0.6) unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is  not going to be installed                     Depends: libcheese7 (>= 3.0.1) but it is not going  to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be    caused by held packages. Press return to continue:   Then I press enter, which makes an error message pop up saying that I don't have libc.so.6 and Steam may not run. When I click OK, the message goes away and nothing else happens. Any help?  (again, excuse my foolishness and possibly obvious question)

I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.  Could not calculate the upgrade  An unresolvable problem occurred while calculating the upgrade.  Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'


I have seen users comment that there is a 24h time limit before accepting answers. But I asked a question on Stack Overflow which was answered within 2 minutes. I tried out the answer and it worked. So I accepted it and upvoted it after another 2 minutes.  How come it was possible for me to accept within a few minutes and the other user not? Is there a privilege awarded for that? Any rate limiting?

What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the .


public partial class MainForm : Form {     public MainForm(string Username)     {         InitializeComponent();     }   Hey I tried to pass data from form1 to Mainform and all the time that show me this error     There is no argument given that corresponds to the required formal   parameter 'Username' of 'MainForm.MainForm(string)'

How do I pass a value from a child back to the parent form? I have a string that I would like to pass back to the parent.  I launched the child using:  FormOptions formOptions = new FormOptions(); formOptions.ShowDialog();


I have installed a windows 8/ubuntu 13.04 dual boot. Grub2 seems to have been installed allright and I can boot windows 8 from it without a problem. Ubuntu booted allright the first time (right after the installer's reboot). However, whenever I try to boot it again, it just hangs at a blank purple screen. No ubuntu splash with changing dots under it. I tried ctra+slt+f1, nothing happens. I tried leaving it for a while, nothing changes. No hdd activity either.   Any idea what it might be? I read that it could be nvidia drivers (I have an nvidia 740m), but the funny thing is that it did boot and work the first time after install, and seems to have stopped after that. If it were a driver issue, shouldn't it have failed every time I reboot it? Also the first time it (successfully) booted, I seem to remember a type of nouveau DMS pointer error/printout on boot, but it booted fine after that.  Any help is much appreciated.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents: