Is anybody able to shed some light onto why youngs modulus of metallic materials has little dependance on alloy composition and processing whilst the yield strength can vary greatly?

There is one thing about Young's modulus that I find unexpected and confusing.  When certain solid materials, pure metal, steel or an alloy of a certain composition, gets strengthened by cold working or by heat treating, the Young's modulus stays exactly the same as before even though the yield strength of that material gets doubled, and the elongation gets reduced by an order of magnitude.  Take maraging steel 350 for example. Annealed yield strength = 830 MPa ... Annealed elongation = 18% ... Annealed Young's modulus = 190 GPa  Aged yield strength = 2300 MPa ... Aged elongation = 4% ... Aged Young modulus = 190 GPa  This seems crazy to me. Strength triples and elongation is reduced to less than a quarter, yet the Young's modulus doesn't change one bit? I don't understand.  If the definition of Young's modulus is the ratio between stress and strain, when steel after aging gets 300% stronger, and that strength is achieved at 20% elongation, how could the Young's modulus possibly not get massively changed too?


How do we evaluate the sum:   \begin{equation*} 1+2+...+n \end{equation*}  I don't need the proof with the mathematical induction, but the technique to evaluate this series.

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


I had installed windows 8 and ubuntu in my laptop. but after that by mistake i formatted the drive in which ubuntu was installed so now when ever i reboot my machine i get the error: unknown filesystem and grub rescue. I want to reinstall ubuntu again in the same drive but i am unable to install because of grub rescue. please suggest me solution to install ubuntu from grub rescue or to delete grub so that i can reinstall ubuntu in normal way. I am able to boot to windows if i keep the boot mode to UEFI.

How do I set the bootloader so that in my dualboot with Windows 7/Ubuntu 11.04, Windows start up as standard instead of Ubuntu?


Now a days many images display using css like below :
&nbsp;
   Above div will show logo image, But as using CSS for logo instead of  tag. So not take the benefits of alt tag by SEO point of view.  My question is :  Which technique or method I use for image SEO in this type of image?  I mean, Which technique is useful for image SEO, when images is coming from CSS?

