I have trouble finding the exact limit for a martingale:  Let $\{\xi_n\}_{n\in\mathbb{N}}$ be a Markov chain with $\xi_0$ uniformly distributed in $[0,1]$ and  $$ P(\xi_{n+1}=\alpha\xi_n+(1-\alpha)|\xi_n)=\xi_n $$ $$ P(\xi_{n+1}=\alpha\xi_n|\xi_n)=1-\xi_n, $$ for some $\alpha\in(0,1)$. It's clear that $\xi_n$ is a martingale and $\xi_n\leq1$ for all n, so by Martingale Convergence theorem $\xi_n$ have a almost surely limit $\xi$, which I'm trying to find . In Durrett's book, this kind of question normally ends when we see the stationary point by observation (if I'm not mistaken), while here it seems like $0$ and $1$ are both stable. How to get the almost surely limit formally? Thanks for any help.  Let me add some of my thoughts I just came up: For those events always go left, the probability is $\prod(1-\xi_n)=\prod(1-\alpha^{n}\xi_0)$, which is convergent to a nonzero constant since $\xi_0\Sigma\alpha^{n}$ converges. That is to say, there is a positive possibility that $\xi_n$ converges to $0$. As $\xi_n$ converges to $\xi$ almost surely, it forces $\xi$ to be $0$.  Is my argument above correct? Please let me know if there are any problems in it. Thanks a lot.  As being pointed out, it's similar to the other question while I want to find the limit $\xi$. With the help of the other question, it can be seen that $P(\xi=0)=P(\xi=1)=1/2.$ I would guess $\xi=1_{(1/2,1]}$, but how to prove it formally?


What is the order in which the destructors and the constructors are called in C++? Using the examples of some Base classes and Derived Classes


Show that the functor that takes $R$ to the set of invertible elements of $R[X]/(X^2-a)$ is representable.

The following question is from the Fall 2016 UCLA algebra qualifying exam:  Let $F$ be a field and $a\in F$. Show that the functor that takes $R$, commutative $F$-algebras to the invertible elements of $R[X]/(X^2-a)$ is representable.  What I have so far: If $a\in F$, then then we have that $R[X]/(X^2-a)\cong R\times R$. Hence we get that $$ Hom_{F-\text{alg}}(F[t,t^{-1}]\otimes_FF[t,t^{-1}],R)\cong Hom_{F-\text{alg}}(F,R\times R)\cong U(R)$$ where $U$ is the functor that take $R$ to units of $R[X]/(X^2-a)$. Hence in this case, the functor is representable.  I'm unsure how to extend this to the general case.


Create video with 5 images with fadeIn/out effect in ffmpeg

With 5 images I have to create a video of 60 seconds in ffmpeg, each image has to display for 15 seconds. after  15 seconds, first image has to fade out and 2nd image has to fade in, after that 2nd image has to fade out, 3rd image has to fade in..etc. Please guide me how can I achieve this using ffmpeg commands.


