my question is to show that a strictly increasing function that is defined on an interval has a continuous inverse.  Thanks.

Let $f:[a,b] \rightarrow \Bbb R$ be a strictly monotone increasing. Then $f$ has an inverse function $g:[c,d]\rightarrow \Bbb R,$  where $[c,d]$ is the range of $f$. I'm trying to prove that $g$ is continuous at d.  My intial thoughts for an attempt of a proof:   Strictly monotone functions are injective. So if $\alpha, \beta \in [a,b]$ and  $\alpha \not= \beta  $ then  $\alpha < \beta$. Since $f$ is strictly monotone increasing $f(\alpha) < f(\beta)$ and $f(\alpha) \not= f(\beta)$.   Since $f$ is strictly increasing, so is $f^{-1}$. So if $\alpha < \beta$ then $f^{-1}(f(\alpha)) < f^{-1}(f(\beta))$.   This is because if there exists $\alpha$ and $\beta $ $\in (a,b)$ with $\alpha < \beta$ such that $f^{-1}(\alpha)$ = $\alpha '$ and $f^{-1}(\beta)$ = $\beta '$ and $\alpha ' < \beta '$ then   $\beta = f^{-1}(\beta ') \le f^{-1}(\alpha ') = \alpha$   which is a contradiction if $f$ is strictly increasing.   The remainder of the proof is some form of an epsilon delta proof to show that the inverse function is continuous from the left at the right end point. My attempt:   Let $b$ be the upper limit $ \in [a,b]$ and define $d = f(b)$.   Next, I want to show that $\lim_{x\rightarrow d^{-}}f^{-1}(x) = b$ for any $\epsilon >0$ such that $(b-\epsilon) \subset [a,b]$.  So, $f(b-\epsilon) < f(b)$.   Let $\delta = 1/2 (f(b)-f(b-\epsilon))$  Then $f(x_0-\epsilon) < f(x_0)-\delta$  So if $|x-d| < \delta$, then $|f^{-1}(x)-f^{-1}(d)|<\epsilon$  then continuity holds at $f^{-1}(d)$, which is possible by the Archimedean principle. Currently, I'm having trouble with the epsilon-delta proof. I don't think the argument is strong enough.


Can you install 3rd party software on ubuntu?  We use microsoft office at my business and I word like to install it onto ubuntu to prevent any formatting problems at work.  Is this possible?

Can .exe and .msi files (Windows software) be installed in Ubuntu?


How to prove that the anti-derivative of a periodic function is not necessarily periodic? (Without considering random examples)  I know that integral of $$ f(x) = f(a+x) $$ is $$ F(x) + c $$

I practise before the real analysis exam and I got stuck on few excercises.  "if $F$ is an antiderivative of a continuous periodic function and $F$ is bounded, then $F$ is periodic"  $~\to~$ one should give a proof or counterexample.  (I'm convinced it's true, but how to prove it?)


I am trying to create a couple arrays of numbers from 1.0 to 1.25. I use the following code:  heightDisplayArray: [String] = [] heightArray: [Double] = []  for i in 1.stride(to: 1.25, by: 0.01){     heightDisplayArray.append("\(i) meters")    heightArray.append(i)  }  print (heightDisplayArray) print (heightArray)   For some reason, results are appending as expected to heightDisplayArray, but is adding some unexpected numbers to heightArray. The console shows the following:  ["1.0 meters", "1.01 meters", "1.02 meters", "1.03 meters", "1.04 meters", "1.05 meters", "1.06 meters", "1.07 meters", "1.08 meters", "1.09 meters", "1.1 meters", "1.11 meters", "1.12 meters", "1.13 meters", "1.14 meters", "1.15 meters", "1.16 meters", "1.17 meters", "1.18 meters", "1.19 meters", "1.2 meters", "1.21 meters", "1.22 meters", "1.23 meters", "1.24 meters"]  [1.0, 1.01, 1.02, 1.03, 1.04, 1.05, 1.0600000000000001, 1.0700000000000001, 1.0800000000000001, 1.0900000000000001, 1.1000000000000001, 1.1100000000000001, 1.1200000000000001, 1.1300000000000001, 1.1400000000000001, 1.1500000000000001, 1.1600000000000001, 1.1700000000000002, 1.1800000000000002, 1.1900000000000002, 1.2000000000000002, 1.2100000000000002, 1.2200000000000002, 1.2300000000000002, 1.2400000000000002]   How can I correct this behavior? I could change heightArray to be an Array of Strings instead of Doubles, but I'd prefer to find what is actually causing this to occur.

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


Description:  This is somehow simple; I am migrating to an other computer. I am going to take the opportunity to switch to the new 18.04 LTS from the 16.04 (on the old computer).  On the 16.04 I installed so many (!) libraries and packages manually using apt-get.   Question:  Is there a way to fetch these packages, in a text file for example, that I can copy and paste on the 18.04 to feed an apt-get command to install them back?

I installed a plain Ubuntu 10.10 on my computer and installed some software via apt-get. Last week I managed to break everything and just started from scratch, and I need to reinstall my software. Is there some way to create a list with all the packages that I have installed manually?  So that it would give me a list like texlive, ... and not texlive, texlive-dep1, textlive-dep2, ... and all the standard packages removed?  If I could somehow figure out which programs out of the regular install I have removed, that would be awesome too!    Update 2015-05-23: I now use Ansible as configuration management on my systems. There I specify the packages to install. This serves the goal, installing all the programs on a fresh system, even better. So this question might be the entry into some light configuration management.


I noticed this while doing some performance testing recently. When I insert a value into a column that will require an implicit conversion (e.g. bigint into nvarchar), I get a warning:      Type conversion in expression (CONVERT_IMPLICIT(nvarchar(50),[tempdb].[dbo].[#MyFunIntTable].[EvenCoolerColumn],0)) may affect "Cardinality Estimate" in query plan choice.   Being a concerned citizen, I checked all of the obvious suspects and eventually dug into the XML to confirm that it was actually warning about the insert into the table. The problem is, I can't figure out why this would ever affect cardinality estimates. If I were doing this in a join or somewhere with a little more logic it would make sense, but there shouldn't be a cardinality estimate mismatch for the actual insert operation, right?  I noticed that this happened when it was more than just a trivial query - as soon as more than one value is inserted, or we're pulling a value from a table, we hit this.  This question has attracted some potential duplicates, including:       I think it is different from these questions because I'm literally not doing anything with this column. I'm not using it in a filter, or a sort, or a grouping, or a join, or in a function - any of these things makes the scenario more complicated. All I'm doing is inserting a bigint into a nvarchar, which should never impact a meaningful cardinality estimate that I can think of.  What I'm specifically looking for out of an answer is:   An explanation of why I get this warning despite nothing of interest going on - is it just that SQL Server will be conservative and report even when it won't affect plan choice? What cardinality estimate is actually at risk here, and what operation would change based off of inaccuracies in that cardinality estimate? Is there a scenario where this could affect plan choice? Obviously if I start joining or filtering on the converted column it could, but as-is? Is there anything that can be done to prevent it from warning, besides changing data types (assume this is a requirement of how the data models interact)   I recreated it with the below simple example ()  DROP TABLE IF EXISTS #MyFunStringTable; DROP TABLE IF EXISTS #MyFunIntTable;  CREATE TABLE #MyFunStringTable (   SuperCoolColumn nvarchar(50) COLLATE DATABASE_DEFAULT NULL );  CREATE TABLE #MyFunIntTable (   EvenCoolerColumn bigint NULL );  INSERT INTO #MyFunIntTable ( EvenCoolerColumn ) VALUES ( 1 ), ( 2 ), ( 3 ), ( 4 ), ( 5 );  INSERT INTO #MyFunStringTable ( SuperCoolColumn )   SELECT EvenCoolerColumn     FROM #MyFunIntTable;  INSERT INTO #MyFunStringTable ( SuperCoolColumn ) VALUES ( 1 );  INSERT INTO #MyFunStringTable ( SuperCoolColumn ) VALUES ( 1 ), ( 2 );  INSERT INTO #MyFunStringTable ( SuperCoolColumn )   SELECT 1;  INSERT INTO #MyFunStringTable ( SuperCoolColumn ) SELECT 1 UNION ALL SELECT 2;  INSERT INTO #MyFunStringTable ( SuperCoolColumn )   SELECT 1     FROM #MyFunIntTable;

I maintain an archive database that stores historical data in partitioned views. The partitioning column is a datetime. Each table under the view stores one month of data.  We constraint the events on each table with a check constraint on the datetime column. This allows the optimizer to limit the tables that are searched for queries that filter on the event datetime column.  The names of the check constraints were generated by SQL Server, so it's hard to know what they do by looking at their name.  I want the constraint names to have the form 'CK_TableName_Partition'.  I can generate a rename script using this query and copying data from from sql_text column. The WHERE clause matches check constraints whose names look like they were generated by SQL Server:  SELECT   checks.name AS check_name,   tabs.name AS table_name,   skemas.name AS schema_name,   cols.name AS column_name,   N' EXECUTE sys.sp_rename   @objname = N''' + skemas.name + N'.' + checks.name + N''',   @newname = N''CK_' + tabs.name + N'_Partition'',   @objtype = ''OBJECT'';' AS sql_text FROM sys.check_constraints AS checks INNER JOIN sys.tables AS tabs ON   tabs.object_id = checks.parent_object_id INNER JOIN sys.schemas AS skemas ON   skemas.schema_id = tabs.schema_id INNER JOIN sys.columns AS cols ON   tabs.object_id = cols.object_id AND   cols.column_id = checks.parent_column_id WHERE checks.name LIKE (   N'CK__' + SUBSTRING(tabs.name, 1, 9) +   N'__' + SUBSTRING(cols.name, 1, 5) +   N'__' + REPLACE(N'xxxxxxxx', N'x', N'[0-9A-F]') COLLATE Latin1_General_BIN2 ) ORDER BY table_name;   The output looks like this:  check_name  table_name  schema_name column_name sql_text CK__tbAcquisi__Acqui__5C4299A5  tbAcquisitions_201301   Archive AcquisitionDT   EXECUTE sys.sp_rename  @objname = N'Archive.CK__tbAcquisi__Acqui__5C4299A5',  @newname = N'CK_tbAcquisitions_201301_Partition',  @objtype = 'OBJECT'; CK__tbAcquisi__Acqui__76026BA8  tbAcquisitions_201302   Archive AcquisitionDT   EXECUTE sys.sp_rename  @objname = N'Archive.CK__tbAcquisi__Acqui__76026BA8',  @newname = N'CK_tbAcquisitions_201302_Partition',  @objtype = 'OBJECT'; CK__tbAcquisi__Acqui__7D6E8346  tbAcquisitions_201303   Archive AcquisitionDT   EXECUTE sys.sp_rename  @objname = N'Archive.CK__tbAcquisi__Acqui__7D6E8346',  @newname = N'CK_tbAcquisitions_201303_Partition',  @objtype = 'OBJECT'; ... CK__tbRequest__Reque__60132A89  tbRequests_201301   Archive RequestDT   EXECUTE sys.sp_rename  @objname = N'Archive.CK__tbRequest__Reque__60132A89',  @newname = N'CK_tbRequests_201301_Partition',  @objtype = 'OBJECT'; CK__tbRequest__Reque__1392CE8F  tbRequests_201302   Archive RequestDT   EXECUTE sys.sp_rename  @objname = N'Archive.CK__tbRequest__Reque__1392CE8F',  @newname = N'CK_tbRequests_201302_Partition',  @objtype = 'OBJECT'; CK__tbRequest__Reque__1AFEE62D  tbRequests_201303   Archive RequestDT   EXECUTE sys.sp_rename  @objname = N'Archive.CK__tbRequest__Reque__1AFEE62D',  @newname = N'CK_tbRequests_201303_Partition',  @objtype = 'OBJECT';   The result of the query seems to be correct and the server executes it quickly.  But the root node of the execution plan has a warning:     Type conversion in expression (CONVERT_IMPLICIT(nvarchar(128),[o].[name],0)) may affect "CardinalityEstimate" in query plan choice   What does that mean in this context? Is such a complex filter confusing the optimizer? Is it something I should be worried about?


I stumbled across this piece of code, and could not understand how the new operator was used in this case:  student* setname(string name) {   student* stu=(student*)malloc(sizeof(student));   new(stu) student;   stu->age=12;   stu->name=name;   return  stu; }   I would expect new to be used like stu = new student;. How is new(stu) student different?

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


$F_2$ is polynomial field of group of integer modulo $2.f(x)$ is $x^2 + x + 1$.   I didn't got how the multiplication is happening in the table.I referred to many sources related to this topic but still i am facing difficulty in understanding it.I will be very thankful if someone explains the concept behind it.

I am dealing with finite fields and somehow got stuck. The construction of a prime field $GF(p),  p \in \mathbb{P}$ is pretty easy because every operation is modulo p. In other words $GF(p)$ contains all integers ranging from 0 to $p-1$.  However, non prime fields are a bit trickier. Given the power $q = p^n$ with $p \in \mathbb{P}$ and $n \in \mathbb{N}$, one has to find an irreducable polynom g(x) of degree n. Then the construction of $GF(p^n)$ is the following:  $GF(p^n) = \frac{GF(p)[x]}{g}$  Theoretically I get along with this definition. Unfortunately I fail to construct addition and multiplication tables for any GF(q). Though I can easily find the wanted table on the internet, I have not found an explication yet that really made me understand.  I would like to know how to create the addition and multiplication table for $GF(2^2)$ with the above knowledge. $GF(2^2)$ contains four elements. Let's call them $\{0,1, \alpha, \beta \}$. $g$ must be $x^2 + x + 1$ as there no other irreducable polynom of degree 2. So far I am able to construct the addition table partly (question marks indicating despair...):  | + | 0  1  $\alpha$  $\beta$ |  0 | 0  1  $\alpha$  $\beta$ |  1 | 1  0  ?  ? |  $\alpha$ | $\alpha$ ?  ?  ? |  $\beta$ | $\beta$  ? ? ? |  I don't understand how to calculate for example $1+\alpha$. The result is $\beta$, but I don't know why. Concerning the above short explanation, I have to divide $1+\alpha$ by $g$. But how can I do this?   Thanks for your help


I am proofreading some rules and came across the following:      Each turn you must do 1 of 2 things:  either take an action on 1 of the top 2 cards of your deck, or discard the top card of your deck"   and     When taking an action, choose 1 of the three actions that may be present on the active area of the card.  The 3 actions are: . . .   My gut tells me that the "1"s should be written out as "one" but that the "2"s and "3" could be left as ordinals or written out. I am also aware that some would say that all these numbers should be written as words, since they are less than ten. How should the above best be written?

Possible Duplicate:    Based on , is there a rule of thumb when a number should be spelled out? These examples are easy:  I have two brothers. It's exactly 823 miles to New York.  But do I have 15 minutes of fame, or fifteen minutes of fame? Edit:   asks how the practice of spelling out numbers originated; I'm looking for specific guidelines.


Searching Twitter for mentions of a word or multiple words can be a chore. Is there something that can be set up in Twitter that will email me a digest of search terms?   Or do I have to look for some kind of third-party service that provides daily or weekly emails featuring all mentions of a specific word or hashtag?

I know it is possible to subscribe to keywords searches by saving them within Twitter's app as a . There doesn't seem to be a way to get notified by email of these searches nor scope the searches to my followers or followees, e.g. An RSS feed or daily email  If this isn't possible, us there any service that would alert me when a follower or followee mentions a keyword? I realise there are services like  and  which monitor keywords, but none on the basis of an individual account.


In a calculation I need the determinant of $\mathbf{I}_n+(a_ia_j)_{1\leq i,j\leq n}$ for given real numbers $a_1,\ldots,a_n$. I conjecture that the determinant equals $1+\sum_{k=1}^na_k^2$, which seems reasonable after making calculations for $n$ up to $5$. However, I did not manage to proof this formula. I tried proving the formula with induction, but any way I tried working out the induction step using linearity of the first row/column did not work. I'm just looking for some help towards a proof, so an inductive proof is not necessary.  Any help is much appreciated.

Find the determinant of the following matrix: $$A = \begin{bmatrix} 1+x_1^2 &x_1x_2  & ... & x_1x_n \\   x_2x_1&1+x_2^2  &...  & x_2x_n\\   ...& ... & ... &... \\   x_nx_1& x_nx_2  &...  & 1+x_n^2 \end{bmatrix}$$  I computed for the case $n=2$, and $n=3$ and guessed that $\det(A)$ should be $ 1+\sum_{i=1}^n x_i^2 $  but not sure how to proceed for any $n$.


I was reading this answer by @dessert:  about how to delete old backup folders from directory using cron in Ubuntu. The command given was:  find /BACKUPDIR/ -mindepth 1 -maxdepth 1 -type d -print0 | sort -z | head -zn-6 | xargs -0 echo rm -rf  However, CentOs 7 doesn't like the z flag in his call to head:  head: invalid option -- 'z'  Is there a work-around for CentOs7?  I took a look at:  I don't think this explanation is applicable to my question. I don't see how I would change my command if I want to delete backups older than n.

I need head -z for a script (off-topic, but the motivation can be found ), but in my CoreOS 835.13.0 I get head: invalid option -- 'z'.  Full head --help output:  Usage: head [OPTION]... [FILE]... Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.  Mandatory arguments to long options are mandatory for short options too.   -c, --bytes=[-]K         print the first K bytes of each file;                              with the leading '-', print all but the last                              K bytes of each file   -n, --lines=[-]K         print the first K lines instead of the first 10;                              with the leading '-', print all but the last                              K lines of each file   -q, --quiet, --silent    never print headers giving file names   -v, --verbose            always print headers giving file names       --help     display this help and exit       --version  output version information and exit  K may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.  GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report head translation bugs to <http://translationproject.org/team/> For complete documentation, run: info coreutils 'head invocation'   The funny part is that the last line tells me to run info coreutils 'head invocation' but I get info: command not found.


I will be landing at New Delhi airport. The worth of new laptop  (Lenovo Yoga Idea Pad 13) is about $1000 and old one (Macbook Pro) is > 1 lakh INR. I want to leave the new laptop in India. I have a copy of bill with me but not the original bill. I want to know if I have risk of being charged with custom duty.

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


My wife is in the US on the VWP, and will be leaving the country by bus into Mexico after having arrived by air. I've taken this bus route multiple times, but have no memory of ever stopping on the US side of the border to get an exit stamp - but as a US citizen, I don't need one.  I know that when leaving the country by air, no exit stamp is necessary, because the air carrier communicates their passenger list to the US immigration service.  Is the same thing done on buses?    I can't imagine it is, as lax as the security/ID procedures are on buses.    If not, what must my wife do to ensure that her exit from the US is registered?   Or will her entry stamp into Mexico be enough to prove that she left the US if/when immigration ever asks her about it?

Seeing as the US does not perform border control on exit (save for occasional spot checks, usually when traffic is moving slowly at the border), how do I make sure my exit by land is recorded so that I'm not incorrectly flagged as an overstayer?  When exiting the US by air or sea, this is not a problem, as airlines and shipping companies send passenger records to US authorities. What about exiting by land though?


I've been wondering, we always see lightsabers reflecting blaster lasers which, supposedly, are raw energy. We get no indication that there is actually any substance to a lightsaber's blade, so wouldn't a bullet just go straight through it, melt, and then plaster the Jedi's face with molten metal?  Or is there a fact I'm missing?  (We see that lightsaber blades melt metal, not vaporize it into steam, but even if that was the case I don't think a face full of metal steam would do you much good either.)

From  question about gunpowder in the Star Wars universe it is  that the shot from a  slug thrower is not completely deflectable by a lightsaber. This seems to be listed as an advantage (over blasters) against lightsabers and Jedi.     For example, during the days of the Galactic Republic, mercenaries fearing an intervention by Jedi Knights used rapid-fire slugthrowers that were impossible to completely deflect, unlike blaster bolts.   This doesn't make much sense though. A slug, while maybe not as deflectable should be just as ineffective against a lightsaber as a blaster shot is, due to the nature of a . That is, a blade made of plasma should simply vaporize the slug, should the slug manage to penetrate the containment field.     The weapon consisted of a blade of pure plasma emitted from the hilt and suspended in a force containment field. The field contained the immense heat of the plasma, protecting the wielder, and allowed the blade to keep its shape.   While a slug would seem to be more accurate than a blaster bolt (at least when used by a skilled marksman), I can't imagine that the slug would be faster than a bolt. Or if it is faster I wouldn't imagine it would be so fast that a Jedi would be unable to react with enough speed to block it, either with their saber or with the force. So what is the implied advantage of a slug thrower, versus a blaster, when used against a Jedi?


Is it possible to change the cursor shape in Ubuntu desktop ? Also is it possible change the cursor shape, when the mouse pointer is inside a certain region ?

How can I change X11 cursor and theme in the newest Ubuntu? I can't find it. Please help.


I've been seeing this effect in this particular freezer since we purchased it a couple of years ago and I finally want to know the answer. In the picture below you can see that certain ice cubes will form an icicle even though this is just water poured into our ice cube trays.  There is nothing above the the ice cube tray (just the top of the freezer) and it is about 8 inches away.  These are not formed by water dripping, but seem to be formed by water being pulled up and freezing? Is this some form of static electricity at work? Here's another snapshot from the side.

I recently saw this picture posted on  which shows a so-called  rising from an ice cube tray.    I have read the Wikipedia page, but it doesn't mean much to me. My instinct was that it is caused by vibrations from the freezer setting up a resonant frequency on the surface of the water, and the spike has gradually "built up" as the water freezes. But I'm not a physicist, so I don't know if this makes sense.  I'm ideally looking for a layman's explanation of why this happens.


I tried to connect django to a mariadb for several hours. I thought it was a good idea to delete the /etc/mysql folder, because I thought it was installed through a none-working package. I think that was a mistake. I cant install mariadb-server now because of the missing folder. What can I do???

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?


I've stumbled across this sentence:  "I don't need your heavy load. Take it off of my shoulders".  I want to ask, is the usage of "take something off OF" correct?  Thank you in advance, Matus

What is the difference when you say "get off of something" and "get off something"?


Let $G$ be a group such that for any proper normal subgroup $H \subset G$, we have $G/H \cong G$ (of course this isomorphism may not be given by the projection $G \to G/H$). Does it follow that $G$ is a simple group? What can we say about such a group $G$ in general?  Notice that $G/H \cong G$ doesn't imply $H = \{e\}$, for instance $z \mapsto z^2$ is a surjective morphism $\Bbb C^{\times} \to \Bbb  C^{\times}$ of kernel $\{\pm 1\}$.

A finite simple group is one which has no homomorphic images apart from itself and the trivial group. However, the  tag does not include the condition "finite". My question is the following.  Is the following true? Claim: A simple group is one where the only homomorphic images are itself and the trivial group.  However, I am asking this question not because of the tag wiki, but because I think any counter-example would be interesting, especially if it was finitely generated (and especially especially if it was finitely presented). That is,  Does there exists a (finitely presented) group $G$ which is not simple but where the only homomorphic images are itself and the trivial group?  Such a counter-example would be , and would be sort-of-simple, by the definition of a simple group that we want to exist. Thus the title of the question.


In bash (or, I'm assuming, any linux shell), I would expect cd /../ to return an error. I interpret that to be asking for the parent of the root of the directory tree. Since it's the root of the directory tree, I was under the impression that it has no parent.  However, it returns no error, and looks to be equivalent to cd /. I would also expect an error from cd / && cd ../ for the same reason: asking for the parent of the root directory, but it has the same result.  Why is this?

I'm currently developing a fake filesystem for a browsergame. I recently implemented ".." and "." folders so every folder has a reference to its parent. Then I checked in my terminal if "/" also has these folders.  Actually I was very surprised that it has a directory ".." which obviously is a reference to itself.  Is the reason for this consistency or is there a better explanation?  Edit: I'm basically looking for the document where this is documented.


For example I have class   class Person {     public string FirstName { get; set; }     public string LastName { get; set; } }   How to override GetHashCode in this class?

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


This is a simple question don't look for difficulties. I have such a cycle int arr[]{ 111, 222, 333 };      for (size_t i = 0; i < 3; i++) {    test = 1000 * test + arr[i];     } std::cout << test;  it returns the result 111222333 the question is how to make it output the result 333222111 in short add numbers from the other side you need to change this line to something else to add values in a different way test = 1000 * test + arr[i];      I will update the question a little bit, that would be interesting, what if there is no array and you get the data in this form. test = 1000 * test + X;  X is an unknown number and not an array

I need to move backwards through an array, so I have code like this:  for (int i = myArray.Length - 1; i >= 0; i--) {     // Do something     myArray[i] = 42; }   Is there a better way of doing this?  Update: I was hoping that maybe C# had some built-in mechanism for this like:  foreachbackwards (int i in myArray) {     // so easy }   Update 2: There are better ways. Rune takes the prize with:  for (int i = myArray.Length; i-- > 0; ) {         //do something } //or for (int i = myArray.Length; i --> 0; ) {     // do something }   which looks even better in regular C (thanks to Twotymz):  for (int i = lengthOfArray; i--; ) {         //do something }


Consider the operation defined on $\mathbb{N}$ by $x*y=\gcd(x,y)$. I have two subpoints to solve in this problem. The first is:  $i)$ Prove that $(\mathbb{N}, *)$ is a commutative monoid  After proving that $*$ is an operation on $\mathbb{N}$, proving commutativity, and proving associativity (this was a bit harder than the other things to prove), the only thing that I had to prove was that $(\mathbb{N}, *)$ has an identity element. Meaning I have to prove that there $\exists$ $e \in \mathbb{N}$ such that $x * e = e * x = x$, $\forall$ $x \in \mathbb{N}$. So I chose $e = 0$ as the identity element, since $x * 0 = 0 * x = x$, $\forall$ $x \in \mathbb{N}$. Having these $4$ conditions, we can conclude that $(\mathbb{N}, *)$ is a commutative monoid. The second suboint is:  $ii)$ Show that $D_n = \{ x \in \mathbb{N}: \hspace{0.25cm} x\mid n \}$ is a stable subset of $(\mathbb{N}, *)$ and $(D_n, *)$ is a commutative monoid.  Through a bit of work, I managed to show the first part of this $ii)$. However, in the second part, I have to show that $(D_n, *)$ is a commutative monoid. We can prove that $(D_n, *)$ is an operation using the first part of $ii)$ (so $*$ is an operation on $D_n$ because $D_n$ is a stable subset of $(\mathbb{N}, *)$) and we can prove commutativity and associativity in a similar manner as we did in subpoint $i)$. The problem I have is with the identity element. I used $0$ as the identity element in subpoint $i)$, but I can't use $0$ here, since $0$ is not a divisor of any number, so $0 \notin D_n$ for any $n \in \mathbb{N}$. So I can't use that as the identity element. I though of using $e = x$ as the identity element for every $x \in D_n$, since $\gcd(x, x) = x$. But then we wouldn't really have the condition: $$\exists \hspace{0.2cm} e \in D_n \hspace{0.2cm} \text{such that} \hspace{0.2cm} x * e = e * x = x \hspace{0.2cm}, \forall x \in D_n$$ But, rather, we would have it the other way around: $$\forall x \in D_n, \hspace{0.2cm} \text{there} \hspace{0.2cm} \exists \hspace{0.1cm} e\in D_n  \hspace{0.2cm} \text{such that} \hspace{0.2cm} x * e = x * e = x$$ So I don't think this is right, since the condition met goes the other way around, although I am not sure. So how could I prove that $(D_n, *)$ is a commutative monoid? $0$ is not among $n$'s divisors so I can't use $0$ as the identity element. But a commutative monoid needs an identity element. What am I missing here?

