I was watching this talk [1] where two engineers from Seagate were presenting their findings of using their newly-developed MACH.2 multi-actuator drives [2] as part of ZFS pools. In some cases, they were measuring about twice the IPOS per second as well as twice the throughput.  During the Q/A-Section, there was one question asked, which I found quite interesting (at 25:57 in the video at [1]). The person asking the question noted that, by their understanding, these new drives only doubled the number of actuators (groups of heads that move together) from 1 to 2 while the number of heads stayed constant and that this should only maybe explain a doubling in IPOS but not a doubling in throughput. The explanation given was that in traditional drives, with a single actuator, only one head is active at a time and used for reading or writing while in their new drive, one head for each actuator can be active at the same time.  This last fact surprises me greatly. Considering that allowing multiple heads to be active at the same time could increase read and write throughput by a large factor, it seems that there must be almost insurmountable obstacles in building a disk drive with this capability.  What are these obstacles? And are there examples where this has nonetheless been achieved?  [1]:   [2]:

Suppose we have a harddisk with 2 platters with characteristics below:     Rotational rate: 10, 000 RPM   Avg sectors/track: 1000   Surfaces: 4   Sector size: 512 bytes   I was reading "Computer Systems: A Programmer's Perspective 2ed" when I found that it calculates transfer time as if it only uses ONE head to read a sector. If that's the case, why not use 4 heads to write(read) on 4 surfaces? So when I write a 2K bytes file, each head should only need to wait for the platters to rotate just one sector length instead of 4, thus reducing the transfer time by a factor of 4. Or even redesign sector to make each sector on one cylinder but on 4 tracks residing same position respectively on 4 surfaces. Each one of (512/4) bytes. So when the hd needs to read a sector of 512 bytes, we only need the disk to rotate roughly 1/4 compare to original time.  The idea looks like RAID 0.


In the following example. Is the lack of a hyphen after 17th correct?  The painting is from the 17th century.  And in the following example, is the usage of a hyphen correct?  It's a 17th-century painting.

Which variant is correct: "twentieth-first-century reader" or "twentieth-first century reader"? Is the use of the second hyphen in the first example a matter of taste or not?


I have something like this  name {     abc -> def{x};     abc -> def{x};     abc -> def{x};     abc -> def;     abc -> def;     abc -> def; }   I want to extract everything between the first and last braces {} so that the result looks like this  abc -> def{x}; abc -> def{x}; abc -> def{x}; abc -> def; abc -> def; abc -> def;   This is a different question because I am looking for everything between FIRST and LAST brackets.

I'm having a bit of trouble getting a Python regex to work when matching against text that spans multiple lines. The example text is ('\n' is a newline)  some Varying TEXT\n \n DSJFKDAFJKDAFJDSAKFJADSFLKDLAFKDSAF\n [more of the above, ending with a newline]\n [yep, there is a variable number of lines here]\n \n (repeat the above a few hundred times).   I'd like to capture two things: the 'some_Varying_TEXT' part, and all of the lines of uppercase text that comes two lines below it in one capture (i can strip out the newline characters later).  I've tried with a few approaches:  re.compile(r"^>(\w+)$$([.$]+)^$", re.MULTILINE) # try to capture both parts re.compile(r"(^[^>][\w\s]+)$", re.MULTILINE|re.DOTALL) # just textlines   and a lot of variations hereof with no luck. The last one seems to match the lines of text one by one, which is not what I really want. I can catch the first part, no problem, but I can't seem to catch the 4-5 lines of uppercase text. I'd like match.group(1) to be some_Varying_Text and group(2) to be line1+line2+line3+etc until the empty line is encountered.  If anyone's curious, its supposed to be a sequence of aminoacids that make up a protein.


I have folder structure as follows:  /foo/trunk/mss/cloud   and  /foo/trunk/mss/model   my python file is located at subfolder model with name test.py I want to import all modules located in subfolder cloud so my code in test.py is:  import mss.cloud as cloud   but I got an error:       ImportError: No module named mss.clould   should I make any change on PYTHONPATH or anything else? any help is really appreciated.

How do I import a Python module given its relative path?  For example, if dirFoo contains Foo.py and dirBar, and dirBar contains Bar.py, how do I import Bar.py into Foo.py?  Here's a visual representation:  dirFoo\     Foo.py     dirBar\         Bar.py   Foo wishes to include Bar, but restructuring the folder hierarchy is not an option.


There is a book by Galina Demykina "The lost girl and the scallywags" (a Russian one, translated into English, 1977) and there is a very strange sentence: "Zoya saw nothing save thick, ever so thick bushes." I cannot undestand it. It must mean that Zoya could see nothing, but very thick bushes. So, is there a real English word-construction "save ..., ever so ..." or it is just a made-up by the translator?

Take the following example sentence:     There was nothing there save for the warmth of the immeasurable light.   Is this the proper use of save for?  Is there ever a proper use of save for? Can someone explain to me the correct usage, if there is one, and possibly some etymology of this phrase?  Examples of other correct use would be appreciated, though not critical.


I receive following error in terminal:  No suitable Java Virtual Machine could be found on your system. The version of the JVM must be at least 1.5. Please define INSTALL4J_JAVA_HOME to point to a suitable JVM. You can also try to delete the JVM cache file   I'm using 14.04.

How do I install Java, including in my browser, so websites with Java work?


I am interested in the current state of the art for selecting initial seeds (cluster centers) for K-means.   Googling leads to two popular choices:   random selection of initial seeds, and, using the KMeans++ selection technique:    Are there any other promising methods that anyone here is aware of, which might not be as popular?

If I have a certain dataset, how smart would it be to initialize cluster centers using means of random samples of that dataset?  For example, suppose I want 5 clusters. I take 5 random samples of say, size=20% of the original dataset. Could I then take the mean of each of these 5 random samples and use those means as my 5 initial cluster centers? I don't know where I read this but I wanted to know what you guys think about the idea.    UPDATE: Please see this thread  for the general discussion about the various initialization methods.


I am a new student in the US. I noticed that a lot of bikes were left with only a tire locked on a post. Therefore, I usually locked my bike on the water pipe outside my apartment. I put a U-lock between the water pipe and my bike frame. However, after I left my apartment for a week, it was gone!  Now I have got a new bike, which is an impressive red Giant. I was really worried that it will be stolen again. Can anyone help me by telling me what else I can do to keep my bike safe in that terrible area. Thanks a lot.

I recently saw a small clip about how to securely lock your bike.  I was wondering what are your tips for minimizing the chances of getting your bike stolen.                                  Here are a few of my tips:   use 2 chains take the saddle off ( makes it less attractive, especially in a bike rack )


I am trying to automate a SSH bash script to check whether my server is able to SSH the remote devices. I can not install any third party tool like sshpass, expact or Net:SSH as it is not allowed in my organization.  I have created an ip.txt file which contains the IP addresses. Script will pick the first IP and SSH the device. In next step I want to supply any command say date and last exit. Everything goes well until I supply exit command. "Exit" command terminates the whole script instead going to the next loop/IP.  Is there any way to continue the script even after supplying the exit command on the remote device prompt?  However, the below commands works: ssh username$IP "date && exit" but I have different commands to run on different servers.  Code it working fine but when exit command is supplied, shell script gets terminated.  #!/bin/bash for IP  in `cat /home/ip.txt` do echo "Going to SSH first $IP" ssh username@$IP date >> log.txt exit >> log.txt echo "Completed first loop for $IP" done   I want to enter the commands manually and want the script should not terminate when exit command is supplied.

I have to run a local shell script (windows/Linux) on a remote machine. I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B. The local and remote computers can be either Windows or Unix based system. Is there a way to run do this using plink/ssh?


What is an example of a connected Hausdorff space with a countable number of elements? Any finite Hausdorff space is discrete (therefore not connected) and there are a myriad of examples uncountable Hausdorff spaces. But what about countable?

Do countable Hausdorff connected topological spaces exist?


Is it correct to use "what's," "who's," and "why's," in a single sentence?  Example:     She was perplexed at the "what's", "who's" and "why's" of the   situation, so much so that she lost her mental balance.

Possible Duplicate:          In the rosary, a Catholic sacramental composed of prayer beads, there is a short prayer concluding each decade called "Glory Be" ("Glory be to the Father, Son and Holy Spirit...").  Would the plural be Glory Bes or Glory Be's?  Likewise, do you say 10 Hail Marys?


This is the context:  Seasoned travellers, especially the sort that jet around the globe clutching laptops, know that certain words are to be avoided like the plague. This is because those who choose these words are masters of disguise : the service offered is the exact opposite of that indicated by the name used to describe it. Thus many flights described as “direct” are actually indirect, since they involve a stop, and a lengthy wait, in, say, Dallas-Fort Worth en route between Boston and Vancouver. Similarly, habitués of railways learn to shun any train claiming to be an “express” or “rapid”, since such services seem invariably to be the slowest (by design, not just by accident). Which perhaps make it fitting that some of the most seasoned travellers of all, management consultants, appear to have been inspired by just this sort of untruth-in-advertising. The buzziest among them now claim not just to be consultants, or advisers, or even experts. They are “thought leaders”.