I am trying to make a simple TCP chat program, and when the user sends the message "/list", I want to reply from the server with a list of all online users.      else if (cmd.text.equals("/list")){     //Sends the client a list of all registered users         UserList userList = new UserList();          System.out.println(online_users);          if (online_users.values()!=null){              userList.users.addAll(online_users.values());          }          c.sendTCP(userList);      }   However, even though I have tested and know that online_users does contain a value to add to userList.users, the command userList.users.addAll() keeps throwing an error. This is the error:  Exception in thread "Server" java.lang.NullPointerException at com.andrewlalisofficial.ChatServer.checkCommand(ChatServer.java:128) at com.andrewlalisofficial.ChatServer$1.received(ChatServer.java:68) at com.esotericsoftware.kryonet.Server$1.received(Server.java:61) at com.esotericsoftware.kryonet.Connection.notifyReceived(Connection.java:246) at com.esotericsoftware.kryonet.Server.update(Server.java:208) at com.esotericsoftware.kryonet.Server.run(Server.java:356) at java.lang.Thread.run(Thread.java:745)   where line 128 is userList.users.addAll(online_users.values()); I want to be able to simply add the collection of values from the Map online_users to a new String list and send it off. I don't understand why there is an error.


Many of the children who are employed as helpers, messengers, cash   boys and minor laborers in shops, foundries, factories, offices and as   venders, are the mainstay of families that live, God knows how, for   the one who should be the bread winner is an invalid, a cripple, a   paralytic, and would be in the charity hospital or the almshouse were   it not that the instinct of family unity is as strong and admirable   among the humble as among the rich.   I don't understand what "were it not that" & the last part mean. Does it mean that "it's not because that the instinct of poor families are as strong as the rich families, but thanks to the children, poor families are able to live"?


My friend and I got into an argument about English grammar, so I was hoping maybe you could help us out. Okay so we want to know if the following part of the sentence is correct, "People who are satisfied and feel self-fulfilled like I" rather than "People who are satisfied and feel self-fulfilled like me". I have already provided many sources to my friend showing that the first way is a formal and a grammatically correct way, however he wants an answer with this specific part of the sentence.   Please help us out  Thank you


What can highly-active users who want to delete their accounts expect if their account is held up for review for vote preservation?

It's a known fact that users who've cast a lot of votes qualify for potentially having their votes preserved in case they request their account be deleted, because invalidating all their votes as is done normally can cause too much disruption to a lot of other users. In that case, an employee has to go through the profile and check to see if there's any reason not to preserve the votes (e.g. voting fraud) before making a decision on whether to preserve votes (transfer them to the Community user) or invalidate them as normal.  Recently, I've come across two documented cases (, can't find the link to the other) where, after waiting a full week after the deletion timer said their account would be deleted, the account still hasn't been deleted. It would be nice to have more insight into the background process behind this procedure, including how often the queue of users awaiting vote inspection for deletion is checked, and how long it takes for the actual investigation.  Also, what if a user cancels the deletion during this delay? Will the deletion be cancelled, or will it still be carried out since they let the original timer lapse after 24 hours?  Finally, if a user who's deletion is "stuck in the mud" contacts SE, will it expedite the request or will it just hold it up further? It used to be that hold-ups for vote inspection would cause the deletion notice to temporarily disappear (as if it were cancelled), and re-requesting deletion would prolong the process.


If $a, b, c$ are distinct real numbers, prove that   $(\frac{a}{b-c})^2+(\frac{b}{c-a})^2+(\frac{c}{a-b})^2 \geq 2$  I thought of using AM-GM but that is surely not getting me anywhere ( Maybe some step before i can do AM-GM ?)  I thought of applying AM-GM but that clearly doesnt give anything. Then i thought if a assuming \txtWloga>b>c, that would make the first time greater than 1 so if only i could show that the sumof the other two terms is ≥1 i'd be done but ofc i couldn't progress further from there.   Thanks.


How can I install an app given only its APK file?

I downloaded the APK file for an app to my PC.  How can I install it on my phone?


a construction of a continuous function from a normal space to [0,1]

Let $A$ be closed in $X$ , where $X$ is a normal space, and $A$ is also a countable intersection of open sets. Prove that there exist a continuous function such that $$ \eqalign{   & f\left( x \right) = 0\,\,\text{ if }\,x\, \in A  \cr    & f\left( x \right) > 0\,\,\text{ if }\,x \notin A \cr}  $$ EDITED: I mean intersection, sorry


Firefox spellcheck settings keep changing

The spell-check language setting on Firefox keeps changing to en_CA rather than the default of en_US. I change it back but it invariably flips... maybe in a few hours, maybe a few days. (It's hard to tell exactly) Nothing else on my system is Canadian, I don't know where it gets the idea.  At some point I suspected the profile: the wrong setting was in the profile but the profile was getting corrupted somehow so my changes weren't being saved. I started a new session, changed the settings, and closed the browser down to let it save the profile correctly. On restarting I was happy to see that it was correctly using US English, but then saw it flip back to Canadian.  My system is Ubuntu 12.08 with Firefox 18.


What is the difference between functional relationship and functioning relationship?

What is the difference between    functional relationship  functioning relationship


Since installing Fall Creators Win 10 final release after various Insider releases, I find my PC takes a couple of minutes to boot from power on. The hardware is the same but earlier Win 10's were a lot faster.   My specs are here


How do I remove unwanted kernels in my 12.x machine  sudo update-grub Generating grub.cfg ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Found linux image: /boot/vmlinuz-3.13.0-96-generic Found initrd image: /boot/initrd.img-3.13.0-96-generic Found linux image: /boot/vmlinuz-3.13.0-93-generic Found initrd image: /boot/initrd.img-3.13.0-93-generic Found linux image: /boot/vmlinuz-3.13.0-35-generic Found initrd image: /boot/initrd.img-3.13.0-35-generic Found linux image: /boot/vmlinuz-3.11.0-26-generic Found initrd image: /boot/initrd.img-3.11.0-26-generic Found linux image: /boot/vmlinuz-3.8.0-44-generic Found initrd image: /boot/initrd.img-3.8.0-44-generic Found linux image: /boot/vmlinuz-3.5.0-61-generic Found initrd image: /boot/initrd.img-3.5.0-61-generic Found linux image: /boot/vmlinuz-3.5.0-18-generic Found initrd image: /boot/initrd.img-3.5.0-18-generic Found linux image: /boot/vmlinuz-3.2.0-68-generic Found initrd image: /boot/initrd.img-3.2.0-68-generic Found linux image: /boot/vmlinuz-3.13.0-96-generic Found initrd image: /boot/initrd.img-3.13.0-96-generic Found linux image: /boot/vmlinuz-3.13.0-93-generic Found initrd image: /boot/initrd.img-3.13.0-93-generic Found linux image: /boot/vmlinuz-3.13.0-35-generic Found initrd image: /boot/initrd.img-3.13.0-35-generic Found linux image: /boot/vmlinuz-3.11.0-26-generic Found initrd image: /boot/initrd.img-3.11.0-26-generic Found linux image: /boot/vmlinuz-3.8.0-44-generic Found initrd image: /boot/initrd.img-3.8.0-44-generic Found linux image: /boot/vmlinuz-3.5.0-61-generic Found initrd image: /boot/initrd.img-3.5.0-61-generic Found linux image: /boot/vmlinuz-3.5.0-18-generic Found initrd image: /boot/initrd.img-3.5.0-18-generic Found linux image: /boot/vmlinuz-3.2.0-68-generic Found initrd image: /boot/initrd.img-3.2.0-68-generic Found memtest86+ image: /boot/memtest86+.bin done


Is it possible to run ArcGIS 9.3 python script for ArcGIS 10.3?

I need to translate python 2.5 script for ArcGIS 9.3 to python 2.7 for ArcGIS 10.3.   Our office has now all computers with ArcGIS 10.3. So, I need to translate these scripts to arcgis 10.3.  Could anyone give me some information please?


Why is main method not getting called same no. of times recursively in java every time it is executed?

When I tried to run this program  couple of times the final value of i is 11407, 11417, 11400 etc. before displaying stack overflow error. Why is the final value of i not same every time this program is executed?  public class MainRecursive {     static int i=0;      public static void main (String arg[])     {         i++;         System.out.println(i);          main(arg);     } }


Invoke method with generic expression and action as parameters

I need to call a method that looks like this:  public bool DoSomething<TEntity>(Expression<Func<TEntity, bool>> expression, Action<TEntity> action) where TEntity : class   However TEntity is only known at runtime.  I know how to Invoke the method like this:  Type classType = GetType(); MethodInfo mInfo = classType.GetMethod("DoSomething", BindingFlags.Public | BindingFlags.Instance); MethodInfo genericMInfo = mInfo.MakeGenericMethod(GetMyType()); Object result = genericMInfo.Invoke(this, <WHAT GOES HERE>);   As you can see i don't know what to pass into the function. And thats the diffrence to  where a method without parameters is called.  Is there any way i can do this?  EDIT: Full Example  using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection;  namespace Example {     public class Program     {         static void Main(string[] args)         {             var example = new Example();              // Type know at compiletime:             example.DoSomething<MyClass>((obj) => obj.Number > 2, (obj) => obj.Number = 500);              // Type not know until runtime. Might be MyClass, MyOtherClass or MyNextClass             Type classType = example.GetType();             MethodInfo mInfo = classType.GetMethod("DoSomething", BindingFlags.Public | BindingFlags.Instance);             MethodInfo genericMInfo = mInfo.MakeGenericMethod(GetMyType());              var result = genericMInfo.Invoke(example, new object[] { /* Expression<Func<TEntity, bool>> and Action<TEntity> */ });             // My problem now is how to create this Expression and Action even if i know TEntity only at runtime         }          static Type GetMyType()         {             // Imagine some user-input or any other dark magic here. For the example i`ll just return a type             return typeof(MyOtherClass);         }     }      public class Example     {         public bool DoSomething<TEntity>(Expression<Func<TEntity, bool>> expression, Action<TEntity> action) where TEntity : MyClass         {             // Real code does something more useful, but its the same principle             var myList = new List<TEntity>(GetItems<TEntity>());              if (myList.Count > 0)             {                 var entry = myList.AsQueryable().Where(expression).FirstOrDefault();                  if (entry != null)                 {                     action(entry);                      return true;                 }             }              return false;         }          private IEnumerable<T> GetItems<T>()         {             // Real code does something diffrent             for (int i = 0; i < 5; i++)             {                 yield return (T)Activator.CreateInstance(typeof(T), i);             }         }     }      public class MyClass     {         public MyClass(int number)         {             Number = number;         }          public int Number { get; set; }     }      public class MyOtherClass : MyClass     {         public MyOtherClass(int number)             : base(number++)         {         }     }      public class MyNextClass : MyClass     {         public MyNextClass(int number)             : base(number--)         {         }     } }


I've been working on providing power for high current applications for my project. I'm working on a project with high current (or at least compared to what I'm used to...)  What a lot of people point to online is tables that you can look up the resistance for AWG per foot, and then you can calculate the current drop of your wire. However, with that current drop, how much of  a voltage drop will make my wire "too hot" and risk a fire? Am I looking at this the wrong way? How do I calculate the temperature of the wire and decide when it'll be too hot, and I should use a thicker wire?


Finding the acute angle between the planes $x-3y+2z=14$ and $-x+y+z=10$

The two planes in this image form an acute angle. What is its value?     Well, that's a confusing drawing. I don't even know why are there two $\theta$s there (or what do $S_1$ and $S_2$ even mean). Anyway, here are the equations:  $$x-3y+2z=14\\ -x+y+z=10$$  The angle is  $$\cos^{-1}\left(\frac{(1,-3,2)\cdot(-1,1,1)}{||(1,-3,2)||\cdot||(-1,1,1)||}\right)$$  That's like $107.97$ degrees. That's clearly not acute. Did I do something wrong?


I want to know the exact difference between questions marked as duplicates vs. merged questions. For example, I think answers are also redirected to the original question with which a second question is merged, whereas if it is marked as a duplicate, then this is not the case.  I want to know all differences between them and why both are displayed as [duplicate], or why [merged] is not used. Which (mark-as-duplicate or merge) is used and when?


Windows batch command(s) to read first line from text file

How can I read the first line from a text file using a Windows batch file? Since the file is large I only want to deal with the first line.


Is a visa needed for layover or getting to the connecting flight?

I have a South African passport (valid until 2021) and a Portuguese passport valid until 13 Feb 2018. I am flying to Cape Verde via Paris and Lisbon, with short layovers on both. Do I need to apply for visas if I am not leaving the airport and just walking to the connecting flight check-in areas?


How to encrypt a file or directory in Linux?

What's the most popular command to do such things as encrypting a file or directory in terminal in Linux?


I'm trying to prove that Aut $\mathbb Z_p\simeq \mathbb Z_{p-1}$ (p prime).  I know that Aut $\mathbb Z_p$ has $p-1$ elements because $\mathbb Z_p$ has $p-1$ possiblities of generators, so intuitively I see Aut $\mathbb Z_p\simeq \mathbb Z_{p-1}$, but I couldn't prove it formally.  I'm trying to build an isomorphic function, but I don't how to do it.  Am I in the right way? Maybe I'm forgetting some trick or something.  Thanks


How to calculate Maximum or Minimum of two numbers without using if?

How to to calculate the maximim or minimum of two numbers without using "if" ( or something equivalant to that manner)?  The above question is often asked in introductory computer science courses and is answered using .  Now although it is not obvious, but using absolute value is also equivalant to using an if statement e.g. defining Max(a,b) = a if a>b else b;  Besides using limits, is there another way of finding the maximum or minimum of two numbers?


Switch batteries in Thinkpad before performing a deep discharge

I'm currently looking for a possibility to stop my T480 from deep discharging my external battery, before switching to the internal battery. It should switch to the internal battery at a percentage of about below 7%.  Optionally this should be combined with an automatic hibernate as soon as the internal battery reaches a certain threshold.  So my questions are:   Is there an existing solution to automatically switch batteries before deep discharging them, which also automatically hibernates if a certain threshold is reached. If there is not, is there a way to manually switch between batteries?   It is possible to write a custom script which checks every few seconds whether the batteries reached the thresholds to switch batteries/hibernate. But for this to work, I would still need a command to manually switch batteries.


How can I write a quick and dirty interpreter?

I have an interview where one of the areas I was told I might brush up on is "dynamic programming languages".  So I figured I might spend this weekend writing one to bring as sample code.  :-)  Of course, given the time constraints, I plan on writing something very basic and preferably using a language and/or toolset that will make it extremely easy to do.  Most of my experience is in Python, but I'm willing to spend a little time learning something new if it will make the task easier (and won't take too long).  Does anyone have any advice for me in terms of tools or languages that will make this easier?


Can Windows XP run with just 512 MB of RAM?

I have heard of older-ish Lenovo Ideapad notebooks that come with barely 512 MB of DDR2 RAM and they run full Windows XP, which is supposedly in need of over 400 MB of RAM to work efficiently. Given that OS uses that much, how little would be available for other apps?  This is what I heard:  Windows 95/98 can run on at least 8 MB of RAM.  Windows 2000/ME need over 100 MB.  Windows XP needs over 400 MB for efficiently; possibly can run under it though.  Windows Vista/7 need over 600 MB.  Windows 8 needs pretty much 1 GB itself, no questions asked.  Non-Windows:  OS X Snow Leopard/Mavericks/Mountain Lion demand over 800 MB of RAM.  Ubuntu Linux 12 and up need at least 350 MB of RAM.  Android Gingerbread generally needs over 80 MB of RAM, considering various builds of it.  iOS 7 only needs 100 MB of RAM, so it usually leaves 400 + MB to the rest of programs.  Blackberry 10.1 uses 200 MB of RAM.


Unable to shrink transaction log file in SQL Server

I moved to a new company recently wherein they have 2 databases in a SQL server of size 20-25 GB. I'm unable to shrink the log file of the databases. Transaction log backup of the databases are set to run every 30 mins from 6 AM-7PM. They are of size 10 and 2 Gb respectively. I tried to shrink it around 8-9 PM last night but I was not able to do.  The log_reuse_wait column stated it's waiting on a log_backup. I tried taking couple of log backups which didn't help. I ran DBCC OPENTRAN but there are no open transactions.  Also, this morning even after the Tlog backups started at 6:00 AM till now(10:30) it still shows LOG_BACKUP in log_reuse_wait column. And no OPEN TRAN as well.  When I researched on this I found this article from Paul Randal:   It states that if the DB is small and all the content of tlog file is in same VLF it couldn't truncate. I have some 300-400 VLFs in the Databases. So that doesn't make sense here as well.   One thing I noticed that every morning at 6 AM the tlog is a little bigger than the other ones. So I'm thinking to check with the lead DBA to run tlog round the clock. Other than that, I would like to see why is this happening and Am i missing anything.  I tried to shrink with the below command:  Use DB1 go DBCC SHRINKFILE(2,10)  GO   Note: It's SQL 2012 instance running 0n 2012 compatibility


Intuitive explanation for why reflected waves change phase by $π$?

I have seen the equations that show the coefficient of reflection etc.  But I'm searching for an intuitive rather than solely mathematical explanation for why waves change phase by π when reflected (eg- from a solid wall)?


Review-needed indicator is trigger happy

Since I recently gained 2K, and quickly thereafter 3k reputation here on MSE the review queues became accessible to me. Every now and then I check on them to see if there is something that needs reviewing.   When I notice a red icon I'm under the impression that there are a lot of reviews to be done, but every time I get disappointed when after 1 review the queue is empty again. So I decided to look for the logic behind the different states of the review-needed indicator, which led me to . In which there is stated that the default values for the red button are:   Queue                 Default -----          --------------   Close                      20 Reopen                      5 Low Quality                 4 Suggested Edits             3 ....                      ...    Apparently this isn't the case, so what exactly causes the review-needed indicator to turn red the instant there is a review item?  Secondly, is it desirable that there is always a red flag, instead of the gray flag when there simply is something to review.  Regarding the suggestion that a filter might limit the amount of review tasks available:   In that case there is a message displayed:      There are no items for you to review, matching the filter "[discussion]"


Using Binomial Theorem to prove the following

$$\large\sum_{j=0}^n (-1)^j {n\choose j}={n\choose 0}-{n\choose 1}+.....+\pm{n\choose n}=0 $$  I'm confused by the last part of the equation $\pm$. it seems imply that the sum would be equal to 0 no matter the $n$ is even or odd ?


How to enter special characters like "&" in oracle database?

I want to insert special character & in my insert statement. My insert is:  INSERT INTO STUDENT(name, class_id) VALUES ('Samantha', 'Java_22 & Oracle_14');   If I try to run this query I am getting a popup and it asks me to enter value for Oracle_14.   How can I enter special characters like & in the insert statement for oracle db?


Change html structure of all img tags in Wordpress

I have a Wordpress blog and am trying to implement the  image script. In short, I need to target all post images, swap out the src, width, & height attributes with data-src, data-width, & data-height attributes. I then need to duplicate the image line and wrap it in  tags. This is the structure I'm trying to have Wordpress generate/create:            I have searched the Wordpress codex and the best possible route I can find are to use filters (ie. 'get_image_tag' & 'image_tag') for modifying the html that Wordpress outputs for each image. I'm thinking that one of these options should work, or that I can do some pattern matching with regex (I know, not ideal), throw in a preg_replace and then inject this back into the_content filter.  I have tried some of these options but cannot get any to work. Could someone please offer some help? Found one suggestion , but can't even get it to work!  'get_image_tag' attempt:  Found this particular one on the web, but it would need modified to fit my logic (see above structure)...can't make sense of what the preg_replace array is doing on my own.  <?php function image_tag($html, $id, $alt, $title) {     return preg_replace(array(         '/'.str_replace('//','\/\/',get_bloginfo('url')).'/i',         '/\s+width="\d+"/i',         '/\s+height="\d+"/i',         '/alt=""/i'     ),     array(         '',         '',         '',         alt='"' . $title . '"'     ),     $html); } add_filter('get_image_tag', 'image_tag', 0, 4); ?>   Another 'get_image_tag' attempt:  <?php function get_image_tag($id, $alt, $title, $align, $size='full') {     list($width, $height, $type, $attr) = getimagesize($img_src);     $hwstring = image_hwstring($width, $height);      $class = 'align' . esc_attr($align) . ' size-' . esc_attr($size) . ' wp-image-' . $id;     $class = apply_filters('get_image_tag_class', $class, $id, $align, $size);      $html = '';     $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size);      return $html; } ?>   Pattern-matching attempt:  Tried creating my own regex on this one, but not sure if it's correct.  <?php function restructure_imgs($content) {     global $post;     $pattern = "//i";      list($width, $height, $type, $attr) = getimagesize($2$3.$4$5);     $hwstring = image_hwstring($width, $height);      $replacement = 'post_title.'" data-width="'.$width.'" data-height="'.$height.'" class="fs-img"$6>';     $content = preg_replace($pattern, $replacement, $content);     return $content; } add_filter('the_content', 'restructure_imgs'); ?>   Unfortunately can't get any of these examples to work. Any help or sharing your pre-written scripts/functions would be much appreciated! Thanks for helping a student learn!!


