It is confusing to me that = seems to assign values to variables as it usually does in other languages, but what does : do?   I feel like it is assigning functions or some other stuff to a variable.   What exactly it is doing?  Here is an example:  import React from 'react';  const MyComponents = {   DatePicker: function DatePicker(props) {     return &lt;div&gt;Imagine a {props.color} datepicker here.&lt;/div&gt;;   } }  function BlueDatePicker() {   return &lt;MyComponents.DatePicker color="blue" /&gt;; }   The colon is after DatePicker
I'm learning JavaScript and while browsing through the jQuery library I see : (colon) being used a lot. What is this used for in JavaScript?   // Return an array of filtered elements (r) // and the modified expression string (t)    return { r: r, t: t };
How do lexical closures work? What's the easiest way to use a linked list in python? In scheme, a linked list is defined simply by '(1 2 3 4 5). Python's lists, [1, 2, 3, 4, 5], and tuples, (1, 2, 3, 4, 5), are not, in fact, linked lists, and linked lists have some nice properties such as constant-time concatenation, and being able to reference separate parts of them. Make them immutable and they are really easy to work with! Correlations between continuous and categorical (nominal) variables 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 fix my USB drive to get its original 8GB size back? My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive. Can a hotel kick you out if you let an unregistered guest share a room with you? OSGi/Felix Declarative Services: How to filter the services to be bound? I am using Apache Felix and its Declarative Services (SCR) to wire the service dependencies between bundles.  For example, if I need access to a java.util.Dictionary I can say the following to have SCR provide one:  /** * @scr.reference name=properties interface=java.util.Dictionary */  protected void bindProperties(Dictionary d) { }  protected void unbindProperties(Dictionary d) { }   Now, I have more than one Dictionary service available, and I want to filter them using the "name" service property (I only want "name=myDictionary"). I can do that with code (using a ServiceTracker), but I'd rather specify the filter in the @scr annotation instead. With all the various races in the federation, how do the humans manage to dominate it? Compiler error C3493: 'func' cannot be implicitly captured because no default capture mode has been specified According to HTML specs, the select tag in HTML doesn't have a readonly attribute, only a disabled attribute. So if you want to keep the user from changing the dropdown, you have to use disabled.  The only problem is that disabled HTML form inputs don't get included in the POST / GET data.  What's the best way to emulate the readonly attribute for a select tag, and still get the POST data? Let $a, b, \&amp; \, m$ be integers. Prove that if $2a + 3b \geq 12m + 1$, then $a \geq 3m + 1$ or $b \geq 2m + 1$.   My Attempt: I don't conceive apace how to contrive, from the one inequality in the antecedent, the two inequalities in the consequent. So a proof by contraposition may be more facile. The contrapositive is: $\text{If }  \color{Green}{a &lt; 3m + 1} \; \&amp; \; \color{#0073CF}{b &lt; 2m + 1}, \text{ then } 2a + 3b &lt; 12m + 1 \tag{*}.$  From $(*)$, $\color{Green}{2a} + \color{#0073CF}{3b} &lt; \color{Green}{6m + 2} \; + \;\color{#0073CF}{6m + 3} = 12m +5$. But this doesn't prove $(*)$.     Given Solution:  Assume that $a &lt; 3m+1$ and $b &lt; 2m+1.$ Since a and b are integers, $a ≤ 3m$ and $b ≤ 2m.$ Therefore, $2a + 3b ≤ 2(3m) + 3(2m) = 12m &lt; 12m+ 1,$ as desired. $\blacksquare$   What went wrong in my attempt? I understand the given solution but I persisted with the more natural and direct green and blue, instead of deviating to weak inequalities. Shouldn't both solutions work?  Source: Problem 4.19 on P102 (related to P90, Result 4.8) of Mathematical Proofs, 2nd ed by Chartrand et al.    $\large{\text{Supplement to Cameron Buie and pritam's Answers :}}$  What overriding, catholic lessons can be extrapolated from this example to generalise about inequalities?   Moreover, in order to circumvent the problem here (ie the loss of information from the weaker inequalities), should I always start with the strictest inequality? If so, should I always rework any weak inequality into the equivalent strict inequality?   For example, define $r \in \mathbb{R} $ and $n \in \mathbb{Z}$ and $g(...) \neq h(...)$. Then $ f(r) &lt; h(r) \require{enclose}      \enclose{updiagonalstrike}{\iff} f(r) \leq g(r).$ But $ f(n) &lt; h(n) \text{ MAY OR MAY NOT }\iff f(n) \leq g(n).$ obtain a three-term asymptotic solution problem with surfaces on tkz-fct i am using this wonderful tool that tkz-fct is for creating nice documents but I have a weird result from recently. This is my document :  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{calc} \usepackage{color} \usepackage{pifont}                     %pour utiliser la police Ding \usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry} %marges du document \usepackage[french]{babel} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[L]{thmbox} \usepackage{eurosym} \usepackage{enumitem}               %pour modifer itemize et enumerate \usepackage{amsmath,amsfonts,amssymb} \usepackage{mathrsfs}               %pour utiliser mathscr \usepackage{array,multirow,makecell} \usepackage{fancyhdr}               %package pour modifier les en-têtes \usepackage{fancybox}               %pour boîtes spéciales \usepackage{tikz,tkz-tab,tkz-fct} \usepackage{tikz-dependency}        %permet de créer des schemas \usepackage{sectsty}                %permet de modifier les styles des sections (voir \sectionfont l.21) \usepackage{fourier-orns} \usepackage{shadethm}               %pour theoremes en gris \setcellgapes{1pt} \makegapedcells \newcolumntype{R}[1]{&gt;{\raggedleft\arraybackslash }b{#1}}   %pour redéfinir les colonnes dans tabular \newcolumntype{L}[1]{&gt;{\raggedright\arraybackslash }b{#1}} \newcolumntype{C}[1]{&gt;{\centering\arraybackslash }b{#1}} \renewcommand{\thesection}{\Roman{section}} %permet de changer la numérotation en chiffres romains des sections \newshadetheorem{defi}{Définition}  %crée un nouveau type de théorème \newshadetheorem{thm}{Théorème} \newshadetheorem{ppte}{Propriété} \sectionfont{\sectionrule{3ex}{3pt}{-1.5ex}{1pt}} %mettre un trait de séparation dans les sections (package sectsty) \pagestyle{fancy} %style en-têtes \lhead{} %en-tête gauche \chead{Lois à densité} %en-tête centrale \rhead{T\up{ale}} %en-tête droite \begin{document} \begin{tikzpicture}      \tkzInit[xmin=-4,xmax=4,ymax=1]      \tkzDrawX[label={},noticks]      %\tkzDrawY      \tkzFct[domain=-2:2]{exp(-x**2)}      \tkzDrawArea[color=blue, domain = -0.5:1]      \tkzText(-1,0.75){$\mathscr{C}_{f}$} \end{tikzpicture} \end{document}   But from now, it doesn't produce the result I would like as the surface start from the point (-0.5,f(-0.5)) and not as an integral from -0.5 to 1. This is a picture of the result :   Which is obviously not what I would like and this extends now to all my "old" docs which were "normal" before. I don't think I have done anything special except updating my Tex distribution ... If someone has an idea ?? It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference? I am trying to install Wordpress on Lubuntu. I followed the instructions . Including PHP Apache and MySQL setups. Apache and MySQL appear to be running fine.  However, when I go to http://localhost/blog/, I get the following error:     Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/config-localhost.php could be found.   Ensure one of them exists, is readable by the webserver and contains the right password/username. Among other sources,  states that triple DES using three seperate keys (k1, k2, k3) is vulnerable to meet-in-the-middle-attacks, while triple DES using only two keys (k1, k2, k1) is not.  Why is this attack possible if all the keys are different, but not if the first and the third are the same? Why is spectrum obtained by sunlight, said to be continuous? My teacher spoke about atomic spectra today, and he explained that, unlike the spectrum obtained by analyzing the sunlight, the spectra of atoms are not continuous.     I have a question about this - even the sunlight has the radiations emitted by the atoms of the elements which compose the sun, still spectra is continuous, which is in opposition to the statement that atomic spectra is discontinuous. So, spectrum obtained by sunlight is continuous even though it atomic spectra. In order to account for spectrum obtained by the sunlight to be continuous and atomic spectra to be discontinuous, can we confirm that sun consists of all those elements (sodium, helium, neon, mercury, etc) which emit the colors of frequency belonging to visible region? How can I list the contents of a .zip folder in c#? How can I list the contents of a zipped folder in C#? For example how to know how many items are contained within a zipped folder, and what is their name? How do you deserialize json properties that are reserved words in apex? Is there any way to deserialize JSON into an object using JSON.deserialize if some of the property names in the JSON are reserved words in apex? I want to do something like this:  string jsonString = '{"currency" : "ABC"}'; public class JSONResult {     public string currency; } JSONResult res = (JSONResult) JSON.deserialize(jsonString, JSONResult.class); system.debug(res);   but of course I get an error that the identifier name is reserved. can u suggest me any short trick of solving these kind of problems. How to find last four digits of any number raised to some power ? Problems with wifi range on laptop. Wifi card: realtek rtl8723be So I just started using linux/ubuntu today and I've been getting problems with my wifi, ive tried the solutions on this page:  When im really close to my router, its fine, i can see wifi signals, but when i go just a few steps back it disappears right away. Im using the latest version of ubuntu 17.10  Any suggestions would be nice! :)