This is the context: "Seasoned travellers, especially the sort that jet around the globe clutching laptops, know that certain words are to be avoided like the plague. This is because those who choose these words are masters of disguise : the service offered is the exact opposite of that indicated by the name used to describe it. Thus many flights described as “direct” are actually indirect, since they involve a stop, and a lengthy wait, in, say, Dallas-Fort Worth en route between Boston and Vancouver. Similarly, habitués of railways learn to shun any train claiming to be an “express” or “rapid”, since such services seem invariably to be the slowest (by design, not just by accident). Which perhaps make it fitting that some of the most seasoned travellers of all, management consultants, appear to have been inspired by just this sort of untruth-in-advertising. The buzziest among them now claim not just to be consultants, or advisers, or even experts. They are “thought leaders”."


I’m aware that not all commutative rings guarantee the existence of gcd’s. The only example I have of this currently is the ring of even integers in which 2 has no divisors and therefore no greatest common divisor. I can’t, however, think of a commutative ring with identity in which this is the case. I know that such an example would need to not be a UFD since UFD’s guarantee the existence of gcd’s. Any ideas?

An integral domain $R $ is a gcd-domain if for all $a,b \in R\setminus \{0\} $ there exists $d\in R  $ such that    $d$ divides both $a $ and $b $  for all $d'$ in $R $, if $d'  $ is a common divisor of $a $ and $b $ then $d'  $ divides $d $   But I can't come up with an example of integral domain which is not a gcd-domain. Can you find one or give me a hint ?


I'm trying to visit Italy again so I can see one of my family members and I don't quite get the rule.  I know it's concept is about the first day you enter the Schengen zone, the 180 day count starts and you can't be in the Schengen zone over 90 days.  I'm not even sure if I violated the rule right now.  So my situation: I was in Italy on August 4-September 4 2018 and on January 11-March 7 2019. For 89 days total if my count was right...   So question #1: Did I violate the rule? question #2: If I didn't violate it, when can I go back to Italy for 90 days fully?  Thanks in advance!

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


I created a device which gives out diamonds when a lever is pulled. The code is: setblock ~ ~5 ~ minecraft:diamond_ore destroy I want this to run on repeat and give out a diamond everyday or every half-day. It's 1.16.5.

I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A:  How do you either activate a command x seconds/minutes/hours/… in the future or every x seconds/minutes/… in a loop?  Repeating command blocks and ticking functions execute 20 times per second, redstone is  in many situations and most of the extremely fancy solutions, like falling blocks in cobwebs, have broken over time or are needlessly complicated.


What is the most easy way for a noob guy in coding to create interactive web-maps ? In GIS field I've worked with QGIS as open-source software, but keept my project on desktop. In my research I've found this combination for web maps-- Geoserver+Leaflet.  Right now I'm studying Geoserver's documentation. Any tutorials to recomend ?

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


I signed up for a developer account for my son under my name because he is not of age yet and because he wants to make his own apps. But itunesconnect won't let me input my bank account info, ect. for the paid contract necessary for him to set up the iap because I already put in my own information for my own account. What should I do?

In order to sign up for a developer account, I'll need my parents credit card. However, after going through the signup process, my Dad's name shows up because he is the credit card holder. How can I publish an app under my name, if I don't have access to my own credit card? Should I buy a prepaid one?


I'm a little new to Blender. I've been trying to render this animation in Eevee. It's 18 seconds long, and includes two human models (only the heads). For some reason, it will not render. When I click render animation, it only shows the very first frame in the beginning. After that, the render is completely grey-transparent and it only gets to about 98%. This has never happened before. Any suggestions?

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


I need hel with the bibliography. This is how it appears in my document:  "Author name. Title. **: Journaltitle. (Date)."  But I'd like to remove "In:" before the journaltitle. How can I do that? Thank you in advance for your answers!  This is the packages I'm using for the bibliography:  \usepackage[autostyle,italian=guillemets]{csquotes} \usepackage[backend=biber,style=numeric]{biblatex} \addbibresource{biblio.bib}

How do I suppress the "In: " before the journaltitle? Like so:     In: Journal of Applied Physics


I'm currently resolving a problem, and I came across the following matrix for which I need an expression of the determinant. $$     \begin{matrix}     a+1 & 1 & 1 & 1 & . & . & . & 1 & 1 \\     -a & a+1 & 1 & 1 & . & . & . & 1 & 1 \\     0 & -a & a+1 & 1 & . & . & . & 1 & 1 \\     0 & 0 & -a & a+1 & . &  &  & . & . \\     . & . & . & . & . & . &  & . & . \\     . & . &  & . & . & . & . & . & . \\     . & . &  &  & . & . & . & 1 & 1 \\     0 & 0 & . & . & . & 0 & -a & a+1 & 1 \\     0 & 0 & . & . & . & . & 0 & -a & a+1 \\     \end{matrix} $$ where $a$ is a real number. This matrix can also be described like this:  $$ m_{i, j} =  \begin{cases} 1,  & \text{if $i<j$} \\ a+1, & \text{if $i=j$} \\ -a, & \text{if $i=j+1$} \\ 0, & \text{if $i>j+1$} \end{cases} $$  The size of the matrix is not known, potentially high (more than 1000).  I do not know how to solve this problem, nor can it be solved.  Edit:  Following achille hui advice, the problem is equivalent to compute an expression of the determinant of the next matrix:  $$     \begin{matrix}     2a+1 & -a & 0 & . & . & . & 0 & 0 & 0 \\     -a & 2a+1 & -a & . & . & . & 0 & 0 & 0 \\     0 & -a & 2a+1 & . & . & . & 0 & 0 & 0 \\     . & . & . & . & . &  &  & . & . \\     . & . & . & . & . & . &  & . & . \\     . & . &  & . & . & . & . & . & . \\     0 & 0 & 0 &  & . & . & 2a+1 & -a & 0 \\     0 & 0 & 0 & . & . & . & -a & 2a+1 & -a \\     0 & 0 & 0 & . & . & . & 0 & -a & a+1 \\     \end{matrix} $$ Be aware that the last coefficient is  $a+1$ and not $2a+1$.  Edit 2:  By developping the last row, we get ride of the last coefficient and we deal with tridiagonal matrices with constant diagonals.  Using the answer from , we get the following expression: $$ det_n = \frac{1}{\sqrt{4a+1}} \biggl[ \frac{1+\sqrt{4a+1}}{2} \biggl(\frac{2a+1+\sqrt{4a+1}}{2}\biggl)^n - \frac{1-\sqrt{4a+1}}{2} \biggl(\frac{2a+1-\sqrt{4a+1}}{2}\biggl)^n \biggl] $$

How to show that the determinant of the following $(n\times n)$ matrix  $$\begin{pmatrix} 5 & 2 & 0 & 0 & 0 & \cdots & 0 \\ 2 & 5 & 2 & 0 & 0 & \cdots & 0 \\ 0 & 2 & 5 & 2 & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots & \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & 2 & 5 & 2 \\ 0 & \cdots & \cdots & \cdots & \cdots & 2 & 5 \end{pmatrix}$$  is equal to $\frac13(4^{n+1}-1)$?    More generally:     How does one compute the determinant of the following  (where the three diagonals are constant)?      $$M_n(a,b,c) = \begin{pmatrix} a & b & 0 & 0 & 0 & \cdots & 0 \\ c & a & b & 0 & 0 & \cdots & 0 \\ 0 & c & a & b & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots& \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & c & a & b \\ 0 & \cdots & \cdots & \cdots & \cdots & c & a \end{pmatrix}$$      Here $a,b,c$ can be taken to be real numbers, or complex numbers.   In other words, the matrix $M_n(a,b,c) = (m_{ij})_{1 \le i,j \le n}$ is such that $$m_{ij} = \begin{cases} a & i = j, \\ b & i = j - 1, \\ c & i = j + 1, \\ 0 & \text{otherwise.} \end{cases}$$  There does not seem to be an easy pattern to use induction: the matrix is not a diagonal  of the type $M = \bigl(\begin{smallmatrix} A & C \\ 0 & B \end{smallmatrix}\bigr)$ (where we could use $\det(M) = \det(A) \det(B)$ for the induction step), and there are no lines or columns with only one nonzero entry, so  gets complicated quickly.  Is there a general pattern that one could use? Or is the answer only known on a case-by-case basis? It's possible to compute the determinant by hand for small $n$:  $$\begin{align} \det(M_1(a,b,c)) & = \begin{vmatrix} a \end{vmatrix} = a  \\ \det(M_2(a,b,c)) & = \begin{vmatrix} a & b \\ c & a \end{vmatrix} = a^2 - bc \\ \det(M_3(a,b,c)) & = \begin{vmatrix} a & b & 0 \\ c & a & b \\ 0 & c & a \end{vmatrix} = a^3 - 2abc \end{align}$$  But there is no readily apparent pattern and the computation becomes very difficult when $n$ gets large.


Do you have any idea what is causing these artifacts on my cycles render?  I'm using a sun light source to illuminate the scene.  128 samples.  I've pasted a screenshot of the material that the artifacts are happening on

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


I am working on my homework and have come into a problem. I am relying on this fact to prove the statement:  "Let $a$ have order $n$ modulo $m$ and let $i$  denote an integer. Prove that $a^i$ has order $n$ modulo $m$ if and only if $gcd(i, n)=1$.  My intuition keeps telling me to use the division algorithm, but I can't see it.  Hints appreciated!

Lets say $g \in G$ where G is a group. Also $\operatorname{ord}(g)=n$. Then we have to prove that:  a) $\operatorname{ord}(g^k)=l $, where $l$ is the least number bigger than (or equal to)  $1$, such that $n\mid k*l$.  b) $\operatorname{ord}(g^k)=n \Leftrightarrow \gcd(k,n)=1$  With a) I tried to go like:   $(g^k)^l=g^{k*l}=g^k=g^n*g^k=g^{n+k}$ and then from second and last equality: $k*l=n+k$ from what I have that $k(l-1)=n$, and I am stuck. It may be simple or maybe I've gone a wrong path.  With b) I have no idea how to start, but it seems like a conclusion from a).  I would appreciate any help or hint. Thanks in advance!