I have a number of DIV's that break up a page into logical elements for styles and positioning, etc.  As part of optimizing my site for search engine spiders, should I include a title attribute within these DIV's?  (Yes I have a title as part of the whole page, I'm curious on individual structual elements)  Ex  ... <div id="SearchOptions" title="Search filters and options - Type in a name or pick a business and Click 'Search' to get started" >   .... </div> ...


I'm struggling a fair amount with this exercise:     Find a subring of $M(2,\mathbb{Q})$ which is isomorphic to a) $\mathbb{Q}$ x $ \mathbb{Q}$ b) $\mathbb{Q}$ c) $\mathbb{Q}[x]$/$x^2$   Now I know a subring must be a subgroup, must contain the elements $0,1$ and must be closed under multiplication. As we are looking for isomorphisms then they must also be ring homomorphisms and must be bijective.  I tried to come up with a random subring and attempt to prove it is an isomorphism. E.g $\left\{\left.\begin{matrix}  a & b \\ c & 0  \end{matrix}\right|a,b,c \in \mathbb{Q}\right\}$ is a subgroup of $M(2,\mathbb{Q})$ and then try and show it's an isomorphism. However I'm stuck here as I don't actually know how to go about finding these specific isomorphisms and I completely lose what I'm doing. Any help would be great.

I believe that for a subring to be isomorphic it needs to be a ring homomorphism but i'm not sure how to go about finding isomorphic rings, I'm not looking for a straight up answer I'm trying to understand how to go about the question.


Whenever I try to connect to a certain server, an error message came saying "Connection refused" and "no further information". This situation does not appear in other servers.  This situation also does not appear when I connect through another WiFi. It also doesn't appear when I use another address to connect to the server.  The version of Minecraft doesn't matter as this appears in every version. I tried relogging and redownloading Minecraft, but it does not solve the problem.  Is it because of my Firewall settings? Is it because of the WiFi settings? Is it because of the server? Which has nothing to do with me?

I am getting the following error when I try to connect to a Minecraft server:  This is all servers, not just one. The error says:  io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: Version 1.12  I've tried:  Restarting Minecraft Restarting Computer Uninstalling and Reinstalling Mincraft Uninstalling and Reinstalling Java Altering Firewall Restarting Internet I've messed with my port, made a second windows account, reset netsh winsock Checked hosts Made a new WINDOWS account  The overlay in the bottom right is Geforce's Overlay for game capturing. I don't have any mods installed. A Mojang support ticket wouldn't help. Im desperate.


I want to know which structure is right when forming past perfect tense?     "She was very sad because she hadn't got the package."   or     "She was very sad because she hadn't gotten the package."   As far as I know, including Had + past participle is a must when forming past perfect tense. So basically the "She had gotten" must be the right choice but my English guide book suggests the "She had got" is right and I asked from a few of friends and they said that the "She had got" is ok and normal in British English. I don't which one should I go with and it is so important for me to know the difference since I deal with academic lessons and writings.

When in a sentence I want to use the present perfect of get, I say have/has gotten. A friend of mine (who is American) corrects me, saying I should use have/has got. From my English classes, I remember that the past participle of get is gotten.  Why does my friend tell me that it is not correct to use have gotten?  If that makes any difference, my friend lives on the east coast, closer to the New England zone.


In IEEE transaction journals, there is a requirement that there should be a line break between the table ID and the table title. It works properly in the normal case as shown in the following. However, when I use the sub-caption package, it seems that it will overwrite the default style of the IEEE template, which makes the table look different. Thus, is there any possible way to solve this problem? IEEE style:  Sub-caption style:  Source code: \documentclass[journal]{IEEEtran} \usepackage{subcaption}  \begin{document}  \begin{table}     \centering     \footnotesize     \caption{Title}     \begin{tabular}{c|ccccc}     \hline     \hline     X & Y & M & $\overline{x^m}$ & CF \\     \hline     $F_1$ & 20(1) & 50(1) & Weak(1) & Yes(1) \\     \hline     $F_2$ & 20(1) & 100(2) & Strong(2) & No(2) \\     \hline     $F_3$ & 40(2) & 50(1) & Weak(1) & No(2) \\     \end{tabular}     \end{table} \end{document}

I have the following code which produces the first attached Table. But as you can see in the table, both the table label and the caption all fall on the same line: \documentclass[10pt,journal,compsoc]{IEEEtran}  % *** CITATION PACKAGES *** % \ifCLASSOPTIONcompsoc   % IEEE Computer Society needs nocompress option   % requires cite.sty v4.0 or later (November 2003)   \usepackage[nocompress]{cite} \else   % normal IEEE   \usepackage{cite} \fi  \usepackage{subcaption} %\usepackage{subfig} %\usepackage{subcaption} \usepackage[draft]{graphicx} \usepackage{algorithm,algpseudocode} \usepackage{mathtools} \usepackage{filecontents} \usepackage{lipsum} \usepackage[flushleft]{threeparttable} \usepackage{cite} \usepackage{amssymb} \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx \usepackage{mathtools, cases} \usepackage{amsmath,empheq} \usepackage{eqparbox} % for the second example \usepackage{verbatim} \usepackage{varwidth}% http://ctan.org/pkg/varwidth \usepackage{color} \usepackage{xcolor} \usepackage[export]{adjustbox} \usepackage{multirow}  \newcommand{\meq}[2]{%   \eqmakebox[#1][s]{$\displaystyle#2$}% }   % correct bad hyphenation here \hyphenation{op-tical net-works semi-conduc-tor}  %\let\emptyset\varnothing \begin{document}  \begin{table}[!bp] \centering \caption{Evaluation of overall performances on both datasets} \label{tab:default} \resizebox{0.5\textwidth}{!}{% \begin{tabular}{|l|l|l|l|l|l|l|} \hline \multicolumn{7}{|c|}{Datasets}                                                                                \\ \hline \multicolumn{3}{|c|}{In-House}                                                & \multicolumn{4}{c|}{NSL-KDD}    \\ \hline DR                       & ACC                      & FPR                     & K  & DR      & ACC     & FPR    \\ \hline \multirow{8}{*}{99.75\%} & \multirow{8}{*}{99.72\%} & \multirow{8}{*}{0.06\%} & 1  & 90.53\% & 96.14\% & 0.00\% \\ \cline{4-7}                           &                          &                         & 2  & 94.22\% & 97.65\% & 0.00\% \\ \cline{4-7}                           &                          &                         & 3  & 95.47\% & 98.16\% & 0.00\% \\ \cline{4-7}                           &                          &                         & 4  & 96.10\% & 98.41\% & 0.00\% \\ \cline{4-7}                           &                          &                         & 5  & 96.48\% & 98.57\% & 0.00\% \\ \cline{4-7}                           &                          &                         & 10 & 97.25\% & 98.87\% & 0.02\% \\ \cline{4-7}                           &                          &                         & 20 & 97.57\% & 98.88\% & 0.22\% \\ \cline{4-7}                           &                          &                         & 30 & 97.68\% & 98.40\% & 1.11\% \\ \hline \end{tabular}% } \end{table}  \end{document}   But what I want is a table with the caption format below:  How do I achieve this? Any help will be appreciated.


I was using Right Alt for special characters to my great satisfaction. Now after upgrading to 14.04 not only it doesn't work but the key is stubbornly launching the HUD.  Worse: The keyboard settings now are changed and less user friendly and i can't change the function for Right Alt. Furthermore, I find:  Shortcuts → Typing → Special characters key: disabled  And that refuses to change whatever I do. The previous version was so easy to use....  To cut a long story short: How to attribute to Right Alt the function special characters again?

I frequently use the compose key to type special characters. I now have a fresh install of Ubuntu 14.04, and in the keyboard settings it says "compose key: disabled". I can't find how to set the compose key.


I'm looking for an idiom for when someone will do small, irrelevant tasks during a crisis instead of working to solve the crisis.  The focus of the phrase wouldn't be on procrastinating, it would be about ignoring the crisis entirely.  Some examples:   Choosing to organize the supply cupboard when a short deadline suddenly appears A stock trader doing low priority market research during a market crash Sweeping up the ashes while your house is still on fire Changing the oil of your car when you have 4 flat tires   Is there an idiom for this?  I feel like it has been on the tip of my tongue for days now.

Imagine a situation in which the whole place is on fire, a bomb is about to explode, everyone is running for their lives and someone is checking his looks on the mirror... pretty inappropriate for the situation, don't you think? I'm looking for an idiom or colloquial/slang/informal expression to describe such an indifferent stance.


With regard to the below commands:  $ unset a $ echo 12 | read a $ echo $a  $   I was expecting that a would be set the value of 12 in the second statement. But it turns out that a is still unset.

With ksh I'm using read as a convenient way to separate values: $ echo 1 2 3 4 5 | read a b dump $ echo $b $a  2 1 $  But it fails in Bash: $ echo 1 2 3 4 5 | read a b dump $ echo $b $a     $  I didn't find a reason in the man page why it fails, any idea?


We are in the process of creating landing pages whose contents will be living in the server whose directory houses mylove.example.com.  The URL will be mylove.example.com but for marketing purposes, we want to point to a friendly marketing URL.  Would the solution be to point the URL to the root domain www.example.com/mylove which is a live site whose directory lives on a different server? This also means the contents for the marketing-friendly URL would live on mylove.mylive.example.   The thought behind this would help these pages rank better since there is domain authority with www.example.com.   Will, there be SEO repercussions for forcing URLs with the mylove.example.com to be pointed to www.mylove.example even though the contents do not live on the same server as www.mylove.example?   Will Google be able to crawl contents for mylove.example.com and example.com? The pages are not permanently moving. We are wanting to leverage domain authority without having to create a whole new domain name.

example.com is hosted on IP address c.c.c.c at host1, no access any windows server admin at all blog.example.com is  on IP a.a.a.a at host2, full access to Linux server admin, using WordPress   So basically, I can fiddle with subdomain all I want.  I can't 301 redirect because the content on host 1 is an eCommerce site that I have no server control over. Can't put WordPress on it, can't run scripts, can't do anything on the server period.  Is there a method to "mask" all the URLs on root blog.example.com so they appear as example.com/blog/ folder?  They can't actually be sent to example.com/blog/ as that doesn't exist. It just needs to look to the surfer as if they are there.  Can this be done with some kind of masking or something?  Will this be better for SEO as hopefully search engines will see the blog in a directory on the main domain?


Let $(e_1, ..., e_n)$ be the standard $\Bbb Z$-basis of $\Bbb Z^n$. Let $x_1,..., x_n$ be elements of an abelian group $G$.  I want to prove that there exists a homomorphism $f$ $:$ $\Bbb Z^n$ $\rightarrow$ $G$ such that $f$$(e_i)$ $=$ $x_i$ for all $i$.   Please can anyone lend a hand here?

Let $(e_1, ..., e_n)$ be the standard $\Bbb Z$-basis of $\Bbb Z^n$. Let $x_1,..., x_n$ be elements of an abelian group $G$. Prove that there exists a homomorphism $f$ $:$ $\Bbb Z^n$ $\rightarrow$ $G$ such that $f$$(e_i)$ $=$ $x_i$ for all $i$.   Can anyone please help me out here?


What causes a mobile phone charger or any adapter to increase the current on same voltage. I saw that chargers are rated with different amp on same volt ( 5v.1A 5v,500ma 5v,250ma).  Ohm law says (V=IR) I am confused....!!!

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


OK. Im reading all the objects from an arraylist and grabbing thier names.              for(Contractor o : fa.allValues){                 System.out.println(o.getName());             }   This returns  Bobs Tools                 //The problem Ic Remodeling Fred and Nobby Dogs With Tools Dogs With Tools Bitter Homes and Gardens Etc etc   Now....when i create and add an object, i want to put the new object in any empty spaces that it finds. It should find an empty space when it comes to the 2nd record.  However........  String str = allValues.get(1).getName(); // where 1 is the location of the empty record   all the following returns false  System.out.println(str == ""); System.out.println(str == " "); System.out.println(str == null);   I want to input a condition that returns true. What basic issue have i over looked here?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Hy everyone!  Im currently using biblatex with style=authoryear. When i quote with \parencite it looks quite similar than apa. But not exactly. There is still a coma between the author and the year i need to get rid of: (Hemingway, 1980, 45) --> (Hemingway 1980, 45). I tried style=apa but i get Errors. What am I doing wrong? Thanks a lot!   \documentclass[11pt, oneside]{report} \usepackage[ngerman]{babel}  \DeclareLanguageMapping{ngerman}{ngerman-apa}  \usepackage{acronym}           \usepackage{amssymb}  \usepackage[utf8]{inputenc} \usepackage{chngcntr}   \usepackage[style=apa]{biblatex}  \usepackage{nameref}  \DeclareLanguageMapping{ngerman}{ngerman-apa} \addbibresource{refrences3.bib}  \renewcommand*{\nameyeardelim}{\addcomma\space}  \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}     \begin{document}     Text text text text \parencite[S. 265]{Diepen}  \newpage \defbibheading{bibliography}{%  \chapter*{Literaturverzeichnis}}    \printbibliography \setlength{\bibitemsep}{\baselineskip}  \end{document}     Some of the errors i get when i change style=apa:  \iffieldundef {endyear}{... l.745 \setlength                 {\bibitemsep}{\baselineskip} ./Introduction.tex:745: Undefined control sequence. <argument> \mkbibdateapalongextra                                    {year}{month}{day}  Package biblatex Warning: Bibliography string 'retrieved' undefined (biblatex)                at entry 'Byrum' on input line 744.

As in  I'm trying to use apa6e and biblatex-apa together and having problems.  Before I arrived at these problems, over the course of many hours of much reading, I first managed to get BibTeX working as expected in a simple input file (by modifying sample2e.tex). Then I managed to get apa6e working as expected based on the author's example in apa6e.pdf (which uses apacite). But when I try to get apa6e working with biblatex-apa, I end up with problems.  Here's my input file:  \documentclass{apa6e}  \usepackage[american]{babel} \usepackage{csquotes}  % biblatex \usepackage[style=apa]{biblatex} \bibliography{biblatex-apa-test-references}  \title{An Example Document} \shorttitle{Psychology: the end} \author{Silly Name}  \authornote{\dots} \abstract{\dots}  \begin{document}  \maketitle  This is an example input\cite{7.01:2} file.  Comparing it with the output it generates can show you\cite{7.01:3a} how to produce a simple document of your own.  \printbibliography  \end{document}   Attempting to typeset this in TeXShop by running LaTeX, then BiBTeX (which based on console messages, does seem to correctly call biblatex rather than BiBTeX), then LaTeX again, I get the following error message which I am having great difficulty (no doubt due to my lack of experience with TeX and co.) decoding.  (./test6.aux) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ptm.fd) *geometry* driver: auto-detecting *geometry* detected driver: pdftex (./test6.bbl) Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment   Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Silly Name   Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Author Note  [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Abstract  [2] Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment   Underfull \hbox (badness 10000) in paragraph at lines 25--25  []\OT1/ptm/b/n/12 References  ./test6.tex:25: Undefined control sequence. <argument> \mkbibdateapalongextra  (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1pcr.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omlztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omsztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omxztmcm.fd) Overfull \hbox (8.03372pt too wide) in paragraph at lines 25--25 [][]  \OT1/ptm/m/n/12 Gilbert, D. G., Mc-Cler-non, J. F., Ra-bi-novich, N. E.,  Sugai, C., Plath, L. C., As-gaard, G., ... Botros,  ./test6.tex:25: Undefined control sequence. <argument> \mkbibdateapalongextra                                    {year}{month}{day}\iffieldundef {endyear}{... l.25   I tried many different sources in several different *.bib files before eventually trying the .bib database shown above and included with biblatex-apa. All trials gave a similar error.  Can someone help? I'm impressed that the poster above was able to do anything with apa6e and biblatex-apa, and if I only had her problem of having the reference page title show up in bold, I'd be really happy.  If you need to know, my tools are from a fresh installation of MacTeX that I immediately updated using the TeX Live Utility. I've checked my versions for apa6e (v0.3) and biblatex-apa (v4.2), and I think these are current.


How can I check IBRS patch enables on my Ubuntu 16.04LTS by using command line

The current Meltdown Intel processor vulnerability is currently remedied by having the page table isolation enabled. There is a question how to turn this off:   My question is opposite: is there a way to check on a running system whether the PTI mechanism is effective on the system and thus the system is protected? I'm specifically looking for cat /proc/something or cat /sys/something, not checking for kernel version or config parameter or the like.


Is it possible to create a generic object from a reflected type in C# (.Net 2.0)?  void foobar(Type t){     IList<t> newList = new List<t>(); //this doesn't work     //... }   The Type, t, is not known until runtime.

The title is kind of obscure. What I want to know is if this is possible:  string typeName = <read type name from somwhere>; Type myType = Type.GetType(typeName);  MyGenericClass<myType> myGenericClass = new MyGenericClass<myType>();   Obviously, MyGenericClass is described as:  public class MyGenericClass<T>   Right now, the compiler complains that 'The type or namespace 'myType' could not be found." There has got to be a way to do this.


I'm looking for a simple, framed, float box-environment that has (or can have by construction) a  star equivalent (like figure* or table*) so that it may span both columns in the paracol environment. An enumeration of what I'm looking for:   Simple environment that may contain text, which provides a framed box around that text and has a * equivalent (e.g. figure*) for the purpose of spanning two columns in a paracol environment.   Does such an environment exist?   I'm asking this as a means of accomplishing the ultimate goal that motivated two other questions I previously asked:

The paracol environment allows figures to span two columns by using an asterisk in the figure's environment declaration: \begin{figure*} ... \end{figure*}.  I'm not familiar with the guts of why that works, and I was curious to know if there's something analogous for an environment derived from tcolorbox (like \newtcolorbox{NewBox}[1][!htbp]{...float=#1}). That is, in this example, can I get a NewBox that spans both paracol columns the way I wrongly assumed \begin{NewBox*} ... \end{NewBox*} would.  PS The tag below is "parcolumns" because I don't have a high enough reputation to create the tag 'paracol' (in reference to this CTAN package: )


I have a new(er) HP Pavillion G6, and I completely wiped the hard drive to install ubuntu primarily, with a small Windows 7 partition. I created a partition for "/", the "/home" directory, a little for swap, and one for the windows section. Finished installing, restarted, it says "boot device not found, please install operating system. What steps should I take to install ubuntu and windows 7? Thank you for any help offered.

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


QUESTION: How to match any word that is not preceded by .?  In the context of a code syntax highlighter, Unlike: , I don't want to reverse string then combine with lookahead nor reverse the matches order (like $1$0) since I concat multiple regex with |, nor use XRegExp, nor use string delimiter ^, $,.  With PCRE I would simply do: /(?<!\.)\b[a-z]\w+/gi  As I keep forgetting how to simply solve this out I would like to know if there is a recurrent pattern I can remember for mimicking negative look-behinds in Javascript. I'm probably not the only one but using look-ahead and reversing the matching logic always gets me dizzy!  Also most answers in SO use string delimiters, so it's not the same difficulty.  This is the closest I got: /((?!\.) )\b[a-z]\w+/, , but it matches a one length char before my match (can see in green with PCRE flavor selected).  Any help and logical explanation for me to remember next time would be highly appreciated!

Is there a way to achieve the equivalent of a  in javascript regular expressions?  I need to match a string that does not start with a specific set of characters.  It seems I am unable to find a regex that does this without failing if the matched part is found at the beginning of the string.  Negative lookbehinds seem to be the only answer, but javascript doesn't have one.  EDIT: This is the regex that I would like to work, but it doesn't:  (?<!([abcdefg]))m  So it would match the 'm' in 'jim' or 'm', but not 'jam'


I have a table that lists items and section that they belong to and the subsections within that. Each item can belong to any number of sections and subsections and doesn't have to belong to all. Roughly like:  Item|Section|SubSection 1   |1      |1a 1   |1      |1b 1   |1      |1c 2   |1      |1b 1   |2      |2a 1   |2      |2b 2   |2      |2a 2   |2      |2c   Is there a select string or function that would allow me to pull out the Item, Section and then a string with the subsection with a comma or other delimiter.  i.e the results from above would look like:  Item|Section|SubSectionString 1   |1      |1a,1b,1c 2   |1      |1c 1   |2      |2a,2b 2   |2      |2a,2c   Kind regards  Matt

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


This is output of the grep -E "scsi0:" *.vmx | grep -E "fileName" command in one of my directory:  scsi0:0.fileName = "vmname.vmdk" scsi0:1.fileName = "vmname_1.vmdk" scsi0:2.fileName = "vmname_2.vmdk" scsi0:3.fileName = "P120_vmname_2.vmdk" scsi0:4.fileName = "P120_vmname_3.vmdk"   I need to rewrite above output inside that vmx file so it looks like following   scsi0:0.fileName = "vmname.vmdk" scsi0:1.fileName = "vmname_1.vmdk" scsi0:2.fileName = "vmname_2.vmdk" scsi0:3.fileName = "vmname_3.vmdk" scsi0:4.fileName = "vmname_4.vmdk"   So in essence the script needs to the following:   look for the line which contains scsi0 and filename and remove everything after double quote before vmname check what is the number in that line after "scsi0:" and add/replace that number after the underscore, so P120_vmname_2 becomes vmname_3   The thing is that there can by any number of characters before vmname which need to be removed and lines which need to be fixed can be anywhere in the source file.  Do I need to assign individual line output to separate variable or it is possible to manipulate them with just one?  Thanks

What's the simplest way to do a find and replace for a given input string, say abc, and replace with another string, say XYZ in file /tmp/file.txt?  I am writting an app and using IronPython to execute commands through SSH — but I don't know Unix that well and don't know what to look for.  I have heard that Bash, apart from being a command line interface, can be a very powerful scripting language. So, if this is true, I assume you can perform actions like these.  Can I do it with bash, and what's the simplest (one line) script to achieve my goal?


I was running 17.04 on my really ancient 256Mb PIII.  I use it mainly for reading pdf docs while I'm programming on other machines.  Since 2 years ago, it has been coming up with a software upgrade icon.  I decided to update 18.04 two days ago.  I know 19.04 is out but it did not give me that option.  Went through a question and answer session and then a reset.  After booting up, nothing has appeared on the screen since the reset.  The disk light flashes occasionally so I assume it is doing something.  Is there anything key sequence I can press (I've tried all the function keys already) to get it to show me what it is doing?   I'd just to know what it is doing.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


