Below is the delete function for a hash table that uses separate-chaining.  This is working code and searches within the delete function.          void delete_elem(int value)         {             list<int> ::iterator itr;             int hashedIndex = hashFunction(value);              for (itr = myTable[hashedIndex].begin();                     itr != myTable[hashedIndex].end(); itr++)             {                 if (*itr == value)                 {                     break;                 }             }              if (itr != myTable[hashedIndex].end())             {                 myTable[hashedIndex].erase(itr);             }             else             {                 cout << value << " was not found" << endl;             }         }    but this version doesn't work and uses a helper function to do the searching.          void delete_elem(int value)         {                // auxiliary iterator                     list<int> ::iterator tmp;              if (search(value, tmp))             {                 int hashedIndex = hashFunction(value);                  cout << "here3" << endl;                 myTable[hashedIndex].erase(tmp); // this line segfaults                 cout << "here4" << endl;             }             else             {                 cout << value << " was not found" << endl;             }         }          bool search(int value, list<int> ::iterator tmp)         {             int hashedIndex = hashFunction(value);              for (list<int> ::iterator itr = myTable[hashedIndex].begin();                     itr != myTable[hashedIndex].end(); itr++)             {                 if (*itr == value)                 {                     tmp = itr;                     cout << "tmp: " << *tmp << "\n"; // outputs an int, which is fine                     cout << "itr: " << *itr << "\n"; // outputs the same int, which is fine                     break;                 }                 else                 {                     tmp = myTable[hashedIndex].end();                 }             }              return tmp != myTable[hashedIndex].end();         }    Somehow the tmp in my delete_elem() wasn't affected by the search(). How can I change this?  UPDATE (fixed by passing the iterator to the search function as a reference, and just realizing that iterators are NOT pointers in C++, but use pointer-like syntax):  void delete_elem(int value)         {                         list<int> ::iterator tmp;             if (search(value, &tmp)) // passed in tmp as an address             {                 int hashedIndex = hashFunction(value);                  cout << "here3" << endl;                 myTable[hashedIndex].erase(tmp);                 cout << "here4" << endl;             }             else             {                 cout << value << " was not found" << endl;             }         }          bool search(int value, list<int> ::iterator *tmp)         {             int hashedIndex = hashFunction(value);              for (list<int> ::iterator itr = myTable[hashedIndex].begin();                     itr != myTable[hashedIndex].end(); itr++)             {                 if (*itr == value)                 {                     *tmp = itr; // edited                     cout << "tmp: " << *(*tmp) << "\n"; // edited                     cout << "itr: " << *itr << "\n"; // edited                     break;                 }                 else                 {                     *tmp = myTable[hashedIndex].end(); // edited                 }             }              return *tmp != myTable[hashedIndex].end(); // edited         }

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


I'm using \usepackage[style=verbose-ibid,backend=bibtex]{biblatex} to format my references with \footcite{} for the in text references, while also separating my chapters into individual tex files by using \include{ChapterName} in the main tex document.   However, I find that the footnotes seem to reset whever I start a new chapter; references in the first chapter are 1, 2, 3... but in the second chapter it also starts again from 1. I would like the numbering to be continuous, resuming from the last number in the previous chapter.   The other aspects I'm okay with, such as a shortened reference when referring to a reference that was referred to earlier in the document, and ibid when referring to the same reference again on the same page. Just the numbering should be continuous.   What would I need to add to the preamble for it to work like this?  Edit: My question was thought to be a duplicate of  . Instead, my question is the opposite - I want numbering to be continuous throughout the whole report, with chapters resuming the numbering from the previous chapter.   Edit 2: Here's a MWE:  \documentclass{MastersDoctoralThesis} \usepackage{style=verbose-ibid,backend=bibtex}[biblatex] \addbibresource{Bibliography.bib} \begin{document} \mainmatter \include{Chapter1} \include{Chapter2} \end{document}   The auxillary file contents are as follows:  Bibliography.bib:  @Article{gillies,   author = {Gillies, Alexander},   title = {Herder and the Preparation of Goethe's Idea of World Literature},   journaltitle = {Publications of the English Goethe Society},   volume = {9},   date = {1933},   pages = {46--67}} @Article{bertram,   author = {Bertram, Aaron and Wentworth, Richard},   title = {Gromov invariants for holomorphic maps on Riemann surfaces},   journaltitle = {J.~Amer. Math. Soc.},   volume = {9},   number = {2},   date = {1996},   pages = {529--571}}   Chapter1.tex:  Sample text\footcite{gillies}.   Chapter2.tex:  Some more\footcite{gillies} sample\footcite{bertram} text.

I would like to create a document with two chapters. After the first chapter there should be a bibliography. The next chapter should be able to reference items of the former chapter, but only show the new items in its bibliography, starting with the next number from the first bibliography.  Example:     Chapter 1 - The Fu   Fu has been done by Bar [1]. Early versions ...   Bibliography   [1] Bar et. al., Doning the Fu      Chapter 2 - Compining Fu with Herp   Doning Fu as described in [1]   neglects the advantages of Herp pointed out by Derp [2].   Consequently ....   Bibliography   [2] Derp et. al., The Advantages of Using Herp   Please not too much discussion about if that is a friendly-to-use idea, it is not my own demand :)


I was clicking on signing up with Google and got this url which leads to a 404 error. I was doing the following steps:  1)   2) Click on upvote.  3) Click on sign-up with the google account.    The interesting thing is that if I click on "Sign up" at the top on the , it works fine.

How to reproduce:  Wander aimlessly into some meta site (either, logged on some other site or not logged at all) Try to upvote/downvote/do something that requires you to be logged in (this will trigger the login or create an account) Click any login option ... ....  What happens? You get a . What this silly user thinks should happen? Either, allow me to login or do not show me the box to login in the first place. Impact? All per-site metas.


I'm fairly new to programming and am stuck on making a simple menu with switch statements as I keep getting an "Error C2360 Initialization of 'total' is skipped by 'case' label". I am not sure why this is happening or how to fix it! Any help/criticism is appreciated :D #include <iostream> #include <iomanip> using namespace std;       int main()     {         int choice;          double a, b;                  //MENU         cout << setw(20) << setfill('-') << "" << "MENU" << setw(20) << setfill('-') << "" << endl;          cout << "1. Addition " << endl;          cout << "2. Subtraction " << endl;         cout << "3. Multiplication " << endl;         cout << "4. Division " << endl;         cout << endl;          //USER INPUT         cout << "What would you like do do? ";          cin >> choice;          cout << endl;          //SWITCH CASE          switch (choice)         {         case 1:             cout << "Enter 2 numbers: ";             cin >> a >> b;             long double total = (a + b);              cout << "The total is: " << total;             cout << endl;         break;                  case 2:             cout << "Enter 2 numbers: ";             cin >> a >> b;             long double totalM = (a * b);              cout << "The total is: " << totalM;             cout << endl;         break;          }                        return 0;     }

I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem?


I would like to have a keyboard shortcut to write a filename to my clipboard. Currently, I have to hit F2 to start the rename process, followed by CTRL+A to select the whole name and finally CTRL+C to copy the name.  Is there an easier way of doing this? Do I need to create an AutoHotkey script to accomplish this?

Want to copy the file name quickly in Windows. I always use rename, copy , but feel it is quite slow. Any better way?


We have quite a couple of domains where the rightful owner is us, but the nameserver is managed by a third party (subcontractor), who doesn't allow us to change the zone files.  Thus, we are moving to our new nameservers, which we can manage on our own, namely DigitalOcean's free DNS service.  Is it possible and if yes, what disadvantages would it bring if instead of requesting the nameserver change at the registrar for DO's nameservers, I would request a change for ns1.example.com, then I'd create a CNAME record that ns1.example.com points to ns1.digitalocean.com? Would that work?  In that case, if we ever have to move our DNS service from DigitalOcean to some other service, the registrar wouldn't need to change a hundred domains at once with all the administrative hassle, we could simply modify the abovementioned CNAME record.

This is a  about DNS glue records.   What exactly (but briefly) is a DNS glue record?  Why are they needed and how do they work?


Trying to identify this movie I saw a long time ago.  I watched it in the 90s but it was probably from the 80s and not terribly well done either.  Probably B-Movie levels.  I can only remember a few points: There's a ship in deep space and there's a crew of a maybe ~6-8 characters. Stuff happens where characters are slowly killed off.  The only one I remember was a VR machine they use for relaxation.  One guy uses it for VR sex but gets killed during the session. Everyone is tense about the mysterious deaths. Something happens (I think the life support breaks?) and this causes a lot of strife among the crew members who slowly kill each other off. Finally there's like 2 people left after everyone else is dead and they are close to death and they just decide to space themselves so they open the hatch and find out they were on earth (or some planet anyway) all along.  Iirc, the planet looked like a post-apocalyptic one with ruined cities.  It was a simulation to test them or something like that.  Any ideas?  NB: It's not 'Alien Intruder' from '93, that one has the VR aspect, but the film I'm thinking about had the VR as only a minor thing.