Let $x*y=\gcd(x,y)$ on $D_n=\{x\in \mathbb N:x |n\}$. I have to prove that $(D_n,*)$ is a commutative monoid and I have a problem when finding the identity element.  $x*e=x$  So $gcd(x,e)=x \to e=xk,k\in \mathbb N^*$ and $e \leq n$  A good $e$ is $0$ but it's not in $D_n$


During the scene where Morpheus is being interrogated, Agent Smith tells his colleagues to leave him with Morpheus.  The other Agents seem very shocked by this move, and they almost reluctantly leave.   When Cypher is having dinner and the meeting up with Agent Smith, Agent Smith is totally by himself here for who knows how long. Why is it that it seems to be alright for him to be alone with Cypher in the restaurant, but when he's in what seems to be their own headquarters it's questionable?

In The Matrix, Cypher enters the Matrix to speak with the Agents, then leaves again. We never see if he has an operator, and as he kills Tank and Dozer you might assume he doesn't have one.  If he didn't have an operator how does he jack in/out of the Matrix?


Model: HP Compaq 6910p, Windows 7 ultimate. Virtualbox is only showing 32 bit options and the base OS is 64 bit, what to do? Also bios is asking for setup password which I don't know.

My host is x64 bits Windows 8.1.  I downloaded the latest Virtual Box (4.3) and I'm trying to create a VM with a 64 bits Ubuntu OS (ubuntu-12.04.3-desktop-amd64).  When I go to New VM wizard, it doesn't give me option to select "Ubuntu (x64)" as I have seen in other people's screenshots, only just "Ubuntu". As a result, the ISO can't boot. I tried in another PC and Virtual Box gives the x64 variants to most listed OS...  Control Panel shows x64 OS, x64 processor. My host laptop is a Sony Vaio VPCZ22UGX/N, Intel® Core™ i7-2640M processor. CPUz shows Vx-t is available on my processor, of course.  Here is what I tried so far:   I enabled IO APIC as required in the docs. I have virtualization enabled in the BIOS. It works fine in VMware. Check that Hyper-V is not running or even installed on my Windows. Same for VMware. I also tried running the command:  VBoxManage modifyvm [vmname] --longmode on    for that VM, but no change.. I think the issue is really that I can't select x64 variant of the Ubuntu OS for that VM. Other people seem to indicate that's a requirement, but I don't get that option for some reason.  I spent a lot of time and can't find what's wrong... Anyone knows what could be missing here?  Thank you very much!!  Eduardo


