Even in Binary or Text mode it is working(image,document,...). Then what is the real use of these mode and how to use them.    #include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; int main() {     FILE *fp;     unsigned char buffer[756396];       fp=fopen("ref.jpg","r");    //rb     if(fp==NULL)     {         printf("File not present");         exit(0);         }     else         fread(buffer,sizeof(buffer),1,fp);       fclose(fp);     fp=fopen("ref1.jpg","w");  //wb     if(fp==NULL)     {         printf("File can not be created");         exit(0);         }     else         fwrite(buffer,sizeof(buffer),1,fq);     fclose(fp);     return 0; }    output  Above code create a copy of an image   I want to know the real time application of where and when to use them.
What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i &lt; 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text);
I would like to find the correlation between a continuous (dependent variable) and a categorical (nominal: gender, independent variable) variable. Continuous data is not normally distributed. Before, I had computed it using the Spearman's $\rho$. However, I have been told that it is not right.  While searching on the internet, I found that the boxplot can provide an idea about how much they are associated; however, I was looking for a quantified value such as Pearson's product moment coefficient or Spearman's $\rho$. Can you please help me on how to do this? Or, inform on which method would be appropriate?  Would Point Biserial Coefficient be the right option? How do I reset a lost administrative password? I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution? How do I loop through or enumerate a JavaScript object? Differences between Verb + to be + adjectives and Verb + adjective When you use the allowframebreaks option in beamer then you get additional frames if the content is too high for one frame. The vertical spacing gets disturbed when you use a list (itemize, enumerate, description), for example, see the following animation. I used the t option (for top alignment) for the frame.     \documentclass[aspectratio=169]{beamer}   \begin{document}  \begin{frame}[t,allowframebreaks] \frametitle{Frame Title} \setlength{\mylength}{\baselineskip} \begin{itemize} \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \end{itemize}  \end{frame}  \begin{frame}[t,allowframebreaks] \frametitle{Frame Title}  Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\ Text\\  \end{frame}  \end{document}    I thought of a solution, when I read  question where they explain the different length in lists. The main idea is to check if the current frame is not the first frame of a frame continuation and add the needed vertical space. I thought that \topsep is the needed length but apparently, it is not quite right. It ist almost perfect but it still "dances" a little bit. Which additional length do I need? Here's the animation and the used code.     \documentclass[aspectratio=169]{beamer}  \setbeamertemplate{frametitle continuation}{%     (\insertcontinuationcount)%     \ifnum\insertcontinuationcount&gt;1%     \vspace*{\topsep}%     \else%     %     \fi% }  \begin{document}  \begin{frame}[t,allowframebreaks] \frametitle{Frame Title}  \begin{itemize} \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \item Test \end{itemize}  \end{frame}  \end{document}   Related        Definition of \itemize in beamer  In beamerbaselocalstructure.sty I found  \renewcommand{\itemize}[1][]{%   \beamer@ifempty{#1}{}{\def\beamer@defaultospec{#1}}%   \ifnum \@itemdepth &gt;2\relax\@toodeep\else     \advance\@itemdepth\@ne     \beamer@computepref\@itemdepth% sets \beameritemnestingprefix     \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%     \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%     \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%     \list       {\usebeamertemplate{itemize \beameritemnestingprefix item}}       {\def\makelabel##1{%           {%             \hss\llap{{%                 \usebeamerfont*{itemize \beameritemnestingprefix item}%                 \usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%           }%         }%       }   \fi%   \beamer@cramped%   \raggedright%   \beamer@firstlineitemizeunskip% }   But I do not understand where the different kinds of spaces are defined that cause the "dancing".  "Evil" Stuff in beamer  Motivated by the comment of @cfr I searched the beamer documentation for "evil" stuff -- this is what I have found (beamer guide version 3.41):   Do not use subsubsections, they are evil. Never ever use the evil option shrink.  Using this [again shrink] option is very evil. The use of this [allowframebreaks] option is evil. Decode JWT Token in Apex I am trying decode JWT token in apex, and i am not sure how that can be done. If anyone has done that before, please let me know the process.  A JWT token is sent to SFDC and need to decode it in apex class.  Questions: 1) Can we decode the JWT using any standard salesforce classes, if yes what class and method? 2) Or do we need to decode it with our custom code -- if so can you provide an example. Why is __init__() always called after __new__()? I'm just trying to streamline one of my classes and have introduced some functionality in the same style as the .  However, I'm a bit confused as to why __init__ is always called after __new__. I wasn't expecting this. Can anyone tell me why this is happening and how I can implement this functionality otherwise? (Apart from putting the implementation into the __new__ which feels quite hacky.)  Here's an example:  class A(object):     _dict = dict()      def __new__(cls):         if 'key' in A._dict:             print "EXISTS"             return A._dict['key']         else:             print "NEW"             return super(A, cls).__new__(cls)      def __init__(self):         print "INIT"         A._dict['key'] = self         print ""  a1 = A() a2 = A() a3 = A()   Outputs:  NEW INIT  EXISTS INIT  EXISTS INIT   Why? Basic question about Merging faces I'm a beginner with blender so this is probably a very basic question.  I have this basic model below. I've ended up with a lot of unwanted geometry that I want to simplify. I wanted to start by merging the two selected faces below but no matter what I try to delete or merge it just destroys the geometry.  How can I achieve what I want to do (which is combining all of the unwanted geometry, either starting with this merge or some other way?) Show that $a^{q-1} \equiv 1 \pmod{pq}$ Assume that $p$ and $q$ are distinct add primes such that $p-1\mid q-1$. If $\gcd(a,pq)=1$ ,show that: $$a^{q-1} \equiv 1 \pmod{pq}$$   I have tried as follows: $$a^{q-1} \equiv 1 \pmod{q} \quad \text{and} \quad a^{p-1} \equiv 1 \pmod{p}$$ $$\implies a^{(q-1)(p-1)} \equiv 1 \pmod{q} \quad \text{and} \quad a^{(q-1)(p-1)} \equiv 1 \pmod{p}$$ $$\implies a^{(q-1)(p-1)} \equiv 1 \pmod{pq}$$ But then I am stuck - please help. MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter: Is a string literal in c++ created in static memory and destroyed only when the program exits? Expectation of Exit Time of Brownian Motion from Interval I am trying to solve the following:  Let $W_t$ be a brownian motion and $a,b &gt;0.$  Define $\tau$ to be the exit time of $W_t$ from $[-a,b]$, that is $$\tau = \inf\{t \ge 0\ :\ W_{t}(\omega) \notin [-a,b]\}.$$  Show that $\tau$ is integrable and compute $\mathbb{E}(\tau)$.  I have seen this stated without proof multiple places that $\mathbb{E}(\tau)=ab.$  What is the logical argument that backs up this statement?  How are we guaranteed $\tau$ is integrable? I want to burn a Windows ISO to a USB device in Ubuntu. How do I do this?   I know how to burn a Ubuntu ISO into a USB device, but with a Windows ISO it's not the same. I was just testing Eevee and found that you cannot view a glass object through another glass. Is there any workaround? It works fine only If I rotate the glass window or put my camera to the back side of the scene Downloading all photos from iCloud Photo Library without Photos app postfix - how to prevent users from sending with another users name Even though my postfix server cannot be used without authentification (open relay), sending mail in another users name after logging in is still possible like this:  EHLO domain.org auth plain eW91IGxpdHRsZSBkaXJ0eSBiYXN0YXJkIDstKQ== 235 2.7.0 Authentication successful mail from: otheruser@domain.org 250 2.1.0 Ok rcpt to: recipient@otherdomain.org 250 2.1.5 Ok data 354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt; Please send me your account info. . 250 2.0.0 Ok: queued as D40692A61AA quit   How can this be prevented? Distribution of sum of exponentials Let $X_1$ and $X_2$ be independent and identically distributed exponential random variables with rate $\lambda$. Let $S_2 = X_1 + X_2$.  Q: Show that $S_2$ has PDF $f_{S_2}(x) = \lambda^2 x \text{e}^{-\lambda x},\, x\ge 0$.  Note that if events occurred according to a Poisson Process (PP) with rate $\lambda$, $S_2$ would represent the time of the 2nd event.   Alternate approaches are appreciated. The approaches provided are commonly used when learning queueing theory &amp; stochastic processes.     Recall the Exponential distribution is a special case of the Gamma distribution (with shape parameter $1$). I've learned there is a more general version of this  that can be applied. What is rank deficiency, and how to deal with it? How to properly write multiple authors in bibtex file? Ready-to-Use Database models example Where can I find ready-to-use database models ?  I don't need a database with data in it, but only schemas (UML diagrams). Perhaps something like the , but much more complex and real world.