I want to define a new command using the package tikz-cd.  For example, suppose I want to define:  \newcommand{\simplearrow}[3]{\begin{tikzcd}  #1\arrrow[r, "#3"'] &amp; #2 \end{tikzcd}}   This would give an arrow #3 from #1 to #2, but it does not work.  I guess the problem has to do with the double quotes in "#3" ' (the extra ' is for positioning the label below the arrow so it is important).   How to solve this?  Thanks
I’m using tikz-cd for diagrams, and have a medium-sized diagram that I want to re-use several times.  However, when I try using a definition like:  \newcommand{\myarrow}{$\begin{tikzcd} A \ar{r} &amp; B \end{tikzcd}$   I get an error:  ERROR: Package pgfbasematrix Error: Single ampersand used with wrong catcode.   Is it possible to put a tikz-cd diagram into a defined command somehow?
I only have access to the server via a terminal and I can't use graphical tools such as GParted! I want to create a new partition from a part of the root (about 768mb) for swap.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda         20G  1.3G   18G   7% / udev             10M     0   10M   0% /dev tmpfs           199M  4.9M  194M   3% /run tmpfs           100M   12K  100M   1% /run/user tmpfs           5.0M  4.0K  5.0M   1% /run/lock How can the pixel values of a raster image be extracted under a polygon fishnet? Square and square root and negative numbers Are they equal?      -5 = $\sqrt{(-5)^2}$ Get specific GPS location somehow on windows 8 SQL Server Linked Server to Microsoft Access The origin of the value of speed of light in vacuum Meaning, why is it the exact number that it is? Why not 2x10^8 m/s instead of 3? Does it have something to do with the mass, size or behavior of a photon? To be clear, I'm not asking "how we determined the speed of light". I know there isn't a clear answer, I'm really looking for the prevailing theories. Should I postpone my trip to Paris in 2nd week of Jan in light of recent protests? I’ve a date and I really waited long to make this happen. My gifrfriend is a bit worried about the security issue in Paris. Which locals think that the media is exagerrating the issue and the issue is small and non-threatening for tourists? Which tube size to prefer if several options apply? I have 40-622 (a.k.a. 28x1.5") tires, and  offers  two different sizes of tubes - their models "17" and "19" - as applicable for that tire size.  Ok, either one would surely fit well. But apart from weight difference (150 vs. 220 grams), is there any reason to prefer one over another? Is it better to have as small &amp; light tube as possible? Or perhaps a bit larger and heavier one would be more durable, as it wouldn't be stretched as much? Err on which side? What does the Code of Conduct say about pronouns? Please leave any feedback or questions about this FAQ on .     Two weeks ago, we  to directly address concerns over pronoun usage. We tried to anticipate likely questions, but&hellip; missed the mark by quite a lot. Based on Gareth McCaughan’s excellent post, “”, we’ve gone back to the drawing board and written a new FAQ that aims to address actual questions that have been frequently asked in these discussions.  If you read only one thing, the answer to question #1 under The Basics sums up our goals in publishing this guidance:     It would be rude to refer to a man as "she" or a woman as "he". Some people are neither male nor female and might, for instance, ask to be referred to as "they". When someone indicates what pronouns should be used to refer to them, please use the pronouns they state as you would others.   This is a learning process for most of us - from authors to readers to moderators to employees of Stack Exchange, Inc.  Let’s all try to approach this with good intentions and a willingness to learn from one another.  Big thanks to Gareth for leading by example here, and to everyone who has stepped up to ask and answer the important questions!  What's all this stuff about pronouns in The Code of Conduct?  The  has two direct references to pronouns:   “Use stated pronouns (when known).” “Prefer gender-neutral language when uncertain.”   What does all of this mean and how can I as a user understand and follow the CoC guidance? How do you programmatically set an attribute? Suppose I have a python object x and a string s, how do I set the attribute s on x? So:  &gt;&gt;&gt; x = SomeObject() &gt;&gt;&gt; attr = 'myAttr' &gt;&gt;&gt; # magic goes here &gt;&gt;&gt; x.myAttr 'magic'   What's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__(). In Drupal 8 you can load an entity with:  $node = \Drupal::entityManager()-&gt;getStorage('node')-&gt;load(123);   This looks for the entity definitions and finds that node is defined by Drupal\node\Entity\Node - so (I guess) Drupal\node\NodeStorage will instantiate a new Drupal\node\Entity\Node instance.  What I'd like to achieve is subclassing Drupal\node\Entity\Node and being able to instantiate this subclass when it's appropriate. For example if I have a node bundle article, there would be a class:  namespace Drupal\my_module\Entity\Article; class Article extends Drupal\node\Entity\Node { }   And I'd call:  $node = \Drupal::entityManager()-&gt;getStorage('node_article')-&gt;load(123);   And the return would be my Article subclass.  I can achieve this by creating a new entity type and wiring it back to another existing entity definitions, for example the node-article example would be this class:  namespace Drupal\my_module\Entity; use Drupal\node\Entity\Node; /**  * @ContentEntityType(  *   id = "node_article",  *   label = @Translation("Content"),  *   bundle_label = @Translation("Content type"),  *   handlers = {  *     "storage" = "Drupal\node\NodeStorage",  *     "storage_schema" = "Drupal\node\NodeStorageSchema",  *     "view_builder" = "Drupal\node\NodeViewBuilder",  *     "access" = "Drupal\node\NodeAccessControlHandler",  *     "views_data" = "Drupal\node\NodeViewsData",  *     "form" = {  *       "default" = "Drupal\node\NodeForm",  *       "delete" = "Drupal\node\Form\NodeDeleteForm",  *       "edit" = "Drupal\node\NodeForm"  *     },  *     "route_provider" = {  *       "html" = "Drupal\node\Entity\NodeRouteProvider",  *     },  *     "list_builder" = "Drupal\node\NodeListBuilder",  *     "translation" = "Drupal\node\NodeTranslationHandler"  *   },  *   base_table = "node",  *   data_table = "node_field_data",  *   revision_table = "node_revision",  *   revision_data_table = "node_field_revision",  *   translatable = TRUE,  *   list_cache_contexts = { "user.node_grants:view" },  *   entity_keys = {  *     "id" = "nid",  *     "revision" = "vid",  *     "bundle" = "type",  *     "label" = "title",  *     "langcode" = "langcode",  *     "uuid" = "uuid",  *     "status" = "status",  *     "uid" = "uid",  *   },  *   bundle_entity_type = "node_type",  *   field_ui_base_route = "entity.node_type.edit_form",  *   common_reference_target = TRUE,  *   permission_granularity = "bundle",  *   links = {  *     "canonical" = "/node/{node}",  *     "delete-form" = "/node/{node}/delete",  *     "edit-form" = "/node/{node}/edit",  *     "version-history" = "/node/{node}/revisions",  *     "revision" = "/node/{node}/revisions/{node_revision}/view",  *   }  * )  */ class Article extends Node { }  // Results my Article sub type. $node = \Drupal::entityManager()-&gt;getStorage('node_article')-&gt;load(123);   This works fine (as much as I can see); however, it smells. It adds a new entity type, which is not true, and might cause other troubles in the future.  How do I define a subclass for an entity bundle so that loading the entity would return an object of that class? Windows 7 Automatically Connecting To Unsecured Wireless Networks On Startup Most of the questions on this topic related to folks connecting to somebody else's wireless network when their own was available and could remedy the situation by going to their connections and unchecking the "connect automatically" box.  See this: "  " as an example.  In my situation, I've noticed that Win 7 will automatically connect to any unsecured wifi network - even if I have never connected to it in the past.  If I am traveling and boot Win 7, it will start and connect to what appears to be the best signaled unsecured network without prompting me for confirmation (note: in the above link, "Naveen" seems to have same problem).  Obviously, that is a security concern to me.  Further, when I open "Network and Sharing" and "Manage wireless networks"  the network is not displayed (probably because I labelled it a public network).  Again, these are new, never connected with before, wireless networks.  I always promptly disconnect from them but don't want to have to be on constant guard for an auto connection to a malicious network.  This began about a month ago, as I recall, Win 7 did not behave like this in the past, I didn't monkey with wifi settings, and don't use a 3rd party connection manager.  I did have to download some internet security certificates for army website access but I don't think that should mess with network settings.  Any ideas how I can tell Win7 cease automatically connecting to networks or, at least, to prompt me for a confirmation before connecting? Does Two-Face die at the end of The Dark Knight? What could be the reason covid19 death data shows strong periodic trends? The covid19 death data for US shows strong periodic trends. It does not make sense to me that people die periodically.   What could be the reason to having such data? I thought it might be the reporting artifacts, for example, people always update data at Monday, but the period seems to be 3-4 days. Why can `root` run any command as any user without providing password? My /etc/sudoershas content:  Defaults        env_reset Defaults        mail_badpass Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  # See sudoers(5) for more information on "#include" directives:  #includedir /etc/sudoers.d   There is no rule above specifying NOPASSWD. I was wondering  why user root seem to be able to execute any command as any user without providing password?  Thanks. Why do you have to use copy_to_user()/copy_from_user() to access user space from the kernel? How would you know if your (high dimensional) data exhibits enough clustering so that results from kmeans or other clustering algorithm is actually meaningful?  For k-means algorithm in particular, how much of a reduction in within-cluster variance should there be for the actual clustering results to be meaningful (and not spurious)?  Should clustering be apparent when a dimensionally-reduced form of the data is plotted, and are the results from kmeans (or other methods) meaningless if the clustering cannot be visualized? Dirac equation as Hamiltonian system Let us consider Dirac equation $$(i\gamma^\mu\partial_\mu -m)\psi ~=~0$$ as a classical field equation. Is it possible to introduce Poisson bracket on the space of spinors $\psi$ in such a way that Dirac equation becomes Hamiltonian equation   $$\dot{\psi}~=~\{ \psi,H\}_{PB}~?$$  Of course, such Poisson bracket would be graded (super Poisson bracket), but if it exists this would explain on classical level why $\frac{1}{2}$-spinors correspond to fermions. How to create two classes in C++ which use each other as data? I want to know by an example how prices in stock market changes Let us assume there is a listed company x. Currently it has 100 shares issued to trade in free float market. Current price of stock is let say 10. Now please let me know if I purchase one share of company x at the market price of 10. How it will effect the stock price. And please add and exemplify some other scenarios whichever you find good to explain more. For more information let say promoters of the company holds 100 shares with them like 50% of the company is with promoters and the other half is with people who invest or trade in that company. If I've missed to tell or assume any other vital info. needed please assume it yourself while mentioning it. Thank You