Python: Change Text Color Based on Var Value
How to print colored text to the terminal?
How to deserialize a JSON String to Apex What if the hard disk is partitioned into more than 26 sections in Windows? Passing an array as a function parameter in JavaScript Prove that if prime $p$ divide $a_{2k}-2$, then $p$ divide also $a_{2k+1}-1$. I stumbled upon an example, which needed to be compiled with the additional option --shell-escape. Using this option it worked just fine, but I'm curious:     Why or when is this option needed and what does it actually do? When I went to the review overview on Meta on 08.01.2015, 19:16, it listed two open items in the suggested-edits queue, however when I clicked on the queue, I was told that the queue had been cleared. When I went back to the review overview, however, the edits were there again.  Since the icons for recent reviews had not moved, I suppose that these were still the same two items waiting for review, and since phenomenon lasted for half an hour now, I would rule out  or  to be the reason for this.  After a while, the phenomenon ceased, with one new reviewer popping up in the icon list of recent reviewers.  I had not performed or skipped any suggested-edit review from the queue at that point.    A similar phenomenon occurred for several hours up to 11.04.2015, 11:05: The review overview showed two suggested edits and when I went to the suggested-edits queue, it was cleared. Sometimes, edits that I could review appeared, but two phantom edits remained. I have a file containing lists on Solaris:  List A hi hello hw r u  List B Hi Yes  List C Hello   I need to transpose the lists as shown below:  List A    List B    List C hi        Hi        Hello hello     Yes hw r u   How can I do this on Solaris? Escape a string for a sed replace pattern C# - how can I get owner's name for a Mutex I have a shared mutex between 2 applications. I want to create an administration console that shows the current owner's name of the mutex.  How can I get the application name that currently owns the Mutex? How to call child component controller function/helper from Parent Component Controller I have requirement to call a child controller function from parent controller whenever the event occurs in parent side.  for e.g  ABC is parent component and DCE is child component, this child component has Span of Text tag and X symbol. when I click on x it is clearing the value using child controller. ABC parent component has Form element and child component is one one of in form.  My requirement is to clear the this child component value when parent component button is clicked.  here is the below sample code of what am trying because i cannot post actual code here  ParentComponent.cmp     &lt;aura:registerEvent name="clrValues" type="c:ClearValues"/&gt;     &lt;div&gt;          &lt;c:ChildComponent textValue="test"/&gt;          &lt;ui:button label="Save"/&gt;          &lt;ui:button label="Clear" press="{!c.clear}"/&gt;           &lt;/div&gt;  &lt;/aura:component&gt;   ParentController.js  ({     clear : function(component, event, helper) {         var evtFire = component.getEvent("clrValues");          evtFire.fire();     } })   ClearValues.evt  &lt;aura:event type="APPLICATION" description="Event template" /&gt;   ChildComponent.cmp  &lt;aura:component &gt;     &lt;aura:handler name="setValues" event="c:ClearValues" action="{!c.clear}"/&gt;     &lt;aura:attribute name="textValue" type="String" default="test"/&gt;     &lt;div &gt;     &lt;ui:inputText label="Expense Name" value="{!v.textValue}" aura:id="input1"/&gt;     &lt;/div&gt;  &lt;/aura:component&gt;   ChildController.js  ({     clear : function(component, event, helper) {         helper.clearValues(component,event);     } }) How to diagnose computer lockups and freezes? Wirtinger Inequality: $\int_0^1 f'^2 \geq \pi^2 \int_0^1 f^2 $ I have a  basic question  Let $f$ be a $\mathcal{C}^1$  map  from  $[0,1]$ into $\mathbb{R}$ vanishing in $0$ and $1$. I want to prove that   $$\int_0^1 f'^2 \geq \pi^2 \int_0^1 f^2 $$  and to see when we have equality. Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals A I ran across this problem in my Analysis class and can't seem to come up with a good solution. Here's the question: Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals $A$. $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$.  I tried applying the Mean Value theorem like this: There exists a $c \in (a, x)$ st $f(x)-f(a)=f'(c)(x-a) \implies \frac{f(x)-f(a)}{x-a}=f'(c) \implies f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{c\to a}f'(c)=A$  However, I think this is wrong. I am pretty sure the Mean Value theorem is needed, but my application of it seems to be incorrect. Would somebody be able to point me in the right direction? How do I use/change Animation Extrapolation? (Can't find F-Curves / Animation Modifiers in 2.8(1)) I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them. I often see $I(t)\propto |E(t)|^2$. What is the exact form ? Which constants are missing to make this an equality and why are they so often omitted ? Articles: When do I use "a", "the", or "__"? MCMC in a frequentist setting I have been trying to get a sense of the different problems in frequentist settings where MCMC is used. I am familiar that MCMC (or Monte Carlo) is used in fitting GLMMs and in maybe Monte Carlo EM algorithms. Are there more frequentist problems where MCMC is used? N circles in the plane Java FileReader encoding issue I tried to use java.io.FileReader to read some text files and convert them into a string, but I found the result is wrongly encoded and not readable at all.  Here's my environment:   Windows 2003, OS encoding: CP1252 Java 5.0   My files are UTF-8 encoded or CP1252 encoded, and some of them (UTF-8 encoded files)  may contain Chinese (non-Latin) characters.  I use the following code to do my work:     private static String readFileAsString(String filePath)     throws java.io.IOException{         StringBuffer fileData = new StringBuffer(1000);         FileReader reader = new FileReader(filePath);         //System.out.println(reader.getEncoding());         BufferedReader reader = new BufferedReader(reader);         char[] buf = new char[1024];         int numRead=0;         while((numRead=reader.read(buf)) != -1){             String readData = String.valueOf(buf, 0, numRead);             fileData.append(readData);             buf = new char[1024];         }         reader.close();         return fileData.toString();     }   The above code doesn't work. I found the FileReader's encoding is CP1252 even if the text is UTF-8 encoded. But the JavaDoc of java.io.FileReader says that:     The constructors of this class assume   that the default character encoding   and the default byte-buffer size are   appropriate.   Does this mean that I am not required to set character encoding by myself if I am using FileReader? But I did get wrongly encoded data currently, what's the correct way to deal with my situtaion? Thanks.