Given this concrete example #include <stdio.h> #include <stdint.h> #include <inttypes.h>     int main(void) {   uint8_t stuff[8] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88};   int64_t bigint = *((int64_t *) stuff);     printf("bigint = %ld \n", bigint);     return 0; }  Am I violating the C11 standard? Note that it appears to work right compiled with later gcc and clang with "-Wall -Wextra -fstrict-aliasing -std=c11", but for example gcc 6.4 will issue warnings that "dereferencing type-punned pointer will break strict-aliasing rules" which I expect from my understanding. Off the top of my head the safe way to do this is to perform the always safe cast to a character type and memcopy. However I want to understand whether this is UB or simply implementation defined; safe to do but not portable.

When asking about , people sometimes refer to the strict aliasing rule. What are they talking about?


I have review the following question and answer    My New question:  As part of community what should I do when I find questions that have been answered on another site?

What's the right course of action for cross-site duplicates?  There are two flavors:   A question is posted which belongs on another site and ends up already having been asked there. I can't find an example right now, but it's bound to happen soon if it hasn't already. The same question is posted in two places at the same time. Take  for example, which is a duplicate of , posted within a half hour of each other by the same user.   Possible actions:   Move it to the proper site and close it once it gets there as a duplicate. Provide a way to close it right away as a cross-site duplicate, without moving it first. Flag it and let a moderator merge them. Close it as "no longer relevant" or something else.   Additionally, flavor 2 is a bit of a special case; perhaps the question really spans both sites in terms of content and intended audience. Should multiple-postings in this case be allowed? If so, should they somehow be linked to each other? If not, how do we avoid a migration war?