Me set "data=journal" in etc/fstab file, after that i reboot, but system doesn't booting. After that me boot from LIVE-CD and tried to delete "data=journal" from /etc/fstab, but file works in ro mode.  blkid & /dev/disk/*:  ubuntu@ubuntu:~$ sudo blkid /dev/sda1: UUID="5aab4fef-bdbd-4f6f-bf59-7c164354a8fa" TYPE="ext4" PARTUUID="93d3e9f3-01" /dev/sr0: UUID="2018-10-17-22-44-30-00" LABEL="Ubuntu 18.10 amd64" TYPE="iso9660" PTUUID="133f436e" PTTYPE="dos" /dev/loop0: TYPE="squashfs" /dev/loop1: TYPE="squashfs" /dev/loop2: TYPE="squashfs" /dev/loop3: TYPE="squashfs" /dev/loop4: TYPE="squashfs" /dev/loop5: TYPE="squashfs" /dev/loop6: TYPE="squashfs" /dev/loop7: TYPE="squashfs" ubuntu@ubuntu:~$ ls -l /dev/disk/by-id total 0 lrwxrwxrwx 1 root root  9 Jan 10 16:17 ata-VBOX_CD-ROM_VB2-01700376 -> ../../sr0 lrwxrwxrwx 1 root root  9 Jan 10 16:17 ata-VBOX_HARDDISK_VB78947f38-edb217dd -> ../../sda lrwxrwxrwx 1 root root 10 Jan 10 16:19 ata-VBOX_HARDDISK_VB78947f38-edb217dd-part1 -> ../../sda1 ubuntu@ubuntu:~$ ls -l /dev/disk/by-uuid total 0 lrwxrwxrwx 1 root root  9 Jan 10 16:17 2018-10-17-22-44-30-00 -> ../../sr0 lrwxrwxrwx 1 root root 10 Jan 10 16:19 5aab4fef-bdbd-4f6f-bf59-7c164354a8fa -> ../../sda1 ubuntu@ubuntu:~$ ls -l /dev/disk/by-label total 0 lrwxrwxrwx 1 root root 9 Jan 10 16:17 'Ubuntu\x2018.10\x20amd64' -> ../../sr0

I'm trying to mount an hfsplus filesystem in a Xubuntu 12.04 VM (kernel version 3.2.0-23-generic) but when I type mount -o remount,rw /dev/sdb3 in command line it returns not mounted or bad option. Any help would be appreciated.


I'm trying to display Radio Group horizontally in lwc, but it seems to be not applying my custom css. HTML:  <template>     <lightning-radio-group name="radioGroup"                           label="Radio Group"                           options={options}                           value={value}                           type="radio"                           class="customRadioCls"></lightning-radio-group> </template>   JS:  import { LightningElement, track } from 'lwc';  export default class RadioGroupBasic extends LightningElement {     @track value = '';      get options() {         return [             { label: 'Sales', value: 'option1' },             { label: 'Force', value: 'option2' },         ];     } }   CSS:  .THIS .customRadioCls{     display : inline-block !important; }   In CSS I tried many variation like  .THIS.customRadioCls{         display : inline-block !important;     }   In inspect element I can display horizontally, by applying in standard class, but same is not working from css file.  .slds-form-element__control .slds-radio {     display: inline-block; }

How can I change the colors of lightning-button?  I tried doing this in my css:  .my-button {     background-color: #14a6bc;     color: #ffffff; }   and applying that class to my <lightning-button> and removing the variant but I still get the base colors? I am trying to use these examples:


Disclaimer:    I know to read in text files with the -raw switch I know about the (?sm) and -AllMatches qualifiers I've read the other similar solutions ( and ) but can't successfully modify their solutions for my use case   I have a log file ~1200 lines long, so not overly huge. The log file is a mixture of 'plain text' and then that 'plain text' is repeated as XML. I want to select (and ultimately remove) the blocks of 'plain text' so the blocks of XML remain.  The plain text blocks start with Log Name: then some more text on that line, then multiple lines with text, finishing with Event Xml: (nothing else on this line).  Example plain text block:  Log Name:      AD FS Tracing/Debug (multiple lines of text) Event Xml:   My attempts either select nothing, or everything, or eveything from the first Log Name: to the last Event Xml:  Example regex pattern:  '(?smi)Log Name:.*Event Xml:'   Have tried this in powershell and notepad++. The log files are from Event Viewer on Windows 2012R2, so alternative solution to solve my overall issue: How to you export just the XML from Event Viewer?  Edit: (@ )  '(?si)Log Name:.*?Event Xml:' selects the entire log file. I had tried modifying the similar questions, but it doesn't select what I want. Hence why I asked my specific question - it's not a duplicate.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Everyone. I have a very difficult thing to do. I have a Linux server, and the root directory has 16GB of space.    df -h, shows the / directory has been used for 15GB, but  du -sh shows that only 5.9GB of space is used.  the lsof | grep deleted command shows only 101KB of space had not been released.  Finally, dumpe2fs showed a lot of blocks in the root directory weren't used (near 9.4GB).    I didn't know what was going on. Can you teach me what this is? This is a production server. Customers are not allowed to restart.  The directory following "--exclude=", which starts with  /i and /p, is the same thing as the two directories that start with a /i and /p in the results of df -h.  I've seen similar questions from other people, and I feel a little different.  The root directory near 9.4GB's block is not used, and there is only 101KB of space not released, so I think it's different from other people's questions, although their situation is a little similar to mine, Please don't label my questions with duplicate.

I have a Linux CentOS server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the total size of the two folders is larger than the disk used size.  Run du -sh on each folder, one use 50GB, the other one use 47GB  But run df -h, the used space is 96GB. (50GB + 47GB + 5GB) > 96GB  Is there any problem? Those two folders contain lots of files (1 million+). Thanks.


I'm currently using a virtual server.     2 vCores 8GB RAM Bandwith 100MBit/s Ubuntu 10.04   But still this seems to be not enough to handle the traffic on my site. Normally a page needs less than 0.2seconds to be generated, but when there are more visitors on the site at the same time, then it can also take sometimes more than 5 seconds.     MySQL Statistics (approximately): 1300 queries/sec 80   connections simultaneously CPU usage > 90 %   I have the possibility to upgrade to a better Virtual Server (4 vCores, 16GB RAM). Would this have much and visible effect on the performance? Or is there any setting I could change in the apache config files?  Please tell me if you need any further information besides from that.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I am stuck trying to capitalise the first character of the first name and surname. I have formatted the names a lot already but i am stuck as the how to change the first letter of the surname when the length for names is always different.  CREATE TABLE:  CREATE TABLE Table1 ( Name varchar(30) )  INSERT INTO Table1 (Name) VALUES ('Domain/fred.smith'), ('Fred Smith@hotmail.com'), ('DIRECTOR/David lee'), ('DIRECTOR/andrew opal');   CURRENT QUERY:  SELECT  REPLACE([Name], '.', ' '), UPPER(LEFT([Name],1))+LOWER(SUBSTRING([Name],2,LEN([Name]))) FROM ( SELECT CASE WHEN Name LIKE '%@%' THEN SUBSTRING(Name ,0,CHARINDEX('@',[Name]))  WHEN Name LIKE '%DIRECTOR%' THEN RIGHT([Name],(Len([Name])-9))  ELSE RIGHT([Name],(Len([Name])-7)) END AS [Name] FROM Table1 ) S   CURRENT RESULT:  |             |             | |-------------|-------------| |  fred smith |  Fred.smith | |  Fred Smith |  Fred smith | |   David lee |   David lee | | andrew opal | Andrew opal |   But i am looking for:  |             | |-------------| |  Fred Smith | |  Fred Smith | |   David See | | Andrew Opal |   Can anyone help me further? Thanks  SQL Fiddle -

I have a table that was imported as all UPPER CASE and I would like to turn it into Proper Case. What script have any of you used to complete this?


I am using the nameaddon field to include death dates of certain authors in my bibliography.  This is working well in the bibliography at the end, but doesn't always give the results I want in the footnotes.  Is there an option to suppress the nameaddon in a footnote citation without resorting to \shortcite? I'm using Biber backend.

My problem is this: I use one biblatex-file as a source for a number of documents. In the biblatex-file I used shorthand in every entry. The problem is that in some documents I need to cite the references fully rather than the short form. My question: Is there something a command that I could add to my preamble in order to suppress the shorthand entry and to get full title output?


Nowadays there is a lot of questions regarding  and perpetual machines. So, can we make one? i searched a lot but i am am still not satisfied with the answers and with thermodynamics.

Why  wouldn't be possible if we are so technological advanced?  It is just a thing that I was wondering for too long. I mean, we are able to create so powerful permanent magnets, like neodymium magnets which can store an massive quantity of energy for a long period of time, but we are not able to use that energy at all. Why?


If the escape velocity of a neutron star is just less than that of light, will light come out very slowly from the star?

How do I solve the speed of light in gravitational field?  Should I just add gravitational acceleration in speed of light?  $$c'=c_0+g(r)t~?$$


What is the value of the sum for n=1 to n=N of n * constant ^ n?  I have considered Geometric but with the multiplication by n I cannot get this to work.

I want to know the general formula for $\sum_{n=0}^{m}nr^n$ for some constant r and how it is derived.  For example, when r = 2, the formula is given by: $\sum_{n=0}^{m}n2^n = 2(m2^m - 2^m +1)$ according to   Thanks!


Might be a little vague - from what I recall it might be mid 80's to early 90's, English speaking, american origin, live action movie, about an (evil) alien that uses humans as hosts (and can change his host), the alien itself looks like a small (half-basketball size) grey blob, and he's chased by some sort of an alien cop (humanoid) that has a silver phaser-looking gun that shoots a red ray/laser,I remember the final scene being the injured alien cop shooting the exposed alien blob, which had just exited his dying host on some sort of conference stage/platform, I was pretty young so I can't recall much more. Any help would be much appreciated :)!