Firefox: open downloaded files with system default application

When I download a file with firefox, it always asks me with what program I want to open it with, even when that type of file is recognized by the system, and I can double click on it in Nautilus and have it open properly.  This is an example with a deb file, which opens with Ubuntu Software center (as it should) when I double click on it in Nautilus.    I do not want to look for the required program in /usr/bin or whatever in the Firefox dialog, I want Firefox to recognize my system preferences. What I resort to doing now is choose "Download", open Nautilus and double click on the file...  Why can't Firefox recognize my system settings, and how do I get it to?  Thanks!


Limit of $\dfrac{t}{\ln(1+t)}$ without L'Hospital

I'm trying to prove: $\lim_{t\rightarrow 0} \dfrac{t}{\ln(1+t)}=1$ without use L'Hospital and derivate, because I still do not define derived from the logarithm, is there any way to prove it by the definition epsilon-delta? So far I have only defined $\log$ as the inverse function of $a^{x}$ and particular case $a = e$ although the latter is proposed very weak, it may be improved later using integrals, some help thanks in advance.


SQL Server : query for comma separated with group by

I have two tables, one for country an the other for the city, and I want a query to get the country with all the cities in a comma-separated which grouped by the countries.  Note:   The second table has a foreign key Fk_CountryId from the primary key of the first table CityId which is a primary key I am using SQL Server    The first table Country looks like this  CountryId | CountryName  ----------+-------------     1     | USA      2     | UK     3     | Germany   The second table City looks like this  CityId | CityName   | Fk_CountryId -------+------------+------- 1      | Los Angeles|   1 2      | Boston     |   1 3      | Cambridge  |   2 4      | Chester    |   2 5      | Berlin     |   3 6      | Hamburg    |   3   The expected DataSet:  CountryId | CountryName  | CitiesNames ----------+--------------+---------------------- 1         | USA          | Los Angeles, Boston 2         | UK           | Cambridge, Chester 3         | Germany      | Berlin, Hamburg


I‘d like to find the limit . $$\lim_{n\to\infty}(1+x)(1+x^{3})\cdots(1+x^{2n+1}),|x|<1$$ But I have no way to simplify the formula.If the powers are even,it will be easy to simplify it.Any help will be thanked.


Storyboard animation based on control template's control property

This is what I have    A ControlTemplate for a button in my window.resource, having an ellipse with an outerglow (named -- TasksToggleButtonOuterGlowBitmapEffect) and a text A button that is using this template   This is what I need  1. A storyboard that operates on the outerglow of the above mentioned ellipse 2. I shall trigger this storyboard from my codebehind file at any moment  When I tried this with the following snippet, the framework gives me a runtime exception stating that it is not able to find the control, TasksToggleButtonOuterGlowBitmapEffect  <Window.Resource>     <ControlTemplate x:Key="DefaultTasksToggleButtonTemplate" TargetType="ToggleButton">         <Grid Margin="2">             <Border BorderBrush="White" BorderThickness="2" CornerRadius="20">                 <Border.BitmapEffect>                     <OuterGlowBitmapEffect x:Name="TasksToggleButtonOuterGlowBitmapEffect" GlowColor="LightGray" />                 </Border.BitmapEffect>             </Border>             <Ellipse Fill="Red" Width="20" Height="20" Margin="2" />             <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />         </Grid>     </ControlTemplate>       <Storyboard x:Key="GlowStoryboard">         <DoubleAnimation Storyboard.TargetName="TasksToggleButtonOuterGlowBitmapEffect" Storyboard.TargetProperty="GlowSize" From="5" To="10" />     </Storyboard>  </Window.Resources>   Update -- I want this to be in the resource so that any button can use it


Recently on Stack Overflow I got privilege to flag a post. So when I try to flag a post as duplicate. The diaglog box is not properly loading.         However I am easily able to use other flag option like "other","spam" or "offensive".   "other"        "spam"        "offensive"        I am using Google Chrome Version 28.0.1500.71 and Win XP Operating System. I have tried in firefox as well but it is showing me same problem.


How can i convert IPv6 to long like we do for IPv4 using ip2long?

I have IP database for a certain country. I have paid version of Ip2Lcoation and i got all the IPv6 ranges and IPv4. In my web app I am converting all the IPs to long using ip2long function. It works perfectly with IPv4 but with IPv6 it fails? i searched and found few functions which didn't work. My Code is as follows if (!empty($_SERVER['HTTP_CLIENT_IP'])) {         $ip = $_SERVER['HTTP_CLIENT_IP'];     } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {         $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];     } else {         $ip = $_SERVER['REMOTE_ADDR'];     }               $long = ip2long($ip);// fails at IPv6     //mysql query to check the ip ranges     $cri= new CDbCriteria();     $cri->condition="$long>=ip_range_start AND $long<=ip_range_end";     if (UsaIps::model()->exists($cri))     {        return true;     }     else     {         return false;     }  How can i achieve this ?? Any guide any help??


I have a new hp laptop 4cell battery I am confused about using battery and charging it I have read it is not suitable to keep it pluged in all the time but where I live it has power fluctuation sometimes and it is not convenient to take in and out the battery every time so please suggest a good way to use laptop battery and to prolong its life is it better to be plugged in even after reaching 100% charge or is it better to charge it to say 85% then discharge it till 30% then again charge it??


Converts a Fahrenheit degree to Celsius in java

I am trying converts a Fahrenheit degree to Celsius.Now I have a Error,When I use this:  double fahrenheit=input.nextDouble();  double celsius= ( **5** /9)*(fahrenheit-32);(Error)   Then again I am trying given (5.0) then it is work why?


the series of terms $\frac{1}{P_n}$, where $P_n$ is the $n^{th}$ prime number, is divergent, I know only one proof using logarithm, is there another proof?


