Let's say that $x$ is some statistic that represents your measurement of something in nature, such as (say) the sample average of human height in a country.  Suppose that your measurement of $100$ randomly chosen objects (e.g. people) you find out that $x=179.0234234524312123545990088$.  Obviously many of these decimal places are probably highly likely to be due to noise, and will probably change drastically if I re-sample again. One may use eyeballing, and follow his feelings to choose (say) only 4 decimal places, thus writing down $179.0234$.  My question is: Is there any principled approach to decide how many decimal places should be chosen in order write down the number $179.0234234524312123545990088$ for various uses?  For example, should we write $x$ as $179.02342$? $179.0234$? $179.023$? $179.02$? $179.0$? Or maybe just $179$ if the statistic is too unstable to render its fractions meaningful?  So far I have been using my guts/feelings/eyeballing to decide what to display for a final answer. Usually I just choose $4$ decimal places. So usually I would write down $179.0234$.  But the problem is that my approach so far is not principled, and is rather based on guesses/feelings/eyeballing.  I wonder if there is any principled approach that can settle this debate down once and for all? For example, how many significant places should be used for computation and how many for display? There have been prior answers for display of results, for example,  and  but I do not feel that these addresse the issue of propagation of error during calculations.

Is there a well founded rule for the number of significant figures to publish?   Here are some specific examples / questions:   Is there any way to relate the number of significant figures to the coefficient of variation? For example, if the estimate is 12.3 and the CV is 50%, does that mean that the information represented by '.3' approaches zero?   If a confidence interval has a range of orders of magnitude, should they still have the same number of significant figures, e.g.:  12.3 (1.2, 123.4) vs 12 (1.2, 120)  Should the number of significant figures in an error estimate be the same or less than the number of significant figures in a mean?


If I want to reinstall the configs of some package x (i.e. files in /etc), how would I do that?  Does apt-get --reinstall install x always reinstalls the configs?  Other answers suggest to remove the configs first and then use apt-get -o Dpkg::Options::="--force-confmiss" x. However, I don't want to do that for all of /etc because I want to keep my system in a well-behaved state as far as possible. I basically just want that it overwrites existing config files.  I also read about --force-all, --force-confnew, --overwrite-conffiles and the UCF_FORCE_CONFFMISS, UCF_FORCE_CONFFNEW env vars. Some documentation is  and , although I'm not sure if it does exactly what I want.

I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file.  Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-get install --reinstall unity-greeter doesn't create a new config file as you might expect.   How can I restore a missing config file?


Hi I am trying to match 2 rows from same table? For example below are the 2 rows of a single table. I wan to know if the primaryuser has liked the likeduser and the same liked user under primary user liked the primary user. For example  primaryuser   LikedUser   Likes 101           102         Yes 102           101         Yes 103           102         No 104           301         Yes     O/P: 101, 102   here when 101 was primary user they liked user with ID 102 and when 102 was primary user they liked user with ID 101 so they have mutually liked each other.

I need to create a background job that processes a table looking for rows matching on a particular id with different statuses. It will store the row data in a string to compare the data against a row with a matching id. I know the syntax to get the row data, but I have never tried comparing 2 rows from the same table before. How is it done? Would I need to use variables to store the data from each? Or some other way? (Using SQL Server 2008)


With the class below, I try to get :   field name value   I tried this piece of code :  Dictionary<string, string> listField =          membership.GetType()             .GetFields(BindingFlags.NonPublic)             .ToDictionary(f => f.Name,                           f => (string)f.GetValue(null));   but I have nothing in the dictionary.  Any idea ?                            [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="MyClass", Namespace="http://model.common.party.ent.gfdi.be")] [System.SerializableAttribute()] public partial class MyClass : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {      [System.NonSerializedAttribute()]     private System.Runtime.Serialization.ExtensionDataObject extensionDataField;      [System.Runtime.Serialization.OptionalFieldAttribute()]     private string firstName;      [System.Runtime.Serialization.OptionalFieldAttribute()]     private string lastName;      [System.Runtime.Serialization.OptionalFieldAttribute()]     private System.Nullable<long> fieldA;         [System.Runtime.Serialization.OptionalFieldAttribute()]     private bool fieldB;          [System.Runtime.Serialization.OptionalFieldAttribute()]     private int fieldC;      }

