Can anyone tells me why this is allowed in c++, and what is it? const char* a = (10, &quot;What&quot;);
How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  &lt;-  Note comma typo! c = d;
How does a lurker gain reputation to receive privilege for commenting? I have been reading Stack Exchange for years - mostly not logged in, and have never posted (this is my first). I'm simply not very talkative, and very good at googling.  Recently a few occasions have come up when I've wanted to comment on a question.  I wanted either to ask for, or provide, clarification which did not warrant a new answer.  How do I gain enough reputation to comment without:   asking questions which have already been answered or that I can figure out on my own, or posting my comment like as an answer (i.e. being  rude)? I have asked more than 100 questions on SO. The problem with asking so many questions is that it's sometimes very hard to navigate to the question I want.  Is there any way to improve the interface further? How do I diagnose not being able to reach a specific website as an end user? Derivative of a factorial What is ${\partial\over \partial x_i}(x_i !)$ where $x_i$ is a discrete variable?  Do you consider $(x_i!)=(x_i)(x_i-1)...1$ and do product rule on each term, or something else? Thanks. Getting the location from an IP address I want to retrieve information like the city, state, and country of a visitor from their IP address, so that I can customize my web page according to their location. Is there a good and reliable way to do this in PHP? I am using JavaScript for client-side scripting, PHP for server-side scripting, and MySQL for the database. My dconf/gsettings installation is broken. How can I fix it without Ubuntu reinstall? I run Ubuntu 12.04.1 LTS x64 in VirtualBox. After one very unfortunate misclick (reset saved state instead of load saved state) I got a very annoying problem.  Almost all applications (unity, synaptic, gedit, etc.) print on start:  Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.   And all GUI settings reset after reboot.   Another symptom:  $ GSETTINGS_BACKEND=dconf dconf-editor (dconf-editor:2353): GLib-GIO-WARNING **: Can't find module 'dconf' specified in GSETTINGS_BACKEND GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications   But /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so is present.     What I tried (and it didn't help):   sudo apt-get install -f --reinstall  dconf-tools libdconf0 libdconf-dbus-1-0 dconf-service Build dconf-0.5 from sources and make install it Create empty user profile and start programs there   I have to keep current Ubuntu installation so a complete reinstall is not an option for me.   How can I fix it? Why is Grub menu not shown when starting my computer? I am a new user of Ubuntu 12.04.   I installed Ubuntu and Windows XP, and I want to use both operating systems. When I restart or boot my PC the GRUB menu does not appear.  How can I solve this problem? Declare variable to hold job name and if job running kill it I’m looking for a single file that does these things in order.   Declare a variable to hold a job name  Run a query to check whether that job declared is currently running Set up an if loop If the job is running, execute the stored procedure that kills it.   My question is to write a query that declare a variable to hold a job name and gives us result the job is still running or not if the job is running execute the stored proc to kill it.  My manager was asking me to listing running jobs and suspended jobs and declare a variable to hold job name and setup an IF loop like if job is running run proc to kill it. $\mathcal N (A):=\mathcal P(A)\setminus\{\varnothing\}$ notation How do you prove that these four definitions of the operator norm are equivalent? $$\begin{align*} \lVert A\rVert_{\mathrm{op}} &amp;= \inf\{ c\;\colon\; \lVert Av\rVert\leq c\lVert v\rVert \text{ for all }v\in V\}\\ &amp;=\sup\{ \lVert Av\rVert\;\colon\; v\in V\text{ with }\lVert v\rVert\leq 1\}\\ &amp;=\sup\{\lVert Av\rVert\;\colon\; v\in V\text{ with }\lVert v\rVert = 1 \}\\ &amp;=\sup\left\{ \frac{\lVert Av\rVert}{\lVert v\rVert}\;\colon\; v\in V\text{ with }v\neq 0\right\}. \end{align*}$$ Show forms in a modal window I have a form and I am using Drupal 7. I need to show this form in a popup when a user clicks a link. The user should then be able to complete the form whilst in the pop up window. I can use anything like  or modals or anything. I just wanted to know which is the better option and what options do I have for Drupal. This question has troubled me for ages despite my several attempts of looking it up in dictionaries or usage books. Do we say, "Do you have any ideas" or "Do you have any idea"? I do see an example where "any" means "it doesn't matter who/which/what", therefore "You can borrow any book you like." Also, does it matter between using it in questions and negatives? A geometric reason why the square of the focal length of a hyperbola is equal to the sum of the squares of the axes? String handling by OneHotEncoder I am reading everywhere on new questions and blogs that since version 0.20, OneHotEncoder is able to handle string features. Moreover, the documentation is what looks more ambiguous. Here are the first two lines from the documentation:  Encode categorical integer features as a one-hot numeric array. The input to this transformer should be an array-like of integers or strings, denoting the values taken on by categorical (discrete) features.  First line says it  encodes categorical integer features  and the next line says  input should be array like of integers or strings.  When i tried it, i still got the value error. print(X.columns) encoder = OneHotEncoder(categorical_features=[1,4,5]) encoder.fit(X)  Index(['age', 'sex', 'bmi', 'children', 'smoker', 'region'], dtype='object') ValueError: could not convert string to float: 'female'  I am aware of the means to handle encoding of string features with LabelEncoder, ColumnTransfomer and pd.getDummies() but specifically want to understand about this. Need linebreaks in some columns of a wide table I am trying to create linebreaks in some of the cells of my table, since I have long sentences and the table doesn't fit on an A4 page. How to let LaTeX choose the linebreaks?  Here is my code   \begin{table}[hbt] \centering \begin{tabular}{lllllll}     \toprule     &amp;  Raumgewicht $\gamma$'$_m$ and [$\frac{kN}{m^3}$] &amp;Reibungswinkel $\phi$'$_m$[]&amp; Kohäsion c'[] &amp; M$_E$-Wert []&amp; N$_SPT$ [] &amp; k-Wert []  \\     \midrule     Auffüllungen/Deckschicht&amp; 18&amp; 27 &amp; 0 &amp; 10* &amp; 17 &amp; -\\     Rückstausedimente nicht vorbelastes&amp; 21 &amp; 28 &amp; 10 &amp; 10 &amp; 15 &amp; $5\times10^-8$ - $1\times10^-6$ \\     Rückstausedimente vorbelastet &amp; 22 &amp; 32 &amp; 10 &amp; &gt;50 &amp; 91 &amp; $5\times10^-8$ - $1\times10^-6$ \\     Moräne &amp; 22 &amp; 36 &amp; 5 &amp; &gt;50 &amp; &gt;100 &amp; $1\times10^-8$ - $5\times10^-6$\\     \bottomrule \end{tabular} \caption{Bodenkennwerte} \label{tab:Bodenkennwerte} \end{table}   My preamble is  \documentclass[12pt,a4paper]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{booktabs} \usepackage{stackengine} \usepackage[top=3cm, bottom=2.5cm, left=2.5cm, right=2.5cm, footskip = 1cm]{geometry} \usepackage{hyperref} Converting a year from 4 digit to 2 digit and back again in C# My credit card processor requires I send a two-digit year from the credit card expiration date. Here is how I am currently processing:   I put a DropDownList of the 4-digit year on the page. I validate the expiration date in a DateTime field to be sure that the expiration date being passed to the CC processor isn't expired. I send a two-digit year to the CC processor (as required). I do this via a substring of the value from the year DDL.   Is there a method out there to convert a four-digit year to a two-digit year. I am not seeing anything on the DateTime object. Or should I just keep processing it as I am? Faithful group actions for singleton group or for empty set Let $G$ be a group, possibly a singleton. Let $M$ be a set, possibly empty. Let $\mu: M \times G \to M$ be a right group action. Let $1_G$ be the identity of $G$.  I understand 's second definition of faithful as follows:     $\mu$ is faithful if for each $g \in G$ such that $g \ne 1_G$, there exists $x \in M$ such that $\mu(x,g) \ne x$. $\tag{1}$   Later  says if $\mu$ is free and $M$ is a non-empty set, then $\mu$ is faithful.  Question: Given the idea that we can have $M$ as an empty set, I would like to clarify: Are these correct?   If $G$ is a singleton, then every action $\mu$ is faithful, whether or not $M$ is empty. If $G$ is not a singleton, but $M$ is empty, then every action $\mu$ is not faithful. Can not start Chrome via command line I have a script that needs to run on multiple machines. The problem is, if I open a command line and type in chrome or chrome.exe, I get the same error message that it is not recognized as an internal or external command... I have already added it to my paths (as per screen shot below, see bottom entry in the paths) . It works this way on other computers.  The command prompt has been restarted (as has the computer) since updating the paths. Why does it not open Chrome as it does on my other machine(s)? Whilst entering C:\Program Files (x86)\Google\Chrome\Application\chrome.exe directly into the command line and pressing enter does make Chrome launch, I don't see why the path is not working. 1) Alex's house      2) Alex' house     When the noun ends with the letter 's' or 'x', do I need to put 's' after an apostrophe or not?  I remember I read some rules related to this in my school grammar book, but now I've forgotten it. No splitter widget in new separate window I am new to Blender and I am trying to find my way through its interface. I want to have several windows (I mean OS windows, not Blender windows). So I create a separate window by dragging splitter widget while holding Shift.  The problem is there are no splitter widgets in the newly created OS window. So I can't have multiple blender windows in it. The new window does not have a Layout type drop down menu either. So how do I add new Blender windows in a new OS window? (Sorry if I'm using the wrong terms, but hopefully its clear what I am trying to achieve).