Stack Exchange Sites: Saturday question cleanup?

I'm trying to track total question counts on a few Stack Exchange sites via the API and it seems that a bulk of questions are deleted on Saturdays. The chart below shows daily question count on StackOverflow. On Saturdays, the total number of questions goes down by approx. 5000 questions. Which questions are being deleted? Is this new spam questions that accumulated over a week or is it old questions which beyond retention filter, e.g. no votes/no views/older than 5 years? Update 1 Here's the query that counts total number of old and unpopular questions: . On Thursday it was just over 4K for StackOverflow which matches the observed drops on Saturday.


What are possible side effects of "Compile all classes" in production?

When I validate a change set with RunLocalTests in production (as well as using the CLI with that flag for CI/CD and packaging integration) there was a class that was erroring out as a dependency. I've deleted the class from production since it was no longer needed. Using workbench was easy to delete the class. Now I'm still getting the same error with RunLocalTests  Dependent class is invalid and needs recompilation  I think the solution is to use Compile all classes in production but I'm afraid of causing working classes to fail. Would you please let me know what are potential issues if use this method of recompiling all classes in prod?


How do I favorite a question in Android app

I have not found a way to tag a question as a favourite one. It could be very useful to have this feature. How can I do so?


Basically, piping a command or block of text to something like: tail -n 3 (for example), will print only the last three lines to stdout. Is there an equivalent, or similar method for doing the exact inverse of that? So that, in this example, it would print all but the last three lines to stdout.


How did the Symmetric group and Alternating group come to be named as such?

The Dihedral group makes sense, "Di" means two, and "hedral" means.. shape I think (I've just realised how much of what I think words mean are guesses based on experience) like a "polygon" is a 2d shape, a "polyhedron" I've always thought is just "any shape" (example 3 dimensions). So "Dihedral" means 2 dimensions, which it is. (Octagon and cube have different ... reflection+rotation groups (I hope))   The symmetric group has nothing to do with symmetries of shapes, it instead is the group of all bijections from one set to another. I suppose this means symmetry as in "abc->acb" has the "symmetric" version "$abc\to bac$".  Now the alternating group... I have no idea.   Now I discovered these in "Algebra" and "Abstract Algebra" but I've peeked at the contents page of the Combinatorics book I am reading and the symmetric is discussed there, this makes a lot of sense really, combinatorics seems to be the study of finite functions and seems to be easier than functions on the reals and stuff (which felt odd as I was sketching $x^3$ before I was considering "discreet" functions, but if anything they're easier)  So I guess that they were named because Combinatorics got there first. How? What (general case) question was being faced that lead to the solution being called "The symmetric group" (or even set, I doubt combinatorics would care that it is a group).  Sometimes how and why are similar, like turning points, "how did we decide to call $\frac{dy}{dx}=0$ a turning point" and "why" are identical. However there may be many "whys" with these groups as they apply in many areas, there can be only one how. Where the term first cropped up would be a good starting point, but I've yet to find anything.  I'll answer this myself if my searching yields anything.


Let  $\sigma\in S_n$ . Describe the centralizer of $\sigma$.  Thought: If I conjugate $\sigma$, then $\tau^{-1}\sigma\tau=\sigma.$ This means that $\tau$ is a power of $\sigma,$ and $<\sigma>\subseteq C_{S_n}(\sigma).$ What should I do after? I guess I just want to know what are the elements that commute with $\sigma$.


How to suppress exit code of finished background jobs

Is there a way to hide the exit code of the background jobs that have finished?  For example, if I run:  sleep 5&   After the 5s, if I hit return the terminal gives me:  [1]+  Done                    sleep 5   Is there a way to hide/suppress the last notification?  Particulary I have to do this: nohup script >> file.txt & And after that I don't want anything more on the terminal (stdout)


IPad Air 2 (cellular) upgrade to 9.3.1 won't run (after "agreeing", takes me to home screen)

When trying to upgrade to 9.3.1, the terms of service come up for the upgrade, and when clicking agree (twice -- there's two popups about agreeing), I'm redirected to the home screen and nothing else happens. Note: I had this problem with 9.3, and at the time, the 9.3 update was not signed, but as of today,  says this device's update is signed and available, yet the problem remains, even after a restart.  A power cable is attached to the device (with ~80% life). I also tried closing all open applications. Still same result.  Any ideas on how to get the update installed?


How to index created field in baseFieldDefinition?

because we have a lot of query on created date field on our custom Entity, we looking for a solution to index 'created' field index in Mysql.  this is our baseFieldDefinition :   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {     $fields = parent::baseFieldDefinitions($entity_type);  $fields['product_id'] = BaseFieldDefinition::create('entity_reference')   ->setLabel(t('Product Category'))   ->setDescription(t('Product Category ref'))   ->setRevisionable(FALSE)   ->setSetting('target_type', 'taxonomy_term');  $fields['site_id'] = BaseFieldDefinition::create('entity_reference')   ->setLabel(t('Site ID Ref'))   ->setDescription(t('Site Category ref'))   ->setRevisionable(FALSE)   ->setSetting('target_type', 'taxonomy_term');   $fields['price'] = BaseFieldDefinition::create('integer')   ->setLabel(t('Price'))   ->setDescription(t('The Price of the Crawl entity entity.'))   ->setDefaultValue(0);  $fields['created'] = BaseFieldDefinition::create('created')   ->setLabel(t('Created'))   ->setDescription(t('The time that the entity was created.'));  return $fields;   }    is there any setting or method in ContentEntityBase to set a field indexable in Mysql?    NOTE: we can index it with a simple migration in our module installer but first of it I'm curious about it, is there any solution to achieve it in BaseFieldDefinition?


When to use "write" and when to use "write down"?

I wrote "Write your phone number" and a native English speaker told me that I had to add a "down". Why is this? When should I add the down and when I shouldn't?


I have an iPhone 4s with an iOS 7.1. I wish to update my phone to iOS 8 or 8.1 because most apps only support 8 or higher. I do not however want to update to the latest version supported on the 4s (iOS 9.3.5). Is there a way I could update by phone to iOS 8 and not iOS 9?


Consider numbers of the type $n=2^m+1$. Prove that such an n is prime only if $n=F_K$ for some $ k \in N$, where $F_k$ is a Fermat Prime.

Consider numbers of the type $n=2^m+1$. Prove that such an $n$ is prime only if $n=F_K$ for some $ k \in N$, where $F_k$ is a Fermat Prime. Consider numbers of the type $n=a^m-1$ where $a>1$ is a natural number. Prove that such an $n$ is prime only if $n=M_p$ for p-prime, where $M_p$ is a Mersennt Prime.   I do not understand what the question is asking me for. Can I get some clarification?


Saving php file - what encoding should I use to work with MySQL

I have one php file when I get data from MySQL where I set encoding to utf8. When Im tring to get data and display it in my php file I see there is sth wrong with some characters, e.g Magia ĹwiÄt w JaseĹkach 2013-12-23.  I create all php files using utf8 encoding, but when I want to open this file from server Notepad++ showes me that there is ANSI as utf8 encoding and newline format is Macintosh.  Connecting to db  <?php $db = new mysqli('############'); $db->query("SET NAMES utf8"); $db->query("SET CHARACTER SET utf8");   if($db->connect_error) {       $msg = "Cant connect";   } else {     $msg = "Works!";   } ?>    <?php require '../bootstrap/bootstrap.php'; $query = $db->real_escape_string("Select id, data_dodania,tytul, zajawka From artykuly ORDER BY data_dodania DESC"); $result = $db->query($query); $result=$result->fetch_all();     foreach($result as $row ) {         echo '
';         echo '';           echo '';             echo $row[2];             echo " $row[1] ";           echo '';           echo '
';           echo $row[3];          echo '	';                echo '
';      }     echo '
';


Any way to reward contributors beyond upvotes and bounties?

Stack Overflow has been one of my best sources to gain knowledge on JavaScript.  Some answers have been exceptionally helpful - eye opening - and I'd like to know if there's a way to reward the authors beyond upvotes and bounties.


Error doing callout to a site with GoDaddy certificate

When we try to send some data to an external web service (REST, POST, JSON), we get the next error:     System.CalloutException: sun.security.validator.ValidatorException:   PKIX path building failed:   sun.security.provider.certpath.SunCertPathBuilderException: unable to   find valid certification path to requested target   If we check the certificate, it's a valid "Go Daddy Secure Certificate Authority - G2".  Also, We have checked that this company is included as a valid Certificate Authority into Salesforce list ().


Can we ignore visitors without JavaScript enabled?

If you have developed a JavaScript based website, is it worth doing the extra work to make it accessible for visitors who don't have JavaScript enabled?   What percentage of visitors are in this position? Which browsers does it particularly affects? Are mobile devices JavaScript enabled?


Within Finder, it would be sweet to have an "Open Terminal here" like in Linux Ubuntu. It should open a Terminal within the path Finder is currently pointing to.


COUNTIF but when multiple conditions are met

I'm trying to create a GDocs spreadsheet to collate data from a survey. I'm fairly new to the advanced features of GDocs/Excel but here's what I'd like to achieve. I've tried Googling but it's a tough thing to search.  I currently have a COUNTIF formula that looks like this:  COUNTIF( 'Survey Data'!F2:F200; "Divisional Exec" )   This works fine. But I would like to refine that. So I want to count the number of times a string appears when COLUMN A = 'ACT' and when COLUMN F = 'Divisional Exec' in the same row.  Is this possible to do in Google Spreadsheets? If so how do I do it?  I have tried  but can't seem to get it to work for me.


Why don't we use the letter "s" to form a genitive in this example?

Why do we say      Pauli exclusion principle   instead of     Pauli's exclusion principle   When we want to say that something belongs to somebody, we should use the "s" to form a genitive, i.e.  "this is Pauli's cat", not "this is Pauli cat".


Straight to the chase I want to create a function which calculates the length of a step.  This is what I have:  def humanstep(angle):     global human     human[1]+=math.sin(math.radians(angle))*0.06     human[2]+=math.cos(math.radians(angle))*0.06   So if the angle is 90 then the x value (human[1]) should equal 0.06 and the y value equal to 0.  Instead  the conversion between radians and degrees is not quite perfect and these values are returned.  [5.99999999999999, 3.6739403974420643e-16]   Is there anyway to fix this?


I am checking my tags and I see vote counts as in the attached image  As clearly visible php has 39 counts for 67 php answers/ question. But as I count the votes for php by search 'user:1699833 [php]' it is 46.  I want to know why it is showing 39?


Does a conducting wire give off measurable radiation?

In the  (semi-classical, but should still apply here I think), the conducting electrons are in a constant electric field, and, in between collisions with the lattice ions (that happen, on average, in a time $\tau$ since their last collision) in which their velocities are reset to an average of 0, they are accelerated and gain a momentum  $$p = qE\tau (=mv)$$, where $q$ is its charge and $E$ is the electric field from the applied voltage. This obviously means in between the collisions, the electron accelerates $a$, from $v_f = v_i + a\tau$.  Accelerating charges give off . So does a DC carrying wire give off radiation one can measure?  I suspect it does, but it's of an insanely small magnitude. A quick order of magnitude calculation with the following values gives me:  $$q \sim 10^{-19} \,{\rm C}, \\ E\sim 1\,{\rm V}/1\,{\rm cm}=100\,{\rm V/meter},\\ m\sim10^{-30}\,{\rm kg} \\ \Rightarrow a = qE/m \sim 10^{13}{\rm m/s}^2 \\ \Rightarrow P \sim q^2a^2/\epsilon_0c^3 \sim 10^{-28}\,{\rm W}$$  Which is obviously pretty small. I'm not sure what's the smallest power that can be measured, but I'm guessing by increasing the applied voltage one could increase the radiated power. But is the idea even fundamentally sound?


We see in Return of the Jedi that the Rebel fleet, including the fighters (B-Wing, X-Wing, etc.) make the jump to lightspeed to get to Endor and commence their assault on the Death Star.  Are TIE fighters also capable of travelling faster than light? Or do they need to rely on being docked in a Star Destroyer or the Death Star in order to get far distances?


I am traveling to Europe in the next couple of weeks, I get really sick and dizzy on planes, I feel that my head is going to explode and I can feel the slightest motion the plane does. I have tried Bonine (which is over the counter meclizine) and it did absolutely nothing. My problem isn't with getting sick in my stomach, my problem is with the dizziness that after 2 hours of flying is combined with a severe headache that literately takes me a week of recovery after the flight.  How can I prevent this on future flights?


What's a good way to use R to make a scatterplot that separates the data by treatment?

I'm very new with R and stats in general, but I need to make a scatterplot that I think might be beyond its native capacities.  I have a couple of vectors of observations and I want to make a scatterplot with them, and each pair falls into one out of three categories. I would like to make a scatterplot that separates each category, either by colour or by symbol. I think this would be better than generating three different scatterplots.  I have another problem with the fact that in each of the categories, there are large clusters at one point, but the clusters are larger in one group than in the other two.  Does anyone know a good way to do this? Packages I should install and learn how to use? Anyone done something similar?  Thanks


Writing a function to convert hex to decimal

I need to write a function that converts hex to decimal and I've got an idea of how to do it but I'm stuck at the first bit. So far I am taking the user input and returning it in hex, but this only works if I enter 1 thing at a time. The code is:  def hex(x):     if x == "0":         return 0     elif x == "1":         return 1     elif x == "2":         return 2     elif x == "3":         return 3     elif x == "4":         return 4         elif x == "5":         return 5     elif x == "6":         return 6     elif x == "7":         return 7     elif x == "8":         return 8     elif x == "9":         return 9     elif x == "A":         return 10     elif x == "B":         return 11     elif x == "C":         return 12     elif x == "D":         return 13     elif x == "E":         return 14     elif x == "F":         return 15  print hex(raw_input().upper())   It works if I enter, for example, C then it returns 12, but if I enter 8C then it doesn't work. I can't figure out why this is.


How to convert std::string to LPCWSTR in C++ (Unicode)

I'm looking for a method, or a code snippet for converting std::string to LPCWSTR


How can I disassemble and remove my Kwikset deadbolt?

I cant get this lever off to take the face plate off. I took off the screw behind the lever but still won’t come off.


In an extension of finitely generated $k$-algebras the contraction of a maximal ideal is also maximal

Let $k$ be a field and let $A \subset B$ be two finitely generated $k$-algebras. Prove that the contraction of any maximal ideal of $B$ is a maximal ideal of $A$.   thank you very much again!


no border around hyperlinks with hyperref

MacTEX-2014, TeXShop 3.36.1 on Mac OS 10.9.5 -- when using hyperref I do not see the colored border that should appear around the hyperlinks in the pdf.  for example, when compiled with pdflatex, the code below should produce a pdf with a green border around the link on the right of "abc", but it does not. Any idea how to check where the problem is?  \documentclass{article} \usepackage{hyperref} \hypersetup{colorlinks=false,pdfborder=0 0 1,citebordercolor={0 1 0}} \begin{document}  abc \cite{123}  \begin{thebibliography}{99} \bibitem{123} efg \end{thebibliography} \end{document}    this is the list of files from the generated .log     File List   article.cls    2007/10/19 v1.4h Standard LaTeX document class   size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)   hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX   hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)   hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)     hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)   infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)    ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)   ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)    intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)      ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)   etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)   kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)   kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)   pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)   pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)   bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)     bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)   uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)   letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)    hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)   xcolor-patch.sty    2011/01/30 xcolor patch   atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)   atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)   refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)    hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)     keyval.sty    2014/05/08 v1.15 key=value parser (DPC)    ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional    auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)   kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)   hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive        url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.    hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX   rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)    nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section   gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)