I saw part of this movie back in the 80's or early 90's on late night cable TV. I remember the cops were chasing a bad guy, and the bad guy turned out to be possessed by some sort of creature.  This creature had the ability to move from host to host by crawling down their throats (sort of like the Edgar suit in Men in Black). It may have been a bug, or a slug. I think it was black.


This is a fairly simple math problem from a programming challenge but I'm having trouble wrapping my head around it. What follows is a paraphrase of the problem:  Kundu has a Bubble Wrap and like all of us she likes popping it.  The Bubble wrap has dimensions NxM, i.e. it has N rows and each row has M cells which has a bubble. Initially all bubbles in filled with air and can be popped.  What Kundu does is randomly picks one cell and tries to pop it,  there might be a case that the bubble Kundu selected is already popped. In that case he has to ignore this. Both of these steps take 1 second of  time. Tell the total expected number of seconds in which Kundu would  be able to pop them all.    So I know that the expected value is the sum of the product of the random variable x and the probability of that instance of x occurring but I'm having trouble parameterising the problem statement. What's the x and how does time play into it?

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


In the beginning of the first movie, in the first conversation, between Cypher and Trinity, he says:     Cypher: We're going to kill him, understand?   Trinity: Morpheus believes he is the One.   Cypher: Do you?   Why did Cypher said that? Was it a habit to kill potential red pills? Was Neo considered to be a threat, so he needed to be killed if he was not the One?

During the opening, we hear Trinity and Cypher talking to each other.     Cypher: We're going to kill him, understand?   Trinity: Morpheus believes he is the One.   Cypher: Do you?   Cypher says this in a way which may indicate there have been deaths before.  If so, were these deaths on purpose or accidental? I'm thinking he means taking a risk with the agents.


I am space stage right now and sometimes when I laser or bomb cities on a planet sometimes they will surrender, but other times they will just blow up. This gets annoying when I want to capture a whole planet.  Is there a specific way to make them surrender instead of destroying them? And if so how do I do it?

Sometimes you are forced to fight a spacefaring civilization. Sometimes their homeworld planet happens to have 10 cities and a precious sort of spice. Sometimes you really fancy the idea of capturing all of these cities whole to maximize the production of that precious spice. How can you go about doing that? Do particular weapons have a greater chance of destroying cities instead of capturing them? Does the number of turrets or buildings matter? Are allied ships a boon or a hindrance when trying to capture cities?


A friend of mine just presented me with the following reasoning. Obviously, it's faulty since the result is absurd. Apparently, there's an assumption that's being made or broken against but I fail to see where.  S = 1–1+1–1+1–1+... 1 - S = 1 - (1–1+1–1+1–1+...) 1 - S = 1–1+1–1+1–1+1-... 1 - S = S 1 = 2S   Conclusion: S is 1/2. It means that the sum of (-1)^n would be a half. But that can't be true, can it? I would expect it to be either zero (each negative value cancels out precisely one positive one). Alternatively, I'd say that the result doesn't exist due to some black magic based on infinities and other voodoo stuff.  How can I point out the formal mistake made above?

I've recently run into a proof that claims that $1 - 1 + 1 - 1 + 1 - 1 ... = \frac{1}{2}$ that proceeds as follows:     Let $S = 1 - 1 + 1 - 1 + 1 - 1 + ...$. Then $$S = 1 - (1 - 1 + 1 - 1 + 1 - 1 ...) = 1 - S$$ Therefore, $2S = 1$, so $S = \frac{1}{2}$. QED   I was under the impression that this sum doesn't converge, and therefore this step of the proof is invalid:     Let $S = 1 - 1 + 1 - 1 + 1 - 1 + ...$   That is, it's not even valid to suppose that the sum is equal to some (implicitly real or complex) number $S$, and therefore the reasoning that follows is meaningless because $S$ doesn't exist and therefore has any properties we want it to have.  Is the reasoning I've given above correct? That is, is it correct for me to claim that the proof fails because $S$ doesn't exist?  (I've heard that there are techniques for evaluating divergent integrals by using complex analysis and Taylor series, so perhaps there's another way to prove that the summation is $\frac{1}{2}$; I just wanted to see whether my reasoning is sufficient to explain why this particular proof is incorrect. If the proof actually is correct, then I stand corrected!)  Thanks!


I have a relatively clean install of Ubuntu 20.04. I have run the lines to include wine focal and i386 + keys etc but I still get unmet dependencies errors. I could uninstall ubuntu again but I've just got all Jack / pulse and alsa playing nice with ubuntu and simply wish to try and run a few of the Winblows VST's namely the Korg M1 so it's a bit of a pain in the *** to start all over but if needs must... any help appreciated. Here's what I have so far. sparky@sparky:~$ sudo apt update Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease Hit:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease             Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease   Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]   Hit:5 http://archive.canonical.com/ubuntu focal InRelease Fetched 109 kB in 1s (126 kB/s)                           Reading package lists... Done Building dependency tree        Reading state information... Done All packages are up-to-date.  sparky@sparky:~$ sudo apt install --install-recommends winehq-stable  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies.  winehq-stable : Depends: wine-stable (= 6.0.0~focal-1) E: Unable to correct problems, you have held broken packages. sparky@sparky:~$   I have then tried to install wine-stable which sends me on a rabbit hole for even more unmet dependencies.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


While using the mobile app I was wanting to see the /help page but could not find a way to get to it.  Is there a way?  If not, is it possible for new users to create an account from the app and not be able to access the site rules?

I just had that rare case of a newbie who barges in with off-topic content, it gets closed, and instead of starting to spew invective, politely asks "what are the rules". Currently, his or her  is on Cooking meta. The question text mentioned a curious thing:  Admittedly I only use the app so maybe that is where I am going wrong but I can't seem to find any rules about what can be asked, what sort of answers are allowed and what format it all has to be in.  The whole network already has a problem with getting new users to accept our high-moderation and strict-rules culture, especially when their expectations are set by general discussion forums which don't restrict themselves to objective non-poll questions. I think that the rules might be even harder for the users of sites outside of the trilogy, because the interested population is not made up of geeks who automatically value the information-content-aspect of information  above the other aspects. Even for users who have easy access to the help center, there is lots of friction to get accustomed to our rules (and many leave in anger instead). So, for the people who are willing to RTFM, I think that we should make the access easy. I admit that I hadn't expected somebody who hasn't used the site to start using the app, but now we have observed it happening. So, I think that it is important to include a link to the help center in an easily accessible place in the app. Even if at the beginning, it cannot be brought into the app format and has to be a link which opens in the mobile browser, it will be useful for the poor confused new users.


As you can notice, the dots of the dotted double line are joined by two very thin lines. Also the dashed-double line joins them automatically. Is there a way out to remove those unions? (I left knots there because I'd like this solution to be compatible with that package).   This is a zoom to the (relevant) issue of the following code:    \documentclass{standalone}  \usepackage{tikz}  \usetikzlibrary{knots} \usetikzlibrary{intersections}  \begin{document}  \begin{tikzpicture}    \clip (-4,1) rectangle (1,7);  \begin{knot}[  clip width=5 ,  scale =3,  clip radius=8pt,  line  cap=butt,   ] \strand [dotted,double, double distance=2pt]   (-1 ,1) to  [out=up ,  in=down ]  (0 ,2) ;    \end{knot}   \begin{knot}[  clip width=5 ,  scale =3,  clip radius=8pt,  ] \strand [red,dashed,double, double distance=2pt] (0,1.5) to  [out=up , in=down ]  (-1 ,1); \end{knot} \end{tikzpicture} \end{document}

If you draw two circles that are exactly the same in all aspects (location, size, etc...) except they have different colors, then the "border" of the underlying circle is showing through.  \documentclass[10pt]{book} \usepackage{xcolor} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}     \fill (0,0) circle (0.1);     \fill[color=red] (0,0) circle (0.1);     \fill[color=red] (0.5,0) circle (0.1); \end{tikzpicture} \end{document}   Notice the first circle has a black "edge" around it that looks different than the 2nd circle which doesn't.   The problem is due to the fact that one is anti-aliasing both circles and the edge colors are being blended.   Is there a way to fix this but still have anti-aliasing? (basically render all the objects I need then anti-alias them properly afterwards?)  (I realize TikZ probably can't do anything about this but one doesn't know unless they ask)


Why are there negative values in the range of the plot?   How is the center of the plot (i.e., the $0.0$ point) found?   How did the black-brown points end up in the third quadrant of the plot?   Why are red, hazel, & brown positive on the y-axis and negative on the x-axis?   I just really need to learn how to interpret this kind of simple diagram before going further.  This picture was taken from another question on Cross Validated.

