We all know about the system of two switches controlling one lamp(at the ladder) like the picture. Could you help me design a system of four switch to control one lamp ? thanks

we can construct a two location multiway switching system with two 3-way switches:    They also teach us how to perform three location multiway switching with two 3-way switches and one 4-way switch:    Is it possible to make a similar system (three locations, all able to switch the light in any situation) with only three 3-way switches?   What can be said in general about the switches needed to make an n-location multiway switching system?


Is there a way on iOS (not on macOS) to list all photos that have people detected in them but for which the people haven't been associated with a name / contact yet?  Perhaps a smart album or a third-party app?

I was trying to show photos with unnamed faces so that I can annotate them. There is  but it requires you to mark all the pictures with no faces at all. Any suggestions?


I would really like to be able to see my own post's score. How can I do this?  This is different from  because I only want to see what it is now.

I recently posted an answer that was a little controversial, I suppose.  While watching the page the answer was voted up and down a few times.  Is there a way to view the vote history?  Also, would there be any support for adding some sort of activity indicator?  My reasoning is this, you could potentially have a question or answer with "0 votes" that actually had numerous votes.  Visually seeing 0 votes indicates the question hasn't had any attention when exactly the opposite could be the case.  Thoughts?


When looking for how to wrap a function with variadic length argument, what I often see as an answer is not a solution but a workaround. Let's change the example from printf to a function printfln written in a library and I have no control over the library and I cannot add anything there. Now, I have another function double_printfln that should call printfln two times. This time we cannot use vprintf workaround. How to do this?  #include <stdio.h> #include <stdarg.h>  int printfln(const char *format, ...) {     int result;     va_list args;     va_start(args, format);     result = vprintf(format, args);     printf("\n");     va_end(args);      return result; }  int double_printfln(const char *format, ...) {     int result;     va_list args;     va_start(args, format);     result = printfln(format, args);     result += printfln(format, args);     va_end(args);     return result; }  int main() {     int x=7;     char text[20] = "Hello";     double_printfln("%s, %d", text, x);     return 0; }    Solution For those who face with a similar problem, this is how I fixed it. This is actually another workaround but in a better way: int double_printfln(const char *format, ...) {     char line[512];     int result;     va_list args;     va_start(args, format);     memset(line, 0x00, sizeof line);     vsprintf(line, format, args);     va_end(args);      result = printfln(line);     result += printfln(line);      return result; }

In C, is it possible to forward the invocation of a variadic function? As in,  int my_printf(char *fmt, ...) {     fprintf(stderr, "Calling printf with fmt %s", fmt);     return SOMEHOW_INVOKE_LIBC_PRINTF; }   Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could log invocations in other ways, or use vfprintf), but the codebase I'm working on requires the wrapper to do some actual work, and doesn't have (and can't have added) a helper function akin to vfprintf.  [Update: there seems to be some confusion based on the answers that have been supplied so far. To phrase the question another way: in general, can you wrap some arbitrary variadic function without modifying that function's definition.]


I'm trying to install Ubuntu 14.04 in my computer by using a bootable USB but I keep getting this error:  SYSLINUX 4.07 EDD 2013-07-25 Copyright (C)... Unkown keyword in configuration file: =J(triangle) No DEFAULT or UI configuration directive found! boot: _

I am trying to install linux on my laptop, a Toshiba Satellite C6550-S5200. I did it once but something happened so I removed it then I had to destroy all data on hard drive so now I have nothing on it. Well I got a iso file burned to a CD and to a flash drive. With the flash drive I get.   SYSLINUX 4.06 EDD 4.06-pre7 Copyright (C) 1994-2012 H. Peter Anvin et al  With the CD it will start booting it but somewhere loading it up, the dots turn all orange and stay that way and my CD drive turns quiet.  Oh and some more info the images work because I tried loading them up on another pc and it worked just fine.  I manage to get the CD to boot I just had to let me pc boot up first then insert the CD and have it boot the CD then. Once I get done installing ubuntu it works fine but I have to leave the PC on 24/7 for if I turn it off the PC will freeze 5-10 seconds after booting back up no matter how I install it.


I am trying to use the subcaption package in the . \documentclass{ifacconf}  \usepackage{graphicx}      % include this line if your document contains figures \usepackage{natbib}        % required for bibliography \usepackage{subcaption} %=============================================================================== \begin{document} \begin{frontmatter}  \title{Style for IFAC Conferences \& Symposia: Use Title Case for   Paper Title\thanksref{footnoteinfo}}  % Title, preferably not more than 10 words.  \author[First]{First A. Author}   \address[First]{National Institute of Standards and Technology,     Boulder, CO 80305 USA (e-mail: author@ boulder.nist.gov).}  \begin{abstract}                % Abstract of not more than 250 words. These instructions give you guidelines for preparing papers for IFAC technical meetings. \end{abstract}  \begin{keyword} Five to ten keywords, preferably chosen from the IFAC keyword list. \end{keyword}  \end{frontmatter} %=============================================================================== \section{Figures}  \subsection{Tables} Tables must be centered and have a caption above them, numbered with Arabic numerals. See table~\ref{tb:margins} for an example.  \begin{table}[hb] \begin{center} \caption{Margin settings}\label{tb:margins} \begin{tabular}{cccc} Page & Top & Bottom & Left/Right \\\hline First & 3.5 & 2.5 & 1.5 \\ Rest & 2.5 & 2.5 & 1.5 \\ \hline \end{tabular} \end{center} \end{table}  \bibliography{ifacconf}             % bib file to produce the bibliography  I need the subcaption package because I want to add subfigures in double columns. However, when I add this package, my table caption becomes overfull. How can I correct this behavior?

Firstly I apologize if this had been answered before. I have tried looking for it anywhere but I couldn't find any solution.  Anyway, I have a trouble with the caption of my table when I included the subcaption package.  This is the excerpt of the code:      \documentclass{ifacconf}     \usepackage{natbib}     \usepackage{graphicx}     \usepackage{subcaption}      \begin{document}      \begin{table}[hb]         \centering         \caption{Test eheh blah}         \begin{tabular}{|c|c|c|c|} \hline             \multicolumn{4}{|c|}{Margin settings} \\             \hline             Page & Top & Bottom & Left/Right \\ \hline             First & 3.5 & 2.5 & 1.5 \\ \hline             Rest & 2.5 & 2.5 & 1.5 \\ \hline          \end{tabular}     \end{table}      \end{document}   And the output is    However, if I removed the subcaption package, the output is as expected    So, I would really appreciate any help. Thanks.  Cheers.  EDITED:  Following Harish Kumar answer, although it does solve the caption issue in my table, it causes problem in the captions of my other subfigure. Here is the code of the subfigure.      \usepackage{epstopdf}     \begin{figure}[htb!]         \centering         \begin{subfigure}{0.38\textwidth}             \centering             \includegraphics[width=\textwidth]{pic1.eps}             \caption{test caption}             \label{fig:pic1}         \end{subfigure}         \\         \begin{subfigure}{0.38\textwidth}             \centering             \includegraphics[width=\textwidth]{pic2.eps}             \caption{test caption}             \label{fig:pic2}         \end{subfigure}         \caption{Long caption Long caption.}         \label{fig:pictures}     \end{figure}   And the output


I know that $|\mathbb{N}| = |\mathbb{N}^2|$, and that $|\mathbb{R}| = |\mathbb{R}^2|$.  It seems like this might be true for all sets, but I don't know how to go about proving this.  It's easy to prove that $|A| \leq |A \times A|$ (see ).  So to prove the claim it suffices to show that there exists some injective function $f : A \times A \to A$.  For $A = \mathbb{N}$, you can use e.g. $f:p, q \mapsto (p+q)^2 + p$.  For $A = \mathbb{R}$ you can construct various space-filling curves.  But I'm not sure how such constructive solutions can be generalized, if at all.  Any suggestions on how to approach this?

Given an infinite set $A$ -  does the cardinality of $A$ equal to the cardinality of $A^2$?


I have a Core i3 machine. Therefore, I know that I need is DDR3 RAM. Are there any other factors that I need to consider when I buy a RAM module?  I have already installed 2 GB. Here is more info:  Memory slots   Total memory slots  2   Used memory slots 1   Free memory slots 1 Memory   Type  DDR3   Size  2048 MBytes   Channels #  Single   DRAM Frequency  665.2 MHz   CAS# Latency (CL) 9 clocks   RAS# to CAS# Delay (tRCD) 9 clocks   RAS# Precharge (tRP)  9 clocks   Cycle Time (tRAS) 24 clocks   Command Rate (CR) 1T Physical Memory   Memory Usage  50 %   Total Physical  1.91 GB   Available Physical  972 MB   Total Virtual 3.85 GB   Available Virtual 2.45 GB SPD   Number Of SPD Modules 1     Slot #1       Type  DDR3       Size  2048 MBytes       Manufacturer  Unknown       Max Bandwidth PC3-10700 (667 MHz)       Part Number RMB2GB484CA4-13HC       Week/year 19 / 11       SPD Ext.  EPP         JEDEC #4           Frequency 685.7 MHz           CAS# Latency  9.0           RAS# To CAS#  9           RAS# Precharge  9           tRAS  25           tRC 34           Voltage 1.500 V         JEDEC #3           Frequency 609.5 MHz           CAS# Latency  8.0           RAS# To CAS#  8           RAS# Precharge  8           tRAS  22           tRC 30           Voltage 1.500 V         JEDEC #2           Frequency 533.3 MHz           CAS# Latency  7.0           RAS# To CAS#  7           RAS# Precharge  7           tRAS  20           tRC 27           Voltage 1.500 V         JEDEC #1           Frequency 457.1 MHz           CAS# Latency  6.0           RAS# To CAS#  6           RAS# Precharge  6           tRAS  17           tRC 23           Voltage 1.500 V   Here is the motherboard info  Manufacturer  Intel Corporation Model DH61WW (LGA1155 CPU 1) Chipset Vendor  Intel Chipset Model Sandy Bridge Chipset Revision  09 Southbridge Vendor  Intel Southbridge Model H61 Southbridge Revision  B3 System Temperature  40 °C   BIOS     Brand Intel Corp.     Version BEH6110H.86A.0020.2011.0218.1538     Date  2/18/2011   Voltage     CPU CORE  0.960 V     MEMORY CONTROLLER 1.104 V     AVCC  3.440 V     3VCC  3.440 V     VIN4  1.048 V     VIN5  1.056 V     VIN6  1.056 V   PCI Data       Slot PCI         Slot Type PCI         Slot Usage  Available         Bus Width Unknown         Slot Designation  PCIe x16 Slot         Slot Number 0       Slot PCI         Slot Type PCI         Slot Usage  Available         Bus Width 32 bit         Slot Designation  PCI Slot         Slot Number 1       Slot PCI         Slot Type PCI         Slot Usage  Available         Bus Width Unknown         Slot Designation  PCIe x1 Slot         Slot Number 2   If I add RAM modules for the rest of the empty sockets, what is the suitable type? This is for my personal work. I use this for development and gaming.