Given this class  class Foo {     // Want to find _bar with reflection     [SomeAttribute]     private string _bar;      public string BigBar     {         get { return this._bar; }     } }   I want to find the private item _bar that I will mark with a attribute.  Is that possible?    I have done this with properties where I have looked for an attribute, but never a private member field.  What are the binding flags that I need to set to get the private fields?


:     Small utility applications that run only for a short time may suffer a   performance hit if the JVM and Java application startup time is long.   I wonder if it's possible to keep the JVM (not its "state") in memory between application launches to avoid the startup delay?  EDIT I don't think the 2 people who voted to close this question even read it. The JVM and the JVM state are two different things. I asked about keeping the JVM in memory, not saving the JVM state to a file, like the other question. The goal of the former is to save startup time. The latter doesn't do that at all.

Are there any Java VMs which can save their state to a file and then reload that state?  If so, which ones?


I'm looking for a "get if" solution.  I have a list called 'Months' with two columns:  Month Value 1      5 2      7 3      3   'Value' is a Lookup (Count Related) column if it matters.  so if it's Jan, set var to 5, if Feb set var to 7 and if Mar set var to 3 and so on.  I'm struggling with the code and so far I can't manage to read any data from any list and I tried various approaches. I want to pass those values to Google charts.  I'm on SharePoint online.

I'm trying to visualise data using Google charts, but it won't work with Lookup (count related) columns, so I'm trying to convert those values to Numbers using workflow and that won't work either using my methods that I know.  My setup now:  SharePoint Online.  List 1: a list of 24 hours in a day.   'Title' column: 24 items, from 00 to 23. 'Count' lookup (count related) column counting how many times certain hour appears in List 2   List 2: a list of items and their time.   'Time' is a calculated column that takes values from 'Hours' and 'Minutes' lookup columns that are linked to List 1.  'Hours' has a choice of 00-23 hours from List 1, same as 'Minutes', but I only want to count 'hours' frequency at this moment.   I'm also trying to get workflow to do the calculations.   Are there any known ways to get this working?


I have data from a JSONs like as below data={'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates':  [[410910.0885459831, 2479395.4132211693, 0.0], [410903.8088855865,  2479401.860380645, 0.0], [410845.2521416071, 2479436.215147523, 0.0],  [410844.8989142373, 2479436.568374893, 0.0], [410844.5338823536,  2479436.90979775, 0.0], [410844.1588620354, 2479437.2403241317, 0.0],  [410843.77385328256, 2479437.5581379607, 0.0]]}}  and I wish to make a concatenation on the elements like below in this line: datas [i] ['geometry'] ['coordinates'] [j] [0]) +" "+ str (datas [i ] ['geometry'] ['coordinates'] [j] [1]of all existing sublists in coordinates. Here is my code but unfortunately it does not work since it only gives me the last data [i] and not all the coordinates in the sublists  path = os.path.join(dir, file)  shapefile = ogr.Open(path)  shape = shapefile.GetLayer()  datas= []   features=[]  jsonstring=[]  lines = []  for i in range(len(shape)):      features.append(shape.GetFeature(i))      jsonstring.append(features[i].ExportToJson())   # myjson      datas.append((json.loads(jsonstring[i])))       for j in range(len(datas[i]['geometry']['coordinates'])-1):          line = datas[i]['geometry']['type'] + "("+ str(datas[i]['geometry']['coordinates'][j][0])+" "+ str(datas[i]['geometry']['coordinates'][j][1])+")"          lines.append(line)`  I'm using Python 3.x, and I would like to have in the end something like this: LineString(410910.0885459831 2479395.4132211693, 410903.8088855865 2479401.860380645, ..... ,410843.77385328256, 2479437.558137960)   for each data[i]

Im learning to use shapely and have two shapefiles--forest, and basins. The two shapefiles clearly intersect (basins is completely within forest). But the way I've gone about it only gets the feature at index 0 of each shapefile, which don't intersect. I know where this is taking place in the script, but how do I get the whole polygon shape as wkt instead of just one record? Do I build a list of the wkt geometry one record at a time?  # Basins shapefile to wkt basins = ogr.Open("data/Basins.shp") basins_layer = basins.GetLayer(0) basins_feature = basins_layer.GetFeature(0) # This is the line # I'm thinking there should probably be a loop here to get the geometry of the whole shapefile basins_geometry = basins_feature.GetGeometryRef() basins_wkt = shapely.wkt.loads(basins_geometry.ExportToWkt())   How do I loop through the whole shapefile and build the outer polygon as wkt or is there another function to get the outer boundary of the shapefile? I guess this is called the outer ring. I want wkt of the whole shapefile exterior, rather than the individual polygons that make it up.


I have started programming with Java, I just achieved which I consider as a "good" level in matter of language knowledge.  For fun I decided to start programming using C++, I'm fairly new to this language but I'm a fast learner and I think it's not that far from Java.  I've created a test class which has a value and a name as attributes, and an objects counter as a global variable.    #include<iostream>   /* local variable is same as a member's name */ class Test {     private:        double x;        std::string name;        static int nb;     public:         Test(double x, std::string n)         {             this->x=x;             this->name=n;             nb=nb+1;         }        void setX (double x)        {            // The 'this' pointer is used to retrieve the object's x            // hidden by the local variable 'x'            this->x = x;        }        double getX()        {            return this->x;        }        std::string getName()        {            return this->name;        }         static int getNb()        {            return nb;        }  };   int main() {    Test obj(3.141618, "Pi");    std::cout<<obj.getX()<<" "<<obj.getName()<<" "<<Test::getNb()<<std::endl;    return 0; }   When executed the programm outputs this error :  In function `Test::Test(double, std::string)':  (.text._ZN4TestC2EdSs[_ZN4TestC5EdSs]+0x4a): undefined reference to `Test::nb'  (.text._ZN4TestC2EdSs[_ZN4TestC5EdSs]+0x53): undefined reference to `Test::nb' In function `Test::getNb()':  (.text._ZN4Test5getNbEv[_ZN4Test5getNbEv]+0x6): undefined reference to `Test::nb' error: ld returned 1 exit status   some chinese to me.  I don't get it.

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I am reading Fraleigh in which Fraleigh proves that $f(x) = x^3 + 3x+ 2$ is irreducible over $\mathbb{Z}[5]$. He explains that the if $f(x) = x^3 + 3x+ 2$ were reducible over $\mathbb{Z}[5]$, then there would exist ar least one linear factor of $f(x)$ of the form $x-a$ for some $a \in \mathbb{Z}[5]$. Then, $f(a)$ would be $0$. However, $f(0) = 2, f(1) = 1, f(2) = 1, f(-1) = -2,f(-2) = -2$.   I don't understand why Fraleigh didn't analyze $f(4)$ and $f(3)$ instead of $f(-1)$ and $f(-2)$ respectively. Can someone please explain? Thanks!

Show that if $m$ is odd then $\frac{(-m+1)}{2}, \frac{(-m+3)}{2}, \cdots, \frac{(m-3)}{2}, \frac{(m-1)}{2}$ is a complete residue system modulo m.  I understand the definition of a complete residue system but is having a hard time incorporating the odd part of this statement.


I wanted to flag  as being on the wrong site. I tried to flag it as belonging on computergraphics.stackexchange.com, but that was not one of the options.  So I flagged it as belonging on meta and left a comment.  How should we flag wrong site questions if the correct site is not listed as one of the flag options?

I have , and so went to flag it as such, but after clicking "it doesn't belong here, or it is a duplicate" and "off topic," I get the following.    I think the question is more suited to Code-Review than any of the sites listed, but there doesn't seem to be an option to flag the question as "belongs on CodeReview." I am sure there is a good reason for this, and am curious to know what it is.


I must have encountered a glitch in Skyrim. I have been following the  quest so far, got the Emerald Dragon Claw, put in the right combo and turned the claw but the door in  won't open. How can I get the door to open?

For some reasons I cannot open some dragon claw doors. I have the right dragon claw for the door, and I am putting the right code in but the door does not open, it just shoots poison darts at me.  It happened with the sapphire claw and one other, but I forget the color.


I just wanted to know if there is still a way to downgrade iOS 7, i don't have beta. (on an iPhone 4 which is listed as iPhone3,1 on ).

I have an iPad 2 that is currently running iOS 5.0.1. I'm generally happy with it but some applications require a more recent iOS version. So I started to look into upgrading it, but the only upgrade that it offers is to iOS 7.  From the look of it I don't like the new design of iOS 7 too much and also upgrading to a version this fresh doesn't appeal to me. So my question is: is there a way to upgrade to some version of iOS 5.x or iOS 6.x instead of upgrading to iOS 7?


Thinking about starting up a small clothing company with the symbol below:    But after surfing the web I discovered Nike's undefeated symbol.   Will my design cause copyright issues? How dissimilar should mine be to avoid issues?

I'm designing a logo inspired by the .   My logo (inside the green zone) has nothing to do with the "dinosaur" logo of Mozilla. So the question is about the frame and the arrangement of the letters (IJK in my case).  Is it plagiarism if my logo looks similar to an existing one?


can anyone help me with this issue. I have been using Ubuntu for years and never encountered a problem until now. I cannot update because of this error:  E: Type 'echo' is not known on line 2 in source list /etc/apt/sources.list.d/mono-xamarin.list E: The list of sources could not be read. Go to the repository dialog to correct the problem. E: _cache->open() failed, please report.

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


I want a compensation equal to the value of my time.   I was told by a native speaker that this is the correct expression (instead of saying equal to my time value), but I don't know why.  Could someone explain and give other examples?

I have a question: it's been months that I watch movies for improving my listening skill(it was quite awful:-D). now my question. I know that we should use "warlord" instead of "Lord of war" or "landlord" instead of "Lord of land" but I don't know why "The lord of the rings" is correct? isn't it better to use Ringslord ??? I meant how to know when I should use "of" ?


if the evolution makes the species better then why the leaf and trees are not black??  black colour absorbs more ligth than simply the green color so a black plant should make photosinthesis better then why aren't the plants black ?

I know plants are green due to chlorophyll.  Surely it would be more beneficial for plants to be red than green as by being green they reflect green light and do not absorb it even though green light has more energy than red light.  Is there no alternative to chlorophyll? Or is it something else?


I am trying to transfer data from one row to another within phpmyadmin, but when I attempt i I get the following error message.  Operand should contain 1 column(s)   Code I attempt :  INSERT INTO users_links      (`username`,`facebook`)     SELECT      (`username`,`facebook`)     FROM users2   However when I try this it works but Its not what I want.  INSERT INTO users_links          `username`         SELECT          `username`         FROM users2   Any ideas?

I tried running the following statement:  INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number, b.ID, b.DENOMINATION)  FROM temp_cheques a, BOOK b WHERE a.number BETWEEN b.START_NUMBER AND b.START_NUMBER+b.UNITS-1;   which, as I understand it, should insert into VOUCHER each record from temp_cheques with the ID and DENOMINATION fields corresponding to entries in the BOOK table (temp_cheques comes from a database backup, which I'm trying to recreate in a different format). However, when I run it, I get an error:  Error: Operand should contain 1 column(s) SQLState:  21000 ErrorCode: 1241   I'm running this in SQuirrel and have not had issues with any other queries. Is there something wrong with the syntax of my query?  EDIT:  The structure of BOOK is:  ID  int(11) START_NUMBER    int(11) UNITS   int(11) DENOMINATION    double(5,2)   The structure of temp_cheques is:  ID  int(11) number  varchar(20)


What does ? meaning in /etc/shadow file in RHEL in second column? myuser:**?**:17968:0:99999:7:::  I could find answer for X, *, !, but not for ?.


Are there any benefits to finalizing a class and finalizing each individual variable  and method inside that class? Or would that be redundant?

I've found a couple of references () that suggest using final as much as possible and I'm wondering how important that is. This is mainly in the the context of method parameters and local variables, not final methods or classes. For constants, it makes obvious sense.  On one hand, the compiler can make some optimizations and it makes the programmer's intent clearer. On the other hand, it adds verbosity and the optimizations may be trivial.  Is it something I should make an effort to remember?


Does anybody know, how I can allign 16 images like a grid with 4 columns and 4 rows?   \begin{figure} \begin{tabular}{cccc} \subfloat[0,1 s]{\includegraphics[width = 1.5in]{25.gif}}& \subfloat[25 s]{\includegraphics[width = 1.5in]{26.gif}}& \subfloat[750 s]{\includegraphics[width = 1.5in]{27.gif}}& \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{28.gif}}\\ \subfloat[0,1 s]{\includegraphics[width = 1.5in]{29.gif}}& \subfloat[25 s]{\includegraphics[width = 1.5in]{30.gif}}& \subfloat[750 s]{\includegraphics[width = 1.5in]{31.gif}}& \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{32.gif}}\\ \subfloat[0,1 s]{\includegraphics[width = 1.5in]{33.gif}}& \subfloat[25 s]{\includegraphics[width = 1.5in]{34.gif}}& \subfloat[750 s]{\includegraphics[width = 1.5in]{35.gif}}& \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{36.gif}}\\ \subfloat[0,1 s]{\includegraphics[width = 1.5in]{37.gif}}& \subfloat[25 s]{\includegraphics[width = 1.5in]{38.gif}}& \subfloat[750 s]{\includegraphics[width = 1.5in]{39.gif}}& \subfloat[1618,55]{\includegraphics[width = 1.5in]{40.gif}}\\ \subfloat[0,1 s]{\includegraphics[width = 1.5in]{41.gif}}& \subfloat[25 s]{\includegraphics[width = 1.5in]{42.gif}}& \subfloat[750 s]{\includegraphics[width = 1.5in]{43.gif}}& \subfloat[1618,55 s]{\includegraphics[width = 1.5in]{44.gif}}& \end{tabular} \caption{4 x 5} \end{figure}

I have a simple question but I am not sure on how to proceed. I would like to put 10 figures on the same page: a grid of 5 rows and 2 columns.  What should I type in order to have the figure inserted like this and with equal alignement/size ? Eventually with custom captions... ;)


In The Last Jedi Luke agrees to train Rey he says that he is going to:      Teach her three lessons:  Lesson 1: He teaches her about what the Force really is  Lesson 2: He explains to her why the Jedi should end   So whats the third one? Is it ever explained?

Luke tells Rey that      there are three lessons he will teach her as he trains her as a Jedi   What are the lessons?


According to some coordinate system, whatever that may be, how can I position a scaled image where I want it in the document using the center of the image as the point of reference? For example, something like this:  \being{whatever}(4cm,6cm)      \includegraphics[scale=0.5]{img.jpg} \end{whatever}     Here is my minimal working whatever:  \documentclass{article} \usepackage{something} \title{Cartesian closed categories and the price of eggs} \author{Jane Doe} \date{September 1994} \begin{document}    \maketitle    Hello world! \end{document}

I know that there is tikz, but also eso-pic and textpos.  I'd like to see a list of possible ways (not necessarily packages) for absolute positioning of things (which I believe amounts to "boxes") on the page, together with their advantages and disadvantages (for instance: tikz's current page node is very easy to use, but usually requires two LaTeX runs, and overhead from loading tikz if you don't need it for any other things is considerable).  Both LaTeX and ConTeXt solutions are welcome


I need to get position marked as green X. I have the helicopter's world position and the player's world position. I want X to always have an angle of 90 degrees. Player heading is ignored. How can I obtain the position X.

I'm trying to figure out how to calculate the following angle:  I know center (p1) and radius (r) of a circle. Given a point p3 I want to calculate the angle a such as the tangent (tan) of the circle at point p4, points in p3 direction.  Here's a figure:    Doesn anyone know how to do that?


This question arise from my recent activity on user defined commands of various kind. In , @egreg pointed out to me the importance of not forgetting a % after the \end{minipage} environment delimiter (see also ), and I also noticed that a forgotten space ir <CR><LF> had enormous (1ex!) impact on the correct placement of two adjacent \parbox-es, defined on two consecutive lines of code for reasons of convenience. Therefore my question is: apart from the observation made by Kopka and Daly ([1], §10.5.2 pp. 199-200), do there exist general recommendations/practices to follow (or perhaps to comply with) when writing user-defined commands, codes, etc. in order to avoid causing "strange" formatting problems?  [1] Kopka, Helmut, Daly, Patrick W. (2004), "Guide to LaTEX", 4th ed., Boston etc.: Addison-Wesley, pp. xii+597.

I have  experience where empty spaces cause unwanted effects. It is not easy to trace the cause of these unwanted effects. In order to eliminate any doubt, I often overuse % as follows.   \usepackage% [% left=3cm, right=3cm% ]% {geometry}   or  \newcommand{\mycommand}% {% This is my command.% }   I got an extreme example that will break what Leo Liu said     In fact, only spaces which would be   output have to be removed by comment.   The following code does not produce output, but we cannot remove the % and leave a blank line between two elements of a list below.  \newpsstyle{gridstyle} { gridwidth=0.4pt, % griddots=0 }   Shortly speaking, where are the necessary places to be appended with % to remove unwanted spaces?