\Vdash with a tilde instead of a horizontal line?

I'm basically looking for a nicely type-set version of the symbol ||~, or a way to make it myself.  Is there a way to generate a math-mode symbol that looks like a \VDash, but with a tilde in place of a horizontal line?


How do I access Win7 files through a Wubi

After recently installing 12.04 through Wubi, Windows 7 is now not booting, not even in safe mode. There is one folder on the C drive that I need a copy of which I forgot to backup before installing Ubuntu, how do I access this through Ubuntu?


Will a 560W power supply be enough for a 2-card SLI GTX 460 setup?

If not, then what's the minimum? I have seen an 800 watts setup but I guess that's too much.


Template class does not name a type error, separated definition and declaration for header

I am attempting to create a templated vector class, but upon compilation I am receiving an error of def.hpp:3:1: error: 'TempVector' does not name a type  I keep referring to reference material and my syntax and handling of the header file declaration and definition (.h and .hpp) seem right to me, but I can not figure out what I am overlooking. Below is the three files I am working with, thank you. driver.cpp: #include <iostream> #include <string> #include "dec.h"  using namespace std;  int main() {   TempVector <int> v1;   cout<<"ran successfully"<<endl; }   dec.h: #ifndef DEC_H #define DEC_H #include <iostream> #include <utility>  // Declaration of class Vector  template <typename T> class TempVector {  public:    TempVector ();  private:    T* array;    static const unsigned int spare = 10; };  #include "def.hpp" #endif   def.hpp: template <typename T>   TempVector<T>::TempVector () {   std::cout<<"ran successfully"; }


Why the standard deviation of the sample mean is calculated as $\frac{\sigma}{\sqrt{n}}$?

According to Wikipedia, the standard deviation of a sample mean is calculated as follows $$\frac{\sigma}{\sqrt{n}}$$  Why is that? Why do we need to divide the standard deviation of the population by the square root of $n$ (which should I think be the size of the sample)? Why should that make sense?


Filter features by attributes from another layer

I already asked this question here, but realized that my description was too meager for people to help me. Therefore, I will try to describe the problem here in more detail. Data: layer 1 (tmc_segments), layer 2(regional_roads(earth)). Layer one contains simplified geometry of the road network. Layer two contains some roads from Layer one, but these roads are more detailed. Objective: to get from layer 1 only those roads that are on layer 2. Layer one contains two distinctive attributes:road_numbe and road name. Layer two contains one attribute Name, wich contains both number and name.


Why did the universe not collapse to a black hole shortly after the big bang?

Wasn't the density of the universe at the moment after the Big Bang so great as to create a black hole? If the answer is that the universe/space-time can expand anyway what does it imply about what our universe looks like from the outside?


A linear map, continuous at zero, is bounded

I am studying a theorem about linear maps on normed vector spaces. The theorem states the equivalence of the following statements:     $T$ is a linear map on a normed vector space $X$ that maps to a normed vector space $Y$.         $T$ is continuous   $T$ is continuous at zero.   $T$ is bounded.      Clearly, 1 $\implies$ 2 is immediate. And 3 $\implies$ 1 is not so complicated either: suppose $\|Tx\| \le C\|x\|$, so $\|Tx-Ty\| = \|T(x-y)\| \le C\|x-y\|$, so take $\delta = \frac{\epsilon}{C}$, and $\|x-y\| < \delta \implies \|Tx-Ty\| < \epsilon$.  However, I am having some difficulty following a proof of 2 $\implies$ 3. The author makes the following claim:     If $T$ is continuous at $0 \in X$, there is a neighborhood $U$ of $0$ such that $T(U) \subset \{y \in Y : \|y\| = 1\}$, and $U$ must contain a ball $B = \{x \in X : \|x\| \le \delta\}$ about 0; thus $\|Tx\| \le 1$ when $\|x\|\le \delta$.   This is clear; it is just a restatement of the Weierstass criterion for continuity. He proceeds:     Since $T$ commutes with scalar multiplication, it follows that $\|Tx\| \le a\delta^{-1}\|$ whenever $\|x\| \le a$, that is, $\|Tx\| \le \delta^{-1}\|x\|$.   This I do not follow. What is happening here? Is this just a rescaling $x \mapsto \frac{a}{\delta} x$? I cannot replicate this conclusion.


Committed but non-invited Area 51 private beta is accessible via Android and iOS apps

I'm a committer for the .  It went to the private beta phase sometime in the last 12 hours, but yet to have been invited. When I visit  I get the standard "To log in, you must have commited to the Area 51 site proposal and received the invitation email." message.  However, when I navigate to the Pets site via the Android app, I'm able to view the site in it's entirety (questions, answers and comments). When I attempt to post, I get a message saying my user token isn't allowed to take action on this site.  Same behavior is observed when using the iOS app.


I'm looking for an app or programme that can draw similar to Sketchup

Looking for a replacement for Sketchup in Ubuntu.  Simple is good.  I only really need to draw plan view.


Why not include something like Ksplice so there is no need to reboot after updating?

Ksplice is an amazing software (or whatever it is). It changes the way kernel updates work: Instead of rebooting after an update, it patches memory, so you don't need to do anything.


Using New Relic I am trying to understand the relationship between simultaneous connections and server performance via new relic. As an example of the relationship I would like to see, it would be average pageview load time across a histogram of unique sessions in a particular period (i.e. how did things run with 10 versus 100 versus 1000 other connections).   I am new to new relic and have got some queries around uniquecount of sessions in a particular period, but, having trouble connecting it back to the server information or to some aggregate like the page time from APM.   Thoughts on this query or other things I could do to see this relationship in a production environment?