I've been searching the internet far and wide... I have yet to find a really good overview of how to interpret 2D correspondence analysis plots. Could someone offer some advice on interpreting the distances between points?   Perhaps an example would help, here is a plot that's found on many of the websites I've seen that discuss correspondence analysis. The red triangles represent eye colour and the black dots represent hair colour.    Looking at the graph above, could you make a few statements about what you see in these data. Points of interest about the different dimensions and relationships between triangles and dots?   An explanation of row-points verses column points, and the use of the word "profile" with particular focus on the example would be instrumental.


I was trying to install plank on Ubuntu 20.04 but then this message came up: $ sudo apt install plank [sudo] password for jatin:  Reading package lists... Done Building dependency tree        Reading state information... Done The following package was automatically installed and is no longer required:   libllvm10 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed:   bamfdaemon libbamf3-2 libplank-common libplank1 Suggested packages:   libplank-doc The following packages will be REMOVED:   linux-image-5.4.0-42-generic The following NEW packages will be installed:   bamfdaemon libbamf3-2 libplank-common libplank1 plank 0 upgraded, 5 newly installed, 1 to remove and 7 not upgraded. 3 not fully installed or removed. Need to get 0 B/543 kB of archives. After this operation, 9,328 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 290111 files and directories currently installed.) Removing linux-image-5.4.0-42-generic (5.4.0-42.46) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-5.4.0-42-generic /etc/kernel/postrm.d/zz-update-grub: Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 1: /etc/default/grub: e#: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-5.4.0-42-generic (--remove):  installed linux-image-5.4.0-42-generic package post-removal script subprocess r eturned error exit status 1 dpkg: too many errors, stopping Errors were encountered while processing:  linux-image-5.4.0-42-generic Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1)  Here is my grub file: e# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=2 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"  The same error occurred while I was trying to install software updates. I am also unable to update my GRUB file

I have Xubuntu 18.04.3, and whenever I try to install a package through apt-get I get the following message.    Removing linux-image-5.0.0-31-generic (5.0.0-31.33~18.04.1) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-5.0.0-31-generic /etc/kernel/postrm.d/zz-update-grub: Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 35: /etc/default/grub: FROM:: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-5.0.0-31-generic (--remove):  installed linux-image-5.0.0-31-generic package post-removal script subprocess returned error exit status 1 Errors were encountered while processing:  linux-image-5.0.0-31-generic libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing... E: Sub-process /usr/bin/dpkg returned an error code (1)   Contents of /etc/default/grub:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="persistent"  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"  FROM: GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="" TO: GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1" GRUB_CMDLINE_LINUX="ipv6.disable=1"


I'm using MapInfo Pro v16.0 and I'm trying to extract the raster data out for later use.  I've saved my final output already as PDF and JPEG but I'd like to know if there is a way in clipping out the area of interest (using Mapinfo v16) and saving it as a raster data for later use.

With MapInfo 12, i would like cut my raster layer .tab with one of my vector layer.   How to do this basic task with MapInfo?   Is it possible with mapinfo to convert .tab raster table toward any standard formats (ecw, tif, etc)?


I've encounterd a confusing matter written in one of my college books: It is stated there that "The heap is not static and can grow as needed by requesting more memory from the operating system".  So what I'm confused about is the following: Suppose I run my application, and objects are allocated on the heap. At some point, the application runs out of memory: what happens now?   From what I understand, Gc (Garbage collector) kicks in and begins it's mark and sweep operations. I wonder if somehow, instead of invoking the Gc by the CLR, is there any possibility for the heap to request more memory from the operating system?   I read that in C++ language, there is a way to achieve that, but is it possible in C# .Net Framework 4.5?

Coming from a java background, one of the things I am used to is telling the JVM what the maximum heap size should be.  If the running program tries to swallow more than is allowed, and the garbage collector cannot free any more resources, then OutOfMemoryError is thrown and it all goes bang.  So setting the maximum heap size is important in Java.  Does this apply in .net?  Can you set the heap size limits?  Does the CLR just keep growing its heap until it reaches the machine's physical limits?  Or is it not an issue in .net for some subtle reason that my Java blinkers stop me from seeing?


Just as in Newton's 2nd law the value of constant was completely arbitrary (as said in ncert textbook class 12 physics) and was chose to be 1. Why not Coulomb's constant is chosen as unity?

This was supposed to be a long question but something went wrong and everything I typed was lost. Here goes.   Why is  $k = \dfrac{1}{4\pi\epsilon_0}$ in ?  Is this an experimental fact?  If not, what is the significance of this definition?


If I am not wrong,  . I am not sure to understand how this is possible. The reason is that second order logic is supposedly more restrictive than first order logic, because it is categorical. Thus, any theory in first order logic should have more models (many of them unintended, or non-standard)  than the same theory in second order logic.  In first order logic, within ZF, the axiom of choice is equivalent to the well-ordering principle. I interpret this as meaning that there are no models in which the axiom of choice is true but the well-ordering principle is false. However it seems that in second order logic we can have models in which the axiom of choice is true but the well-ordering principle is false. Am I correct?  UPDATE: this is possibly a duplicate question, as mentioned by Andres. But just to be sure that I correctly understood the "duplicate answer": Would the conclusion be that the statement "there are second-order models in which the axiom of choice is true but the well-ordering principle is false but there are no first-order models in which the axiom of choice is true but the well-ordering principle is false" is false?