I searched wide and far and couldn't come up with a title for a movie I watched somewhere around the mid-90ies up to early 00's as a rerun in late-night television (in Germany, specifically on Vox; but I'm sure it was an American movie to begin with).  Basically, what I remember from the story revolves around a crew in a space station or maybe space ship of some sort. Some crew members murder other crew members and there is some kind of door they are not supposed/unable to go through. Late in the movie they do go through the door and I'm pretty sure one of the first views is a skeleton of a dead security guard. It turns out the whole thing was some kind of simulation gone wrong and they find themselves to be in a (nuclear?) wasteland. And that's pretty much the revelation/wrap-up of the movie, as I recall it.  I would be delighted if somebody had any idea what movie this could be :) Thanks!  EDIT: The whole movie was in color and I think it was feature-length, not just 45 mins.


Software center and synaptics got broken somehow. I seem to have it fixed through sourses.list  but I'm getting errors when I run sudo apt-get update.  (Screenshot will be coming soon)

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


I'm working on solving this inhomogeneous problem with the method of undetermined coefficients using tips from this website: . There is an equation halfway down that looks almost exactly the same as mine, so I referenced it for help, but I'm still not getting the right answer. The equation is this: $$y''-2y'+y=te^t$$ I started out with my "guess" equation as: $Y_P(t)=e^t(At+B)$  Then I took the first and second derivatives: $$Y_P'(t)=e^tAt+Be^t+Ae^t$$ $$Y_P''(t)=e^tAt+2Ae^t+Be^t$$  After finding that I plugged in the three equations to the LHS of the original equation and then separated like terms:  $$e^tt(A-2A+A)+e^t(2A+B-2A-2B+B)=te^t$$ In each of the parentheses I end up with a value of $0$, which can't be right. What am I doing wrong?

In order to solve  $$y''-2y'+y=te^t$$ I did:  $$y = (at+b)e^t\implies\\ y' = ate^t+ae^t+be^t\implies \\y''= ate^t+2ae^t+be^t$$  but when I put these in the differential equation I'm getting zeros eveywhere. Does somebody know what I'm doing wrong?


I'm relatively new to Python and I was interested in finding out the simplest way to create an enumeration.  The best I've found is something like:  (APPLE, BANANA, WALRUS) = range(3)   Which sets APPLE to 0, BANANA to 1, etc.  But I'm wondering if there's a simpler way.

I'm mainly a C# developer, but I'm currently working on a project in Python.  How can I represent the equivalent of an Enum in Python?


After working on this Problem for several Days now i need to ask for help me.  I've made a simple scrpit for uploading CSV in PHP.   It's working fine on my Windows XAMPP so far.   While i moved the script to a Oracle linux server in my company i have a lot of charset issues. German umlauts like ö, ä, ü are displayed like Ã¶, Ã...  function uploading($tmp,$name,$size,$type){     $target_dir = "import/";     $target_file = $target_dir . basename("".date('m-d-Y_H_i_s').".csv");     $uploadOk = 1;     // Check if image file is a actual CSV or fake      if(isset($_POST["submit"])) {         $mimes = array('application/vnd.ms-excel','text/plain','text    /csv','text/tsv');         if(in_array($_FILES['fileToUpload']['type'],$mimes)){            $uploadOk = 1;         } else {           die("Sorry, mime type not allowed");           $uploadOk = 0;         }      }       // Check file size     if ($_FILES["fileToUpload"]["size"] > 500000) {         echo "Sorry, your file is too large.";         $uploadOk = 0;     }      // Check if $uploadOk is set to 0 by an error     if ($uploadOk == 0) {         echo "Sorry, your file was not uploaded.";     // if everything is ok, try to upload file     } else {         if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"],  $target_file)) {           import($target_file);      } else {         echo "Sorry, there was an error uploading your file.";       }    }   }    Here is the csv script with encoding to utf8.      header("Content-Type: text/html; charset=utf-8");     if (($handle = fopen($csv_file, "r")) !== FALSE) {        fgetcsv($handle);           while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {             $num = count($data);             for ($c=0; $c < $num; $c++) {               $col[$c] = $data[$c];              }         //direct encode for testing         $col1 = utf8_encode($col[2]);         $col2 = utf8_encode($col[3]);         $col3 = utf8_encode($col[4]);         $col4=  utf8_encode($col[1]);         $col5=  utf8_encode($col[5]);         echo $col2;         echo $col1;   Th CSV is in utf8, default charset is utf8, i added a header for content type in utf8 and i try to convert every string to utf8 and the encoding still doesn't work  Do you have any idea how to handle the German umlauts?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Is there an easy way to change the font type in ShareLatex? I've tried all of the instructions I could find on their website, but they do nothing.  Let's say, for example, that I wanted to use Windows font Arial in a beamer presentation. How would you do this?

A standard document (e.g. scrreprt) uses roman font family for text and Sansserif font family for titles etc. It is the other way round in beamer. How can I switch the two font families? Or why do beamer define the font families in this way?  For the background: I think this is my problem when using formulas, because they use the Sansserif font instead of the roman version. Formulas using the euler package look really poor.  P.S.: I compile with LuaLaTeX using TeXlive 2013.


I was wondering if anyone knew how to get rid of this burning sensation on my hands from some peppers that I chopped earlier this evening. I've washed my hands multiple times and it seems that I am unable to wash off the acid. Does anyone know of a technique to rid myself of this?

So, I foolishly ignored advice about wearing gloves while handling hot peppers. I thought since they were "just" anaheim peppers I'd be fine... I was wrong, and I repent.   Does anyone know of a way to stop the burning? I have washed my hands repeatedly with soap in hot water and tried OTC burn spray.  I'm really worried about getting it off b/c I have a little baby & I don't want to get it on her, too. Can the oil transfer to someone else still?


I would like to create the following arrow in Inkscape and wonder about the best way to do this:    Should I create all the different lines independently and then merge them together or is there an easier way? The problem with this approach would be that there might then be small gaps or the angles are not consistent etc.

I would like to add an arrow to an Inkscape project. I read this question but it didn't tell how to actually make the arrow:


I thought that running a command with sudo was identical to logging in as the root user and executing the command.  However I have found a few commands that do not work with sudo but do work for su.  For instance,  sudo > mail.log bash: mail.log: Permission denied   but actually typing su and executing the same command works.  Why is this?

Disclaimer: I'm pretty novice at sysadmin stuff.  I'm trying to set up port forwarding in an AWS EC2 instance, this has to be done in the command-line because I don't want to go in and edit anything, it has to be automatic (it's part of a build process).   sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf      Permission denied   The weird thing is I've been (successfully) using sudo for pretty much every command that required su privileges. If I do sudo su before the command (trying it out by hand in an ssh session), then it works.  Reasons behind this? Possible solutions that don't involve sudo su or manual edits?


In a prism, violet light undergoes more refraction than light of higher wavelength. Is there any explanation as to why light of higher frequencies refract more than light of lower frequencies?

It is well known that a  can "split light" by separating different frequencies of light:    Many sources state that the reason this happens is that the  is different for different frequencies.  This is known as .  My question is about why dispersion exists.  Is frequency dependence for refraction a property fundamental to all waves?  Is the effect the result of some sort of non-linearity in response by the refracting material to electromagnetic fields?  Are there (theoretically) any materials that have an essentially constant, non-unity index of refraction (at least for the visible spectrum)?


Driver is missing, it could be easily tell apart that the relevent Intel IGP accelerated driver is not loaded in that specific device because windows move choppily and YouTube playback is dropping frames 80% the time, I have a number of configurations none exhibit such.  Ubuntu 14.04 LTS in Live Trial running on a desktop Atom/Intel GMA; Xubuntu 13.10 running on that desktop; Xubuntu 13.10 running on a Pentium M/Intel GMA; Ubuntu 14.04 LTS in Live trial on that notebook; Xubuntu 13.10 on Asus Eee PC x101ch;  They all load up relevant Intel IGP driver and have smooth video, only Ubuntu 14.04 LTS Live or installed on Eee PC x101ch failed, so all I can figure so far is auto-detection is not working in this particular case, then if I am allowed to manually tune it up I have no idea where the relevant xorg.conf (or even the file itself) should be.

I am looking for instructions on how to install cedarview graphics drivers on Ubuntu 13.04 32bit.  My graphics hardware is a GMA3600 aka Power VR SGX545.  EDIT: It seems that they are not in Raring yet, but only Precise:   EDIT2: they seem to be closed source.


When closing a question as duplicate the "Possible duplicate of" comment is automagically added to the question. However when adding such a comment manually: "possible duplicate of random text" that comment is also removed. To me it doesn't make sense that questions which to not point to a SO / SE question or even comments without any links in it are also removed when the question is closed as a dupe. I just found this out by close voting a question as a dupe of another question, but I also added a manual comment which linked to a user profile (because it contains lots of relevant information for OP and possible future reasons): possible duplicate of this [user](http://stackoverflow.com/users/727208/teresko?tab=answers&sort=votes)'s list.  By the looks of it the script simply checks whether the comment starts with "possible duplicate of" and if it matches it will be removed. The  team also did a quick test with a very simple example which also got thrown away: possible duplicate of testing........  I understand that this issue is minor and there might as well be a technical reason for this (i.e. not having to keep track of automatic vs manual comments), but this behavior is kinda odd to me. I can think of two solutions for this:  keep track of manually vs automagically added dupe comments (again you SO people might have a good reason to not want this). Improve the "dupe comment matcher ™" to at least check whether the comment is in the correct format for "auto dupe comments ™" with a proper link to a question page.

Possible Duplicate:             The first comment on the following question pointed out a previous question and declared that is was similar but not a duplicate.    I responded to the comment, and shortly thereafter the question was closed with a completely different link as a duplicate.  The first comment disappeared, and I thought it was because the owner had deleted it. Later they claim they had not deleted it, so I suspect a bug in the process that closes a question as a duplicate.


There is following sample code combination 5C2.  I want to create all combinations 5C1 , 5C3 , 5C4 and 5C5.  list = [ 0,1,2,3,4 ] 5C1 means (0),(1),(2),(3),(4),(5) 5C2 means (0,1),(0,2),(0,3),..(1,2),(1,3),(1,4)..,(2,3),(2,4) 5C3 means (0,1,2),(0,1,3),(0,1,4),(0,1,5)..(1,2,3),(1,2,4) 5C4 means (0,1,2,3),(0,1,2,4),(0,1,2,5)..(1,2,3,4),(1,2,3,5) 5C5 means (0,1,2,3,4)   Please let me know your advice and comments.  import arcpy import itertools  arcpy.env.workspace = r"C:\path\to\workspace"  base_shapefile = "some_shapefile.shp"  oid_field = arcpy.Describe(base_shapefile).OIDFieldName feature_count = int(arcpy.GetCount_management(base_shapefile).getOutput(0))  for (i, j) in itertools.combinations(range(feature_count), 2):     arcpy.Select_analysis(base_shapefile , "combination_%i_%i.shp" % (i, j), '"%s" in (%i, %i)' % (oid_field, i, j))

I have question about ArcGIS and python script. There are following sample code, So I would like to change Another Field , not OIDFieldName. Please let me know how to change Another Field.  import arcpy import itertools  arcpy.env.workspace = r"C:\path\to\workspace"  base_shapefile = "some_shapefile.shp"  oid_field = arcpy.Describe(base_shapefile).OIDFieldName feature_count = int(arcpy.GetCount_management(base_shapefile).getOutput(0))  for (i, j) in itertools.combinations(range(feature_count), 2):     arcpy.Select_analysis(base_shapefile , "combination_%i_%i.shp" % (i, j), '"%s" in (%i, %i)' % (oid_field, i, j))   These sample code is combination for 5C2. I want to create all combiantions 5C3 , 5C4 , 5C5.


So I imported a part of a latex code to make a good table of contents, but it gives me an extra page after every chapter which I don't want.   \documentclass[11pt]{book} \usepackage[dutch]{babel} \usepackage{amsmath} \usepackage{xcolor} \usepackage{framed} \usepackage{titletoc} \usepackage{etoolbox} \usepackage{lmodern} \definecolor{myred}{RGB}{127,0,0} \definecolor{myyellow}{RGB}{169,121,69} \patchcmd{\tableofcontents}{\contentsname}{\sffamily\contentsname}{}{}  \usepackage{xcolor} \usepackage{framed}  \definecolor{myred}{RGB}{127,0,0} \definecolor{myyellow}{RGB}{169,121,69}  \renewenvironment{leftbar}{%   \def\FrameCommand{{\color{myyellow}\vrule width 2pt depth 6pt} \hspace{10pt}}%   \MakeFramed {\advance\hsize-\width \FrameRestore}}%  {\endMakeFramed}  \makeatletter \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                        \if@mainmatter                          \refstepcounter{chapter}%                          \typeout{\@chapapp\space\thechapter.}%                          \addtocontents{toc}%                                    {%                                        {\protect\parbox{3.5em}{\hfill\Huge\color{myred}\bfseries\thepage}}%                                          \protect\hspace*{.5em}                                         \protect\parbox{\dimexpr\linewidth-4em\relax}{%                                            \protect\begin{leftbar}                                               {\scshape\small\chaptername~\thechapter}\\\sffamily#1%                                            \protect\end{leftbar}}\par\noindent                                     }%                        \else                          \addcontentsline{toc}{chapter}{#1}%                        \fi                     \else                       \addcontentsline{toc}{chapter}{#1}%                     \fi                     \chaptermark{#1}%                     \addtocontents{lof}{\protect\addvspace{10\p@}}%                     \addtocontents{lot}{\protect\addvspace{10\p@}}%                     \if@twocolumn                       \@topnewpage[\@makechapterhead{#2}]%                     \else                       \@makechapterhead{#2}%                       \@afterheading                     \fi} \makeatother \usepackage{graphicx} \usepackage[margin=2cm, paperwidth=210mm, paperheight=297mm]{geometry} \begin{document} \renewenvironment{leftbar}   {\def\FrameCommand{\hspace{6em}%     {\color{myyellow}\vrule width 2pt depth 6pt}\hspace{1em}}%     \MakeFramed{\parshape 1 0cm \dimexpr\textwidth-6em\relax\FrameRestore}\vskip2pt%   }  {\endMakeFramed}  \titlecontents{chapter}   [0em]{\vspace*{2\baselineskip}}   {\parbox{4.5em}{%     \hfill\Huge\sffamily\bfseries\color{myred}\thecontentspage}%    \vspace*{-2.3\baselineskip}\leftbar\textsc{\small\chaptername~\thecontentslabel}\\\sffamily}   {}{\endleftbar} \titlecontents{section}   [8.4em]   {\sffamily\contentslabel{3em}}{}{}   {\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage} \titlecontents{subsection}   [8.4em]   {\sffamily\contentslabel{3em}}{}{}     {\hspace{0.5em}\nobreak\itshape\color{myred}\contentspage}  \tableofcontents \newpage    \pagenumbering{arabic} \chapter {chapter one} \section{sectionone} some text \chapter {chapter two} \end{document}

Possible Duplicate:          I am using a document class amsbook which I like very much, except for one thing: each new chapter starts on an odd-numbered page. Therefore, it happens that I get a whole blank page in the text, which I dislike. Is it possible (and easy?) to force the new chapter to start immediately on the next page after the preceding chapter? Can it be made automatically?


I get this error:      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException   code is  import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.sql.ResultSet; import javax.swing.JOptionPane;  public class Bookstore extends javax.swing.JFrame {      Connection con;     Statement stmt;     ResultSet rs;      public Bookstore () {         initComponents();         DoConnect();     }      public void DoConnect() {         try {             String host = "jdbc:derby://localhost:1527/Database";             String userName = "user2408";             String password = "password2408";             Connection con = DriverManager.getConnection(host, userName, password);              Statement stmt = con.createStatement( );             String SQL = "SELECT * FROM SHELF";             ResultSet rs = stmt.executeQuery( SQL );              rs.next();              int ID= rs.getInt("KeyID");             String BookID = Integer.toString(ID);             String BookName = rs.getString("Name");             String AuthorName = rs.getString("Author");             String ReleaseDate = rs.getString("Release");             String AuthorContact = rs.getString("Email");             float Price = rs.getFloat("Price");             String BookPrice = Float.toString(Price);              BookIDTF.setText(BookID );             BookNameTF.setText(BookName);             AuthorNameTF.setText(AuthorName);             ReleaseDateTF.setText(ReleaseDate);             AuthorContactTF.setText(AuthorContact);             BookPriceTF.setText(BookPrice);          }         catch (SQLException err) {             JOptionPane.showMessageDialog(Bookstore.this, err.getMessage());         }     }     private void NextButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                    try {             if (rs.next()) {  //this is where error occurs                 int ID= rs.getInt("KeyID");                 String BookID = Integer.toString(ID);                 String BookName = rs.getString("Name");                 String AuthorName = rs.getString("Author");                 String ReleaseDate = rs.getString("Release");                 String AuthorContact = rs.getString("Email");                 float Price = rs.getFloat("Price");                 String BookPrice = Float.toString(Price);                  BookIDTF.setText(BookID );                 BookNameTF.setText(BookName);                 AuthorNameTF.setText(AuthorName);                 ReleaseDateTF.setText(ReleaseDate);                 AuthorContactTF.setText(AuthorContact);                 BookPriceTF.setText(BookPrice);             }             else {                 rs.previous();                 JOptionPane.showMessageDialog(Bookstore.this, "End of File");             }         }         catch (SQLException err) {             JOptionPane.showMessageDialog(Bookstore.this, err.getMessage());         }     }   Java throws NullPointerException (usually abbreviated NPE) when you try to invoke a method or reference a property on an object that is null.  I've read this 10 times already and I still have no clue what could be wrong.  If I would comment/remove the next button function it would work. Constructor loads first row from the database into the app. What I want to understand is why it doesn't work for the next function. Mentions: Table has 3 entries so there is a next entry to go to which means the table is not the reason for NPE

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


I am trying to understand a multicast code, and I don't understand the utilities of a little part :  int fd_socket = socket(AF_INET, SOCK_DGRAM, 0); u_int yes = 1;  setsockopt(fd_socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));   I don't understand the utilities of the setsockopt function. I understand that this function permits to modify the socket in the kernel, and SOL_SOCKET is because my modification is about the level of the socket and not of the level of a protocol. I don't understand SO_REUSEADDR.

I have used SO_REUSEADDR to have my server which got terminated to restart with out complaining that the socket is already is in use. I was wondering if there are other uses of SO_REUSEADDR? Have anyone used the socket option for other than the said purpose?


The light would take 93 billion years to reach the edge of universe but nothing can travel faster than the speed of light not even the big bang?

The observable universe is approximately 13.7 billion years old. But yet it is 80 billion light years across. Isn't this a contradiction?


test = 0; for( i = 0; i < n; ++i )     for(j = 0; j < i; ++j )         test++;  My trouble is calculating the cost for the inner loop. Since it will run whenever it is less than i, i'm guessing worst runtime of that inner loop would be O(i) which is essentially O(n) so then overall would be O(n^2)?

I need to calculate the time complexity of the following code:  for (i = 1; i <= n; i++) {   for(j = 1; j <= i; j++)   {    // Some code   } }   Is it O(n^2)?


Trying to reorganize folder structure as all components are currently under 1 lwc folder. Came across this post   It answers the first problem of overcrowding unrelated components in 1 folder. But is it possible to import lwc components from other lwc folders? I didn't see anything in the OP docs about this.  To be clear, I'm talking about entire components with html, css, js and xml - not just utility functions.   Thank you

Trying to do something relatively simple. I've 2 LWC component under the lwc folder: lwc/cmp1 and lwc/cmp2  How can I create a new ES6 module that will serve as a utils.js file and then import it to each of cmp1 and cmp2?  I tried creating the utils.js file on cmp1 folder but couldn't import it to cmp2. Tried creating a new folder under lwc folder but it still didn't work (can't import).  The error I keep on getting is:  force-app/main/default/lwc/utils/utils.js  LWC1011: Failed to resolve import "../utils/utils" from "cmp1.js". Please add "../utils/utils" file to the component folder.   There is no problem with the path given, VSCode easily find the related path and indicates no errors, only when trying to deploy to Salesforce


I'm on an amzn-linux instance which by default runs linux-4.9. I've compiled and booted linux-4.14.14 from source and I've compiled systemtap from source. Now I'd like to get them both working nicely together. Systemtap requires linux-debuginfo package. I'm running into a myriad of issues just trying to enable this or get it installed:   amzn-main-debuginfo yum repo only provides kernel-debuginfo-4.9 I cannot find a kernel-debuginfo-4.14.14 package i cannot find kernel-debuginfo-4.14.14 source code so I can compile it from scratch I cannot find a CONFIG_DEBUG_INFO option for make menuconfig for linux-4.14.14 if I manually add CONFIG_DEBUG_INFO=y to linux-4.14.14/.config it gets deleted before compilation   If there's any way to fix any one of the above things, I think I can get this to work.

I've already finishing compiling the kernel from source,  but how to compile it with debug symbols,what additional steps to I need to take?


I was working with the Arduino IDE. I tried to find out from where a MCU can be locked so that nobody can make a clone from it. I found many answers describing something about lock bit.  I realized that this lock bit can somehow stop users from cloning the chip.  My first question is with which IDE or programmer I can change the lock bit? Second question : Can it be edited with a hex editor? If it is possible, what is the position/which number of bit should be changed? Third question: Is there any way to encrypt the code?

I'm trying to protect whole flash from reading through ISP. It has bootloader, able to self program application section.   Setting lock byte to:   LB1/LB2 will not let user to use bootloader to upload new firmware.   BLB12/BLB11 and BLB01&BLB02 will not prevent reading flash through ISP, if I am not mistaken.   So there is no way to let user update firmware by custom bootloader and protect flash from reading at the same time?


In season 1 walkers can pick up rocks and break windows, climb fences and appear to look around. in later seasons they only walk and are easily distracted by noise. Why have their abilities changed?

I enjoy The Walking Dead, however one question keeps nagging me. The 'Walkers' are always shown to not have any intelligence or memory of having been human. This is for all seasons except the very first one.  In the very first scene of Season One, Episode One, we see a little zombie girl stop to deliberately pick up a teddy bear from the ground.   Later in the same episode we see a zombie apparently try to turn the door knob to get into Morgen Jones' house.  Also at Atlanta they can climb fences and used rocks to break glass.  After season 1 I do not recall seeing any such intelligence demonstrated by a zombie again.  My question is: are these initial displays of intelligence a discrepancy in the story, or is there a plausible explanation why the Walkers performed these actions?


Where can I get a Stack Overflow-like site to use as my company's knowledge base?

Is the Stack Exchange engine that powers Stack Overflow available to download or install internally for an enterprise or company?  I think Stack Exchange's engine is very great and could be very cool to use for internal enterprise patterns and practices, like the engine of Wikipedia.


So, I have a weird question: In dialogue, why do we put the end punctuation within the quotations?  Example:     "I like burgers," he said.   This doesn't seem logical to me, and I have been guilty of writing this way for a while, but I was talking to someone about it and realized that it doesn't make much sense. I assume it is purely conventional and arose from typographical reasons. However, what would be a logical excuse for it, or would there even be one?   In other situations of quotes, I never put the punctuation on the inside, unless it is a part of that material specifically. For example: I like the move "The Dark Knight”.  Would it be acceptable to write the top sentence as:       "I like burgers", he said.   I deal a lot with technical writing, so logic is something my mind needs.

I've learned that American English use double quotation marks and place periods inside quotation marks while British English use single quotation marks and place periods outside quotation marks.     American: He called this phenomenon "the memory of water."      British: He called this phenomenon 'the memory of water'.   But some media adopt another style similar to the following sentence. Is this style British or American English?     He called this phenomenon "the memory of water".   Another question about American punctuation: Which of the following is correct in American English?     Did he call this phenomenon "the memory of water?"      Did he call this phenomenon "the memory of water"?


Can this code  class Point:     def __init__(self,x,y):         self.x=x         self.y=y     def __str__(self):         return "Point({},{})".format(self.x,self.y) p=Point(3,5) print(p)   be modified to following code?  class Point:     def __init__(p,x,y):         p.x=x         p.y=y     def __str__(p):         return "Point({},{})".format(p.x, p.y) p=Point(3,5) print(p)   It seems to be worked in this case. But it is so naive case. I wonder using other than 'self' will cause some problem in some situations.

When defining a method on a class in Python, it looks something like this:  class MyClass(object):     def __init__(self, x, y):         self.x = x         self.y = y   But in some other languages, such as C#, you have a reference to the object that the method is bound to with the "this" keyword without declaring it as an argument in the method prototype.    Was this an intentional language design decision in Python or are there some implementation details that require the passing of "self" as an argument?


Why does treating differential elements like fractions work so well? I studied calculus from a pure math perspective first, and have only basic knowledge of it, so can someone explain with a rigorous proof or a simple explanation why this hack works? Some people told me that treating differentials like fractions is a sin. Can anyone give me an example where treating differentials like fractions fails to work?

Background  I am a first year calculus student so I would prefer if answers remained in Layman's terms.  It is common knowledge and seems to me a mantra that I keep hearing over and over again to "not treat differentials/derivatives as fractions".  I am of course, in particular, referring to Leibniz notation.  However, aside from a quick response such as "oh, it's because its not a fraction but rather a type of operator", I never really got a full answer as to why we can't treat it as such. It just kind of sits at the edge of taboo in my mind where it sometimes gets used and sometimes doesn't.  Confusion is further compounded when a lot of things seem to just work out if we treat them just as fractions (e.g. u-substitution / related-rates)    Example     Air is being pumped into a balloon at a rate of $100cm^3/s$. We want the rate of change of radius when the radius is at $25cm$.   $$\text{we are given}\ \frac{dv}{dt}=100cm^3/s$$ $$\text{we want}\ \frac{dr}{dt}\ \text{when}\ r=25cm$$ Thus we will solve this by using the relation $v=\frac{4}{3}\pi r^3$ $$\frac{dv}{dt}=\frac{dv}{dr}\frac{dr}{dt}$$ $$\frac{dv}{dt}\frac{dr}{dv}=\frac{dr}{dt}$$ $$100\frac{1}{4\pi r^2}=\frac{1}{25\pi}$$ So the answer is $\frac{dr}{dt}=\frac{1}{25\pi}$ when $r=25cm$  *Note the manipulation of derivatives just as if they were common fractions using algebra.    Question  When exactly can I treat differentials/derivatives as fractions and when can I not?   Please keep in mind that at the end of the day, I am a first year college student. An answer that is easy to understand is preferred over one that is more mathematically rigorous but less friendly to a beginner such as me.


My question: $$\iint_D  xy \,dA\,,$$ where $D$ is the region bounded by $y = x - 1$ and parabola $y^{2} = 2x + 6$  Quick question, what does the inner integrand represent? Anyway here's how I set up the double integral with respect to y as the inner integrand: $$\int_{-1}^{5} \int_{-2}^{4} xy \,dy \,dx$$ $$\int_{-1}^{5} \int_{-2}^{4} (y+1)y \,dy \,dx$$ $$\int_{-1}^{5} \int_{-2}^{4} (y^2 + y \,dy \,dx$$ $$\int_{-1}^{5} \left[\left(\frac{y^3}{3} + \frac{y^2}{2}\right)\right]_{-2}^{4} \,dy \,dx$$

$$\int \int xy dA$$ where D is the region bounded by $y = x - 1$ and parabola $y^{2} = 2x + 6$  Quick question, what does the integrand represent? I see that 5,4 is an intersection point, but 5 * 4 = 20 and I'm not sure what the integrand is even supposed to represent. Anyway here's how I set up the double integral: $$\int_{-1}^{5} \int_{x-1}^{2x+6} xy \,dy \,dx$$ $$\int_{-1}^{5} \int_{x-1}^{2x+6} (y+1)y \,dy \,dx$$ $$\int_{-1}^{5} \int_{x-1}^{2x+6} (y^2 + y \,dy \,dx$$ $$\int_{-1}^{5} \left[(\frac{y^3}{3} + \frac{y^2}{2})\right]_{-2}^{4} \,dy \,dx$$


I have been trying to prove the following theorem:      Every maximal ideal in $\mathbb{Z}[x]$ has the form $(p, f(x))$ where $p$ is prime integer and $f$ is primitive integer polynomial that is irreducible modulo $p$.    Idea: I tried to establish a homomorphism $\phi: \mathbb{Z}[x] \rightarrow \mathbb{F}$. Since $\mathbb{F}$ is a field it has characteristic $p$ and so integer prime p are mapped to 0 in $\mathbb{F}$. Hence $p\in \ker \phi$. Next we consider $\phi': \mathbb{Z}[x] \rightarrow \mathbb{Z_p}[x]$ and pick an arbitrary maximal ideal $M\in \mathbb{Z}[x]$. So, $\phi'(M)$ is maximal as long as $p \in M$ by correspondence. But now I am stuck at this stage and do not know how to proceed. I guess we might have to use primitivity given in problem but dont know how.

Let $\mathbb{Z}[X]$ be the ring of polynomials in one variable over $\Bbb Z$.  My question: Is every prime ideal of $\mathbb{Z}[X]$ one of following types? If yes, how would you prove this?  $(0)$.  $(f(X))$, where $f(X)$ is an irreducible polynomial.  $(p)$, where $p$ is a prime number.  $(p, f(X))$, where $p$ is a prime number and $f(X)$ is an irreducible polynomial modulo $p$.


For this question I need to prove that $E(X^2)$ ≤ $E(X)$ given that X is a random continuous variable with probability distribution values between 0 and 1. I also want to prove $Var(X)≤ 1/4$  So far I know that $Var(X)=E(X^2)-(E(X))^2$

Suppose that a random variable has a lower and an upper bound [0,1]. How to compute the variance of such a variable?


How to prove that  $$\sum_{n=1}^{\infty}\frac{1}{4^n\cos^2\frac{x}{2^n}}=\frac1{\sin^2x}-\frac1{x^2}$$


Many works and many research about irrationality of $\pi$ appear every year for predicting more digits for the tanscendental number which is $\pi$, The question that made me confused is :Why mathematicians  attempt to find more  digits for  $\pi$  since it has no last digit ?

I was reading today that someone found $\pi$ to the ten trillionth digit.  Whenever I read that $\pi$ has been calculated to more digits, I ask myself whether this is useful.  I know that there are conjectures out there about distributions of numbers in $\pi$ and such.  So, I supposed knowing more digits helps us test conjectures.  But, are there more reasons that we would want to know the digits?  Anything really cool I'm ignoring or forgetting?


Let $f:[a,b]\to\mathbb{R}$ be continuous and suppose that  $$\int_a^bf(x)dx=\int_a^bxf(x)dx=\int_a^bx^2f(x)dx=0$$  Show that there are distinct points $x_1,x_2,x_3\in(a,b)$ such that  $$f(x_1)=f(x_2)=f(x_3)=0$$  I think this requires mean value theorem for integrals. But this can only show the existence of one such point, how to see there are at least two more?

Assuming $a<b$, function f(x) is continous at [a,b], and we have  $\int_a^bf(x)dx=\int_a^bxf(x)dx=\int_a^bx^2f(x)dx=0$  Prove that $\exists \ x_1,x_2,x_3\text {(different from each other)}  \in(a,b)$ satisfying $f(x_1)=f(x_2)=f(x_3)=0$.  I have proved the existence of one zero point by differential mean value theorem, but have no idea about going on.  Thanks for any solution or hint.


Well I'm not a photographer and I'm kind of noob at editing photos. xD  I need something basic and free. Like I'll crop, resize, maybe use paint brush. Also I need blur tool so that I can blur native 'text/photo' from a screenshot. :) A couple of basic filer (for a few photos that needed to be posted in Social Media) Though it is not mandatory.  Using Ubuntu 12.04

I want something similar to "preview" in macs.  For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and white, change size or format, crop.  THATS IT.  I know gimp can do all those things but its a bit overkill.  I just want to right click an image, open it with this magical program i just described, do a few quick adjustments, and then save and exit.  Nothing really fancy.  Anyone know of anything like this?  Btw I am using ubuntu 12.04 :) It rocks and I am glad I switched from mac, i just need to replace this one piece of software.


Following Question. I have a big amount of ArrayList attributes (basically the same as Kreuzlagerort20kg etc). Instead of initializing them all in the constructor (the part commented out) i'd love to initialize them inside the fillLager() method, making it possible to call the method inside the constructor and have them initialized and filled then. If i do it in the code, i always get a nullpointerexception.   Is it possible and/or sensible to initialize an arraylist inside a method, without getting said nullpointer?  import java.util.ArrayList; public class Lager { private ArrayList<Screws> KreuzLagerort20kg,KreuzLagerort50kg;  public Lager(){         //KreuzLagerort20kg = new ArrayList<Screws>();         //KreuzLagerort50kg = new ArrayList<Screws>();          fillLager(1,KreuzLagerort20kg,20);         fillLager(1,KreuzLagerort50kg,50); }  public void fillLager(int typ,ArrayList<Screws> lager,double lagerGewicht){       lager = new ArrayList<Screws>();       // code that loops through combinations and adds them to the arraylist     }}}}}}

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


If ex is followed by two words or adjectives, then does ex imply to the first adjective only or it will be applied to second adjective aswell e.g, ex-muslim pakistani.

Does it mean neither a muslim nor a pakistani anymore? Or it means muslim and ex pakistani. I will be very thankfull if you people kindly elaborate this for me.


In windows 7, I have tried to do the following, in order to rename my account name to a new name:  control panel -> account details -> rename to a new name regedit -> rename everything containing my old name to the new name C:\Users -> rename the folder from old name to new name reboot  However, I receive some errors sometimes when trying to edit/delete files, saying "you need -old name- administration permission to modify/delete this file" and it won't let me do it in any way. If I reboot the system, I can then modify/delete the file and the permission error is gone. Also in task manager, I can see all processes are running with old name under "User Name" column. What did I miss there?

I'm using Windows 10 on my personal computer (HP Pavilion Laptop) and you can see in the Screen Shot under C:\Users there are two folders.    The name of the first folder is C:\Users\SINGHA, however, the correct spelling of my last name is SINHA.  I need to change the name of this folder to C:\Users\SINHA so that it shows the correct name.     Under User Account, the spelling of my name is correct - it's only under C:\Users\ where the name is spelt incorrectly. Consequently, if I open/edit a Word or Excel document, the name of the owner being shown is the incorrect one (i.e it's shown as C:\Users\SINGHA instead of C:\Users\SINHA)   If I right-click on this folder, I won't get the Rename option; How can I change the name of this folder?


My question beyond to get an instance, is how to get this instance as wpf UserControl.  I have a UserControl (Holder) that can show another UserControls (childs) into it, those controls are into same assembly, but user can select which ones must place into holder.   I´m creating the instances as this:          CapturasAdicionalesControl ctr = d as CapturasAdicionalesControl;         List<ICapturaAdicional> capturas = ctr.Capturas;         string assemblyName = "MyAssemblyPath";          Assembly assembly = Assembly.Load(assemblyName);          foreach (ICapturaAdicional captura in capturas)         {             Type capturaObj = assembly.GetType($"{assemblyName}.{captura.Control}");             InsertCaptura(capturaObj);         }   I get my type, but when try to add into Holder it generates an invalid cast from type to UserControl.  I was trying to use (UserControl)MyType ... MyType as UserControl with no results.  Now my questions are:    How to cast / convert my type (allready a usercontrol) to UserControl   if one isn't posible   How to get my user control as Usercontrol directly from the assembly  or how to create an instance of it if only have it's name?  Another approach would be very appreciated?     EDIT 1       private static Grid InsertCaptura(UserControl instance)     {         Grid NewGrid = new Grid()         {             Style = (Style)Application.Current.FindResource("TabOptionBackGroundStyle")         };         NewGrid.RowDefinitions.Add(new RowDefinition() { });         NewGrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });         NewGrid.RowDefinitions.Add(new RowDefinition() { });          NewGrid.ColumnDefinitions.Add(new ColumnDefinition() { });         NewGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });         NewGrid.ColumnDefinitions.Add(new ColumnDefinition() { });          Grid.SetColumn((UIElement)instance, 1);         Grid.SetRow((UIElement)instance, 1);          NewGrid.Children.Add((UIElement)instance);          return NewGrid;      }

One may not always know the Type of an object at compile-time, but may need to create an instance of the Type.    How do you get a new object instance from a Type?


I have simplified the inequality as these but, can't proceed further: $$3(\cos A + \cos B + \cos C) \geq 3 + 2(\cos A\cos B + \cos B\cos C + \cos C\cos A)$$ $$(2\cos A-1)(\cos B-1)+(2\cos B-1)(\cos C-1)+(2\cos C-1)(\cos A-1) \leq 0$$

Prove that in any triangle $ABC$ the following inequality holds $$\cos{A}+\cos{B}+\cos{C}\ge\dfrac{1}{4}(3+\cos{(A-B)}+\cos{(B-C)}+\cos{(C-A)})$$  And I have gotten $$8(\cos{A}+\cos{B}+\cos{C})\ge 6+2(\cos{(A-B)}+\cos{(B-C)}+\cos{(C-A)})$$  $$2(\cos{(A-B)}+\cos{(B-C)}+\cos{(C-A)})+3=(\sum_{cyc}\cos{A})^2+(\sum_{cyc}\sin{A})^2$$ $$\Longleftrightarrow 8\sum_{cyc}\cos{A}\ge 3+(\sum_{cyc}\cos{A})^2+(\sum_{cyc}\sin{A})^2$$ then Any hints, ideas? Thanks in advance.


Do Lightning components support iframes? I tried putting an iframe tag on a component and nothing displayed. I am aware that you can host a visualforce page from Lightning and have an iframe in that although not recommended by Salesforce. My scenario is to display iframe content in a customer community using the Napili template and I was thinking of using a custom Lightning component as a means of doing so. Trying to put an iframe directly into the 'Rich Content Editor' component does not work. Possibly the 'force:canvasApp' Lightning component could be an alternative. Any advice on the feasiblity/right direction on this appreciated

Is it possible to add iframe directly in a lightning component as below to visible in community sites ?  <aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >     <iframe width="800" height="600" style="border: 1px solid" src="---" /> </aura:component>


Sorry if it's an amateur question. I cant seem to find the right answer to it. What is the android (java) equivalent of swift's:  "somestring".data(using:.utf8)   method?  Thanks a lot  EDIT:  I am creating a java version of the following method:  guard let data = "\(user):\(password)".data(using: .utf8) else { return nil }  let credential = data.base64EncodedString(options: [])  return (key: "Authorization", value: "Basic \(credential)")

In Java, I have a String and I want to encode it as a byte array (in UTF8, or some other encoding). Alternately, I have a byte array (in some known encoding) and I want to convert it into a Java String. How do I do these conversions?


How can I calculate the value of the infinite sum $$\sum_{x=1}^\infty x^{-x}$$ By comparison to a geometric series, I know that it converges, but I don't know how to calculate an exact value. So far I have tried the following:   I have tried to turn it into a telescoping sum, but have had no luck I tried adding a variable and differentiating it to create an easier sum   Any hints?

In the solution of the so-called , one of the key steps is to compute $$\int_0^1 x^n (\log x)^n~\mathrm dx$$ using the change of variables $x = \exp\left(-\frac{u}{n+1}\right)$ to obtain the Gamma function.  This substitution to me, looks like it was pulled out of thin air. Can someone help me motivate it? How would I have thought of this substitution?


let $x,y,z$ be positive real numbers  $$\frac{x^2}{y+z}+\frac{y^2}{x+z}+\frac{z^2}{x+y} \ge \frac{1}{2}(x+y+z)$$  then how to prove above by Cauchy Schwarz  -Inquality

If $x,y,z\gt 0$ and $xyz=1$ Then find the minimum value of $\displaystyle \frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}$   $\bf{My\; Try::}$Using Titu's Lemma $$\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}\ge \frac{(x+y+z)^2}{2(x+y+z)} = \frac{x+y+z}{2}\ge 3\frac{\sqrt[3]{xyz}}{2} = \frac{3}{2}$$  and equality holds when $$x=y=z=1$$  My question is how can we solve it without the above lemma, like using Jensen's Inequality or other inequality.  Please explain me.  Thanks


I am able to login in through the terminal without any problem but when I enter my password in the login box(GUI) it doesn't show any error, just that is prompts me again to enter my credentials. I tried to enter other passwords but it gives me error.  This issue started after I created another user account on my system. Any ideas how cant I sort it out?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


How do i update this iframe every 5 sec with js?

   It is on an cms system with content from another source.

I would like to reload an <iframe> using JavaScript. The best way I found until now was set the iframe’s src attribute to itself, but this isn’t very clean. Any ideas?


Suppose $x_1,x_2,\cdots,x_k$ is any finite set of vectors in $\mathbb{R^n}$. A convex combination of these vectors is $\sum_{i=1}^{k}\lambda_ix_i$ where $\sum_{i=1}^{k}\lambda_i=1$ and $\lambda_1,\lambda_2,\cdots,\lambda_k\geq 0$. The set $C$ which contains all the convex combinations is called convex hull.  Show that $C$ is compact in $\mathbb{R^n}$.  I know that since the underlying space is $\mathbb{R^n}$, using Heine-Borel theorem we need to show the boundedness and closedness. For the boundedness if I assume the  2-norm of $x_i$'s is bounded, i.e., $\|x_i\| \leq \|M\|$ then   $$ x=\sum_{i=1}^{k}\lambda_ix_i \leq \sum_{i=1}^{k}\lambda_i \|M\|=\|M\| $$   But for the closedness we need a sequence $(x_k)$ in $C$ and show this converges in $C$. How to show this part?

Is the convex hull  of a finite set of points in $\mathbb R^2$ closed? Intuitively, yes. But not sure how to show that. Thanks!


I'm looking to implement version control across my team and I need a starting point.   Criteria I need:    Something that integrates well with our software stack: Sketch and Zeplin Stored in the cloud Shows previews of the files   I've looked at Git but as far as I've seen it doesn't let me preview files to see whats in them, is there something that does this?

I've just been searching around the net for version control that has some support for graphic/Photoshop files. We're currently using BitBucket which is free and unlimited when it comes to file size but doesn't have any design review tools.  Here's what I've found. Does anyone else have any recommendations?  Pixelapse – Free/Beta, works well. Now has layer comp support.   Shipment – Private Beta (waiting for an invite)   LayerVault (out of business) – Windows/Mac, has layer comp support   PixelNovel – SVN Version control for Photoshop   CAD only?! But looks really good.   FileTrek – Very enterprise. No price or demo.   Kaleidoscopeapp – GIT with image compare   Apps that copy files with an incremented version


This is a practical, and basic question. I have a multivariate Gaussian in $M$ dimensions with center $\mu$ (known, lets assume $0$) and some points $p$ where I have the value of  $$     \ln(L)= -\frac{1}{2}\mathbf{x}^{\rm T}\boldsymbol\Sigma^{-1}\mathbf{x} $$  My questions is how do I find $\Sigma$ exactly, given $\ln(L)$ and $\mathbf{x}$ values? I.e. which quantities go into a linear matrix equation solver $Ax=b$.  In particular, I am confused how to make a system of linear equations built from this one matrix multiplication.

I have the equation $ \mathbf{x}^T A \mathbf{x} = b $, where $b$ is a scalar, $\mathbf{x}$ a vector of size $M$, and A a matrix of size $M\times M$. $b$ and $\mathbf{x}$ are given.   How many such equations do I need to find the (common) $A$, and how do I do it?


Is there a website like Stack Overflow that specializes in code review? I always have code that needs to be reviewed. Is there a specialized website for that?

I have a coding question with two compilable options. I want to ask which is better and why. Code review, programmers, stack exchange...im not really sure? Where is this question appropriate.   It may be an opinion based question and it may not. I don't really know until I know the answer. Like I said, both ways produce the same results, but I don't know which is the better practice.   What site does this belong on?


I don't like "..." at apps label, I have Ubuntu 18.04. I would like the app name to show in two or more lines if it does not fit in one single line.

This question has been asked before but that was over 6 years ago and I'm hoping to get a more updated answer.     Basically when I search for an application, if the name is too long it's shortened with an ellipsis (...). I want to know how to change it so that the whole name is displayed. Example:   I hope it's OK to ask for an updated answer.  I'm using Ubuntu 17.10 with GNOME Shell 64-bit.


I see these two:       The first uses a very different definition of Riemann integrable functions. The second post offers casual intuition, not a formal proof.  The definitions I'm working with:  A Riemann Sum is defined for a partition $\mathcal{P}$ of $[a,b]$ as:  \begin{align*}   \mathcal{R}(f, \mathcal{P}) &= \sum\limits_{j=1}^k f(s_j) \Delta_j \\ \end{align*}  The function is Riemann integrable if Riemann sums converge to a number $\ell$ as the mesh sizes of the partitions approach zero. A function $f$ is Riemann integrable if for any $\epsilon > 0$, there must exist some $\delta > 0$ and some partition $\mathcal{P}$ such that:  \begin{align*}   m(\mathcal{P}) < \delta &\implies |\mathcal{R}(f, \mathcal{P}) - \ell| < \epsilon \\ \end{align*}  Intuitively, if $f$ is unbounded, it looks like that Riemann sum will not converge, but I can't see how to formally demonstrate that.

Hi i was wondering if  anyone could help me with my revision This is a question of a past paper i'm stuck on.  Let $$f:[a,b]\to \Re$$ be Riemann intergrable. Part (a) is to prove that f is bounded and part (b) is to Give an example of a bounded function f that is not Riemann integrable  my attempt for part (a) is since f is Riemann intergrable then it is continuous on [a,b] which means that it must also be bounded? or is this incorrect i find this topic rather difficult  For part (b) i dont really have a clue i cant recall any function like the one they ask for


Studying English today, I see the following question:     A: Do you often go to the cinema?      B: No, _______ a long time.   The answer was "I haven't been to the cinema for", but I did't know why "I haven't gone to the cinema for" is wrong.  Could you tell me that? Thank you in advance.

Joe asks me: "Do you often go to the cinema?"  I reply: "No, I have not been to the cinema for a long time"  This is correct.  But can I say:     "I have not gone to the cinema for a long time"


I can't seem to find the  solutions to  $z^4+1=0 $. $z$ is in the complex plane.   The solutions show four roots; however, how do I find them once $z^4 = -1$?

I'm trying to find the roots of $x^4+1$. I've already found in this site solutions for polynomials like this $x^n+a$, where $a$ is a negative term. I don't remember how to solve an equation when $a$ is a positive term as the equation above.  Thanks


I'm getting a null pointer exception at line   if(names[j].compareTo(names[j+1]) > 0)   and I can't figure out why. It might have something to do with the initialization but I really don't know what it could be  public static void item3(Profitable[] movies, Scanner input) {     int j;     boolean flag = true;     String temp;     String search;     int low = 0;     int high;     int mid;      String[] names = new String[6];      for(int i = 0; i < 5; i++) {         names[i] = ((Movie)movies[i]).getTitle();     }      high = names.length - 1;     mid = (low + high) / 2;      while(flag)     {         flag = false;         for(j = 0; j < names.length - 1; j++)         {              if(names[j].compareTo(names[j+1]) > 0) {                 temp = names[j];                 names[j] = names[j+1];                 names[j+1] = temp;                 flag = true;             }         }     }      System.out.print("Enter your search term: ");     search = input.nextLine();  }

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


Recently, I had a delayed flight which caused me to miss a connecting flight. For making the claim under EC261, I wonder which distance I should take into account. Do I take the distance of the individual flights of the distance of the entire journey? I see multiple ways to calculate the distance:   Take the distances of the flight that was actually delayed. So just the first flight. Take the sum of the distances of the individual flights. Take the distance of the entire journey (straight line from departure to final destination, ignoring the intermediate stops).   In my case the two individual flights are well below 1500 km, while the total journey was well above 1500 km. The addition of the intermediate stop for calculating the total distance doesn't matter in my case, but an answer that makes the distinction would of course be more interesting.  From the spirit of the regulation, which takes into account the delay at the final destination, I would say that it is a version of the total distance. But when I look on the , they speak all the time about distance of the flight and not distance of the journey.

I recently had a flight from Valencia to London, going through Düsseldorf, cancelled. According to EU regulations there are different levels of compensation for flights below and above 1500 km in distance. I assume that this distance refers to start and end airport regardless of connection. Is this the case? I haven't found a proper definition online. Here, it would make a difference as VLC to LHR is around 1350 km, but the complete itinerary is above the 1500 km threshold.


function make_withdraw(balance) {     return function(amount) {         if (balance >= amount) {             balance = balance - amount;             return balance;         } else {             return "Insufficient funds";         }     } }  var W1 = make_withdraw(100); W1(50); // 50 W1(60); // "Insufficient funds" W1(40); // 10       function w(amt){ var b= 100; if(b>=amt){b=b-amount;return b;}else{return alert("error!");}} w(10); //90 w(10); //90     Why by assigning balance the W1 function can keep track of balance, while w function cannot?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Determine what kinds of convergent it is: absolute convergent, conditonal convergent, or divergent. $\sum_{n=2}^{\infty} (-1)^n \log (\frac{n+1}{n})$. well to tell that maybe it's first to seperate log? $\log (\frac{n+1}{n})$ is $\log (n+1)- \log(n)$. Then the absolute value of it is $\log (n+1)- \log(n)$. Then I notify it's best using integral test. Then for the not absolute value, I use the alternate series test, because it's alternate series with $(-1)^n$ and it's going to 0 too.

I need to prove that:  $$\sum_{n=1}^{\infty} (-1)^{n+1}\log\left(1+\frac{1}{n}\right)$$  is convergent, but not absolutely convergent.  I tried the ratio test:  $$\frac{a_{n+1}}{a_n} = -\frac{\log\left(1+\frac{1}{n+1}\right)}{\log\left(1+\frac{1}{n}\right)} = -\log\left({\frac{1}{n+1}-\frac{1}{n}}\right)$$  I know that the thing inside the $\log$ converges to $1$, so $-\log$ converges to $0$? This is not right, I cannot conclude that this series is divergent.  Also, for the sequence without the $(-1)^{n+1}$ it would give $0$ too.


I am new to Blender and i am currently modeling a pirate ship and i would like to make folded sails like the one in the picture.  Thanks in advance.

In the addon ArchiMesh there is a Japaneses curtain feature, but, it looks straight and does not have the fold that I want in it. Is there an addon that can do this for me? If not, how can I make a curtain (like in the images below)?


My wrinklers seem to be decreasing my CpS, but google said they were better in the long run. Should I pop them? Or should I let them be? It seems they lowered CpS so much I'm currently leaning toward popping them. Please help me make this decision easier.

I have entered the Grandmapocalypse, and these things called 'Wrinklers' are spawning on my main cookie. Are they positive or negative, and what do they do?


I am trying to install libgeos-dev on ubuntu 16.04  This command   apt-get install libgeos-dev   get this error  # apt-get -f install libgeos-dev Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  cpp-5 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.10 is to be installed  g++-5 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.10 is to be installed  gcc-5 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.10 is to be installed  gfortran-5 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.10 is to be installed   apt-get install gcc-5=5.4.0-6ubuntu1~16.04.11 get the same error as above.  This command   # apt-get install gcc-5=5.4.0-6ubuntu1~16.04.11 \ > gcc-5-base=2.2.20-1ubuntu1~16.04.11   get this error  Reading package lists... Done Building dependency tree Reading state information... Done E: Version '2.2.20-1ubuntu1~16.04.11' for 'gcc-5-base' was not found   this question is different from that    as I said previously, apt-get -f does not work, and I am work on a CLI server which does not have GUI.  how can I install the dependencies?

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


When i tried out the following in the google Chrome console , i got the corresponding answers can anyone explain reason for the following answers  1 == '1.0' true  1 == '1' true   '1.0' == '1' false   Why is this happening and does this means , == compares value or not

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I am doing a multiple linear regression, in order to see whether the predictors are positively (positive $\beta$s) or negatively correlated (negative $\beta$s) with the response.  Since I have a lot of predictors, I use Lasso to select variables. With cross-validation, I choose my optimal $\lambda$, but I am left with coefficients ($\beta$s) with no standard errors. I read that the significance testing for penalized regression is still under research.  So my questions are,   1) How do I interpret positive, negative, and 0 coefficients for Lasso?  2) In addition, can I compare the magnitude of predictors (all have the same unit/dimension) to say which has is more important over another on the response?