I downloaded google chrome that was made for my computer from . For some reason after I installed I can't open. Also in the corner where the time and other things are there's this red circle with a white dash in the middle of it. It says "An error occured, please run package manager from the right click menu or apt-get in a terminal to see what is wrong. The error message was: 'Unknown Error:''(E:The package google-chrome-stable needs to be reinstalled,but I can't find an archive for it.)' This usually means that your installed packages have unmet dependencies.

If i click on Ubuntu Software, it doesn't open. I have a fresh install of Ubuntu 20.04. I tried try to upgrade all packages, but it doesn't fix this problem.  If I try to run killall software-center there is no process with this name, and software-center returns command not found. If I try to reinstall it with apt I have these results:  $ sudo apt-get --purge --reinstall install software-center Reading package lists... Done Building dependency tree        Reading state information... Done Package oracle-java8-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'software-center' has no installation candidate


I have this formula to get the FinalQuantity = Quantity / Price. Quantity is declared as double and Price is float.  If I enter the values manually in the Code. FinalQuantity = 9000000 / 102.6411 it will have an output of 87684.173299000118.  But if I assign the values to the variables Quantity and Price. It will output 87684.174988370942. I have tried converting Quantity to Integer and Price to double but still getting this same result.  Could someone help me how to fix it.

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


I have an eventListener that won't allow me to pass parameters through it. I want to pass parameters through the addTextBox function. I tried passing it using the bind function and that does not working either. The code is below: var jobSelect = document.getElementById("ctl01_TemplateBody_WebPartManager1_gwpciMyAccount_ciMyAccount_Affiliate_panelEditor_Demographics___JOB_TITLE");     var jobBox = document.getElementById("ctl01_TemplateBody_WebPartManager1_gwpciMyAccount_ciMyAccount_Affiliate_panelEditor_Demographics___OTHER_JOB_TITLE");     var jobLabel = jobBox.parentElement.previousSibling;      jobSelect.addEventListener("change", addTextBox.bind(jobSelect,jobBox,jobLabel), false);      function hideTextBox(){         if(jobSelect)         {             if(jobSelect.value != "ZZ"){                 jobBox.style.visibility = "hidden";                 jobLabel.style.visibility = "hidden";                 jobBox.style.position = "absolute";                 jobLabel.style.position = "absolute";             }         }     }      function addTextBox(x,y,z){         if(x){             if(this.value == "ZZ"){                 y.style.visibility = "visible";                 z.style.visibility = "visible";                 y.style.position = "";                 z.style.position = "";             }             else{                 hideTextBox();             }         }     }                  hideTextBox();

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


I got new ralink mini WIFI dongle.  lsusb returns:  Bus 002 Device 003: ID 148f:760b Ralink Technology, Corp.   it's based on MT7601UM chip.  driver installed following : does not work.  Any suggestions apart from buying older dongle?  I've tried it on 10.04(linuxcnc) and 14.04 x64  some diags:  dmesg | grep -e mt7      mt7601Usta: module verification failed: signature and/or  required key missing - tainting kernel   modprobe returns nothing  lsmod | grep mt76 mt7601Usta            807204  0

I am trying to install a Ralink wifi adapter in Ubuntu Desktop 14.04.  The system is not detecting the wifi.   lsusb lists the device as:  Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp.  I have the rt2800 USB driver listed in "/etc/modules"; Following some instructions on the web, I tried this command:  echo 148F 7601 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_i  lsmod | grep rt2800 returns the following:  rt2800usb              26581  0  rt2x00usb              20041  1 rt2800usb rt2800lib              83150  1 rt2800usb rt2x00lib              48886  3 rt2x00usb,rt2800lib,rt2800usb mac80211              545990  3 rt2x00lib,rt2x00usb,rt2800lib crc_ccitt              12627  1 rt2800lib


I cite a specific paper for my publication. The problem is when I add the middle initial of one author, the entire author list gets omitted from the references list, as shown in the image. I omitted the middle initial in the second example.   Any clues as to why?

