I have this electronics that uses 3V rechargeable coin cell battery (ML2032) to power the RTC when the system is off. When the system is powered on it'll trickle charge the battery instead.  I'm looking for ways to allow the usage of regular non-rechargeable CR2032 battery instead. One way I see people doing on Amiga, which also uses 3V rechargeable battery, is to simply add a Schottky diode in series. However, I wonder if there is something even better. To me a voltage drop of at least 0.15V is a lot for a 3V battery.
To power my microcontroller (ATmega8), I am using a ~5.4V voltage source. I want to ensure that I don't accidentally connect the voltage source in reverse, and figured a diode would be a nice way to accomplish this as from what I have learned so far, a diode allows current to flow in one direction, and blocks it in the other.  But what I also learned is that diodes create drops in voltage. I have a few of the typical diodes (1N4001, 1N4148, etc.), and would like to use them to achieve the aforementioned result without dropping the voltage as it would be too low to power the IC.  My question is, is there any way to do this with a diode? Or do I need some other component (if so, what would you recommend)?
rm: cannot remove directory/: Permission denied I made a directory called "shadi" and set this permission for it  sinoosh@ubuntu:/home$ ls -ld shadi drwxr-xrwx 2 root root 4096 Jul  1 01:58 shadi   In this situation I have "others" permissions, but why can I not delete it?  sinoosh@ubuntu:/home$ rm -r shadi/ rm: cannot remove ‘shadi/’: Permission denied Array slices in C# How do you do it? Given a byte array:  byte[] foo = new byte[4096];   How would I get the first x bytes of the array as a separate array? (Specifically, I need it as an IEnumerable&lt;byte&gt;)  This is for working with Sockets. I figure the easiest way would be array slicing, similar to Perls syntax:  @bar = @foo[0..40];   Which would return the first 41 elements into the @bar array. Is there something in C# that I'm just missing, or is there some other thing I should be doing?  LINQ is an option for me (.NET 3.5), if that helps any. I've been battling the following two questions for more than a day today.  Write a regular expression (comprised of {a, b}) that contain at least two b and do not contain abb. Write a regular expression (comprised of {a, b}) that contain abba and do not contain baa.  For the first part I wrote a basic one to start off with that doesn't handle the must two-b: b* OR a* OR (a+ AND b)* OR a*  I ran a few &quot;truth tables&quot; inputs over it and it seems ok. But the moment I add the requirement, things go haywire. Mostly because when pushing in those &quot;b&quot;s, you can suddenly use the OR to break things up. Same thing on the second one.... Any help would be greatly appreciated! Norah Combinatorics That Looks Similar to Vandermonde's Identity How to access the Keyboard Layout Options in 13.10+ I am trying to define an rgb color. More specifically I want to create this color    which in rgb mode it's (98,190,177).  I tried to define this color using the following code  \documentclass{standalone}  \usepackage{tikz}  \begin{document}  \definecolor{tank}{rgb}{0.098,0.190,0.177}  %\definecolor{tank}{rgb}{98,190,177}  \begin{tikzpicture}   \coordinate (tank) at (0,0);   \draw[red, fill=tank] (-2,0.5)--(-0.5,1)--(0.5,1)--(2,0.5)--(2,-0.5)--(0.5,-1)--(-0.5,-1)--(-2,-0.5)--cycle;  \end{tikzpicture} \end{document}   but the output is totally different from what I am trying to achieve    I also tried to use \definecolor{tank}{rgb}{98,190,177} but I get no color at all. How to properly define an rgb color? Inequality similar to the Schwarz-Pick theorem "He was telling me that he is going..." vs. "He told me that he is going..." What's the intuition behind difference of $\neg(S\land E)$ and $\neg S \land \neg E$? Let $S$ represent the English statement "Sales will go up."And let $E$ represent the English statement "Expenses will go up." Now my problem is that I have trouble telling the difference between these two statements: $\neg(S\land Q)$ and $\neg S \land \neg E$. When these two statements are translated into English they sound,to me, the same. However, when you look at their truth tables they are different.   Here is my best translation of these two statements:  1) $\neg(S\land E)$ represented in English, "Both sales and expenses will not go up."(Correct me if I translated it wrong)  2)$\neg S \land \neg E$ represented in English, "Expenses will not go up and sales will not go up."(Again, correct me if I'm wrong)  I still do not understand the difference between these two statements in the English representation. They both sound the same thing to me.  Once more, I have the same trouble I have with understanding with the or-connective( $\lor$ ). Again let E and S be the same statements as before.Tell me if I might have translated them wrong.  1) $\neg (S \lor E)$ represented in English is "Neither sales nor expenses will go up."  2)$\neg S \lor \neg E$ represented in English is "Sales will not go up, or Expenses will not go up."  Yet I still have trouble understanding the difference between the English translation.  In short, can you give me some alternative example that better explains the difference, something intuitive that gives me a clear picture of the difference of the meaning between the statements I showed with the connective-or and connective-and. Thank you. Should you include press interviews and articles about your work in your CV? Is it appropriate to include interviews (published online or in print magazines) in an academic CV?   What about articles/news published about your works? I mean brief (one paragraph) news that professional magazines publish about significant research articles.  If yes, how do you do this to avoid exaggeration? At the end of Billions, Season 3, Episode 9, Grigor Andolov (John Malkovich) tells a story to Bobby Axelrod (Damian Lewis) about the Christmas market in Moscow. He asks a question about what happened to a boy:  Andolov: Many years ago, I was walking along the Moskva Christmas market. You ever seen Moskva Christmas market? Always a sense of good cheer, even during the lean years. I think it was the wine. They serve warm wine with the spices in it... cinnamon and... I was waiting on the line — everyone was always waiting on the line — and finally I got my cup, I turn, and there was this little boy. Runny nose. He looking at me so desirous of my cup of this warm, warm wine that I give him a sip. He stares at me with such a gratitude. And then I notice his mother. Plump breasts. She must have known someone. So I give him my cup of wine. And I take his mother away from the square. Behind the soldiers. And after, I leave her for the soldiers. And I walked back, and this little boy is staring at me with his greedy drunken eyes. Do you know what happened to him? Axelrod: No. Andolov: I always ask. No one ever knows.  What is the real meaning of this story? And how is it connected to the Axelrod – Andolov relationship? I have to find the limit of this sum: $$\sum_{r=1}^{\infty}\cot ^{-1}(r^2+\frac{3}{4})$$  I tried using sandwich theorem , observing:  $$\cot ^{-1}(r^3)\leq\cot ^{-1}(r^2+\frac{3}{4})\leq\cot ^{-1}(r^2)$$  Now when I was calculating the limit of left hand expression, I convert it to $\tan^{-1}$, by using:  $$\tan^{-1}\frac{1}{x} = \cot^{-1}x$$  but couldn't sum up the terms of arctan series.     How can I proceed?   Is there any better way ? Do fontsize environments exist? Without any doubt there are fontsize switches in the form of control sequences (described  for instance.) But, from time to time I ran into code examples where environment versions of those were used, e.g. \begin{small}...\end{small}. After testing those successfully I began to incorporate them into my TeX vocabulary.  A few days ago @GonzaloMedina commented on one of my answers that those environments do not exists and constructions relying on them work by pure coincidence. Then I tried to find out more about those ominous environments. Ominous because they don't seem to be somehow documentated. (The only thing I found that tried to explain them in a somehow systematical manner was some Wikibooks resource.)  Are these environments real or not? Fancy Chapter Headings Style I would like make a fancy chapter like the figure.    However, i made this code  \documentclass[12pt,a4paper]{book}   \usepackage{lmodern} \usepackage{titlesec} \usepackage{microtype} \usepackage{tikz}    \titleformat{\chapter}[display]   {\normalfont\bfseries\color{black}}   {%\filleft%     \begin{tikzpicture}     \node[       outer sep=-10pt,       text width=2.5cm,       minimum height=3cm,       fill=black,       font=\color{white}\fontsize{80}{90}\selectfont,       align=center       ] (num) {\thechapter};     \node[       rotate=0,       anchor=south,       font=\color{black}\Large\normalfont       ] at ([yshift=43pt,xshift=30]num.west)  {\textls[180]{\textsc{\chaptertitlename}}};       \end{tikzpicture}%  }    {-90pt}   {\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE\sffamily \raggedright }    \begin{document} \chapter{The Singular Sturm-Liouville Problems in Spectral Parameter}    \end{document}      that produces this one    How can I produce the chapter like the First Figure? Two column float with [t] using the cas-dc template I am using the cas-dc template for Elsevier. When trying to use \begin{figure*}[t], except I get the error 'The module 'cas/fig' does not have a key called 'cas/fig/t'. Other templates I use work fine. I have included \usepackage{stfloats}. I don't see anything mentioned that strictly forbids it, unless I missed this. Anyone know why? What do the words 'RELATED' and 'ESTABLISHED' individually signify in RELATED,ESTABLISHED state in iptables? compare two columns of different files and print if it matches I am using Solaris 10 and so grep options involving -f don't work.  I have two pipe-separated files:   file1:  abc|123|BNY|apple| cab|234|cyx|orange| def|kumar|pki|bird|   file 2:   abc|123| kumar|pki| cab|234   I would like to compare the first two columns of file2 with file1 (search through the entire contents of file1 in first two columns) if they match print the matched line of file1. Then search for the second line of file 2 and so on.   Expected Output:  abc|123|BNY|apple| cab|234|cyx|orange|   The files I have are huge, containing about 400,000 lines, so I would like to make the execution fast. I am using Ubuntu 12.04.  My /etc/network/interfaces file consists of:    # The loopback network interface   auto lo   iface lo inet loopback     # The primary network interface   auto eth0  iface eth0 inet static   address 192.168.1.58   gateway 192.168.1.1 network 192.168.1.0   broadcast 192.168.1.255 dns-nameservers 66.212.63.228 66.212.48.10     I ran the command: /etc/init.d/networking restart  Which responded with:   *Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces   *Reconfiguring network interfaces...   RTNETLINK answers: File exists   Failed to bring up eth0   [ OK ]     Next I ran ping google.com and received:    ping: unknown host google.com   I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses? Continuous function does not map closed set to closed set I am new to the netplan on Ubuntu 18.04, just discovered it exists today. I have an interface that I am trying to add to create a floating IP on google cloud. It is based on this example:   I tested the example, and it works, but now I try to do the same on ubuntu, and I don't know how to convert this:  cat &lt;&lt; EOF &gt;&gt; /etc/network/interfaces auto eth0:0 iface eth0:0 inet static     address 10.190.1.1     netmask 255.255.255.255 EOF   to netplan.  The output for ls /etc/netplan is '50-cloud-init.yaml'. and the output for cat /etc/netplan/*.yaml is:  network:     version: 2     ethernets:         ens4:             dhcp4: true             match:                 macaddress: 42:01:0a:8e:00:3e             set-name: ens4   my ifconfig:  # ifconfig  ens4 ens4: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1460     inet 10.142.0.62  netmask 255.255.255.255  broadcast 0.0.0.0     inet6 fe80::4001:aff:fe8e:3e  prefixlen 64  scopeid 0x20&lt;link&gt;     ether 42:01:0a:8e:00:3e  txqueuelen 1000  (Ethernet)     RX packets 9430  bytes 1635180 (1.6 MB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 13383  bytes 1513428 (1.5 MB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   What is the equivalent of what he said to put in the file, for netplan?