I'm trying to run a jquery script for my Drupal 8 site, but in the error console, I get a TypeError: $ is not a function. I know this usually happens when jQuery isn't loaded, but the jquery.min.js is loaded fine. Is it loaded too late? Do I perhaps need a wrapper?  In my theme.libraries.yml, I have the following:  global-styling:   version: 1.x   css:     theme:       css/style.css: {}   js:     js/script.js: {}   dependencies:     - core/jquery   My script is simply  $('#some-element').on('click', function() {   // Do something }   I would think this is all I need, or am I overlooking something?  Edit:  I don't think this is a duplicate question since:   This is Drupal 8 The dependency is defined in the libraries file. I would think this would take care of exactly the problem described in the other question.


nsurlsessiond wasting my limited data plan

I am a cross-platform developer working on both android and ios platforms. For my ios development i used Xcode with ios simulator to make my work easy, and i got a new pc to work with. Whenever i tried to run Xcode with my build running on a simulator, the data is just flowing in and out like a river. I tried many things, and even removed the apple id and related accounts from my PC, but of no use.   nsurlsessiond takes on GB's and i dont know what it takes from me. Is there any way to get rid of this data eating monster so that i can work peacefully??


Co-authorship just because a Professor provides me the employment?

I am a postdoc at a European University. However, I am planning to quit my postdoc in a month or so since the research environment and the city life is not to me liking.  Also, I work with a Professor who is very polite, but also very busy with meetings. My salary comes from the project he administers, so he is the boss of the organization and the project.  For the past four months I have been working on a problem day and night including weekends as I found the problem very interesting and challenging. The theoretical part of the work is complete. It is a "complete" solution. He had NO contribution at all in this. Not even a single email exchange. He is too busy with meetings all the time. He is in the department twice a week for two to three hours at a time. I am also managing his master student as he has no time.   He is definitely polite and nice though, but I have not received any input from him other than giving me printed research papers. But he always asked me to give him the PDFs of lengthy derivations which I did. But I am dealing with analytical/numerical Navier-Stokes equation and its variations, so you can imagine how much terse that is. He has the entire theory now with him from my work. He may have been a good researcher in the past but no contribution to this work. And he had no proper publication in the work that I am doing so I am not sure how much he can contribute in writing the paper.  Now remains the numerical part which I believe I can do in next 2/3 weeks. And I have the ability to write the paper by myself when I have the numerical solution.  I talked to him and asked if I can work for him based in another city. He said if it is a week visit, that is fine, but not otherwise. He said it clearly that "I will not pay you to work somewhere else."  I still have a cordial relationship with him. No worries on that part. So, I am going to leave the place and the position in a month or two for sure.  So, he gains co-authorship just because he has the authority to provide employment? What should I do? Please help. I could have continued to live in the city though it was little boring for me, provided I was able to get inputs from my collaborator, or if he had given me necessary freedom to collaborate with other researchers, which he hasn't.    Update 10th June, I have resigned now. This problem has evolved into a new stage. Please post your replies there:    and


Following this tutorial     and trying to use the command  echo 'prefix=/usr/local' > node/etc/npmrc   however I get a permission denied error, even when using sudo.  Any ideas?


How do we prove that something is unprovable?

I have read somewhere there are some theorems that are shown to be "unprovable". It was a while ago and I don't remember the details, and I suspect that this question might be the result of a total misunderstanding. By the way, I assume that unprovable theorem does exist. Please correct me if I am wrong and skip reading the rest.  As far as I know, the mathematical statements are categorized into: undefined concepts, definitions, axioms, conjectures, lemmas and theorems. There might be some other types that I am not aware of as an amateur math learner. In this categorization, an axiom is something that cannot be built upon other things and it is too obvious to be proved (is it?). So axioms are unprovable. A theorem or lemma is actually a conjecture that has been proved. So "a theorem that cannot be proved" sounds like a paradox.  I know that there are some statements that cannot be proved simply because they are wrong. I am not addressing them because they are not theorems. So what does it mean that a theorem is unprovable? Does it mean that it cannot be proved by current mathematical tools and it may be proved in the future by more advanced tools that are not discovered yet? So why don't we call it a conjecture? If it cannot be proved at all, then it is better to call it an axiom.  Another question is, how can we be sure that a theorem cannot be proved? I am assuming the description might be some high level logic that is way above my understanding. So I would appreciate if you put it into simple words.  Edit- Thanks to a comment by @user21820 I just read two other interesting posts,  and  that are relevant to this question. I recommend everyone to take a look at them as well.


How would I write a voice object for the following code?

So far, I am planning to simulate a CAD system on a city bus. I am in the beginning phases of it which is just to basically create the voice. I at this point have no experience with creating voice objects. My question is, how would I create a voice object to read off the following messages?  import java.util.*; import java.io.*;  public class message {   public static void main(String[] args) {     Scanner input = new Scanner(System.in);     String message = "";     System.out.print("Please enter a number between 1 through 5");     int num = input.nextInt();     if (num == 1)       message = "Please do not use profanity on the bus";     if (num == 2)       message = "Help us get you there faster. If able, please use the rear exit";     if (num == 3)       message = "Please remember, seats are not for feet.";     if (num == 4)       message = "Thank you for using headphones, also please keep your cell phone conversations quiet.";     if (num == 5)       message = "Please do not speak with the driver while the bus is moving.";     System.out.println(message);   } }   So far, I set this up to print it on the LED display, I am trying to figure out still how I would incorporate the voice into this system for it to say the messages whenever I select one. Any help would be appreciated.


I have read a few articles and watched some Youtube videos explaining the algorithm of RSA. It seems that RSA is mainly based on a mathematical trick (Prime Factorization). I am wondering though what's the relation between both Prime Factorization and Prime numbers distribution law? and also what would be the sort of RSA if someone could figure a mathematical solution for Prime numbers distribution (e.g: unsolved Riemann hypothesis)?


How to print a String object within a String in Objective C

I have a String object:   NSString* name = @"John Smith";   and another String object:  NSString* intro =@"Hello this is ";   I want to be able to change the name from the UI make it within the introduction, so I tried:   _introduction = (@"Hello this is, %@", _name);   However, only the name is getting printed when I do:  NSlog(@"%@",_introduction);   I want both sentences to be printed by printing the intro object.


$x^p - x+ a$ is irreducible in $\mathbb{F}_p [x]$ if $a\neq 0$

I want to show that $f(x)=x^p - x+ a$ is irreducible  in $\mathbb{F}_p [x]$ if $a \neq 0$. I know that if $b$ is a root of $f$, then $b+1$ is also a root of $f$. Can I use this fact to prove that $f$ is irreducible? Any hints or reference are appreciated.


How to check which criterias are not met while submitting for Approval?

When we try to submit an record for approval, it shows the criteria are not met, but it doesn't show which criterias are not met. How can we find which criteria are not met by the particular end user on the record?


What does the "upgrade" from a credit limit to a "credit access line" really mean?

I've just received a letter from Chase saying that my card has been upgraded to no longer have a credit limit, but a "credit access line" (which they can continue to "refer to credit access line [sic] as credit line or credit limit").  Several articles online mention this as a sneaky trap, but what exactly is the problem for someone who checks their spending regularly? Are charges over some limit incurring a higher interest? The only "danger" I've seen is that the card member might be spending more than if they had hit the limit, but I never hit the limit anyway.


Is there any way to have multiple text formats in a single qgis label?  I am making a map that shows mountain summits.  Many of these summits have more than one name and I would like to show each name in a label and have each name rendered with different formatting to show what type the name is.  For example, summits, in the US, often have an "official" name from the GNIS database, a name as shown on a 1:24000 USGS topo map (often just the elevation of the summit), and a local nickname.  I would like to be able to have a label that renders each name in a different type font and/or font size.


The number of elements in a conjugacy Classes

I have this group $$G= \left\{ A = (a_1 ,a_2,a_3) \in GL_3(\mathbb{C}) :a_i \in \left\{\pm  \pmatrix{1 \\ 0\\ 0} , \pm  \pmatrix{0 \\ 1\\ 0} , \pm  \pmatrix{0 \\ 0\\ 1} \right\} \right\}.$$ I know that This group is an product of cyclic group (-+1) with S3, so while I'm checking the conjugacy classes to this group, I got stuck of found the number of the elements in the classes that map to elements of order 2 ,their conjugate must be $\left(\begin{array}{ccc}0&*&0\\*&0&0\\0&0&*\\ \end{array}\right)$ the determinant is + or - 1, I know the order of the elements is 2 or 4, and there’s  4 classes from this kind of map, but I get stuck of found the number of the elements of the 4 classes how can I found it, I thought that I must have for least 8 elements but its wrong I’ll be thankful for help.


So in a normal distribution, we have two parameters: mean $\mu$ and variance $\sigma^2$. In the book Pattern Recognition and Machine Learning, there suddenly appears a hyperparameter $\lambda$ in the  regularization terms of the error function.  What are hyperparameters? Why are they named as such? And how are they intuitively different from parameters in general?


Write a program to find out whether a given post is talking about "harry" or not using Python?

So I am just starting to learn Python by watching some tutorials. In that tutorial he said to solve this question by using if else statements. But there is an issue that is the text "harry" can be in any order like upper case lower case  for ex: "Harry", "HaRrY" "Harry". So I can't figure this out how to solve this. I just came this far. Below is the code I did so far. post = input("Enter a post: ") if ("HARRY" in post):     print("Yes! the post contains the name Harry.") elif ("harry" in post):     print("Yes! the post contains the name Harry.") else:      print("No! the post does not contain the name Harry")


Joining 2 vector pieces of one country into one vector polygon using QGIS?

How to eliminate seam on meridian 168W. Seam is on Russia and Antarctica?    I have done my projection in this way:


How can I tell what version of Windows Remote Desktop Protocol that I have installed?

My eventual goal is to use RemoteFX, which I understand is in RDP8. However, I may already have RDP8. How can I tell which version of Remote Desktop Protocol I'm using?


How to avoid "completely" dark shadow using directional light (as Sun) ?

Look at my scene:     Sun is rising and as you can see the scene is realistic; I mean, that what is in shadow is almost completely dark. This is correct, but i would like something less "dark", like an HDR.  These are some parameters i'm using:     This is my unique Light in scene (Sun):     I'm using also a Post-Processing profile with "Eye Adaption" unflagged.  Can you suggest me what i've to change to make my object affected by shadow less.. dark ?   Thanks


Can I carry One office laptop, one personal laptop and one Surface tablet?

I am returning from US to Bangalore. I was travelling on B1 Visa. While going to US, I was carrying one Laptop from Office. I have ID for this Laptop as well.  In US I have purchased a Laptop ($399) and one Surface Tablet($199). Will I be charged in the customs? If yes, How much?


dtrace errors when running opensnoop in El Capitan

In order to diagnose slow terminal interaction (which turned out to be an unrelated problem), I ran sudo opensnoop and saw output like this:   I assume this has to do with SIP in El Capitan. Is it something to worry about? How can I dig deeper to understand what the probe IDs correspond to and what processes are causing the errors? What is the action #?


Does it takes longer to cycle a route with a mountain on it comparing to the same distance without a mountain? What is the cause of that?

Imagine you cycle 100km. On one route there is a mountain 100meter high on an other route is not a mountain but a straight way.  Usually it takes longer on the route wiht a mountain. One reason for that is that the time you spend going up the mountain is far more longer than going down. So at average you will go slower.  But how is it possible that with a moutain where the advantage of going downwards is equal to the disadvantage of going upward, at least regarding the objective obstacle.  Perhaps has something to do with the human body, but I can't see how this works.


A word for non-supernatural “superstitions”?

I’m talking about widely held beliefs that are perceived to be rooted in science or what is falsely believed to be rooted in science, but are perhaps overgeneralized or taken out of context to the point they are pseudoscientific.   Things like:  Birds/rabbits will reject their young if they smell that a human touched them.   The human body isn’t designed to drink cow’s milk and it’s bad for you   “Chinese restaurant syndrome” due to MSG  Boiling water in the microwave is somehow worse or more dangerous than using a kettle.   Gluten is bad for you, widespread belief in gluten sensitivity   Cellphones can cause cancer due to radiation they emit.   Swimming right after you eat can be dangerous   Any amount of chocolate or grapes/raisins are ‘poisonous’ to dogs


How do power grids keep AC frequency synchronised across long distances with multiple generators?

Let's consider a simplified electricity grid - say there are two power plants (A and B) 1000km apart. There's a town (L1) half way between them, and another town (L2) some distance downstream from B. The time taken for the electricity to travel from A to B is about 1/300th of a second, so that would put A's output 1/5th or 1/6 of wavelength out of phase with (itself?) the time it's got to plant B. Does plant B synchronise to the plant A's phase as it is at plant A, or plant A's phase as it is when it gets to plant B? If the former (presumably using a global time source as the basis), then the two would be in phase when they reach L1, but not when they reach L2. If the latter, then they'd be in phase reaching L2, but not reaching L1.         – Schematic created using


Why include insignificant main term when interaction term is included?

Most of the statistics material suggest that when the interaction term is significant, even though the main effect term is not significant, we still keep the main effect term.  For example: $$z = a + b\cdot x + c\cdot y + d\cdot xy$$  $x$ is continuous while $y$ is categorical (two levels, $y_1$ and $y_2$). $z$ is continuous. The linear model fitted has a significant $xy$ term, intercept term and $x$ term but non-significant $y$ term.   Can I reduce the model to $z = a' + b'\cdot x + d'\cdot xy$ ? Interpretation is that for level $y_1$ and level $y_2$, they have the same intercept but different slope.   Thank you!


Is there a free realtime spectrograph available for Ubuntu?

On my home stereo I have a spectrograph that has a 2D matrix, whereby the X axis is the frequency (deep bass on the left, vocals in the center, treble on the right), and the Y axis is the volume or power of the sound at that frequency.  I have seen things like this for Ubuntu, but they work on MP3 files or other pre recorded songs.  Is there anything that can do this real time for a microphone attached or simply the system mixer?


How do I deal with my players not roleplaying at all?

I know I should "let them have fun" or something, but the game isn't really working. I'm GMing a pathfinder campaign, but this isn't system-dependent. My players aren't roleplaying at all. Ok, they don't metagame (also because I try to keep all the information that the player shouldn't know for me), but they just "play" the game. We sit around the table for 3 hours rolling dice but no one is actually roleplaying. It's fun, but it would be a lot better if they roleplayed correctly. How, as a GM, help them to improve their RPing skills without ruining their fun?  Even if I haven't directly told them the problem yet (I thought It could be unpolite or something) I've tried to add a lot of details to my games, a lot of interesting NPCs, a lot of rp encounters and I always describe the enemies attacks during combat (so I don't just roll, but they won't do it as well). But they always do the minimum roleplay possible. They talk to the NPCs without roleplaying at all.


Best way to signal no longer used (lost) key

I have an old PGP key for which I don't have the secret anymore, nor the revocation certificate, and when I created the key I did it without expiration date.  So I know, I have to move on, and so I did. I created a new key. Now I would like to somehow show in the keyservers that the key that the old key should not be used. I've read that to that purpose there are several approaches:   Create a key with a UID that warns about the deprecation and sign an old key with that. Designate revoke even without designated revoker grants on the old key to the new one. Sign the old key with the new one and then revoke the signature.    Which one is the most correct course of action to take, if any, and how do I do it? I wanted to do #2 but it gives me an error that no revocation key was found, I guess perhaps because I am not a designated revoker?


Why do certain sites require more reputation for privileges?

So, let's take Skeptics.SE for an example. You can become a trusted user when you acquire 4000 rep., not 20000  I was like, wow, so is it like this because of the lack of users on Skeptics.Se, as in, not so much as Stack Overflow or something?  Why do some sites need less reputation to be a trusted user?


How does going faster than light cause going backward in time?

I have read in many places that some virtual particles can "travel faster than light (1)" and thereby "go backwards in time (2)".   My question is about the connection between these two. I have always perceived this connection as follows:     If a thing can go faster than light, it leaves the image of now   behind so can witness the past. Like a thing has traveled from a star   to the Earth in 1 year, while the star is 2 light-years away.   Therefore this thing can see its past.      However, this thing is not in its original location anymore. And if it   tries to go there, even with infinite speed, can only land into the   future of its star. So it cannot interfere the history.   Is this what is meant by backward time travel when going faster than light?


how to send hyperlink from mail body using mailto

How to send Hyper Link in mail body. I am not able to send a link it is taken as a string. Using code:  string tempurl = "http://jcr.vidyoeval.ril.com/flex.html?roomdirect.html&key=j8XPnetS2l"; var mail_body = "mailto:" + "" + "?body=" + tempurl + "&subject=" + "Let us talk on JioHuddle";  // string mailto = string.Format("mailto:{0}?Subject={1}&Body={2}", "", "Let us talk on JioHuddle", tempurl); System.Diagnostics.Process.Start(mail_body);


How to switch off caching for usb device when writing to it?

I have problems transferring binary programs to a micro-controller prototype board when using ubuntu/kubuntu to mount the board via usb. With MacOS and Windows there are no problems. I have found the writing from Ubuntu definitely changes the written file. I suspect that the write caching is the problem. How can I disable it, or what else might be the problem.


Let A and B be two $ n\times n$ matrcies over the field F.Prove that if (I-AB) is invertible, then (I-BA) is invertible and that $  (I-BA)^{-1}=I+B(I-AB)^{-1}A $  Using this result prove that AB and BA have precisely the same characteristic values in F.  My Attempt: For the first part I tried to prove the contrapositive ie I assumed (I-BA)X=0 has a non trivial solution and tried to show a non trivial solution for (I-AB)X=0. I could show this by making use of the fact that AB and BA have same eigen values but that method becomes circular in this case considering the follow up question mentioned at the end.Anyway even using that AB and BA have same eigen values I could not prove the expression for the inverse.I would request a solution which can then be used to prove that AB and BA have same eigen values and also proving the expression for the inverse.


File Sharing a Routers Storage with Windows 10 requires SMB1 but

can  SMB1 be added back into Windows 10 AGAIN after it uninstalled itself?  The net has NO searches for "downloading" SMB1 but lots of  ENABLES. Can SMB1 be added back into Windows 10 for Router Storage sharing?   Having SHARED storage on my ROUTER to Windows 7/10 is more important than the risk.


Avoid line break when using \cite{} and biblatex

How can I enforce latex not to make line breaks of this form?  Assume, this code  First line~\cite{ref13,ref14,ref15,ref16,ref17}. Second line.   Produces the following output (line break because of the end of the line):  First line [13- 17]. Second line  While I would like to enforce smth like this:  First line [13-17]. Second line  I'm using biblatex. But I would also be interested to know the answer for the case of using the standard latex bibliography.  UPDATE  A brute-force solution, thanks to @koleygr:   \newcommand{\mcite}[1]{\mbox{\cite{#1}}}


I've been installing some software to a new VM today, and started wondering about the PATH variable. Some of the installation scripts I poked through would append to $PATH, and others would prepend $PATH. Personally, I've always just appended whenever I've needed to add to it.  Is there any functional difference between the two techniques, or is it just personal preference? My gut feeling is that it shouldn't make any difference.  Thanks!


Derivation of chi-squared pdf with one degree of freedom from normal distribution pdf

How can we derive the chi-squared probability density function (pdf) using the pdf of normal distribution?  I mean, I need to show that   $$f(x)=\frac{1}{2^{r/2}\Gamma(r/2)}x^{r/2-1}e^{-x/2} \>, \qquad x > 0\>.$$


Display only the element with no duplicate

How can I return only the element/s with no duplicate in the list?  e.g.  list = [1,4,5,1,5] to [4]


Does anyone provide proof  of $1+x\leq e^x$ for all $x$?  What is the minimum $a(>0)$  such that $1+x\leq a^x$ for all x?


How to 'power clip' images into an object in Illustrator

I've been working with Corel Draw previously and now i use Illustrator more.Still getting used to some of their features though. I want to insert an image into a circle I've drawn but i don't know how to go about it.It is called power clipping in Corel. Any answers would be appreciated.


difference between scultping and modeling

So I've been digging around and I keep hearing people talk about "scultping" and "modeling" like it's two different things. I understand that modeling is better for hard surfaces like weapons, furniture, and typically things that are made. While sculpting is more for organic things, like humans and animals/creatures.   Does this mean to create an animation I'd have to sculpt the characters and model everything else? Or can you model the character, sculpt it up to look nice and pretty and then animate that? I've heard some people say that they usually model a base mesh, sculpt it, and then remodel it again so it's suitable for animating but I'm entirely lost on how/why you'd basically "de-sculpt it".


I need to store postal codes in a database. How big should the column be?

I expect the column to be a VARCHAR2, in my Oracle Database.  US Zips are 9.  Canadian is 7.  I am thinking 32 characters would be reasonable upper limit  What am I missing?  [EDIT] TIL: 12 is a reasonable answer to the question Thanks to everyone who contributed.


What is the numb sensation in the mouth caused by some fruits called?

There are some fruits* that cause a peculiar (unpleasant) numb sensation in the mouth. An unripe  or a  are two examples that come to mind. I can't describe the feeling any more eloquently so my bet/hope is that you will know what feeling I am talking about.  Is there a word in English that describes the mentioned quality of these fruits and/or the sensation in the mouth?   *I don't know that only fruit can cause it, but I can't think of anything else at the moment.


Repairing old car vs buying new (used) one

My car just came from the inspection with a nice long list of repairs that have to be done to pass the main inspection for security (Hauptuntersuchung). The repairs sum up to something between 1500€ if only the absolut minimum is done up to 4000€ in the worst case for all (optional) repairs. The car is a Golf 5 from 2005 with nearly 220000 km and probably around 1500€-2000€.   From a financial viewpoint, is it wise to invest in the full repairs, only repair what is necessary, or buy a used car (2-5 years old, 50000-100000km, 8000€-10000€) and sell the old one, provided the funds are readily available?


For almost any program installed with apt, we can access its man pages with the command man program_name. Is there an equivalent to access the man pages of a program coming from a snap package ??!!


In my textbook, we have the following truth table:   $P$ true and $Q$ true means that "$P \implies Q$" is true. $P$ true and $Q$ false means that "$P \implies Q$" is false. $P$ false and $Q$ true means that "$P \implies Q$" is true. $P$ false and $Q$ false means that "$P \implies Q$" is true.   I'm confused by what this means? I don't see why $P$ true and $Q$ false is the only combination that gets us that false and the rest of them get us true. Could anyone help clarify what's going on? Why is what is in the textbook correct? Thanks.


Prove that the sequence (1+1/n)^n is convergent

I know the proof using binomial expansion and then by monotone convergence theorem. But i want to collect some other proofs without using the binomial expansion.  *if you could provide the answer without the concept of calculus it will be appreciated * But any way do provide whatever method you can.


Hide ouput of bash while running automated script.

I have a couple of scripts in my bash file, that should do certain tasks, say like ...   #!bin/bash yum -y update service restart nginx yum install atop cat /var/log/somelog.log > /home/cron/php/script   It goes on and on, but the problem is that with each task taken, bash shows me the output. Like  service restart nginx for example, outputs some message. And I want to hide all these messages. What is generally the accepted way of achieving this? Because, I was about to redirect the STDOUT to /dev/null but, considering I have over 50 consecutive tasks to run, it would mean I have to /dev/null that much, which for some reason does not seem efficient to me.


I'm following the tutorial on overleaf to create a bibliography, yet I keep getting the error "Empty bibliography on input line...". Here's my code.  \documentclass[a4paper]{article} \usepackage[backend=biber]{biblatex} \addbibresource{sample.bib}  %%% Title Data \title{Seminar}  \author{} \date{November 28, 2019}  \begin{document} \maketitle {\centering   \LARGE\textbf{Nonshellable Triangulation of 3-balls}\par }    \printbibliography  \end{document}   And the content of the .bib file:  @article{einstein,     author = "Albert Einstein",     title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})     [{On} the electrodynamics of moving bodies]",     journal = "Annalen der Physik",     volume = "322",     number = "10",     pages = "891--921",     year = "1905",     DOI = "http://dx.doi.org/10.1002/andp.19053221004",     keywords = "physics" }   Also a screenshot of the window on overleaf I'm working on.     What am I doing wrong?