what is "mount"? I have a gut feeling it means "make data storage accessible", but what does it really mean? Please specify the cases when "disk is accessible" and "disk is mounted" are different".

I hear and read the term all the time, but what does it mean?   I just accidentally mounted a shared folder hosted on a remote computer.  The only difference I see is the presence of a desktop shortcut.  I was able to access the folder before I mounted it with no problems.  So What does it mean to mount something?


I converted a curve to a mesh, and got the mesh data with:     mesh = bpy.context.object.data   This mesh had 47 vertices at this point. Then , I extruded the mesh (via script) along Z, and got 47 new vertices because of that (total 94)  However, this new addition is not reflected in my mesh data now. If I now perform some new operations using mesh.vertices , it only affects the older vertices and doesn't affect the new ones.  How should I go about this?

I've only just started studying the Blender Python API. I'm writing a script (see below) to automate something I've done by hand : joining two adjacent cubes and cleaning up the resulting mesh.   After joining and removing doubles, I expect to have 12 vertices instead of 16 in the resulting object. In the Info header, this seems to be the case, but when I print to the windows terminal I still see 16. Also I do see the output from remove_double(), here's a screenshot :    So what's wrong here ? What is the right way to access an object's mesh, and count its vertices ?  Joao  import bpy  # Create two adjacent cubes and join them bpy.ops.mesh.primitive_cube_add(location=(1,0,0)) ob = bpy.context.object bpy.ops.mesh.primitive_cube_add(location=(3,0,0)) ob.select = True bpy.ops.object.join()  # Expect 16 vertices, 24 edges, 12 faces result = bpy.context.object print(str(len(result.data.vertices)))  # Go to edit mode, remove double vertices bpy.ops.object.mode_set(mode = 'EDIT') bpy.ops.mesh.remove_doubles()  # Expect 12 vertices, 20 edges, 11 faces result = bpy.context.object print(str(len(result.data.vertices)))


Does anyone know how historically we came to notate functions as f(x) instead of (x)f? For example g(f(x)) instead of ((x)f)g or for matrices B A x instead of x A B.  After all (in the Western world) we write from left to right, but in mathematics we notate operations from right to left. Also if anyone of Arabian origin sees that, does it mean you don't have that particular confusion?

In most of Mathematics in English, the argument $x$ of a function (or partial map) $f$ with value $y$ is written $y=f(x)$ instead of, at least in Semigroup Theory and Formal Languages & Automata, $xf=y$. Why?   Thoughts:  A function $f$ is a subset of the Cartesian product of its domain $D$ and its codomain $C$ (i.e., $f\subseteq D\times C$) such that for each $d$ in $D$, $\lvert\{(d, c)\mid c\in C\}\rvert=1$. We write either $y=f(x)$ or $xf=y$ for $(x, y)\in f$.  The $xf=y$ notation has its strengths: composition of functions is usually taken left-to-right with this notation, as read in English, instead of right-to-left, with the argument $x$ first, as, I suppose, one usually has when evaluating $y$; one can read it as "$x$ through $f$ is $y$" instead of, say, "$y$ is $f$ at $x$"; and the left-to-right order respects that of going from the domain to the codomain.  Let me know if you can think of any strengths & weaknesses of the $xf=y$ notation.  I think history might have gotten the better of convention, that's all.


I want to set IP Rotation using iptables so I am using below code.My server Virtualization Type is OpenVZ. My server provider has enabled all the options then also don't know what is the wrong, It is showing error iptables: No chain/target/match by that name.  iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.1 iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.2 iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.3   They are also ready to enable my needed options so if need any specific option to enable then please tell me.Or is there any other problem ??? Please help me to solve this. I found similar question here : , but I can find any specific answer there like how to solve it with OpenVZ. So, I have created new question for attention.

So I am trying to setup shorewall firewall on my linux vps. The vps is running ubuntu 12.10. When I type $ shorewall check I get this error.  iptables: No chain/target/match by that name.    ERROR: Log level INFO requires LOG Target in your kernel and iptables   So I run iptables -L and I get  Chain INPUT (policy ACCEPT) target     prot opt source               destination  Chain FORWARD (policy ACCEPT) target     prot opt source               destination  Chain OUTPUT (policy ACCEPT) target     prot opt source               destination   I tried looking at other posts and there is one similar, but it did not help me. The kernel I am using is 2.6.32-042stab079.5  Does anyone know what I need to do to fix this? I've seen a few things about changing the kernel config, but I have no idea how to do that or what to change.


