I am trying to post images with cURL in PHP using multipart/form-data header.  I want to know what setting the "CURLOPT_POSTFIELDS" for curl.  I want to send like this value for server.  The element name has been used many times.  -----------------------------7e21b0029071a Content-Disposition: form-data; name="updates[]"  1 -----------------------------7e21b0029071a Content-Disposition: form-data; name="set_images[]"  1 -----------------------------7e21b0029071a Content-Disposition: form-data; name="updates[]"  1 -----------------------------7e21b0029071a Content-Disposition: form-data; name="set_images[]"  1 -----------------------------7e21b0029071a Content-Disposition: form-data; name="images[]"; filename="1.JPG" Content-Type: image/jpeg  ** raw image data ** -----------------------------7e21b0029071a Content-Disposition: form-data; name="images[]"; filename="2.JPG" Content-Type: image/jpeg  ** raw image data ** -----------------------------7e21b0029071a Content-Disposition: form-data; name="images[]"; filename="3.JPG" Content-Type: image/jpeg  ** raw image data * -----------------------------7e21b0029071a Content-Disposition: form-data; name="images[]"; filename="4.JPG" Content-Type: image/jpeg  ** raw image data ** -----------------------------7e21b0029071a--   I was teryed this option.  it was not work.  $data = array(     'updates[0]' =&gt; '1',     'set_images[0]' =&gt; '1',     'updates[1]' =&gt; '1',     'set_images[1]' =&gt; '1',     'updates[2]' =&gt; '1',     'set_images[2]' =&gt; '1',     'updates[3]' =&gt; '1',     'set_images[3]' =&gt; '1',     'images[0]' =&gt; new CURLFile('1.JPG'),     'images[1]' =&gt; new CURLFile('2.JPG'),     'images[2]' =&gt; new CURLFile('3.JPG'),     'images[3]' =&gt; new CURLFile('4.JPG'), );  curl_setopt($curl, CURLOPT_POSTFIELDS, $data);   Is it impossible to send the raw data of the first example?
I’ve run into a limitation in the cURL bindings for PHP. It appears there is no easy way to send the same multiple values for the same key for postfields. Most of the workarounds I have come across for this have involved creating the URL encoded post fields by hand tag=foo&amp;tag=bar&amp;tag=baz) instead of using the associative array version of CURLOPT_POSTFIELDS.  It seems like a pretty common thing to need to support so I feel like I must have missed something. Is this really the only way to handle multiple values for the same key?  While this workaround might be considered workable (if not really annoying), my main problem is that I need to be able to do multiple values for the same key and also support file upload. As far as I can tell, file upload more or less requires to use the associate arravy version of CURLOPT_POSTFIELDS. So I feel like I am stuck.  I have  about this problem in more detail on the cURL PHP mailing list in the hopes that someone there has some ideas about this.  Suggestions or hints on where I can look for more information on this are greatly appreciated!
This is Exercise 3.1.A. in      Suppose that $\pi: X\rightarrow Y$ is a continuous map of differentiable manifolds. Show that $\pi$ is differentiable if differentialble functions pull back to differentiable functions, i.e., if pullback by $\pi$ gives mpa $\mathcal{O}_Y\rightarrow \pi_*\mathcal{O}_X$.   Let $f: V\subseteq Y\rightarrow \mathbb{R}$ be a differentiable function on an open subset of $Y$. Let $(U,\phi)$ be a chart of $X$, $(V,\psi)$ be a chart of $Y$. Then $f\circ\pi(\phi^{-1})$ is differentiable and $f\circ\psi^{-1}$ is differentiable. We need to show that $\psi\circ\pi\circ\phi^{-1}$ is differentiable. I don't know how to prove this.   Can we say that since $(U,\psi\circ\pi)$ constructs a chart of $X$, by the compatibility, $\psi\circ\pi\circ\phi^{-1}$ is differentiable? This seems true but this does not use the fact that $f$ is differentiable.  Sorry I have no background of Differentiable Manifolds. Any help would be appreciated.  I also saw this post: , but I don't understand how $\gamma$ is smooth in the answer. $\gamma=\beta\circ\rho$, where $\rho$ is defined to be smooth, but $\beta$ is not. etoolbox and tabularx -- problem with `appto` I'm trying to print worksheets. I have already implemented an automatic numbering for subtasks. I use tabularx for my subtasks (see the MWE below).  Yesterday, I tried to define a new macro called \task that has one optional argument which is the amount of points you can obtain for this particular question. I would like these optional arguments to be gathered with etoolbox's \appto command so that I can print them with my \credits command.  So far, this seems to be ind of struggling as tabularx is working on the tables several times. Every time tabularx calculates the width of X columns the points are appended to \credits which leads to an incorrect list of points.  Is there any way I can solve this problem? I'm currently stucked with this issue.  Plus, I don't know why my \task command does work. Why is the counter subtask not affected by tabularx's several trials?  \documentclass{scrartcl}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage{etoolbox} \usepackage{booktabs} \usepackage{ltablex} \usepackage{xifthen}  \def\credits{} \newcounter{subtask} \setcounter{subtask}{1} \renewcommand{\thesubtask}{\alph{subtask})} \newcommand{\task}[1][]{%     \ifthenelse{\isempty{#1}}{%         \thesubtask%         \stepcounter{subtask}%     }{%         \thesubtask%         \gappto\credits{(#1)}%         \stepcounter{subtask}%     }% }  \begin{document} \begin{tabularx}{\linewidth}[l]{l@{\hspace*{1ex}}X}     \task[1]    &amp;   TEXT1\\     \task       &amp;   TEXT2\\     \task[3]    &amp;   TEXT3 \end{tabularx} \credits \end{document}       The solution given by David Carlisle below causes a table that is too wide. How can this be undone?  \documentclass{scrartcl}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage[a6paper, showframe=true]{geometry}  \usepackage{etoolbox} \usepackage{booktabs} \usepackage{ltablex} \usepackage{xifthen}  \def\credits{} \newcounter{subtask} \setcounter{subtask}{1} \renewcommand{\thesubtask}{\alph{subtask})} \makeatletter \newcommand{\task}[1][]{%     \ifx\hfuzz\@tempdima% %   % tabularx trial do nothing     \else%         \ifthenelse{\isempty{#1}}{%             \thesubtask%             \stepcounter{subtask}%         }{%             \thesubtask%                 \gappto\credits{(#1 BE)\\}%             \stepcounter{subtask}%         }%     \fi } \makeatother   \begin{document}  \begin{tabularx}{\linewidth}[l]{l@{\hspace*{1ex}}X}     \task[1]    &amp;   Some longer text that exceedes the line width.\\     \task[4]    &amp;   TEXT2\\     \task[3]    &amp;   TEXT3 \end{tabularx} \credits  \end{document} On Takodana,      the main characters and various bar patrons can see the planet Hosnian Prime being destroyed by Starkiller Base with their (respective) naked eyes. How did they see this? Is the Hosnian system close enough to see? If it's not very close and they could just see the explosion, how did the light from it reach them so quickly? I couldn't add defer tag in plugin javascripts. Google developer pagespeed test suggests me to add defer tag in contact form 7 javascripts.   This is how contact form 7 includes javascript in header.  add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' );  function wpcf7_enqueue_scripts() {     // jquery.form.js originally bundled with WordPress is out of date and deprecated     // so we need to deregister it and re-register the latest one     wp_deregister_script( 'jquery-form' );     wp_register_script( 'jquery-form', wpcf7_plugin_url( 'jquery.form.js' ),         array( 'jquery' ), '2.52', true );      $in_footer = true;     if ( 'header' === WPCF7_LOAD_JS )         $in_footer = false;      wp_enqueue_script( 'contact-form-7', wpcf7_plugin_url( 'scripts.js' ),         array( 'jquery', 'jquery-form' ), WPCF7_VERSION, $in_footer );      do_action( 'wpcf7_enqueue_scripts' ); }   Now how to add defer="defer" tag in the above code? How is evolution possible in contemporary humans? I would like to know if evolution is continuing to happen in modern humans, assuming things like existence of the nuclear family structure, fidelity to one partner, etc. It seems to me the answer would be NO because evolution depends on differential reproductive rates, but in the modern world, all male humans have roughly 2.5 (or whatever the number) kids. Add in the process of culturally modified selection pressure, and it seems to me that even an "unfit" male would end up having a couple of offspring. The fittest male (or female) is no better off than his or her contemporaries because of this "leveling" effect.   However, the impression I get from the popular science media is that scientists think evolution is continuing to happen. I would like to know what the actual scientific consensus is, and why. Thanks. How to trigger a check for updates in Firefox programatically or from a command line? Is there a command line switch for firefox.exe or an "about:" URL that will either force an update check or at least display the Help/About dialog, which checks for updates and tells if you're running the latest version?    One site claimed that the "about:" URL was the same as menu Help -> About, but it's not.  I built a program to automate the updating of various programs on my machine, and most programs have command line tools for checking for updates. Windows update has wuauclt.exe, Java has jucheck.exe. For some applications, I can even automate the interface, but it's difficult in Firefox, because the main window title is unpredictable (it depends on which web page is active), and all Firefox windows seem to use the exact same window class name. I am really having trouble working a problem in my course. I will post it and then add what I have thought etc.  Let p be an odd prime, then using the Euclidian Algorithm, calculated the GCD of of $x^{p-1}-1$ and $x^2+1$ in $\mathbb{Z} / p\mathbb{Z}[x]$  Also, how does $p=1 (mod4)$ tell us that  $-1$ is a square in $\mathbb{Z} / p\mathbb{Z}$, infact that $-1$ is a square here if and only if $p=1(mod4)$.  My thoughts:   I know that $$x^{p}-x=(x)(x-1)(x-2)…(x-(p-1))$$ and so that in this sense our roots will be the congruence classes of $1,2,…p-1$  and also that $$x^{p-1}-1=(x-1)(x-2)…(x-(p-1))$$  But I get lost when trying to apply the EA to these polynomials,  like how can I do it when p is arbitrary?  Preferably id like to be able to understand/see how to do the first part first i.e. using division with residue and then move on to the second part. Any insight/hint or solution to this would be great,  Thank you all  Update:  When I try to do division with residue, I just get  $$x^{p-1}-1=(x^2+1)(x^{p-3}-x^{p-5}+x^{p-7}-x^{p-9}...)$$  for example,  $p=7$  $$(x^{6}-1)=(x^2+1)(x^4-x^2+1)$$  for $p=11$  $$(x^{10}-1)=(x^2+1)(x^{8}-x^{6}+x^{4}-x^{2}+1)$$  which for specific cases tells me that 1 is the gcd, but I dont know how to generalize that for the case with arbitrary prime p. A similar task for changing the desktop background, can be achieved using the following script:   FILE="/backgrounds/background.png" gsettings set org.gnome.desktop.background picture-uri "$FILE"   How would I achieve the same result, but with the user's avatar/profile picture? Focus in night photography Can I call a constructor from another constructor (do constructor chaining) in C++? As a  developer I'm used to running through constructors:    class Test {     public Test() {         DoSomething();     }      public Test(int count) : this() {         DoSomethingWithCount(count);     }      public Test(int count, string name) : this(count) {         DoSomethingWithName(name);     } }   Is there a way to do this in C++?  I tried calling the Class name and using the 'this' keyword, but both fail. I need to get rid of the GNOME Desktop Environment which has been installed by default when I updated my pc from 15.10 to 16.04.  After a while, I found myself not only with GNOME DE, but also with Cinnamon alongside (in the login screen, I could choose at least five or six DE!)  Now I am using Unity, and I'm happy with that, and I successfully uninstalled Cinnamon, but now I'm afraid that after uninstalling GNOME I will mess up the Unity DE, since I see many packages running in unity with the packagename starting with gnome-... Would someone mind to help me? Thx in advance Pixel Perfect 2D tiles I'm trying to make an 64x64 tilemap using Super Tilemap Editor &amp; Unity but my tiles looks terrible. I did my research about pixel perfect 2D and all of the solutions were for pixel art, they didn't work for me.  I have the following tileset I made in Adobe Illustrator as an example    Tiles looks like this when placed in game (1x zoom)    I'm pretty sure they're not 64x64 in game, they also look pixelated probably because they're smaller than they actually are on camera.  So my question is, how can I calculate the correct camera size for 64x64 tiles and do I have to make any changes in order to make sprites look pixel perfect? I'm currently using 1080/64/2=8.4375 (vertical resolution / PPU / 2) as camera size. Can you make a seismograph with an accelerometer? Actual seismograph electronics are very expensive. I'm just wondering if a seismograph can be made with a adequately semsitive accelerometer. To be exact I want to bury the accelerometer based seismograph and have it sense footsteps.  So is this possible and what method would you reccommend for my needs and why? Limit of integration can't be the same as variable of integration? I am told that an expression like $$ \int_a^x f(x)dx $$ is not well formed, i.e. it should be $$ \int_a^xf(t)dt $$ or similar.  Why is it that the limits of integration can't depend on the variable of integration? Proofs of consistency for two formal systems Do there exist two formal systems, $F_1$ and $F_2$, such that $F_1$ proves $F_2$ is consistent and $F_2$ proves $F_1$ is consistent?  Would these proofs bypass Gödel's Second Incompleteness Theorem?  By "consistent", I mean the formal system does not prove $X$ and NOT $X$. How to safely change OS name in grub boot menu? I have a system where I am dual-booting Ubuntu GNOME 15.10 and Ubuntu GNOME 16.04, however after installing Ubuntu GNOME 16.04, I have found that in the GRUB boot entry list it is called "Ubuntu", whereas the other one is called something like "Ubuntu GNOME 15.10", is there any way I can change the text of the "Ubuntu" one to "Ubuntu GNOME 16.04"? And also change the names of the other options so that instead of "Advanced options for Ubuntu" it says "Advanced options for Ubuntu GNOME 16.04" etc?  I rather do it manually if it is safe to do so, or a piece of software could be recommended, however nothing from a PPA or other untrusted not official source (I will only install software from the Ubuntu official repositories). How can reincarnated souls be summoned using Edo Tensei? Quoting ,     Reincarnation is the philosophical or religious concept that an aspect of a living being starts a new life in a different physical body or form after each biological death. It is also called rebirth or transmigration, and is a part of the Saṃsāra doctrine of cyclic existence.   Then, since Ashura has reincarnated into Naruto, and Indra into Sasuke, how can Uchiha Madara and Senju Hashirama (their previous reincarnation) be summoned using Edo Tensei? I wonder is it legal to register a domain name that contains a company name. For example cococola.cc (considering that this domain name is available). Can I buy and use any domain names that contain a name of a trademark? Why is the speed of light defined as $299792458$ $m/s$? Why did they choose that number and no other number?  Or phrased differently:  Why is a metre $1/299792458$ of the distance light travels in a sec in a vacuum? solution :-  $21= 3 \times 7$  there is only one Sylow $3$ and Sylow $7$ subgroup  so, Sylow $3$ and Sylow $7$ subgroup are normal in group $G$  so $G$ is cyclic group of order $21$.  Am I right ?  somebody told me that group of order $21$ is not cyclic.  he gave me this .  If group of order 21 is not cyclic, then can we understand it by Sylow method ?