24gb files removed but no changes to the available space. What could have happened?

We have this virtual machine that has Apache2 installed, we forgot to install a log rotate and we got 24gb of logs from Apache2, We removed those 24gb of log files but no changes occurred to the disk whatsoever, It was like I didn't removed the logs at all. Does any one understand what may have happened?  root@Web:~# cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"  root@Web:~# df -kh Filesystem            Size  Used Avail Use% Mounted on /dev/sda1              29G   27G  675M  98% / none                  744M  176K  744M   1% /dev none                  748M     0  748M   0% /dev/shm none                  748M  568K  748M   1% /var/run none                  748M     0  748M   0% /var/lock none                  748M     0  748M   0% /lib/init/rw none                   29G   27G  675M  98% /var/lib/ureadahead/debugfs  root@Web:~# du -kh /var/log/apache2 24G     /var/log/apache2  root@Web:~# rm /var/log/apache2/*  root@Web:~# du -kh /var/log/apache2 4.0K    /var/log/apache2  root@Web:~# df -kh Filesystem            Size  Used Avail Use% Mounted on /dev/sda1              29G   27G  673M  98% / none                  744M  176K  744M   1% /dev none                  748M     0  748M   0% /dev/shm none                  748M  568K  748M   1% /var/run none                  748M     0  748M   0% /var/lock none                  748M     0  748M   0% /lib/init/rw none                   29G   27G  673M  98% /var/lib/ureadahead/debugfs