Wiremock: This issue is occurring with Wiremock, and it is passing locally, but when I am facing this issue while running my ci/cd pipeline and this is an intermittent issue once in every 5 times it is failing. Caused by: java.lang.NullPointerException: Cannot invoke "java.nio.ByteBuffer.hasRemaining()" because "compressed" is null at org.eclipse.jetty.http.GZIPContentDecoder.decodeChunks(GZIPContentDecoder.java:259) if anybody has faced this please help.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Recently my CENTOS machine has been under many attacks. I run MRTG and the TCP connections graph shoots up like crazy when an attack is going on. It results in the machine becoming inaccessible.  My MRTG graph:   This is my current /etc/sysctl.conf config  # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and # sysctl.conf(5) for more details.  # Controls IP packet forwarding net.ipv4.ip_forward = 0  # Controls source route verification net.ipv4.conf.default.rp_filter = 1  # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0  # Controls the System Request debugging functionality of the kernel kernel.sysrq = 1  # Controls whether core dumps will append the PID to the core filename # Useful for debugging multi-threaded applications kernel.core_uses_pid = 1  # Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1  # Controls the maximum size of a message, in bytes kernel.msgmnb = 65536  # Controls the default maxmimum size of a mesage queue kernel.msgmax = 65536  # Controls the maximum shared segment size, in bytes kernel.shmmax = 68719476736  # Controls the maximum number of shared memory segments, in pages kernel.shmall = 4294967296   net.ipv4.conf.all.rp_filter = 1 net.ipv4.tcp_syncookies = 1 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.all.rp_filter = 1 net.ipv4.tcp_max_syn_backlog = 1280   Futher more in my Iptables file (/etc/sysconfig/iptables ) I only have this setup  # Generated by iptables-save v1.3.5 on Mon Feb 14 07:07:31 2011 *filter :INPUT ACCEPT [1139630:287215872] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1222418:555508541]   Together with the settings above, there are about 800 IP's blocked via the iptables file by lines like:  -A INPUT -s 82.77.119.47 -j DROP   These have all been added by my hoster, when Ive emailed them in the past about attacks.  Im no expert, but im not sure if this is ideal.  My question is, what are some good things to add to the iptables file and possibly other files which would make it harder for the attackers to attack my machine without closing out any non-attacking users.  Thanks in advance!

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I was working quickly, (making mistakes), and suddenly rotation and scale transforms stopped working. I think I hit some shortcut or button by accident. Translate still works though. I checked that the transforms weren't locked and such, to no avail. What could be the cause?

My issue is that I have a blender file in which cameras and lamps do not move when I attempt to rotate them using the mouse. If I select the objects (in object mode), press R, and move the mouse in the viewport, the lamps and cameras don't respond; they remain in the same orientation as when I started, no matter how vigorously I try to move the mouse. The values in the information bar show that the mouse is communicating. If, however, I manually enter a new value for the amount of rotation in the properties shelf of the viewport, the camera moves to the new orientation.  On a new default Blender scene, the cameras and lamps do respond to commands to rotate and scale using the mouse. I've compared all of the settings I can think of, and don't see anything obvious that corrects the problem.   is available.


Suppose $f(x)$ is periodic with period $l$ and integrable. Prove that, for any a,  $\int_{0}^{l}$$f(x+a)$dx = $\int_{0}^{l}$$f(x)$dx  I tried to change the values and define y=a+x so that dy=dx and the limits of the integrals are as we want.

I want to prove:     For an integrable function $f(x)$ and periodic with period $T$, for every $a \in \mathbb{R}$, $$\int_{0}^{T}f(x)\;dx=\int_{a}^{a+T}f(x)\;dx.$$   I tried to change the values and define $y=a+x$ so that $dy=dx$ and the limits of the integrals are as we want, but I'm not sure how to use the fact that $f(x)$ is periodic.  Thanks a lot!


In Ubuntu 18.04 I set system wide Titlebar Buttons placement to the left using Tweaks:   The image shows Close, Minimize, Maximize buttons on the left.  This is working for every application window. In Firefox when I display the window in full screen (F11) the Titlebar Buttons placement is totally wrong.   The image shows Minimize, Maximize, Close buttons on the right.  This is very confusing. How can I set the Titlebar Buttons to the left for Firefox in full screen?  I am using Firefox 71.0 (64-bit) in Ubuntu 18.04.

I like the new CSD option (remove title bar) but when activated my window buttons move over to the right (normally on the left). Is there a way to have CSD enabled but with buttons on the left?


If, after 28 months of waiting and the third request, I within a few hours receive “Reviewer # 1: Sorry that this review took so long. However, this paper does not contain any results of value”, I know that the referee read only the author's name and, possibly, the title of the article.  If I get the message "How about you try to establish a reputation for yourself on several less serious questions before claiming to solve * both * the Goldbach and Twin Prime problems?", Then I begin to think that the solution of these problems is reserved for the author of this message And he was promised to show “the Book". Is it ethical to give such advice?  If they write to me “Yes, I will not accept this work. ... From very general considerations, I believe that you have a mistake in your work. Formally, of course, I have to specify it, but I do not want to do it because of saving my own time”, I understand that they read the work, they did not find any mistakes and  refuse, just in case.   Of course, the referee can save two hours of his time, and as a result, the author loses months, years, and sometimes, and all his life. Obviously, in order to recognize the results of my work, courage is needed. But, if “Reviewers' comments: ... I suggest rejecting it on grounds that it does not meet the standards of mathematical correctedness practiced by our journal”, I do not understand what is more important, form or content. I’ve always believed that the result is more important.  Sometimes they refer to feelings (“the referees felt given the methods you are using, it is hard to imagine that the results you claim are valid”), or belief (“I'm sure that your "elementary evidence" of Goldbach and the twins have mistakes, many years of experience does not allow me to believe in them, but I also can not spend time searching for them”).   But I'm not interested in the feelings of referees who did not even get acquainted with the proposed method and, I did not ask anyone to take my word for it. I offer the proof.  This is only part of the disclaimer, but there is not a single review or indication of an error. Is it ethical for judges to make a conclusion about a job without reading it, but only on the basis of their feelings and assumptions about what is written in the article?   Is every referee a priori smarter than any author to such an extent that in several phrases pulled out of context, can determine where the author's thought can turn?  Should not the referee read the article at least until the first error and point to it? And if the error is not found, recognize the work as correct. Otherwise, he should declare himself incompetent and ask the editor to transfer the article to another referee Really all mathematicians not only do not see, but also do not want to see beyond their nose?   How can the author get an honest, unbiased assessment of his work in this situation?

I am interested in the situation where you have a very interesting result. For instance, you have solved a very important open problem. However, you are not known in the field and do not have any remarkable publications. Your supervisor thinks the work is good and you submit the work to a high profile journal, but you get rejected.  The thing is that the contribution is very strong. It breaks what most people believe or what they have already proven: e.g., you solve the P vs. NP problem or any other well known open problem.   The reviewers strongly reject your work with no justification and they do not state why the result is wrong. Examples of reviewer comments include:   "The proof must be wrong."  "You cannot achieve such a result."  "You do not understand well the notion of ..."   My question is what to do in this situation? Where to go? If your advisor accepts the work, but the reviewers from the top journal reject the work without even explaining the mistakes,  what should you do?


For some reason my jQuery code is not able to find the button by class.   This is what I have:  $(document).ready(function () {             $(".deleteItem").click(function () {                 alert("Handler for .click() called.");             });         });   The html I have for the button:   <input type="button" value="Remove" class="deleteItem btn btn-danger btn-xs pull-right" id="testDeleteItem">   When the page is loading, the button is not recognized. The button is in hidden div and its only shown when the user is hovering over a control.  What do I need to change to make this work?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have a text field which is getting values from some process. I mean the user is not giving any input to this text field directly! Now my problem is that I want the value of that text field immediately after it changes. I tried   oninput and onchange   Here is the  of what I have tried. Both events want to focus of that area please tell me is there any way to achieve this

If i do jQuery(expr).change( function), then I can get an event function to fire when the user makes a change to the value.  Is it possible to get this to fire if it's changed programatically, ie if I call jQuery(expr).val("moo").  or if some Plain old JavaScript changes it's value?  Thanks for any help.


With that I can find the package name within an application  Package pack = Item.class.getPackage();   But all examples which I can find here or elsewhere to find the classes in a package use file to load a jar and look into that. I there a way to gat a classes list within active project without file ?  [EDIT] there are othere answers here but they all didn't work for me  [Edit] is for some reasons this has been blocked for answers. here is the solution      private static Set<Class<? extends Object>> getClassesInPackage(String packagename) {      List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();     classLoadersList.add(ClasspathHelper.contextClassLoader());     classLoadersList.add(ClasspathHelper.staticClassLoader());     Reflections reflections = new Reflections(new ConfigurationBuilder()             .setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())             .setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))             .filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(packagename))));      Set<Class<?>> classes = reflections.getSubTypesOf(Object.class);     return classes;   }

Is it possible to find all classes or interfaces in a given package? (Quickly looking at e.g. , it would seem like no.)


I found the following problem is quite hard for me, and I tried a lot but something I can't bring in my mind. Let $K$ be a normal subgroup of a group $G$ ($G$ can be finte or infinite) such that $[G:K]=m$. If $n$ is a positive integer such that $gcd(m,n)=1$, then show $K$ contains all elements of order $n$ in $G$.  I start by assuming that there exists an element of order $n$ which is outside $K$, then tried for getting a contradiction. But the group isn't provided finite,so I can't reach too far. Kindly provide me some hints.

Let $K$ be a normal subgroup of $G$ of index $m$. If $n$ is a positive integer such that $\gcd(m,n)=1$, show that all the elements of order $n$ are in $K$.   I could solve this if $G$ is finite as follows: Let $g$ be an element of order $n$. $|gK|$ divides $|G|$ using canonical epimorphism, again $|gK|$ divides $|G/K|$. Since $m$ and $n$ are relatively prime, we get order of $gK$ is $1$.  What if $G$ is infinite?