I'm currently working on building a predictive model for a binary outcome on a dataset with ~300 variables and 800 observations. I've read much on this site about the problems associated with stepwise regression and why not to use it.  I've been reading into LASSO regression and its ability for feature selection and have been successful in implementing it with the use of the "caret" package and "glmnet".   I am able to extract the coefficient of the model with the optimal lambda and alpha from "caret"; however, I'm unfamiliar with how to interpret the coefficients.    Are the LASSO coefficients interpreted in the same method as logistic regression? Would it be appropriate to use the features selected from LASSO in logistic regression?   EDIT  Interpretation of the coefficients, as in the exponentiated coefficients from the LASSO regression as the log odds for a 1 unit change in the coefficient while holding all other coefficients constant.


How do I reset the BIOS password of an HP ProBook 6360b?  I tried these tricks:   I removed the CMOS battery and left it for 7 days. I short circuited the jumper wires.   But nothing happened.

I’m locked up beyond BIOS of my HP ProBook 4530s. Long time ago I put a password on it, But now I don’t remember it.   I have to reset the BIOS password, But I found that it doesn't relate to the CMOS battery. My ProBook is out of warranty too. What should I do?


I was wondering is there any way to express $0.999999$ recurring as an actual fraction without equaling $1$? Because I tried to convert it into a fraction following the rules for normal recurring decimals like this:  $$\begin{align}n&=0.999\dot9\\10n&=9.999\dot9\\n&=0.999\dot9\\9n&=9\\\therefore n&=9/9\end{align}$$  But as you can see the result is $9/9$ which ultimately is equal to $1$ . And I've even tried calculating it other ways like this:  $$\begin{align}1/3&=0.333\dot3\\2/3&=0.666\dot6\\\therefore3/3&=0.999\dot9\end{align}$$  But it always ends up telling me that $0.9999999... = 1$. Is there any mistake in my logic? And I also realized this applied to other recurring decimals ending in $9$. E.g: $0.5999999...=5.4/9 = 0.6$ . So is there a way to write $0.999999...$ as a fraction so you can differentiate it from $1$?