I have a hard drive that is just for my cloud system, I need to be able to limit the folder size and prevent all the users from going over that size,


Regex: match sequence of not a certain string

s = 'blah blah blah... _ABC_superman_is_cool_CBA_ ...blah blah blah...'   This is just an example, but I want to match everything between _ABC_ and _CBA_. So 'superman_is_cool'. There may be multiple sections of _ABC_..._CBA_.  re.findall('_ABC_(.*)(?=_CBA_)', s)   I tried this first, but obviously doesn't correctly work at all.


Why are continuous functions the "right" morphisms between topological spaces?

Recently, someone mentioned to me that given a function $f: X \to Y$ there are two natural functions between the powersets $P(X)$ and $P(Y)$. Namely $f: U \subset X \mapsto f(U)$ and $f^{-1}: V \subset Y \mapsto f^{-1}(V)$. Then if we consider maps between $P(P(X)), P(P(Y))$, each of the above maps induce two more, so there are four natural maps.  Thus, it seems on the face of it like there are four natural choices for morphisms of topological spaces (since a topology on $X$ is an element of $P(P(X))$). Why is it that continuous functions are the morphisms we choose and not one of the other four maps?  I understand that the theory we get from taking continuous functions as morphisms is incredibly rich and so this alone provides adequate justification. However, I am looking for a different sort of justification along the lines of "is there some property of continuous functions that immediately suggests they are the 'right' choice of morphisms between topological spaces?".


Google is no longer supporting 32 bit version of Chrome browser, at least that's what the message i get every time i open the browser is saying. I need to use chrome, and i need to get latest upgrades too. So, i guess i need to install 64 bit Ubuntu but i am not sure if it will work on my Laptop. This is the specification, can someone tell me if 64 bit run smoothly on my Laptop:  Ram - 2gb Processor - Intel® Pentium(R) CPU B950 @ 2.10GHz × 2  Graphics - ntel® Sandybridge Mobile x86/MMX/SSE2


I often see signals like this:  nickname > heroname is missing nickname > heroname is back   To make call heroname is missing I click on hero icon.  How to make call heroname is back? Are there more signals?


Getting VPN to auto-reconnect on connection drop

I use the built-in VPN on Mac OS X 10.7.3. It's IPSec, FWIW. From time to time, it disconnects (probably an issue with my corporate server). Is there a way to get it to automatically reconnect? Sometimes I don't notice for a while, which is kinda annoying.


Can you ping someone in chat who has never been there before?

I has a discussion  over whether if you @ping someone from the main site in chat if they would ever get a notification. I was under the impression that they would not. Is this true?


"dick" has developed a lot of meanings. Pons.eu lists five different meanings. The semantic development of most of them can be understood, but  "dick all/dick" for nothing is a bit mysterious (AmE, slang). Does anybody know more about this American slang use?   He doesn't know dick all. He doesn't know dick about us. Tomy Clancy, USA, The Teeth of the Tiger.


How can I simulate shadows for a 2D top-down game?

I'm trying to simulate shadows for a 2D top-down RPG (in Python), but I can't think of the best way to do this  So far I've tried making copies of the original game entities and turning all opaque pixels black (which is a bit slow), then rotating them around the bottom of the original image... but i couldn't quite get that approach to work.  So how can I simulate this effect?


Does every element in exterior algebra have the form $v_1 \wedge v_2 \wedge ... \wedge v_k$?

Does every element in $\wedge ^k V$ can be expressed as the form $v_1 \wedge v_2 \wedge ... \wedge v_k$ ? Here $V$ is a n-dim vector space, and $v_i$ are vectors in $V$.  Intuitively it is right, but I have problem in how to make the sum of two forms of $v_1 \wedge v_2 \wedge ... \wedge v_k$ still have this form .


What are some good ways to handle long values in a dropdown?

I need to create a dropdown to select various groups and most of them have very long titles.


Exceptions that allow the use of "will" after "if"

This as what I've been able to establish:  The use of "will" after "if" is legal only when any of the following conditions apply:   The "will" is used as a verb (equivalent to "want"), for example, "If you will". The "if" can be replaced with a "whether", for example, "I don't know if I will make it on time".   Is each of the two conditions above sufficient to make the use of "will" after "if" legal?  Are there any other cases that I've missed, which make the use of "will" after "if" legal?


Can I roast nuts in a convection microwave oven?

I am looking for a new microwave. I heard a lot of good things about convection microwave ovens. I am wondering if I could also use one for roasting nuts or any kind of seeds, so I don't have to buy another appliance for roasting nuts and seeds.


I have a git repository which has several commits into different sub-directories and I want to cut the repository in two in the following way:  /   sub1/   sub2/   sub3/   ->  /   sub1/   The individual subs have evolved to a point where sub1 should be an independent repository. Also there isn't a single commit that touches more than one sub.  So, I'd like to somehow extract a new repository that only takes commits made into sub1 while leaving all other stuff out. But I want to keep the history (but not have the commits related to sub2 nor sub3).  Note: I vaguely remember there to be some command to do this, but I never used it myself and don't remember what it was called, so I cannot search for it.


Unity Performance: How many Materials per Object?

I have learned that a Mesh with 4 Materials each 1024x1024 in Size is somewhat slower than a Mesh with 1 Material 2048x2048 in Size? In my usual workflow I tend to seperate different Materials into different Materials so an Object tends to have around 2-8 Materials. I have created more than a hundred Assets like this.  Is the performance dramatically affected by this? Is it acceptable to upload such Objects to sites like turbosquid or sell them on Unity Asset Store or will the buyer behead me after noticing?    Window Textures need to be transparent, Metal / Wood / Concrete need different smoothness settings. As far as I know Unity doesn't support Gloss maps.


I've tried it a 100 times I'm really new to Ubuntu and ended with a bunch of error that I don't even understand can any one please help me??  Here is what I did:   I installed PHP  I installed libcurl then php5-dev I tried installing PECL extension and it says PHPIZE not found.


I'm new to blender and I want to use it as 3D printing software. I'm using 2.8 so I'll get used to new interface, but I don't know how to change edge length to a specific value. I know how to change whole object dimensions like cube, I'm using metric system and I can see edge length when selected, but how do I change it?


Where to start with the Star Wars books?

I love my sci-fi books, but have never read any of the Star Wars novels. Having looked around there seem to be countless different plots, characters, alternative universes... so I have never picked one up!  My question is, what is a good series of Star Wars stories to start on for someone who has only seen the films, but is interested in reading more about the Star Wars universe?  Sorry I realize this is of course subjective, but I imagine an answer would point me in the direction of a few particular books or series that were most in-line with the main Star Wars plot (i.e. the films), and were considered generally good stories unto themselves.  I am particularly interested in the 'Knights of the Old Republic', having heard some friends ranting about the game. Is it necessary to play the game? Or is it based on a book (or series of books)?


How to show that $1 \over \sqrt{1 - 4x} $ generates $\sum_{n=0}^\infty \binom{2n}{n}x^n $

I need to find the values of $a$ and $n$ in the following  $$ (1 + ax)^n  = \sum_{i=0}^\infty \binom{2i}{i}x^i$$  How can I compare things and show that $a=-4$ and $n = -{1 \over 2}$. It's easy to expand $1 \over \sqrt{1 -4x}$ see that it's valid but I'm looking other way around.


I have a question which is already asked on Stack Overflow, and I found one of the answers to be useful to me. How can I award a bounty to a particular answer?


Give a specific name to a terminal tab instance

Edit : other answer talked about change the title of the terminal, not a tab, but effectively they answer to my question too. Everything is great.  I'm a newbie and I wonder how give a specific name to a terminal tab instance ?  Here an instance of my question :     Currently I have just few knowledge in Ubuntu system. Thanks


I made a partition on my nvme disk for installing ubuntu and make a dual boot system with Windows and ubuntu

But my partition doesnt appear on ubuntu installation. It shows the whole disk as one and does not have my partition, What should i do ?


How to animate a mesh that changes through editing?

So I want to change how the mesh looks (through edit mode) so the geometry of the shape changes throughout the animation. So I have a laser but I want my selected faces to be scaling up and down. How can I do this?  Thanks in advance


a book I read about survival on another planet and waygates

I read a book about students who were graduating from some kind of academy where they trained to be the first people visiting a new planet and to scout it out or otherwise prepare it for colonisation. There is some kind of technology available on earth like a waygate that colonists can pass through to reach the other planet.  The problem is, this class of graduates end up being lost on the other planet, instead of returning to earth a few days or weeks after they arrive on the other planet and graduating, they are stuck there because there is some malfunction with the waygate back on earth or perhaps interference from a supernova.  Eventually after months or years they have established a society within some caves on the planet with their own form of crude government. Only then does a waygate open up from earth again and they are rescued.  Could anyone identify this story for me please?


How share WiFi's internet as hotspot in 16.04

I saw thread discussing the same. But they are not focusing on 16.04. In simple words, I want someone else use my laptop's internet ( WiFi ) through a custom hotspot. How is it possible ?


