In blender 2.9, I got a selected object and need to add a new material in a new slot with a script addon. I need some examples for doing a material shader nodes tree in 2.9 Ex: How to adding some nodes like diffuse - glossy mix shader, doing the links setting parameters etc.. may there are some web link to help with that  for 2.9?
How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?
Misplaced Accents in Cyrillic Text In educational material for the Russian language and linguistic literature the need to put accents on Cyrillic vowels often arises. However when I tried to do this with luaLaTeX the accents where misplaced.  \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{fontspec} \setmainfont{Linux Libertine:style=Regular} \begin{document}  Е́сли вы изу́чите  \'{Е}сли вы из\'{у}чите  \'{E}сли вы из\'{y}чите % Here "E" and "y" are Latin glyphs, but this workaround does not                         % work with all Cyrillic letters e.g. Я, Ю \end{document}     The last line would looks nice, but unfortunately these are Latin glyphs.  Is this a problem with the font used (Linux Libertine) or with LaTeX? Is it completely against the Java way to create struct like objects?  class SomeData1 {     public int x;     public int y; }   I can see a class with accessors and mutators being more Java like.  class SomeData2 {     int getX();     void setX(int x);      int getY();     void setY(int y);      private int x;     private int y; }   The class from the first example is notationally convenient.  // a function in a class public int f(SomeData1 d) {     return (3 * d.x) / d.y; }   This is not as convenient.  // a function in a class public int f(SomeData2 d) {     return (3 * d.getX()) / d.getY(); } Suppose $f$ is a continuous single-variable function, prove that:  $$2\int_a^b \int_a^x f(x)f(y) \, dy \, dx = \left[ \int_a^b f(x) \, dx \right]^2$$  This question was just on my Calculus III final exam and I couldn't figure it out, could someone provide some insight, please? Space of bounded continuous functions is complete I have lecture notes with the claim $(C_b(X), \|\cdot\|_\infty)$, the space of bounded continuous functions with the sup norm is complete.  The lecturer then proved two things, (i) that $f(x) = \lim f_n (x)$ is bounded and (ii) that $\lim f_n \in \mathbb{R}$.  I don't understand why it's not enough that $f$ is bounded. I think the limit of a sequence of continuous functions is continuous and then if $f$ is bounded, it's in $C_b(X)$. So what is this $\lim f_n \in \mathbb{R}$ about? Many thanks for your help. Markdown change: Intra-word emphasis now works There are tons of questions I could maybe post this as an answer to, but before choosing the best one, I'll just post this as an announcement question that can be linked elsewhere. The short story From now on, intra-word emphasis is possible in our Markdown version. That means you can now write  The &quot;V&quot; is for Model**View**Controller. That's un*fricking*believable.  and it renders like this:  The &quot;V&quot; is for ModelViewController. That's unfrickingbelievable.  This only works for asterisks, not for underscores. It works in posts and comments. The reasons There are two big reasons for this. For one thing, this is more or less the behavior of , which we eventually . &quot;More or less&quot; because CommonMark's emphasis behavior is still in flux, and supports a few things that we don't support yet, but at least with this change we're closer. The other reason is languages that don't even have the concept of &quot;words separated by spaces&quot;. See  and  for two examples. This change allow posts in those languages to emphasize words without having to resort to HTML tags. To use an example from the first linked post,  **北京**和**上海**是直辖市。   now renders like this:  北京和上海是直辖市。  Possible issues In the 99% cases, this should only make things better; I've only found very few posts where this change causes unintended bolding/italicizing. And even in those cases, note that the rendered versions of questions and answers are not re-rendered until a post is edited, so this will not affect anything in posts retroactively. Unlike posts, comments are rendered , so this immediately applies to all comments. In most cases this doesn't change anything or actually fixes things. Should you discover a rare case where this breaks an important comment badly, we can always edit it to fix. There's one side effect that I'd like to mention: If you find a great quicksort implementation on GitHub that has a bug that causes a crash when sorting Windows versions, and the author doesn't want to fix it, you may be inclined to say  f**k this s**t   (i.e., &quot;fork this sort&quot;). With intraword emphasis, this would however look like this:  fk this st  So you would have to escape the asterisks (one of them would actually be enough). I'm not worried about this case too much, since if you must put censor-worthy words into a post, you might as well have to jump through a little hoop. Some details This being Meta, there are probably lots of people interested in a more detailed description of the new behavior (don't feel bad if you're not one of them; just skip this section). Here are the major rules regarding intraword-emphasis:  As mentioned, it only applies to asterisks, not underscores. Underscores  this restriction was in place at all; asterisks are much less of a problem.  If a single or double asterisk is supposed to be interpreted as intra-word emphasis, it cannot have punctuation on one side; it actually must be inside a word. An example of an edge case this solves is  It's a web*-based solution. *see Wikipedia for a definition of &quot;web&quot;  where the asterisks after &quot;web&quot; could cause unintended italicizing if there was a second asterisk in the same paragraph somewhere.  For italics, the &quot;inside a word&quot; part of rule 2 is even a bit stricter. For bolding, any word or digit character is allowed; for italics, digits don't work either. That's because the asterisk is often used as a multiplication symbol, so  The game worked in 320200 and 640480 resolution.  wouldn't look right without this restriction.  A minor addition that I made that's only tangentially related to intra-word emphasis is that a sequence of more than three underscores or more than three asterisks will no longer take part in any emphasis. This shouldn't really cause any problems, but fixes some (e.g. the underline in the second blockquote in , while not really visible, is a weird combination of bold and italic underscore characters; after this change, it would just be (more) underscore characters). This behavior also matches CommonMark. JQ (GET ID based on NAME) I get a long list of such arrays  {     "id": "byu6g6c4cjys5mdkg5znh8ju8c",     "create_at": 1511875272294,     "update_at": 1511875272294,     "delete_at": 0,     "display_name": "BMA",     "name": "BMA",     "description": "",     "email": "aleksandar.ivanov@random.com",     "type": "O",     "company_name": "",     "allowed_domains": "",     "invite_id": "gdgz1tbxuinntx1fbr1ax7kehy",     "allow_open_invite": false,     "scheme_id": null   }   I want to get by JQ only the ID where the name is BMA. At the moment I parse " jq -r '.[]["name"]" and I can filter the output from curl by name and I will get "BMA" and also 100 other names, but I need to filter only the ID where name is =BMA. Any ideas? Consider the following table:  id  title   genre1  genre2  genre3  genre4  genre5 1   Movie1  Thriller    Crime   NULL    NULL    NULL 2   Movie2  Fantasy NULL    NULL    NULL    NULL 3   Movie3  Political   Philosophical   Historical  NULL    NULL 4   Movie4  Science Fiction NULL    NULL    NULL    NULL   When I unpivot genre1, genre2, ... the NULL values are removed, so that, for example, the rows for Movie1 would be:  id title  genre     original_column 1  Movie1 Thriller  genre1 1  Movie1 Crime     genre2   Is there a way to include NULL values, for example:  id title  genre     original_column 1  Movie1 Thriller  genre1 1  Movie1 Crime     genre2 1  Movie1 NULL      genre3 1  Movie1 NULL      genre4 1  Movie1 NULL      genre5   I can SELECT ISNULL(genre1, '*'), ISNULL(genre2, '*') ..., but suppose I want the values to appear as NULL? Is there a better way than:  WITH  -- SELECT that unpivots table AS unpivoted SELECT unpivoted.id,    unpivoted.title,    ,CASE unpivoted.genre WHEN '*' THEN NULL ELSE unpivoted.genre END    ,unpivoted.original_transaction FROM unpivoted   Also, I notice that the query that returns the source data to be unpivoted MUST have an alias. For example:  SELECT ... FROM   -- *must* give it an alias or it's a syntax error   (SELECT ... FROM) AS source    UNPIVOT(genre for original_column IN (genre1,genre2, genre3,genre4,genre5))   Does anyone know why? I have not found a way to refer to the alias anywhere in the query. If I have an adjacency matrix for a graph, can I do a series of matrix operations on the adjacency matrix to find the connected components of the graph? Misplaced/Overlapping Navigation Item Text on iOS 10 The bug displayed in the attached screenshot occurs consistently for me while running the developer beta of iOS 10 using v1.5.2 of the Stack Exchange app on an iPhone 6.  I was able to recreate this by simply tapping on any question or answer in my feed with a long title. This doesn't appear to be a bug with iOS 10 itself since I haven't seen it in other apps, but I could be wrong. Finding the uniquely determined region of a PDE (a) Solve the equation $yu_x+xu_y=0$  with the condition $u(0,y) = e^{-y^2}$. (b) In which region of the xy plane is the solution uniquely determined?     I did the first part but I don't understand how to do part b.  I read   But I don't understand how the argument is based. A more clear explanation is appreciated RAII and smart pointers in C++ In practice with C++, what is , what are , how are these implemented in a program and what are the benefits of using RAII with smart pointers? UK Visa Status check I have a US Green Card and applied for UK visa (Travel Visa) last month but haven't heard anything back from the New York Office. I am travelling on the 19th and am really concerned. They don't have any phone no. or email other than NEYOZVisaInfo@fco.gov.uk (it says incoming mail cannot be monitored).  Please assist. Why can't you get awarded the bounty for answering your own question? Consider this question on .  I put out a 200 bounty on the question, but did not get an answer from anyone other than myself that worked.    In fact, my answer is also the highest up-voted on it at this point.  I know that allowing OP's to retract a bounty can be a slippery slope; in fact I think that once the bounty is put up it should stay up.  But why not allow the OP to answer their own questions with a bounty and reward it to them if they receive the same up-votes as others?  Yes, I am fully aware that bounties are a risk.  People will use them for numerous reasons such as trying to draw extra attention to their issues.  However, in my specific question, the only valid answer is the one that I gave.  Had it been anyone else's question, I would have received the bounty, but since it was my own I did not. UFW Allows 22 for IPv4 and IPv6 but SSH Disconnects When Enabling sudo ufw disable followed by sudo ufw enable kicks me out of SSH  DMESG reports  [UFW BLOCK] IN=eth0 OUT= MAC=30:........ SRC=192.168.1.me DST=192.168.1.server LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=15776 DF PROTO=TCP SPT=55640 DPT=22 WINDOW=253 RES=0x00 ACK URGP=0  I can log back in without having to change rules via the console (UFW still enabled).  This started after upgrading Xenial (16.04) from kernel 4.4 to 4.15 (HWE). Upgrading to 18.04.1 did not solve the issue.  Versions:   iptables v1.6.1 ufw 0.35 4.15.0-29-generic #31-Ubuntu Ubuntu 18.04.1 LTS   UFW status verbose is (some rules were omitted, but they are all ALLOW)  Logging: on (low) Default: deny (incoming), allow (outgoing), disabled (routed) New profiles: skip  To                         Action      From --                         ------      ---- 22                         ALLOW IN    Anywhere 22 (v6)                    ALLOW IN    Anywhere (v6)   Why is this happening, or at least, how to revert to the expected behavior?  I looked at , and I am not sure it applies, but here's /etc/ufw/before.rules  # # rules.before # # Rules that should be run before the ufw command line added rules. Custom # rules should be added to one of these chains: #   ufw-before-input #   ufw-before-output #   ufw-before-forward #  # Don't delete these required lines, otherwise there will be errors *filter :ufw-before-input - [0:0] :ufw-before-output - [0:0] :ufw-before-forward - [0:0] :ufw-not-local - [0:0] # End required lines   # allow all on loopback -A ufw-before-input -i lo -j ACCEPT -A ufw-before-output -o lo -j ACCEPT  # quickly process packets for which we already have a connection -A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT  # drop INVALID packets (logs these in loglevel medium and higher) -A ufw-before-input -m conntrack --ctstate INVALID -j ufw-logging-deny -A ufw-before-input -m conntrack --ctstate INVALID -j DROP  # ok icmp codes for INPUT -A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT  # ok icmp code for FORWARD -A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-forward -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT  # allow dhcp client to work -A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT  # # ufw-not-local # -A ufw-before-input -j ufw-not-local  # if LOCAL, RETURN -A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN  # if MULTICAST, RETURN -A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN  # if BROADCAST, RETURN -A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN  # all other non-local packets are dropped -A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny -A ufw-not-local -j DROP  # allow MULTICAST mDNS for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 224.0.0.251 --dport 5353 -j ACCEPT  # allow MULTICAST UPnP for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 239.255.255.250 --dport 1900 -j ACCEPT  # don't delete the 'COMMIT' line or these rules won't be processed COMMIT   PS: I didn't expect this to "fix" the issue but just for reference I changed the port SSHD listens on (and the corresponding rule) and the problem persists. The 1st law of thermodynamics If a gas expands adiabatically will the work done be positive or negative?  I think it will be positive as $\delta W=p dV$ and we have a positive sign due to the work done by the gas is positive as it pushes to expand. But this site has the negative of the answer I obtain.   (See adiabatic processes section) how to left justify comments to indent same as other text in Algorithmic How do I left justify my comments in the algorithm.  I am using algorithmicx package.  What I want is: to pull the comment to left as shown in the attached snapshot.  The code for my algorithm is       \documentclass[a4paper]{article}     \pagestyle{empty}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage[caption=false,font=footnotesize]{subfig}     \begin{document}     \begin{algorithm} \label{algoQ}     \caption{Algorithm to check quality of methods}     \begin{algorithmic}     \For{\textbf{each} $msd$ in$msdList$}  \Comment { \% for each MSD \%}     \Statex   \Comment { \% get MSDs referenced method service \%}     \EndFor \textbf{endFor}     \end{algorithmic}     \end{algorithm}     \end{document} Two ethernet ports on motherboard. How can I get double the bandwidth? Direct Question:  My evga classified motherboard has two ethernet ports.  I want to use them simultaneously to improve the speed of a remote connection.  (Yay for programming remotely).  How do I do this?  At present /etc/network/interfaces:  auto lo eth0 eth1  iface lo inet loopback  iface eth0 inet static address 192.168.1.202 netmask 255.255.255.0 gateway 192.168.1.2  ifrace eth1 inet static address 192.168.1.201 netmask 255.255.255.0   What should I change? Is there a package I need to install to bond the two channels.  Background: I do a lot of remote computing both from home to office and office to home.  But (to take my ISP out of the equation), let's frame the question as if I'm really just interested in maximizing the file transfer rate between two computers on the same (local) network.  Both boxes have dual ethernet motherboards.  Using a simple Linksys WRT54GS as a 5 port switch (ignore wireless and isp) -- how do I maximize the transfer rates between the computers?  Please Note: I'm not interested in load balancing -- Correct me if I'm wrong, but I want to bond the two channels together so that the box appears as if it has one connection that's twice as fast. Does anyone know the name of travel posters from the 1930s? Is there a name for this design style - use of flat colours for dimension and shading - that was so prevalent in UK travel posters of the 1930s? Intuition for Smooth Manifolds Consider the graphs of the functions $f_1(x) = |x|$, and $f_2(x) = x$ under the subspace topology of $\mathbb{R}^2$.   Both of these graphs are smooth manifolds, just pick coordinate charts to be $(x, f_i(x)) \leftrightarrow x$.   Moreover, they are diffeomorphic via the map $(x, f_1(x)) \rightarrow (x, f_2(x))$.   This seems to clash with my intuition. For example, the graph of $f_1$ has a corner, so it "shouldn't" be smooth, much less diffeomorphic to $f_2$, which is just a straight line.   Can someone explain what's going on here?   In light of these examples, how should I visualize smooth manifolds and diffeomorphisms? Can you help me with my capacity planning? This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?