please help me on how to make my ubuntu server 16.04 accessible through the internet. i can access it on LAN. i ve even done port forwarding

hello guys just set up my server (ubuntu 16.04lts )and i can access it on the LAN but am trying to access it over the internet but i cant get through. i set up  port forwarding but still no luck on it thanks.


SFDX Lightning Page Deployment Issues Property 'itemInstances' not valid in version 47.0

I trying to deploy my package while validating changes salesforce given this error "Lightning Page Property 'itemInstances' not valid in version 47.0" do you guys have any insight for these king of errors. Please share if you got any solution for these. Thanks in advance.


How do I generate all possible numbers from this regular expression?

I want to get a list of all possible values for a regular expression.  Input :   2W 9WW 7W0W3   where W can be any digit from 0 to 9.  i.e. W = [0-9]  Output:  20,21,22,....29 900,901,...910,911,...999 70003,70013,70023,...71003,72003,...79093   What I did :  I'm using Java and decided to create an ArrayList of Integers.  I created a method ArrayList<Integer> getNumbers(String regex).  ArrayList<Integer> getNumbers(String regex){  ArrayList<Integer> fullList = new ArrayList<Integer>();  char[] cArray = regex.toCharArray(); //converted the string into a character array.     for(int i=1;i<cArray.length;i++) {         if(cArray[i] == 'W') {                           for(int j=0;j<10;j++) {                //I'm not sure what goes here               fullList.add(the number with 'w' at this index replaced by 'j');            }                       }     } return fullList; }   Is there any better way or library functions available to generate all such numbers?   How can I achieve this?


Identifying 1d clusters with scipy.stats or sklearn?

The thing is, I have tons of 1d-data that is distributed around multiple different mean points, I'm searching for a general way of identifying this little clusters and somehow spreading them.   I've implemented KDE distributions fits for this. My first idea was to search for some way of finding local maxima of the KDE distribution, but that would not be very effective, because it would be depending of the bandwidth of the distribution fixed.    Here is one example.  I'm looking for a general method, that would give me in this example the mean and standard deviation of this three clusters (but it could be more or less than three), considering only themselves, using maybe scipy.stat or sklearn.  Thank you !  Update: Gaussian Mixture might work really well for me, the main problem is just the shape of the of the fitting data, it is a matter of implementation.  from sklearn.mixture import GaussianMixture from scipy.stats import norm import numpy as np  mean=34 std=10  xpdf=np.linspace(20,50,1000).reshape(-1,1) y=norm.pdf(xpdf,mean,std) y=np.array(y).reshape(-1,1)  model=GaussianMixture(1).fit(y) ypdf=np.exp(model.score_samples(xpdf))  plt.hist(y,bins=100,density=True) plt.plot(xpdf,ypdf,'-r') plt.show() ```


Where to start learning how to make maps with QGIS?

I have no skills in GIS, "map-making," or any other map program. Been a county planner for 25 yrs, where there was always a "drafting" staff.  I'm in another agency now and need to be able to produce basic and attractive site plans and area maps.  Is QGIS the right tool? I saw on a planners' website that it's free to download, along with GIMP and SketchUP.  I need some genuine advice on this, not something impossibly technical for my situation, nor a smug brush-off.


Java: How to get the while loop to work?

I'm new to Java and I can't figure out how to solve this problem. Whenever I try to run the program, after putting in a number for the "please enter 5 digit number" entry, the program goes directly to the else statement: "ERROR: Please enter a D, W, B, or X"  Here's the entire code:  import java.util.Scanner;    // needed to use Scanner for input  public class SeminoleBank_A {  public static void main(String[] args) {    //Create Scanner object   Scanner input = new Scanner(System.in);    //Declare and initialize   int deposit, withdrawal;   int balance = 0;   int number;   String menuChoice = "";    //Display welcome message “Seminole Bank”   System.out.println("\n********************************************************");   System.out.println("               Welcome to Seminole Bank!                   ");   System.out.println("********************************************************");    //Ask user to enter 5-digit Account Number   System.out.print("Please enter your 5-digit Seminole Account Number: ");    //Read user's Account Number   number = input.nextInt();    //Display "Thank You"   System.out.println("Thank you!!");    //Prompt user for year born   System.out.print("Enter D for deposit, W for withdrawal, B for balance, X to exit the menu: ");    // Read user's menu choice   System.out.println(menuChoice.toUpperCase() );    while (menuChoice != "X") {         if (menuChoice == "D"){            System.out.print("Enter the amount of the deposit: ");           deposit = input.nextInt();           System.out.printf("Account Number: " + number + "has a current balance of %.2f $: " + (balance + deposit));         }//end of if         else if (menuChoice == "W"){            System.out.print("Enter the amount of the withdrawal: ");           withdrawal = input.nextInt();           System.out.printf("Account Number: " + number + "has a current balance of %.2f $: " + (balance + withdrawal));         }//end of else if         else if (menuChoice == "B"){            System.out.printf("Account Number: " + number + "has a current balance of %.2f $: " + balance);         }//end of else if         else {          System.out.println("ERROR: Please enter a D, W, B, or X: ");         }//end of else       }//end of while  System.out.println("Thank you for being a loyal Seminole Bank customer!");  }//end of main  }//end of class   Any help would be greatly appreciated.


A propeller has the shape shown below. The boundary of the internal hole is given by $r = a + b\cos(4α)$ where $a > b >0$. The external boundary of the propeller is given by $r = c + d\cos(3α)$ where $c - d > a + b$ and $d > 0$.  Calculate the total area of the propeller as shown by the shaded region and calculate the average temperature of the propeller, given by $T (r, α) = C/r$, where $C$ is a constant.     Have absolutely no idea how to solve this.


Is there a way to print an entire array ([key]=value) without looping over all elements?    Assume I have created an array with some elements:    declare -A array array=([a1]=1 [a2]=2 ... [b1]=bbb ... [f500]=abcdef)   I can print back the entire array with  for i in "${!array[@]}" do echo "${i}=${array[$i]}" done   However, it seems bash already knows how to get all array elements in one "go" - both keys ${!array[@]} and values ${array[@]}.    Is there a way to make bash print this info without the loop?  Edit: typeset -p array does that! However I can't remove both prefix and suffix in a single substitution:  a="$(typeset -p array)" b="${a##*(}" c="${b%% )*}"   Is there a cleaner way to get/print only the key=value portion of the output?


How are we supposed to define what makes a question better?

When reviewing Reopen votes on Stack Overflow this morning I  that was generating some heat: vote to close a question as duplicate, even though it's much older than the other. One of the users commented there (and five more people agreed):     Why was this question marked as duplicate? Mods should check the asked date before mark it as duplicate!   I didn't know how to proceed, so did some search and from      If the new question is a better question or has better answers, then   vote to close the old one as a duplicate of the new one.   So I commented directly to that user     Basically, the age doesn't matter. What matters is the quality of QAs measured by upvotes.   I don't really know how it's really measured and feel bad if I might be misguiding. I presume what I said isn't correct when both questions are exactly the same when it comes to votes, favorites, comments, etc. and the only difference is age.  Considering questions can have many variations (one has more upvotes, one has more answers, one has more "marked as favorite", one has more "close votes", one is older, etc.), has anyone taken the time to isolate the possible differences, understand their impact and defined how are we supposed to define what makes a question better?


Is there an alternative to Cantor's cardinalities that makes proper subsets smaller than their sets?

Cantor defined an infinite set as a set whose subset can be placed in a one-to-one correspondence with its subset. That is, take the set of all natural numbers: {0, 1, 2, 3, 4,...}. From that set, you can form a subset of all even numbers: {0, 2, 4, 6,...}. There is a one-to-one correspondence between both these sets. After all, you can multiply each member in the set of all natural numbers by 2, and you’ll get the set of all even numbers. Because of this one-to-one correspondence, the two sets have the same cardinality, despite the set of even numbers being a subset of the set of natural numbers. This is counter-intuitive to me. How can a subset of a set be as big as the set itself? To make the intuition more concrete, consider the set of multiples of 1,000,000: {0, 1,000,000, 2,000,000,...}. There is a one-to-one correspondence between this set and the set of all natural numbers. So they have the same cardinality. This is really counter-intuitive.  From as far as I can tell, there are basically two axioms at play here:  A1: If all members of set A can be placed in a one-to-one correspondence with all the members of set B, then both sets have the same cardinality.  A2: If set A is a proper subset of set B, then A has a smaller cardinality than set B.  How Cantor defined infinite sets is that he accepted A1 and rejected A2. That is counter-intuitive to me. But mathematicians might say that my intuition is just wrong. So my question is whether we can define infinite sets in another way, i.e. accept A2 but reject A1. That is, the set of even numbers is smaller than the set of all natural numbers, even though both sets have a one-to-one correspondence. If you think this is counter-intuitive because sets with one-to-one correspondence with each other should have the same cardinality, and thus think this is wrong, why can’t I say the same when Cantor accepted A1 and rejected A2? Either way, there is something counter-intuitive and paradoxical.   So, my questions are:   Can we accept A2 and reject A1 for the definition of an infinite set? What arguments, if any, are given for accepting A1 and rejecting A2?


Is there a "framerate" for the universe?

I've been wondering this for quite some time.  I just can't wrap my head around the idea of truly continuous time.  If time is truly infinitely divisible, then how can any object in the universe move?  It seems to me that if time is continuous then time would not physically make sense.  Time would be unable to "flow" because in order to get from one moment of time to another, it would have to pass through an infinite amount of time to reach second moment.  Quick example:  Say a ball rolls off the table and bounces on the floor.  Now, say we look at two time points while the ball is falling that are 1x10^-100 seconds apart.  If time is truly continuous, then these points have an infinite amount of points in between them.  Thus, to move from point a to point b, an infinite amount of time would have to pass.  This is what I can't wrap my head around.  I realize that just because I can't wrap my head around it doesn't mean my idea must be right.  To me, though, it doesn't seem to make sense that time can truly be absolutely continuous.  Can I get some answers here?  Is there any significant research as to whether or not time is discrete or continuous?  I'd be more than happy to read an explanation as to why my scenario above is incorrect, it would sure rest my mind on the subject.  As I said, I realize that just because I can't wrap my head around this doesn't mean that time must be discrete.  I'm just, well, having trouble wrapping my head around it.


