Let's say I have a binary number like: 0101010101. Now I want to negate only the 1st 5th and 8th digit to change it to 1101110001. Is there an algorithm to do this? If so, how does it work?
How do you set, clear, and toggle a bit?
What is the cause of gravitional force of attraction? Ok,this is a silly question. But for quite long I have been thinking about this. What is gravitation all about?? My book directly writes since force of gravitation is directly proportional to the masses and inversly proportional to the square of the distance ie. $$F = G\frac{M_1 . M_2}{r^2}$$ . So is this gravitation all about? What is the cause of it? The book then says     We are not in the scope in classical approach so as to discuss the cause of this. However,as a matter of fact that if there are more than one mass,then there is gravitation as it is their fundamental property.( Cause of gravitation can be attributed to exchange of non-classical particles between the masses) .    Then it ended the talkings. What are those non-classical particles? Why and how are they exchanged? So far I have studied physics , I never found such weird phenomenon like this. I want to know what is the cause of gravitation and what is the cause of exchange of those so-called non-classical particles? And how do they do it? Why is $5^{n+1}+2\cdot 3^n+1$ a multiple of $8$ for every natural number $n$? I have to show by induction that this function is a multiple of 8. I have tried everything but I can only show that is multiple of 4, some hints? The function is $$5^{n+1}+2\cdot 3^n+1 \hspace{1cm}\forall n\ge 0$$, because it is a multiple of 8, you can say that$$5^{n+1}+2\cdot 3^n+1=8\cdot m \hspace{1cm}\forall m\in\mathbb{N}$$. What is the isomorphism between the fields $(Z_2[x]^{<3},+_{x^3+x^2+1},\times_{x^3+x^2+1})$ and $(Z_2[x]^{<3},+_{x^3+x+1},\times_{x^3+x+1})$? Show that $\sum\nolimits_{d|n} \frac{1}{d} = \frac{\sigma (n)}{n}$ for every positive integer $n$. Show that $\sum\nolimits_{d|n} \frac{1}{d} = \frac{\sigma (n)}{n}$ for every positive integer $n$.   where $\sigma (n)$ is the sum of all the divisors of $n$ and $\sum\nolimits_{d|n} f(d)$ is the summation of $f$ at each $d$ where $d$ is the divisor of $n$.    I have written $n=p_1^{\alpha_1}p_2^{\alpha_2}p_3^{\alpha_3}.......p_k^{\alpha_k}$ then:- $$\begin {align*} \sum\nolimits_{d|n} \frac{1}{d}&amp;=\frac{d_2.d_3......d_m+d_1.d_3......d_m+........+d_1.d_2.d_3......d_{m-1}}{d_1.d_2.d_3......d_m}  \\&amp;=\frac{d_2.d_3......d_m+d_1.d_3......d_m+........+d_1.d_2.d_3......d_{m-1}}{p_1^{1+2+...+\alpha_1}p_2^{1+2+...+\alpha_2}p_3^{1+2+....+\alpha_3}.......p_k^{1+2+....+\alpha_k}}  \\ \end{align*}$$ where $d_i$ is some divisor among the $m$ divisors. Then I cannot comprehend the numerator so that to get the desired result.  Also suggest some other approches to this question. Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like this: __myPrivateMethod(). How, then, can one explain this  >>> class MyClass: ...     def myPublicMethod(self): ...             print 'public method' ...     def __myPrivateMethod(self): ...             print 'this is private!!' ...  >>> obj = MyClass() >>> obj.myPublicMethod() public method >>> obj.__myPrivateMethod() Traceback (most recent call last):   File "", line 1, in  AttributeError: MyClass instance has no attribute '__myPrivateMethod' >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] >>> obj._MyClass__myPrivateMethod() this is private!!   What's the deal?!  I'll explain this a little for those who didn't quite get that.  >>> class MyClass: ...     def myPublicMethod(self): ...             print 'public method' ...     def __myPrivateMethod(self): ...             print 'this is private!!' ...  >>> obj = MyClass()   What I did there is create a class with a public method and a private method and instantiate it.  Next, I call its public method.  >>> obj.myPublicMethod() public method   Next, I try and call its private method.  >>> obj.__myPrivateMethod() Traceback (most recent call last):   File "", line 1, in  AttributeError: MyClass instance has no attribute '__myPrivateMethod'   Everything looks good here; we're unable to call it. It is, in fact, 'private'. Well, actually it isn't. Running dir() on the object reveals a new magical method that python creates magically for all of your 'private' methods.  >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod']   This new method's name is always an underscore, followed by the class name, followed by the method name.  >>> obj._MyClass__myPrivateMethod() this is private!!   So much for encapsulation, eh?  In any case, I'd always heard Python doesn't support encapsulation, so why even try? What gives? Change bookmark depth I want all bookmarks after "Anhang" (appendix) to be a level deeper, but I need them to be \chapter{} for the right numbering.  I write a scrbook document and that's what I got:    Is it possible to change the depth of the chapter to act like a section in the bookmarks?  UPDATE  MWE:  \documentclass[12pt,a4paper,oneside]{scrbook}  \usepackage[ngerman]{babel}     % deutsche Worttrennung \usepackage[T1]{fontenc}        % Ausgabe von Sonderzeichen und Akzenten in PDF verbessert \usepackage[utf8]{inputenc}         % Eingabe von Sonderzeichen möglich \usepackage{lipsum}  \setcounter{secnumdepth}{3}     % subsubsections nummerieren \setcounter{tocdepth}{3}        % subsubsections in TOC  \usepackage[ %     pdfproducer={Texmaker},     %      pdfcreator={pdfLaTeX},      %      hidelinks,          % versteckt die Boxen um die Links in der PDF     bookmarksnumbered,      % nummereiert Lesezeichen     ]{hyperref}         % PDF Metainformationen hinzufügen   \begin{document}  \appendix \pagenumbering{alph}  \thispagestyle{empty}  \vspace*{3em} \begin{center} \begin{Huge} \textbf{\textsf{Anhang}} \pdfbookmark{Anhang}{Anhang} \end{Huge} \end{center}  \chapter{Appendix 1}  \chapter{Appendix 2}  \section{Appendix 2.1}  \section{Appendix 2.2}  \chapter{Appendix 3}  \end{document} Does borrowing from my 401(k) make sense in my specific circumstance? I know the standard answer and understand that I will be losing out on that compound interest, but I am young and only need to borrow a few thousand. here are some more details:   Need to borrow $6500 to pay off a car and two student loans ($300/month in payments combined) I am 22 and work full time, making about $70K annually I contribute 8% of my income with a 4% company match I increase that by 2% every year The loan would be over 48 months ($140/month) I live very frugally and have almost no discretionary spending that can be cut (don't eat out all the time, no gym membership/ Netflix/ Apple music etc.) I'm cash-poor: 90% of my salary is going to mortgage, groceries, students loans, car payment, newborn baby medical expenses, and commute. These are not my only debts, just the ones I am seeking to pay off in the short term. I work two jobs, one full and one part time. I started a business, and my wife has two jobs. Working more is not a good answer to the original question.   It seems to me that I would be reducing middle to high interest debt while also saving myself $150 per month.   Loans:     Student loan 1: $1200 @ 5%   Student loan 2: $1100 @ 4.25%   Car Loan: $4000 @ 6% What's the difference between Normalization and Standardization? Varnish cache with Nginx SSL termination How can I use varnish cache with nginx SSL termination for my SSL-Only (Https only) website? I use ubuntu 18.04 and I am currently running a wordpress site on my server. I need to write a small program that can detect that it has been changed. Please give me a suggestion!  Thank you. Passing a formatted NSDate Is there a "previous sibling" selector? Last login: Mon Jun  7 22:43:40 on ttys000 samadams@Sams-MacBook-Pro-2 ~ % diskutil cs list No CoreStorage logical volume groups found samadams@Sams-MacBook-Pro-2 ~ % diskutil list /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *121.3 GB   disk0    1:                        EFI ⁨NO NAME⁩                 536.9 MB   disk0s1                     (free space)                         60.5 GB    -    2:                 Apple_APFS ⁨Container disk1⁩         60.1 GB    disk0s2  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +60.1 GB    disk1                                  Physical Store disk0s2    1:                APFS Volume ⁨MacOS Big Sur - Data⁩    30.0 GB    disk1s1    2:                APFS Volume ⁨Preboot⁩                 233.2 MB   disk1s2    3:                APFS Volume ⁨Recovery⁩                652.6 MB   disk1s3    4:                APFS Volume ⁨VM⁩                      1.1 GB     disk1s4    5:                APFS Volume ⁨MacOS Big Sur⁩           24.4 GB    disk1s5    6:              APFS Snapshot ⁨com.apple.os.update-...⁩ 24.4 GB    disk1s5s1    7:                APFS Volume ⁨Untitled⁩                860.2 KB   disk1s7 How to set systemd for automatically force fsck disks after crash (hard poweroff)?  When I used sysvinit (in Arch Linux) as /sbin/init I used the hack: in the rc.local I create /forcefsck file; in the rc.local.shutdown I remove it. At boot-up rc.sysinit enable force fsck if /forcefsck exists.  How to do same in systemd? Maybe it has built-in facilities for automatic fsck after crush? I am trying to implement  using additive ElGamal.  I am trying to run the full protocol mentioned in Section 3.4 on the following inputs:   $p = 17$ (prime) $g = 6$ (generator) $x = 5$ (private key) $k = g^x \pmod p = 6^5 \pmod{17} = 7$ (public key)   Suppose the clients inputs are 1, 2. Then $P(x) = (x-1)(x-2) = x^2-3x+2$, and therefore the coeffiecients to encrypt are $(1, -3, 2)$. I chose $y = 10$ and so the encrypted values are:   $1$ becomes $(15,12)$ $-3$ becomes $(15, 1)$ $2$  becomes $(15, 4)$.   The Server Side Input Set $S=\{1\}$ and the random value $r0$ corresponding to $\{1\}$ is $r_0=2$.    With the above problem in context, I have some questions:   What does P 0,j refer to in Step 7. Can you please give an example? In Step 8, suddenly variable i is introduced along with j. What does i, j, refer to? In Step 8, ENC() function has a ; in between. How do we interpret ENC(a;b)? Showing that the roots of a polynomial with descending positive coefficients lie in the unit disc. How to obtain the sum of the following series? $\sum_{n=1}^\infty{\frac{n^2}{2^n}}$ It seems that I'm missing something about this.  First of all, the series is convergent: $\lim_{n\rightarrow\infty}\frac{2^{-n-1} (n+1)^2}{2^{-n} n^2}=\frac{1}{2}$ (ratio test)  What I tried to do is to find a limit of a partial sum $\lim_{n\rightarrow\infty}S_n$ as follows: $S_n=\frac{\frac{1}{6} n (n+1) (2 n+1)}{\frac{1-\left(\frac{1}{2}\right)^n}{2 \left(1-\frac{1}{2}\right)}}$. Still, the limit is $\infty$ and I'm clearly doing something wrong. Why can I see the output of background processes? For example, when I type ping 8.8.8.8 &amp;, why can we see ping process working? And when I type find / -name '*test*' &amp; , it's also seen on monitor.  Why is that? Is it not really in background? How could I retrieve the exact duplicate value from conditionally formatted list that highlight duplicates? I have imported a webpage table in to Google Sheets. It frequently being updated. A series of calculations has been conducted on the sheet named Shawn Of the link spreadsheet.  I have filtered the my desired results into the Calculation sheet of that linked document... which is in columns A5:A. I then applied =ARRAYFORMULA(if(A5:A200=&quot;&quot;,,A5:A200*{12,13,37,101,111})) in columns B5. The Results of the formula extends from B5:F. This results from a5:F was subsequently conditionally formatted to highlighted duplicates in the aforementioned, i.e. a5:f using the lists of values in K5:K and I5:5. In Columns A5:F, is it possible to generate/place values in the range A5:f with matching name of states and aligned values in J5:K and H5:I? I have an HTML string representing an element: '&lt;li&gt;text&lt;/li&gt;'. I'd like to append it to an element in the DOM (a ul in my case). How can I do this with Prototype or with DOM methods?  (I know i could do this easily in jQuery, but unfortunately we're not using jQuery.)