I am confused by this sentence in the Wikipedia article for "Well-ordering theorem":     ...the well-ordering theorem is equivalent to the axiom of choice, in the sense that either one together with the Zermelo–Fraenkel axioms is sufficient to prove the other, in first order logic (The same applies to Zorn's Lemma.) . In second order logic, however, the well-ordering theorem is strictly stronger than the axiom of choice: from the well-ordering theorem one may deduce the axiom of choice, but from the axiom of choice one cannot deduce the well-ordering theorem   Isn't second-order logic stronger than first-order logic? How is it that the equivalence proof in first-order logic is no longer valid in second-order logic?


I checked the grammar of my research article using a leading software. This is my sentence:   A total of 12.3 million sequences was used for the establishment of database.   The error is: 'Potential issues with passive voice usage'  Anything wrong here?  (NOTE: Er, the OP's question is about passive voice, but the "duplicate" linked thread is about subject-verb number agreement. Perhaps there's a related issue here, on subject-verb number agreement (which is debatable), but the OP's main question on passive voice ought to be addressed. Anyway, a short answer post here would probably be more appropriate than a related link. -- F.E.)

Which one is the correct one?        A total of 10 babies is sleeping. (A)   A total of 10 babies are sleeping. (B)   Ten babies in total are sleeping. (C)      For me, both (A) and (C) are correct. But (B) is also used in speech.


Let $X$ be a Banach space and $K$ a compact subset of $X$. If $(x_n)_n$ is a sequence such that $x_n\in K$ for all $n$  and $(x_n)_n$ converges weakly to some $x\in X$, i.e. $x^*(x_n)\to x^*(x)$ for all $x^*\in X^*$ the dual space of $X$.  I know that we have the strong convergence for some subsequence. But, do we have the strong convergence of the whole sequence?

Is the following true? Let $x_n$ be a sequence with the following property: Every subsequence of $x_n$ has a further subsequence which converges to $x$. Then the sequence $x_n$ converges to $x$.  I guess that it is true but I am not sure how to prove this.


The majority of my iCloud storage is in backups. 4.2GB in backups for my iPhone & iPad. Is this typical, 'cuz it seems like a lot to me?

I am clearly missing some with iCloud storage, every few weeks I get an email saying my storage is nearly full and I only have a couple of hundred MB left. So I am always deleting my back up and letting it back up overnight. When I back it up it's only about 3GB. Why is it consistently over the weeks always full? I have no apps being backed up to it either, they're all off. So how do I stop this and what is causing it?  Here is an example of what I mean. It backed up yesterday. I have all the apps off and it wants to back up another 192MB. I haven't sent s load of images in iMessage or anything like this in the last day so I don't know where the data is coming from. I don't take many photos anyway so it's not photos. Unless it has anything to do with Apple Watch? I can't see or find anything about activity app being backed up the cloud, but that's the only thing left I can think of


I'm trying to grasp the idea of co- and contra-variance. During my study I meet something like that: Let's say we have a vector $\vec{v}$ and want to calculate its coordinates in base $\hat{b}$. I've heard there are two ways of doing it: one where we try to find how much we must enlarge/shorten base vectors, so when then we add them the result is our original vector $\vec{v}$. The other one is where we project the original vector onto base vectors and note the length of such projections. One of those method is covariant and the other contravariant (I don't remember which one), and the explanation is they give not only different values of coordinates, but also these coordinates behave differently when our original vector changes. In my opinion both of those methods should give the same results: in both of them we are calculating elements of a sum which gives the original vector, so by simple thinking the length of them should be the same. Am I wrong?

After cruising through a lot of material online, and answers over here, my understanding of contravariant and covariant vectors are, in a finite-dimensional vector space, suppose we have a vector, which is contravariant to its basis. However, using the metric tensor, we can map this vector to a one form in the dual space, which acts as a vector space for this example. This one form, or covactor, varies similarly to the basis in our original vector space. However, the covectors have a different basis, which is the dual basis, and are expanded in terms of those. Here's where my confusion arises : Many diagrams over the internet give a geometric picture of the scenario, by claiming that contravariant components of an 'arrow' are found by drawing parallel lines along the axes, and checking where they intersect. Co-variant components could be found by sketching the perpendicular lines on these axes. So, these materials are treating covariant and contravariant as different representations of the same arrow, while I'm inclined to believe they are completely different. However, if we let go of rigour, in exchange for a 'more' geometric understanding, I think we are allowed to do this. The diagrams are usually of the form :  However, even if we assume that contravariant and covariant are different representations of the same object, this particular diagram still seems wrong to me. Particularly the locations of $x_1,x_2$. In this diagram, they are located on the span of the original basis. Shouldn't covector components be located on the span of the dual basis ? This diagram suggests to me, that co-variant components have the same basis, as the contravariant ones. Shouldn't the diagram look more like this ?  This second diagram seems to fit the concept better according to me. This is because the dual vector must be 'contravariant' with respect to the 'dual basis'. This means, their components must be found out by sketching parallel lines along the span of the dual basis. These lines intersect the original axis at a right angle, which is to be expected, as dual bases are orthogonal to the original bases. Moreover, this second picture can also show in a much better way, how scaling up of the original basis, scales down the 'contravariant components' and the 'dual basis', which in turn scales up the 'covariant' components.This shows that the components of the dual vector are covariant to the original basis. This is something that is not readily visible in the first diagram. So, am I correct in assuming this second 'geometrical' representation is correct ? I know this doesn't make much sense, because as the mathematicians said, that vectors are completely different from one forms, and one forms should be represented using the number of hyperplanes intercepted by our arrow. However, I've seen most course material refer to it in this way, and frankly it is easier to visualize. However, most of this material used the first picture. Can anyone point out my mistakes, if any, and tell me if the first picture is correct, or the second one ? Or in this case 'less-flawed'.


Suppose I have a Person class that looks like this: Person {     public string Name {get; set;}     public string Age {get; set;} }  And I have a method that takes a type T and a string as parameters someMethod<T>(Action<T> someAction, string propertyName)  Is there a way to do something like this for each of a Person instance's property Person p = new Person(){};  foreach(var propInfo in p.GetType().GetProperties()) {     someMethod<propInfo.PropertyType>(someAction, propInfo.Name) }

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


How to find the following intergal:  $$\mathcal{I}_\text{n}:=\int_0^\infty\frac{x^\text{n}}{1+x^2}\space\text{d}x\tag1$$  I've no idea where to start, I've tried integration by parts but it lead not to a closed form.

Good afternoon, I need to find:  $$\int_0^\infty\frac{x^n}{ax^2+bx+c}\space dx$$  I've no idea about any clue what so ever.


I've noticed today that some of our companies clients' DNS servers were changed to 203.115.81.38 and 203.115.71.66 even thought they were still using DHCP. I wonder if this is some sort of an attack/malware etc. I have not been able to trace it down to anything yet but I thought sharing the addresses would help if this is a part of a wider problem.  I'm virus/malware scans on some of the computers and will update if I find anything useful.   Note: The DNS changes back to normal after a "ipconfig /renew"   Note 2: "Rogue Killer" found the source as "PUM.DNS". Looking to see how to remove it in mass scale.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


Bike: Giant ATX 27.5 2 (2016) - Hardtail  My current strategy to going off curbs is nose diving... I know, the best.  My current strategy to going up curbs is barely lifting my front wheel onto the curb and than just letting the back wheel smash into the curb hoping it rolls onto it... once again, not the best.  I'm scared of seriously damaging the bike (specifically tires/rims) when I go off curbs.  Could anyone recommend be strategy's to going up and down curbs (and similar obstacles: fallen trees, rocks etc)?  And also, is there any way to find out how much PSI is currently in a tire, and what PSI should a mountain bike tire be at?

Putting aside the question should one ever ride on the sidewalk, I would like to jump curbs safely and seamlessly.  Assume a hardtail mountain bike with high saddle (we are in the city), at a speed of 30 km/h. I have heard of several techniques:    Move weight to the rear. Pull on the handlebars, the tire climbs the curb, without touching it. Move the weight to the front, in order to unload the rear tire. The rear tire impacts the curb, but is not carrying much weight.   Stand up. Push on the handlebar. The fork compresses, then jumps over the curb.  Let the rear roll over the curb, like in the previous case.   Stand up. Push on the handlebars, crouch as much as possible. As the fork begins to decompress, jump up. Push with feet against pedals (pedals vertical) in order to pull the bike up. Pull up on the handlebar. After the front tire has passed the curb, push down on it, to gain height in the rear.    Which one is best, or is there a better way?


This code doesn't behave how I expect it to.  #include<iostream> using namespace std;  class Class {     Class()     {         cout<<"default constructor called";     }      ~Class()     {         cout<<"destrutor called";     } };  int main() {         Class object(); }   I expected the output 'default constructor called', but I did not see anything as the output. What is the problem?

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I have a set up to kill all hostile mobs the minute they spawn on my server, should I just always have a /clear kind of command running? Or is there an alternative way to make it so people can get stuff from mining and such?

I have a spawn area I am hoping to make a safe haven, so I have a command block on a clock that kills each hostile mob type. This works to keep the place free of any hostile mobs, however every night I see rotten flesh, bones, arrows, and string everywhere.  I would like to add something to my command blocks so that they are killed without dropping loot. How can I accomplish this?  Note that I want mobs to drop loot generally elsewhere in the world, so /gamerule doMobLoot false will not do the trick for me. I'm hoping for a command that only applies to the mobs killed by the command block, and not anything else.


I really confuse about hazard function. Initially, I was thinking hazard function should be a proportion, which indicate if we know some one still alive at time t, so he/she got h(t) (eg. h(t)=20%) chance to die at time t. But through reading, I've been told hazard function is not a proportion, it is a hazard indicator which could >1. If so, the only contribution of hazard model is still to compare individual in different group about the risk at time t. It is seems useless for prediction.   So if I want to predict the chance of die for an individual at a time spot, how can I do it? I'm not interested in which predictor impact the risk either positive/negative or significant/insignificant. I just need to know, with a certain input individual, what is the chance of dying at time t.

I keep running into problems in understanding hazard rates. I know, for example, that in a strict sense a hazard rate is not a probability and it is continually mentioned that because of this the hazard rate has no upper bound.   Am I right in understanding that hazard function values can be interpreted as instantaneous failure rates? Given this interpretation, I still have trouble seeing how this could exceed 1.  I've seen derivations of the constant hazard rate $\lambda$ for the exponential distribution, so I see that for $\lambda \geq 1$ my question seems to have an obvious answer. But even then, is $\lambda$ not techincally a rate? I know we often just simplify and say, for instance, $\lambda = 3$. But don't we really mean $\lambda = 3$ per 1000 or 3 per 100? And if that is the case, can we really say the hazard rate is exceeding 1 in this case?  If someone could provide alternative examples where $h(t)\geq 1$ or help me understand my misconception it would be much appreciated.


I'm curious if it's safe to use sha1 for an HMAC in 2018 in a platform product.  A popular vendor (Twilio) uses an HMAC with sha1 with a shared secret to validate that messages they send are indeed sent by them (see the )..  In a recent audit, the use of sha1 was flagged as a potential problem.  As part of the explanation and justification for why it is OK to use hmac-with-sha1, Twilio pointed to  about hmac with sha1, though I note that article is from 2009.  So, what say you crypto.stackexchange? Is it still safe in 2018 for an organization like Twilio to use sha1 in an HMAC?

This Q & A   says that the security of HMAC-SHA1 does not depend on resistance to collisions? Are they are saying specifically with respect to HOTP or for HMAC-SHA1 for any use?     If HMAC-SHA1 is used for verifying the integrity of a document and you can find a collision, you can make changes in the document, right?      Even the RFC says that resistance to collisions is relevant       The security of the message authentication mechanism presented here depends on cryptographic properties of the hash function H: the resistance to collision finding (limited to the case where the initial value is secret and random, and where the output of the function is not explicitly available to the attacker), and the message authentication property of the compression function of H when applied to single blocks    What am I missing here?


Suppose we have set $S=\{x_1,x_2,....,x_{2n-1},x_{2n}\}$ , where $x_1 < x_2 ..... <x_{2n-1}< x_{2n}$ We have non-empty disjoint subsets $A$ and $B$ both having size $n$. Question is, how many pairs of such subsets will be trivially unequal? (By "unequal" we mean that sum of elements in subset $A$ doesn't equal to the sum of elements in subset $B$) e.g. consider $S = \{x_1,x_2,x_3,x_4\}$ For $S$ with size $4$, three pairs are possible (ignoring duplicates), i.e: $$1.\{x_1,x_2\}, \{x_3,x_4\}$$ $$2.\{x_1,x_3\}, \{x_2,x_4\}$$ $$3.\{x_1,x_4\}, \{x_2,x_3\}$$ As we can see, two pairs above will be trivially unequal: $\{x_1,x_2\}, \{x_3,x_4\}$ (because $x_1 < x_3$ and $x_2 < x_4$ so $x_1 + x_2 < x_3 + x_4$) $\{x_1,x_3\}, \{x_2,x_4\}$ (because $x_1 < x_2$ and $x_3 < x_4$ so $x_1 + x_3 < x_2 + x_4$) To solve that using code is pretty straightforward, but I'm interested in purely mathematical solution. Being unable to come up with the anything myself, I looked up the answers provided by the other users. A lot of them came up with the solution which uses "grid" method, for example one of the answers provided by the user:  First, some observations.  If elements of the set are assigned in ascending order to subset A, subset B, or discarded, and every element of A can be paired with an element of B that was selected later, then A's sum will be smaller than B's, and the comparison will not be necessary. If you imagine a walk on a grid from upper left to lower right, where selecting an element for subset A is like walking East, and selecting an element for subset B is like walking South, and selecting an element for neither subset is effectively the same as selecting it for both (East, then South), then a walk that crosses the diagonal from north to south (with this direction being the first diagonal crossing) corresponds exactly to a subset pair that must be compared.  Can someone explain what this "grid" logic is?

I've already asked this  before, but then I realized that wording was, unfortunately, quite confusing. The statement of the problem is following:  Let $S(A)$ represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, $B$ and $C$, the following properties are true: $1.$ $S(B) ≠ S(C$); that is, sums of subsets cannot be equal. $2.$ If B contains more elements than $C$ then $S(B) > S(C)$. For this problem we shall assume that a given set contains n strictly increasing elements and it already satisfies the second rule. Surprisingly, out of the 25 possible subset pairs that can be obtained from a set for which $n = 4$, only 1 of these pairs need to be tested for equality (first rule). Similarly, when $n = 7$, only 70 out of the $966$ subset pairs need to be tested. For $n = 12$, how many of the $261625$ subset pairs that can be obtained need to be tested for equality?  Problem statement specifies that, if size of subset $B$ doesn't equal to the size of the subset $C$, then theirs sums will not be equal by default. So when testing set $A$ for the equality, we only consider subsets with the same size. The main question is, for arbitrary set $A$ with size $n$ which satisfies conditions specified in the problem, how many pairs of subsets with the same size are needed to be tested? I couldn't have come up with purely mathematical solution myself, so I checked answers provided by the users in the discussion thread. A lot of them mentioned so called "grid method", for example, one of the posts:  First, some observations. If elements of the set are assigned in ascending order to subset $B$, subset $C$, or discarded, and every element of $B$ can be paired with an element of $C$ that was selected later, then B's sum will be smaller than $C$'s, and the comparison will not be necessary. If you imagine a walk on a grid from upper left to lower right, where selecting an element for subset $B$ is like walking East, and selecting an element for subset $C$ is like walking South, and selecting an element for neither subset is effectively the same as selecting it for both (East, then South), then a walk that crosses the diagonal from north to south (with this direction being the first diagonal crossing) corresponds exactly to a subset pair that must be compared.  And one more  Clearly we only need to test equal size groups $(k)$. If we select $2k$ elements, we only need to test some partition of that into $2k$-size groups if there is an $m$-smallest number in the group with the smallest element that is bigger than the $m$-smallest number in the other group. This can be modeled as a path across a $k×k$ grid that crosses the diagonal, so we can use Catalan numbers $C_k$ (which count paths that don't cross the diagonal) and half the total number of paths across the grid to get the number of diagonal-crossing paths (half = given start direction).Then the selection of the initial $2k$ set is a binomial coefficient, and sum across values of $k$.  Can some explain what is this "grid" they are referring to? And how do you solve the problem using this method?


As part of a custom OAuth2 flow, the user is being redirected back to a Lightning App Page with URL: https://x-dev-ed.lightning.force.com/lightning/n/namespace__Page_Name?state=q765wYYgnvzVAsod&code=c1BF-iddZNkD1aMxVYp8p5smeAQUxITQUesC3Q_ggYHyNJzm With a few query string params state and code. But the page does a refresh before it loads, and the query string params are removed. I want to access the values in state and code from the custom LWC component on the page? I have tried looking in CurrentPageReference: import { CurrentPageReference } from "lightning/navigation";  Using: @wire(CurrentPageReference) currentPageReference;  connectedCallback() {     console.log("state is: " + JSON.stringify(this.currentPageReference.state)); }  But the state object is empty {} And, I've tried getting the value from the URL: connectedCallback() {     const param = "code";     const paramValue = this.getUrlParamValue(window.location.href, param);     console.log(param + ": " + paramValue); }  getUrlParamValue(url, key) {     return new URL(url).searchParams.get(key); }  But nothing. How can I access the values in state and code from the custom LWC component on the page?

I am trying to authorize another sandbox/production to create connection. When I first time authorize the connected app, it is returning the Auhorization Code in the URL, however when it gets redirected to LWC app, code is disappeared because the parameter is 'code' not like 'c__code'. So, pagereference state is unable to read the param value. It was working till the previous release, with Spring release it started behaving differently.  Original URL: not working    I tested with adding 'c__' to the param manually and it worked fine.  Modified URL: Working    is there a way we can rename the redirected URL params dynamically?  'code' to 'c__code'


What preposition should I use here?  Your initial place of posting shall be in the office located ____ A. Bonifacio St. Brgy. Canlalay Biñan City.

Is the preposition in universal in conjunction with the verb ‘to work’ and can it be used with any organizations and businesses?  For example:        He works as a cook in a local hotel near here.   He works in an office in Chicago.   She works in a big company.   She works in the emergency unit at the hospital.   She works in a shoe repair shop.   After leaving school, he worked in a restaurant for a year. military hospital.   His sister works in a bank.   She works in a shoe factory.   He works in a steel plant.   She works in a gift store on weekends.   Ann works in a research institute.      When should the prepositions at and for be used? For example:        Barbara works at a travel agency.   She works at the local supermarket.   Now he works for a bank.   I work for a small non-profit organization.      I’ve never heard:     She works for a shoe factory.   But with a law firm it’s OK:     She works for a law firm.   Why?


I'm trying to vertically and horizontally align a login div for my Web App, but am having some trouble as I'm rather inexperienced using CSS. I've attached an image of what it looks like on the page, as well as my HTML and styles of the div taken from the Web Dev Tools to see if anyone can help out. For some reason the login div is not being centered horizontally although it appears to be close, and I've tried a few things with the vertical alignment but they haven't worked either. Thank you in advance for any suggestions. <c:url var="loginUrl" value="/login" />

                      <c:if test="${param.error != null}">
Incorrect username or password
             </c:if>

User Login

                          <form method="post" action="${loginUrl}" class="login-form">                                              <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
                             <input type="text" name="username" placeholder="Username"                                 class="form-control" />

                             <input type="password" name="password" placeholder="Password"                                 class="form-control" />

                             <button type="submit" class="btn-primary float-right">Sign In</button>
                     </form>

       text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; --blue: #007bff; --indigo: #6610f2; --purple: #6f42c1; --pink: #e83e8c; --red: #dc3545; --orange: #fd7e14; --yellow: #ffc107; --green: #28a745; --teal: #20c997; --cyan: #17a2b8; --white: #fff; --gray: #6c757d; --gray-dark: #343a40; --primary: #007bff; --secondary: #6c757d; --success: #28a745; --info: #17a2b8; --warning: #ffc107; --danger: #dc3545; --light: #f8f9fa; --dark: #343a40; --breakpoint-xs: 0; --breakpoint-sm: 576px; --breakpoint-md: 768px; --breakpoint-lg: 992px; --breakpoint-xl: 1200px; --font-family-sans-serif: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; --font-family-monospace: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 1rem; font-weight: 400; line-height: 1.5; color: rgb(33, 37, 41); text-align: center; box-sizing: border-box; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; vertical-align: middle; display: inline-block; width: 35%;

How can I horizontally center a
 within another
 using CSS?

Foo foo


Given the following example, why do I have to explicitly use the statement b->A::DoSomething() rather than just b->DoSomething()?  Shouldn't the compiler's overload resolution figure out which method I'm talking about?  I'm using Microsoft VS 2005. (Note: using virtual doesn't help in this case.)  class A {   public:     int DoSomething() {return 0;}; };  class B : public A {   public:     int DoSomething(int x) {return 1;}; };  int main() {   B* b = new B();   b->A::DoSomething();    //Why this?   //b->DoSomething();    //Why not this? (Gives compiler error.)   delete b;   return 0; }

I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code:  class A {     public:     void foo(string s){}; };  class B : public A {     public:     int foo(int i){}; };  class C : public B {     public:     void bar()     {         string s;         foo(s);     } };   I receive the following error from the gcc compiler:  In member function `void C::bar()': no matching function for call to `C::foo(std::string&)' candidates are: int B::foo(int)   If I remove int foo(int i){}; from class B, or if I rename it from foo1, everything works fine.   What's the problem with this?


Can a $\sigma$-algebra in a set $X$ have cardinality $\aleph_0$, the cardinality of the naturals?  I do not have a clue on how to start with this? Can someone please give me a hint?

Let $\Omega$ be a set.  If $\Omega$ is finite, then any $\sigma$-algebra on $\Omega$ is finite.  If $\Omega$ is infinite and countable, a $\sigma$-algebra on $\Omega$  cannot be infinite and countable.     What about if $\Omega$ is not countable ? Is it possible to find an uncountable $\Omega$ with a $\sigma$-algebra that is infinite and countable ?


Yester I asked  question, and tried to follow cl-netbox's advice:     Highlight the Ubuntu entry in the GRUB boot menu and press the E key.   Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.   On login screen press Ctrl+Alt+F1 ... enter user name and password ...   Now execute the commands ...   After pressing Ctrl+Alt+F1 at the login screen and writing sudo apt-get update, the laptop asks me for my password (as per usual). However, the password that I normally always use does not work. I've no idea what password I should use. Anybody can help me?

What is the default password of the sudo? I visit some forums, it tells that the default password is password, but it doesn't work, how can I determine the password?


I have some custom settings to send custom message in chat after few seconds. Because, the system is multilanguage and multicountry, I need to send messages in the customer's language. Is it possible to put a custom label in a field of a custom settings? I don't need any code, it's all done in standard pages.

Is there a way to combine custom settings with custom labels ? So that the output from a setting value would be a custom label ?   To explain:  In example, we have an international organisation, and say countries are stored as an ISO code. As this is a limited and stable set of data, using custom settings would be the appropriate way to deal with say the full country name.   The issue arises when I do not just want to store the English country name, but want to have it translatable, presenting the right translation depending on the user's locale. Now, this is the point where I'd like to integrate custom settings with custom labels.  So that say the custom setting with name 'some iso code' doesn't return the full country name, but Label.Country'some iso code', which is than automatically translated in the right version.   Sounds good right. But as custom settings are fixed to certain types, as far as I've gotten is put the label name in the settings as a string value. And then .. i'm stuck :).  No way to cast a string to a Custom label, or have it be interpreted (and translated) as such, or is there ?   I'm aware this can be done in a custom object & apex, I was hoping for a more automated, "cleaner", less resource consuming way, better integrated, configurable way.  Additional clarrification: *The goal is to extend the use of custom labels (translation workbench), by adding a mapping from any data-based value to a custom label.*   While we could do a long matching process in apex, it would be faster & neater if the custom settings mechanism could be used. There are disadvantaged to custom objects, they require soql & apex, while custom settings & custom labels are cached. They too can be used in many other places. Countries were an example, I'd use this mechanism for every variable value that needs to be translatable.


I have two datasets from similar psycholinguistic experiments. In both of them, information about the participant's reading and spelling ability was collected, then converted into standardized scores zRead and zSpell. The aim is to use these as covariates when examining the priming effects from the experiments. Because these predictors are correlated, and because theoretically it's useful to differentiate their shared variance from their unique effects, I'm looking into using principal components instead, i.e. generate two principal components from the zRead and zSpell scores and use these as the covariates in a linear mixed model.   The problem is that although the principal components come out similarly in each experiment, with PC1 indexing the shared variance and PC2 differentiating reading and spelling ability, the sign of PC2 is different in each dataset, i.e.:  Experiment 1 correlation table:         zSpell zRead  PC1a   PC2a zSpell  1.000 0.504 0.867 -0.498 zRead   0.504 1.000 0.867  0.498 PC1a    0.867 0.867 1.000  0.000 PC2a   -0.498 0.498 0.000  1.000   Experiment 2:         zSpell  zRead  PC1a   PC2a zSpell  1.000  0.485 0.862  0.508 zRead   0.485  1.000 0.862 -0.508 PC1a    0.862  0.862 1.000  0.000 PC2a    0.508 -0.508 0.000  1.000   The aim is to present both of the related datasets together, so explaining how PC2 represents a (slightly) different thing in each dataset might be confusing. Is it acceptable to reverse score individual components by multiplying by -1? If not, is it okay to reverse all the components at once if the interpretation would make more sense?  I can't see this changing the correlational structure of the variables, but I'm not sure if there other reasons to avoid it.

I performed principal component analysis (PCA) with R using two different functions (prcomp and princomp) and observed that the PCA scores differed in sign. How can it be?  Consider this:  set.seed(999) prcomp(data.frame(1:10,rnorm(10)))$x              PC1        PC2  [1,] -4.508620 -0.2567655  [2,] -3.373772 -1.1369417  [3,] -2.679669  1.0903445  [4,] -1.615837  0.7108631  [5,] -0.548879  0.3093389  [6,]  0.481756  0.1639112  [7,]  1.656178 -0.9952875  [8,]  2.560345 -0.2490548  [9,]  3.508442  0.1874520 [10,]  4.520055  0.1761397  set.seed(999) princomp(data.frame(1:10,rnorm(10)))$scores          Comp.1     Comp.2  [1,]  4.508620  0.2567655  [2,]  3.373772  1.1369417  [3,]  2.679669 -1.0903445  [4,]  1.615837 -0.7108631  [5,]  0.548879 -0.3093389  [6,] -0.481756 -0.1639112  [7,] -1.656178  0.9952875  [8,] -2.560345  0.2490548  [9,] -3.508442 -0.1874520 [10,] -4.520055 -0.1761397   Why do the signs (+/-) differ for the two analyses? If I was then using principal components PC1 and PC2 as predictors in a regression, i.e. lm(y ~ PC1 + PC2), this would completely change my understanding of the effect of the two variables on y depending on which method I used! How could I then say that PC1 has e.g. a positive effect on y and PC2 has e.g. a negative effect on y?    In addition: If the sign of PCA components is meaningless, is this true for factor analysis (FA) as well? Is it acceptable to flip (reverse) the sign of individual PCA/FA component scores (or of loadings, as a column of loading matrix)?


My ex-wife managed to get on to my Mac (OS X 10.9.4) and change my password for log on.  Luckily, I am still able to access my Mac as she didn't set it to screen lock.  What do I need to do in order to get back to my old password so that I can set a new one. Can I simply restore from my Time Machine to get it back to my old password?  Or do I need more advanced help?

My Father died last year and I inherited his Mac Mini. My wife has retired and we are trying to set up the mini for her use but the changes we want to make require admin access and we do not have the information my father used to set up the machine.  Is it possible to reset the admin information without having the old information? If so, how would I go about it?   I am not a Mac user usually so any guidance will have to be pretty simple!


I know this is simple but need some help in formatting a number in a textbox on Leave event. I am trying the below but I am getting incorrect results.   This is what Im expecting:  100 = 100  1000 = 1,000  10000 = 10,000  10000.25 = 10,000.25  2500000.432 = 2,500,000.432  txtAmount.Text = string.Format(System.Globalization.CultureInfo.GetCultureInfo("id-ID"), "{0:#,##0.##}", double.Parse(txtAmount.Text));

I want to add a comma in the thousands place for a number.     String.Format()?


Let $a,b,c \in \mathbb{Z}$.  Proove that if $a^2 - b^2 = c$ then exists $m,n \in \mathbb{Z}$ which are both even/odd such that  $a = \frac{m+n}{2}, b = \frac{m-n}{2}, c = mn$  I think I should use Fermat's theorem, but I'm not sure how to do it

I have been working on the following problem:     For a given $c\in \Bbb Z^+$, find $a,b \in \Bbb Z^+: c=a^2-b^2$.   I have already figured out and proved a number of things:   A way to directly determine if a particular instance is solvable:  $\exists a,b \in \Bbb Z^+: c=a^2-b^2 \iff c \not\equiv 2 \mod 4$ An upper bound on the values for a (and b): $b \lt a\le\lfloor\frac{c-1}{2}\rfloor$ And a simple algorithm to find a solution:     $$ \begin{align*}  (a_0, b_0) &= (0, 0) \\  (a_{n+1}, b_{n+1}) &= \begin{cases}   (a_n+1, &b_n&)&\text{if } a_n^2-b_n^2 < c\\   (a_n, &b_n+1&)&\text{if } a_n^2-b_n^2 > c\\  \end{cases} \end{align*} $$   This can be iterated until a solution is found or the upper bound is reached.   I am currently trying to work out a more direct way to find an answer, but I have been unable to figure out any other ways to approach the problem.  How can I more directly find values for $a$ and $b$ for a given value of $c$?


When I run base64 filename >> encodedfile the new content is appended to existing content. Is there any way I can replace entire old content with new content. Using any similar one line technique? I'd like to learn more such techniques, but I don't know what to search for?  EDIT: What if the new file is same file. Ex: base64 filename > filename. I tried this, the instead of the new content, I see the file gets blank...

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


I have a very old hard drive, a 320 GB Seagate Barracuda 7200.12 , with some important office files on it which I need to recover. However, when I try to connect the hard drive as a second hard drive in a desktop, it does not work. Disk Management prompts to select a partition style, but I when I try to read what partition style the hard drive is using it does not give any information about the hard drive. When I choose either, I get the following error:     The request could not be performed because of an I/O device error.   The computer does detect the hard drive, though, which gives me hope there still is a way to get my files back. How do I recover data from the drive?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I used to have this problem sometimes in Vista, but now I'm using Windows 7 (it was a clean install, reformatted hard drive) I'm disappointed that it's happening again.  Basically what happens is sometimes when I right click on something and click an entry in the context menu, the highlight from entry remains on the screen, in front of everything else.  I can get rid of it by changing my theme to Aero Basic and back again, but it's not a nice solution as it takes too long and often once I get rid of it, it comes back.    Here you can see an example of what's happening - the highlight is there from Chrome's context menu.  Does anyone know how to fix this?

Periodically when I select a menu command, the label or selected option gets "stuck" on screen and won't go away. I can close all open applications, including whichever one I was using when it got stuck, but it still won't go away.   In the screenshot below, I opened an new instance of IE just to show how the label stays on top. The label was not created by this instance of IE.    (I added the circle in MS Paint. That part isn't stuck.)  The label that gets stuck is the first menu command I select in IE. If a label is already stuck, a new one does not get stuck (regardless of which instance(s) of IE are involved). Based on this knowledge, I now just open IE on my secondary monitor, carefully open the context menu so the Properties command is in the bottom corner, and click it. This is not a solution.  The floating label never moves and is transparent to mouse input (if I click it, it's as if I clicked the item behind it).  The label does not go away if I close all running applications. I haven't tried stopping services or closing system tray items like Live Mesh.  The label does go away if I change the screen resolution and then change it back.  Any ideas how I can stop this from happening? It's happened a half dozen times and it's becoming quite disrupting to my work.