I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is?


I have a csv, that I want to open as a GPD, the problem is the geometry column "geo_shape"  I want to convert that column to the proper geometry format, could you help me? The link to the csv file

I have a CSV file I open as a DataFrame. Among the columns is one named geom 1 :  df.loc[:, 'geom 1'] >>> 0       {'type': 'Polygon', 'coordinates': [[[2.826589... 1       {'type': 'Polygon', 'coordinates': [[[2.225689... 2       {'type': 'Polygon', 'coordinates': [[[2.225689... 3       {'type': 'MultiPolygon', 'coordinates': [[[[5.... 4       {'type': 'Polygon', 'coordinates': [[[3.933055...                               ...                         2998                                                 None 2999                                                  NaN 3000    {'type': 'Polygon', 'coordinates': [[[5.014937... 3001    {'type': 'Polygon', 'coordinates': [[[4.912995... 3002    {'type': 'Polygon', 'coordinates': [[[4.739631... Name: geom 1, Length: 3003, dtype: object  #Conditionning the dataframe : df.replace('None', np.nan, inplace=True)   I would like to convert these strings to geometries in a GeoDataFrame.   After a few resarches I did not find a working solution :   :  df.loc[:, 'geom 1'] = df.loc[:, 'geom 1'].apply(wkt.loads)  >>> ParseException: Unknown type: '{'TYPE':' WKTReadingError: Could not create geometry because of errors while reading input.    :  df.replace('None', np.nan, inplace=True) geom = [shape(i) for i in df.loc[:, 'geom 1'].dropna()] >>> AttributeError: 'str' object has no attribute 'get'   What I succeded was to sent the DataFrame to PostGIS, convert the type of the column geom 1 from text to geometry and use the function ST_FromGeoJson to access the geometry. Since I have many columns geom I want to do this under python in order to merge all the columns geom into a single one named all_geoms.


This is the code I have:  class HelloWorld {      char[] foo = {'a', 'b'};      // This will compile     void foo() {         for (char foo : foo) {         }     }      // This will not compile     void bar() {         for (char foo = 0; foo < foo.length; foo++) {         }     } }   How come foo compiles but compiling bar fails with:  Error: char cannot be dereferenced   What is the difference between the two loop declarations that makes loop in foo compile but bar fail?

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


I have added article page in my project and made Views for that, but articles page also display on the front page. How to hide article from home page?

Is there a straightforward way to remove the default content, ie recent posts list, from the front page?  I've read about creating my own page and assigning certain blocks to that page and then setting it as the default starting page.. but I've already got my homepage mostly set up and wondered if it would be easy to do it the other way so I don't have to change all my other settings.


Prove the identity $ \sum_{i=0}^n {n \choose i} i = n2^{n-1} $ using combinatorial proof.

Prove that   $$\sum^{n}_{i=1}\binom{n}{i}i=n2^{n-1}$$   I can't find counting interpretations for either of the sides. A hint of "if $S$ is a subset of $\{1, . . . , n\}$ and $S^\prime$ is its complement then $|S| + |S^\prime| = n$" was also given, but I still don't know how to begin.


I just had a tag wiki edit approved here:    But only one person approved it. I thought two people were meant to approve edits?

was declined by the user who created the tag wiki excerpt, who doesn't yet have the reputation to be a trusted user. (The site is still in beta, and the reputation necessary to be a trusted user is 4000.)        Should the user who first proposed a tag wiki, or a tag wiki excerpt be the one who can unilaterally decide about a proposed edit for a tag wiki? The user who first proposed it isn't necessarily the one who knows if the tag's purpose can be better described with different words, nor does that user necessarily know if the tag has been lately used differently from how it was first used. Since a tag wiki is different from other posts, there should be an exception to the rule "the author of a post can unilaterally decide about any edits."  The paradox is then that the creator of a tag wiki still needs two users to approve their suggested edit. That's what happened in .        The funny fact is that in the revisions for the tag wiki, or tag excerpt (as in the screenshot), the tag wiki/excerpt is said to be created from the Community user.        This bug is  definitely .


In the early to mid eighties I read a short story or possibly a novel set on a Venus that was being terraformed. Based on what I was reading at the time I suspect it was published in the late sixties or early seventies but I can't be sure.  Think Heinlein, Asimov etc.  All I really remember was that there was constant rain and the main character was traveling (on foot I believe) then he stopped at one of a series of domed hostel type things to refresh and escape the rain.  This might be from a different story but I think the only habitable parts of the planet were very large, deep canyons. The actual surface wasn't habitable.

In this post-apocalyptic short story, a small group of people are returning from a (failed) effort to save one outpost.  They cross a snowy wasteland to find that the nearest domed refuge has also ceased functioning and are forced to stretch their supplies and physical resources to reach a farther afield one.  The story ends with them barely reaching their goal to find a warm and civilized society inside the refuge. I believe hot cocoa features in the final scene.


I read this question at another forum but the thread was already closed. Here's the description: Two observers A and B are both moving at a velocity of 0.9 times the speed of light with respect to a stationary object. So, won't A see B moving at a speed greater than light?

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


I have a problem with the subsurface modifier. I am new to blender.  The modifier does this:   I know the reason. It's because I have some geometry on the back:   So on the back I have a corner. This is the top view:    I know I have a problem with the corner from the top too but that is a different problem that I need to fix.

I think my question relates to a fundamental of 3D modeling that I haven't picked up on yet. It's very simple:  Let's say I have a flat quad. A plane on the XY plane inserted into am empty blender file is a great example. Now let's say I start moving each of the 4 vertices around on in any direction, especially the Z axis.   At this point, there would still be one face, but its extremely unlikely that the face would be planar (I just learned this word). So blender does its best to make sense of what this should look like.  The problem I'm having is that it seems like my quads are always like this, but they never look the way I want. There are edges and seams that look like they are dangling in space, and what tends to happen is that my mesh looks great when viewed from most angles, but if you look at it from just the right angle, you notice the dangling edges or sometimes even some kind of impossible geometry. And so I might try to nudge the problematic vertices around, but this often seems to either make it worse, or just hide the bad geometry until you see it from a different angle.  For me, this always seems to happen whenever I'm trying to move vertices to add roundness to something that is originally square.   There is another question on here about how to actually flatten the quads. That's great, and I might use some of the techniques mentioned there. My question is:   Why does this happen? (Can someone explain this better?) What are some tips and tricks to avoid this situation? What are some tips and tricks to mitigate this situation?   EDIT Here is an illustration:  The overall mesh as viewed from a distance looks decent (for my skill level)    But if you get closer and look from a certain angle...    Super close up:    The "edge" that is pointed to by the arrow is not actually an edge, but some kind of artifact created when blender tries to show the quad. The way the vertices are positioned, it shouldn't actually be possible to see the sliver of the face that I marked in red, since this face is supposed to be around the corner from the edges. The edges should form the silhouette on the right side of my figure.     Here is the side view. Maybe it is the angled topology that skews the face in a funny way?  But I'm not looking for help with this one particular issue, but rather a better understanding of why this happens, and ideas to prevent this in future models.


Should the noun that follows both be singular or plural? Which of the following is/are correct?  I tested both inverting and non-inverting configuration. I tested both inverting and non-inverting configurations. I tested both the inverting and non-inverting configurations. I tested both the inverting and non-inverting configuration. I tested both the inverting and the non-inverting configurations. I tested both the inverting and the non-inverting configuration.

Set the Max depth parameter of both the Reflection and Refraction roll-out to 10. I am not sure whether roll-out should be plural or not in this particular case.


How can I check my current Ubuntu version through the command-line and GUI?

I installed some version of Ubuntu on my VMware, but I don't know what version exactly it is. How can I find it out?


By the end of 2017 I purchased a new computer with a Samsung 960 Pro 512GB ssd. It runs Windows 10 Pro. about 14 months have passed and Samsung magician reports 9.3TB written on the SSD. This sounds terribly too much for me as it translates to ~22GB day (9300 GB/420 days)  The computer is powered on ~8 hours day and most of the time (96%+) has 5 firefox windows (instances) open. I have never downloaded any movies or torrents. I have routinely (less than 30 times in total) used VS 2017 and ~10 times Android Studio.  No antivirus is running - except microsoft's own windows defender.   Now, I think that 22GB written per day is way too much for such a use. Does someone have a similar experience? Does this sound problematic to you and if so, how can I pinpoint the problem ?  I am thinking that most of the data gets written to disk by Firefox (those 5 instances are on pages with rapidly changing/updating text content and some charts - also frequently updating). Task Manager on the Details Tab reports many GB of I/O bytes written for an uptime of ~18,5 days, as you can see in the screenshot.  Or could it be that windows defender also does write a lot of stuff to disk (though it theoretically it should mostly read) ?    If the culprit is firefox, is it normal? Can I somehow make firefox write less bytes to the disk ?  Thank you in advance

iotop -a (accumulated I/O) on Linux shows after about 10 min. of browsing Internet:  Total DISK READ:       0.00 B/s | Total DISK WRITE:       0.00 B/s                  TID  PRIO  USER     DISK READ DISK WRITE>  SWAPIN      IO    COMMAND            17330 be/4 wojdyr     1540.00 K     38.48 M  0.00 %  0.00 % firefox                 403 be/3 root          0.00 B     31.65 M  0.00 %  0.06 % [jbd2/sda5-8]         17276 be/4 wojdyr      800.00 K     31.06 M  0.00 %  0.00 % firefox               17329 be/4 wojdyr        0.00 B     20.96 M  0.00 %  0.00 % firefox               31896 idle wojdyr        0.00 B   1200.00 K  0.00 %  0.00 % virtuoso-~.ini +wait  31924 be/4 wojdyr        0.00 B   1064.00 K  0.00 %  0.00 % akonadi_n~ail_feeder  18959 be/4 wojdyr        0.00 B    796.00 K  0.00 %  0.01 % firefox   I'm quite surprised by the amount of data written to disk. I turned off to-disk caching, but it didn't make notable difference. I turned off block-reported-attack-sites/web-forgeries -- nothing changed.  Is this rate of writing to disk normal in Firefox (10.0.1)? It quickly exceeds the total size of my firefox profile.  Looking at modification times of files in the firefox profile I see that a few files are modified very often:  cookies.sqlite{-wal,-shm} sessionstore.js places.sqlite{-wal,-shm} permissions.sqlite   Is there something wrong with my system or configuration, or is it typical for FF?  I don't like this pointless writing to (SSD) disk. Can I do something about it?  EDIT: I've found  how to relocate the entire Firefox profile to RAM. It reduced almost to zero data written by firefox during session. (I know this is a bit paranoid and probably not worth the hassle.)


I want to show that $$\frac{x}{1+x}<\log(1+x)<x$$ for all $x>0$ using the mean value theorem. I tried to prove the two inequalities separately.  $$\frac{x}{1+x}<\log(1+x) \Leftrightarrow \frac{x}{1+x} -\log(1+x) <0$$  Let $$f(x) = \frac{x}{1+x} -\log(1+x).$$ Since $$f(0)=0$$ and $$f'(x)= \frac{1}{(1+x)^2}-\frac{1}{1+x}<0$$ for all $x > 0$,  $f(x)<0$ for all $x>0$.  Is this correct so far?  I go on with the second part: Let $f(x) = \log(x+1)$. Choose $a=0$ and $x>0$ so that there is, according to the mean value theorem, an $x_0$ between $a$ and $x$ with   $f'(x_0)=\frac{f(x)-f(a)}{x-a} \Leftrightarrow \frac{1}{x_0+1}=\frac{ \log(x+1)}{x}$.  Since $$x_0>0 \Rightarrow  \frac{1}{x_0+1}<1.$$ $$\Rightarrow 1 > \frac{1}{x_0+1}= \frac{ \log(x+1)}{x} \Rightarrow x> \log(x+1)$$

One of fundamental inequalities on logarithm is: $$ 1 - \frac1x \leq \log x \leq x-1 \quad\text{for all $x > 0$},$$ which you may prefer write in the form of $$ \frac{x}{1+x} \leq \log{(1+x)} \leq x \quad\text{for all $x > -1$}.$$  The upper bound is very intuitive -- it's easy to derive from  as follows: $$ \log(1+x) = \sum_{i=1}^\infty (-1)^{n+1}\frac{x^n}{n} \leq (-1)^{1+1}\frac{x^1}{1} = x.$$  My question is: "what is the intuition behind the lower bound?" I know how to prove the lower bound of $\log (1+x)$ (maybe by checking the derivative of the function $f(x) = \frac{x}{1+x}-\log(1+x)$ and showing it's decreasing) but I'm curious how one can obtain this kind of lower bound. My ultimate goal is to come up with a new lower bound on some logarithm-related function, and I'd like to apply the intuition behind the standard logarithm lower-bound to my setting.


My book is Connections, Curvature, and Characteristic Classes by Loring W. Tu (I'll call this Volume 3), a sequel to both Differential Forms in Algebraic Topology by Loring W. Tu and Raoul Bott (Volume 2) and An Introduction to Manifolds by Loring W. Tu (Volume 1).  I refer to .  Let $M$ be a set, possibly empty. Let $G$ be a group, possibly a singleton. Let $G$ act right on $M$ by the action $\mu: M \times G \to M$. For each $x \in M$, let $\text{Stab}(x):=\{g \in G | \mu(x,g) = x\}$ denote a stabilizer subgroup of $G$. Let $1_G$ be the identity of $G$.  I understand definitions of $\mu$ to be free as follows:   : $\mu$ is free if for all $g \in G$, if there exists $x \in M$ such that $\mu(x,g)=x$, then we have that $g=1_G$.  in : (same as 's, given above) : $\mu$ is free if for all $x \in M$, $\text{Stab}(x) = \{1_G\}$   Question 1: For Wikipedia's and jgon's definitions, there is no explicit reference to stabilizers. For Tu's definition, how do I understand $\text{Stab}(x)$ for $M$ empty and $G$ not a singleton?  Question 2: Similarly, for the definition of faithful as     $$\bigcap_{x \in M} \text{Stab}(x) = \{1_G\} \tag{2a}$$   How do I understand $\mu$ as never faithful for $M$ empty and $G$ not a singleton?  My attempt to understand:   For Question 2, I think I can apply , by $M$ empty assumption to say $\bigcap_{x \in M} \text{Stab}(x) = G$. Then I apply $G$ not a singleton assumption to get $\bigcap_{x \in M} \text{Stab}(x) \ne \{1_G\}$. For Question 1, I think we somehow say $\text{Stab}(x) = G$ for all $x \in M = \emptyset$ by some vacuousness argument. I'm not really sure.

Let $G$ be a group, possibly a singleton. Let $M$ be a set, possibly empty. Let $\mu: M \times G \to M$ be a right group action. Let $1_G$ be the identity of $G$.  I understand 's second definition of faithful as follows:     $\mu$ is faithful if for each $g \in G$ such that $g \ne 1_G$, there exists $x \in M$ such that $\mu(x,g) \ne x$. $\tag{1}$   Later  says if $\mu$ is free and $M$ is a non-empty set, then $\mu$ is faithful.  Question: Given the idea that we can have $M$ as an empty set, I would like to clarify: Are these correct?   If $G$ is a singleton, then every action $\mu$ is faithful, whether or not $M$ is empty. If $G$ is not a singleton, but $M$ is empty, then every action $\mu$ is not faithful.


I'm trying to extend Selenium's By class .  public static class SeleniumExtensions {   public static By Text(this By by, string textToFind)   {     return By.XPath("");   } }   But I can't find my extension on the By class when I do the above.

I'm a fan of extension methods in C#, but haven't had any success adding an extension method to a static class, such as Console.  For example, if I want to add an extension to Console, called 'WriteBlueLine', so that I can go:  Console.WriteBlueLine("This text is blue");   I tried this by adding a local, public static method, with Console as a 'this' parameter... but no dice!      public static class Helpers {     public static void WriteBlueLine(this Console c, string text)     {         Console.ForegroundColor = ConsoleColor.Blue;         Console.WriteLine(text);         Console.ResetColor();     } }   This didn't add a 'WriteBlueLine' method to Console... am I doing it wrong? Or asking for the impossible?


In some tutorial for AngularJS online, I saw $promise or $checkSessionServer are declared in a way of  var $promise=$http.post('data/user.php',data);   I learned that AngularJS declare using $, but I can not find those $ variables in native AngularJS function / variables at all!  Is this something old or else?  Thanks

I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?  (I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like $name and $order)


Could someone explain to me the meaning of @classmethod and @staticmethod in python? I need to know the difference and the meaning.   As far as I understand, @classmethod tells a class that it's a method which should be inherited into subclasses, or... something. However, what's the point of that? Why not just define the class method without adding @classmethod or @staticmethod or any @ definitions?  tl;dr: when should I use them, why should I use them, and how should I use them?

What is the difference between a function decorated with  and one decorated with ?


I would like to know the general solution of $$x^2 y^{''}+x y^{'} -k^2 x^2 y=0\tag{1}$$ for $y(x)$.  (1) is related to the equation $$\quad x^2 y^{''}+x y^{'} - x^2 y=0$$ , which is the $n=0$ form of the modified Bessel equation  $$x^2 y^{''}+x y^{'} -( x^2+n^2) y=0$$  Other Information.  The material of this question turns up in fluid mechanics, in the theory of the instability of jets.  There is plenty of material on Wikipedia about the Bessel and related equations but I have not found there, the general solution I am looking for.

The modified Bessel differential equation is  as  $$r^2 \frac{\partial^2 f(r)}{\partial r^2} + r\frac{\partial f(r)}{\partial r} - (r^2 + n^2)f(r) = 0$$  with solutions  $$f(r) = AI_n(r) + BK_n(r)$$  But if I had  $$r^2 \frac{\partial^2 f(r)}{\partial r^2} + r\frac{\partial f(r)}{\partial r} - (\alpha^2 r^2 + n^2)f(r) = 0$$  What form should have the solutions and how to prove it? It seems not to be a simple substitution $r' = \alpha r$, because $\alpha$ appears just one time in the second equation and not in all the $r$ terms (as I would expect instead).