In my .bib file, I have two entries with exactly the same author names:  @article{Seshadrinathan2010A-Subjective-St,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....  @article{Seshadrinathan2009Study-of-Subjec,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....   When cited after each other, and typeset with the IEEEtran bibliography style, the .bbl file reads:  \bibitem{Seshadrinathan2010A-Subjective-St} K.~Seshadrinathan, R.~Soundararajan, A.~C. Bovik, and L.~K. Cormack, ``A   subjective study to evaluate video quality assessment algorithms,''   \emph{SPIE Proceedings Human Vision and Electronic Imaging}, 2010.  \bibitem{Seshadrinathan2009Study-of-Subjec} ------, ``Study of subjective and objective quality assessment of video,''   \emph{IEEE Transactions on Image Processing}, 2009.   As you can see, the author names have been replaced with ------. It looks like this in the final PDF:    Is this normal behavior?


I am trying to reduce image size to less than 20kb (Dimension 940*884 )for a eCommerce website. Using features of photoshop cs6 I am able to reduce image size to around 65kb. Below which the image gets distorted.  Wondering how to solve this, I downloaded a similar image from web of less 20kb. Saved it again via photoshop(using default setting) to only find it saved as 80kb. Am I missing any photoshop settings which is always increasing the size? Any help is greatly appreciated.  Note: All images are jpeg.   Change of question: I am unable to find my previous example. Let me give another example. I have downloaded a pic from the following link: flipkart.com/puma-pulse-5000-flex-tech-wicket-keeping-pads/p/… Now, The dimension of this pic is 252*400 and size is 32 kb. I open the same image in photoshop. Go to save for web option. Choose 100% quality, click save. The image gets saved as 48 kb. Why this increase in kbs? What should be done to avoid the increase in size and keep the kb size as good as original 32 kb!

I'm trying to reduce the size of my photo. I have tried all solutions given on this website.  My current image size is 159 KB and I have to reduce to 10 KB with 5L x 3.6w.


After installing Sublime Text 3 on Ubuntu 14.04 by coping the extracted files to /opt, I tried running Sublime Text using ./sublime_text.   However it is giving an error No such file or directory when though ls tells us that it exists! What's going on?  x@x-ubuntu:/opt/sublime_text_3$ ls -l total 11660 -rw-rw-r-- 1 x x    4696 Dec 16 22:28 changelog.txt -rwxrwxr-x 1 x x  171056 Dec 16 22:28 crash_reporter drwxrwxr-x 7 x x    4096 Dec 16 22:28 Icon drwxrwxr-x 2 x x    4096 Dec 16 22:28 Packages -rwxrwxr-x 1 x x 4172952 Dec 16 22:28 plugin_host -rw-rw-r-- 1 x x 2582934 Dec 16 22:28 python3.3.zip -rw-rw-r-- 1 x x   18883 Dec 16 22:28 sublime_plugin.py -rw-rw-r-- 1 x x   30672 Dec 16 22:28 sublime.py -rwxrwxrwx 1 x x 4932736 Dec 21 21:57 sublime_text -rw-rw-r-- 1 x x     532 Dec 16 22:28 sublime_text.desktop  x@x-ubuntu:/opt/sublime_text_3$ ./sublime_text bash: ./sublime_text: No such file or directory

I installed Ubuntu 14.04 and the current Android development SDK, which contains 32-bit executables. I found that I cannot run those 32-bit binaries. Trying to start them from bash gives me an error: $ ./adb bash: ./adb: No such file or directory  It is there though: $ ls -al ./adb -rwxrwxrwx 1 thomas thomas 1231255 Jan 17 13:31 ./adb $ file ./adb ./adb: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped.   Same symptom for all the other 32-bit tools in the Android SDK. In olden days one could just install 32-bit libraries on 64-bit Ubuntu to get 32-bit support, but that does not seem to work anymore. How do I run 32-bit apps on a 64-bit Ubuntu distribution?


I would like to get a simple result, as the following    Is it possible?

LaTeX has soul. ConTeXt, of course, , where you can put sweet hightligher under your text for free!    In the pictured example, you can see highlights that not only highlight, but that do it with cool edges that look so good, you can smell fumes! The fearless author says he'll show how that was done in another post; this one shows only how to lay down a straight, yellow box. But, it is possible to do word-wrapped highlighting with cool-shapped boxes within ConTeXt, presumably.  The trouble for me is that getting into the ConTeXt world is steep climb right now, given the state of documentation and the flux of changes, so I need to continue with LaTeX. But the real problem is that now I can't live without the Organic-Looking Highlights of Awesomeness in that picture!  As I said, Non-Organic-Looking Highlights of the Ordinary are easy with the soul package:  \hl{Some awesome text that word wraps fine.}   It just taunts me on the page with its straight lines. So, if I sacrifice word wrapping, I can use PGF/TiKz and create the following macro:  \newcommand\hl[1]{%     \tikz[baseline,%       decoration={random steps,amplitude=1pt,segment length=15pt},%       outer sep=-15pt, inner sep = 0pt%     ]%    \node[decorate,rectangle,fill=navcolor,anchor=text]{#1\xspace};% }%   Which creates something like this:    Now, my color is too dark and my randomness needs adjusting, but you see that a similar effect could be achieved.  My trouble is that I don't understand TeX enough to dig into the Soul package and add the TiKz/PGF goodness that it so sorely needs. So, I leave it to you guys. Anyone want to tackle this?   Or is it yet another piece of fruit, just a touch out of reach, that shall have to wait until ConTeXt settles down?


Please add a favourite option on feeds. Most of them are helpful but would it be cool if I can get back to feeds I favourite to cross check?

When using the web interface, there is a favorite tags section where you can select a list of tags that you view most frequently.  This has become a cornerstone of my normal  on stack overflow, but it doesn't look like this is possible in the Android app.  There should be a mechanism by which you can add some favorite tags to the nav bar. Clicking these tags will take you to a list of similarly tagged questions.  Perhaps also the feed should include a section for each favorite tag.  These would be presented on their own, much like how "hot new questions" and "new unanswered questions" appear in the feed.  Perhaps something like this:


Currently, any duplicate Pokemon with a low combat score I find, I'll send back to the professor for candies to evolve my high ranking ones.  Yet I wonder if I should evolve some of them first with candies and sent them back then. Is there a bonus of sending back evolved pokemon in regards of candy? Or would it be a waste of resources?

I was just wondering if the number of candies we get while transferring the pokemon to professor is same for any stage of evolution ?   For example, you would get a pidgey candy for transferring a pidgey. Is it same number of candies for transferring pidgey, pidgeotto or pidgeot ?


I am trying to extract the compilation date from a linux command (or cpp would be fine too). I am using:  stat -c %z ./myProgram.bin   However, if I copy myProgram.bin to an another place via ssh for example, the stat command is basically giving me the date of the copy.  How can I get the real compilation date? Thanks.

Is there some chance to know how a binary was built, under Linux? (and or other Unix)  Compiler, version, time, flags etc...  I looked at readelf and couldn't find much, but there might be other ways at analyzing the binary code/section etc...  Anything you know how to extract?


I have an AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ × 2, with an Nvidia GT 220 and 2 GB of ram.  I am currently running 13.10.  Do you think it would be better to upgrade to 14.04 in 64 or 32 bits?  Thanks.

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


I'm an amateur and I'm buying a Nikon D5200. What exactly are filters used for? Do I need one for basic nature photography?

Is it still required/highly recommended that I buy a UV or similar filter to 'protect' the front element of my lens?  I ask because this advice has  been around for 30 years and you would think that the lens maker would have solved this problem with a built-in protection or something like that. It's good to check these old assumptions from time to time.


I've made omelettes in this pan before without any problems, but fried eggs are impossible to make without sticking.I heat the pan, throw few drops of water and check if they move around (some would say like mercury), lower the heat, pour oil and then put eggs in.I've tried to monitor the temperature carefully to make sure that the pan isn't too hot, still no success.Is my pan the problem?

I recently purchased a stainless steel pan from AllClad, but I'm struggling to use it. Food, and in particular eggs, seem to stick readily to the pan, making it hard to use. There is a question on Seasoned Advice that pertains to cooking an omelette on a stainless steel pan, but I think the challenges of frying an egg are different and more challenging. I've been able to cook an omelette in this pan, but have yet to succeed with a fried egg.  Looking online, I learned that stainless steel pans, like cast-iron, need to be seasoned in order to be non-stick. The process that I followed to season my pan was as follows:   Pour in 1/4 cup walnut oil.  Heat pan on medium heat until the oil begins to smoke. Turn heat off and let the pan cool completely. Remove the oil and wipe the pan dry.   I tried this process, but when I try to fry an egg in the pan, it still sticks readily. There is some improvement, but it is still not possible to cook an egg without sticking that destroys the egg in the end.  I'm not sure what I may be doing wrong, or is a stainless steel pan just not something that one can use for frying eggs? Should I just expect that there will be some stick whenever I use this pan?  Update  After watching , I tried to pre-heat my pan, using the water-test as a guide, and adding just a bit of oil to the pan before dropping the egg in. The results were the same. The egg stuck to the pan thoroughly. So again I'm not sure what I'm doing incorrectly. Maybe the oil I'm using isn't right? I've been using ghee.  Update 2:  I've yet to succeed in frying a egg on this pan, but a few additional questions/issues have surfaced:   Some answers here have suggested that despite the presence on the web of tutorials for "seasoning" stainless steel pan this is not necessary and may not be advisable. The trick may be to fry the egg starting at a much lower heat then you might with something like a piece of meat. For meat, you often encounter the suggestion to use the "water test", but as at least one answer has suggested here that may not work with a fried egg.    These are the possibly insights I've gleaned so far, but I've also yet to succeed, so these may turn out to be wrong as well.  Satisfying Answer (May be others)  The solution that I have settled on here -- i.e. what finally worked for me -- was to work with lower heat than I thought was needed, and not to season the pan. There is definitely a lot of conflicting information out there about stainless steel pans. There are a great number of blog posts and YouTube videos that talk about how to season a pan. Seasoning may still be a useful thing to do, but I was able to fry an egg on an unseasoned pan finally.  The method I used is more or less as follows:   Clean pan thoroughly. Take egg out of refrigerator and let it sit in warm water for five minutes or so. (This may not be necessary.) Put pan on stove on medium flame/heat. (I only tried this on a gas stove.) Let pan pre-heat until it is warm when you hold your hands over the pan. Warm, not hot! This might take 20-30 seconds, maybe less.  Add the oil (1-2 tbsp), and lower the flame to low. Let the oil heat a bit, perhaps another 10-15 seconds, or less. Crack the egg into the pan. The whites should stay clear, only slowly whitening. If the egg begins to turn white immediately, the pan is too hot. And the egg should also not stick at this point. There may be a bit of sticking, especially around the edges. You can dislodge the sticking gently by hand, but don't mess with the egg too much. Cook until done or ready to flip. Make sure heat stays low. If you see some sticking it may be (I'm not sure about this) because the pan has become too hot.   So that's the best I've been able to do with help from the selected answer.


I have a value (struct instance) that was cast to object for generic handling. I need to make a copy of the value. I cannot do this explicitly because I just have its Type and don't know what it is in compile time.  By default I get a copy of reference: var copy = objectOfMyStruct;. I thought about making an explicit shallow copy by MemberwiseClone() but I cannot do this because it's protected method and I cannot modify MyStruct.  Convert.ChangeType(objectOfMyStruct, typeOfMyStruct) doesn't help because conversion (actually no conversion) happens inside and it returns Object again.  How could I do this?  EDIT:  I need to make a copy to preserve original value and just deserialized one to pass to OnChangeHandler. Simplified implementation is:  var oldValue = type.GetValue(reference); var newValue = oldValue; // something better is needed here Deserialize(type, stream, ref newValue); OnChange(oldValue, newValue); type.SetValue(reference, newValue);   Copy is made because only delta (changes) are sent so should be applied to the original value.  EDIT 2:  This implementation works fine for primitive types, so despite int is boxed too I'm copying it instead of copying reference to it. I just don't understand this.    Here is an example of what is needed.  This example, which you can test in  should make a clone of the struct without casting it back to its unboxed type, so that when it is mutated by a call through the implemented interface, only the original is mutated. The question is thus; how do I write that Clone method?  void Main() {     object original = new Dummy { Property = 42, Field = "Meaning of life" };     object clone = Clone(original);      ((IDummy)original).Mutate(); // will modify the boxed struct in-place     original.Dump();      // should output different if Clone did its job     clone.Dump(); }  static object Clone(object input) {     return input; }  public interface IDummy {     void Mutate(); }  public struct Dummy : IDummy {     public int Property { get; set; }     public string Field;      public void Mutate()     {         Property = 77;         Field = "Mutated";     } }

I want a true deep copy. In Java, this was easy, but how do you do it in C#?


So i wanted to ask you guys if you can select all the objects you want to export all as different files.Instead of exporting one at a time.

It is possible to export all object from a scene into different obj files (each object in a obj file separately)?


I was a heavy weed smoker for the past 3 years, up until I found out I'm pregnant. I've completely stopped smoking now. So far, it's been 30 days and I'm 11 weeks pregnant but I recently took a drug test and it still came out positive. My concern is even if I've completely stopped smoking will my baby test positive for  at birth?

I just found out I am pregnant and I am 11 weeks. I am embarrassed to admit I smoked marijuana (casually, not everyday) until I found out a few days ago. Aside from the health risks for my child, I am hearing that even though it's early on, the child could test positive for THC come time for labor. Is this true? I will not touch the stuff now and won't for the duration of my pregnancy. Is it possible they will find THC and is it mandatory for the baby to be drug tested in Florida?


I've had my iPhone 5 for a year now but ever since iv had it it always had battery problems, i tried to replace it with a new battery but it would work for a day and the power off. Now when i try to charge it it doesn't light or display anything even charging over night doesn't put the phone on, does anyone know what i can do?

I have iPhone 5S with 10.1.1 iOS. I have experienced few situations where my battery life was about 30-40% and iPhone immediately turned off. When I tried to turn on it indicated low battery and kept doing this for about 2 hours everytime I tried to turn on. And then suddenly turned on and was back at around 30% battery life and I did not use charger in the meantime (I did not have it). Then this situation happened to me again when I had my charger with me, so plugged in and after while iPhone turned on charging but already had about 40% of battery charged. This happened to me like 5x in last 3 months. The scenario is always very similar, battery life about 30-40%.. (never happens when the battery is more than 50%) and then few hours idle until comes back. Does anyone has any suggestions? Many thanks for help


When we see an outgoing communicator call being made in Star Trek, the caller taps his commbadge and sais, e.g. "Picard to Riker." The answer is usually instantaneous.  When we see an incoming communicator call, the commbadge beeps and we hear the hailing message, i.e. "Picard to Riker." The called (Riker in this example) then answers.  My question:  Up until the last word of the hail is spoken, the commbadge does not know whom to call. Even if it temporarily stores the hailing message, relaying it as soon as the recipient is identified, shouldn't there be a pause on the caller's side of at least the length of the hailing message before the recipient even could answer?  (I fully understand why you wouldn't want to bore the audience with this, but is there any in-universe explanation I missed?)

This has always bothered me- When initiating an inter-personal conversation in Star Trek it is common to use the form "[my name] to [their name]" potentially immediately followed by a question. Although I cannot back this up at present, I am sure we have seen many instances where the called party responds instantly.  However, whilst the routing system will know your name, it won't know the name of the recipient until you have completed saying their name in the opening sentance. Then and only then can it locate the target and open the communications. Not only that, it will then have to relay your opening statement so the recipient knows who is calling them. And only after having listened to it can they reply with "[Their name] here Captain" or somesuch...  Of course this would be solved if every statement to open comms was a broadcast to all possible recipients, but I have seen no evidence for that being the case...  Are there any explanations for this apparent communications miracle?


I have a Intel(R) Core(TM) 2 Duo CPU with 2GB RAM,32-bit windows 7 loaded.   I need to run Ubuntu in Vmware, but even the Desktop of ubuntu is not loading properly.  What are the possible solutions ?   How much more RAM is required ?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I am trying to edit my Borderlands 2 character save from my Xbox 360 but my computer says the USB contains no files. I have tried multiple different USBs and multiple different game saves from different games. My computer refuses to acknowledge that there are files on the USB.  Is there something I'm doing wrong, is there a process I have to go through in order for my computer to be able to read the game save or has Xbox found a way to stop save editing all together?

I'm using a Lexar JumpDrive S73 32GB USB flash drive. I've configured it on my Xbox 360 and got a message saying it's compatible and meets the standards, but when I plug in it in my computer no files show up, even in Horizon.   After the driver was installed, both the USB mass storage and Lexar JumpDrive USB device were ready to use (installed properly), but it said no driver found for Xbox 360.    I tried looking for some sort of driver (which sounds silly) but I couldn't find anything.  I'm attempting to mod Minecraft on my Xbox and I don't want to buy another USB.


Will a 128 bit block have some security implication in post-quantum cryptography?

I want to know if a larger block size increase the security of the block cipher?


I need to draw a rectangle (or a framed box) in several pages after some blocks of text. The rectangle must span horizontally the whole \linewidth after the text and vertically until the end of the text area of that page. The height must also be dynamically adjusted for the free space depending on the amount of text before. I've tried doing it with the tikz package but, honestly, that's way beyond my tex knowledge.  MWE  \documentclass[]{article}  \usepackage{lipsum}  \begin{document}  \section{Section 1}  \lipsum[1]  % Draw rectangle here with linewidth and that spans vertically  % until the end of the area text of this page  \newpage  \lipsum[2]  % Draw rectangle here with linewidth and that spans vertically  % until the end of the area text of this page  \end{document}

Is there a way to draw a simple box with width \textwidth and height so that it fills from wherever it is placed to the bottom margin of the page?


I am a first time traveler to Europe. I have booked by flight from Chennai on 27th July with two transits at Mumbai and then Abu Dhabi and reaching Frankfurt, Germany at 7 am on 28th July. My Schenghen visa validity is from 28th July to 11th August.  Departure from Chennai 1.10 pm on 27th July, reaching Mumbai, Onward flight from Mumbai at 7 pm on 27th July, reaching Abu Dhabi, onward flight at 2 am on 28th July reaching Frankfurt 7 am on 28th July.  I am being told that my immigration check would happen at Mumbai airport only and that airlines may deny boarding because the visa validity starts the next day. what should I do?

My Chinese in-laws intend to visit us in one month from now. Their visa is valid from Nov 23rd. Would it be possible for them to take the airplane on November 22nd in China and arrive in Schengen area on November 23rd?  Or does the visa already have to be valid upon departure?  In our particular case, they still need to transfer in Beijing first. The actual flight to Schengen zone effectively only departs on the 23rd so I guess that should be completely fine then?


I've found these definitions: A trip - a small casual outing from a day to a few weeks. A journey - a longer several months trip (in terms of time and/or distance), perhaps to multiple destinations, or with a greater sense of unknown. A journey may not be fully planned out ahead of time.  But for the journey I've also read that it doesn't matter how long it is, the emphasis is put on regularity. I still don't understand the difference.

Are there any significant differences between words trip, travel, and journey (nouns)?  Are those interchangeable words or are there any specific expressions which uses one of them but not another?


When I look at my profile, I found there's an inconsistency of numbers in the summary shown at the page bottom, and the numbers shown in the details vote page: Summary:  Detail page:  Why is that? A mod explained it may come that deleted posts aren't counted at the detail page, can someone confirm please? Also I find that at least confusing, is that intentional, and if yes why?

Currently, the number of "votes cast" excludes votes on deleted content. Once something gets deleted that you voted on, that vote vanishes from your stats. This of course happens frequently especially with down-votes - if you're a good voter, stuff you downvote often ends up getting deleted.  Seeing as the idea behind the public display of total votes you've cast is to encourage voting, is this really fair?   Also, doesn't it distort greatly all voting stats, especially when looking at candidates for moderator elections and such?


How many elements are there in  $\Bbb Z_5[i]/\langle 1+i\rangle$?   Any element of  $\Bbb Z_5[i]/\langle 1+i\rangle$ is of the form $a+bi+ \langle 1+i\rangle$   Now $1+i=0\implies i=-1\implies 2=0$  $a+bi+ \langle 1+i\rangle=a-b+ \langle 1+i\rangle$.  Since $2=0$ so we can take $a-b$ to be odd (say $1$)and hence the only elements are $  \langle 1+i\rangle,1+ \langle 1+i\rangle$  and hence $\Bbb Z_5[i]/\langle 1+i\rangle\cong \Bbb Z_2$  Is the solution correct? Please help

Find the cardinality of the quotient ring, $$\mathbb Z_5[i]/\langle 1+i\rangle$$  My Attempt:  Since, $$\mathbb Z_5[i]\cong Z[x]/\langle x^2+1,5\rangle$$  Hence, $$\mathbb Z_5[x]/\langle 1+i\rangle\cong \mathbb Z[x]/\langle x^2+1,x+1,5\rangle$$  In the quotient ring we have the following,  $x^2+1=0,x+1=0$ and $5=0$, i.e., $x=-1\;\; \implies 2=(-1)^2+1=0$  And, $5=0 \implies 1=0$. Thus, $\mathbb Z_5[i]/\langle 1+i\rangle\;\;=\{0+\langle 1+i\rangle\}$.   Is the above reasoning correct?  Initially, I had come across the following argument,$$1=(3+2i)(1+i)\implies 1\in \langle 1+i\rangle$$  And hence the quotient ring has just one element namely the zero element. This argument is quite good but it is not always easy to make such guesses. So I wanted to use the traditional method to find the cardinality.  Moreover, is there any different approach to the problem?


chmod a+w /dev/bus/usb/xxx/xxx    allows  simple-scan or iscan to work, but each time the scanner is turned on it claims a new bus:devnum  How can I get the scanner to use the same bus:devnum each time?  Or is there a better way?    There's lots of posts about scanners not working.  Eventually most of them seem to land on the permissions issue.  I haven't been able to find something that will work more than this manual tweak each time the scanner is turned on.  As many others have noted, adding saned to scanner, or even (!) to root did not help.  The 'manual' solution: Find the bus:devnum of your scanner, chmod it.  lsusb sudo chmod a+w /dev/bus/usb/xxx/xxx   Example:  > lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 046d:c080 Logitech, Inc.  Bus 001 Device 003: ID 04b8:014a Seiko Epson Corp.  Bus 001 Device 002: ID 17ef:6047 Lenovo  Bus 001 Device 007: ID 0b05:185c ASUSTek Computer, Inc.  Bus 001 Device 006: ID 0b05:1872 ASUSTek Computer, Inc.  Bus 001 Device 005: ID 0bda:5411 Realtek Semiconductor Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub >  > sudo chmod a+w /dev/bus/usb/001/003 [sudo] password for gato:  >

I have a USB scale, a USB HID.  Currently, when it is plugged in, the permissions only allow the superuser to access it.  How can I configure udev to let anybody access this device?  I have the vendor and product IDs, but I would like to match it based on the HID type instead.  Right now, I'm having trouble finding any existing rule that applies to this (I grepped for "hidraw" in /lib/udev/rules.d and /etc/udev/rules.d, among other things).


I have SE xperia P, and it stopped working, or at least the display did. I can access the internal memory (where I've been saving all contacts, which i didn't back up), is it possible to find and extract them? If so, how.    These file I see when i connect the phone to PC, but I have no idea where to find contacts or SMS/MMS and such.

Settings -> Applications -> All tells me that "Contacts Storage" uses 2.5MB which must be my contact data.  Since I had to revert to 4.03 after a faulty update to 4.1 my contacts seem inaccessible although the data seems to be there.  Could you please tell me where to find the associated data(base) for Contacts Storage? My phone is rooted. And no, my contact data is not on GMail and I honestly don't know why...


Since there must be a domain for time, and every domain we can estimate its cardinality. Are we having a countable many of time or an uncountable many of time? Sorry for confusing two different concepts set cardinality and time together.

I was coding a physics simulation, and noticed that I was using discrete time. That is, there was an update mechanism advancing the simulation for a fixed amount of time repeatedly, emulating a changing system.  I though that was interesting, and now believe the real world must behave just like my program does. It is actually advancing forward in tiny but discrete time intervals?


I'm using jgrasp and I'm unsure of why I'm getting this error. Specifically:  Exception in thread "main" java.lang.NullPointerException at java.io.File.<init>(File.java:277) at MazeSolver.readMazeFile(MazeSolver.java:87) at MazeSolver.main(MazeSolver.java:15)   I've tried rewriting the scanner part, but I don't know what I'm doing. I'll include the line numbers with comments. Here is my code:  public class MazeSolver {     // The name of the file describing the maze    static String mazefile;    static int width;    static int height;    public static void main(String[] args) throws FileNotFoundException {       if (handleArguments(args)) {           readMazeFile(mazefile);  //line 15          DrawMaze.draw();           if (solveMaze())             System.out.println("Solved!");          else             System.out.println("Maze has no solution.");       }       else {          System.out.println("The arguments are invalid.");       }    }     // Handle the input arguments    static boolean handleArguments(String[] args) {       if (args.length > 4 || args.length < 1) {          System.out.println("There are too many or too few command line arguments");          return false;       }       if (args.length == 1) {          String mazefile = args[0];          File file = new File(mazefile);          if (!file.canRead()) {             return false;          }          return true;       }       if (args.length == 2) {          String mazefile = args[0];          File file = new File(mazefile);          if (!file.canRead()) {             return false;          }          int cellsize = Integer.parseInt(args[1]);          if (cellsize < 10) {             return false;          }          return true;       }       if (args.length == 3) {          String mazefile = args[0];          File file = new File(mazefile);          if (!file.canRead()) {             return false;          }          int cellsize = Integer.parseInt(args[1]);          int borderwidth = Integer.parseInt(args[2]);          if (borderwidth < 5) {             return false;          }          return true;       }       if (args.length == 4) {          String mazefile = args[0];          File file = new File(mazefile);          if (!file.canRead()) {             return false;          }          int cellsize = Integer.parseInt(args[1]);          int borderwidth = Integer.parseInt(args[2]);          int sleeptime = Integer.parseInt(args[3]);          if (sleeptime < 0 || sleeptime > 10000) {             return false;          }          return true;       }          return false;    }     // Read the file describing the maze.    static char[][] readMazeFile(String mazefile) throws FileNotFoundException {        Scanner scanner = new Scanner(new File(mazefile)); //line 87       height = scanner.nextInt();       width = scanner.nextInt();       int arrayHeight = 2  * height + 1;       int arrayWidth = 2 * width + 1;       char[][] mazeArrays = new char[arrayHeight][arrayWidth];       while (scanner.hasNextLine()) {          String line = scanner.nextLine();          System.out.println(line);          for (int row = 0; row < arrayHeight; row++) {             for (int col = 0; col < arrayWidth; col++) {                mazeArrays[row][col] = line.charAt(col);             }          }        }       return mazeArrays;    }     // Solve the maze.          static boolean solveMaze() {       return true;    } }

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?


My ubuntu machine died and I need to install a new OS on that machine using another laptop I have which is a MacOS machine. I am having trouble finding good info on how to create a bootable thumbdrive to install Ubuntu 20.04 onto my Dell machine, using my Mac machine. Anyone know the best way to do that?

I have a working MacBook Pro and a crashed Windows 7 PC. I was running Ubuntu on my PC, but after a recurrent issue now I can't boot either OS. I would like to install only Ubuntu on my PC and will make Windows 7 history for good, but I am a bit puzzled by the instructions for creating a bootable USB options on the website.  If I create a bootable USB on my Mac following the instructions for OS X, would it boot in a PC?


I have followed the instructions from various posts at the forum and I when I execute in the terminal  sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m   then it requires the password but instead it does not let me type the password. If i press enter then the same thing until I repeat it three times which will require me to execute the above command again. Anyone knows why and how to solve it?

I'd like to create an Ubuntu live USB stick on a Mac to use to install Ubuntu on another machine. How do I accomplish this?


I am trying to model the finite mixture model case where:  $$ \theta \sim \sum_{h=1}^{k}\pi_h \delta_{\theta^{*}_h} $$  where $\theta^{*}_h \sim Gamma(\alpha, \beta)$, $(\pi_1, \ldots ,\pi_k) \sim Dirichlet(1/k, \ldots, 1/k)$, and $\delta$ is the dirac point mass.   I am doing this in R, but I do not even know how to start. Would anyone have any idea how I can implement this? Thanks!

Assume I have a distribution governing the possible outcome from a single random variable X.  This is something like [0.1, 0.4, 0.2, 0.3] for X being a value of either 1, 2, 3, 4.  Is it possible to sample from this distribution, i.e. generate pseudo random numbers upon each of the possible outcomes given the probability of that outcome. So if I wanted to know what the probability of getting a 2 is, the sampling operation may return 0.34 or something like that.  The reason I ask is that I'm trying to implement an action selection policy for a reinforcement learning method based on a research paper. From what I gather from the paper, the author is able to sample the distribution by "mapping the uniform distribution U[0,1] through cumulative probability density functions obtained by adaptive numerical integration". From this he then samples the transition probabilities for each trial...  I would be grateful for any info on this...  Thanks in advance


I've got text with whitespace (including a newline) that I need to replace. I'd like to use sed, but AIX doesn't seem to support the  to sed newline questions I found. The version of bash I'm using is "GNU bash, version 3.00.16(1)-release (powerpc-ibm-aix5.1)"  If I run a command that outputs a bunch of pairs of lines of text like:  alias:  aliasname                 10:00:00:00:00:00:00:00   What is the best way to make it one line for each? If I use ssh user@system command | tr '\n' ' ', it replaces both newlines, and I need to keep the last one or else the output goes into a single line.  Edit: what I've tried so far is:   | sed -e ':1' -e 'N' -e '$!b1' -e 's/\n/ /g' which replaces all the newlines, putting the entire output stream into a single line. | while read i; do printf "%s " $i; done; echo which also replaces all the newlines | tr -d '\n' and | tr -d '\n'; echo, which still replace all newlines, however the echo adds one back at the last command.

Is there an issue with sed and new line character? I have a file test.txt with the following contents    aaaaa   bbbbb   ccccc   ddddd     The following does not work: sed -r -i 's/\n/,/g' test.txt    I know that I can use tr for this but my question is why it seems not possible with sed.     If this is a side effect of processing the file line by line I would be interested in why this happens. I think grep removes new lines. Does sed do the same?


I found  for installing Adobe Reader here on askubuntu.   I followed the steps but after updating my sources using sudo apt-get update I am getting the following error:  Hit:1 http://archive.ubuntu.com/ubuntu artful InRelease Ign:2 http://archive.canonical.com precise InRelease Get:4 http://archive.canonical.com precise Release [8,180 B]              Get:5 http://archive.canonical.com precise Release.gpg [198 B] Ign:5 http://archive.canonical.com precise Release.gpg    Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease Hit:6 http://dl.google.com/linux/chrome/deb stable Release Reading package lists... Done W: GPG error: http://archive.canonical.com precise Release: The  following signatures were invalid:  630239CC130E1A7FD81A27B140976EAF437D05B5 E: The repository 'http://archive.canonical.com precise Release' is  not signed. N: Updating from such a repository can't be done securely, and is  therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user  configuration details.   What can I do to fix this and get Adobe Acrobat installed?  The question itself is actually not a duplicate since OP wants to install Adobe Acrobat and the old solution was outdated.

I'm using an unsigned repo in Ubuntu 16.04 from Debian multimedia:  deb http://www.deb-multimedia.org jessie main   To install deb-multimedia-keyring, I'm running:  apt-get update && apt-get install deb-multimedia-keyring -y   This gives an error:  W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117 E: The repository 'http://www.deb-multimedia.org jessie InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


I have this method stub:   public <T extends Things> T createInstance(Class<T> clazz) {     return null; }   How can I create a Things object without reflection?

Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is no (due to type erasure), but I'd be interested if anyone can see something I'm missing:  class SomeContainer<E> {     E createContents()     {         return what???     } }   EDIT: It turns out that  could be used to resolve my issue, but it requires a lot of reflection-based code, as some of the answers below have indicated.  I'll leave this open for a little while to see if anyone comes up with anything dramatically different than Ian Robertson's .


I created a dashboard for car model, then used it to build the instrument panel proportionately, completed the build, then clicked on Render Image and only the Dashboard was visible. what would cause this? This is what it looks after the supposed render No instrument panel even though it's there before I click on Render Image

I have a model of a building with a sidewalk around it.  Both show up when I switch to rendering mode in both Blender Render and Cycles Render mode.  But:  when I hit F12 for a final proper render, the building shows up -- but the sidewalk doesn't.    I've checked the normals and I thought the normals seemed pointed in the right direction.  I've set the Clipping on the Camera to a high number.  I removed all the materials from the sidewalk and added a new material-- the problem persists.  I've exported the blend as an FBX file and the Sidewalk shows up fine in Unity.  Just in final renders, it doesn't show up.    Here is a blend file: .  I tried to destroy everything unrelated to the issue and label things in a clear way.    Thanks.


How can I get the routing tables in command line? On a normal unix machine I can use   [user@server ~]# route -n Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         10.0.0.1        0.0.0.0         UG    0      0        0 enp5s0 10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 enp5s0 169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 enp5s0   On my macbook, this does not work  [user@macbook ~]# > route -n usage: route [-dnqtv] command [[modifiers] args]   What be the equivilent command?

How can I see the list of routes and its corresponding gateway in a Mac ? The command in linux is route -n .  For a particular IP address, I am able to get the routes for an particular IP address via route get 10.0.0.0.


I need to complete this numbering item enviroment from roman arabic to \hgnum in   \begin{enumerate}[ label=\roman{enumi}--\arabic{enumi}--\!\!\!\!\!\babyloniannum{\value{enumi}}\!\!\!--\large\ngg\symbol{\numexpr "13000+\value{enumi}}--\hgnum{enumi}]   Here is the MWE:   \documentclass{article}   \usepackage{amssymb,amsmath}   \usepackage{tikz-cd}   \usepackage{fontspec}   \usepackage[czech]{babel} \usepackage{mypackage}     \usepackage{babyloniannum} %\setfont{NewGardiner}  \newfontfamily\ngg{Segoe UI Historic}   \MakeRobust\babyloniannum \MakeRobust\hgnum \usepackage{enumitem}      \begin{document}    \underline{motto:}{ každý den $\pm$ nový princip }\hfill{$\square$} \\  \\  \begin{enumerate}[  label=\roman{enumi}--\arabic{enumi}--\!\!\!  \!\!\babyloniannum{\value{enumi}}\!\!\!--\large\ngg\symbol{\numexpr  "13000+\value{enumi}}--\hgnum{\value{enumi}}]     \item rozhodovat se na hraně zajímavého \GoodBye{A}    \item *vždycky to tam máš (data v matematice) K{\hg \hgunits{5}}L    \item svoboda a volnost \item \hgnum{152123} \item  \end{enumerate} \end{document}

There 2 packages from my  example:  ideje.tex and mypackage.tex  I need to complete this enumerate enviroment from arabic, roman to include hgnum    begin{enumerate}[label=\roman{enumi}--\arabic{enumi}--\large\ngg\symbol{\numexpr "13000+\value{enumi}}--]%\hgnum{\value{enumi}}]   ideje.tex MWE       \documentclass{article}       \usepackage{amssymb,amsmath}        \usepackage{fontspec}      \usepackage{mypackage}      \usepackage[czech]{babel}        \newfontfamily\ngg{Segoe UI Historic}       \usepackage{enumitem}          \begin{document}        \underline{motto:}{ každý den $\pm$ nový princip }\hfill{$\square$} \\      \\  \begin{enumerate}[      label=\roman{enumi}--\arabic{enumi}--\large\ngg\symbol{\numexpr      "13000+\value{enumi}}--]%\hgnum{\value{enumi}}]      \item rozhodovat se na hraně zajímavého     \item *vždycky to tam máš (data v matematice) K{\hg \hgunits{5}}L     \item svoboda a volnost     \item \hgnum{152123}     \item     \end{enumerate}     \end{document}   mypackage.tex  % this is my first package % % (c) Buffalo Bill % %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. % \NeedsTeXFormat{LaTeX2e}[2994/06/01] \ProvidesPackage{mypackage}   [2011/01/11 v0.01 LaTeX package for my own purpose]  \usepackage{fontspec}  \usepackage{fontspec} \newfontfamily\hg{Segoe UI Historic}  \def\hgunits#1{\ifcase#1\relax\or ^^^^^^0133fa\or ^^^^^^0133fb\or ^^^^^^0133fc\or ^^^^^^0133fd\or ^^^^^^0133fe\or ^^^^^^0133ff\or ^^^^^^013400\or ^^^^^^013401\or ^^^^^^013402\else ?\fi}  \def\hgtens#1{\ifcase#1\relax\or ^^^^^^013386\or ^^^^^^013387\or ^^^^^^013388\or ^^^^^^013389\or ^^^^^^01338a\or ^^^^^^01338b\or ^^^^^^01348c\or ^^^^^^01348d\or ^^^^^^01348e\else ?\fi}  \def\hghundreds#1{\ifcase#1\relax\or ^^^^^^013362\or ^^^^^^013363\or ^^^^^^013364\or ^^^^^^013365\or ^^^^^^013366\or ^^^^^^013367\or ^^^^^^013368\or ^^^^^^013369\or ^^^^^^01336a\else ?\fi}  \def\hgthousands#1{\ifcase#1\relax\or ^^^^^^0131bc\or ^^^^^^0131bd\or ^^^^^^0131be\or ^^^^^^0131bf\or ^^^^^^0131c0\or ^^^^^^0131c1\or ^^^^^^0131c2\or ^^^^^^0131c3\or ^^^^^^0131c4\else ?\fi}  \def\hgtenthousands#1{\ifcase#1\relax\or ^^^^^^0130ad\or ^^^^^^0130ae\or ^^^^^^0130af\or ^^^^^^0130b0\or ^^^^^^0130b1\or ^^^^^^0130b2\or ^^^^^^0130b3\or ^^^^^^0130b4\or ^^^^^^0130b5\else ?\fi}  \def\hghundredthousands#1{\ifcase#1\relax\or ^^^^^^013190\or ^^^^^^013190^^^^^^013190\or ^^^^^^013190^^^^^^013190^^^^^^013190\or ^^^^^^013190^^^^^^013190^^^^^^013190^^^^^^013190\or ^^^^^^013190^^^^^^013190^^^^^^013190^^^^^^013190^^^^^^013190\else ?\fi}  \def\hgnum#1{{\hg\expandafter\hgnumx\the\numexpr10000000+#1\relax}} \def\hgnumx#1#2#3#4#5#6#7#8{% \hghundredthousands{#3}% \hgtenthousands{#4}% \hgthousands{#5}% \hghundreds{#6}% \hgtens{#7}% \hgunits{#8}% }   %\RequirePackage{whateverwe need} \def\hi{Hello, this is my own package} \let\myDate\date \newcommand\GoodBye[1][\bfseries]{{#1Good Bye}}  \endinput %% %% End of file `mypackage.sty'.


I've encountered a weird problem. My code works perfectly in Release build, but fails to compile in Debug. Quite the opposite to the problems one usually have. :)  in *.h file I have a constant:  class OBDenrChrg : public OBChargeModel { public:   bool ComputeCharges(OBMol &mol); // blah-blah-blah private:   static const float c = 0.05; };   in *.cpp file I use this constant:  bool OBDenrChrg::ComputeCharges(OBMol &mol) { // blah-blah-blah   Eigen::VectorXf a0 = L*EN*c;   Eigen::SparseMatrix<float> A = L*HRD*c + I; // blah-blah-blah }   The built is controlled by cmake. The Release target builds and works well. The Debug says:  CMakeFiles/plugin_charges.dir/charges/denr.o:  In function `OpenBabel::OBDenrChrg::ComputeCharges(OpenBabel::OBMol&)': /home/titov/openbabel-2.3.2/src/charges/denr.cpp:181: undefined reference to `OpenBabel::OBDenrChrg::c' /home/titov/openbabel-2.3.2/src/charges/denr.cpp:182: undefined reference to `OpenBabel::OBDenrChrg::c'   I have no #ifdef DEBUG or similar switches in these files.   Any ideas on how to fix the problem and what may cause it?  Edit:  Thanks everyone for the help.  The problem was in the abscence of c's definition, since declaration of a static member inside of class' definition does not define the static member. What a mess...

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


So I was reading a book for Java 8, when I saw them doing comparison between external and internal iteration and thought about comparing the two, performance wise.  I have a method that just sums up a sequence of integers up to n.  Iterative one:  private static long iterativeSum(long n) {      long startTime = System.nanoTime();     long sum = 0;      for(long i=1; i<=n; i++) {         sum+=i;     }       long endTime = System.nanoTime();     System.out.println("Iterative Sum Duration: " + (endTime-startTime)/1000000);      return sum; }   Sequential One - using internal iteration  private static long sequentialSum(long n) {      long startTime = System.nanoTime();      //long sum = LongStream.rangeClosed(1L, n)     long sum = Stream.iterate(1L, i -> i+1)             .limit(n)             .reduce(0L, (i,j) -> i+j);      long endTime = System.nanoTime();     System.out.println("Sequential Sum Duration: " + (endTime-startTime)/1000000);      return sum; }   I tried to do some benchmarking on them, it turns out that the one using external iteration performs far better than the one using internal iteration.  Here's my driver code:  public static void main(String[] args) {      long n = 100000000L;      for(int i=0;i<10000;i++){     iterativeSum(n);     sequentialSum(n);     }     iterativeSum(n);     sequentialSum(n); }   The running time for the Iteravtive one was always < 50ms whereas the execution time for Sequential one was always > 250ms.   I am not able to understand why internal iteration is not out performing external iteration here?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


The set command works fine when I type it like this:  echo $0 /usr/bin/tcsh echo $SHELL /usr/bin/tcsh set START_TIME=`date +%s` echo $START_TIME 1499360060   However, it doesn't work when I call it explicitly in tcsh like this:  /usr/bin/tcsh -i -f -c 'set START_TIME=`date +%s`' echo $START_TIME START_TIME: Undefined variable.   I tried to do this with setenv at first, but then realized that child process cannot run setenv command. So, I figured set is the way to go. Please advise if there's another better way to go about this. Thanks.

I can run setenv command just fine in my tcsh shell like this:  echo $0 /usr/bin/tcsh echo $SHELL /usr/bin/tcsh setenv START_TIME `date +%s` echo $START_TIME 1499355967   But, whenever I run it explicitly like shown below, it doesn't work. I need to do this because I have to specify shell when executing it via python subprocess call, otherwise it will call a sh shell as default.  /usr/bin/tcsh -i -f -c 'setenv START_TIME `date +%s`' echo $START_TIME START_TIME: Undefined variable.   What's the problem here? I searched for this issue online, but couldn't find any issue similar to this. This is extremely frustrating.


prove that for all $a,b \in \mathbb{R}$, $ | |a|-|b|| ≤ |a-b|$  so what I have thought of so fat is I tried to use the definition of absolute value then getting $b-a ≤ |a|-|b| ≤ a-b.$ from there I'm getting $2b≤|a|-|b|≤2a$. Here is where I encountered the problem of where to proceed. How could I use the fact to keep going to proof the statement

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


Is there a way to use iCloud Photo Library and merge the photos on my wife's iPhone with mine? I'm willing to subscribe to the iCloud Photo Library service, but I rather one of us pay for the cloud service and not both. I've looked at Family Sharing option, but that seems to only be for iTunes Store items such as apps.

I'd like to connect iPhoto on my MBP to my photo stream and my wife's photo stream. We each have our own Apple ID and iCloud account. Can iPhoto connect to multiple iCloud photo streams?  Thanks.


While completing some exercises from a book on HTML5, I reached a chapter about installing a server to test-drive web applications. The problem is the book just assumes all users of Linux distros know which and how to set-up servers on their machines. The author also claims that Linux distros may have Apache installed by default.   Is this the case with Ubuntu 16.04? If so, how do I access it to test-drive my web apps? If not, what alternative do I have?

I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be tweaked, if any, etc.).


Hello Community! The above problem you see is a combinatorics problem, more like an algorithmic problem that I could not solve. :(  This problem requires that every child gets satisfied. In brief terms, this problem asks you to choose one number and subtract $1$ from the rest of the numbers and eventually we have to get to $0$ in all of them. We have to do this as least times as possible.  I tried hit and trial one by one but how can I guarantee to find the minimum value?      Also, if you have seen the other posts I have made in a while, it can be observed that all these problems that I am posting right now are pretty unusual combinatorics problems and I seriously need some help on how to solve these. Can anybody please suggest me some problem solving strategies for these kind of problems?   Any help would be appreciated. Thank You!

A group of N children, who are numbered 1, 2, . . . , N, want to play hide and seek. In a single round of hide and seek, there will one seeker, and N −1 hiders. Children like to hide and not seek and each child has her own idea of how many times she would like to hide. You will be given for each child i, a number H[i] denoting the number of rounds she would like to be a hider. She will be satisfied only if she gets to be a hider in at least H[i] rounds.  For example, suppose N = 4, and H[1] = 1, H[2] = 3, H[3] = 2 and H[4] = 1. Here is one way to satisfy them all. In Round 1, Child 1 is the seeker, and in Rounds 2 and 3, Child 4 is the seeker. Then Child 1 has been a hider in 2 Rounds, Child 2 has been a hider in 3 Rounds, Child 3 has been a hider in 3 Rounds, and Child 4 has been a hider in 1 Round. Thus, they are all satisfied. You can check it is not possible to satisfy all of them in fewer than 3 Rounds.  You aim is to determine the least number of rounds that needs to be played so that every child is satisfied. For the example in the previous paragraph, the answer is 3.     Determine the minimum number of rounds needed in the following cases:   **(a) N = 7, H[1] = 6, H[2] = 13, H[3] = 9, H[4] = 5, H[5] = 15, H[6] = 8, H[7] = 9.      (b) N = 12 H[1] = 6, H[2] = 7, H[3] = 7, H[4] = 8, H[5] = 9, H[6] = 9, H[7] = 9, H[8] = 9, H[9] = 9, H[10] = 9, H[11] = 9, H[12] = 9**      (c) N = 15    H[1] = 131, H[2] = 135, H[3] = 130, H[4] = 138, H[5] = 132, H[6] = 140,   H[7] = 137, H[8] = 133, H[9] = 131, H[10] = 137, H[11] = 138, H[12] = 132,   H[13] = 135, H[14] = 136, H[15] = 134.   Is there any mathematical or algorthmic way to solve this problem.  Ans:- (a) 15 (b) 10     My attempt:-   For (a) , H[4] can be seeker 6 times so H{1] get satisifed, and then H[1] will be next seeker for 9 times,   so the rest like H[5] get satisfied.   I can't think about (b).


There are two users in ubuntu (let's call them user1 and user2). Currently, user1  can get access root access using the below commands:  user1@sai:~$ su Password:  root@sai:/home/user1#   However, I want to deny user1 from getting root access, and instead allow user2 to get root access through sudo when desired by modifying the Pam configuration file in /etc/pam.d/su file.  How can I do this?

If you give a user sudo privileges how can I remove the sudo privileges and make the user become just a regular user?  I used:  sudo adduser username sudo   Now I've changed my mind.


I am Getting:     sequence contains no elements   private int? GetPrecedingSibling(int? contentid,int? templateid) {     var value = _sequenceTemplateItemService.Query(e => e.templateId == templateid && e.contentItemId == contentid).Select(t => t.id).Max();     if (value != 0)         return value;      return null; }

What is the best way to get the Max value from a LINQ query that may return no rows? If I just do  Dim x = (From y In context.MyTable _          Where y.MyField = value _          Select y.MyCounter).Max   I get an error when the query returns no rows. I could do  Dim x = (From y In context.MyTable _          Where y.MyField = value _          Select y.MyCounter _          Order By MyCounter Descending).FirstOrDefault   but that feels a little obtuse for such a simple request. Am I missing a better way to do it?  UPDATE: Here's the back story: I'm trying to retrieve the next eligibility counter from a child table (legacy system, don't get me started...). The first eligibility row for each patient is always 1, the second is 2, etc. (obviously this is not the primary key of the child table). So, I'm selecting the max existing counter value for a patient, and then adding 1 to it to create a new row. When there are no existing child values, I need the query to return 0 (so adding 1 will give me a counter value of 1). Note that I don't want to rely on the raw count of child rows, in case the legacy app introduces gaps in the counter values (possible). My bad for trying to make the question too generic.


There are $a,b \in \mathbb Z, a \neq 0$ and $d$ which is the smallest number in $\mathbb N$ for that  $d = l \cdot a + k \cdot b$ is true.  ($k,l \in \mathbb Z$)  I think that $d|b$ and $d|a$ is true, but I can't find proof for it, can you?

I'm trying to prove that if there are to numbers $n,m$ (natural numbers), and their smallest common multiple is $k$, so that $k = n·i$ and $k = m·j$ for some $i,j$ natural numbers, any common multiple $q$ of $n,m$ is a multiple of $k$, so that there exists a $g$ so that $q=k·g$.  Logically it seems correct, but I can't seem to prove it... Any help?


I am trying to dual boot windows 8.1 and ubuntu, but i don't know exactly how to do it, since i tried it once and it went really wrong. Now, as i said, i have windows 8.1 installed, and in system information, it appears "BIOS mode: legacy". However, i don't know if i need to install ubuntu in uefi mode or legacy mode. I already have Ubuntu on a usb stick ready to boot. I really am not very experienced in this kind of things. Can you help me? I really need ubuntu for university, but i also need windows. Thank you :)

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


In order to fully understand the story of God of War (2018), do I need to play any of the previous titles in the series, or can I just jump in?

I just bought God of War 3. Is the game and its story understandable without having played the first two? Do I rob myself of a big part of the experience?  I have not played any other GoW games. PS3 is my first Playstation experience after loads of Nintendo consoles and Xbox360...


In a free-for-all multiplayer Magic game, what happens when someone dies?  Specifically:    What happens to spells they've cast that are on the stack? What happens to enchantments they have cast onto permanents that other people control?   Specifically, if player A (at 1 life with 3 creatures) casts  and Player B flashes out his own Massacre Wurm in response, what happens? Also, player A had previously cast  on one of Player B's creatures. In the end, what is the result?

In Magic: The Gathering, the rules for a player losing in a multiplayer game are quite complex, so I'd like to try to understand them by example. I would be happy to ask each of these situations as a separate question if that is preferred, but they all seem related, and I would love to have one place to look up all of these answers.  Let's say I'm playing with two friends, Bob and Chloe, in a simple free for all. Unfortunately, I lose. When I lose, suppose the following:   I controlled an  which has exiled Bob's , does he get his bear back? I have a  on the stack targeting Chloe, does Chloe take the 2 damage still? Earlier in the turn I cast  to prevent damage to one of Bob's . If it later takes 3 damage, will that damage be prevented? Something I controlled gave Bob a 1/1 soldier token. What happens to the token? Something Chloe controlled gave me a 1/1 soldier token. What happens to the token? I had a  enchanting one of Bob's army of . What happens to the bear? I had also played  on Bob's final . What happens to the last bear? Chloe had  my . What happens to the Clone? Are there any other situations specifically addressed by the rules?


My opponent has  in play.  They activate the ability to take control of one of my creatures.  In response I play  and bounce the Captivating Crew back to their hand.  Do they still gain control of my creature?

Player A taps  targeting Player B; its "deals 1 damage to target player" ability is placed on the stack.  Player B gets priority and responds with , targeting Goblin Fireslinger.  Both players pass priority. Snap resolves, and Goblin Fireslinger is returned to its owner's hand.  Does Player B still take 1 damage from Goblin Fireslinger's activated ability?  I know that if the creature had been killed/sent to the graveyard, the ability would still resolve, but I was told recently that because a player's hand is a private zone it couldn't. If anyone could confirm or deny this for me, it would be most appreciated.


I use a dual-boot with windows and Ubuntu  Every topic I've read says I "will need to unmount the drive I want to back up"  Is there any way to back up the system with apps I installed and everything from LiveCD or Windows? If yes how? How do I restore it?  I want to back up the system on the same Drive . I mean I have a C:, D:, F: (the partition I want to recover Ubuntu on) and the Sys, Swap partitions  I hate having to install apps, theme, servers every time.

I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, , etc.) I've broken something (X, grub, unknowns) and I can't get it back to work. Especially for a newbie like me, it's easier (and much faster) to just reinstall the whole shebang than try to troubleshoot several layers of failed "fixing" attempts. Coming from Windows, I expect that there is some "disk image" utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot. What's the Linux equivalent of Windows disk imagers like  or ?  Note: I found a similar question:


There's a pile of socks freshly washed and dried. Call it 2n of them (all pairs).   You pull one out at random. You don't have a pair (obvs) so you lay it out in the holding area. Holding area has 1 sock.   You pull another random sock from the pile. It doesn't match any of the socks in your holding area, so you lay it down next to the first. Holding area has 2 socks.  You pull out a 3rd sock. It matches one in the holding area. So you roll them both up and put them in the drawer. Holding area now has 1 sock.  What's the expected maximum number of socks in the holding area?  Or, what's a reasonable space (measured in socks) for the holding area?

Whenever I go through the big pile of socks that just went through the laundry, and have to find the matching pairs, I usually do this like I am a simple automaton:  I randomly pick a sock, and see if it matches any of the single socks I picked out earlier and that haven't found a match yet. If there is a match, I will fold the two socks together and put them in the 'done' pile, otherwise I will add the single sock to the 'no match yet' pile of single socks, and pick out another random sock.  So, as I was doing this last night, I started thinking about this, and figured that the following would be true: The 'no match yet' pile can be expected to slowly grow, up to some point somewhere in the 'middle' of the process, after which the pile will gradually shrink, and eventually go down back to $0$. In fact, my intuition is that the expected number of loose socks as a function of the number of socks picked so far, is a symmetric function, with the maximum being when I have picked half of the socks.  So, my questions are:  With $n$ pairs of socks, what is the expected number of loose socks that are in my 'no match yet' pile after having picked $k$ socks?  Is it true that this function is a symmetric function, and that the maximum is for $k=n$? (if so, I figure there must be a conceptual way of looking at the problem that makes this immediately clear, without using any formulas ... what is that way? Is it just that I can think of reversing the process?)  Of course, this is all assuming there are $n$ pairs of socks total, and that there are no single socks in the original pile, and while this is something that never seems to apply to the pile of socks coming through my actual laundry, let's assume for the sake of mathematical simplicity that there really just are $n$ pairs of socks.


I currently have the following problem: I am working in a Marketing Cloud Email and need some of my customers attributes to be stored in a Json and then to be aes-256 encrypted. The resulting string should then be a part of a link and decrypted by a third party system to use in their part of the customer journey. I am currently struggling to find a way to encrypt the Json I created in a way that it can be decrypted by the third party system. I tried using the EncryptSymmetric function with a password or with a symmetric key but I can’t seem to get the decryption done afterwards. Is there a „best way“ on how to handle such a problem? Thanks for any help. Best regards, Felix

We want to encrypt / encode URL parameters on our pages. I tried to encrypt a parameter using  with AES algorithm as explained in the   %%[SET @encData=EncryptSymmetric("test", "AES", @null, "1111", @null, "0000000000000000", @null, "00000000000000000000000000000000") ]%% AES: %%=v(@encData)=%%   The result of this function is      AT1r0irnzM+Ax1j8zN+zAw==   Then I tried to decrypt the value using an , but I always received an error message.  I suppose there is a difference between AES algorithm in Marketing Cloud and AES used in the online tool. Indeed if I encrypt the same word with an online tool (128-bit), I received this result      l4Yo3sFofFD1EMmtoh397w==   Do you have any deep information regarding this function? What could be the difference?


This is a question in the Nielsen and Chuang textbook (Exercise 2.2).     Suppose $V$ is a vector space with basis $|0\rangle$ and $|1\rangle$    and $A$ is a linear operator from $V \to V$ such that $A|0\rangle =  |1\rangle$ and $A|1\rangle =|0\rangle$. Given a matrix representation    for $A$, with respect to the input basis $\{|0\rangle, |1\rangle\}$    and output basis $\{|1\rangle,  |0\rangle\}$. Find input and output    basis which give rise to a different matrix representation of A.   My doubts:   Why do we mention the input and output specifically? Isn't the matrix-dependent only on the input and output as long as the transformation is in the same vector space? How to solve the second part of the question?

Reproduced from Exercise 2.2 of Nielsen & Chuang's Quantum Computation and Quantum Information (10th Anniversary Edition):     Suppose $V$ is a vector space with basis vectors $|0\rangle$ and $|1\rangle$, and $A$ is a linear operator from $V$ to $V$ such that $A|0\rangle = |1\rangle$ and $A|1\rangle = |0\rangle$. Give a matrix representation for $A$, with respect to the input basis $|0\rangle, |1\rangle$, and the output basis $|0\rangle, |1\rangle$. Find input and output bases which give rise to a different matrix representation of $A$.   Note: This question is part of a series attempting to provide worked solutions to the exercises provided in the above book.


Let $n$ be an odd positive integer. Show that $24 \vert(n^3-n).$  So since $n^3-n=(n-1)n(n+1)$, we have that $3\vert(n^3-n).$ Also since we have that $n$ is odd we can say that $n=2k+1$, for some $k \in \mathbb{Z^+}.$ This implies that $(n+1) = 2k +2 = 2(k+1)$, hence $2\vert(n+1).$ Similar argument can be made for $(n-1)$. Now $24 = 2 \cdot 3 \cdot 4$ so essentially I'm only missing the part where I would have to show that $4$ divides some of the terms. How can I find that?

At our college, a professor told us to prove by a semi-formal demonstration (without complete induction):   For every odd natural: $24\mid(u^3-u)$   He said that that example was taken from a high school book - maybe I din't get something, but I really have no idea to prove that without using complete induction.  Any idea of smart demonstration?  Thanks for your help. (Excuse my bad English.)