I've read many times that 'compactness' is such an extremely important and useful concept, though it's still not very apparent why. The only theorems I've seen concerning it are the Heine-Borel theorem, and a proof continuous functions on R from closed subintervals of R are bounded. It seems like such a strange thing to define; why would the fact every open cover admits a finite refinement be so useful? Especially as stating "for every" open cover makes compactness a concept that must be very difficult thing to prove in general - what makes it worth the effort?  If it helps answering, I am about to enter my third year of my undergraduate degree, and came to wonder this upon preliminary reading of introductory topology, where I first found the definition of compactness.


I have the following R output from the summary of my linear model lm(y ~ x):   Multiple R-squared:  0.009909, Adjusted R-squared:  0.007681  F-statistic: 4.010 on 1 and 98 DF,  p-value: 0.03724  What does the p-value of 0.03724 actually mean? I know it is between 0.01 and 0.05 so there is strong evidence to reject the hypothesis that ...?


How can I efficiently filter Dos packets?

I have recently been the victim of some Dos attacks.  The facts : I received a very high amount of packets saturating my connection and preventing me from accessing the Internet during one hour (average). They have been performed by players on Xbox live who first threatened me, told me which IP I had and then launched the attack from a load test website, a "booter".  I often write some shell scripts so I made some investigations and tried to write a script which would detect the bad packets and DROP the IPs. I made several attempts. The problem is that after 8 seconds and over 300,000 packets (from 1,000 different IPs) received, I stop receiving anything. Not a single packet. So my script logs tell me it was able to drop those IPs but it can no longer perform its task because nothing comes in my connection.  Does anybody have an idea where the packets got stuck ? Could it be my ISP not forwarding such traffic ? In that case, there is nothing I can do. If I do not receive the packets, I cannot filter them.  What can I do ?  Thanks a lot for your advice.


Projecting Microstation .dgn that has no coordinate system

I have a set of .dgn drawings that have been sent to me from a client.  All of which were never assigned to a coordinate system upon creating them.  I am attempting to assign a coordinate system to this .dgn data and export to AutoCAD which I will then export to ArcMap.  Is this process possible?  Is it possible to Export Microstation .dgn files straight to a shapefile?


I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I have to manually sift through a large number of features. Is there a quicker way to do this?  I am using both shapefiles and postGIS best,  dietmar


I'm trying to install queXS cati app on my Ubuntu desktop and I installed MySQL server and PHP 5 and I cannot login into MySQL server as root without password:  mysql -u root    it says  ERROR 1045(28000) : Access denied for user 'root@localhost' (using password: no )   But it's okay when I enter mysql -u root -p   I can't figure out what the problem is.


Using iMac late 2013 as external monitor to HP EliteBook 820 G3 on Windows 10

Is it at all possible to use my 21.5 inch late 2013 iMac as an external monitor on which I can extend the display of my ?  These are the ports that I'm working with on both devices:


My furnace pilot light keeps going out so I changed the thermocouple. Now the furnace will come on and heat up to the degree set on my thermostat, then the pilot light will go out and the furnace will not come back on.    Could the thermostat be bad and cause the pilot light to go out?


Is it possible to proof Euclid theorem which stated that "there are infinitely many primes" using Sieve theory?

is a set of general techniques in number theory, designed to count, or more realistically to estimate the size of, sifted sets of integers. The primordial example of a sifted set is the set of prime numbers up to some prescribed limit X. Correspondingly, the primordial example of a sieve is the sieve of Eratosthenesthat there are infinitely many primes, One successful approach is to approximate a specific sifted set of numbers as example the set of prime number.  Really i'm interested in this question :     Question: Is it possible to prove  which stated that "there are infinitely many primes" using Sieve theory ?


Which part of speech is "back" in “then she went back to her secretaire”?

Which part of speech is "back" in the sentence “then she went back to her secretaire”?


Which special Characters are not Allowed in SharePoint 2013\2016 Files\Folders?

I am working on SharePoint Admin and Development part. One of our customer is using SharePoint 2013\2016. User is getting Special character issue while uploading file in SharePoint 2013\2016. We are searching for characters those are not allowed in SharePoint 2013\2016 files\folders. Found for SharePoint 2010 but not found for SharePoint 2013\2016.  Can you please help me to list down the special characters not allowed in  SharePoint 2013\2016 files\folders?  Thanks.


Invite feature in iOS, how to send a person's contact a message from within your app?

I was wondering what cocoa framework (Swift) to use to pull up a list of contacts for a person (if they allow access) and then if they click on one of them, to open up messages to send a message to that friend with a link to the app.  I know Apple provides the contacts framework, but how to send the message itself?


$$f(n)=\cot^2\left(\frac\pi n\right)+\cot^2\left(\frac{2\pi}n\right)+\cdots+\cot^2\left(\frac{(n-1)\pi}n\right)$$ then how to find limit of $\dfrac{3f(n)}{(n+1)(n+2)}$ as $n\to\infty$? I don't know any series like that. Riemann sum is not working. what to do?


Solutions of bivariate cubic Diophantine equation

The problem is what are the integer solutions to  $$7x^2 - 40xy + 7y^2 = (|(x - y)| + 2)^3$$  I only got $x - y = 4 (\mod 13)$. Also, how to solve it?


how to find the remainder when a polynomial $p(x)$ is divided my another polynomial $q(x)$

i was solving the question from the book IIT FOUNDATION AND OLYMPIAD - X and i was solving the problems of polynomials-III. so on the page number 136, there is a question (question 17) given below:     The remainder when $x$^100 is divided by $x^2-3x+2$ is:      a) $(2$^100$-1)x + (-2$^100$ +2) $      b) $(2$^100$+1)x + (-2$^100$ -2) $      c) $(2$^100$-1)x + (-2$^100$ -2) $      d) none   as far as i tried to find the remainder, i tried long division method but it was getting more and more complicated, then i used systematic method of division but i can't get the corret option what is the correct option. please explain me how did you find the remainder. thanks  and yes its answer is option (a)


Rindler metric and equivalance principle

I'm trying to understand the connection between The Equivalence principle and the Rindler space. According to Einstein the inhabitants of the elevator should feel the acceleration. However, for an observer in outer space (far the homogeneous field) should observe the elevator (and its inhabitants) as free-falling objects in the curvature of spacetime. This implies the they dont accelerate and thus describe the motion of a geodesic. Shouldn't the observer obtain a geodesic equation With vanishing Christoffel symbols ? is there something wrong with my reasoning? if not, How to obtain such geodesic equation for an observer in outer space for which the Christoffel symbols vanish and thus represents a 'free-falling' object.


Acer Aspire R11 Series 3 forgotten administrator password

I am trying to factory reset my acer aspire but it is having problems resetting so I need to do a system restore or command prompt but in order to use those I have to have the administrator password which I have forgot


Difference between $\sum_{i=1}^{k}{\frac{s_i}{kn_i}}$ and $\frac{\sum_{i=1}^{k}{s_i}}{\sum_{i=1}^{k}{n_i}}$

I am getting confused at how to calculate the average probability.  Suppose we repeat a kind of binary survey $k$ times each of which was done on a completely separate sample group.  For each $i^{th}$ group, $i=1,2,3,...,k$, Let $n_i$ be the number of samples and $s_i$ be the number of positive results. With this we know that the probability $p_i$ of the positive result for the $i^{th}$ group is $s_i/n_i$  With my ignorance, I happened to use two ways to calculate the average probability in my work wrongly assuming that they are the same:  $$\frac{p_1+p_2+p_3+...+p_k}{k}$$ and $$\frac{s_1+s_2+s_3+...+s_k}{n_1+n_2+n_3+...+n_k}$$  I don't know which is the correct way to calculate the average probability. So could you please explain the difference of these two and when to use which?


many Servers of SQL server 2012 needs mirroring

I have now simply 2 SQL Server 2012. I want to configure database mirroring between the 2 servers.  My questions are:   How can it automatically change host of one if the other one was dropped ? Is the performance of mirroring acceptable and is there another way to make one as host and other is backup then if the main server was dropped the other works automatically better than mirroring?


Representing the architecture of a deep CNN

Suppose I am feeding a $60\times60$ RGB image as the input to deep CNN with the first layer created using the following Keras code model.add(Conv2D(64, (3, 3), input_shape=(60, 60, 3))).  Will 64 filters be created for each channel (red, green and blue) of the image? Is the following representation of the network correct? If 64 filters are created for each channel, then should I write "3X64@58X58"?


If $a,b,c$ are positive real numbers, not all equal, prove that  $$\dfrac{bc}{b+c}+\dfrac{ca}{c+a}+\dfrac{ab}{a+b}<\dfrac{a+b+c}{2}$$  Progress: $\frac{bc}{b+c}-\frac{b+c}{2}=$


Removing the bugged Ender Dragon in Minecraft Realms version 1.9

On Minecraft Realms, in the End, I had summoned the Ender Dragon, twice. This was all in version 1.9. Of course, I did not know that the AI of the dragon was bugged, and now I want to remove the Ender Dragon.   I tried using the commands /kill @e[type=EnderDragon,r=100] and /kill @e[type=EnderDragon], but alas, it did not work.  How do I remove the bugged Ender Dragon, in Minecraft Realms?


How to /give a player a named item with Level 10 enchants in Pocket/Bedrock Edition?

I’m building a multiplayer hide-and-seek map, and I want to give seekers an instant-kill weapon named “Boop Stick” (don’t ask). /give @p leather_boots 1 0 {display:{Name:"Boop Stick",Lore:["Boop! You're dead."]},ench:[{sharpness:10}{knockback:10}]}   (note that I’m using a placeholder item in the image) I keep getting errors like this: Line 1, Column 2 Missing '}' or object member name   How do I fix this in a compact manner (ie easy to hide the command blocks)?


Cannot see Samba configuration tool in the Dash in ubuntu 14.04

After a fresh installation of ubuntu 14.04 (my previous installation has seen to be broken somewhere reading .wmv file with VLC), I've installed Samba GUI tool from the software center.  It briefly appears in the launchpad then disappears. From this time I cannot the see in in the dash.  I've found this in askUbuntu   but the command sudo apt-get install samba samba-common gives me nothing to install.  Lecture des listes de paquets... Fait Construction de l'arbre des dépendances        Lecture des informations d'état... Fait samba est déjà la plus récente version disponible. samba passé en « installé manuellement ». samba-common est déjà la plus récente version disponible. Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :   kde-l10n-engb kde-l10n-fr Veuillez utiliser « apt-get autoremove » pour les supprimer. 0 mis à jour, 0 nouvellement installés, 0 à enlever et 8 non mis à jour.   The following guide  has no result either.  Any idea ?  Laurent06000