i want to center these equations:  \documentclass{article} \usepackage{amsmath} \begin{document}         \begin{align} \label{eq:test}             \sum {i=1}ˆ{5} x i & = 15 \\             xˆ2 + 10 x + 200 & = 0 \\             A&=AAA\\             B&=BBB\\         \end{align} \end{document}   I want them these four equations to be treaten like a figure (so center them without losing the alignment).  I saw many thread but all seem to be different (e.g. most only want to center one equation)  Thank you for your kind help.  edit1: That's what i get if i use it inside my real document:

I can't put my equation in the center, i don't know if is related to be using the srcbook package.    I tried using the amsmath package, the nccmath package and fleqn command, also i used the align* command, but the equation is always as you can see in the image.  What can i do?


I apologize in advance if some concepts I use are vague, but I am just an enthusiast. I have read that the  will not rip off black holes because the event horizon will become equal to something else that I cannot remember. I understood that, even if I do not remember the word for the other horizon. But that assumed that black holes do not evaporate, correct? or the big rip somehow will prevent that? if not, once I have a  naked singularity, will it be ripped of by the dark energy field, or it will somehow become larger and become a wormhole.

There seems to be an obvious contradiction between the predictions of the physics of black holes and the Big Rip, a predicted event about  where local groups, galaxies, solar systems, planets, and even atoms will be torn apart.  More , but would this include black holes, which are thought to casually prohibit escape across the event horizon?  The possibilities as I can conceive of them:   Black hole will be evaporated close to the 16.7 Gyr mark as the expansion increases the rate of Hawking Radiation The cosmic even horizon will approach the black hole's event horizon, getting asymptotically closer, forever or until the black hole evaporates according to our predictions for a black hole The universe doesn't completely tear itself apart at all, as matter on the scale of local groups falls into itself, even though the separation between local group increases in a big rip, the local group itself becomes a black hole and experiences a local "big crunch"   That last one is a big stretch, but it was my main take-away from reading .  I found it insightful, regardless of whether it has physical merit or not.  This question has been asked in  before, but didn't seem to have a very informed set of answers.


For probably about a month now, udev has been held back by apt-get when running apt-get updgrade.  The following packages have unmet dependencies:  udev : Depends: sysv-rc (>= 2.88dsf-24) but 2.88dsf-13.10ubuntu11.1 is to be installed or                  file-rc (>= 0.8.16) but it is not installable E: Unable to correct problems, you have held broken packages.   I thought it might go away eventually as packages were updated, but as I said, it's been about a month now. I'm wondering if someone might have some insight on why I can't update this package (I tried googling, but my google-fu on this problem is a little weak).  I'm running Ubuntu 12.04, and this is on a server-type machine (no GUI).  I have the following PPA's on my system:             And also the . I looked through them all, and didn't see any of the packages above being provided by these PPA's, but I thought I would mention it.

Occasionally, when I'm installing stuff, I get an error like the following:  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:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


What's the difference between using application/csv vs text/csv as the HTTP Accept Header?

I need to send a CSV file in HTTP response. How can I set the output response as CSV format?  This is not working:  Response.ContentType = "application/CSV";


I know this isn't directly related to statistics but I didn't know where else I should post this so please let me know and I will remove the question if this is the wrong forum.  My question is very simple. I have a logistic regression model that is predicting whether or not a patient has a certain type of disease. And I'm getting the warning "fitted probabilities numerically 0 or 1 occurred". Should I be worried or super happy about it?

If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message:  Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred    We still get the model but the coefficient estimates are inflated.   How do you deal with this in practice?


This is my first time working with rasters outside of a class on remote sensing, Im working on learning the vocabulary and hope Im doing a ok job of it.   I would like to merge two rasters both have the same spatial extent one has number of harvested hectares for corn the other for wheat. Each raster cell has a value that gives the number of harvested hectares of corn or wheat. I would like the finished raster after the merge to show different color ramp for both corn and wheat. Each cells should show after the merge the value for harvested hectares area this could be corn or wheat.  I have used the raster calculator to merge the two raster but this gives me one value with a the two harvested hectares summed, I need have one raster with a column for corn harvested hectares and a column for wheat with harvested hectares.  I am using arcGIS 10.3

I am trying to make a new raster based on three input rasters which have the same cell size and the grids align perfectly.  I now want to construct a new raster, which for each cell, has three attributes, being the cell the values of the different input rasters. I've read about using 'combine', but this provides with an attribute table with a count of all cells with the same combination of values in the different input rasters (I hope this is clear). What I need is an attribute table in which all cells are individually represented.   Does anyone have any advice on this?


I'm trying to pull a lot of files off of a lot of old CDs, and I'm getting all kinds of errors and hangs. The CDs are old and covered with scratches, so it's to be expected, but I have still been able to recover some of the files.  I was wondering if there is a way to skip the problem files but generate a list of skipped files so I can see what got missed.  I'm using Windows 7, but I am also comfortable in Linux if there are more options in that environment. I am also using a Samsung external CD reader with a USB interface.

I have a corrupted CD from which I want to copy files. The problem is that the default Windows 7 copy utility gets completely stuck when it encounters a corrupted sector of the CD. Can you recommend utilities with an option to manually skip certain files on-the-fly, or with option to specify a time out for every file copy?


Pre C++ 11, I often needed to implement two very-alike variants of a method to deal with const and non-const usage scenarios of the class/struct:  struct my_struct_t{      ....      float_t& at( uint32_t row, uint32_t col)      {          return *(((float_t*)((uint8_t*)numbers+row*row_stride)) + col);      }       float_t const& at( uint32_t row, uint32_t col) const      {          return *(((float_t*)((uint8_t*)numbers+row*row_stride)) + col);      }  };   Has this changed in C++ 11?

Let's say I have the following class X where I want to return access to an internal member:  class Z {     // details };  class X {     std::vector<Z> vecZ;  public:     Z& Z(size_t index)     {         // massive amounts of code for validating index          Z& ret = vecZ[index];          // even more code for determining that the Z instance         // at index is *exactly* the right sort of Z (a process         // which involves calculating leap years in which         // religious holidays fall on Tuesdays for         // the next thousand years or so)          return ret;     }     const Z& Z(size_t index) const     {         // identical to non-const X::Z(), except printed in         // a lighter shade of gray since         // we're running low on toner by this point     } };   The two member functions X::Z() and X::Z() const have identical code inside the braces.  This is duplicate code and can cause maintenance problems for long functions with complex logic.    Is there a way to avoid this code duplication?


I have come across a little problem while I'm trying to learn arrays. So the idea is that I need to print out the unique elements in an array. When I run the program, its printing out more than the number of values in the array lol. I'm sorry if this is a super simple and dumb question but i'm not seeing the problem with it. Language is c#.  static void Main(string[] args)     {         int[] numbers = new int[10];         Random random = new Random();          for (int i = 0; i < 10; i++)         {             numbers[i] = random.Next(0, 10);         }          Array.Sort(numbers);         foreach (var num in numbers)         {             Console.Write("{0}, ", num);         }          Console.WriteLine("");          for (int i = 0; i < 10; i++)         {             for (int j = 1; j < 10; j++)             {                 if (numbers[i] == numbers[j])                 {                     break;                 }                 else                 {                     Console.Write(numbers[i] + ", ");                 }             }         }

I have been working with a string[] array in C# that gets returned from a function call. I could possibly cast to a Generic collection, but I was wondering if there was a better way to do it, possibly by using a temp array.  What is the best way to remove duplicates from a C# array?


#!/bin/sh count=1 while read line do   found=$( grep M $line )   if [ "$found" ]; then     echo $count")" $line >> filesave.txt   fi   count=$((count+1)) done < log1.txt   but I am getting error like   ./count.sh ./count.sh: syntax error at line 10: `found=$' unexpected

I have written a small script to count number of occurrences of logs in a particular file. The following is my code:   #!/bin/sh count=1 while read line do     found=$( grep M $line )     OCCURENCE=$( grep M /log.txt)     if [ "$OCCURENCE" ]; then         echo $count")" $line >> filesave.txt     fi     count=$((count+1)) done < log1.txt   but I am getting this error:  ./count.sh ./count.sh: syntax error at line 10: `found=$' unexpected


In the story it is easier to "terraform" humans to live on this planet than to change the planet.  The humans end up looking like the local life forms...crablike creatures.  None of the converted humans ever come back, so they change a soldier to send him out and find out what happened to the others...  Any help?  Thanks

They want to see if humans can survive in harsh planet conditions with a view to future colonisation. Scientist guy invents a machine which can transform humans into beings which are adapted to conditions on planet. They send folks in but none ever report back. Scientist, in despair, sends his old dog in. Dog doesn't return either so scientist finally goes himself. Gets to planet and, in his new state, finds himself strong and perfectly adapted to life on new planet. Meets his old dog who is also fine, they can now communicate and end up going off to discover the new world together.


I'm working with a client that wants cost differences between two treatment groups. They have little background knowledge but have seen in the literature folks doing GLM gamma/log-link, etc. and are suggesting we do the same. However, for their purposes and the ease of the analysis, I want to suggest using IPTW to balance between the groups and compare cost directly using those weights. I need to strengthen my argument and I'd be happy to take suggestions on where to go.

I admit I'm relatively new to propensity scores and causal analysis.  One thing that's not obvious to me as a newcomer is how the "balancing" using propensity scores is mathematically different from what happens when we add covariates in a regression? What's different about the operation, and why is it (or is it) better than adding subpopulation covariates in a regression?  I've seen some studies that do an empirical comparison of the methods, but I haven't seen a good discussion relating the mathematical properties of the two methods and why PSM lends itself to causal interpretations while including regression covariates does not. There also seems to be a lot of confusion and controversy in this field, which makes things even more difficult to pick up.  Any thoughts on this or any pointers to good resources/papers to better understand the distinction? (I'm slowly making my way through Judea Pearl's causality book, so no need to point me to that)