Show that the boundary of a set equals the boundary of its complement

$\newcommand{\bdy}{\operatorname{bdy}}$  I'm trying to show that $\bdy(A) = \bdy(A^c)$.  I know that $\bdy(A) = \operatorname{closure} A \setminus \operatorname{int}(A) = (\operatorname{int}(A^c))^c \setminus \operatorname{int}(A)$, but I don't know where to go from there.  Any help or hints would be very much appreciated.


Deleting a middle node from a single linked list when pointer to the previous node is not available

Is it possible to delete a middle node in the single linked list when the only information available we have is the pointer to the node to be deleted and not the pointer to the previous node?After deletion the previous node should point to the node next to deleted node.


xPath in SelectNodes method below does not return any node, even if there are such nodes in xCurrent document.  XmlDocument xCurrent = new XmlDocument(); xCurrent.Load(File); foreach (XmlNode Node in xCurrent.DocumentElement.SelectNodes("//Product")) {     ... }   My assumption that it should is based on this:   //author All <author> elements in the document.  However I've found that following xPath returns what is required  xCurrent.DocumentElement.SelectNodes("//*[local-name()=\"Product\"]"))   It seems for me that xPath assumes that "//Product" means "//elibri:Product", because "//" xPath returns only "elibri:Dialect" node. What is the reason behind that assumption? List of child nodes of DocumentElement is below.


Equation number is not in same line in two-column document class

\documentclass[aps,twocolumn]{revtex4}  \usepackage{epsfig}   \usepackage{amsmath}   \usepackage{epsfig}    \renewcommand{\baselinestretch}{1.45}   \begin{document}  \begin{equation}   V_S(x)=V_1 \Theta(x/a) + iV_2 \delta(x/a),~       \Theta(x<0)=0,\Theta(x>0)=1.       \end{equation}  \end{document}   Equation number is not coming on same line, in two column document class, please help ??


How do I interpret this Python Array code?

So I am teaching myself Python and I recently stumbled upon these kinds of code: plt.scatter(X_pca_2c[:,0], X_pca_2c[:,1], c=iris.target, alpha=0.8, edgecolors='none')  and np.array(tf_vect.get_feature_names())[tsvd_2c.components_[20].argsort ()[-10:][::-1]]  The functions are too advanced for me at this stage, I know, but I am learning Python arrays now and I wonder how do I interpret the [:,0], [:,1],[-10:][::-1] here?  I stumbled across such notations a lot and I want to get my understanding right.  I thought it was a simple index at first, but then I realize there is such a thing as [::-1] too. Anybody kindly explain the logic behind them? Thanks a lot!!


I do listen stuff before falling asleep and for that I set the native timer on my iPhone to stop playing after ~30 minutes.   When I cook something I ask Siri to set timer for let's say 5 minutes, but after the 5 minutes, my iPhone just stops playing (there is nothing playing at that moment actually).   How do I tell Siri I want to be notified after the timer runs out?


What is the difference between the two sentences below?   Are they both grammatically correct?   I dislike his being blunt. I dislike him being blunt.


Determining $\lim_{n\to\infty}\left(n^{\tfrac{1}{n}}-1\right)^n$ with only elementary math

I am trying to find this limit:  $$\lim_{n\to\infty}\left(n^{\tfrac{1}{n}}-1\right)^n,$$  I tried using exponential function, but I see no way at the moment. I am not allowed to use any kind of differentiation or other topics of advanced math, only induction and school math are possible. Thank you


Submitting an answer to a closed question

Recently, (on meta), I was able to answer  30 seconds after it was closed.  Close time:  2013-12-05 02:37:22Z Answered at: 2013-12-05 02:37:52Z   This is fine. It is not a bug, rather it is  as pointed out .  While answering the question, there seems to be an interval in which (web sockets?) check if a question has been closed or not. If the check returns true, you are presented with the following message:          After closing some questions, I found that the interval seems to be under 1 minute. (I got ~22 seconds, ~49 seconds, and ~13 seconds when testing)  In other words, if you are typing an answer to a question, you have less than a minute to submit your answer - assuming the question has been closed. You will then be presented with the message above and the submit button will now be disabled.  <input id="submit-button" type="submit" disabled="disabled">         There are no evident problems with this. It seems to work well; however, if you edit the HTML and remove the disabled="disabled" attribute, you can bypass this and submit an answer.  Here is  on SO where I did this. (10k users only - I deleted my answer)  Close time:  2013-12-05 19:11:28Z Answered at: 2013-12-05 19:41:06Z   By removing the disabled attribute, I was able to submit an answer ~30 minutes after the question was closed.  Should this be allowed or not?  from Jan 2011, Jeff points out:     the grace period for answer submission is now 4 [hours] after after question closure   Yes, the quote does say after twice.  Despite the fact that this comment was written ~3 years ago, there is still a 4 hour grace period in place. After sitting on a particular answer for ~5 hours, I failed to submit an answer and was presented with the following:        This grace period is intended for people already answering a question before it has been closed. So why is the submit button immediately disabled upon being notified that the question has been closed? This defeats the entire purpose of a grace period. Especially since it can be bypassed.


Difference between the squares of consecutive integers

I just realized that the difference between $n^2$ and $(n+1)^2$ is exactly the $n$th odd number. For example: $5^2 - 4^2 = 9$, the 5th odd number. Is there a proof of this that I can study? This is just my nephew and I playing with series and simple programming problems.


Usage of -n and -z in test built in - Bash

Consider the following in bash:  root@debian-lap:/tmp I=$(echo) root@debian-lap:/tmp echo "$I"  root@debian-lap:/tmp [ -z "$I" ] && echo "TRUE" || echo "FALSE" TRUE   This means that variable $I is zero. The same I could achieve with negation test to see if variable is non zero, and ! makes test reverse so it checks is variable zero   root@debian-lap:/tmp ! [ -n "$I" ] && echo "TRUE" || echo "FALSE" TRUE root@debian-lap:/tmp   So, my question is, are there any special cases when to use -z and ! -n , or vice versa ! -z and -n as they are basically doing the same test?   Thanks


Users lookup in chat search breaks with JavaScript error

When using the  and trying to filter by user, I get this after typing several letters:        Two letters work fine, third or fourth letter breaks the lookup.  Can this please be fixed?


In Illustrator, how do I select every "," on the page?

I have hundreds of files that currently use "," as a decimal place. I need to change them all to "." ie. "9,45" needs to be "9.45". I feel that there must be a selection option to do this.


Editing /etc/sudoers to manage sudo rights for users and groups

I made a group called "group1" and I want to give it all sudo rights only except "chmod, chown" commands. How can I change below sentence to get through this?  Before applying change:  %group1 ALL=(ALL) NOPASSWD:ALL


Is the universe expanding, or is everything in it getting smaller?

I was recently reading some of the nice answers to the (related) question:   From many of the answers their appears to be a symmetry between:   A universe in which all matter-things (plus light) remain the same size, while the space between them expands. (The one we appear to live in) A universe where the space remains the same size and all objects in the universe shrink. Along with an appropriate change in physical length-scale constants. (One equally compatible with our observations?)   Said another way: At one point in time your ruler fit between those two galaxies $10^{50}$ times, now it fits between them $10^{51}$ times. This is usually explained as the space growing, I believe it could equally well be described by the ruler shrinking.  Is this symmetry obeyed? Are their any cosmological models presented in terms of matter shrinking?


On Number Theory and Goldbach's Conjecture

Good day. My question is: Does every even number have the form $n=p+ 2+q$, or $n=p- 2+q$ with $p, q $ prime numbers, such that $p\pm2$ is prime number? Up to $n = 1000$ I know that it is true, and it isn't equivalent to goldbach's conjecture.


A function $f : I\to \mathbb{R}$ is convex on an interval $I \subseteq \mathbb{R}$ when $\lambda f(x) + (1 − \lambda)f (y) \ge f (\lambda x+(1 − \lambda)y )$ holds for all $x,y \in I$. Prove $$ \sum_{i=0}^n \lambda_i f(x_i) \ge  f\left(\sum_{i=0}^n \lambda_i x_i\right) $$ holds for all $n\ge 2, x_1, \ldots, x_n \in I$ and $\lambda_1, \ldots, \lambda_n \ge 0$ satisfying $1 =  \sum_{i=0}^n \lambda_i$.  My Attempt: If $\lambda_1>0$ then I take $\lambda_0 = \lambda_1 + \lambda_2$ and $\Lambda_1 = \lambda_1/\lambda_0, \Lambda_2 = \lambda_2/\lambda_0, x_0 = \Lambda_1 x_1 + \Lambda_2 x_2$ and $$ \lambda_0(\Lambda_1 f(x_1) + \Lambda_2 f(x_2)) + \sum_{j=1}^n \lambda_i f(x_i). $$ Pls help me on what to do next and how to complete the proof


Show page number as a "percent complete"

I want to show in the page foot the current progress of the document. For example, if the document contains 200 pages, then I want the foot to show 11.5% in the page 23.  Edit: I'm also interested the foot to show percent complete of current chapter. Is it possible?  Tank you for help


Doesn't this experiment signify that inertial frames are not equivalent?

When we talk about kinetic energy of a body, it is actually the combined kinetic energies of all the atoms in that body. Now suppose a body is at rest. So its atoms would have some internal random motion and thus we can measure its temperature. But suppose it starts moving with a constant velocity $v$, so it will have kinetic energy $\frac{1}{2} mv^2$. So the kinetic energy of each atom is increased. So this means that the body will becomes hotter than earlier. But from the frame of body itself, it was at rest and thus there should be no change in its temperature although the temperature of the atoms of the ground should change. How is this even possible? Why is temperature of the same body different when seen from two different inertial frames? Does this mean that it is not compulsory that two inertial frames are equivalent? Note : I tried to search for a similar question on this site and I found  and the selected answer literally seems contradicting to me and my ideas. The answer talks about all three possibilities and all the possibilities are based on pure mathematics (I guess), so I would like to know why is there even a possibility of the temperature of a moving body to fall down or remain constant? Shouldn't it increase? Or if I am wrong somewhere please correct me. Please try to give a purely physical reason. It would be more appreciated since I am just a high schooler and don't understand those transformational mathematics. Edit: I don't know why is the question closed.  The question linked (as a dupe of ) , gives a wrong information that since pressure is invariant that's why temperature is invariant too. But this implies that pressure is more fundamental than temperature which is not true. So it will be helpful if the question is reopened and someone provides a proper reason for temperature invariance. Edit 2 : In thermodynamics we can change the internal energy of a system (and thus change the temperature) by doing work on it . Then why can't the work of friction change our body's temperature ?


Matching an optional substring in a regex