Reputation tab displaying weird/wrong dates?

So, last night I saw a chat message from someone stating their reputation tab looked weird, and today I experienced the same thing myself, on Interpersonal Skills:  The graph displays a rep gain from 2015 onwards (note that this is on a beta site, so it should really have started nowhere before 2017). The post tab didn't show reputation today, instead, supposedly my last rep gain was from late January (on the first page) Going back to page 18 (there's only supposed to be 7), apparently, I started gaining reputation in 2008.  Refreshing the page didn't solve the issue immediately, but after visiting the time and graph tabs (and seeing they were okay), when returning to the post tab everything was fine again... Proof:   Update:  It happened again this morning, but now the time and graph tabs were wrong as well The 11 posts edited is wrong as well, this should be over a 100. Tried clearing my cache and reloading the page, the reputation tab looks normal again but the 'posts edited' count is still wrong.


Why is it better for an iPhone’s battery to NOT close down apps?

I know apparently it’s not a good idea to close apps on your iPhone to save on battery. I’ve read questions and answers like  but it still doesn’t quite gel with me. Sometimes I have found over 50 apps running, so not closing them makes no sense.  Maybe I’m a bit of an old chook and you just can’t teach old dogs new tricks, but can someone here explain WHY it’s better to just keep all these apps running? And when I say “explain” I mean in layman’s terms so I can understand.


What is the integral of function $f(x) = (\sin x)/x$

I want to know if the function sinx/x is integrable and if it is, then what's its integral?  My high school book says its a non-integrable function while WolframAlpha says its integral is Si(x) + constant   Please shed some light on this topic and explain from basic level like what is Si(x), who used it for the first time etc.


I run an example:  a = 200 + 56 b = 256 c = 200 + 57 d = 257  print('%r == %r: %r' % (a, b, a == b)) print('%r is %r: %r' % (a, b, a is b)) print('%r == %r: %r' % (c, d, c == d)) print('%r is %r: %r' % (c, d, c is d))  # Result:  # 256 == 256: True # 256 is 256: True # 257 == 257: True # 257 is 257: False   Please explain for me, why 257 is 257: False? (while 256 is 256: True)


Could you list all possible directories where Android apps may store data, providing description what kind of data are stored in each directory?


If $A$ is matrix of $k\times k$ , then is it necessary that $Ax, A^2x , A^3x ...... A^kx$   will be linearly dependent ? $x$ is a vector and $A$ contains all real entries


I animated fish that are swimming in a tank with cyclic fin movement. Now I want the fish to die and their fin movement to stop, but I cant get the cyclic animation to stop without the cycle to dissappear completely.   Is there a way to keyframe a beginning and end of a cyclic animation or some other way to make it stop? All help appreciated!


How do I make a Lightning Bow in vanilla Minecraft?

I'm trying to make a setup with command blocks that summons lightning at the location of a shot arrow. The setup should recognize the arrow that is shot or the bow that is used by its name or another property, so that lightning only strikes at that specific arrow.   Also, the lightning should only strike once when the arrow hits the ground. I know this is somehow possible with scoreboard, but I'm no good with that. Does anyone know how to make a Lightning Bow in vanilla Minecraft?


Redefining \listoffigures and \listoftables as tables

A friend of mine is required by his faculty to format his lists of figures (= "Abbildungsverzeichnis") and tables (= "Tabellenverzeichnis") as shown in the picture below. Is there a way to realize this by redefining the respective commands in LaTeX? Besides the caption (~ "Kurzüberschrift") the source (= "Quelle") needs to be included in the lists as well.    I've prepared this MWE as a start – it's far away from the desired result though.  \documentclass{scrartcl}  \usepackage{mwe}  \begin{document}  \begin{figure} \centering \includegraphics{example-image} \caption{An awesome image. Source: Thatoneguy, W. (2003)}   \end{figure}  \begin{table}[ht] \centering \begin{tabular}{|c|c|} \hline Foo & Bar\\ \hline Meh & More meh \\ \hline \end{tabular} \caption{An awesome table. Source: Someone, A. (2012)} \end{table}  \listoffigures   \listoftables  \end{document}


Why $\mathbb{R}$ with $d(x,y)=|\arctan{x}-\arctan{y}|$ is an incomplete metric space?


I am trying to create a LaTeX document that will automatically number paragraphs without the need to use \paragraph - the reason for this is that I am processing text that will be written by others who do not use LaTeX.  Edit: this is why the solution at  does not address my particular problem as it requires that \paragraph is replaced by \item.  This gives me the same problem as far as I can tell.  I have searched for several solutions which have helped me make progress and also warned that the use of \everypar can be problematic...  The current situation is that I almost have a solution but a new \section or \subsection causes the subsequent paragraph to drop the numbering as shown in the attached image.  Further paragraphs are numbered correctly.  Alternative numbering solutions would be acceptable to me - I have no real preference for whether the paragraph numbers flow consecutively through all sections or follow a within-section pattern.  My minimal working example is as follows (note I have a need to use the \titlesec package to make the document look pretty).  I am really scratching my head about this one - any help or pointers will be gratefully received!  \documentclass[11pt]{article} \usepackage{lipsum} \usepackage{titlesec}     \setcounter{secnumdepth}{3}  \newcounter{para} \newcommand*{\numberedparagraph}{% \refstepcounter{para} \textbf{\thepara.\space} }  \let\oldep\everypar\newtoks\everypar   \oldep{\the\everypar\everypar{\numberedparagraph}}  \begin{document}  \everypar{\numberedparagraph}  \section{Section 1}  \lipsum[1-2]  \section{Section 2}  \lipsum[4-5]  \subsection{A Subsection}  \lipsum[6-7]  \end{document}


C# - byte array - byte[] - Is there a simple comparer?

Have I just forgotten the obvious, or is the "manual" comparer the best way to go?  Basically, I just want to compare the contents of type (small) byte-arrays. If all bytes match, the result should be true, otherwise false.  I was expecting to find that Array.Equals or Buffer.Equals would help.  Demonstration Code:    var a = new byte[]{1, 2, 3, 4, 5};   var b = new byte[]{1, 2, 3, 4, 5};   Console.WriteLine(string.Format("== : {0}", (a == b)));   Console.WriteLine(string.Format("Equals : {0}", a.Equals(b)));   Console.WriteLine(string.Format("Buffer.Equals : {0}", Buffer.Equals(a, b)));   Console.WriteLine(string.Format("Array.Equals = {0}", Array.Equals(a, b)));   Console.WriteLine(string.Format("Manual_ArrayComparer = {0}", ArrayContentsEquals(a, b)));   Manual function:  /// <summary>Returns true if all elements of both byte-arrays are identical</summary> public static bool ArrayContentsEquals(byte[] a, byte[] b, int length_to_compare = int.MaxValue) {   if (a == null || b == null) return false;   if (Math.Min(a.Length, length_to_compare) != Math.Min(b.Length, length_to_compare)) return false;   length_to_compare = Math.Min(a.Length, length_to_compare);   for (int i = 0; i < length_to_compare; i++) if (a[i] != b[i]) return false;   return true; }


Why do we use the plural "heads" and "tails" when describing sides of a coin?

Head or tail sound fine to my ESL ears.  What's the reasoning behind the plural usage?  I looked it up on etymonline but didn't find anything interesting.


Travel in Spain before Student Visa start date

I have a student visa to study in Spain with a "valid from" date of Jan 8.  I am travelling to Spain from US on Dec 21.  I know I need to leave Spain and go to non-Schengen country (Morocco or UK) and then re-enter Spain at some point to activate student visa.  Do I have to leave Spain before Jan 7 or just within 90 days?


A botnet may be attacking our site right now, how should we respond?

Not sure if SO is the right forum, but we're in need of help and perhaps programmatic elements may comprise the final solution. Instead of downvoting, please recommend where to post this question, and we'll gladly remove this from SO. Thanks -- we just want to overcome this attack.  It seems like our ecommerce site is under attack from a botnet, causing our site to go down. We're receiving 50-100 requests per second (far surpasses normal traffic). Some requests are for outdated URLs not even normally accessible from the site.  Two questions:  1) How do we confirm if the site is under attack?  2) If the site is under attack, how can we ward off the attack and prevent future ones?  We appreciate any help or guidance anyone can offer.  We're using Tomcat 6.0. (Don't ask why. You don't want to know.)  Thanks!


What is the meaning of "Winter is Coming"?

I have just started "Game of Thrones" from season 1.  Most of the characters in "Game of Thrones" are saying Winter is Coming, Winter is Coming.  But I don't know the real meaning of that phrase.  Anyone can tell me about it?


Given space $X = \{a, b, c\}$, $\beta$ is a basis for a topology  $\tau$  on X.   $\tau  = \{ \varnothing, X, \{a\}, \{b\}, \{a,b\}\}$,  $\beta = \{\{a\}, \{b\}, X\}$.  $\beta$ can't union its elements to get empty set $\varnothing$ contained in $\tau$ , but the definition of basis require that every open set can be expressed as a union of basis elements.  So why $\varnothing$ is not an element of $\beta$ ?


What would be the correct way to reply to a statement such as:  "I belong to this group"  Would it be "So do I" or "So am I"?


The number of solutions of the equation $a+2b=k$ is $\left\lfloor\frac{k}{2}\right\rfloor+1,$ where $a,b\in \mathbb{N}\cup\{0\}\mbox{ and fixed }k\in\mathbb{N}.$ More general what is the number of solutions of the equation $a_{1}+2a_{2}+3a_{3}+\ldots+(r-1)a_{r-1}+ra_{r}=k,$ where $a_{i}\in\mathbb{N}\cup\{0\}\quad 1\leq i\leq r \mbox{ and fixed }k\in\mathbb{N}?$


Why does a % decrease of a number not equal the same % increase when you reverse the calculation?  ie: $30 less 20% = $24.00   Reverse calculation  $24 plus 20% = $28.80  Please explain


java.text.parseException: unparseable date 1994-09-09

I am trying to send a date value from my java program into an oracle sql database. But I keep getting the error: java.text.parseexception: unparseable date.  I set the date format as:  SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd", Locale.ENGLISH);         java.sql.Date date = (java.sql.Date)df.parse(dob_text.getText());   I have set my database with the same date format. And try to send the date through a prepared statement like so:  ps.setDate(3, date);    I am entering a date 1994-09-09. That's the correct date format for the one I declared right? Is there something wrong with my java formation code? Has anyone else had this problem? Any help would be much appreciated


If a spell is cast on a moveable creature/object and lasts longer than a round, and the creature/object moves, does the spell move with it?