I've written a memory manager in C++. The details aren't important, but when set up it allocates a large byte array from the heap, and when its allocate function is called, it clears some free memory bytes to 0 and returns a pointer to them. So an example of use would be:  memoryManager->initialise(1024); //Allocates 1024 bytes T* t = memoryManager->allocate<T>(); //Prepares sizeof(T) bytes and returns a ptr   This works great, I've thoroughly tested it and it works exactly as intended. However, since it just makes a "fake" pointer, the object's constructor doesn't get called. This falls apart when I try to allocate a class that inherits from another - its vptr never gets set, since that's done at the start of the constructor and hidden from the programmer. So as soon as I call a base class function, the program crashes with a seg fault.  Is there any way around this? Can I set it myself?  Edit: to anyone else looking for a way to do this, do a search for "placement new". Read comments for more info.

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


Given that   $$\lim\limits_{x\to 0} \frac {x(1+a\cos x)-b\sin x}{x^3}=1$$   What is the value of $a+b$   My try   $\lim\limits_{x\to 0} (\frac {x(1+a\cos x)}{x^3}-\frac {b\sin x}{x^3})=1$  $\lim\limits_{x\to 0} (\frac {(1+a×cos(x)}{x^2}-\frac {b}{x^2})=1$  $\lim\limits_{x\to 0} \frac {1+a\cos x-bx}{x^2}=1$  Apply L'Hôpital's rule:  $\lim\limits_{x\to 0} \frac {-a\cos x-b}{2x}=1$  Apply L'Hôpital's rule again:  $\lim\limits_{x\to 0} \frac {-a\sin x}{2}=1$ $\to$  $a=-2$  Is my approach right?

Let $f$ denote any function such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$. Find the value of $a$ and $b$, assuming that $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$.   My  attempt: $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3\frac{(f(x))^3}{x^3}}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b\frac{\sin x}{x}}{x^2}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b}{x^2}=1$ As denominator is tending to zero,so numerato will also tend to zero. $1+a-b=0............................(1)$ Applying L Hospital rule, $\lim_{x\to 0}\frac{-a\sin x}{2x}=1$ So $a=-2$ and $b=-1$ But the answer given in my book is $a=\frac{-5}{2}$ and $b=-\frac{3}{2}$. I do not understand where have i gone wrong?


The expected distance from origin after a random walk of $N$ steps in a $d$ dimensional space, is close to $$\sqrt{\dfrac{2N}{d}}\dfrac{\Gamma\left(\dfrac{d+1}{2}\right)}{\Gamma\left(\dfrac{d}{2}\right)}$$ for very large $N$. This was mentioned . I would be very obliged if someone can mention to me a reference (bibliographic) to an article, book or any publication, where this expression was derived or mentioned. Please restrict to references, and not explanation of the formula itself.

I am looking for a formula that evaluates the mean distance from origin after $N$ equal steps of Random-Walk in a $d$-dimensional space. Such a formula was given by "Henry" to a question by "Diego" ()  $$\sqrt{\dfrac{2N}{d}} \dfrac{\Gamma(\frac{d+1}{2})}{\Gamma(\frac{d}{2})}$$  I will be very gratefull if you can give me reference to an article that show how this formula was derived. Thanks!


Can one add a new camera in the 3d-view that matches the current view in that viewport? Is there a quick-key shortcut?  If, for instance, you have a 3d-view port set to orthographic, the added camera would also have to be orthographic and the orthographic scaling would have to be some certain setting etc, for the camera to match whats seen in the viewport.  Can this be done when creating a new camera?

Often I want to just point the camera to an object or a specific area in my scene to get an idea of how it'll look in the render. What's the most painless hassle-free way to do this in blender?  A quick search on the blender wiki does not lend itself to easy look-up due to all the noise in the search result.  This question could probably be broken down into these two main questions:   How do I point a selected camera to the current 3d-cursor location in the scene? How do I point the selected camera to the currently selected object(s) in the scene?


I'm trying to install grub-customizer on Ubuntu 20.04 and it's not working.  This is what I've tried (as suggested by multiple websites):  $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer  $ sudo apt update $ sudo apt install grub-customizer   It doesn't seem to find the package:  Err:13 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80]   This is the output from the last command:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package grub-customizer   I've read in a few places that people have been able to install this on 20.04 correctly. What am I doing wrong?  Thanks

How do I get to the Universe Repository in supported versions of Ubuntu?


Should it be like this?    Google Chrome, Windows 10, no zoom.

When close a question as duplicate, in the duplicate search bar, the border right is not visible.  Screenshot for reference:        GIF for the same:        System configurations: OS: Windows 10 Pro Google Chrome Version 69.0.3497.100 (Official Build) (64-bit) Mozilla Firefox 62.0.3 (64-bit) Zoom 100%


So I asked a question on Android Enthusiasts and when it loaded, I had a different very long username, only on that site, and I am not the only one experiencing this bug,  The difference is, when I try to load the question, it says "failed to load". And I also fail to ask a question, it says "error logged"

Earlier today I asked my first question on this site. So Meta SE was added to my accounts. But this account is shown three times:        One of them also has a badge while the other two don't.   The network profile doesn't show MSE at all:        Also I have got this long wierd user name and  I am not able to change it. In the edit- display name this long name is not there.My user name on other sites is shown there.   After all this happened Meta SE questions are not getting loaded in my SE app.    Edit: the issue of name is solved now. I changed the profile picture and saved changes and it worked.