I made a blender scene, motion tracked an image, animated my bull model, then rendered and the image showed up. Then I wanted the bull in another image, so I went to the movie clip editor and added an additional image. I motion tracked, and even the camera perspective shows it. The problem is, when I render the first image shows up instead of the new one I added. I tried clicking the x on the first clip but that didn't work. The first picture shows the camera perspective with the image I want and the second image shows the image that it renders on, with the trackers from the previous render!

Blender is rendering an older version of my project, not the most recent one. I have made it using the Blender Render but it does not want to render in cycles either. A black and grey screen is rendered as if everything is transparent. Checked general camera, lighting and compute devises in case I messed something up but I can't find anything. All my textures and objects look normal, does anybody know what is wrong or what to check?  Ok added link:


Let's say I have a random number generator that generates integers uniformly from 0 to n-1 (where n is some positive integer). What is the expected number of iterations after which all the values 0..n-1 will be generated? I did some simulations and the results seem close to n*ln(n), but I wonder how to solve it mathematically.

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


So, every time, I try to insert an image, it puts the image at the top of that page or at the top of the next page. However, what if I wanted to insert it where I want it to insert? For example, try the following:   \documentclass[12 pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{textcomp} \usepackage{wasysym} \usepackage{amsthm} \usepackage{array} \usepackage{calc} \usepackage{proof} \usepackage[inline]{asymptote} \title{Test Document, with default template} \author{Ahaan S. Rungta} \date{}  \begin{document} \maketitle \pagebreak Hello, in this lecture, we will prove that $ 2 + 2 = 4 $. So, we use barycentric coordinates, as shown this figure:  \begin{figure}     \centering     \includegraphics{iphoo_logo}     \caption{I don't even need this.} \end{figure} \end{document}   Notice what happens; the figure gets inserted at the top of the page. How can I make it appear right where I tell it to appear? Thanks in advance!

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?


Natural numbers are closed under addition and multiplication, but not subtraction.  Fixed by... Integers are closed under subtraction, but not division. Fixed by... Rational numbers are closed under division, but not root. Fixed by... Real numbers are  closed under roots, but not negative roots. Fixed by... Complex numbers are closed under negative roots.   But wait, rational numbers are not closed under division, because division-by-zero is not defined.  My question is: Given the above strategy of defining new number systems to cope with non-closure properties, has anything been done or attempted to fix divide-by-zero?  Obviously, we can have a "value" like NaN, but it's not very algebraically useful, except as a kind of error.  BTW: It seems to me that we can't do better than this, it's in the nature of even a semi-ring like the natural numbers, that multiply-by-zero is an annihilator, which is what causes the problem. (e.g. regular expressions also have this property). But what do I know?  The suggested "duplicate" is about extending the natural numbers to allow division-by-zero. The question here is more general: ensuring closure. This allows other approaches e.g. not having zero at all (see my answer).

We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero?


Whenever the user input is 1 or Jan, the code does not read and jump to second statement and display      Invalid month has been entered           Scanner in = new Scanner(System.in);          System.out.println("Enter a month:  ");          String month=in.nextLine();           if((month == "1") || (month == "Jan")){              System.out.println("Month: January");         }         else{             System.out.println("Invalid month has been entered");

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


A little while ago I was playing two of my friends. One of my friends was playing a wolf/werewolf deck with  and a few other creatures out on the battlefield.  I was playing an enchantment deck and cast  on the Immerwolf. Once the spell resolved my friend didn't remove the +1/+1 from his other creatures (from Immerwolf's ability).    I reasoned that since they weren't actual +1/+1 counters, they would no longer affect his creatures, since Immerwolf was in exile.  He disagreed, saying that the +1/+1 would stay, whether or not Immerwolf was in play.    I didn't really feel like pushing the issue since it was just a kitchen table game and it also didn't really affect the outcome of the game.  I'm just curious as to who was correct.

Is a +1/+1 counter I get from, say Unleash or Undying different than +1/+1 from something like  or ?


i try to load a html File in a div and to remove the html with a click on a id inside the html Resource. Clicking on id="load" create a empty div (id="externContent") within div (id="showContent") and load the extern Resource extern.php #wrapp into id="externContent". Successfully Click on id="close" deletes extern Resource inside div id="externContent". Successfully  Why does not it click on id="closeExtern" deletes extern Resource inside div id="externContent".  Basic html
Load

Close/div>id

   Script in Basic html  $('#load').click(function() {     $('#showContent').append('

');     $('#externContent').empty();     $('#externContent').load('extern.php #wrapp'); }); $('#close').click(function() {     $('#externContent').empty(); }); $('#closeExtern').click(function() {     $('#externContent').empty(); });   load extern.php  <!DOCTYPE html>  <meta charset="utf-8"> <title>Title</title>
 some content CloseExtern/span>

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


How can I customize my Ubuntu 12 to look like windows

I want to know is there any theme available make it Ubuntu look like Windows 7 ?


I found a few other related questions, but they were in regards to flags for different reasons such as closing the question.  I flagged a  to say that all comments were obsolete. I would have flagged the comments individually, but there were several and one of them was one I had upvoted. I wasn't able to flag that one. Though, I have since found a  for flagging upvoted comments.  The flag was declined but all comments are gone. I suppose it's possible that the two authors deleted their own comments, but I don't think that is likely.  So why was it declined? I'm wondering if this was an accident or if I was wrong to flag the question. If the latter, please explain why.

I flagged a post and (choose one)   my flag was marked as helpful, yet nothing was done my flag was marked as declined, yet the post was deleted/edited/closed   Why?


I don't know I should post this on Magento community site or Ubuntu community site, so I am posting here. I had PHP 5.3 installed. I upgraded to PHP 5.5, but for some reasons had to revert back to PHP 5.3. ISSUE: I have Magento and Codeigniter website on server. From now on, whenever I try to save image from website's dashboard, either Magento or CI, I get folder is not writeable like error. Then I checked online for solution and I found that Apache user should be owner, so I ran chown -R apache:apache /public_html on server. This solved images issue, I was able to save images from website's dashboard. But there is another problem, when I checkout on my Magento website I get this  error.  Do I need to install Apache all over again? or what should I do?

If I run:  sudo chown -R user:user /   Can I revert it to what it was before I ran it?


Is it possible to add the field field_tags in mymodule_install() like the body field? I added a body field with node_add_body_field. I can see the field in field_config_instance table. Is there a posibility to add field_tags in hook_install() without doing it in the GUI?  Is it done by field_create_field?  if (!field_info_field('my_field')) {   field_info_cache_clear();    $field = array(     'field_name' => 'my_field',     'type' => 'custom_field_type',     'cardinality' => 1   );   field_create_field($field); }   But how to set the values for a default article or gui custom like tags field?

How can I approach implementing the following in Drupal 7?  What I need to do is create a module which defines a new fieldable entity, called 'Company'. I have a list of, let's say, 20 fields that need to be filled out by each Company instance. These questions are predefined and some may contain custom validation.  At the moment, I'm at the point when I can add new fields to the Company entity. This works fine at the moment. My issue is that I need all these fields to be there as soon the module is installed, so adding them via the interface isn't an option.  I was wondering how can I approach this? I'd assume it comes down being able to do what can be done using the 'Manage Fields' UI programmatically.


I am using Ubuntu 14.04, I tried to search for Google Drive on Ubuntu Software Center, but couldnot find it. Searched for answers in Askubuntu but all I found was ways to install  which didn't worked for me.   Can anyone please give me some ideas?    Update: Don't know why they marked it as duplicate entry, as the link mentioned in question gives answer for Ubuntu 12.04, which as I see is two different things.

I'd like to install a  client for Xubuntu (12.04).  I'm getting non-English Google results, and I didn't find  in the Xubuntu repositories.   Does anyone know of a client that works well for Ubuntu or it's supported derivates (or installation instructions for grive?)


I am using the MWE from  where I need to cite a book chapter in an edited book.  From:  Author A, Author B, and Author C   to:  Author A, Author B and Author C   I tried:  \setunit{\addcomma\space}%   Basically, from:    to     My full MWE:  \documentclass{article} \usepackage{xpatch} % \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}  \usepackage[backend=biber,  % style=authoryear,   style=authoryear-comp, % citestyle=authoryear,  dashed=false, maxcitenames=2, maxbibnames=99, giveninits, uniquename=init]{biblatex}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \usepackage{csquotes}  \usepackage[unicode,colorlinks,citecolor=blue]{hyperref}  % \renewcommand*{\finalnamedelim}{\addspace\&\space} % \renewcommand*{\intitlepunct}{\space} \renewcommand{\labelnamepunct}{\space}   % \DeclareFieldFormat[article, incollection, unpublished]{pages}{#1} \DeclareFieldFormat[article, incollection, unpublished]{title}{#1} % \renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}}  \DeclareNameAlias{sortname}{family-given} \DeclareNameAlias{editorin}{given-family}  \newbibmacro*{byeditor:in}{%   \ifnameundef{editor}     {}     {\printnames[editorin]{editor}%      \setunit{\addcomma\space}%      \usebibmacro{editorstrg}%      \clearname{editor}}}  \xpatchbibdriver{inbook}   {\usebibmacro{in:}%    \usebibmacro{bybookauthor}%    \newunit\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {\usebibmacro{in:}%    \usebibmacro{bybookauthor}%    \newunit\newblock    \usebibmacro{byeditor:in}%    \newunit\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {}{}  \xpatchbibdriver{incollection}   {\usebibmacro{in:}%    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {\usebibmacro{in:}%    \usebibmacro{byeditor:in}%    \setunit{\labelnamepunct}\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{byeditor}}   {}{}  \xpatchbibdriver{inproceedings}   {\usebibmacro{in:}%    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{event+venue+date}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {\usebibmacro{in:}%    \usebibmacro{byeditor:in}%    \setunit{\labelnamepunct}\newblock    \usebibmacro{maintitle+booktitle}%    \newunit\newblock    \usebibmacro{event+venue+date}%    \newunit\newblock    \usebibmacro{byeditor+others}}   {}{}    \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @incollection{lennon1965,   author    = {John Lennon},   booktitle = {A book with articles},   editor    = {Paul McCartney and John Lennon and George Harrison and Richard Starkey},   title     = {This is my article in this book},   year      = {1965},   location  = {Liverpool},   pages     = {65--87},   publisher = {Cavern Club}, } @incollection{deborah123,   author      = "Deborah Lewis and Marie O'Boyle-Duggan and Susan Poultney",   title       = "Communication skills education and training in pre-registeration BSc Nursing",   editor      = "David W. Kissane and Barry D. Bultz and Phyllis N. Butow and Carma L. Bylund and Simon Noble and Susie Wilkinson",   booktitle   = "Oxford Textbook of Communication in Oncology and Palliative Care",   publisher   = "Oxford University Press",   address     = "Oxford",   year        = 2017,   pages       = "149-154",   Edition = "2nd edn" } \end{filecontents*} \addbibresource{\jobname.bib}  \begin{document} \nocite{*} book done \parencite{deborah123}.  \printbibliography \end{document}

The following bib entry hat three authors but the last one is separated with , and instead of just and. Is it possible to remove that comma?  \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{csquotes} \usepackage[style=alphabetic,maxnames=10]{biblatex} \addbibresource{references.bib} \usepackage{filecontents} \begin{filecontents}{references.bib} @book{key,   author = {Baur, S and Schmid, A and Schur, B.},   year = {2001},   title = {Title},   publisher = {Publisher}, } \end{filecontents} \begin{document} \nocite{*} \printbibliography[heading=bibintoc] \end{document}


I have heard some people saying " if main is not static then JVM could create an object of class containing main and call that main through object. But the problem is how JVM knows which constructor to call in case of overloaded constructors or even if there is only one paramaterized constructor, then what to pass."  Is that the correct reason? Because how can object of class be created without entering into main function? Please give your views on this. If that is not the right reason, then what's the correct reason?

The method signature of a Java main() method is:  public static void main(String[] args){     ... }   Is there a reason for this method to be static?


Today I opened Blender and started modelling a bullet,  And I found that when i switch to wireframe mode, theres only the object silhouette / outline showing up, the mesh edges have gone missing, and I couldn't select the bullet in wireframe mode. This haven't happened before, I have just found out the wireframe mode somehow broke itself today   I tried to reopen Blender, reinstall and updating it, but the problem doesn't seem to go away,  Here is how I am expecting the wireframe to look like  So how can I fix the wireframe view?

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I'm trying to extract the String Hex-STRING until the end of line. But what it matches is Hex-STRING: 84 16 F9 B0 05 1F 70 4F 57 4C A8 1F 60 E3 27 A1 E0 CD C4 E9 84 C3 68 53 C4 E9 84 C9 7A BB C4 E9 84 AC.  Something is missing in this expression? I already tried to include $but it does not work.  RegEX: Hex-STRING:\s(.+)  Test String:   iso.3.6.1.4.1.25355.3.2.6.4.2.5.1.7.4.2.13.36 = Hex-STRING: 84 16 F9 B0 05 1F 70 4F 57 4C A8 1F 60 E3 27 A1 E0 CD C4 E9 84 C3 68 53 C4 E9 84 C9 7A BB C4 E9 84 AC  C3 68 53 27 CC 58 97 84 AC 74 F7 60 E3 27 CC 58 97 84 AC 74 F7 60 E3 27 CC 58 97 84 AC 74 F7 60 E3 27 CC 58 97  84 AC 74 F7 60 E3 27 C3 68 53 84 AC 74 F7 60 E3 27 CC  58 97   Python Code  Text File content:    iso.3.6.1.4.1.25355.3.2.6.3.2.1.11.1.2.4 = STRING: "785c720855c8" iso.3.6.1.4.1.25355.3.2.6.4.2.5.1.7.1.2.4.9 = Hex-STRING: 84 16 F9 AF CF 75 84 16 F9 AF E1 35 50 C7 BF F2 F8 4B 70 4F 57 3A C6 23 70 4F 57 3E C5 CD   Code:  w = open("text.txt","r")  for item in w:   for match in re.findall(r'Hex-STRING:\s*(.+)',item):    print match   Output:   84 16 F9 AF CF 75 84 16 F9 AF E1 35 50 C7 BF F2   Output Expected:   84 16 F9 AF CF 75 84 16 F9 AF E1 35 50 C7 BF F2 F8 4B 70 4F 57 3A C6 23 70 4F 57 3E C5 CD

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Hi I am trying to create the following symbol in Latex. I am not able to make symbol of infinity to hang at the leg of pi as shown in symbol. The picture the I want is     But I got so far is the following.    The code I have so far is   \documentclass{article} \usepackage{tikz} \usepackage[outline]{contour}  \begin{document} \scalebox{15} {     \begin{tikzpicture}   % \fill[blue!10!white] (-0.1,0) circle[radius=3.55mm];      \contourlength{0.05mm};   \node (infinity) at (0.6mm,-0.1) {                     \large\bf\color{blue!60!black}\contour{white}{$\infty$}};                     \contourlength{0.05mm};   \node (pi) at (1mm,0) {                     \LARGE\bf\color{blue!60!white}\contour{white}{$\pi$}};                                                                         \end{tikzpicture} } \end{document}

I am trying to creating a logo that resembles this one shown below, but I do not know the best way of going about it. I know of a fonts package that may be useful, but not sure how to overlay the letters on top of each as so. Would anyone know a neat way of accomplishing this?  Picture of Logo:


I have an old Mac mini and I'm deciding on whether to get rid of it or to try to install the newest OS to use voice recognition. Does anybody have first-hand experience?   If i upgrade the specs, would this the new os work, or is the 1.83 GHz core and integrated graphics card too slow?

I'm looking to buy an older mac mini (v1.1) CoreDuo 1.66Ghz 2Gb DDR2, 80Gb HD.  My research shows the original OS was Mac OS X 10.4.11.  So my question is: if i will upgrade my CPU from T2300 to T7200 (2.0Ghz,Core2Duo) and the  so I can increase the ram from 2 to 4 Gb.  Will this configuration work for lion (Yes, i know 1.1 is not compatible with installer)?  I mean installed lion 10.7.5 will work good like now works Tiger and other soft like ilife 09, ableton 8, reason 5, audacity? or it will lagging?  also i need lion for my wifi adapter TP-LINK TL-WN7722N (i think i can startup this adapter with atheros fix or other kexts)


I have a dbconfig.php file which contains the MySQL database name, host, username and password to connect to the database.  // dbconfig.php $host = '127.0.0.1'; $username = 'root'; $password = ''; $db_name = 'mydb'; $db = new PDO('mysql:host='.$host.';dbname='.$db_name.';charset=utf8', $username , $password);   I have a HTML form which allows you to set from the UI the database credentials, so the strings above come from user input and are saved directly into this file by writing them when the form is submitted.  How can I sanitize the strings so that it can't be exploited? Currently I write the strings like this:  function sanitizeStr($string) {     $string = str_replace("\\", "\\\\", $string);     return var_export($string, true); }  $pattern = "/\\\$host = .*;/"; $newpat = '\$host = ' . sanitizeStr($_POST['db_host']) . ';'; $contents = preg_replace($pattern, $newpat, $contents);  // ... same for $username, $password and $db_name   Are str_replace and var_export enough to stop code from being injected into dbconfig.php?   I can not try a really aggresive sanitization (such as allowing only specific characters) because this would force the user to have a MySQL password which only contans those characters.  How can I make sure that the string from the input will only be used as strings inside the PHP file and not somehow as valid code?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


How can I switch input language with CapsLock on Ubuntu 18.04? For some reason when I try to set CapsLock as a switching key it enables Caps, but doesn't set it as switching language key.  When this window is open and I press Caps, the LED light switches on and off. But the key isn't registered.    Update: As explained in the linked post, you have to use Gnome Tweak Tool to change these settings.  sudo apt install gnome-tweak-tool

I updated my Ubuntu version to 17.10 and I want to configure switching to next input source via CapsLock button. I tried to set CaspLock in keyboard setting, but I cant because nothing happening.  I did actions explained here  and it works, but now when I switching input source I see a pop-up (like as pop-up that shows switching application windows) and must wait a few seconds until it disappears.  How I can resolve my problem?


we are focussed on building websites/webservices for quite a few years now and right now in discussions with the company which manages a companies network. I just can't believe what they are telling us so i would like to ask if this is true for all Microsoft AD networks.  Situation:   We own/control the public DNS record "example.com"  The company which manages the companies internal network named the domain controller also "example.com" So now whenever we need a subdomain e.g. staging.example.com we have to report that to the company which manages the network to make this subdomain available in the network   As far as i can see the company could have named their domain controller however they wanted. Would they have given the domain controller a name like managed-network-example.com all this conflicts wouldn't exist?  Throughout the discussions they blamed us that we didn't use www.example.com to reach the website instead we redirected to example.com in the browser. Then when we switched and redirected to www.example.com just to find out that this resulted in a 404 error because they had to point the www subdomain to our webservers IP. In the aftermath they told us thats absolutely normal that we have to inform them about every subdomain we wanna use so that it's reachable from within the network.   So is this the way you setup an internal network, making a public DNS record more or less irrelevant?  Thanks for your replies!

This is a  about Active Directory domain naming.   After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website).   , but I'm still not sure about what other rules there are around naming Active Directory domains.  Are there any best practices on what an Active Directory name should or shouldn't be?


I am trying to install Steam in 19.04 but getting errors.  sudo apt-get install steam Reading package lists... Done Building dependency tree        Reading state information... Done Package steam 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 However the following packages replace it:   steam-launcher  E: Package 'steam' has no installation candidate   Also tried  sudo apt-get install steam-launcher Reading package lists... Done Building dependency tree        Reading state information... Done Package steam-launcher 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 'steam-launcher' has no installation candidate   and  sudo apt install steam-launcher Reading package lists... Done Building dependency tree        Reading state information... Done Package steam-launcher 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 'steam-launcher' has no installation candidate

Actually I have installed the new Ubuntu 15.04 64bit, and when I'm trying to install Steam on it, there is a problem. In fact I have downloaded the deb package from steam website, installed it and when I start it nothing happens. I tried to start it from terminal and what I've got  $ steam Running Steam on ubuntu 15.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0_client) libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast


I have been reading about rainbows and I know that there is a different rainbow for each observer. Also the rainbow is centred on a line joining the head of a person to his shadow. What does it mean? I suppose that this means that a rainbow has some "thickness"(am I right?). So my question is that although a rainbow cannot be given a distance from a given observer( as it is visible to a given person over a range of distances), what are the factors which determine that range over which a rainbow is most prominent from point of view of given observer.   Thanks

My cousin shot .  In the picture it is clear that the mountain is behind the rainbow (the rainbow blocks the view of the mountain), whereas the nearby trees are in front of the rainbow. This got me thinking: how thick (deep) is the rainbow?  To make that more precise, imagine a plane taking off from the top of the mountain behind the rainbow and flying straight towards the camera. You could measure the relative strength of the plane / rainbow in the picture by a simple linear fit (assuming you knew its location). I imagine you'd see something like this:    How thick would this region be?


On my next trip to India I was thinking of exchanging some US dollars I have left from travelling into rupees. I have now realised that they are 2006, 2009 and even one 1998 100 USD notes; do you foresee any problems with that?

I received from my Dad 150 American Dollars about 12 years ago. I never have thought to change this money but a few days I tried change it in a currency exchange in Sydney and the guy didn't change it because the series are old.     What do I have to do to change this money?


I have a positive asymmetric response variable in a regression model. One of the assumptions about linear model is that the stochastic component of the model is normally distributed. If I have a skewed response but my residuals are normally distributed could I use the linear model or I have to choose or a transformation or a GLM?

I've got a weird question. Assume that you have a small sample where the dependent variable that you're going to analyze with a simple linear model is highly left skewed. Thus you assume that $u$ is not normally distributed, because this would result in normally distributed $y$. But when you compute the QQ-Normal plot there is evidence, that the residuals are normally distributed. Thus anyone can assume that the error term is normally distributed, although $y$ is not. So what does it mean, when the error term seems to be normally distributed, but $y$ does not?


I have an existing piece of code that looks for geolocation for existing leads.   for (Lead l : leads) {     System.debug(l.Id);     // Check if Lead was created or Updated for IC_Campaign_Eligible__c in last 24 Hours     List<LeadHistory> leadHistoryValues = IDtolhist.get(l.id);      if (!leadHistoryValues.isEmpty()) {         Double latitude = l.Latitude;         Double longitude = l.Longitude;         l.Status = 'ICReady';         if(l.MG__c == NULL || l.MG__c == ''){             List<Account> accounts = new List<Account>(                 [SELECT Id, Name, DISTANCE(ShippingAddress, GEOLOCATION(:latitude, :longitude), 'mi' ) Dist,                     (SELECT ContactId, Contact.Name, Contact.PCP_Counter__c,                              Contact.Gender__c                        FROM AccountContactRelations                        WHERE Contact.Include_in_IC_Campaign__c = TRUE                        ORDER BY Contact.PCP_Counter__c ASC NULLS FIRST)                     FROM Account                      WHERE ShippingLatitude != null                     ORDER BY DISTANCE(ShippingAddress, GEOLOCATION(:latitude, :longitude ),'mi')]);   This was written by someone else and yes - does contain a loop in a loop but...  We are getting an issue with the AccountContactRelation object reference.  This is the error:     Contact.PCP_Counter__c, Contact.Gender__c FROM AccountContactRelations   WHERE Contact.Include_in_IC_Campaign__c                                                  ^ ERROR at Row:2:Column:145 Didn't understand relationship   'AccountContactRelations' in FROM part of query call. If you are   attempting to use a custom relationship, be sure to append the '__r'   after the custom relationship name. Please reference your WSDL or the   describe call for the appropriate names.   This doesn't make sense. The Object is a standard object; I'm not adding __r in this case. Embedded soql queries work so --- but not in this case...  Can anyone give me a hint as to what may be wrong?  Edit: This is not a duplicate of the other post: This class has been working in production for over a year. It's a scheduled batch class and I was turning on the schedule in full sandbox to test a change in another class but the schedule wouldn't take because of issues in this class (which has not been modified since API V41)

I'm getting the following error message:     System.QueryException: Didn't understand relationship 'AccountContactRelation' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.   Select Email, Id, (Select ContactId, AccountId From AccountContactRelation) From Contact  In AccountContactRelation object there are two lookup fields for Account and for Contact.  Please advise how to avoid such error message?


I installed Ubuntu on 2 PCs the past few days. On one it was Kubuntu 18.04.3 -> Install ubuntu-desktop and I get the monitor showing file systems nicely, like this:    The second computer, causing me this issue, was a fresh install of Ubuntu 18.04.3 yesterday and the monitor shows file systems with a crazy amount like this:    The only setting I see that might pertain to this is 'Show all file systems', which is unchecked:    Searching here and Googling haven't brought me anyone with the same issue.

As of Ubuntu 18.04 running lsblk shows 16 snap loops (2-3 times for each snap). The question is, why are they being listed as results for lsblk, fdisf-l, and blkid?    It creates a lot of clutter from the actual disks drive partitions I need to see, namely /dev/ partitions. I know a purported duplicate of this question exists, but it only asks why three loops are being listed per snap. I want to know why these snaps are being listed in the first place, and the purported duplicate does not answer this (perhaps those marking this as duplicate could help me by explaining why it is a duplicate). Technically, they qualify as file systems (which I neither created nor asked for), but they are getting in the way of the information output for the /dev/ partitions I am interested in. This becomes a problem when fdisk -l outputs a three page+ list filled mainly with snaps.  The output of a recent (1 week old) Ubuntu install and I have not installed any snaps:    $ lsblk   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT   loop0    7:0    0  14.5M  1 loop /snap/gnome-logs/37   loop1    7:1    0   2.3M  1 loop /snap/gnome-calculator/170   loop2    7:2    0  86.6M  1 loop /snap/core/4486   loop3    7:3    0  86.6M  1 loop /snap/core/4650   loop4    7:4    0   1.6M  1 loop /snap/gnome-calculator/154   loop5    7:5    0  14.5M  1 loop /snap/gnome-logs/34   loop6    7:6    0   3.3M  1 loop /snap/gnome-system-monitor/36   loop7    7:7    0   2.3M  1 loop /snap/gnome-calculator/178   loop8    7:8    0    13M  1 loop /snap/gnome-characters/101   loop9    7:9    0   3.7M  1 loop /snap/gnome-system-monitor/45   loop10   7:10   0 139.5M  1 loop /snap/gnome-3-26-1604/64   loop11   7:11   0   140M  1 loop /snap/gnome-3-26-1604/59    loop12   7:12   0   3.7M  1 loop /snap/gnome-system-monitor/41   loop13   7:13   0    21M  1 loop /snap/gnome-logs/25   loop14   7:14   0  12.2M  1 loop /snap/gnome-characters/69   loop15   7:15   0    13M  1 loop /snap/gnome-characters/96   sda      8:0    0 298.1G  0 disk   ├─sda1   8:1    0   512M  0 part /boot/efi   └─sda2   8:2    0 297.6G  0 part /   sr0     11:0    1  1024M  0 rom     (supplemental screen capture of above text):     My snap list shows 6 results:       core   gnome-3-26-1604   gnome-calculator   gnome-characters   gnome-logs   gnome-system-monitor     Meanwhile, gnome-disk-utility shows nothing at all for snaps, only showing my HDD and optical drive.    It won't be very efficient if every installed snap gets listed as a block device (2-3 times each to add). Should I expect future updates to deal with this?  Edit: fdisk-l also dumps out a very long list with 16 instances of these "disk loops" (Disk /dev/loop0, Disk /dev/loop1, etc., each with details which I won't show here because it's too long). This can't be intended behaviour, can it? blkid also lists 16 loops, as TYPE="squashfs". At least parted -l works as expected, only outing my actual disk partitions.    I just tested this, and installing more snaps does add more to the lsblk output. Therefore, fdisk, lsblk, blkid could have potentially huge output lists, according to the number of snaps available, and installed.


I am a beginner so asking this silly question. Is docker swarm free to use for building cluster of docker containers? i heard it is $15/hr ? We can use swarm in production without paying anything? any limitations on it?  Also can i run specific docker containers on dedicated hosts and run some selected containers on other hosts?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


I've been working on some problems related to multivariate distributions in my independent studies, and I came across one that I am feeling mixed about. Consider $X \sim Poisson(\lambda_x) \wedge Y \sim Poisson(\lambda_y),$ and consider $W = X + Y.$ I want to figure out the conditional distribution of $X$ given $W = w.$ I have a feeling that I should go about proving the $W \sim Poisson(\lambda_x + \lambda_y)$, but for now I will assume this (if anyone has any suggestions on how to prove that one, I'd like some help on that too).  We see that $$P(X = c | W = w) = \frac{P(X = c \wedge W = w)}{P(W = w)} = \frac{P(Y = w - c)}{P(W = w)}$$ $$=\frac{(\lambda_y)^{w-c} e^{-\lambda_y}\frac{1}{(w-c)!}}{         (\lambda_x + \lambda_y)^{w} e^{-(\lambda_x+\lambda_y)} \frac{1}{w!}}.$$  I thought this would be enough, but my professor told me that I should find some way to manipulate this into a binomial distribution. Any recommendations on where to simplify this? I am having some difficulties figuring this out.

I am currently trying to understand how does an instance of the EM algorithm is derived when there are "hidden variables" in this old paper: .  I don't really understand how the expectation step is derived, and what bothers me the most, is that I cannot prove the following statement (right before 2.11):  $$ \mathbb{E}[X|X+Y] = \frac{(X+Y)\lambda_X}{\lambda_X+\lambda_Y} $$  where $X \sim Poisson\{\lambda_X\}$ and $Y \sim Poisson\{\lambda_Y\}$  To begin, I wrote the discrete expectation as follows: $$ \mathbb{E}[X|X+Y] = \sum_{k=1}^{X+Y} k P(X=k|X+Y)\\ = \sum_{k=0}^{X+Y} k \frac{P(X+Y|X=k)P(x)}{P(X+Y)} $$  Where I can replace $$ P(X+Y=k) = \frac{(\lambda_X+\lambda_Y)^ke^{-(\lambda_X+\lambda_Y)}}{k!}$$ $$ P(k=x) = \frac{\lambda_X^xe^{-\lambda_X}}{x!}$$ $$ P(X+Y=k|x) = P(Y=x-k) = \frac{\lambda_Y^{x-k}e^{-\lambda_Y}}{(x-k)!}$$  but I dont really know how to mix that together, because I don't really see what does the event $X+Y$ stands for, and how does it rely on the x in the integral ?  Thank you very much for you help


The books are very Britain-centric. Do we have any information about Voldemort being considered a threat outside of Great Britain? Was he know in magic (non-Britain) world or maybe casual non-Britaing mage knew nothing about him?  Edit: question is not about "first Wizarding War being an international event", as it is question about things that happend (or not). Question is more about knowledge of non-Britain mages about Voldemort and fear than can come from it.

Is there any hint that the MoM or anywhere else got support in combating voldemort the first time around? Or is everything completely UK-centric?  I can't remember anyone in the second war being specifically sent from europe to help, even though we see international wizards in book 4. But I don't think all the events of the first war are covered in the books.  So are other bodies like the MoM involved in the first war, or was it isolated in the UK?


We often see the value of pi(irrational) with large no of digits behind the decimal place. How is such precise value of pi calculated?

When I was a child I was taught $\pi$ (Circumference/Diameter) is an irrational number  and can be approximated to $22/7$ but $= 3.(142857)(\ldots)$.      But where does this value comes from?  In short How do I derive $\pi$?


Clueless Dad question...   I bought an XBox One S for my daughter about 2 years ago.  It came preloaded w/ Minecraft bundle, and I also bought Lego Superheroes and Just Dance, which she had loaded on to it.  Recently, the XBox has stopped working, and Microsoft shrewdly charges just enough ($140) to repair it to make me consider buying a brand new console ($240).  The choice as to whether to repair or purchase new will depend on whether I am able to transfer those games to the new XBox One.  I'm not sure where the disc for Just Dance is (it might be inside the damaged XBox), and I seem to recall that the Lego Superheroes didn't come with a disc, just an install voucher??  Minecraft was preloaded so I don't think I have a disc for that either.  Will she be able to continue to play the games I've previously purchased if I buy a new console, without repurchasing them??

I am running out of storage, I usually have bought a lot of my games on disk but if I buy a game on the store then delete it, and want to redownload it do I have to buy it again


I bought a new SSD for my old macbook pro mid 2012. Can I clone my current OS on other Macbook to SSD and bring it to my old Macbook 2012? Thank you!

I want to install a new Solid State Drive (SSD) into the Mac. Can I just build in the SSD, start the MacBook in Recovery Mode and install OS X from there on?  After reading a lot on the internet I still have some doubts…  My HDD crashed, I can't repair it using disk utility or the fsck methods as mentioned on the internet.  According to  it should be possible.  I know how to replace the HDD with the SSD. I would go for the Samsung 850 EVO SSD - 500GB. My Mac is a MacBook Pro Mid 2012, model A1278.


Windows 7 machine keeps crashing. It happens with various software packages and seems pretty random except that I have usually "dome something" like click or hover the mouse over the task bar. The "something" varies with every crash.  My question is what would be a good way to track this down to root cause? I have in the past tried memory checking, drive checking and hardware checking of various kinds. Is there an app that can keep an eye on things and report (in a meaningful way) what happened?  The computer specs:

When my Windows 7 machine crashes, I can't find any information in the event logs that can help me track down the problem. Is there a setting I can turn on to log more information so I can capture the last action taken before the OS crashes?   I'm more interested in how to troubleshot these problems in general, rather than a specific solution to my current problem. Thanks.


I tried several paths but all leads to the same value. Since the question wants me to prove, it need to exist, but I can't find two paths.  $$\lim_{(x,y)\to (0,0)}\frac{x^4 \cdot y^4}{(x^2+y^4)^3}$$

I am trying to solve the following limit:  $\lim_{(x,y) \to (0,0)} \frac{x^4y^4}{(x^2 + y^4)^3}$  (This is a more challenging problem from Folland Calculus, it seems).  I am pretty sure this limit does not exist (however, this is just a guess, and I am not 100% sure.)  I am trying to approach via the paths y = mx and x = my but... they don't seem to work. I have tried simpler cases such as x = 0 and y = 0.   Any help appreciate.


I've been experiencing this weird behavior on a simple PHP snippet. I have a foreach loop that needs to iterate through multiple users and increment a variable for each user unless the user's id is a member of a given array.  Right now, the foreach is looping through users with IDs 1 through 1000 and it works OK except for user ID 74, which should be skipped but is not. Users with ID 75-81 are skipped correctly  The code:  $exceptions = array(74,75,76,77,78,79,80,81); foreach ($users as $u) {   if (array_search($u->id, $exceptions) == false)   {      // not found on the array, so no skipping      $i++;   } }   The above is an over-simplification of the code, but it helps reproduce the issue. The array is formed dynamically from a separate database query and is well formed. When doing a print_r for the array is comes out as expected:  Array (     [0] => 74     [1] => 75     [2] => 76     [3] => 77     [4] => 78     [5] => 79     [6] => 80     [7] => 81 )   The issue is that no errors are thrown, the loop iterates through the 1000 users correctly but only excludes users 75 to 81. I noticed that only the first array element gets "ignored" so I worked around this by defining a non-existing user ID (0) as the first array element, which helped. But since it's an ugly solution I've been trying to figure this out all afternoon. As you may note above, I'm not using strict comparisons so that shouldn't be the issue.  During debugging, I changed the code to write some logs. every time a user ID was being checked and wasn't present in the $exclusions array, a log entry would be added. Unsurprisingly, "74 was not found in exclusions" was logged. I did some further tracing only to find out that on the first array element, the IF clause evaluated to false.  At this point this is merely academic curiosity, as the ugly workaround works, but does anybody have a clue why this happens?

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


I want to transfer the following python code to javascript:  def conv_2c(val, bits):    return ((1 << bits)+val)    function conv_2c(val, bits){      return ((1 << bits)+val); }   In Python print(conv_2c(-944,64)) gives me 18446744073709550672 , while  in JS console.log(conv_2c(-944,64)); gives me -943 . Why is there a difference?? Is this something to worry about (do the numbers really differ?) or is it a thing of how Python or JS print negative/ two's complement numbers?

I need to bitwise shift a value 64 times in JavaScript. But JavaScript starts rounding after 32.  For example:  for(var j = 0; j < 64; j++) {     mask = mask << 1;     console.log(mask); }   This prints value from 0 to 1073741824 but then rounds of and starts printing 0.


I am trying to see how good LaTeX is.  Can someone show me whether graphics like this.  Thank you due to copyright complains removed the figure.

I want to create some bell shaped curves for demonstrating hypothesis testing in statistics. Can anybody help me drawing curves like shown in the following picture?


From      The police suspected that Brian had broken the window at his house because he  wanted to make them think that a burglar had stolen his valuable stamp collection. They  thought that Brian had done this because he  needed the money. However, they  didn't know that Brian  had flown to Brazil the week before, and was abroad when the burglary  took place.   Why "had flown"? Is it because it is here to emphasize the innocence of Brian because it is obvious as it is written a week before that the fly happened before the police did not know, or is it to respect the backshifting done with "suspected" and "thought", or both of them — backshifting and emphasize?

I have never had this problem before. But after seeing some questions posted on ELU, I started to doubt. I have been through links1, pages of grammar books2, a lot of questions3 posted here and ELU. I now still can't seem to understand how the past perfect is exactly used. The references sometimes even contradict each other.  What I had understood so far was      The past perfect is not necessary if we are not 'going back' to the earlier past, and simply moving from one event to another.   but I then saw a lot of other 'rules' including      If the sequence is clear, the past perfect is not needed.   which is slightly different, less 'narrow' and can be applied in more situations than the first ruleA, and      The past perfect is optional only when talking about an action at a specific time.   This is confusing. Can anyone here clarify things out please?    A For example, for  Doing the survey [completed] -> Showing the result      We showed the result of the survey we did.      If the second rule is applied, the sentence above is fine (the sequence is clear), but not if the first rule since we are not moving from any event to the next and possibly even going back.    1  and   2 Practical English Usage (2005) by Michael Swan, Collins Cobuild Student's Grammar (1991). Upper-Intermediate Cutting Edge.  3 including , , ,  etc.


I have a theme setting that allows the administrator users to specify how many teasers should be shown on the home page by selecting a number from 1 to 4 (through a <select> field). Is it possible to reference this variable so I can use it in Views? In that way, I can let Views check that value in the theme settings, then display the number of entries accordingly.

Say for instance, you have a view that displays when viewing a certain node type, but you want the pager settings to be different for each individual node. I was thinking of making a CCK field like "pager setting" and then give it an integer option of x-y. But I don't know if it's possible to somehow dynamically plug that field into the Views' settings. Or is there another way to do this maybe?


I am from India and I have Canadian student visa, i booked a ticket with British airways which has 2 layover 1 st in London and 2 nd in Chicago (USA). So ,do I need transit visa during the 5 hours layover in Chicago airport? My final destination is Toronto (Canada).

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


Blackbody radiation is thermal radiation from a hot object emitted over a continuous range of wavelengths. But why are spectral lines, lines (i.e., you only get certain wavelengths when an element is heated up and you look at it's emission spectrum)? Is it because the light from the heated element is passed through some sort of diffraction grating?

If photon energies are continuous and atomic energy levels are discrete, how can atoms absorb photons? The probability of a photon having just the right amount of energy for an atomic transition is $0$.


Let $f = a_0 + a_1x + ... + a_nx^n$ be a polynomial in $\mathbb{Z}[X]$ of degree $n$. Suppose that for some $k (0 < k < n)$ and some prime $p: p∤a_n; p∤a_k; p|a_i$ for all $0≤i≤k-1$; and $p^2∤a_0$.  Show that $f$ has a factor $g$ of degree at least $k$ that is irreducible in $\mathbb{Z}[X]$. It looks quite similar to Eisenstein's criterion, but I don't know how to prove it.

So, this is Hungerford problem 9 on page 166. Here's the problem in full:     Let $f(x) = \sum_{i=0}^n a_i x^i \in \mathbb{Z}[x]$. Suppose that for some $k$, $0 < k < n$, and some prime $p$ such that $p \nmid a_n$, $p \nmid a_k$, and $p \mid a_i$ for all $i = 0, \dots, k-1$, but $p^2 \nmid a_0$. Show that $f$ has a factor of degree at least $k$ that is irreducible in $\mathbb{Z}[x]$.   Here's my progress:  If we construct a new polynomial $g$ where $g$ is $\sum_{i=0}^k a_i x^i$ , we know by Eisenstein's criterion that $g$ is irreducible in $\mathbb{Q}[x]$. If we somehow knew that $g$ was irreducible in $\mathbb{Z}[x]$ too (that would follow if $g$ were primitive), then we could say that the smallest thing we could possibly factor out of $f$ that isn't a unit has to be of degree $k$ and that $g$ must be a factor of it. I tried writing $f$ as $C(f) \cdot f_1$ where $C(f)$ is the content of $f$, so that we'd be dealing with a primitive $f_1$ (and of course, the nice things about $g$ don't go away since $p$ doesn't divide every term), but this doesn't necessarily result in $g$ being primitive (right?)!  So, here's where I'm stuck: how can I show I can even factor $f$? How can I show that $g$ is irreducible in $\mathbb{Z}[x]$, whether by showing it's primitive or by some other means?  Thanks so much, everyone!


I'm wondering how to geocode addresses in R Studio ? Is there a link to Google Developers API ?

I need to find a package in R or source code in R that performs batch geocoding using Bing, Yahoo, OpenStreetMap. Do you have any suggestions?


I have known that the vector is sampled from Gaussian distribution in lattice-based cryptography because the distribution of the vector $\mod{\mathcal{P}(\mathbf{B})}$ approximates to uniform distribution.  It is proved by below lemma.     For any $s > 0$, $\mathbf{c} \in \mathbb{R}^n$, and lattice $\Lambda(\mathbf{B})$, the statistical distance between $\mathcal{D}_{s,\mathbf{c}} \mod{\mathcal{P}(\mathbf{B})}$ and the uniform distribution over $\mathcal{P}(\mathbf{B})$ is at most $\frac{1}{2} \rho_{1/s}(\Lambda(\mathbf{B})^*\backslash\{\mathbf{0}\})$. In particular, for any $\epsilon >0$ and any $s \geq \eta_{\epsilon}(\mathbf{B})$, the statistical distance is at most $\Delta(\mathcal{D}_{s,\mathbf{c}} \mod{\mathcal{P}(\mathbf{B})},\mathcal{U}(\mathcal{P}(\mathbf{B}))) \leq \epsilon/2$.   But if the vector is sampled from uniform distribution at first, the distribution of the vector $\mod{\mathcal{P}(\mathbf{B})}$ is uniform. So, I thought that Gaussian sampling is not needed for above reason, because Gaussian sampling requires large costs.  Another reason I think is that the smaller vector is preferred because almost lattice problem is about finding short vector and Gaussian variable has higher probability as closer to the center. Is it right?  If my thought is not correct, let me know the reason using Gaussian distribution in lattice-based cryptography.

The Wikipedia article on  mentions two methods of sampling "small" polynomials namely uniform sampling and discrete Gaussian sampling. Uniform sampling is clearly the simplest, involving simply uniformly selecting the coefficients from the set of small coefficients, thereby guaranteeing they will be small. However, the articles mention that security proofs rely on discrete Gaussian sampling.  However, I have a bit of difficulty wrapping my head around    Why discrete Gaussian sampling would be better than uniform, security-wise?   I mean, usually uniform is preferable - it maximizes the entropy/information in each sample, making the outcome more unpredictable. I could understand it if the Gaussian sampling technique would somehow serve to avoid (at least with high probability) "weak" parts of the space of outcomes but I have found no information/justification that this is the case.  Another reason I can see why discrete Gaussian might be better is that there is, after all, a chance (albeit a small one) one would select a non-small coefficient, so the space of outcomes is actually larger. However, given that this probability of hitting this extra space is (by design) quite small but also that one would likely immediately reject such a sample (because the algorithm calls for a small polynomial), this seems to be irrelevant.  It is not because I am against discrete Gaussian sampling I just want to understand why it is more secure. Also, I want to understand if it really IS more secure or it is simply easier to prove security in that model. I would actually consider that very interesting if it is the case because it raises the question of why is it easier to prove the security under conditions that are intuitively worse (i.e. discrete Gaussian vs the intuitively better uniform case)? If it is so intuitively clear that uniform sampling is better, surely it must be possible to transform that intuition into a security proof of RWE also under uniform sampling. Otherwise, I would fear the intuition must with high likelihood be wrong or at least dubious.


I used Fermat’s Little Theorem and was able to turn the equation into $x^{44} = 1 \pmod {23}$ but still was not able to find a solution from that.

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


As per  2 months ago (March 2020): after you've written your question, you are taken to a 2nd page which prompts you to "Review your question".  There are 2 possibilities when you land on that page:   either your question has "obvious" validation failures. or it successfully passes validation.   In the former case, the page is clearly beneficial, in that it provides a nice UX for understanding what needs to be fixed (especially if you're new to the site, and aren't familiar with the form).  But in the latter case, I offer that it doesn't add anything. As far as I can tell, it has all the same information as the previous page:   You could already see a pre-render of your question. You could already see a list of various Similar Questions.   As far as I can tell, it just forces me to click the same button twice; adding annoying UX for no benefit.    It might be a prompt for new users to encourage them to actually use the above features.  It might perhaps be intended as a mental prompt to get people to reflect on their question? But I'd honestly be surprised if it were actually achieving that, rather than everyone ignoring it and auto-clicking "Post".  Do we have server-log evidence of how long people spend on the "Review" page? Conversely is there any evidence of questions getting "lost" because people forget to click twice?    If there is some new info on that page, then it needs a re-design in order to make that clear! If not, we should gather evidence to assess its efficacy. If it does nothing (as I suspect), then I offer that it's a pointless irritation and should be removed.

After rolling it out to the International Stack Overflow sites last week, we're rolling out the new ask page to the whole network today. The new page was designed with the goal of helping new askers by more readily presenting them with tips on how to improve their question. This is a combination of the "Ask a question wizard" (that was tested on Stack Overflow) and the current standard "ask a question" page. You can read more about it . The /questions/ask/advice page has been replaced by a new modal for first-time askers, and the flow is now broken down into two steps: drafting the question, and reviewing the question — so no more random warnings triggering when you switch from the tag to the title field, while others only show up if you actually try to post. And as the blog post notes, there's also an informational modal at the end, so new askers know what to expect once they've asked their question. Enough words, here's what it looks like... (click on the images to see the larger versions) Welcome modal for new askers:  Drafting a question:   Reviewing a question, with errors (shown inline) and warnings (shown on the right side):   Reviewing a question, without errors:  What's per-site customizable, and what's the procedure to get it live? As you can see, any existing custom guidance on "How to ask," "How to tag," or any custom error or warning messages your site may already have in place will still be there, and will still be customizable with the same restraints (basic HTML, using paragraphs, lists, links) as before:  The "welcome modal" for new askers (seen with the default text in screenshot 1), everything between the title and "Before you post..." (this is only custom on 4 sites at the moment, ). The full contents of the "Draft your question" sidebar (seen with the default text in screenshot 2, and with custom text in screenshot 3). The text in the tag popover, between "Tags help the right people..." and the bullet points (seen with custom text in screenshot 2, and with the default text on screenshot 3). The above three have no character limits, aside from "within reason." The placeholder text in the title field (text only; seen with the default text in screenshot 2, and with custom text on screenshot 3). The warning text shown in the "Review your question" sidebar, regex-based (seen with the default text in screenshot 4, and with custom text on screenshot 5). Tag-related error messages and warnings, regex-based (seen with custom error text in screenshot 4, with the default text on screenshot 5,  and with a tag warning ). The warning and error messages described in the two bullet points above have a limit of 1000 characters.  These can only be edited by staff, so the process to get them live is as described :  Create a Meta post on the appropriate Meta site, and discuss it with your community. Once a consensus is reached, a mod should escalate it to the CM team. Generally speaking, the "contact us" form is the best way to go, though a ping in chat can sometimes work too (the most that could happen is we ask you to use the form). Unless there are any outstanding issues, the CMs should be able to get to it Soon™.   This has been live on Stack Overflow for a while now, and like I mentioned at the beginning of the post, we're rolling this out to the rest of the network now. If you have any questions or see anything that has broken on your site, please let us know — we'll be actively monitoring and responding to this post until March 10th. After that, if you have a bug or specific request, start a new post and tag it with  and  or  :)