Recently it has come up at our table on the topic of centering a spell with an extended length, like sickening radiance, on a creature or something else that move. My table & I are unfamiliar with the ruling of centering spells on specific points.  If a caster casts a spell that centers on a point, and the spell continues for a period of time longer than 1 round, and makes the point a creature or something else that can move, would the spell move with that creature or object?


Should these be called "weights" or "masses"?

Yeah, those circular metal disks. Weights or masses? I call them weights because when I attach them to a spring I'm interested in their weight, but it feels odd saying a "Pick up the 100g weight". "Pick up the weight with a mass of 100g sounds better" but it still feels wrong.   I don't like to call them masses, because I've never heard anyone else call them masses, unless it's someone trying to correct me for making the 'mistake'.


Does zero variance imply constant random variable?

I've read similar posts, but I didn't understand if that is indeed true. For some continuous random variable $X$: $$E\left[\left(X-E\left[X\right]\right)^{2}\right]=0\implies P\left(\left(X-E\left[X\right]\right)^{2}\neq0\right)=0\implies\left(X-E\left[X\right]\right)^{2}=0\text{ a.s.}$$ so $$E[X] = X\text{ a.s.}$$ But does that imply $X=const$?


How does Base Attack Bonus work, exactly? As in, how do I understand the formatting of the Base Attack Bonus?

So everywhere I'm looking I'm seeing BAB bonuses beyond a certain level start being formatted as such +10/+5 at level 10. I understand that once you reach a +6 BAB you get an extra attack as well as at +11, but what are the second and third numbers for? and why are they divided if the amount of attacks I get is always based on the first number?


I forgot my passwowd and my administrative account will not reset (password recovery)?

I am trying to find someone that knows how to work the 14.04 Password Recovery.  I have tried a million ways can someone please help me with a walk-through that actually makes sense?  I have tried to mount and remount and add new password through command prompt I have used the "Standard way" and I don't know everything seems to do what it should but I think I am doing something wrong.  I basically just need to know the way to do a password recovery without being able to access admin account prior.  I changed the password and have no idea what it is because I was very tied when doing so would be awesome to get the appropriate and most efficient way to do recovery for password in a form that I can actually understand


Can a high entropy (heat death) dynamical system spontaneously arrive at a state of low entropy given enough time?

If you measure the entropy in a dynamical system which is at a maxima for entropy level (eg. heat death universe) why will it not revisit lower entropy states spontaneously?  That is, fluctuate away from a maxima?  Plot s on the y-axis, iteration/update/time on the x-axis.  Run the simulation forward for an arbitrarily long time.  Surely over long enough times, the level of entropy will decrease at times spontaneously.  Conversely, can we say heat death implies a flat line plot forever; no deviation from a maxima?  Why won't all possible state-space configurations be revisited in frequency proportion to their state-space probabilities?  Even if evolution towards a state of minimum entropy will require a passage through a permutation of exponentially unlikely lower energy states this is not a zero possibility.  Why will a heat death universe not spontaneously revisit a minima and re-birth?  I realise the numbers against the system spontaneously reaching a minima from a maxima are an immense exponential and we are trying to find them with a linear increase in iteration/update/time.  But why not?


>Find the Equation of ellipse that is tangent to the lines $x-4y=10$ and $x+y=5$

Find the Equation of Ellipse that is tangent to the lines   $x-4y=10 $    and  $x+y=5$   I don't know what is the idea of this problem , how can i begin   Thank you for your help


Differentiation of the cosine and sine power series

I know that if $\sum_{n=0}^{\infty} c_n (x-a)^n$ is a power series with radius of convergence $R$ and $f\colon (a-R,a+R)\to\mathbb{R}$ is the function such that $f(x):=\sum_{n=0}^{\infty} c_n (x-a)^n$ then $f$ is differentiable on $(a-R,a+R)$ and for any $0<r<R$, the series $\sum_{n=1}^{\infty} nc_n (x-a)^{n-1}$ converges uniformly to $f'$ on the interval $[a-r,a+r]$.  Now, since $\cos(x)=\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n)!}x^{2n}$ and $\sin(x)=\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)!}x^{2n+1}$ we have $\cos'(x)=\sum_{n=1}^{\infty}(2n)\frac{(-1)^n}{(2n)!}x^{2n-1}=\sum_{n=0}^{\infty}(2(n+1))\frac{(-1)^{n+1}}{(2(n+1))!}x^{2(n+1)-1}=-\sum_{n=0}^{\infty} \frac{2n+2}{2n+2}\frac{(-1)^n}{(2n+1)!}x^{2n+1}=-\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)!}x^{2n+1}=-\sin(x)$  and  $\sin'(x)=\sum_{n=1}^{\infty}(2n+1)\frac{(-1)^n}{(2n+1)!}x^{2n+1-1}=\sum_{n=1}^{\infty}\frac{(-1)^n}{(2n)!}x^{2n}$ and now I'm stuck: I don't know how to recover from here the series of $\cos(x)$.   So, where I'm going wrong?


Is it possible to block Windows 10 Update servers on a firewall by IP, name, and port? Looking to use Windows 10 Pro in a work environment without having it update? If this is possible, what are your thoughts on any affects this may cause to Windows 10 Pro. Do you think disconnecting they system from MS will cause it to unauthenticated the license or cause other issues. We are currently testing this too, will update if we have success.


I installed Ubuntu 10.10 on my Dell Inspiron 1521 and the LAN/Ethernet card was working perfectly but Ubuntu was displaying a message about not installing the Wireless drivers because it was restricted or something along that line.  I then went to the Synaptic Package Manager, searched for all Broadcom packages and installed them. So far so good.  I restarted my computer and to my surprise, my wireless works but my lan isn't! What the heck could be wrong?  I then uninstalled/removed all the packages I installed earlier hoping my ethernet would start working again but hey, nothing changed. My wireless card works and the ethernet still doesn't.  Is there any way of getting this fixed?  I checked and found my network devices were:   Broadcom Corporation BCM4401-B0 100Base-TX (rev 02) Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)


UK Standard visitor visa received but a few documents submitted are missing. How to get them back?

I have submitted the original offer letter of my employment along with the letters as supporting documents for a UK standard visitor visa from India. I have done it through VFS global. I received the visa but a few documents like the opening page of the offer letter are missing. Kindly help me. Is there any procedure to get them back?


Is the word European the only word that doesn't go after "an?"

I can only think of the word European as a word that doesn't go after the word an. Is there any other words that start with a vowel, but don't go after an?


How to remove an element inside a div in jquery

Um trying to remove an HTML element by JQuery as follows  $('#' + divId + ' .settings_class').remove('.print_settings');   This does not throw an error or remove the html element. but the selector correctly retrieves the element.   $('#' + divId + ' .settings_class .print_settings');   How to remove an element inside a div by its class as follows?


Can I recover data from a clobbered NTFS volume?

First of all, yes, I know I'm a moron. Long story short, I overwrote the first few dozen megabytes of a 2 terabyte disk, clobbering the partition table and beginning of an NTFS partition. It's all totally replaceable data, it's just an awful lot, and will be a huge pain in my ass to download over again. Obviously the clobbered data is a lost cause, but I'd like to know if there's any way to partially recover the rest of the data on the old filesystem. I've taken a quick look with the sluethkit and done a bunch of googleling, to no avail. Thanks everyone.


Can't use bold, upright Minion Pro font with LuaLaTeX

When trying to use bold Minion Pro, it also turns the font italic. Like with this:  \documentclass{article} \usepackage{fontspec} \setmainfont{Minion Pro} \begin{document} \textbf{Bold.} \end{document}   I'm using MiKTeX and LuaLaTeX. The problem doesn't appear with any other font I've tried, or when using XeTeX.  I don't recall this happening a while ago, so it might be related to some update.


Present tense in Flashback story for something that is still true now?

I'm wondering whether I should use the present tense for a descriptive statement but in a past context. For example:     (1) I went to the zoo and saw a giraffe last week.       (2) A giraffe is a mammal with long neck.       (3) It is the first time I see that animal with my own eyes.   Statement (2) is a description of a giraffe in general, not the specific one in the zoo, so is it correct to use is?  Statement (3) is an event that is still true now, so should I use is and see?  I'm not native speaker so forgive me if the question is very obvious to others.


When is separation of variables an acceptable assumption to solve a PDE?

We know that one of the classical methods for solving some PDEs is the method of separation of variables. It works for known types of PDEs and many examples of physical phenomena are successfully represented in PDE systems where an assumption that the functions are separable in variables seems to work just fine, and we get correct solutions.  My question is how do we arrive at the conclusion that the assumption that our function is 'separable in variables' is valid/correct for a particular equation in the first place? Also, I suspect that it will rely on the given scenario of boundary conditions too (not only the type of equation), such as how symmetric the boundaries are to the coordinates, whether they are curved or separable in variables themselves, etc.   Here is an example of what I mean: suppose I have the Helmholtz equation, say $\nabla^{2}f(x,y)+k^{2}f(x,y)=0$ and the boundary values are defined for some lines, like $f=0$ for $x=0$ and $x=x_{0}$ and for $y=0$ and $y=y_{0}$. Suppose that separation of variables worked here and we got the solution. Can we solve the same equation using the same method (i.e. separation of variables) for a new domain of boundaries, say that $f=0$ over the line segments $|y|=ax$ for $x\in[0,x_{0}]$ with $a$ being a scalar, or over a curved boundary like $y=ax^{2}$?  The point is, if the boundary conditions are not seperable in the given coordinate variables, wouldn't the method of separation of varaibles fail? This begs the question whether its utility is also subject to the nature of BVs, and not only to the form of the PDEs.  Thanks for any help.


How to write an algorithm in an article in \documentclass{clv2}, can anybody send me a working model with dummy algorithm, because I guess \caption is creating problem. I want to send it to Computational Linguistics journal by MIT press but it is giving lots of errors.


Correlation between continuous variable and nominal variable

I have a data set with the amount of bicycle accidents and the year in which the bicycle accident occurred. I would like to see if there is a significant increase in the amount of bicycle accident per years and by which amount.  I am doubting between Pearson's correlation and Spearman's Correlation. (Or should I use a linear regression analysis?)


How does an SSH connection become inactive?

I have setup an SSH connection to run a program on a remote server. The program prints debug information on the terminal every 10 seconds. If I leave the SSH windows open for a long time (say 10 hours), does the SSH connection become inactive? How is activity defined in an SSH session? Should I type/run command every x seconds to keep the session alive?


Cross product and the right hand rule - what is the intuition behind it?