I am looking at the proof of the following theorem from Stein and Shakarchi's Complex Analysis. However, in the proof, I don't understand why we can assume without loss of generality that the sequence of functions converges uniformly on all of $\Omega$. $\Omega$ here is an open set, but the assumption only holds for compact sets, so how is there no loss in generality?  If $\{f_n\}_{n=1}^\infty$ is a sequence of holomorphic functions that converges uniformly to a function $f$ in every compact subset of an open connected set $\Omega$, then the sequence of derivatives $\{f_n'\}_{n=1}^\infty$ converges uniformly to $f'$ on every compact subset of $\Omega$.  The proof proceeds as follows. Without loss of generality assume that the sequence of functions in the theorem converges uniformly on all of $\Omega$. Given $\delta>0,$ let $\Omega_\delta$ denote the subset of $\Omega$ defined by  $$\Omega_\delta = \{z \in \Omega: \bar{D_\delta}(z)\subset \Omega\}.$$ In other words, $\Omega_\delta$ consists of all points in $\Omega$ which are at distance $>\delta$ from its boundary. To prove the theorem, it suffices to show that $\{f_n'\}$ converges uniformly to $f'$ on $\Omega_\delta$ for each $\delta$.  This is achieved by proving the following inequality: $$\sup_{z\in \Omega_\delta} |F'(z)|\le \frac{1}{\delta} \sup_{\zeta \in \Omega} |F(\zeta)|$$ whenever $F$ is holomorphic in $\Omega,$ since it can then be applied to $F=f_n -f$ to prove the desired fact.

In Stein's complex analysis, there is one theorem 5.3 of Chapter 2 which says that if holomorphic functions  $f_n$ converges uniformly to $f$ on any compact subset of an open set $\Omega$, then so does $f'_n$.   In his proof, he said "without loss of generality we can assume $f_n$ converges uniformly to $f$ on all of $\Omega$". So I think what he meant was that from the conditions of the theorem, we can get $f_n$ converges uniformly to $f$ on all of $\Omega$.  However, I don't know how to prove this assumption. Any help would be welcome.


I'm dumb and this is embarrassing, but I'm trying to figure out how I properly use a method from a class in other parts of my code. I need to understand the Drupal way, if not just the php way. I have a class like this... namespace Drupal\module_name\Utilities;  use GuzzleHttp\Exception\RequestException; use Drupal\Core\Logger\LoggerChannelFactory; use Drupal\Core\Messenger\MessengerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use GuzzleHttp\ClientInterface; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface;  class Example implements ContainerInjectionInterface {    private $client;   protected $loggerFactory;   protected $messenger;   protected $config;    public function __construct(     LoggerChannelFactory $loggerFactory,     MessengerInterface $messenger,     ClientInterface $client,     ConfigFactoryInterface $config   ) {     $this->loggerFactory = $loggerFactory->get('simple_mailchimp');     $this->messenger = $messenger;     $this->client = $client;     $this->config = $config->get('module_name.settings');   }    public static function create(ContainerInterface $container) {     return new static(       $container->get('logger.factory'),       $container->get('messenger'),       $container->get('http_client'),       $container->get('config.factory')     );   }    public function request() {     return 'whatever';   } }  What's the proper way to use this class somewhere else? For instance, in another module, I want to call the request() method shown above.   $example = new Example();   $x = $example->request();  This doesn't work, as shown above. I get this... ArgumentCountError: Too few arguments to function Drupal\module_name\Utilities\Example::__construct(), 0 passed... and exactly 4 expected  (Even though it seemed to have worked at one time.) That said, what's the right way to go about this with Drupal, or in general, I guess?

I am relatively fresh to the DI party and am struggling to get my head around how exactly to use Dependency Injection. I understand that I can pass requirements as part of a service, but what about in my own class?  Say I have the below class where I want the language manager service to be injected:  class Foo implements ContainerInjectionInterface {    protected $languageManager;     public function __construct(LanguageManagerInterface $languageManager) {     $this->languageManager = $languageManager;   }    public static function create(ContainerInterface $container) {     return new static(       $container->get('language_manager')     );   } }   When I call new Foo() I am required to pass an instance of LanguageManagerInterface. That makes sense in terms of a normal constructor method, but that would require me to instantiate the class like the below:  $languageManager = \Drupal::service('language_manager'); $foo = new Foo($languageManager)   That just doesn't feel right to me.  Is there something I am missing, or would this class always have to be a service to take advantage of dependency injection?


Let $T$ be a linear transformation $T$ such that $T\colon V \to V$. Also, let $T = T^2$. What are the possible eigenvalues of $T$?  I am not sure if the answer is only $1$, or $0$ and $1$.  It holds that $T = T^2$, thus $T(T(x)) = T(x)$. Let's call $T(x) = v$, so $T(v) = v$. which means that $\lambda=1$. But I am not sure about this, while I have seen a solution that says that $0$ is possible as well.  Thanks in advance !

A projection operator $P$ is defined as $P^2$=$P$. Use this definition to find the eigenvalues of this operator.   In this question is it necessary to define what the projection operator is? And won't the eigenvalue just be zero?


There is a code:  class A {     int x = 12; } public class Program {     public static void main(String [] args) {         A a = new A();         int d = 10;         a.x = d;          System.out.println("a.x: " + a.x + ", d: " + d);          d = 52;         System.out.println("a.x: " + a.x + ", d: " + d);     } }   The output is:  a.x: 10, d: 10 a.x: 10, d: 52   Why a.x doesn't change? As I understand during the assignment the left value take a reference of the right value, and if right value will changed after, the left value must change too. Why it doesn't happen?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I want to go to Toronto to visit my brother only for 5 days and will come back to the USA. I also want to see the water fall through the border between Canada and USA. I am now staying in Milwaukee, Chicago and I'm Vietnamese, I have a one year, multi-tourist USA visa. Do I need a Canadian visa?

My parents have a multiple entry US visa. They want to visit relatives in Canada. Do they need to obtain a Canadian visa? They are Indian citizens/passport holders.


I've been experiencing some problems with trying to get a callback to work. It constantly gives me this error:  java.lang.NullPointerException at Networking.JRNetworking.JRNet_Receiver.onReceive(JRNet_Receiver.java:89) at Networking.JRNetworking.JRNet_Receiver.run(JRNet_Receiver.java:63) at java.lang.Thread.run(Unknown Source)   here is the relevant code:  package Networking.JRNetworking;  public interface CallBack {     public void printId();     public void onReceive(String message, String IP); }   The caller (object):  public CallBack callBack ; public JRNet_Receiver(){} public JRNet_Receiver(CallBack callback) {     setCallBack(callback);     callBack.printId();     System.out.println("class: " + callback.getClass().toString()); } public void setCallBack(CallBack call) {     System.out.println("setCallBack has been called!");     callBack = call; }   and the void that calls:  private void onReceive(String ReceivedString, String senderIp) {     try{     System.out.println(senderIp + "     " + ReceivedString);      //THIS IS THE TROUBLING PART     System.out.println("callBack: " + callBack); //<<<<<<<<<<      //PC Version!     callBack.onReceive( //<<<<<             ReceivedString,              senderIp);     }catch(Exception E)     {         E.printStackTrace();     } }   and the instantiator and called:  JRNet_Receiver receiver ;  public int Id; @Override public void initialize(URL location, ResourceBundle resources) {     Id= new Random().nextInt(1000);     System.out.println(Id);      receiver = new JRNet_Receiver(this);     System.out.println("Current class: " + this);     receivePlayers(); }  public void onReceive(String message, String IP) {     System.out.println("I have been called in PlayerlistController!" + message + "    " + IP); }   I hope you can help me!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I want to put some code in a verbatim environment:  \begin{verbatim} data _≥_ : Nat → Nat → Set where   ge0 : {y : Nat}                   → y     ≥ zero   geS : {x : Nat} {y : Nat} → x ≥ y → suc x ≥ suc y \end{verbatim}   but when I compile the document I get warnings saying that { and } are not defined for this font:     ./3-proofs.tex:0:No file OMScmtt.fd. on input line 116.      ./3-proofs.tex:116: Font shape OMS/cmtt/m/n' undefined(Font) usingOMS/cmsy/m/n' instead(Font) for symbol textbraceleft' on input line 116. Font shapeOMS/cmtt/m/n' undefined(Font) using OMS/cmsy/m/n' instead(Font) for symboltextbraceleft'      dep-typed-wbl-heaps.tex:0: Some font shapes were not available, defaults substituted.   Somewhere on the web I found a hint to add  \usepackage[T1]{fontenc}    to my document, but that completely messes up huge portions of my text and therefore is not an option. Is there any other way to get curly braces in verbatim environment?

minimum working code:  \documentclass{article} % \usepackage[T1]{fontenc}  \begin{document}  abc ABC 123  \end{document}      It opens as pdf in Mac's preview and Acrobat X respectively.  The left is original, the right uses T1.  Should I assume the T1 encoding or CMsuper is not anti aliased or so?


I'm often confused by the correct use for "who" and "that".  I believed always that "who" in a sentence refers to people or persons and "that" refers to inanimate objects, machines, animals, etc.  In the case of:  "SATA III SSD drives are ideal for users that demand maximum performance." I believe should read: "SATA III SSD drives are ideal for users who demand maximum performance."  Gregg

Which of the following is correct?        There were 10 people that went to the store.   There were 10 people who went to the store.      Edit:  Which of the following is correct?        There were 10 people that had brown hair.   There were 10 people who had brown hair.


I have 2 operating systems on my computer: Windows and Linux. I had to reinstall Windows for a long complicated issue after I had Linux installed on my computer which deleted or at least hid the grub boot loader. Is there any way I can boot into Linux without it? I know there are already questions on this, but every answer assumes I can access Linux. I can't, which is the entire reason I'm asking this. And downloading another boot loader or something won't work because the entire reason I want to get into Linux is to help fix an issue with my Windows that is preventing it from connecting to the internet.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


How can I hide the first equation number as in the picture in latex    \documentclass{article} \begin{document} \begin{align} R=p(S\text{ working})&= p(i\text{ working}) p(S\text{ working}|i\text{ working})\\ &+ p(i\text{ faild})p(S\text{ working}|i\text{ faild}) \end{align} \end{document}

I want the equation number to be shown only at the last line, or better, somewhere in the middle of all. So instead of (1), (2), ... only (1). I use \begin{align} ... \end{align}


I'm trying to run wire to my shed 30 feet from house. I thought it would be nice to have two circuits, one for lights and one for heavier current applications.  So I ran two 10/2 18inches deep in PVC... and now I read I can't run two cables to the shed. ugh! It's buried. Is it possible to leave it and electrician can configure the two 10/2 into the equivalent of a 10/3? Or do I have to dig this trench again and put in a single 10/3?

I know it's not NEC and far from the right thing to do.  I need 30 amps at the garage.  I already have two unused 12/2 cables (w/ground) running to the garage. I was thinking to use one 12/2 cable, combine the black and white from one, put it on one phase and use another 12/2 wire, combine the black and white from that one, and put it on the other phase. The grounds of both would be tied to neutral.  In the garage I'd make a breakout box and attach each 12/2 to a wire of a 6/3. Each 12/2 would be a hot, 120VAC of a leg of the 2 double circuit breaker.   I'd be pulling about 30 amps for an electric car charger.  Please give me all the reasons why NOT to do this, and that it's a bad idea.  12/2 - Black & White - Phase 1, 120VAC   > Black wire on 6/3  12/2 - Black & White - Phase 2, 120VAC   > Red wire on 6/3 Ground > White on 6/3  Grounds of each would be tied to neutral/ground.


The tag feature-scaling seems to convey that one of the scaling methods is Standard Normal Distribution. Further, I read an Answer on this site saying that Mean Normalization is a form of feature scaling. What is the difference between two approaches to scaling? Note: I think that statistics and mathematics of normalization do differ.

In my machine learning class these two methods were discussed and mentioned that both should be used. I have a couple questions about this:  1) Can I mix and match these two approaches? e.g. Feature Scale x1 and Mean Normalize x2?  2) How do you determine which of these options to apply? It seems that either could accomplish the task of increasing your convergence rates... I suppose you just need to know your data set to understand which will reliably reduce your values while leaving as few outliers as possible?


"homework"     What can be said about $\pi+e$ and $\pi e$? Are these numbers rational or irrational?   I know that both $\pi$ and $e$ are  irrational. What can be said about $\pi+e$, and $\pi e$?

From  I came to know that it is hard to conclude $\pi+e$ is an irrational? Can somebody discuss with reference "Why this is hard ?"   Is it still an open problem ? If yes it will be helpful to any student what kind ideas already used but ultimately failed to conclude this.


Here is the essence of what I am trying to do:  double *E; //Array of doubles int N;  //The eventual size of the array, typically >1  // some code where variable N gets assigned  //inside of some function E = malloc(sizeof(double)*N);  printf("size of E = %lu\n",sizeof(E)/sizeof(E[0])); //checking size of array E   The output of this code is "size of E = 1", regardless of the actual value of N. Why does the malloc() function not allocate the correct size in memory?  I know this seems very rudimentary, but I cannot understand why this would not work.  Any insight would be greatly appreciated.

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


There are many flying brooms in the world of Harry Potter, like the Nimbus series, the Cleansweep series, the Firebolt etc.   However, I didn't find any concrete information about which broom is the costliest of all. I understand that some brooms will be best for some situations or people. But still I want to know which broom is the most expensive.

For the first three years of Harry's Hogwarts life, we see a new broom coming out as the fastest each year:     Several boys of about Harry’s age had their noses pressed against a window with broomsticks in it. “Look,” Harry heard one of them say, “the new Nimbus Two Thousand — fastest ever —”   -Harry Potter and the Philosopher's Stone, Chapter 5        “Very latest model. Only came out last month,” said Flint carelessly, flicking a speck of dust from the end of his own. “I believe [the Nimbus Two Thousand and One] outstrips the old Two Thousand series by a considerable amount.   -Harry Potter and the Chamber of Secrets, Chapter 7        “Just come out — prototype —” a square-jawed wizard was telling his companion.   “[The Firebolt is] the fastest broom in the world, isn’t it, Dad?” squeaked a boy younger than Harry, who was swinging off his father’s arm.   “Irish International Side’s just put in an order for seven of these beauties!” the proprietor of the shop told the crowd. “And they’re favorites for the World Cup!”   -Harry Potter and the Prisoner of Azkaban, Chapter 4   There's no mention of a faster broom in any of the remaining books. So, did the broomstick industry just stop their research after the Firebolt came out? Or were they unable to make anything better than the Firebolt?