If I want to add more RAM to my computer, how can I buy something compatible? What kinds are there? How do I determine which kind my computer will accept and how much I can add?


What does (9 over 3) mean? I can't type the exact operation; please see attached. Or can you direct me to a site where this operation is explained?

In one of my papers I found a notation where 2 letters one under other are placed in brackets without any additional operation symbol - attached image (N m). What does this mean, is this a shortcut of summation?


In A Song of Ice and Fire by George R.R. Martin, he writes that the “words” [see footnote] of House Grandison are Rouse Me Not.  Is this grammatically correct? Does English allow such word-scrambling in sentences?     Where a House’s “words” serve as the House motto.

Yesterday, I've listened to a song called "Fear not this night". I find the syntax unusual (as a foreigner, I have never encountered it). Is it the same meaning as "Don't fear this night" ? What's the slight difference between these 2 ?  Thank you for your time.


I have a script getInfo.sh I made in Linux that collects information about the user, date, number of users logged into current environment, and many other features.  I could easily outside of the file have something where it is ./getInfo.sh > results.txt.  However I would like this to happen automatically within the script.  If I were to include the ./getInfo.sh > results.txt within the script itself it would create an infinite loop as each time it hits the ./getInfo.sh it will re-run the script and create an infinite loop.  Any alternatives here?

Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to "foo" exec 3>&1 4>&2 >foo 2>&1  # ...  # restore stdout and stderr exec 1>&3 2>&4


I have given three strings 'aaa','bbb','ccc' and i want to print any one of these at random, how to do it?

Assume I have the following list:  foo = ['a', 'b', 'c', 'd', 'e']   What is the simplest way to retrieve an item at random from this list?