I understand that by convention, the cross product is defined to be the vertical projection of vector $A$ on $B$ in the case of $A \times B$. But the vertical projection of $A$ on $B$ would still be in the same coordinate-plane as $A$ and $B$. Why should the resultant cross-product necessarily point in the orthogonal direction given by the right hand rule? We have always taken it for granted when solving problems, and my textbook does not make any attempt at an explanation.


When is an edit of a question visible to other users when it requires a peer review?

I have edited a question, and i got this message:     Thanks for your edit!   This edit will be visible only to you until it is peer reviewed.   I then click on peer reviewed link and i can see:     Your suggested edit is pending review.   userXYZ reviewed this 3 hours ago: Approve   I take it my edit has been reviewed by that user and has been approved, right? does it have to be peer-reviewed by more users?  Edit:  I disagree with the "duplicate question" mark given. the question suggested is much more general and does not address my question specifically, This question is much more similar to the one linked on the accepted answer below, but finding that question could prove difficult given its Title is "It takes two to tango?"


If you move into melee range and then back out on the same turn, does it provoke an opportunity attack?

I feel like this question has been asked before, but I couldn't find it.  I know that if you are engaged in combat with someone (or at least in melee range of someone's weapon, 5 feet normally or 10 with polearms) and you move away willingly on your turn, your opponent can make an opportunity attack. I am also aware that if you are engaged in melee combat with a target, you can sidestep around them without them being able to make an opportunity attack if you stay within 5 feet (or 10 for polearms).  What I want to know is, on your turn if you start OUT of the melee range, then enter the melee range (whether by passing or attacking), and then leave the melee range, can your opponent then make an opportunity attack? More specifically for movement purposes.  So if a monk runs past a bandit when he previously wasn't in Melee range before, can the bandit make the attack? Or does he have to start his turn in Melee range and then move?


Minecraft Error Occured. How do I stop this?

Sometimes, when I try to play Minecraft on a singleplayer or multiplayer world, it crashes. Here's the crash log:  Completely ignored arguments: [--nativeLauncherVersion, 307] [14:53:18] [Client thread/INFO]: Setting user: Rightenz [14:53:20] [Client thread/INFO]: LWJGL Version: 2.9.4 [14:53:21] [Client thread/INFO]: Reloading ResourceManager: Default, Tiny Pixels - 25th October - Copy, PF.Resources, novaskin [14:53:23] [Sound Library Loader/INFO]: Starting up SoundSystem... [14:53:23] [Thread-5/INFO]: Initializing LWJGL OpenAL [14:53:23] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org) [14:53:25] [Thread-5/INFO]: OpenAL initialized. [14:53:25] [Sound Library Loader/INFO]: Sound engine started [14:53:27] [Client thread/WARN]: Texture minecraft:textures/blocks/portal.png with size 8x8 limits mip level from 4 to 3 [14:53:27] [Client thread/WARN]: textures: dropping miplevel from 4 to 3, because of minimum power of two: 8 [14:53:27] [Client thread/INFO]: Created: 1024x512 textures-atlas [14:53:49] [Server thread/INFO]: Starting integrated minecraft server version 1.10.2 [14:53:49] [Server thread/INFO]: Generating keypair [14:53:49] [Server thread/INFO]: Preparing start region for level 0 [14:53:50] [Server thread/INFO]: Preparing spawn area: 0% [14:53:51] [Server thread/INFO]: Preparing spawn area: 10% [14:53:52] [Server thread/INFO]: Preparing spawn area: 30% [14:53:53] [Server thread/INFO]: Preparing spawn area: 51% [14:53:54] [Server thread/INFO]: Preparing spawn area: 75% [14:53:55] [Server thread/INFO]: Preparing spawn area: 96% [14:53:56] [Server thread/INFO]: Changing view distance to 4, from 10 [14:53:57] [Server thread/INFO]: Rightenz[local:E:b3a537fb] logged in with entity id 1729 at (-167.2159220274755, 65.0, 113.5371539039923) [14:53:57] [Server thread/INFO]: Rightenz joind teh gaem [14:53:58] [Server thread/INFO]: Saving and pausing game... [14:53:58] [Server thread/INFO]: Saving chunks for level 'New Burld'/Overworld [14:54:00] [Server thread/INFO]: Saving chunks for level 'New Burld'/Nether [14:54:00] [Server thread/INFO]: Saving chunks for level 'New Burld'/The End [14:54:03] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 5092ms behind, skipping 101 tick(s)  # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x27204960, pid=4148, tid=4928 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) Client VM (25.25-b02 mixed mode windows-x86 ) # Problematic frame: # C  [ig4icd32.dll+0x44960] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\VIC\AppData\Roaming\.minecraft\hs_err_pid4148.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release   Is there any way to fix this bug and continue the game without crashes?


What is "restricted maximum likelihood" and when should it be used?

I have read in the abstract of  that:     "The maximum likelihood (ML) procedure of Hartley aud Rao is modified by adapting a transformation from Patterson and Thompson which partitions the likelihood render normality into two parts, one being free of the fixed effects. Maximizing this part yields what are called restricted maximum likelihood (REML) estimators."   I also read in the abstract of  that REML:     "takes into account the loss in degrees of freedom resulting from estimating fixed effects."   Sadly I don't have access to the full text of those papers (and probably would not understand if I did).  Also, what are the advantages of REML vs. ML? Under what circumstances may REML be preferred over ML (or vice versa) when fitting a mixed effects model? Please give an explanation suitable for someone with a high-school (or just beyond) mathematics background!


Is there a preinstalled or automatic firewall?

Does Ubuntu come with a preinstalled or automatic firewall? If not, do I need one?   I've read some articles about the advantages of Linux over other operating systems about security (no need to have antivirus, ...) but would like to be sure.


`command .*` acts on the parent directory

Someone of our team wanted to recursively change the user permissions on all hidden directories in a users home directory. To do so he executed the following command:  cd /home/username chown -R username:groupname .*   We were pretty surprised when we realized, that he actually recursively changed the permissions of all user directories in /home, because .* equals to .. as well. Would you have expected this behavior in Linux though?


How to get a extension of a file using jquery or javascript?

i want to check the type of uploaded file. If name like example.txt, i want to get the .txt part only. How can i achieve it using Jquery or javascript.  Any Suggestions or links would be appreciative!!!


On the right side under scene I have a couple different armatures like armature.001 and armature.002 and bone. I was wondering how I make these all one object I'm trying to parent bone 4 to the neck bone but it wont work. I'm guessing because of these separate armatures.


How many clients on lower end iSCSI targets?

Was wondering if anyone has built an iSCSI server on current AMD hardware. I ask because i am slowly implementing ccdisk on a 28 machine internet cafe. Now i am starting to question my build. I assembled a 6 core AMD FX6300 with 16 gigs of RAM controlling a hardware RAID 6 ; 4 x 2tb WDre drives array. The initiator teams so i purchased a quad pro NIC from Intel.   Is this going to be sufficient to run 28 machines or should i pop for a more robust AM3 cpu ?


register click event on generated html table