Is there a proper way to detect the Windows-1251 encoded characters ?   IMO, unlike multiple-byte native characters, Windows-1251 is an 8-bit character encoding, so it's impossible to distinguish it from other 8-bit native characters like latin1. If I am wrong on this, please correct me.  The first clue to me is locale, I take all the non-ascii characters as Windows-1251 if the locale is ru.  Are there any better ways ?   UPDATE:  Here is the context of my question, there are some Windows-1251 encoded characters in the ID3 info of a MP3 files, I have to detect the Windows-1251 encoded characters and then convert them to UTF-16 using icu4c , otherwise those Windows-1251 encoded characters will represented unreadable on my system(Android). I deem maybe some of you have better ways.

In our application, we receive text files (.txt, .csv, etc.) from diverse sources. When reading, these files sometimes contain garbage, because the files where created in a different/unknown codepage.  Is there a way to (automatically) detect the codepage of a text file?   The detectEncodingFromByteOrderMarks, on the StreamReader constructor, works for UTF8  and other unicode marked files, but I'm looking for a way to detect code pages, like ibm850, windows1252.     Thanks for your answers, this is what I've done.  The files we receive are from end-users, they do not have a clue about codepages. The receivers are also end-users, by now this is what they know about codepages: Codepages exist, and are annoying.  Solution:    Open the received file in Notepad, look at a garbled piece of text. If somebody is called François or something, with your human intelligence you can guess this. I've created a small app that the user can use to open the file with, and enter a text that user knows it will appear in the file, when the correct codepage is used.  Loop through all codepages, and display the ones that give a solution with the user provided text.  If more as one codepage pops up, ask the user to specify more text.


I was going to compile a php extension using phpize, but it reported some files not found. I googled and found some solutions,      In OS X 10.9, we can make a symbol link from /XCODE_PATH/OS_X_SDK/usr/include to /usr/include   But it seems that OS X 10.11 has some system policy which deny this operation. I even tried to boot in single user mode, but I just got   $ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include /usr/include Sandbox: ln(14) System policy: deny(1) file-write-create /usr/include   Anyone knows how to fix this problem? Your answers or comments will be highly appreciated.

Apple has introduced , also known as "rootless", with OS X 10.11, El Capitan. I understand this is a step for general protection against malware but as a developer I need write access to some of the files it locks away.  How do I disable this protection?


While doing my time in the review queue,  (question A) came up as a possible duplicate, with  (question B) cited as the "best original." Being a thorough person, I checked out question B and noted the following:                A      B           -------------     topic:  very similar pageviews:  ~13k   ~125k     votes:   16     241   answers:   5      12   I don't claim to be a JavaScript expert, but the top-voted answer to B seemed a lot more comprehensive and explanatory, as opposed to A's which was a basic "just do it this way." The answers also don't perfectly agree with each other, so I may be missing something that Crockford might catch, but overall B looks much better.  So, perfect reasons to close, right? Then I looked at the dates: A was asked May 6 '10 at 6:23, while B was asked Aug 2 '10 at 17:53 - three months later. And so my question: should we be marking something as a "duplicate" of another question even though it was asked first?  I think most would agree that B is the better question, has a more searchable title and text, has attracted more and higher-quality answers, and would probably be of better use to future visitors. But, A was asked first, so labeling it a dupe is problematic. There is nothing inherently wrong with the question, and depending on your personal preferences you may like its answer better.  So, with these doubts, I declined to vote for closure, and left a note for the initiator of the close process that s/he should check dates before marking dupes. I now see that other reviewers either didn't see the comment about the date discrepancy or didn't care, as the question is now on hold. I have nominated it to be re-opened, but figured I should bring the discussion here to get the community's view on things.

I have seen this many times, a question is being asked because a previous, duplicate question was asked and answered a few years ago and has no longer relevant answers.  The  is to edit the old question, or add new answers to it, but it is not always happening.  I was wondering, should I still mark it as duplicate and vote to close it? Or just leave it as is?


Yesterday, I was browsing and answering questions on Stack Overflow and my reputation points were at 1401 (refer to the screenshot).    Then after some time, my points were reduced to 1386 and there were no downvotes in my profile (refer to the below screenshot).    How can this happen without any downvotes?  Or is there any reason for doing this?  Where can I inform about these activities?

If I am concerned that my reputation score is incorrect, how can I audit it, or get a report of a detailed breakdown of my reputation?


When voting to close a question that should be migrated to another site, this list of sites is presented:   meta.stackoverflow.com superuser.com tex.stackexchange.com dba.stackexchange.com sharepoint.stackexchange.com   The site programmers.stackexchange.com should be added to the list. I don't have hard stats, but it seems like a common migration need.  FWIW, I encountered this when voting to close .

Currently the migration path options from SO are:   Meta.SO Serverfault SuperUser Webmasters Programmers   If we are going to be limited to 5 options, shouldn't we periodically re-evaluate which sites are most appropriate?   (10k only) indicate that the top sites for the last 90 days are:   Superuser - 564 - 5% rejected ServerFault - 278 - 10% rejected Tex - 157 - 13% rejected DBA - 144 - 2% rejected Sharepoint - 127 - 1% rejected Programmers - 126 - 26% rejected CodeReview - 100 - 3% rejected Meta.SO - 81 - 18% rejected Wordpress - 75 - 14% rejected Webmasters - 58 - 8% rejected   All these migrations for sites out of the list required a flag and a moderator to process it.  This is just extra work for the mod team!  If we had the top 5 destinations by volume as the 5 options, we would have had a net savings of 160 flags to be processed.  I suspect we will actually see these numbers change quite a bit if it's easier for users to put questions in the appropriate spot without moderator intervention.  Can we have a review of the migration path list based on migration volume?  Think of the flags!


What's the story behind the ::'s sometimes token name  T_PAAMAYIM_NEKUDOTAYIM   I'm mainly interested in knowing if   This is an abbreviation for something else. This is a phrase in a language other than English, and if so what's the language and what's a rough translation. This is some obscure-to-me programming term. Drunk developers.

Does anyone have a T_PAAMAYIM_NEKUDOTAYIM?


From what I have read, misaligned access means mostly two things:   you may get a performance loss you will lose atomicity of loads and stores that aligned access has   Supposing that performance is not an issue and what I want from software is correctness, how bad is misaligned access? My understanding is that the x86 CPU will handle such accesses correctly but may have to do additional work to fetch the data.  What lead me to asking this question was compiling my code with -fsanitize=undefined. I got many errors about misaligned stores/loads. I am not sure if this is an issue because:   the stores are performed only during data preparation which is a single-threaded process, so I am not concerned about loss of atomicity the loads are performed in a multithreaded process where many threads (four or more) access the data, but the data is not modified by any of them (held in a const uint8_t* variable)   The reason accesses are not aligned is that the const uint8_t* array contains bytes from many different types (uint8_t, uint16_t, uint32_t, uint64_t, and int64_t).  I am sure that no load goes outside the bounds of the allocated uint8_t array (e.g. the program never loads uint64_t from an address that points to last one, two, or three bytes of the allocated memory block), and am sure that my accesses are all correct - only misaligned.  Another thing I read is that such loads may be breaking the strict aliasing rules, but the code compiles without a single warning with -Wstrict-aliasing -Werror (which I have long ago enabled).  Should I pad the data in the uint8_t array to ensure accesses are aligned, or may I safely ignore the warnings?

Admittedly I don't get it. Say you have a memory with a memory word of length of 1 byte. Why can't you access a 4 byte long variable in a single memory access on an unaligned address(i.e. not divisible by 4), as it's the case with aligned addresses?


I just downloaded Ubuntu-14.04.3-desktop-amd64. Can you guide me through the installation process.  I have no idea how to go forward with this. Also, I'm using Windows 8 and would like to dual boot with Ubuntu desktop.  Thanks in advance..!

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


What means these error mease by using  \usepackage{firamath-otf}   Code:  \documentclass{article} \usepackage{fontspec} \usepackage{firamath-otf} \begin{document} \begin{equation} x+y=45 \end{equation}   The compilation was by XeLaTex

How to set a font for math mode? I would like to have something like Segoe UI of something similar. Thank you  \documentclass{article} \usepackage{fontspec} \usepackage{firamath-otf} \begin{document} \begin{equation} x+y=45 \end{equation}  \end{document}   Error:


This must be a function which is antiderivative but it has no Riemann-integral. These conditions must be fulfilled in closed interval from 0 to 1.

Can you give me an example of a bounded f:[0,1]-> R , which has a primitive but it isn't Riemann-integrable? It must be on a closed interval from zero to one.


Let $G$ be a group and $a,b\in G$. Suppose that $$a^{-1}b^2a=b^3$$ and $$b^{-1}a^2b=a^3$$ Show that $a=b=1$.  If we can show that $a=b$, then from the two relations clearly $a=b=1$. I observe that each relation can be rewritten as $[a^{-1},b^2]=b$ and $[b^{-1},a^2]=a$. Also they can be written as $(a^{-1}ba)^2=b^3$ and $(b^{-1}ab)^2=a^3$.    I need some guidance to solve this kind of problem. I did some guess but they did not lead to the result.

Suppose $a$ and $b$ are elements of a group $G$. If $a^{-1}b^{2}a=b^{3}$ and $b^{-1}a^{2}b=a^{3}$, prove $a=e=b$.   I've been trying to prove but still inconclusive. Please prove to me.  Thanks very much for proof.