Let $Y_{1}, \ldots, Y_{n}$ be a random sample from from a $U(0,2 \theta)$ distribution. The probability density function for each $Y_{i}(i=1, \ldots, n)$ is given by: $f_{Y_{i}}(y \mid \theta)=\left\{\begin{array}{ll}\frac{1}{2 \theta}, & 0 \leq y \leq 2 \theta \\ 0, & \text { otherwise }\end{array}\right.$ The likelihood function for $\theta$ given the sample $Y=y$ may be written as: $ L(\theta \mid y)=\prod_{i=1}^{n} \frac{1}{2 \theta} I\left(y_{i} \leq 2 \theta\right)=(2 \theta)^{-n} I\left(y_{n} \leq 2 \theta\right) $ where $y_{n}$ denotes the sample maximum, $I$ is an indicator function. I need to find the MLE for $\theta$ The text I'm following starts by pointing out that the likelihood function takes strictly positive values for $2 \theta \geq y_{n}$ or else $\theta \geq y_{n} / 2 .$ Specifically: $ L(\theta \mid Y=y)=\theta^{-n}, \quad \theta \geq y_{n / 2} $ If I accept this, which I don't see where it's coming from, then... since the likelihood is decreasing in $\theta,$ I can maximise at $y_{n} / 2 .$ And hence the MLE for $\theta$ would be $\hat{\theta}^{M L E}=Y_{n} / 2$ But then again, this intermediate step is not entirely clear.

I am a bit confused about the derivation of MLE of Uniform$(0,\theta)$.  I understand that $L(\theta)={\theta}^{-n}$ is a decreasing function and to find the MLE we want to maximize the likelihood function.  What is confusing me is that if a function is decreasing, then wouldn't the function be maximized at the smallest input rather than the largest?  Thank you in advance for your help.


This is not a duplicate. This question is much more detailed than "What is group policy". Mods need to be a little less aggressive around here.   I'd like to push out a Windows Firewall: Allow remote administration exception properties group policy to all computers connected to my DC. The instructions from MS are , the relevant line is "Right-click the selected OU, and click Group Policy Update…". If I try to update the Users GPO it says there are no computer objects. If I try to add a "Computers" object, it says it already exists. The only thing in the tree that I can update is the Domain Controllers object; that doesn't seem right.    It's very confusing. If I can't add it, how come I can't see it? I don't have any filters turned on.   The whole point of this is to be able to force a GP update on all computers in the domain. The instructions that I linked imply that I can do that via the GPMC but I don't see any way to accomplish that.

This is a  about Active Directory Group Policy Basics   What is Group Policy?  How does it work and why should I use it?  Note: This is a Question & Answer to new administrator that might not be familiar with how it functions and how powerful it is.


I have Windows 10 32-bit installed on my laptop () with a single 4 GB stick of RAM. But the system only reports 932 MB of memory. I have tried removing the module and putting it back.  Output of wmic memorychip list full:  BankLabel=BANK 1 Capacity=4294967296  DataWidth=64  Description=Physical Memory  DeviceLocator=Bottom-Slot 2(under) FormFactor=12 HotSwappable=  InstallDate=  InterleaveDataDepth=1  InterleavePosition=2  Manufacturer=A-DATA Technology  MemoryType=24  Model= Name=Physical Memory  OtherIdentifyingInfo=  PartNumber=AM1U16BC4P2-B19H PositionInRow=1 PoweredOn=  Removable= Replaceable=  SerialNumber=00004EB9  SKU=  Speed=1333 Status=  Tag=Physical Memory 1  TotalWidth=64  TypeDetail=128 Version=    This question is different from the marked duplicate because there are 3 out of 4 GB missing!

I recently upgraded my computer's RAM to 4 GB. My 32-bit Windows installation shows only 3574 MB of the memory. How can I make Windows use the full amount of RAM?


I have the following table:  -------------------------------- oGroup      oValue -------------------------------- 1           Us 1           Uk 1           In 2           Ch 2           Ar   My question is, how can I combine some records with the same oGroup value? The result should be:  --------------------------------- oGroup      oValue --------------------------------- 1           Us, Uk, In 2           Ch, Ar   Please advise.  Thank you.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I have a field called T_Amount data type is float,  e.g= T_Amount=11800  When i make formula in query (11800/24)*35.25=17331.25  but actually if i make in calculator (11800/24)*35.25=17331.24999  i want this full figure.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


What is the value of the following infinite sum: $$1 + \frac34 + \frac34.\frac58 + \frac34.\frac58.\frac7{12} + .......$$    I need a definitive hint, please help.

How can I evaluate the following series: $$1+\frac{3}{4}+\frac{3\cdot 5}{4\cdot 8}+\frac{3\cdot 5\cdot 7}{4\cdot 8\cdot 12}+\frac{3\cdot 5\cdot 7\cdot 9}{4\cdot 8\cdot 12\cdot 16}+\cdots$$  In one book I saw this sum is equal to $\sqrt{8}$, but I don't know how to evaluate it.


I need to rename a user account on Windows 7 Home Premium.  If I go into the User Accounts control panel applet and choose Change your account name, Windows changes the account's Display Name.  I want to change the actual user name.  How can I do this?  I've looked at the net user command but it doesn't seem to be able to do this.  On Windows Pro I could use lusrmgr.msc but that's not available on Windows Home edition.

I have an install of Windows 7 that I've already put a few days into. Today I realized I've made a mistake in the username and it's driving me nuts (my personal OCD).  While changing the physical folder name is perhaps possible, though quite involved, I do not want to open that can of worms.  What I want to do is simply change the username I give when the login prompt shows up. I thought it's possible by just renaming the user account in the User Accounts but that didn't work.  Is it possible to do then? Or is the only way to create another user and spend hour migrating everything I'd already customized to that user?


I'm looking for suggestions for a good monitoring tools, or tools, to handle a mixed Linux (RedHat 4-5) and HPUX environment.  Currently we are using  which is working reasonably well but it is becoming harder to keep track of what alerts are sent out for what servers.   Features I'd like to see:   Easy configuration of servers.  The ability to monitor CPU, network, memory, and specific processes   I've looked into Nagios but from what I have seen it won't be easy to set up the configuration for all of our servers ~200 and that without installing a plugin into each agent I won't be able to monitor processes.

For a more comprehensive list of monitoring tools and their features, check out .   As the question states, what are the most commonly used tools used for this task and what are their strengths and weaknesses?


In Rhythmbox, i'm trying to find out which folders are in the library watch list. According to the help file, you can use gconf-editor to add/remove them at /app/rhythmbox/library_locations. But, in the config editor, Rhythmbox is not listed. I'm using Ubuntu 12.04. Thanks!

I previously set Rhythmbox to include a few different locations. Now following changes to my directory structure, I'd like to reflect these changes in Rhythmbox. But when I go to "Library Location", I see "Multiple locations Set" and I can only add to the list; no way to edit/remove.  I Googled this problem and the only relevant results I get date back to 2006, probably referring to a previous version of Rhythmbox and specifying components/locations that I can't find on my system.  Give a look at the documentation...kind of minimal.  Any clues?  Ubuntu 12.04 Rhythmbox 2.96


Ubuntu 16.04 wifi not connecting  Wifi not connecting on Ubuntu 16.04. When I go to network settings to turn the wifi toggle on it immediately toggles back to off.   I've tried   $ sudo service network-manager restart   as well as multiple other suggestions but nothing seems to work ...  This is what I got when I typed   $ sudo lshw -C network   into the terminal...  description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:07:00.0        logical name: enp7s0        version: 0a        serial: ec:b1:d7:df:8d:40        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8107e-2_0.0.2 02/26/15 ip=10.50.18.72 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:48 ioport:3000(size=256) memory:c3104000-c3104fff memory:c3100000-c3103fff   *-network DISABLED        description: Wireless interface        product: Wireless 3160        vendor: Intel Corporation        physical id: 0        bus info: pci@0000:08:00.0        logical name: wlp8s0        version: 83        serial: 34:e6:ad:9b:9c:63        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-47-generic firmware=16.242414.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn        resources: irq:52 memory:c3000000-c3001fff  I don't think the card is recognised with ifconfig   enp7s0    Link encap:Ethernet  HWaddr ec:b1:d7:df:8d:40             inet addr:10.50.18.72  Bcast:10.50.31.255  Mask:255.255.240.0           inet6 addr: fe80::18b2:f378:6027:7c2b/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15630 errors:0 dropped:0 overruns:0 frame:0           TX packets:7899 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:6370690 (6.3 MB)  TX bytes:1605183 (1.6 MB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:2709 errors:0 dropped:0 overruns:0 frame:0           TX packets:2709 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1            RX bytes:217671 (217.6 KB)  TX bytes:217671 (217.6 KB)   but I think it's recognised in $ sudo lspci -vnn    08:00.0 Network controller [0280]: Intel Corporation Wireless 3160 [8086:08b3] (rev 83)     Subsystem: Intel Corporation Dual Band Wireless AC 3160 [8086:8070]     Flags: bus master, fast devsel, latency 0, IRQ 52     Memory at c3000000 (64-bit, non-prefetchable) [size=8K]     Capabilities: [c8] Power Management version 3     Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+     Capabilities: [40] Express Endpoint, MSI 00     Capabilities: [100] Advanced Error Reporting     Capabilities: [140] Device Serial Number 34-e6-ad-ff-ff-9b-9c-63     Capabilities: [14c] Latency Tolerance Reporting     Capabilities: [154] Vendor Specific Information: ID=cafe Rev=1 Len=014      Kernel driver in use: iwlwifi     Kernel modules: iwlwifi  Edit: $ rfkill list prints   0: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   I'd greatly appreciate any help, Thanks in advance.

To start off I am very new to Ubuntu so when explaining do not use shortcuts please because I will not understand. So I installed Ubuntu 15.10 on my Hp Envy and the wireless card is not working. I have been hassling with it all day and I'm finally giving in to making a forum post. The Card is a Intel 7265 Wireless AC(revision61). I am currently attempting to install a newer firmware for it that I downloaded from intels website but I can not for the life of me figure out how to get the file into the firmware folder. So basically I'm making a plea to help me get the firmware installed and if that doesn't work provide more insight before I say goodbye to Ubuntu. Thanks in advance!  lspci -knn | grep Net -A2 02:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 61)     Subsystem: Intel Corporation Dual Band Wireless-AC 7265 [8086:5010]     Kernel driver in use: iwlwifi  Rfkill List 0: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no  dmesg | grep iwlwifi  [    2.089673] iwlwifi 0000:02:00.0: Unsupported splx structure [    2.092497] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-15.ucode failed with error -2 [    2.093049] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-14.ucode failed with error -2 [    2.113852] iwlwifi 0000:02:00.0: loaded firmware version 25.30.13.0 op_mode iwlmvm [    2.148273] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210 [    2.149810] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled [    2.150242] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled [    2.240713] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0 [   14.008741] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled [   14.009388] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled [   14.070823] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled [   14.071356] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled   After sudo modprobe -r acer_wmi  rfkill list 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no


Is there any site on SE where someone can ask a question on how to optimize a piece of code they have?  If yes, which?  itself? Or maybe ?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I need to save in Class static ref to a variable for use in nested classes in a future. I have no problem in use ref to a variable (not static), but with static i have to use int & myClass::refA = ... in someware. The problem is that i can use int & myClass::refA = ... only in myClass constuctor, because only there i got the ref for refA, in myClass mc(newA) colling. How to initialize a static reference to a variable inside the class constuctor?  Code:  class myClass {     private:         static int & refA;     public:         myClass(int &_refA);         void updateA(); };  myClass::myClass(int &_refA) : refA(_refA) { }  void myClass::updateA() {     refA = refA++; }  int newA = 10; myClass mc(newA); mc.updateA();    Error:  In constructor 'myClass::myClass(int&)':  QF:17:3: error: 'int& myClass::refA' is a static data member; it can only be initialized at its definition   : refA(_refA)    ^  exit status 1 'int& myClass::refA' is a static data member; it can only be initialized at its definition

What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this?


Some spells, like  and , change base stats of weapons. Are there any player character features that are not spells that alter the base stats of weapons?     Stats being any properties, Damage die size/type, magical or not, +1 +2 +3 etc.  I'm not asking to solve any particular problem, just out of curiosity.  I'm not looking for a list of all the effects that do so, just a simple yes/no backed up with at least one example. I'm looking for RAW and official examples. Please no UA.

Following discussion , what constitutes a weapon damage die?  Is it any damage die dealt by the weapon? For example, consider a  longsword.     While the sword is ablaze, it deals an extra 2d6 fire damage to any target it hits.   What are the weapon damage dice? Just the 1d8 from the longsword? Or do the 2d6 Fire damage also count?


The stories were based on a group of college roleplayers who were transported to the alternate world of their professor (the Dungeon Master). There were multiple books in the series.   My memory of the stories has faded but I can remember slavers and the college kids introducing gunpowder to this new world.

I read a book as a teenager and I am searching for it. (from around the 90's)  Things I remember:   I remember that one of the players was in a wheelchair and he played a dwarf, Also remember when the wizard woke up in the game world, he set off a lightning bolt and exploded most of their gear.    I wish I could give you more, I read it and it inspired me to start playing D&D. Want to revisit it.


I am working on a solution in SharePoint Online where I want to accomplish the following using CSOM:   Set all subsites to inherit search navigation from parent. To achieve this I have  this little code-snippet which actually works and sets a property on a subsite web to inherit parent search navigation.          using (ClientContext context = new ClientContext("ParentSiteURL"))         {         context.Credentials = new SharePointOnlineCredentials(struser, password);         Web web = context.Site.OpenWeb("SubsiteName");         var allProperties = web.AllProperties;         context.Load(allProperties);         web.AllProperties["SRCH_VERT_SET_WEB"] = "{\"Inherit\":true}";         web.Update();                         context.ExecuteQuery();         }    However, even though the property is updated and search settings are now set to inherit parent navigation - it's not working.  I need to navigate to "Site settings > Search settings" and click OK for it actually work. So it seems like I am missing an Update of some kind...  Any help would be much appreciated.

I am working on a solution in SharePoint Online where I want to accomplish the following using CSOM:   Update rootweb search navigation (also known as search verticals) to display "Search everywhere" instead of "Search this site" in the search box Set all subsites to inherit search navigation from parent   Issue 1   I found an article explaining how the SPNavigation.SearchNav was introduced in SharePoint 2013 and gives you access to the list of navigation nodes with server-side code. However, since this is not available in the client-side object model, we need to use a slightly different approach.  Web rootWeb = clientContext.Site.RootWeb; NavigationNode searchNavRoot = rootWeb.Navigation.GetNodeById(1040); clientContext.Load(rootWeb); clientContext.Load(searchNavRoot, root => root.Children); clientContext.ExecuteQuery();  NavigationNodeCollection searchNavColl = searchNavRoot.Children;   This retrieves the navigation nodes for the vertical search well-enough, but ONLY if you have edited it before through the UI - else it returns 0 elements.  So my best bet right now is to simply add them by code, to have the default search vertical set to "Search everywhere" as shown here:  NavigationNodeCollection searchNavColl = searchNavRoot.Children; if (searchNavColl.Count == 0) // if navigation is not set, add nodes  {     NavigationNode everywhere = CreateNavigationNode(searchNavColl, true, true, "Everywhere", "/search/Sider/results.aspx", null);     NavigationNode people = CreateNavigationNode(searchNavColl, true, true, "People", "/search/Sider/peopleresults.aspx", null);     NavigationNode conversation = CreateNavigationNode(searchNavColl, true, true, "Conversations", "/search/Sider/conversationresults.aspx", null);     NavigationNode thisSite = CreateNavigationNode(searchNavColl, true, true, "This site", "/_layouts/15/osssearchresults.aspx?u={contexturl}", null); }   If you know another way of achieving this, I am all ears.  Issue 2  Looking at some examples I was able to create this little code-snippet which actually works and sets a property on a subsite web to inherit parent search navigation.   Web web = clientContext.Site.OpenWeb("/sites/ARN/test"); var allProperties = web.AllProperties; clientContext.Load(allProperties);  web.AllProperties["SRCH_VERT_SET_WEB"] = "{\"Inherit\":true}"; web.Update(); clientContext.Load(web, w => w.AllProperties); clientContext.ExecuteQuery();   However, even though the property is updated and search settings are now set to inherit parent navigation - it's not working.   I need to navigate to "Site settings > Search settings" and click OK for it actually work. So it seems like I am missing an Update of some kind...  Any help would be much appreciated.


This is an array based Queue , for int :   /**  * Array based  * @author X220  *  */  public class MyQueue {      private int[] _data;     private int MAX_SIZE;     private int front = -1;     private int back = 0;     private int elementsCount = 0;      public void printQueue()     {         int j = this.front + 1;         int i = 0;         while (i < this._data.length && i < elementsCount)         {             System.out.println("At location " + j % MAX_SIZE + " element :" + this._data[j % MAX_SIZE]);             j++;             i++;         }     }      public MyQueue(int _size)     {         MAX_SIZE = _size > 0 ? _size : 10;         this._data = new int[MAX_SIZE];     }      public boolean IsEmpty()     {         return this.elementsCount == 0;          }      public boolean IsFull()     {         return this.elementsCount == MAX_SIZE;     }      public void Push(int pushMe) throws QueueIsFullException     {         if (IsFull())         {             throw new QueueIsFullException("Queue is full");         }         this.elementsCount++;         _data[back++ % MAX_SIZE] = pushMe;     }      public int Pop() throws QueueIsEmptyException      {         if (IsEmpty())         {             throw new QueueIsEmptyException("Queue is full");         }         elementsCount--;         return _data[++front % MAX_SIZE];     }      public static void main(String args[])     {         try         {             MyQueue q1 = new MyQueue(15);             q1.Push(1);             q1.Push(2);             q1.Push(3);             q1.Push(4);             q1.Push(5);             q1.Pop();             q1.Pop();             q1.Pop();             q1.Pop();             q1.Pop();             q1.Push(6);             q1.Pop();             q1.Push(7);             q1.Push(8);             q1.Push(9);             q1.Push(10);             q1.Push(11);             q1.Push(12);   //          q1.Push(1); //          q1.Push(2); //          q1.Push(3); //          q1.Push(4); //          q1.Push(5); //          q1.Push(7); //          q1.Push(8); //          q1.Push(9); //          q1.Push(10); //          q1.Push(11); //          q1.Push(12); //          q1.Push(40); //          q1.Push(50);             q1.printQueue();          }         catch (Exception e)         {             System.out.println(e);         }     }       @SuppressWarnings("serial")     class QueueIsFullException extends Exception      {           public QueueIsFullException(String message){              super(message);           }     }      @SuppressWarnings("serial")     class QueueIsEmptyException extends Exception      {           public QueueIsEmptyException(String message){              super(message);           }      }  }   I wanted to use generics so I changed the int to T but then I got for this :   public class MyQueue <T>{      private T[] _data;     private int MAX_SIZE;     private int front = -1;     private int back = 0;     private int elementsCount = 0;      public void printQueue()     {         int j = this.front + 1;         int i = 0;         while (i < this._data.length && i < elementsCount)         {             System.out.println("At location " + j % MAX_SIZE + " element :" + this._data[j % MAX_SIZE]);             j++;             i++;         }     }      public MyQueue(int _size)     {         MAX_SIZE = _size > 0 ? _size : 10;         this._data = new T[MAX_SIZE];     }  ....   }   That :         Cannot create a generic array of T      And from the answers to  I see that I can't use generics with arrays .   Does this mean that there is no work around for a generics Queue based on array ? Must I switch to some other data structure ?

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


For example, if x is odd, that means x-1 and x+1 are both even.  And from what I’ve seen, because x+1 and x-1 have a difference of 2, they have no other common factors beside 1 and because they are both even, 2.  If x is even, then x+1 and x-1 are both odd and therefore have only 1 as a common factor.  My questions are:   Is this true in all cases? If so, why is this true?

We have to prove $b|a$ and $b|c \Rightarrow b|ka+lc$ for all $k,l \in \mathbb{Z}$.  I thought it would be enough to say that $b$ can be expressed both as $b=ka$ and $b=lc$. Now we can reason that since $ka+lc=2b$ and $b|2b$, it directly follows that $b|ka+lc$?  But I'm not sure if that works for any value of $k$ and $l$ (namely $k$ and $l$ are defined through quotient between $a$ and $c$, respectively).  What am I missing?


I am using 2 screens on my computer and wanted to enable the brightness control on the second monitor. I found an application called "brightness controller" on the software centre but the link provided doesn't work. It is for sale at 0$ and when I click on the buy button, I get an error message.  Unable to load page Problem occurred while loading the URL https://software-center.ubuntu.com/subscriptions/en/ubuntu/precise/+new/?archive_id=commercial-ppa-uploaders%2Fbrightness-controller&arch=i386 Cannot resolve proxy hostname    I went to the , but once there, being a Win XP defector, I do not know what to do with the multiple links provided there.

I just bought the new Humble Bundle, and I want to play the games on Ubuntu, but whenever I click on "Download with Ubuntu" the software center comes up on the page of the game, but whenever I click on the buy button it comes up with this message: Unable to load page     Problem occurred while loading the URL    Cannot resolve proxy hostname   ()   And so I can't buy the games. Could someone please help me? Thank you for reading, ~Joel


Q) $\{X_n\}$,$\{Y_n\}$ are positive integrable and adapted to $\mathcal{F_n}$. Suppose $E(X_{n+1}|\mathcal{F_n})\leq X_n+Y_n$, with $\sum Y_n < \infty$ a.s. Prove that $X_n$ converges a.s. to a finite limit.   The first part of the answer is: Consider $W_{n}= X_n - \sum_{k=1}^{n}Y_k$ and the claim is that it is super martingale which I don't get.   $$E[W_{n+1}|\mathcal{F_n}] = E[X_{n+1}|\mathcal{F_n}]-\sum_{k=1}^{n+1}E[Y_k|\mathcal{F_n}] \leq X_n-\sum_{k=1}^{n}E[Y_k|\mathcal{F_n}] + Y_n-E[Y_{n+1}|\mathcal{F_n}] = $$ $$W_n+Y_n-E[Y_{n+1}|\mathcal{F_n}]$$  So I don't understand why $Y_n-E[Y_{n+1}|\mathcal{F_n}] \leq 0$? It is not given that $\{Y_n\}$ is a sub martingale. Thanks and appreciate a hint.

I am have a problem with proving a convergence of a sequence of random variables in the given context:  Let $F_n$ be a filtration. Assume that $X_n$ and $Y_n$ are non-negative and integrable $F_n$-adapted random variables for $n\geq 0$. Furthermore, I assume that: $\mathbb{E}[X_{n+1} \mid F_n]\leq X_n+Y_n$ and that  $\sum_{n}Y_n < \infty$. Under the above conditions, I should show that $X_n$ converges almost surely for $n\rightarrow \infty$.  My approach has been to define a variable $Z_n=X_n-\sum_{i=0}^{n-1} Y_i$, and to set this into the expression for the conditional mean of $X_{n+1}$, but this did not gave any result. Anybody has an idea to this?


So I was building a farm house and as I built it, I was in creative mode. After it was built, I decided that I wanted to be in survival mode and just mess around and possibly build my farm house even bigger. Welll..... I can not get out of this weird mode. I do the correct /gamemode and I see my hearts and food bar show up but I'm not able to break blocks as if I'm in survival, they just completely disappear after i break them! Like if I was in creative mode, you know how you break a block and poof its gone, well its like that. I see the little block after i break it but its only for 1 sec. I cant fly or anything when I'm like this just to be clear, I also kill everything with one hit and get no drops and only one experience rolls my way.   I've tried restarting everything and also using a different version than my original 1.8.9 minecraft. Its also on my pc... And another thing, everything works fine in my other saved worlds, Just this particular one, that is messed up.

This question is regarding the minecraft Beta 1.8 prerelease -- I have a beautiful house in single player survival which I'd like to record while flying.  I want to be able to change the game mode of my survival map to creative to be able to fly through it without installing a mod. I know it is possible if you run the map on a multiplayer server via the command /gamemode <user> 0|1 but I want to achieve this in single player :)  I think this would be possible through editing your level.dat file as I think that's where the game mode for the map is stored.


Recently I've been into the idea of hooking up a Bluetooth receiver to my car stereo via my car radio's aux input. I got a Bluetooth receiver module from an old Bluetooth speaker that I had laying around. I disconnected to speaker and, not surprisingly, it was a mono speaker output on the circuit board. I took an aux cable, cut it open, wrapped the left and right together and soldered it to the positive output and soldered the ground wire to the negative output on the board. I plugged it into my car, connected to the module with my iPhone and played Spotify... It worked, but audio only came through the left side of the stereo car system.  My question is: Is there anyway to play the mono sound through both stereo speakers?

I have a 3.5mm jack mono output. I'm plugging standard stereo headphones into this jack, and it plays only on one side. I want the sound to come out on both sides in the headphones (same signal, but in both ears).   How can I cut and wire so that the mono signal goes into both speakers ?  I know there are some adapters on Internet that should do the job, but it's not an option anymore since I have to only 1½ day to finish this…


This is an assignment and a question for measuring basic knowledge on C.  It is part of a course on Coursera.org. But, this is just to measure if you are able to do the course. This is just a copy-paste of the actual question. I did great on all other question, I just don't seem to get the following one :  Suppose you are compiling for a 32-bit platform and sizeof(int) == 4. Which one of the following is equivalent to c[b] if c is of type int* and b is of type int?  Possible answers:  -1 * b[c] *(c+b) none of the above *c+b c[b][0]   What I am asking is, what the right answer is from the above possibilities, and why?  I mean what logic does one use to arrive at the result? What should I read to understand the procedure to get there ?

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


In Avengers: Endgame,       Thanos was able to stop and catch Mjolnir and Stormbreaker mid-air as both Captain America and Thor used/called them BEFORE he got the Infinity Stones.   Since this character is clearly not worthy and had no super powers at the time, how were they able to wield Thor's Mjolnir and Stormbreaker, when even the Hulk couldn't do it in The Avengers?

Throughout Avengers Infinity War movie, we see Thanos fight with one or more Infinity Stones. So he's using their power to win against the Avengers. But does he have any superpowers without these stones or is he just a skilled fighter strong enough for his size.


I remember reading a short story as part of anthology compilation.  In the story, the main character, a man, is convinced that all of the people in his life are part of a conspiracy. He is in an asylum as a result. He addresses his mother as 'the one they call mother'.  His mother tries to convince him that he is paranoid and none of the conspiracy he believes exists. The twist at the end comes when it is confirmed that his mother is not actually his mother, and the main character is indeed the centre of a belligerent conspiracy.  Hopefully someone will recall the story, its author and the anthology that I might have been reading.

In the mid-90s I read a short story about a guy freaking out at his wife and therapist because as they were leaving the house to go on a train trip to New York City, he went back inside to grab something and noticed that out the back window it was raining, while out the front door it was clear and sunny.  This confirmed his existing paranoia that everything in his world was fake, and everyone he knew was either a robot or an actor, participating in a massive effort to fool him and keep him from remembering who he really was.  He eventually calms down and agrees to go on the trip. The story ends      with a twist where the wife and therapist have a conversation something like, that was a close one, he almost remembered. Now strike the house set and assemble the New York set.   Can anyone identify this story? It was probably in a magazine or anthology, either sci-fi or speculative fiction.


I am reading Atiyah MacDonald`s Commutative Algebra textbook. In Page 91, next paragraph, I do not understand part of the following:      If $A$ is a local ring, $m$ its maximal ideal, $k=A/m$ its residue field, the $A-$module $m/m^2$ is annihilated by $m$ and therefore has the structure of a $k-$vector space.    I understand that $m/m^2$ is an $A-$module. I do not get how $m/m^2$ is annihilated by $m$. Why does one need this statement (i.e. annihilation by $m$) to conclude that  $m/m^2$ is a $k-$vector space ? I mean $k$ is a field, so  $m/m^2$ is automatically a vector space as it is a $k-$ module. Finally why is $m/m^2$ Special and not $m/m^n$ for $n>2$?

Let $I$ be an ideal of $R$ and let $M$ be an $R$-module. Prove that the formula $(r + I) \cdot m = r \cdot m$ for $r + I \in R/I$, and $m \in M$ makes $M$ into an $R/I$-module if and only if $i \cdot m = 0$ for all $i \in I, m \in M$.   I don't quite understand why we must have $i \cdot m = 0$ instead of $I \cdot m \in M$. This is for proving the only if part.


Suppose we have $R$ containers ($x_1,x_2,\ldots,x_R$) and we have $N$ balls. How many possible distributions we have assuming that $x_{min}\leq x_r\leq x_{max}$ $\forall r\in\{1,2,\ldots,R\}$?  The following is my current work to solve this problem:  Dropping the minimum and maximum constraint, we have  $x_1+x_2+\ldots+x_R=N$  with $x_r\geq0$. We have $\binom {N+R-1}{R-1}$ possible combinations   For the minimum constraint, we can define $y_r=x_r-x_{min}$. Therefore, we have  $y_1+y_2+\ldots+y_R=N-R*x_{min}$   with $y_r\geq0$ meaning that $x_r-x_{min}\geq0$ meaning that $x_r\geq x_{min}$. Therefore, we have $\binom {N-R*x_{min}+R-1}{R-1}$ possible combinations.  I am stuck at applying the maximum constraint. Can someone help with applying the maximum constraint?  I do appreciate your help. Thank you

The problem of counting the solutions $(a_1,a_2,\ldots,a_n)$ with integer $a_i\geq0$ for $i\in\{1,2,\ldots,n\}$ such that $$a_1+a_2+a_3+....a_n=N$$ can be solved with a stars-and-bars argument. What is the solution if one adds the constraint that $a_i\leq r_i$ for certain integers $r_1,\ldots,r_n$?  e.g. for $n=3$, $N=6$ and $(r_1,r_2,r_3)=(3,3,2)$, the tuple $(a_1,a_2,a_3)=(2,3,1)$ is a solution, but $(2,1,3)$ is not a solution because $a_3=3>2=r_3$.


I would like to change Google spreadsheet header labels. I would like to change A,B,C... to more detailed descriptions. How do I achieve this?

The picture above shows what I am referring to. I'm looking for a way to change these " A, B, C, ..." labels to describe better the content below each.    A would contain what date, B  what length I run, etc.


There're a lot of Chinese websites that copies virtually all contents from Stack Overflow and translate them into Chinese (with machine translation of course, because they're of really a low quality). How should we deal with them?  Most of them copy by using a web spider.  Example:  copies contents from Stack Overflow.

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I was wondering considering there are a lot of professional coders out there is there any counteraction for the GameOver Zeus and Cryptlocker viruses that have been all over the news?  I mean for after the virus has infected your computer, would a simple system restore work? (this is assuming that your bank details were not on the computer or could not be found and you are held to ransome).

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have a list of regexes that I run on a string to convert it from one style of formatting to another.  For now, all of these regexes are stored in a file.  Usually, this works fine.  If it reads "Frog" into $from, and "Toad" into $to, then "$string =~ s/$from/$to/" changes all frogs into toads, as desired.  Now I want to do something trickier: given a date "2015-04-15", I want to to change it to "04/2015", again reading from a file.  If I load "(\d\d\d\d)-(\d\d)-(\d\d)" into $from and "$2/$1" into $to, this doesn't work: it replaces the dates with the literal string "$2/$1", with actual dollar signs in the output.  What's do I need to do?  This is a script for home use only.  I am happy to use eval{} or any other strange thing if it will make my life simpler.

I would like to do the following: $find = "start (.*) end"; $replace = "foo \1 bar";  $var = "start middle end"; $var =~ s/$find/$replace/;  I would expect $var to contain "foo middle bar", but it does not work. Neither does: $replace = 'foo \1 bar';  Somehow I am missing something regarding the escaping.


When I try to access my hard disk on Windows I got the following error:  Error mounting /dev/sda2 at /media/debo/2290657790655279: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177"  "/dev/sda2" "/media/debo/2290657790655279"' exited with non-zero exit status 14: Windows is hibernated, refused to mount. Failed to mount '/dev/sda2': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   Please can anyone help me on this?

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I installed flatpack GIMP 2.10 in a fresh Ubuntu 20.04 VM, and I'm trying to run it from a command line. (I'm hoping that error messages will tell me why my Python script won't load.) Unfortunately, the terminal says that the "gimp" command doesn't exist. I suspect that adding GIMP to the PATH variable might help, but how do I find the path? (If it helps, the Python plug-in folder is: /app/lib/gimp/2.0/plug-ins .)

I install GIMP as shown in  by run the command in terminal  flatpak install https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref   Output   This application depends on runtimes from:   https://dl.flathub.org/repo/ Configure this as new remote 'flathub' [y/n]: y Installing: org.gimp.GIMP/x86_64/stable Required runtime for org.gimp.GIMP/x86_64/stable (org.gnome.Platform/x86_64/3.24) is not installed, searching... Found in remote flathub, do you want to install it? [y/n]: y Installing: org.gnome.Platform/x86_64/3.24 from flathub [####################] 10 delta parts, 72 loose fetched; 196650 KiB transferred  Installing: org.freedesktop.Platform.ffmpeg/x86_64/1.6 from flathub [####################] 1 delta parts, 2 loose fetched; 2649 KiB transferred in 9 Installing: org.gtk.Gtk3theme.Ambiance/x86_64/3.22 from flathub [####################] 1 delta parts, 1 loose fetched; 292 KiB transferred in 5  Installing: org.gnome.Platform.Locale/x86_64/3.24 from flathub [####################] 4 metadata, 1 content objects fetched; 14 KiB transferred Installing: org.gimp.GIMP/x86_64/stable from flathub [####################] 2 delta parts, 11 loose fetched; 40337 KiB transferred in Installing: org.gimp.GIMP.Locale/x86_64/stable from flathub [####################] 3 metadata, 1 content objects fetched; 6 KiB transferred    Then I tried again, it shown that GIMP is installed  error: App org.gimp.GIMP, branch stable is already installed   Now, I want to run GIMP, but I don't know how to start GIMP. I cannot find GIMP anywhere.  Tried to use terminal  gimp zsh: command not found: gimp   Then, I use "Search your computer" (top left icon on desktop) and I cannot find GIMP anywhere.   So, where is flatpak install GIMP ?


i am trying to use watermark for the asp.net textbox control with jquery and below is the code i have, i see the title on my textarea textbox but when i focus or click on the textbox the watermark does not clear.  i got the script from here.   <asp:TextBox runat="server" ID="txtNew" class="auto-hint" title="Enter here ..."  TextMode="MultiLine" Rows="7" Width="100%"></asp:TextBox>   <script type="text/javascript">     $(document).ready(function () {         // Focus auto-focus fields         $('.auto-focus:first').focus();          // Initialize auto-hint fields          $('INPUT.auto-hint, TEXTAREA.auto-hint').focus(function () {             if ($(this).val() == $(this).attr('title')) {                 $(this).val('');                 $(this).removeClass('auto-hint');             }         });          $('INPUT.auto-hint, TEXTAREA.auto-hint').blur(function () {             if ($(this).val() == '' && $(this).attr('title') != '') {                 $(this).val($(this).attr('title'));                 $(this).addClass('auto-hint');             }         });          $('INPUT.auto-hint, TEXTAREA.auto-hint').each(function () {             if ($(this).attr('title') == '') { return; }             if ($(this).val() == '') { $(this).val($(this).attr('title')); }             else { $(this).removeClass('auto-hint'); }         });      });  </script>

I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). This will help me avoid clutter by removing the label.  BTW, this is an on-page  search, so it has no button.


While studying reflection through a plane mirror, I have been told that when the object is real the image will be virtual and the image will be real while the object is virtual.  What are virtual objects? Do they really exist in nature?

I'm doing magnification and lens in class currently, and I really don't get why virtual and real images are called what they are.  A virtual image occurs the object is less than the focal length of the lens from the lens, and a real image occurs when an object is further than focal length.  By why virtual and real? What's the difference? You can't touch an image no matter what it's called, because it's just light.


When the marble is viewed from with respect to the ground, it experiences a net inward acceleration, and hence force. However, when the marble is displaced slightly, it moves towards the edge. Why? My first answer would be centrifugal force, but isn't it fictitious?   EDIT:  The marble isn't the center of the conversation here. It's the outward force. The marble and the merry-go-round can be substituted with just about anything. A car on a bend, a child being spun around by someone or a centrifuge. My question is simply, why does any of these "things" get pushed outwards. A simple answer would be centrifugal force. But isn't that fictitious?  The reason why I asked about the marble and merry-go-round is because of a thought experiment involving the two in Physics by Resnick and Haliday.

In a circular motion, like the horse rides in a merry-go-round, there is only one force that acting on it, the centripetal force that pulls the ride inward. I'm struggling to answer why the horse rides swing outward instead?


I just upgraded to QGIS 2.10 (using the debian repos) and the heatmap plugin doesn't show any formats in the dropdown menu.   I'm able to open every raster format I have at hand and, of course, the drivers are listed in the gdal driver options.  I looked around and found a similar question  but refering to QGIS 2.8 and without any answers.

In QGIS 2.8, the heatmap plugin got CRS broken. I updated to 2.10, now in the plugin the dialog is broken: it does not let you choose the format.  I render layers for atlases with heatmap style. But I need to export it to GeoTIFF, and I don't see a way to do this.  Updating the QGIS is not easy in Ubuntu, since it works normally when installed from a PPA, but installing from sources, or downloading debs is  very painful.  Is there a workaround?  A command line example will do too.  edit here's a screenshot. The format list is empty, and if I write file extension manually as I did here, it still does not allow, showing a message that format is not chosen.    Meanwhile in another dialog, format choice works correctly:    Versions:


I recently started trying to teach myself Unity2D development using some tutorials and something weird was happening last night while I was working on my project.  Basically I have an image that serves as a dialog window. On this image (as a child object) I added a button to essentially act as "next" button for paging through NPC dialog. I set the button to use an image of an arrow poiting to the right. This worked great, got the click method hooked up with no issues. The weirdness happenened when I added a second button.   I duplicated the first button and then, since I wanted it to be a previous button, just did a 180 degree rotation on the Y axis of the button to have it be reversed. When I did this though the button did not work at all. It acted as if it was disabled (click event never fired even though code was there). Ultimately, after fiddling with it for 30 minutes I decided the cause was because I had flipped the button on the Y axis (undoing this rotation caused it to work like I expected).  So my question is: Why did doing that rotation cause the button to be un-useable?   Note: I dont care about how to fix it to make it work, Ive decided to get rid of that button all together. Im really only interested in the mechanics behind unity that would cause the button to not work after being flipped. Also, if someone can point me to relevant links on the matter that would be great. My googling did not return anything useful however Im not sure I really googled it correctly.

If I rotate my button by -180 on the Y axis I can't even click on it. If for example I rotate it 180 on the Z axis everything is fine. Why does this happen and how can I fix it ?


I'm playing a game of Civ V and I captured a city that needed a new production. I sold the city that turn and now the choose production icon is stuck and wont go away even when I press shift-enter. Is there a way to skip the "Choose Production" option for a city for a turn?

So I just got a city out of an ideological revolt, its been annexed and yatta yatta. For whatever reason, I traded the city back to its original owner before telling it to produce something. Only now I can't end the turn because the city still needs me to tell it what to build, which I can't because it's not mine anymore. I've tried the shift+enter trick to no success. Any help is greatly appreciated!


For example,  120 cats are rescued.  is not usually considered as good style. :  If you need to begin a sentence with a number, spell it out. It is better, however, to reword the sentence, if possible.  Thirty-two workstations were provided by the university. \ The university provided 32 workstations.   :  Spell out a number—or the word number—when it occurs at the beginning of a sentence, as well as any related numbers that closely follow it:  :   Spell Out Numbers at the Start of a Sentence. Avoid Opening a Sentence with a Large Number. Consult Your Style Guide before Starting a Sentence with a Number.  Our four primary style guides (i.e., The Chicago Manual of Style, The Associated Press Stylebook, the Publication Manual of the American Psychological Association, and the MLA Handbook from the Modern Language Association) all agree that numbers should normally be spelled out at the start of sentences.

3 more votes from other users are needed to close this question.   This is the message I got hovering the mouse over close voting tab.   I wonder can we begin any sentence with a numeric value? Is it good practice?


The expansion of electromagnetic waves due to diffraction can be easily explained with Huygens' principle (and in introductory courses this is usually how it is explained). But Huygens' principle is physically wrong.   What is it in the electric and magnetic field that makes light diffract? In other words why will a perfectly collimated beam of light spread out?

There have already been a lot of questions on this site on diffraction but I still believe this one might be slightly different. In electromagnetic waves, diffraction and any other phenomenon of wave propagation can be solved by Huygen's principle, a geometric construction that asks us to consider all points on a wavefront as secondary sources of wavefront. A justification of this treatment is provided by Feynman:-        I understood this completely. But then diffraction is a very general   phenomenon. What if we talk about mechanical waves (sound waves) then   this treatment by superposing the fields produced by opaque and a   hypothetical plug is no longer valid, but the diffraction details are   similar. Why then on an intuitive level is there diffraction, details   of which can be worked out by considering secondary sources?


Prove that the set of all finite subsets of $\mathbb{N}$ is countably infinite.  I understand what countably infinite means but I don't know how to arrange the subsets according to their sum and I can't figure out how to form the proof Please help  thanks

Show that the set of all finite subsets of $\mathbb{N}$ is countable.   I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?


I have Two domain. For Example: domain1.com and domain2.com. I am sending email using PHPMailer and I used   $email_body="View"   Above code is working perfectly and emails also go to inbox but when I am using my second domain instated of first then emails are going to spam.  $email_body="View"   Even I tried  "View" "View"   If I remove domain2.com and type some dummy text then also emails go to inbox. Would you help me in this?

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


Blender super noob here.   Is it feasible to have, lets say, a neon sign made in Blender, emit light onto its surroundings when placed in a real life video?

I have a piece of footage that I motion-tracked fairly successfully, solved the camera motion, and made it into a 3D scene with that little button on the left of the motion-tracking layout. I then modelled a basic spaceship-thingy and animated it landing, with flames (specifically the ) emitting light onto the ground plane (which is on the mask layer).   I would like to add the light from the flames into the footage, but it does not show up. I do see that there is no DiffuseIndirect pass in the compositing setup but I do not know how to mix that pass in and, if I can, whether the light from the HDRI will mess it up.   Is there a way to add in emission so that the render will look more realistic?


Simplify $0 \binom{n}{0} + 2 \binom{n}{2} + 4 \binom{n}{4} + 6 \binom{n}{6} + \dotsb,$ where $n \ge 2.$ Enter your answer in the form $f(n) 2^{g(n)},$ where $f(n)$ and $g(n)$ are polynomials in $n$ with integer coefficients. I know how to do this question where the numbers are consecutive and I also know that $\binom{n}{0} + \binom{n}{2} + \binom{n}{4} + \cdots = 2^{n-1}. $ How do I use this information to solve this problem?

I am trying to prove this binomial identity $\sum_{r=0}^n {r {n \choose r}} = n2^{n-1}$ but am not able to think something except induction,which is of-course not necessary (I think) here, so I am inquisitive to prove this in a more general way.  The left side of an identity occurs while solving another problem (concerning binomial theorem) so I am more interested in deriving the right side from the left side, else I have to remember it now onward.  EDIT: I am more interested in an algebraic proof rather than combinatorial argument or something involving calculus (however I liked  and  solution), hence I am removing the combinatorics tag.


I am reading the book Numerical Recipes in C in the chapter about the bisection algorithm for root finding but in the code I'm confounded by the following line of code:  rtb = f < 0.0 ? (dx=x2-x1,x1) : (dx=x1-x2,x2);   I know that the operator ( code1 ) ? ( code2 ) : ( code3 )   is like a if( code1 ) ( code2 ) else ( code3 )  but what i don't understand is that rtb that is a float is receiving either (dx=x2-x1,x1)   or (dx=x1-x2,x2), being x1 and x2 floats would't this be assigning some type of ordered pair of floats to a single float ?


Which of these is a more natural-sounding sentence:   Why Londoners didn't understand Frieda? Why didn't Londoners understand Frieda?   It seems that we oftener say "why didn't you do this?" and not "why you didn't do this?", but with the Frieda example, both sound passable to me.

What is the difference between:        "How it works?"      and        "How does it work?"


$T(X) =  [\{x_1-x_2+x_3\}, \{0+x_2-x_3\}, \{0+0+0\}]$ is a linear transformation from $\mathbb R^3$ to $\mathbb R^3$.  Find a matrix $A$ such that $T(x) = A(x)$   Can anyone point me in the right direction?  Thanks

I have been studying linear algebra for a while now, and I still can't understand the basic concept of linear transformation and the easy ''translation'' of them the matrices.  I understand that every proof we make can be done with both concepts, and that they are connected pretty close, and there is a basis which ''moves'' us from one concept to another.  If anyone can write a brief explanation, or some reading material, It would be a big step for me for further understanding of the subject.  Thanks,  Alan


I have studied deep copies over the day but I still don't quite get it.  Here's what I want.  static class MyList  List<MenuData> Menu1 = MenuList.Menus.ToList(); List<MenuData> Menu2 = MenuList.Menus.ToList();   I use Menu2 on remove method. However, Menu1 was also deleted. I realize that Menu1 and Menu2 were deleted together because of Swallow Copy.  They also referred to samples of other people, but failed.  static class MenuList {     public class MenuData     {         public string ID { get; set; }         public string Text { get; set; }         public string Image { get; set; }         public Boolean Expanded { get; set; }     }      public static List<MenuData> Menus = new List<MenuData>()     {         new MenuData {             ID = "1",             Text = "Service",             Image = "file_path.png",             Expanded = false         },     };      public static T Clone<T>(T obj)     {         using (var ms = new MemoryStream())         {             var formatter = new BinaryFormatter();             formatter.Serialize(ms, obj);             ms.Position = 0;             return (T)formatter.Deserialize(ms);         }     }      public static List<MenuData> CopyMenus = MenuList.Clone(MenuList.Menus); }   ErrMessage : The format 'Models.MenuData' is not marked serializable.  It was asked to reduce further waste of time.

I have a generic list of objects in C#, and wish to clone the list. The items within the list are cloneable, but there doesn't seem to be an option to do list.Clone().  Is there an easy way around this?


I need some suggestions for drawing flowchart for my process. The whole process is divided into three modules   Module 1 Random: The inputs to this module are two scalars $m$ and $n$. It outputs to matrices $\mathbf{A}$ and $\mathbf{B}$.  Module 2 Deterministic: The input here is a range of angle $\theta$. It outputs two vectors $\mathbf{x}$ and $\mathbf{y}$ computed from a fixed relationship involving $\theta$  Module 3: It combines $\mathbf{A},\mathbf{B},\mathbf{x},\mathbf{y}$ according to a known relationship.   My question is    I want have three separate boxes for these the modules. Module 1 and 2 are drawn in parallel in top half of chart. Module 3 that goes in bottom half extends from southwest corner to module 1 to southeast corner of module 2. Since within each module module I need to show its internal process, I want to have a flexible code so that change in one does not effect other blocks. In Module 2, I want to draw a circle showing $\theta$ (like below)     Which tool should I be using to draw this flowchart?

I know that it can be done with graphics packages like TikZ, but it seems to be a bit of an overkill. And for those not already familiar with the TikZ system, learning it can be a bit of a barrier. So my question is     Assuming the advanced graphics capabilities are not necessary, and I just need a bare-bones flow chart (which should be implementable just using the picture environment), is there a LaTeX package for simply making a flow chart?


Some context: I have a dataset from 14 samples that each are comprised of two duplicate parts. Each duplicate part of each sample has sub-samples, and each of these have a location in which can be described by an x and y position where n x=10 and n y=10 (100 positions, per 2 duplicates, per 14 samples = 2800 Unique IDs). So, each sub-sample has a unique ID that is comprised of sample'+'part'+'locationx'+'locationy. Note this is not a product (I think!?) but a joined string comprised of each possible combination. Each unique ID has considerable amounts of numerical data attached to it. I wish to generate a list of the unique ID of each sub-sample, so that I can then use this to loop code efficiently. The unique IDs would be tedious to write out, for instance as a nested list. I have read many posts about how to add a string to each element in a list. This can be achieved by a List Comprehension. That would speed things up. But, what about if you want to add each string in a list to each string in another list? That would speed things up mightily! This sounds a little like building a multidimensional array, which can be achieved using lists, but not if those lists are strings (it seems to me!), only integers. I hope I'm wrong and someone can tell me so. A downsized description of the concept using just two lists:     list1 = ['foo', 'fob', 'faz']     list2 = ['bar', 'bat', 'bump']  magic     list3 = ['foobar', 'fobbar', 'fazbar', 'foobat', 'fobbat', 'fazbat', 'foobump', 'fobbump', 'fazbump']

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I have a Bacchetta Sparta with 650x 23c tires, can I switch out to a wider tire ? Seems it would be more stable.

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


Premise: I am under the effects of disguise self to look like a human and I am in fact, an elf. I then cast polymorph on myself to turn into a T-rex and then take enough damage to make me lose concentration on polymorph, would I appear to be an elf or human after the spell drops? What if the spell was dropped due to the polymorphed T-rex running out of health?

Based on , if a target is under the effect of an ongoing spell, and then the target changes such that it is no longer a valid target, the spell no longer effects them.  But does the spell end, or is it merely suppressed?  For example, suppose a human has been charmed by a dominate person spell. A friendly wizard casts polymorph on them; they fail their save and get turned into a sheep.  This makes their type change to Beast, which is an invalid target for the dominate person spell, and the charm effect ends. The next turn, the wizard chooses not to concentrate, so polymorph ends and the target pops back into human form.  Assuming the dominating caster has maintained their concentration (if possible), did the spell simply end when the target became invalid, or does being invalid just suppress the dominate spell, which reasserts itself once the target is once more valid, like it would in an antimagic field?


I have the following expression   $$\left\{\varphi\in\text{End}\left({\widetilde{E}/\overline{\F}_{\Pf}}\right)\mid \varphi\text{Frob}_{\Pf}=\text{Frob}_{\Pf}\varphi\right\}$$   and would like to know how to match the length of \mid to the length of \left\{ and \right\}. Thanks!

I am looking for a pipe symbol that can be made to vary in height automatically.  One of the common ways of writing "such that" in mathematics is with the pipe symbol (|). The pipe can be represented in LaTeX directly as the character | or as \vert, but neither of these expands vertically in math presentation mode. I can adjust it manually this way:  \[\mathcal{H}=\left\lbrace h(x)=\sum_{i=0}^{k-1}a_{i}x_{i}\mod m\ \Bigg\vert      \ a_{i}\in\mathbb{Z}_{m^{k}}\right\rbrace\]     but I am looking for a true variable-sized option, parallel to \lbrace etc.  The amsmath package provides \lvert and \rvert, but I do not find them expanding as expected, and the amsmath documentation specifies that they should be used as binary delimiters (one on each side of something else), rather than alone.


I am trying to understand the phrase "favor composite over inheritance".   Could someone give me a real life example why composition is better than inheritance.  Also if there are any drawbacks?

Why prefer composition over inheritance?  What trade-offs are there for each approach?  When should you choose inheritance over composition?


Given $a \in \{1,2,...,250\}$ and $b \in \{0,1,...,1000\}$  $a$ and $b$ are chosen randomly, how does one calculate the probability of $a > b$?

Given $a \in \{1,2,...,250\}$ and $b\in \{0,1,...,1000\}$  What is the probability that $a > b$?  I know there already is  question with a very similar question, however it's over an interval of $\mathbb{R}$ so I hope there is another way opposed to the Integral used in the formal solution.  How does one go about calculating said probability?


While  go through the review, i got a  and i found it easily before selecting the options.    This line clearly shows that it's an audit.And also it will be an opposite of the above line.  Is it's a bug?

I was looking through someone's edit history and I was looking at :    Why does it give this notice, while at the same time saying that it's a high-quality post?


I want to write a shell script that will require sudo privilege to do certain task, but also need to change certain configuration as current user. I want to automate the script as much as possible so it does not need any user intervention.  The problem I have is that if I run the whole script as sudo, I cannot change current user's configuration. But if I just add sudo to the specific command that require root privilege, I will need to keep input the password because the script is long and sudo will time out.  Is there a way I can run the script in current user, but keep the sudo privilege when I need it?

Let's say I have a script that will be executed on various machines with root privileges, but I want to execute certain commands within that script without root.   Is that possible?


I am getting this error while running the batch. Any way to fix this. thanks  global class FileImpoLog implements Database.Batchable<sobject> {         global Database.QueryLocator start(Database.BatchableContext bc){         return Database.getQueryLocator('Select Id,Document_Process_Date__c,Workspace__c,CreatedBy.Name,Folder_Name__c,CreatedDate,CreatedById from FileImporter__c where  CreatedDate = today and Doc_Status__c != null');      }       global void execute(Database.BatchableContext BC, list<Sobject> obj){           List<File_Importer_Log_Entry__c> lstLogEntry = new List<File_Importer_Log_Entry__c>();          system.debug('lstFileImpor******' + obj);          for(Sobject o : obj){             FileImporter__c  M = (FileImporter__c ) o;             File_Importer_Log_Entry__c ML = new File_Importer_Log_Entry__c();             ML.created_by__c = M.CreatedBy.Name;             ML.Document_Process_Date__c = M.Document_Process_Date__c;             ML.WorkspaceId__c = M.Workspace__c;             ML.Workspace_Name__c = M.Folder_Name__c;              ML.Created_Date__c = M.CreatedDate;             lstLogEntry.add(ML);         }         system.debug('lstLogEntry*******' + lstLogEntry);          try{             insert lstLogEntry;          //List<blob> lstBody;         Blob body;         for(File_Importer_Log_Entry__c objLog : lstLogEntry){              body = Blob.valueOf('Created By:'+objLog.created_by__c+'/n'+'Document Process Date :'+objLog.Document_Process_Date__c+'/n'+'WorkspaceId :'+objLog.WorkspaceId__c+'/n'+'Workspace Name'+objLog.Workspace_Name__c+'/n'+'Created Date :'+objLog.Created_Date__c);             //lstBody.add(body);         }              system.debug('******body :' + body);             String loginToken = MSOP_iManage_Service.getLoginToken();             String targetUrl = 'https://test.com/api/v1/folders/folderName/documents';             HttpRequest req = new HttpRequest();             req.setEndpoint(targetUrl);             req.setHeader('x-auth-token', loginToken);             req.setHeader('Content-Type', 'application/json');             req.setMethod('POST');              req.setBodyAsBlob(Body);               //req.setBody(Body);             Http http = new Http();             HttpResponse res = http.send(req);             system.debug('**********res : ' + res);           }catch(DmlException e){             system.debug('***Error while inserting log entry - BatchName:FileImpoLog :' + e.getMessage());         }      }      global void finish(Database.BatchableContext BC){                           } }

I have same exception can please   The previous post issue is resolved.  Exception: :System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out  Visualforce Page   <apex:page controller="Controller" action="{!init}" showHeader="false" sidebar="false">     <center>         <apex:pageBlock title="Request Listener"></apex:pageBlock>               </center> </apex:page>   Controller :            PUBLIC with sharing class Controller {        PUBLIC String fromNumber      = ApexPages.currentPage().getParameters().get('From');     PUBLIC String toNumber        = ApexPages.currentPage().getParameters().get('To');     PUBLIC String body            = ApexPages.currentPage().getParameters().get('Body');        PUBLIC PageReference init()     {                    System.debug('From Phone Number :' +fromNumber);         System.debug('To phone NUmber :' + toNumber);         System.debug('Message Body :' + body);          TwilioRestClient Client = TwilioAPI.getDefaultClient();                                                                SYSTEM.DEBUG('FROM AND To  Number is NOT NULL');                      String formattedNumber='+919876543210';                 IF(body != NULL)                 body = body;             ELSE                 body = '';             Case c = NEW Case (Subject = formattedNumber,Description = body,Origin = 'Phone');             INSERT c;                               Map<String,String> params1 = new Map<String,String>             {                'To'   => fromNumber,                'From' => '+1908280****',                'Body' => 'Conformation to customer'             };             TwilioMessage message = client.getAccount().getMessages().create(params1); /* Valid conformation SMS sent to the Customer.*/                                            return null ;     } }   While loin as admin then click preview on visualforce page executed but case is not created.I have checked the the debug log it throw the exception.


Let $f : \mathbb{R} \rightarrow \mathbb{R}$ be given as $f(x) = \begin{cases}        0 & \textrm{x = 0} \\       0 & x \notin \mathbb{Q} \\       \frac{1}{q} & x = \frac{p}{q} \in \mathbb{Q} \\    \end{cases} $ where $\frac{p}{q}$ is irreducible fraction. I have to prove that $f$ is continous in $x$ iff $x \notin \mathbb{Q}$ or $x = 0$. If $x = 0$ then $f(x)$ and for every $a_n \to 0$ we have $f(a_n) \to 0$ because we know that $\forall_{\epsilon > 0}{\exists_{N \in \mathbb{N}}{\forall_{n > N}{|a_n|<\epsilon}}}$ so we take $a_n$ for $n > N$ and if $a_n = 0$ or $a_n \notin\mathbb{Q}$ then $f(a_n) =0$ by definition, otherwise $|f(a_n)| < |a_n|$ so $|f(n)| < \epsilon$. How to make proof for other cases?

Let $h:[0,1]\to\mathbb R$  $h(x)=\begin{cases}0&\text{if }x=1\\\frac{1}{n}& \text{otherwise if }x\in\mathbb Q,x=\frac{m}{n},\;m,n\in\mathbb N,\gcd(m,n)=1\\0&\text{otherwise if }x\in\mathbb R\setminus\mathbb Q\end{cases}$  How do you prove that $h$ is continuous on all irrational points within $[0,1]$?


I understand that assuming an analytic solution, we look at the Taylor series and arrive at a unique solution y = exp(x). However how do we know that there are no other non-analytic solutions? (Ideally with as little analysis machinery as possible)

This may seem like a silly question, but I just wanted to check. I know there are proofs that if $f(x)=f'(x)$ then $f(x)=Ae^x$. But can we 'invent' another function that obeys $f(x)=f'(x)$ which is non-trivial?


Let $X$ be a complete and separable metric space. Define  \begin{equation} M := \{ f \, \mid \, f : X \rightarrow \mathbb{R}, \, f \text{ bounded and continuous } \} \end{equation}   Is M separable with respect to supremum norm?

Is it true, that if $X$ is a separable metric space, then the space of all continuous functions on $X$ with the supremum metric is also separable?


I am watching a video on asteroid size comparisons and I noticed that 2 Pallas (512 km) and 4 Vesta (525 km) are both "spherical" in shape (pretty much anyway).  However 52 Europa (319 km) is also pretty spherical.  Even 20 Massalia (145 km) appears to be part of a larger spherical asteroid that may have been broken.  Ceres at 939 km almost looks like a small moon.    So at what diameter does gravity force the object to become spherical?

I took this question from Quora because it seems interesting and this community would have some fun with it. I would assume that one would use the modulus formulas for force to counteract the gravity, but given that the question details allow for "a solid cube, although internal structure is fine (honeycomb, etc)," this might get more complicated.


I wrote "She suggested me to go shopping." Why is it wrong?  Can we say one of the following sentences?   She suggested going shopping. She suggested that we to go shopping.   How would you correct my original sentence?

I took an English assessment test online and this was my answer:     Someone suggested to go for a walk.   My answer was wrong and this was the correct sentence:     Someone suggested going for a walk.   Can someone please explain why my answer was wrong?


I have a small graph . I want to add nodes to a 2D list like this.  0 is connected to nodes 1 and 2, so at index 0 these two nodes are inserted and so on. The program should take input from user. For simplification, I have written this code. l = [[]]*4  l[0].append(1) l[0].append(2)  l[1].append(0) l[1].append(3)  l[2].append(0) l[2].append(3)  l[3].append(1) l[3].append(2)  print(l, end="\n")   But the output is [[1, 2, 0, 3, 0, 3, 1, 2], [1, 2, 0, 3, 0, 3, 1, 2], [1, 2, 0, 3, 0, 3, 1, 2], [1, 2, 0, 3, 0, 3, 1, 2]] And I want output as in the second image. How to achieve that?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Given a mathematical statement, can it be always be proven to be correct or incorrect, or is it possible that a proof can not be created?  Could all cases that could not be proven, be proven that no proof exists also? For example, with the Beal Conjecture, is it guaranteed that a proof exists, or could no such proof exist? I am thinking that some proofs could not exist such as problems that could take longer than the life of the universe to solve.  For example, proving that a hashed value equals a given number.

Is it possible to prove that you can't prove some theorem? For example: Prove that you can't prove the Riemann hypothesis. I have a feeling it's not possible but I want to know for sure. Thanks in advance


I answered a question and then deleted my answer. Now, I would like to find this deleted answer again. In similar posts (see , and ) it is claimed that the deleted answers appear in the list of all answers, perhaps at the end, perhaps marked red. I checked all my answers in all possible sortings but I cannot see my deleted question, neither red nor black. So, how can I find it?

I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site. (Note that some questions are  after 30 days or 1 year, and the author might be oblivious about what happened.)   , the "deleted recent [questions/answers]" links in one's own user profile now list all respective posts that were deleted in the past 60 days, rather than just those that were originally posted in the last 60 days. , users with the "access to moderator tools" privilege (10k+ on designed sites, 2k+ on beta and non-designed sites) can use the search operator deleted:1 to see all their own deleted posts. , deleted questions and answers that were posted in the past 60 days, can be seen using the "deleted recent questions" and "deleted recent answers" links on the questions and answers tabs (at the bottom of the tab) in your user profile. For older posts: as of 2013-04-23 you can  if you already have a link to them, but they still aren't linked from the user profiles (not even just for you). Nor do you see inbox notifications for comments on them if you come back a few hours later. You have to have thought to bookmark your question, or you have to go digging for it in your browser history.


So basically I have an external hard drive with a bunch of old pictures on it my goal is to get them all to google photos. Problem is since these photos where managed with the mac photo software there sorted into a whole bunch of different folders depending on year and date(I think there's about 4000 different folders) I could go through and upload the photos by hand but that would take a long time. So I'm looking for a way to grab all the files with a picture extension ex .jpg, .bmp, and etc and move them to a folder. I'm using Ubuntu and am not afraid to write a script to achieve this. Thank you!

I am searching for files which name which contain AAA within their path using following command:  find path_A -name "*AAA*"   Given the output showed by the above command, I want to move those files into another path, say path_B. Instead of moving those file one by one, can I  optimize the command by moving those files right after the find command?


I have heard this a couple of times now but I don't know the reasoning behind this. I know that the film adaptation of the novel was released shortly before the authors death.  Also, if this is the case, what was Ridley Scott's response to his distress?

Was Philip K. Dick able to watch a complete version of Blade Runner before his death or just unedited material?  The Blade Runner release date according to  and IMDb was 25 June, 1982. Philip K. Dick died a few months before, on March 2, 1982.