I'm developing an algorithm to parse a number out of a series of short-ish strings. These strings are somewhat regular, but there's a few different general forms and several exceptions. I'm trying to build a set of regexes that will handle the various forms and exceptions; I'll apply them one after another to see if I get a match.   One of these forms goes something like this:  X (Y) Z   Where:   X is a number I want to capture.  Z is static, pre-defined text. it's basically how I determine whether this particular form is applicable or not. Y is a a string of unknown length and content, surrounded by parenthesis.    Also: Y is optional; it doesn't always appear in a string with Z and X. So, I want to be able to extract the numbers from all of these strings:   10 Z 20 (foo) Z 30 (bar) Z   Right now, I have a regex that will capture the first one:  ([0-9]+) +Z   My problem is that I don't know how to construct a regex that will match a series of characters if and only if they're enclosed in parenthesis. Can this be done in a single regex?


Dear Stack Exchange, it is time for a change

How do you call someone who turns to force to impose their view?  That is how I call you, and I think it is time for a change.  Consider how SE works:   You are the one that built a platform -- thank you for that.  We are the ones that produce the content.  We try to do so freely, democratically, out of our needs, passion, and interest.  You are the one that profits economically on the content that we create -- thank us for that, maybe?   The issue with this balance is that you structured the platform to give yourself absolute ruling power, and while pretending to allow us some freedom and democracy, you haven't hesitated in showing it to us on multiple occasions. I do not think it is a healthy relationship when you can push your agenda on the rest of us, and we can barely write a complaint to show our disappointment.   Regardless of the specific topic of the particular abuse, the issue is that you took no significant action towards a change. There could have been many things you could have done to improve our relations:   Separate your activity from ours. You do that one thing that you know how to do, and that is to build and maintain the platform. We freely and democratically organise ourselves, elect our representatives, and contribute to our shared knowledge. Give us the full power to undo the effects of your abuses and to veto any further action that you may wish to take on members of our community, and on its content. Open any decisions that may affect our participation in the platform to referendum votes, as it is done in all respected democracies around the world. Accept that if you wish to partake in the community, you may do so as any other user with limited privileges unless elected to a position of power by the community itself.   You have done nothing of it, and that is where the line is drawn. All the rest, apologies, promises, chit-chats, mea culpas, and excuses... they are just cheap words in the air.  More action, less talking.


Unbalanced square brackets in spawning a custom villager

Just a heads up, if I seem inexperienced in typing my question in a certain style, please forgive me!  I used a command generator, from , to spawn a villager who sells custom weapons.  However, the generator does not support villagers selling custom WEAPONS, only custom ITEMS. That means I have to enter the values myself, given the format provided. I have 2 more of such commands and they work perfectly fine, but only this one has a persistent problem.  The command is extremely long (well, at least for me) and correcting the unbalanced brackets is an uphill task for my inexperienced self. I hope any experts on Minecraft data tagging could help me out; I would be really grateful. Here's the full error I got, I decided to remove the format because I got it all wrong:  [21:46:35] Data tag parsing failed:Unbalanced square brackets []: {Profession:0,CustomName:"The Shop Elf #3",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Invulnerable:1,Attributes:[{Name:"generic.knockbackResistance",Base:"1f"},{Name:"generic.movementSpeed",Base:"0f"},{Name:"generic.maxHealth",Base:99999}],Offers:{Recipes:[{buy:{id:"nether_star",Count:5},buyB:{id:"gold_ingot",Count:1},maxUses:9999999,sell:{id:"golden_hoe",Count:1,tag:{display:{Name:"The Lucky Golden Scythe",Lore:["Is that really gold... or just children's glitter?","You get more resources by slaying mobs."]},ench:[{id:16,lvl:3},{id:21,lvl:3},{id:34,lvl:2},{id:35,lvl:5}]},MaxUses:9999999},rewardExp:false},{buy:{id:"nether_star",Count:7},buyB:{id:"dye",Count:1,Damage:1},maxUses:9999999,sell:{id:"golden_hoe",Count:1,tag:{display:{Name:"Mace of Tarrasque",Lore:["Preserves the blood of an extinct monster.","Boosts your health dramatically."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:50,Operation:0,UUIDMost:30803,UUIDLeast:806745},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:1,Operation:1,UUIDMost:34336,UUIDLeast:736873}],ench:[{id:16,lvl:1},{id:19,lvl:3},{id:21,lvl:1},{id:34,lvl:5},{id:35,lvl:1}]},MaxUses:9999999},rewardExp:false},{buy:{id:"nether_star",Count:8},buyB:{id:"diamond",Count:3 maxUses:9999999,sell:{id:"diamond_axe",Count:1,tag:{display:{Name:"Sapphire Daedalus",Lore:["The second most powerful weapon of the land.","Extremely high damage and health."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:35,Operation:0,UUIDMost:90871,UUIDLeast:499725},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0,Operation:0,UUIDMost:66479,UUIDLeast:426152}],ench:[{id:16,lvl:5},{id:17,lvl:5},{id:18,lvl:5},{id:19,lvl:5},{id:20,lvl:5},{id:21,lvl:1},{id:34,lvl:1},{id:35,lvl:1}]},MaxUses:9999999},rewardExp:false}]}}


How do I get the line break inside a pin node to work in TikZ?  \node[pin={\angle+0.5*\percent*3.6:hi\\there}] at (120:3) {};   I tried align=center but didn't work as a typical node.


Signed to unsigned conversion in C - is it always safe?

Suppose I have the following C code.  unsigned int u = 1234; int i = -5678;  unsigned int result = u + i;   What implicit conversions are going on here, and is this code safe for all values of u and i? (Safe, in the sense that even though result in this example will overflow to some huge positive number, I could cast it back to an int and get the real result.)


Strange behaviour with Javascript Array.push()

This may turn out to be a stupid mistake on my part, but my JSON object array is behaving unexpectedly.  The JSON object insertDoc has startDate and endDate fields and i'm trying to create a new object for each day in between -              var insertDocs = [];             var finalDate = insertDoc.endDate;                  while (insertDoc.startDate <= finalDate) {                     insertDoc.endDate =  insertDoc.startDate;                     console.log('doc is ' + JSON.stringify(insertDoc));                     insertDocs.push(insertDoc);                     insertDoc.startDate = new Date(moment(insertDoc.startDate).add(1, 'days'));                  }              ...              for (var i = 0; i < insertDocs.length; i++) {                 console.log(JSON.stringify(insertDocs[i]));             }   Here's the browser output -   doc is {"description":"testtask","endDate":"2019-04-01T00:00:00.000Z","startDate":"2019-04-01T00:00:00.000Z","status":"OPEN"} doc is {"description":"testtask","endDate":"2019-04-02T00:00:00.000Z","startDate":"2019-04-02T00:00:00.000Z","status":"OPEN"} doc is {"description":"testtask","endDate":"2019-04-03T00:00:00.000Z","startDate":"2019-04-03T00:00:00.000Z","status":"OPEN"} doc is {"description":"testtask","endDate":"2019-04-04T00:00:00.000Z","startDate":"2019-04-04T00:00:00.000Z","status":"OPEN"} doc is {"description":"testtask","endDate":"2019-04-05T00:00:00.000Z","startDate":"2019-04-05T00:00:00.000Z","status":"OPEN"}   Output of stringify - same doc printed 5 times   {"description":"testtask","endDate":"2019-04-05T00:00:00.000Z","startDate":"2019-04-06T00:00:00.000Z","status":"OPEN"}   So it seems each object is different and correctly printed but the array just seems to be 5 of the same object. The date values are different too  Am i missing something here?


Error:     System.IndexOutOfRangeException    at   System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)   at  System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) at    System.Data.SqlClient.SqlDataReader.get_Item(String name) at   I alter my stored procedure to add two new columns to my result, the stored procedure by itself seems to be working but when i add the new columns to my SQlDataReader im getting that error  Model  public class StudentRecordFull : StudentRecord {     public double CreditProgress { get; set; }     public string EnrollmentStatus { get; set; }     public int IsEnrolled { get; set; }     public string YRQLastAttended { get; set; }     public int Mandatory { get; set; }     public double GPA { get; set; }     public string TotalPrint { get; set; }     public int Balance { get; set; }  }   my Method  public StudentRecordFull GetStudent(int sid)     {         StudentRecordFull s = new StudentRecordFull();         using (SqlConnection myConnection = new SqlConnection(ProductionDataConnString))         {             SqlCommand myCommand = new SqlCommand("usp_GetStudent", myConnection);             myCommand.CommandType = CommandType.StoredProcedure;             SqlParameter SIDParameter = myCommand.Parameters.Add("SID", SqlDbType.Char, 9);             SIDParameter.Value = sid;              myConnection.Open();             using (SqlDataReader oReader = myCommand.ExecuteReader())             {                 while (oReader.Read())                 {                     s.SID = SafeGetString(oReader, "SID");                     s.FirstName = SafeGetString(oReader, "FirstName");                     s.LastName = SafeGetString(oReader, "LastName");                     s.AdvisorName = SafeGetString(oReader, "Advisor");                     s.AdvisorSID = SafeGetString(oReader, "AdvisorSID");                     s.PathwayName = SafeGetString(oReader, "PathwayName");                     s.PathwayID = SafeGetInt(oReader, "PathwayId");                     s.SubPathwayID = SafeGetInt(oReader, "SubPathwayId");                     s.SubPathwayName = SafeGetString(oReader,                                                        "SubPathwayName");                     //s.TotalPrint = SafeGetString(oReader, "ploplo");                     s.Credits = SafeGetInt(oReader, "CreditsEarned");                     s.Phone = SafeGetString(oReader, "DaytimePhone");                     s.DOB = SafeGetString(oReader, "DOB");                     s.Address = SafeGetString(oReader, "Address");                     s.City = SafeGetString(oReader, "City");                     s.State = SafeGetString(oReader, "State");                     s.Zip = SafeGetString(oReader, "Zip");                     s.Email = SafeGetString(oReader, "Email");                     s.CreditProgress = SafeGetDouble(oReader,                                             "CreditProgress");                     s.EnrollmentStatus = SafeGetString(oReader,                                             "EnrollmentStatus");                     s.IsEnrolled = SafeGetInt(oReader, "IsEnrolled");                     s.YRQLastAttended = SafeGetString(oReader,                                              "YRQLastAttended");                     s.Mandatory = SafeGetInt(oReader, "Mandatory");                     s.GPA = SafeGetDouble(oReader, "GPA");                     s.Balance = SafeGetInt(oReader, "Balance");                     //s.TotalPrint = SafeGetString(oReader, "TotalPrint");                  }                 myConnection.Close();             }         }         return s;     }   Helper  private int SafeGetInt(SqlDataReader reader, string colName)     {         int i = 0;         if (!DBNull.Value.Equals(reader[colName]))         {             int.TryParse(reader[colName].ToString(), out i);         }         return i;     }   If i remove the new columns everything works great is like it cant not read those columns .  Any idea?