I am generating html table on ajax callback like  ... success: function (data) {     if (data != undefined) {         var table = $("
").addClass("table table-striped table-bordered table-condensed");         var header = $("
").html("
a	b	c	d	e	f	g	");         table.append(header);         for (var i = 0; i < data.length; i++) {             var row = $("
");             row.append($("").html(data[i].Id));             row.append($("").html(data[i].Name));             row.append($("").html(data[i].Color));             row.append($("").html(data[i].Doors));             row.append($("").html(data[i].Fuel));             row.append($("").html(data[i].Injection));             row.append($("").html(data[i].Desc));             table.append(row);         };         $("#carsTable").html(table);     } }, ...   On same page using javascript I want to recognize click event on table row of this carTable generated snippet.    $('#carTable tr').on('click', function (e) {       console.log('click!');   });   Is this because of generated html in the callback and if it is how to solve this?


How do I set a connection timeout in Apache http client?

I want to run thread safe, asynchronous HTTP requests using . I noticed that it does not respect my CONNECTION_TIMEOUT argument.  The code is ColdFusion / Java hybrid.  client = loader.create("org.apache.http.impl.nio.client.DefaultHttpAsyncClient").init(); CoreConnectionPNames = loader.create("org.apache.http.params.CoreConnectionPNames");  client.getParams()       .setIntParameter(JavaCast("string", CoreConnectionPNames.SO_TIMEOUT), 10)       .setIntParameter(JavaCast("string", CoreConnectionPNames.CONNECTION_TIMEOUT), 10);  client.start();  request = loader.create("org.apache.http.client.methods.HttpGet").init("http://www.google.com"); future = client.execute(request, javacast("null", ""));  try {    response = future.get(); } catch(e any) {}  client.getConnectionManager().shutdown();     Regardless of what I supply for CONNECTION_TIMEOUT, the requests always return 200 OK. Check the output below.   How do I set an effective connection timeout? Does CONNECTION_TIMEOUT do anything?   Output  200 OK http://www.google.com/  200 OK http://www.google.com/  [snip]  5 requests using Async Client in: 2308 ms


Are Living Beings Turned Into Horcruxes Suceptible to Age, Disease, or Injury?

From the HP books I know that Horcruxes grant a form of immortality. So, it is not possible for someone who created a Horcrux to die from old age or succumb to diseases. I guess the same is true for living beings turned into a Horcrux. But do living Horcruxes age normally? Is it possible to cripple them or sever their limbs, head or something like that, or do they instantly "repair" themselves like inanimate Horcruxes?


How do I restore the glory of the Thieves Guild?

One of the achievements for the Thieves Guild says "Restore the Thieves Guild to its former glory."  Brynjolf doesn't say anything to me, I can't seem to find Karliah, and as far as I can tell, I am finished with the plotline quests for the Thieves Guild. All I have left available are repeatable quests from Vex and Delvin.  How can I get this achievement?


How do you say that some time had elapsed?

I want to express simply that some time had elapsed. Is the following correct?     It was passed 10 minutes.   Are there any alternatives?


Which is better: Employer-sponsored HSA or opening an HSA individually?

So I know that:   Employer-sponsored HSA's allow you to deduct contributions directly from your paycheck, pre-tax With individual HSAs, you must contribute using post-tax dollars, then deduct those contributions from your taxable income when you do your taxes   Given those facts, I guess it's marginally better to use an employer-sponsored HSA because it means the government doesn't temporarily hold on to your taxed income, only to return it later after you do your taxes; you could theoretically put that money to work in an investment vehicle instead of having the government hold it hostage for a while.  But are there any other benefits (either way) that I'm not aware of? The  kind of threw me with the following statement:     The main advantage of making pre-tax contributions is the Federal Insurance Contributions Act tax (FICA) and Medicare Tax deduction, which amounts to a savings of 7.65% each to the employer and employee (subject to limits of the Social Security Wage Base).   But I'm not really sure what that's telling me.  My employer is offering an HSA, but is not offering to contribute to the HSA or match my contributions. So if it's all pretty much the same, I'd rather use the bank of my choosing and manage it privately.  Thanks.


Is it possible to link two data frames so that they mirror each other?  I know I can set the extent of one data frame to that of another data frame, but then you can only pan/zoom in the parent frame.  Basically just want the two data frames to mirror one another.    I would like the flexibility to pan and zoom in which ever data frame is active, not just the "parent" data frame.  This is different from setting the extent of one data frame to match that of another, where only the parent data frame has the ability to pan and zoom.  I am using ArcMap 10.1.  I have made this suggestion to ArcGIS Idea:


Windows 7 won't boot after installing Ubuntu 11

I just installed Ubuntu alongside to Windows 7, and now Windows 7 will not boot.  When the system starts, it shows me entry for Windows 7 in the boot menu, when I click on the Windows 7 option in the boot menu, after few seconds it will show me the boot menu again and Windows will not boot. It shows me no error message. Windows 7 option is available in the boot menu but it just does not boot.  Here are my boot info results   update - 30/01/2012 I tried windows recovery - fix startup issues - that showed no problems but issues were not resolved  Then I tried the widnows recovery console and run following commands  bootrec /fixboot bootrec/ fixmbr bootrec /RebuildBCD   But that does not help, Now neither ubuntu nor windows will boot. When I boot from windows CD it shows me a valid windows installation in c:\ drive.  update After a lot of help I got from #ubuntu channel and trying out different things, ultimately I can now boot both windows and ubuntu, still, the issue is not completely resolved though.  Here's what made it work  Boot using ubuntu live CD and then run the testdisk utility as steps mentioned  Restart system and I was able to see the boot menu and boot into Ubuntu, then put the following code in boot/grub/custom.cfg. Restart and now I can see one more entry to boot win7, clicking on it boots windows.  menuentry "Windows 7 (loader) with grub ntldr workaround" --class windows --class os   {     insmod part_msdos     insmod ntfs     set root='(hd0,msdos1)'     search --no-floppy --fs-uuid --set=root FAF0F57DF0F54085     ntldr /bootmgr }   It will make windows boot probably but now windows have a dependency on Ubuntu and I can not remove Ubuntu or else windows will stop working.  Credit goes to 'Jordan_U' on #ubuntu channel.   update Here are the win7 boot details I got from EasyBCD  Windows Boot Manager -------------------- identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795} device                  partition=C: path                    \bootmgr description             Windows Boot Manager locale                  en-US default                 {04fe8f95-4b17-11e1-a45c-909d3d25f938} displayorder            {04fe8f95-4b17-11e1-a45c-909d3d25f938} timeout                 30  Windows Boot Loader ------------------- identifier              {04fe8f95-4b17-11e1-a45c-909d3d25f938} device                  partition=C: path                    \Windows\system32\winload.exe description             Windows 7 Home Premium locale                  en-US osdevice                partition=C: systemroot              \Windows resumeobject            {8d25a443-4b0a-11e1-a835-806e6f6e6963}   Note Still, I am looking for how can I have everything clean and how can I boot windows without having a dependency on Ubuntu. so that if ever I have to remove ubuntu, windows will keep booting file without ubuntu.


Can I check luggage to both intermediate and final destinations?

I was traveling to from the US to Singapore with an 8 hour stopover in Hong Kong on Cathay Pacific. I checked luggage to the final destination Singapore. I also wanted to check a piece of luggage to Hong Kong only, to give a gift to a friend in Hong Kong not permitted as carry-on. Cathay Pacific did not support this; I could check luggage only to the final destination. For the future, is this possible on other airlines, or is this a policy common to all airlines?   This is not a duplicate of  because I travel with all of the luggage.


Can I use Moment of Perfect Mind in response to a surprise attack?

Say I want to use the Tome of Battle maneuver Moment of Perfect Mind, a maneuver that replaces my Will save with the equivalent Concentration Check.   Out of combat, my warblade and an enemy wizard are negotiating over the price of ferrets. While we are talking he casts a quickened spell of Charm Person.   I have Moment of Perfect Mind readied. Can I use the counter to save as an immediate action, or am I considered flat-footed?


When do we say "skies" instead of "sky"?

You would think we never use "skies" since there's only one sky, but I've heard it often enough that I often want to say "skies" rather than "sky". The problem is that I never gave much thought about it, so I have no idea why I even want to do that.  When do we say “skies” instead of “sky”?


Name of interface with arithmetical methods signatures

I want to make a class that contains basic arithmetical operations with one generic type (it have to be struct) but I can't limit the generic type with something that make sure compiler that this type will be able to do arithmetical operations. Simple example: T Sum<T>(T x, T y) { return x + y; }Error: Operator "+" can't be used on T operands. Using limitation lead to the same problem:T Sum<T>(T x, T y) where T: struct { return x + y; }What name of the class/interface that contains signatures for basic arithmetical operations that I can use in where construction to make sure compiler that generic type will have ability to work with arithmetical operations? I coudln't even find it in .NET documentaion.


How to change the Viewport background color?

I'm trying to change the Viewport background color. But I can't seem to find the right settings.    Anyone knows where to find it?


I want to apply for a Masters degree but have a low average, what can I do?

I´m a recently graduated mechanical engineer, I  want to apply for a Masters degree but my average is quite low for a lot of universities requirements, what can I do in order to be more eligible?


What would happen to other players creatures upon death?

I have  in play. We are playing with 3 people. If i beat one player, would the creatures he own die? So i would get 2/2 zombie tokens from his creatures?


How do I uninstal Ubuntu 20.04 LTS from dual-boot?

Also: I don't use wubi, I do have a 8gb USB if you need it, and I can't really backup anything.


I have been using and making LED flashlights for years now and I am VERY familiar with all of the circuitry and technology inside of them, but I just got my first LED house light bulb that runs off of 110v AC electricity.  It is very similar to a flashlight - it has a large heatsink, and 1 or more LEDs inside of it (brand and specs of emitters, I do not know).  The part that I am most curious about is how the electricity from the socket gets to the emitter.  In a flashlight the power comes from a DC battery through a current regulator (LED driver) and into the LED itself.  This is not difficult because the voltage of common LED emitters is about the same voltage as Lithium batteries (3.7v, 7.4v, etc) which makes the current limiting relatively simple coming from a one or two cell light.  How does this work for a high voltage AC bulb?  Is there a transformer and rectifier inside of EVERY bulb (I sure hope not), or are the emitters manufactured to run off of 110v AC power and just use half of the wave cycle?


What are the theoretical minimum and maximum apertures?

Is there such a thing as a maximum aperture that a lens can be open to?  What about a minimum aperture that it can be closed to?  Do these concepts even make any sense?  Is there a lens with the narrowest aperture in the world?  Is there one with the widest?


How to show that the group of nonzero real numbers under multiplication is not isomorphic to the group of real numbers under addition?

I think it wants me to show that there's no bijection between the two sets.  I first tried to show that there's simply no bijection, then I realised that it doesn't work.  If I'm to show there's no bijective morphism that carries multiplication in nonzero real numbers to addition in real numbers, how am I supposed to do it? I'm thinking about doing something with 0, since it's the element of the first set but not the second set.  Thanks!


conflicting types for 'main' in leetcode platform

#include<stdio.h>  #include<stdlib.h> int* twoSum(int* nums, int numsSize, int target) {     int *a=(int *)malloc(2*sizeof(int));     int i,j;     for(i=0;i<numsSize;i++)          for(j=i+1;j<numsSize;j++)     if(nums[i]+nums[j]==target)     {a[0]=i;a[1]=j;}     return a; } void main(){     int target,i;     int numsSize;     int b[2];     int num[10];     int *s;     s=b;     printf("Please input numsSize");     scanf("%d",&numsSize);     for(i=0;i<numsSize;i++)     scanf("%d",&num[i]);     printf("Please input target");     scanf("%d",&target);      s=twoSum(num,numsSize,target);     printf("【%d,%d】",s[0],s[1]); }   what's wrong with my code? I could run it smoothly on Visual Basic C++,but on the platform it implies that Line 58: conflicting types for 'main',i don't know what happened.


I'm thinking about buying a new car.    I'm thinking of buying a new car.   Do we use "about" or ‘of" in sentences above?


How can i get class names in another class from which one method/function is calling in PHP excluding debug_backtrace() approach or xdebug approach?

I'm having different classes. Now in one class, I'm having the following method/function.  class Currency extends CurrencyClassAbstract {      public function __construct(      }        public function convertMethod($price) {          //need to know here which class is calling this method/function      }  }   Now, there are different classes like product, tax, cartclass, orderclass all these classes are calling convertMethod function of Currency class.  I need to write code in convertMethod of Currency from where (which class) it is calling?  Is there any possible way to do this?


Past simple vs. present simple for the verb "hate"

Which sentence is correct? and Why?   She told me last week she hates action movies. She told me last week she hated action movies.   As "hate" is a sensual verb and it does not finish in the past (you hate a type of movie and it does not change, at least with no mention in the context) I think Number one should be correct. But an English tutor told me the second one is correct as the discussion they are referring to has happened in the past. Which one is correct and why?


Ok, so yes stupid me, apparently I logged in to my Synology back in January and ran an rm -rf * in my @iSCSI node that housed my VMWare DataStore. Then I rebooted both the ESX and Synology about 3 months later. So because the ESX had a file lock open I was writing to the 'deleted' DataStore for those 3 months and when everything rebooted it all finally deleted when the lock released. I lost ~3TB of data. I have managed to run some recovery tools and have found a deleted ~2TB inode that I can recover. My question is, can/should I recover that inode to another disk and somehow crack it open/map it so I can pull just one or two .vmhd files out of it? Just trying to salvage somethings like my daughter's baby pictures. I have access to Windows and various Linux flavors.


I have a code where I try to get a path from an input so this program could append info to another text file. file1 = input("Input the file path:\n") file2 = file1.replace("\", "/")  file2 = file1.replace("\", "/")                               ^ SyntaxError: EOL while scanning string literal  I get this problem and it seems to be because the \ is not seen as a string (if I put \n for example it does work but I need to replace ) An alternative for replacing \ with / could also fix my problem. I used to use r"filepath" but I can't do that with an input I think. I just need to make the input into a raw string.