I couldn't find an answer for this:     "Cross-thread operation not valid: Control 'progressBar1' accessed   from a thread other than the thread it was created on."   This is my code:          private void buttonStart_Click(object sender, EventArgs e)         {             ClassCopy cb = new ClassCopy();             cb.startCopy(textBoxSrc.Text, textBoxDest.Text, true);              th = new Thread(loading);             th.Start();          }          private loading()         {             for (int i = 0; i < 100; i++)             {                 if (progressBar1.InvokeRequired)                     progressBar1.Invoke(new Action(loading));                 else                     progressBar1.Value = i;             }         }

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I am trying to update node version. Even after updating node to v10.x it still shows older v8.x. I have added  path where npm and node is installed and node and npm version. I also used nvm. I have installed and removed it multiple times so i don't know where it is installed. I am new to linux and completely clueless. Please help.      amrit@amrits-pc ~ $ whereis npm npm: /usr/bin/npm /usr/local/bin/npm /home/amrit/.nvm/versions/node/v8.11.2/bin/npm  amrit@amrits-pc ~ $ whereis node node: /usr/bin/node /usr/lib/node /usr/local/bin/node /home/amrit/.nvm/versions/node/v8.11.2/bin/node  amrit@amrits-pc ~ $ n 10.16.0    installed : v10.16.0 to /usr/local/bin/node       active : v8.11.2 at /home/amrit/.nvm/versions/node/v8.11.2/bin/node  amrit@amrits-pc ~ $ node -v v8.11.2  amrit@amrits-pc ~ $ npm -v 6.14.4

I'm unable to update nodejs, and I can't see why.  If I were to make a guess, I'd say that I have two repositories listed in apt-get, that both contain a nodejs package.  Here's what I've done:  Remove old version:  sudo apt-get remove --purge nodejs npm   Then, going by , I've run:  curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -   And then:  sudo apt-get install -y nodejs   I then run:  nodejs -v   Which returns:  v0.10.25   Can anyone explain what's going wrong? And how I can remedy this situation?  Many thanks.


the following code produce a text flushed to the left of the page, which I did not expected:  \documentclass{article}  \begin{document} {\raggedleft Xyzzy!} \end{document}   like so:    Removing the group produce what I expected. Code:  \documentclass{article}  \begin{document} \raggedleft Xyzzy! \end{document}   Output:    What did I got wrong?

Somehow, the lines in my document are all ragged, i.e. the further use of \raggedright does not change the document. I do not know the command to undo this (I believe not ragged is the preset). Here are the packages I'm using, could it be one of them responsible for this?  \documentclass[12pt]{article}  \usepackage[letterpaper]{geometry}  \geometry{top=1.35in, bottom=1.35in, left=1.35in, right=1.35in}  \usepackage{setspace}  \usepackage{amsmath}  \usepackage{amssymb}  \usepackage{float}  \doublespacing  \usepackage{rotating}  \usepackage{multirow}  \usepackage{lineno}


I have seen both "(Something) requires that one specify how.." and "(Something) requires that one specifies how.." used in various contexts. Which is grammatically correct? My sense is that the former is correct because the verb "specify" should be conjugated in present subjunctive within a declarative content clause.

I have a sentence which reads     Many people require that every lightbulb within a house have/has a switch.   Is it appropriate to use "have" here so as to utilize the subjunctive mode of the verb "require"?  Or is it more appropriate to use "has" in order to get the (lack of) pluralization in "every lightbulb has..." correct?


$$ \frac {1}{\log_2(x-2)^2} + \frac{1}{\log_2(x+2) ^2} =\frac5{12}.$$  I made the graph using wolfram alpha it is giving answer as  6. But how to solve it algebraically? base of logarithm is 2.  Tried using taking Lcm but then two different log terms  are getting formed.


I have a battery supply consisting of 3 AA batteries of each 1.5V.  I need an operating voltage of 3.3V.  Which choice of buck converter or regulator would be better?  My application requires 100mA of current. So are AA batteries a better choice or the conventional 9V battery? Last time i didn't have any info regarding the current requirements now i do.  My choices currently are AA batteries or a 9V battery .  If there any better choices of batteries plz let me know.  Also yes last time i received an excellent answer from swineone, but i am still confused with the best choice for the regulators. ( Whether LDO or switching regulator)

I am trying to design a circuit on a PCB whose supply voltage needs to be 3.3 V.  Currently I have two options:   Use three AA batteries of 1.5 V each to obtain 4.5 V, then use a converter/regulator to bring it down to 3.3 V Use a 9 V battery & bring it down to 3.3 V   Which would be the better option, considering that I am making a PCB (not sure if the PCB matters)?  Cost is not a factor with respect to the above 2 options. My current requirement is around 100mA. What i have understood after reading about smps is that they can cause some interference, i am using a zigbee on the same PCB, so will the smps coil interfere with the zigbee?


I am dual booting Windows/Ubuntu, but for some reason can not extend the Ubuntu Partition into allocated space. I tried gpartion and doing it in windows and have the same issue, I can see the disk space but I am not allowed to extend my Ubuntu partion into the unallocated space, any ideas? Thank you all.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


My problem is that when im trying to create a circle on a surface with loop tools' circle tool i end up with tis deformation.  To create the circle i subdivide the surface, delete the inner faces that i dont need and select the loop thats going to be my circle. Then i hit the circle tool and the deformation appears. If i create a seperate object no matter the "scales" or any transformation i apply to it the prosess above will be successfull. Clearly i am missing something but i cant find it. Thanks for your time.  ps. im relatively new to blender so anything at all would help

I have the loop tools addon enabled and when I click the circle button with these verts selected, it just disappears. Why is that?  You can see the selected options in the bottom screenshot. It is worth noting that all the verts are flat on the x plane. Locking in X or not does not change the effect.   When I use the to sphere operator it squishes the verts on Z and stretches super wide on Y, not making a cirlce.    EDIT:  here is the blend


Here are some sentences about 'after being'        Schoolgirl awarded €20,000 after being locked in classroom.              Girl dies after being struck by lightning.              Two people die after being swept away by river.        I think we can use 'after being+past participle' when one action immediately follows another action. For example: Girl dies after being struck by lightning.  Here, It means: Girl dies after she was struck by lightning.  Am I correct?  I think I can change 'dies' into 'died'.  For example:     Girl died after being struck by lightning.   Why has 'Girl dies' been written in the news even if she died in past?

What is the difference between the examples below?  Generally, in a newspaper, news is based on past tense (things which have already happened).   Then why are headlines written in ways that says: He Kills (shouldn't it be: He Killed)?  For example:  Parliament passes bill vs. Parliament passed bill  Also  He kills his friend vs. He killed his friend  Please help.


I have a static array inside a class template. The linker complains about a undefined symbol and even after applying the tips I saw on the web, I can't figure out what goes wrong.   Header  template<unsigned int N1, unsigned int N2> class Foo  { private:     static const int Size = N1 * N2;  public: // stuff  private:     static float mArray[Size];  }   CPP  template <unsigned int N1, unsigned int N2> float Foo<N1, N2>::mArray[size] = {0};   The linker complains about Foo<...>::mArray not being defined. I got it to compile (and link) when I move the definition to the header but I know that this is bad practice for statics. What is the best approach here?  Cheers

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm trying to create a shirt for a model by extruding some faces out a bit, but no matter how hard I try, the faces won't extrude properly. I've scoured the internet already, but haven't had any luck finding a solution. I'll add the download for the file if you want to see for yourself.  As you can see, the normals on my mesh are correct. There aren't any duplicate verts or faces.    But when applying any extrusion or solidify, the generated faces only scale out in the y axis.    Here's the link to download.

I'm Having trouble with setting the thickness applied by solidify. The selected block is 15 by 28 cm (single mesh sides) and the thickness of solidify is set to 3mm (pointing inwards). Checking off even thickness makes it even worse. I was using the function in a different object earlier today and it worked just fine. Is there something I'm missing or is this just a bug?   Feel free to treat me like an idiot, I've literally started using blender yesterday :)


I created a file nano ~/uncwe/configurations/variables.sh. This file contains:  set -a rse="~/${repo}/internal_software/rse.sh" set +a   I sourced the file, then tried to execute:  ${rse} bash ${rse}    Both output No such file or directory, although, echo ${rse} returns:     ~/uncwe/internal_software/rse.sh   That's odd to me, because that file ~/uncwe/internal_software/rse.sh is alive and kicking, and I can run it directly by:  ~/uncwe/internal_software/rse.sh   In this case, the file runs just fine.  Hence I'd like to ask why is the file's execution fail when done by expanding the variable that contains its path as in both ways shown above?  It is important to me to run this file from expanding the variable (and not use an alias) because I need to run that script inside scripts (and aliases aren't good for that in the current release of Bash).

According to  and my own understanding, the tilde expands to the home directory:  $ echo ~ /home/braiam   Now, whenever I want the shell expansion to work, i. e. using variable names such $FOO, and do not break due unexpected characters, such spaces, etc. one should use double quotes ":  $ FOO="some string with spaces" $ BAR="echo $FOO" $ echo $BAR echo some string with spaces   Why doesn't this expansion works with the tilde?  $ echo ~/some/path /home/braiam/some/path $ echo "~/some/path" ~/some/path


I've been asked to prove that if $\begin{equation}\left|z\right| \le 1     , z \in \mathbb{C} \end{equation}$ then $$\begin{equation}\left|\frac{3z-i}{3+iz}\right|\leq1.\end{equation}$$  I've tried letting z = a +bi and using the fact that |z| = $\sqrt{a^2+b^2}$ and expanding the expression within the modulus brackets but I'm having trouble showing that the remaining fraction is less than or equal to one.  Any help would be much appreciated, I know this is a basic question but I can't seem to make the link between properties of complex moduli and how they solve this inequality.

This is the question I'm stumbling with:   When $|\alpha| < 1$ and $|\beta| < 1$, show that:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < 1$$    The chapter that contains this question contains (among others) the triangle inequalities:   $$\left||z_1| - |z_2|\right| \le |z_1 + z_2| \le |z_1| + |z_2| $$  I've tried to use the triangle inequalities to increase the dividend and/or decrease the divisor:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < \cfrac{|\alpha| +|\beta|}{\left|1-|\bar{\alpha}\beta|\right|}$$  But it's not clear if or why that would be smaller than one.  I've also tried to multiply the equation by the conjugated divisor $\cfrac{1-\alpha\bar{\beta}}{1-\alpha\bar{\beta}}$, which gives a real divisor, but the equation does not appear solvable.  Any hint would be much appreciated.


Is there an application to know which key is bound by which process and therefore not usable in another application?

What command line tools exist to list and manage X server grabs? (That's grab as in key and pointer grabs, i.e. restricting the use of a particular key or mouse button to a particular application, or constricting the mouse pointer to remain in a particular screen area.) I'm looking for a hypothetical xgrab utility that would show things like  Key     0x00f00ba5  0x123   0 Button  0x00f00ba5  2        Pointer 0x00abcdef     meaning that there has been a call to XGrabKey(display, 0x123, 0, 0x00f00ba5, ...) and so on with XGrabButton, XGrabPointer, XGrabKeyboard, XGrabServer (if possible). The display format doesn't matter, what I want is some way to see who's grabbing what, and possibly some way of revoking these grabs (if it's possible, I'm not sure if the X11 API allows that).


Can regular expression be utilized to match any string except a specific string constant (i.e. "ABC")? Is it possible to exclude just one specific string constant?

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


In my application written in C# , I am writing a SQL query. Following is the query   SELECT [Resource No_] where [Resource No_] In (@resources)    @resources is user input parameters having one or more that one strings.  My query is failing without showing an error  According to me, query is failing because in @resources parameter following is being passed  "'123,'124','125'"   (there are 2 inverted commas in the beginning and at the end and that is failing my query).  [Resource No_] is of type NVARCHAR in the database.  After Googling, I have found some help on this topic but all are applicable when [Resource No_]  is of type Integer

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


I already install Katoolin Package on my Ubuntu like below:    But the problem is when I want to use & install some package of it (ex. wifi Package) the error happens like this:  You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: libc6 : Breaks: locales (< 2.19) E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).     How can I fix that problem and use kali packages on ubuntu?  P.S: I did run apt-get -f install but an error happens again:  root@sky-Net:/home/sky-net# apt-get -f install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   libexo-common libexo-helpers libgarcon-common libkeybinder0 libvte-common   libvte9 thunar-data xfdesktop4-data Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   locales The following packages will be upgraded:   locales 1 upgraded, 0 newly installed, 0 to remove and 1358 not upgraded. Need to get 0 B/3,924 kB of archives. After this operation, 6,904 kB of additional disk space will be used. Do you want to continue? [Y/n] y Preconfiguring packages ... (Reading database ... 247658 files and directories currently installed.) Preparing to unpack .../locales_2.19-18_all.deb ... Unpacking locales (2.19-18) over (2.13+git20120306-12.1) ... dpkg: error processing archive /var/cache/apt/archives/locales_2.19-18_all.deb (--unpack):  trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.19-0ubuntu6.6 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/locales_2.19-18_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


I need to parse date from JSON (I can't do any change in this JSON on server).  { ... "time":"2014-02-14 18:37:48", ... }   In  it is: YYYY-mm-dd HH:ii:ss  I want to change date format, for example to "dd.mm.YYYY HH:ii". In PHP it is easy, but in JavaScript I do not know how to parse it.  I try , but I still do an error :-(  Can you please help me?

I'm taking my first crack at  with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:  /Date(1224043200000)/   From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success.  FYI: Here's the solution I came up with using a combination of the answers here:  function getMismatch(id) {   $.getJSON("Main.aspx?Callback=GetMismatch",     { MismatchId: id },      function (result) {       $("#AuthMerchId").text(result.AuthorizationMerchantId);       $("#SttlMerchId").text(result.SettlementMerchantId);       $("#CreateDate").text(formatJSONDate(Date(result.AppendDts)));       $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts)));       $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts)));       $("#LastUpdatedBy").text(result.LastUpdateNt);       $("#ProcessIn").text(result.ProcessIn);     }   );    return false; }  function formatJSONDate(jsonDate) {   var newDate = dateFormat(jsonDate, "mm/dd/yyyy");   return newDate; }   This solution got my object from the callback method and displayed the dates on the page properly using the date format library.


I have a Dell XPS 15 9560 (2017) with a GTX 1050 and I'm using Ubuntu with it. I've been trying to get hybrid graphics working lately to no avail. I have Nvidia proprietary drivers installed successfully but when I try to switch to Intel and log out, my screen will freeze when I try to log back in.  Some information:    BIOS: 1.3.1 Ubuntu: GNOME 17.04 - up to date nvidia drivers: 375 kernel: 4.11.2-041102-generic   Do I need to install a specific Intel driver? I've seen others post about the same issue with success on KDE (), is this an issue with gnome?

I have an acer laptop with these GPUs: - GPU0: Intel HD Graphics 4000 (M) (obviously integrated) - GPU1: NVIDIA GeForce GT 710M  I uninstalled all nvidia-drivers because I was experiencing a lot of bugs and I read here and there that they are not supposed to work with Optimus without either bumblebee or nvidia-prime.  As far as I understand, nvidia-prime would allow me to have the NVidia GPU always on. And to choose between that or always off (i.e. always use Intel)  So now I installed nvidia-prime with  sudo apt-get install nvidia-prime   What am I supposed to do now?  I thought nvidia-prime provided a graphical interface which would allow me to choose which graphic card to use, and even to install the needed nvidia drivers.  By typing "nvidia" in the dash, nothing shows up. From a terminal, the only command available starting with "nvidia" is "nvidia-detect" which just prints "none".  So, I installed nvidia-prime, how do I use it?


We support several deployments of an in-house application based on SQL Server. We've had a problem several times now where some query that used to be quick and small suddenly becomes very slow or erratic, while not necessarily producing more data or being run on a larger dataset. Every time this happens, it is a different query that suddenly starts running slowly.  Whenever this happens, we have to spend some development time to debug the problem, maybe write the query again and benchmark against the previous version, etc. Yet the original query often worked just fine for years, and we had no prior indication that its execution time might explode. What are some good practices that would prevent issues of queries randomly becoming slow? What I am after is not "how to fix a query that we already observe being slow", but how to reduce the likelihood of queries becoming slow in the first place—a proactive approach, as opposed to reactive.  I need a way to force SQL Server to not try to optimize the query too much: I don't really need fast, I need consistent.  If there were some choices to have SQL Server be conservative in building the query plan, as opposed to trying to take advantage of data distributions and such, I'd be after them.

[Salutations]  (check one)  [ ] Well trained professional, [ ] Casual reader, [ ] Hapless wanderer,   I have a (check all that apply)  [ ] query [ ] stored procedure [ ] database thing maybe     that was running fine (if applicable)   [ ] yesterday [ ] in recent memory [ ] at some point    but is suddenly slower now.  I've already checked to make sure it's not being blocked, and that it's not the victim of some long running maintenance task, report, or other out of band process.  What is the problem, what should I do, and what information can I provide to get some help?  [*Insert appropriate closing remarks*]


I purged about 100 GB on 200 GB SQL Server v11 DB. The MDF file still show about 200 GB in the file explorer.  Everything looks fine, first tests shows 50% time treatments increase and the backup's size are reduced.  Do you think shrinking is still interesting ? If yes what could be the best way ?   Release unused space, Reorganize pages before releasing unused space (shrink file to : X MB), Empty file by migrating the data to other files in the same filegroup.   Index Reorganize/Rebuild, then Update Stats is planned anyway after this operation.  Thanks for help

This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments?


Some of my friends and I are interested in starting a new Linux distro. How do we do that? What do we need to plan? Backstory I represent a community of Linux sysadmins/implementors whose special needs include, among others:  A specific 'lean' kernel config Package management that fits our 'field needs' Binary packages optimized for our 'use cases' X-less system  To the point: We have need of a specially-configured production-quality Linux distribution to be run exclusively as Para-Virtualized Production Servers. Rather than jumping through all the hoops and loops every time we need a VM-ized Server, we would very much like a semi-prepared system, optimized for its environment. Since these VMs would be Production Servers, stability is a must, and honestly the available package management systems we're currently aware of just do not provide assurance. Zypp and Conary are the closest ones to our needs, but again still miss on some points.

I wanted to have a go at creating my very own Linux Distribution. Could you suggest some nice and easy-to-follow tutorials (preferably text based and not videos). I have heard something about Arch Linux but I don't know how to go from there. What do I need?


What will be expected to do on a newly hired faculty member to start before a semester starts? No course to teach. Of course one can do their own research.  1.But is there any departmental need for the new hire to do during summer for example?   2.Will the school be willing to have new hires start 2 months before a semester starts?

The school I will be working at is a low-ranked R1 university.  Some people said, "just enjoy and have fun right now. It would be the last time you would ever have such enough free time".  But others said, "You should do research as much as you can before the school starts because you would not have enough time to do research for the first year because you would be busy with teaching for the first time as an instructor. You should start thinking about writing grant proposals or turning your dissertation into peer-reviewed publications."  Both seem to sound right to me, but are actually very opposite suggestions.  What did you do before you started your tenure-track assistant professor job and after you graduated your PhD? What do you recommend me to do for this summer?


I'm trying to add a new class to a given class without using GetElementById. My project has an array on the list, and each list creates dynamic classes like 0-test, 1-test, 2-testing, so on. Add a new class to a given class like ( 0-test active-test) class. I am trying to have some javascript properties, but it is not working properly. My code is:-   document.getElementsByClassName('0-test')[0].className += "active-test";   It's not working please tell me how to add a new class?

I have an element that already has a class: <div class="someclass">     <img ... id="image1" name="image1" /> </div>  Now, I want to create a JavaScript function that will add a class to the div (not replace, but add). How can I do that?


Reinhard Flohrwas born in Borkum, Germany in 1901 and served on a German sub tender, until being interred in Sweden, and then escaped to return to Germany.

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


You can see some values on all electronic devices like 5V,0.2/0.3A on mobile chargers.What do these values represent?what can we understand from them

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.


I have a homework in which:  we have this code:  #include <iostream> using namespace std; class Test {     int x;     char y; public:     Test() :x(0), y(0) { ; } }; int main() {     Test t;     //Do stuff!     return 0; }   and without adding getters and setters or using friend class we have to read x and y and also change them.  I searched and found these ways:  if there was a template function in my class I could say:  class Test {     int x;     char y; public:     Test() :x(0), y(0) { ; }     template<typename T>     void do_something() {//not necessarily void function         //Do some stuff      }; };  class a; // My specialization. template <> void Test::do_something<a>() {     cout << x << endl;     cout << y << endl;     // getting data      x = 5;     y = 'a';     // changing data     cout << x << endl;     cout << y << endl;     // getting data after changes we made }  int main() {     Test t;     t.do_something<a>();     return 0; }    and also the method, which I think is this question answer, is using pointers.  like this:  class Test {     int x;     char y; public:     Test() :x(0), y('0') { ; } }; int main() {     Test t;     int* ptr = (int*)&t;     cout << "x = " << *ptr << " y = " << (char)*(ptr + 1) << endl;     *ptr--;     //getting data     *ptr = 12;     ptr++;     *ptr = 65;     //changing data     ptr--;     cout << "x = " << *ptr << " y = " << (char)*(ptr + 1) << endl;     //getting data after changes we have made     return 0; }   or using reinterpret_cast and pointers:  struct pointer {     int x;     char y; };  class Test {     int x;     char y; public:     Test() :x(0), y('0') { ; } }; int main()  {     Test t;      pointer* p = reinterpret_cast<pointer*>(&t);     cout << "X = " << p->x << " Y = " << p->y << endl;     //getting data     p->x = 5;     p->y = 'a';     //changing data     cout << "X = " << p->x << " Y = " << p->y << endl;      //getting data from class after changing them with pointers     return 0; }   my questions are:   is such thing possible in other object oriented languages? does this mean access modifiers are useless? and is there anything we can do to prevent such thing to happen?

Disclaimer Yes, I am fully aware that what I am asking about is totally stupid and that anyone who would wish to try such a thing in production code should be fired and/or shot.  I'm mainly looking to see if can be done. Now that that's out of the way, is there any way to access private class members in C++ from outside the class?  For example, is there any way to do this with pointer offsets? (Naive and otherwise non-production-ready techniques welcome) Update As noted in the comments, I asked this question because I wanted to write a blog post on over-encapsulation (and how it affects TDD).  I wanted to see if there was a way to say "using private variables isn't a 100% reliable way to enforce encapsulation, even in C++."  At the end, I decided to focus more on how to solve the problem rather than why it's a problem, so I didn't feature some of the stuff brought up here as prominently as I had planned, but I still left a link. At any rate, if anyone's interested in how it came out, here it is:   (I suggest reading it before you decide that I'm crazy).


We have it for questions and answers (regular posts)    How come it doesn't exist for chat.    (I know that it is most likely less common to be uploading images to chat, however on certain chat rooms, images are uploaded frequently)  I find it very annoying when uploading to chat to have to start going through my folders on my pc to find the image, usually I have it right there on my desktop and it's very convenient to just Drag and drop  I think it's a much needed feature.

I think it will be a good idea if there is a drag and drop image posting in chat. User needs to follow many steps to upload an image using upload button.


My computer has 2 hard disks. The first one is for the win 10 os. The second one is for data storage. They were both gpt style drives. Since it was a very old system, I decided to get it formated . I gave the system to the service centre to format the first HDD and install Windows 10 there .I asked them to not even touch the second drive. However after I received the system from them , I noticed that the uefi option was not enabled in the bios  settings. Naturally, I saw that the windows installation was done on a legacy bios environment. I also noticed that the second HDD was still in gpt style.  What surprised me,was the fact that though the second HDD was still in gpt style while the first one was in mbr style (to support legacy bios), I could still access and modify files in the second HDD.  My question is: I had previously known that gpt drives are not supported on mbr system. So, why was I able to access the secondary HDD(which was in gpt while the system was now a legacy bios system)?

I have a shiny new 5TB WD Black and was hoping to use it as the OS System disc and for a fair number of audio production programs, Workstations, samplers, synthesizers and such. Moving from a 2TB. The new drive loses nearly 3 TB as "unallocated space" if run direct from the Win7 program disc. I reset the drive, initialized it in GPT, got back all 5 TB but can't put the OS there. Do any newer versions allow this or do I go backwards to a 4 year old 2 TB that's in the habit of crashing to bluescreen at least daily and use the new one for all programs but windows? (I'm backing the old drive up using Acronis in total as I type, (tired of rebooting ). Win 10 upgrades are free right now...will this change allow me to increase the storage on my system while using a new drive for the system? Old format has 2TB OS + programs, 3TB full of samples, 2 x 3TB as RAID backup system, too many usb drives to list when I need to empty stuff out......Thank in advance!


Can I fly from Miami to Tampa without a passport? I just have my foreigner ID from Paraguay. I don't have my passport with me. My ID has a picture and full name. In addition, I have my identification from school (Eckerd College).

I'm travelling within the US and am a British citizen. Can I travel without my passport and just show my UK driver's license instead?


I just discovered my debian server has been hacked. I noticed when I did apt-get update, it failed because /var/log/apt directory did not exist.  I investigated and found the following:   Almost all files in /var/log/ were owned by the group "smile". Most of /var/log files were zero bites and dated Oct 10 (presume time of attack) There was an empty file /var/log/apt (preventing directory apt) There was a new user on the server called "smile" with associated group. Ran rkhunter, gave warnings:   Possible rootkit: Xzibit Rootkit (web search returns probably false positive) Warning: Account 'smile' is root equivalent (UID = 0)  Neither ps ax| grep smile, or w or who showed anything   I then did   # userdel smile userdel: user smile is currently logged in # userdel -f smile   Then  # grep -R smile /var/log ./auth.log:Nov 20 03:02:05 server sshd[9228]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.  user=smile ./auth.log:Nov 20 03:02:07 server sshd[9228]: Failed password for smile from 211.... port 58701 ssh2 ./auth.log:Nov 20 04:20:32 server sshd[10819]: Invalid user smileing from 211.... ./auth.log:Nov 20 04:20:34 server sshd[10819]: Failed password for invalid user smileing from 211.... port 33223 ssh2   So I can assume the user/bot has been logging in multiple times.  I restored the permissions on /var/log, and mkdir /var/log/apt. I then did apt-get update; apt-get upgrade (it had been a while).  My questions are:    How can I investigate further to find out what the attackers did/changed? What else can I do to secure the server? Is it even possible or will I have to do a fresh install?    It is a head node on a small experimental cluster. It is doing NIS, NFS, Torque PBS and Ganglia and would be very inconvenient to reinstall.  Thank you

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


I had always been a Windows user, Three days ago, I decided to start working with Linux Ubuntu 18.04. I had read in forums that they recommend it to new users.I downloaded it and installed it.  I search AMD drivers for ubuntu 18.04 , but i find my AMD drivers only for old version on ubuntu.  Can you help and learn me how to install AMD graphics driver on ubuntu 18.04 step by step please. Thank you !!  lspci -nn | grep -E 'VGA|Display'  00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02) 01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] [1002:6900] (rev c3)

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


I'm trying to install my multifunction printer on Ubuntu. The printer is ok. But can't make Ubuntu recognize the scanner.  I tried with xsane, but doesn't detect any devices  It's a wireless multifunction, anyone know how?

I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner?


I'm working on a new computer language I call Robato. So far, I only have a design document, but I'd like to put it out there and see if anyone would be interested in joining the project. What Stack Exchange site would be the best for doing so? Also, what tag(s) could I use?

I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?


I am trying to learn about time complexity of an algorithm. My professor has pushed it beyond Big O and wants us to be able to derive an algorithm to a mathematical function. I am having a hard time conceptualizing how this is done and was looking for help. In my class notes, a selection sort algorithm was provided (as shown in the code below). The notes asked the following question: "Derive a function f(n) that corresponds to the total number of times that minIndex or any position of nums is modified in the worst case. Now the notes tell me the answer is f(n)= 1/2n^2 + 5/2n + 3. I was wondering if anyone could explain how this occurs.  My professor told us to count the operations in the inner loop and work our way out. so I believe that at worst case in the inner loop the if statement always executes, this would mean we run the loop n-i-1 times, I get these values by taking n (the boundary that the for loop has to be less than and subtracting it by the starting condition (i+1). Then I look at the outer loop and I see it goes from i until it reaches n-1, so it could be written as (n-1)-i or just like the inner loop, n-i-1. Looking further there are three modifications in the outer loop so we get (n-i-1)+3 ( could I write it as (n-i+2)?  The number of modification at the worst case for the inner loop: n-i-1  The number of modifications at the worst case for the outer loop: (n-i-1)+3  now I would like to know how do you go from counting the two different modifications done and becoming f(n)= 1/2n^2 + 5/2n + 3.   public static void selectionSort(int[] nums) {          int n = nums.length;         int minIndex;          for(int i = 0; i < n-1; i++) {             //find the index of themin number.             minIndex = i;              for(int j = i+1; j < n; j++) {                 if(nums[j] < nums[minIndex]) {                     minIndex = j;                 }                 int temp = nums[i];                 nums[i] = nums[minIndex];                 nums[minIndex] = temp;             }         } }

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


Can someone of you give me a solution for this?     Let $N\in \mathbb N$.   a) We define the map $\mathfrak F:(\mathbb C^N, ||\cdot||_2)\to(\mathbb C^N, ||\cdot||_2)$ by $$(\mathfrak F(x))_k := \frac{1}{\sqrt N}\sum_{j=1}^Nx_je^{2\pi i\frac{(j-1)(k-1)}{N}} \quad \forall k\in \{1,...,N\}$$    Show that $\mathfrak F$ is norm-preserving, i.e. $$||(\mathfrak F(x))_k||_2 = ||x||_2 \quad \forall k\in \{1,...,N\}$$    b) For $n,m \in \{1,2,...,N\}$ we define the entries of $M\in \mathbb C^{N\times N}$ by $$M_{nm} :=  \begin{cases} \frac{N+1}{2}, \quad \quad n=m \\ \frac{1}{e^{2\pi i \frac{m-n}{N}}-1}, \,\,n \neq m \end{cases}$$   Show that $1, 2, 3, ..., N$ are the Eigenvalues of M.


I've some trouble understanding how to interpret the ROC and it's area under the curve for a classification task.  In general, the higher the AUC the better the model can classify true as true and false as false, independently from the threshold value, correct?  If AUC = 1 you can say that there is a threshold where True positiv rate (Recall) is 100%, meaning all true observations are predicted as true and False Positive Rate is zero, meaning that there is no predicted true value that is actually false. Moreover the TPR is always 100% for every threshold, only the FPR increases. Is this correct?  What about imbalanced data? So if I have 95 data points of class 1 and 5 of class 2 and my classifier always predicts class 1, i would still have a accuracy of 95%. So I understand why the accuracy is not good for that case. But what about the AUC? Is it meaningful if I have imbalanced data? Would this classifier achieve a high or low AUC value? Does it matter which class i choose to be the "true" one?  I looked through some blogs. Some say yes, some say no. Can anyone explain it with an example for a better understanding?  Thank you! Cheers!

I just finished reading  discussion. They argue that PR AUC is better than ROC AUC on imbalanced dataset.   For example, we have 10 samples in test dataset. 9 samples are positive and 1 is negative. We have a terrible model which predicts everything positive. Thus, we will have a metric that TP = 9, FP = 1, TN = 0, FN = 0.  Then, Precision = 0.9, Recall = 1.0. The precision and recall are both very high, but we have a poor classifier.  On the other hand, TPR = TP/(TP+FN) = 1.0, FPR = FP/(FP+TN) = 1.0. Because the FPR is very high, we can identify that this is not a good classifier.  Clearly, ROC is better than PR on imbalanced datasets. Can somebody explain why PR is better?


This is the definition of $|A| <= |B| $: there exists an injective function from $A$ into $B$. Why it is defined that way and not like the following proposal, which is equivalent under the assumption of the axiom of choice: there exists a surjective function from $B$ into $A$.

In ZFC, a good way of ordering sets by cardinality is by leveraging the notion of an injection. We define: $$X \lesssim Y \leftrightarrow \mbox{ there exists an injection } X \rightarrow Y.$$  Alternatively, we can leverage the notion of a partial surjection, by which I mean a partial function that hits every point of its codomain at least once.  $$Y \succsim X \leftrightarrow \mbox{ there exists a partial surjection } Y \rightarrow X.$$  Now in ZFC, these approaches are equivalent, in the sense that $$X \lesssim Y \iff Y \succsim X.$$  But if we just consider ZF (that is, we drop choice) then the equivalence breaks down. However, we've still got the forward implication, because the converse of an injection is always a partial surjection.  A specific question. Define that two sets are weakly equipotent iff $X \succsim Y$ and $Y \succsim X$. Question: does weak equipotence imply genuine equipotence? I'm guessing "no."  A general question: In broad terms, how would the structure of the cardinal numbers in ZF be altered by adopting $\succsim$ rather than $\lesssim$ as the fundamental order relation, and taking equality of cardinal numbers to correspond to weak equipotence of sets? I'm guessing this would hide a lot of the (usually very complicated) structure of the cardinal numbers in ZF.  Remark. The order symbols can be written \lesssim and \succsim.


When I render a single image in Blender 2.83 with eevee or cycle it does it without any problem   But when i render an animation with eevee either in png (frame by frame) or in matroska (mp4) the result is always gray. the colors of the letters on the right side move using AnimAll add-on, I don't know if this has anything to do with it.

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


Frequently in Terminal (though I fully expect any answer will work in bash and most others), I type some command, and then get some sort of permission error due to missing sudo.  Okay, so press 'up', hold/hammer 'left', type sudo and hit 'enter'.  It's annoying. More so the longer the command was.  Note that missing sudo is worst case; a typo nearer the beginning than end is similarly annoying.  What I would like, is a way to perform a sort of 'up and home' keystroke. Actually, perhaps those two strokes will do it - but my Macbook keyboard doesn't have Home, so I cannot try.  Bonus points for a way to insert sudo and hit 'enter' auto-magically too, say by CMD+Shift+S.    Can this be done, or am I dreaming?

Usually, for some commands such as apt-get install xxx, I forget to add sudo first, then I need to retype it. What I want is in such cases, I just type a simple command, for example resudo. It will sudo my last command sudo apt-get install xxx. Is it possible in bash?


I am a dual major (Math+Physics) student from one of the reputed Indian University. I want to peruse PhD in physics (mainly theoretical/High Energy Physics). I have CGPA 9.6/10 in Physics but overall (Math+Physics) CGPA is 8/10. How do I improve my CV to get into good grad school in US/Germany etc? Any helpful comments/answer are welcome and thanks for that.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


According to the documentation found in , the force:createRecord is one of the out-of-the-box events to enable components to view or create a record.   The documentation says that its only available in Lightning Experience (LEX) or Salesforce1 (S1), HOWEVER, if you fire these events outside of LEX or S1 you have to handle the event and register the event. I couldn't find any good examples on how to do so and any help is greatly appreciated.   Essentially, my use case is be able to create a record for an object in a stand alone app, LEX or S1. Currently, I am able to create a record for just LEX and S1 but when I do so with a stand alone app, it does not fire.   Use out-of-the-box events to enable component interaction within Lightning Experience or Salesforce1, or within your Lightning components. For example, these events enable your components to open a record create or edit page, or navigate to a record.  If you fire one of these events in your Lightning apps or components outside of Salesforce1 or Lightning Experience:   You must handle the event by using the  tag in the handling component.  Use the <aura:registerEvent> or <aura:dependency> tags to ensure that the event is sent to the client, when needed.

I'm trying to use force:createRecord and it works okay in Lightning Experience, and S1 but but I get the following error message when I am using a stand alone app. If I preview the "sampleCreateRecordApp.app" I get the below error message:     "This page has an error. You might just need to refresh it. Action   failed: c:sampleCreateRecord$controller$createRecord [Cannot read   property 'setParams' of undefined] Failing descriptor:   {c:sampleCreateRecord$controller$createRecord}"   Below is the simple compoment I'm trying to get to work in a stand alone app (or lightning out). The   alludes that they can be used outside of LEX or S1   If I try to extend the application with extends="ltng:outApp" the application does not render at all. Any advice would be great. Thanks!  sampleLightningOutPage.page  <apex:page >       <script src="/lightning/lightning.out.js" />     <div id="sampleComponentDiv" />          <script>          $Lightning.use("c:sampleCreateRecordApp",function() {             $Lightning.createComponent(                 "c:sampleCreateRecord",                 {},                 "sampleComponentDiv"             );          });     </script> </apex:page>   sampleCreateRecordApp.app  <aura:application >     <c:sampleCreateRecord/>  </aura:application>   sampleCreateRecord.cmp   <aura:component implements="flexipage:availableForAllPageTypes">     <lightning:button variant="brand" label="Submit" onclick="{! c.createRecord }" />   </aura:component>   sampleCreateRecord.js  ({     createRecord : function (component, event, helper) {         var createRecordEvent = $A.get("e.force:createRecord");         createRecordEvent.setParams({             "entityApiName": "Contact"         });         createRecordEvent.fire();     } })


I just did an install of the hp laserjet P1102w printer and it's not working. I'm using Ubuntu 12.04, and I went to see if I had hplip installed and it said I did.  How do I set up this printer?

I have Ubuntu 14.04. I was using a HP Laserjet 6L which worked after strugling with it for several days. I now have HP LaserjetP1102w and I just cannot get it to print.  When I installed it the computer recognised it. I went to properties and tried to print test page but nothing happened. I rebooted computer but still nothing.  I looked at some other answers regarding similar problems but could not understand a lot of it.


How can make a continued fraction in the previous format?


I love the show, and was just wondering if any of the guys have gotten into a fight because of their awesome sense of humor.

Have the guys from the show Impractical Jokers gotten into any major trouble because of the nature of their show?   Eg: have they been physically assaulted or has anyone thrown a law suit on them?


I want to do the invert of an Inset: extruding new faces around an edge loop with the same distance everywhere like this image (in blue the new faces that i want to create):

Is there an operation similar to inset that creates faces in the opposite direction? That is, instead of creating faces inwards, they create faces outwards? A normal inset operation:  What I would like:


I recently attended a meeting where the speaker frequently used the phrase give it up for someone. I understand that this expression means to clap for the person or group mentioned. It is similar to give someone a hand.  Where did this phrase originate? I don’t exactly get why giving it up means clapping.

Well, now I understand that this is so, but the first few times I heard this, I had no idea what 'giving it up' meant.  What is the derivation? How do you get from 'giving it up' to 'clapping'?


I have a requirement where I need to Deserialize and Create few objects of a class(Table) which doesn't have a Default Constructor.  Snippet of my code   else if (reader.Name == "Tables") {     reader.ReadStartElement();     tables = SerializationHelper<Table>.DeserializeList(reader); }   The definition of DeserializeList in SerializationHelper is as below:  public static List<T> DeserializeList(XmlReader reader) {     XmlSerializer ser = new XmlSerializer(typeof(T));     List<T> returnval = new List<T>();     while (reader.NodeType != XmlNodeType.EndElement)     {         T result = (T)ser.Deserialize(reader);         returnval.Add(result);     }     return returnval; }   This is an existing working code and with recent changes we had to add a mandate parameter to all the Constructors in the Class  The Table class here doesn't have any Parameter-less Constructor now.  I wanted to find out if I can by anyway pass-on at-least one parameter when DeSerializing the Table objects.  I have already Read the following but they use JSON.net which in my case is not an option to use.

I'm writing code to do Xml serialization. With below function.  public static string SerializeToXml(object obj) {     XmlSerializer serializer = new XmlSerializer(obj.GetType());     using (StringWriter writer = new StringWriter())     {         serializer.Serialize(writer, obj);         return writer.ToString();     } }   If the argument is a instance of class without parameterless constructor, it will throw a exception.     Unhandled Exception:   System.InvalidOperationException:   CSharpConsole.Foo cannot be serialized   because it does not have a   parameterless constructor.    at   System.Xml.Serialization.TypeDesc.CheckSupported()   at   System.Xml.Serialization.TypeScope.GetTypeDesc(Type   type, MemberInfo sourc e, Boolean   directReference, Boolean throwOnError)   at   System.Xml.Serialization.ModelScope.GetTypeModel(Type   type, Boolean direct Reference)    at   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type   type , XmlRootAttribute root, String   defaultNamespace)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type, String defaultName space)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type)   Why must there be a parameterless constructor in order to allow xml serialization to succeed?  EDIT: thanks for cfeduke's answer. The parameterless constructor can be private or internal.


I would like my mesh to achieve similar shape (helmet) like this:    The mesh:  I know my mesh is far away from look like what I want, but I'm kinda newbie so I'm trying the best with what I got.  Without subsurf (just for let you know how it looks without it):    Base mesh with subsurf:      How can I get rid of those weird and ugly lines or achieve similar form?  Thank you for helping guys!, got something similar @Manu Järvinen , @Leander, @miceterminator

As a picture often speaks better than words, here are the two images of my problem. I'm trying to get a smooth render on this object. I tried many options but no way I always have these artifacts. Is it possible to have a smooth rendering with a convex surface?     Here what I'm trying to model


When running Gnome Software via the terminal, I get the following error message:     (gnome-software:6632): Gs-WARNING **: failed to open plugin   /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so:   /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: cannot open   shared object file: No such file or directory   Gnome Software opens fine, just when loading the page for any software, it just get stuck in the loading part, and does not display anything!  I just also installed the packagekit, put the same error persist!    Just in case this is not fixable by just tweaking, and installing, I submitted a bug report:

After plain installation of Ubuntu 16.04 LTS gnome-software doesn't work. It has opened once with GUI, but installation of Unity Tweak Tool didn't finish.  When starting again, GUI doesn't come up. When opening from terminal, a warning appears, but the application GUI doesn't open.  $ gnome-software (gnome-software:7052): Gs-WARNING: failed to open plugin /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: cannot open shared object file: No such file or directory   Does anybody have same experience, and eventually, a solution?    According to the recommendation:  $ dpkg-query -S /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so gnome-software: /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so   Proposed reinstall of gnome-software did not help.    As workaround, use Synaptic Package manager and command line.


I created an executable .desktop file in my Desktop which should launch a GUI application along with displaying an icon in dock, but in Ubuntu 17.10 icon is not displaying in dock:    In previous Ubuntu versions (14.04 to 17.04) I didn't face this issue.  In Ubuntu 17.10 no 3rd party applications with icons as executables are being launched by default, It's asking for trust and launch to proceed.     How can I give the launchers default execute permission, or whatever permission is needed to avoid getting this dialog?  The executable was created by compiling in Ubuntu 14.04 to support backward compatibility.  The .desktop file created to display the icon contains:  #!/usr/bin/env/ xdg-open  [Desktop Entry] Version=1.0 Type=Application Name=MDM Comment=MAVLDM Terminal=false X-Ubuntu-Gettext-Domain=example-content MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome; StartupNotify=false OnlyShowIn=GNOME;Unity; X-Desktop-File-Install-Version=0.20 Path=/home/ravi/Downloads/MDM Exec=/home/ravi/Downloads/MDM/MAVLDM Icon=/home/ravi/Downloads/MDM/mavldm.png   Is this changed in Ubuntu 17.10?

After upgrading to Ubuntu 17.10, Ubuntu Dock icons of some of my apps are not appearing. They appear properly in the dash. I verified the *.desktop files for the applications in /usr/share/applications and ~/.local/share/applications.  E.g. dock icon is not displaying for "Terminator". Check out the attached image.    This is how the icon for the same application appears in dash search:    Content of /usr/share/applications/terminator.desktop:  [Desktop Entry] Name=Terminator Comment=Multiple terminals in one window TryExec=terminator Exec=terminator Icon=terminator Type=Application Categories=GNOME;GTK;Utility;TerminalEmulator;System; StartupNotify=true X-Ubuntu-Gettext-Domain=terminator X-Ayatana-Desktop-Shortcuts=NewWindow; Keywords=terminal;shell;prompt;command;commandline; [NewWindow Shortcut Group] Name=Open a New Window Exec=terminator TargetEnvironment=Unity   Any pointers to debug this issue will be helpful.


What happens if I tap a  for its ability and the creature is destroyed in response with an ? And why? (a brief explanation will suffice)  This may sound as a silly question but the opinion between my friends is divided. Some think that the green mana is generated and the others say that the mana is not generated.

Player A taps  targeting Player B; its "deals 1 damage to target player" ability is placed on the stack.  Player B gets priority and responds with , targeting Goblin Fireslinger.  Both players pass priority. Snap resolves, and Goblin Fireslinger is returned to its owner's hand.  Does Player B still take 1 damage from Goblin Fireslinger's activated ability?  I know that if the creature had been killed/sent to the graveyard, the ability would still resolve, but I was told recently that because a player's hand is a private zone it couldn't. If anyone could confirm or deny this for me, it would be most appreciated.


The script below has the name notifyrssh.sh.  1:  File=/home/vaios/Desktop/tempcron/liveusers.txt    //OK 2:  cd /home/vaios/Desktop/tempcron                      3:  ps -aux | grep sshd > liveusers.txt                //OK file is being updated  4:                                                     //   every minute  5:  for name in gus tom max    //***crontab-problem***                          6:  do 7:     notify-send "$name" "DEBUG_MSG" 8:     if grep -q $name "$File"; then 9:             notify-send  "$name" "ONLINE" 10:    fi 11: done   The above script is being run in crontab. I open crontab list with :  crontab -e   And then i add the line :   * * * * * bash /home/vaios/Desktop/tempcron/notifyrssh.sh   Execution from shell prompt  The script seems to be executing fine when i run it regularly from the shell prompt. Being in the directory where the executable script is, i execute it like this :  ./notifyrssh.sh   ...and it works as i expect (updates the file liveusers.txt and gives me all the notification messages) . I again execute it like this :  bash /home/vaios/Desktop/tempcron/notifyrssh.sh   ...and again the results are correct (update file liveusers.txt etc and gives me the notification messages).  Execution from crontab, every minute  The problem when the script is being executed every minute by crontab begins from line 5 and onwards until the end. The file liveusers.txt is being updated regularly every minute (I check this with : cat liveusers.txt) but then it doesn't give me the notifications i expect.   Let me explain what the above script actually does:   In the first 3 lines it updates the file liveusers.txt with the contents of the command :  ps aux | grep sshd From line 5 onwards it checks a list of names (gus tom max) and then if it finds the name in the file liveusers.txt it gives me the notification message from line 9.  The notification message from line 7 is being put for debugging purposes exclusively. I expected that crontab script will give me at least the notofication from line 7 but that didn't happen also.   Any ideas?

Once upon a time,  DISPLAY=:0.0 totem /path/to/movie.avi   after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop.  Now it gives the error:   No protocol specified Cannot open display:    I reinstalled Debian squeeze when it went stable on both computers, and I guess I broke the config.   I've googled on this, and cannot for the life of me figure out what I'm supposed to be doing.   (VLC has an HTTP interface that works, but it isn't as convenient as ssh.)  The same problem arises when I try to run this from a cron job.


If I have a circuit that is designed for a ceramic, SMD, 0402, 1uF, 10%, 10V rated capacitor, and I swap in a ceramic, SMD, 0402, 1uF, 10%, 25V capacitor would anything change in the circuit?  Would the performance of the capacitor change in any significant or measurable way?

I understand that the capacitance of a ceramic cap is very dependent on the DC bias applied to the terminals.  At rated voltage, I've measured a decrease of up to 70%, and I've heard it can go higher.  That's two datapoints, one at zero voltage, and one approximate value at rated voltage.  For cases where the manufacturer doesn't make the derating curves available, I'd like to be able to estimate the derating required.  From a TDK app-note (app-video?  Do we have a name for these things, yet?), I grabbed this plot.  Smaller capacitance components suffer less capacitance change, higher voltage components suffer less capacitance change at the operating voltage, and (not shown) larger components suffer less capacitance change.   Source  TDK Tech Tube : DC Bias Effect on Multilayer Ceramic Capacitors (MLCC)  Is there a standard curve for this?  Something like how there's a standard capacitor discharge curve, for example.  I'd like to be able to fit to the datapoints and interpolate for an operating voltage somewhere below the rated voltage.  Are there other techniques, short of ordering the component and measuring, to estimate the capacitance at operating voltage?


My iPhone was stolen two month ago around 16 February 2019. I made sure it was in Lost Mode in iCloud and it was immediately in offline status when I opened iCloud.  I am positive the thief switched it off. Now I am 100% certain the Find my iPhone option was turned on on my iPhone, but will the "Lost Mode" be of any help if it was not turned on on the iPhone? Would it be showing "Offline" if I did not turn on the option?

My phone was stolen last night. I made sure it was in Lost Mode in iCloud and it was immediately in Offline status when I open iCloud. I am positive the thief switched it off. Now I am 100% certain the Find my iPhone option was turned on on my iPhone, but will the "Lost Mode" be of any help if it was not turned on on the iPhone? Would it be showing "Offline" if I did not turn on the option?


We learned in school that photons behave partly like a wave and partly like a particle, so they can be both at the same time. We also learned that light consists of alternating electric and magnetic fields that travel through empty space as seen in the picture below. So if you can always name the specific wave length of a quantum object, doesn't that necessarily imply that this object must be a wave?

I've read that light travels in a straight line and has a wavelength of 400nm to 700nm. But I don't understand why does it have a wavelength and what creates its wavelength? I agree with the concept of sound which also has wavelength, thus called sound waves which are created by the vibrational movement in air. I'm not aware of calling light a wave. Does the light vibrate too? If so, then how?


I could not find a definitive answer to this question.  When using U.S. (or US) in a sentence, would it be more appropriate to say: “The U.S. were founded” or “The U.S. was founded”  I know that the grammatical number of USA is widely accepted as singular, but could not find anything about U.S. (or, by extension, US).

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


i have done the following sample with to check my knowledge   import java.util.Map;  public class HashMap {     public static Map<String, String> useDifferentMap(Map<String, String> valueMap) {         valueMap.put("lastName", "yyyy");         return valueMap;     }      public static void main(String[] args) {         Map<String, String> inputMap = new java.util.HashMap<String, String>();         inputMap.put("firstName", "xxxx");         inputMap.put("initial", "S");         System.out.println("inputMap : 1 " + inputMap);         System.out.println("changeMe : " + useDifferentMap(inputMap));         System.out.println("inputMap : 2 " + inputMap);     } }   the output is :   original Map : 1 {initial=S, firstName=xxxx} useDifferentMap : {lastName=yyyy, initial=S, firstName=xxxx} original Map : 2 {lastName=yyyy, initial=S, firstName=xxxx}   this method useDifferentMap gets the map and changes the value and returns back the same. the modified map will contain the modified value and the scope of it is local for the useDifferentMap method.  my question is if java is pass by value is the modified value should not be affected in the original map.  so is java pass by value or pass by reference ???  thanks

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 need to write a script:  startdate = 2016-02-14 20:10:10  enddate =   2016-02-14 23:59:59 c= 1240 (minutes) d=10    r = ratio(startdate - enddate) / c;  d=d*r;   How to calculate the difference between the start date and the end date?

I am looking to calculate time difference between the two below  Value1=2016-10-13 14:19:23 Value2=2016-10-13 18:19:23    I want to get difference in the form of hours/minutes. Any quick solution available?.


I must have missed something important in the formulation of the problem. Can you please help clarify how should the following simple problem be formulated and where my mistake is. Let $Z = \frac{Y}{X}$ where $X, Y\sim U(0,1)$ and independent. Find $f_z(z)$, the pdf of $Z$. $P(Z \leq z) = P(\frac{Y}{X} \leq z) = \iint_A f_{X, Y}(x,y)dx dy $, where $A = \left\{(x,y) = 0\leq x\leq 1, 0\leq y\leq1, \frac{y}{x}\leq z \right\}$ $P(Z \leq z) = F_z(z) = \int_0^1(\int_0^{xz}1\cdot 1dy)dx = \int_0^1 zx dx = z\frac{x^2}{2}|_0^1 = \frac{z}{2}$ The above is only valid for $0 \leq Z \leq1$ or equivalently $Y \leq X $. Where step in my calculation did I introduce $Y \leq X $ ?

Supppse $X$ and $Y$ are standard uniformly distributed in $[0, 1]$, and they are independent, what is the PDF of $Z = Y / X$?   The answer from some probability theory textbook is  $$ f_Z(z) =  \begin{cases} 1/2, & \text{if } 0 \le z \le 1 \\ 1/(2z^2), & \text{if } z > 1 \\  0, & \text{otherwise}. \end{cases} $$  I am wondering, by symmetry, shouldn't $f_Z(1/2) = f_Z(2)$? This is not the case according to the PDF above.


I upgraded from Snow Leopard to El Captain.  Before upgrade I had a bootcamp partition, and a third FAT32 partition. this caused some complications in the upgrade process and I had to delete the El Captain recovery partition (as well as my FAT32 partition).  Now I have two partitions: El Captain in my macintosh partition, and windows in my bootcamp partition, and everything is working fine.   Just that I do not have the El Captain Recovery Partition. Is there a way I can create it manually ? So that just in case something goes wrong I can recover.  (I know about the recovery USB stick, but I want to have recovery on the same HDD)  EDIT: I re-installed the El Capitan. It went smooth. Now I have a 650MB recovery partition. Isn't it supposed to be 6 GB partition?   Thanks

For whatever reason, one of our macs didn't make a recovery partition when it upgraded to Lion.  Is it possible to add a recovery partition after the fact?     To be clear - on a normal mac, the recovery partition is hidden in both the Startup Disk system preference and the Disk Utility. You can only see it from the command line with a direct command, diskutil list or enabling the debug menu in Disk Utility. It also shows up if you boot with the option key held or if you successfully boot to recovery with Command-R a.k.a. ⌘+R during boot.  Warning - this question and answer ONLY APPLY to 10.7.x Lion - using the Lion installer to recreate recovery on newer OS can and will cause problems due to drivers not being present for newer OS and hardware.


How to enable syntax highlighting features in vi editor ? I am currently using ubuntu 16.10.  Here is the output of vi --version.   VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 22:32:42) Included patches: 1-1829 Extra patches: 8.0.0056 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by pkg-vim-maintainers@lists.alioth.debian.org Small version without GUI.  Features included (+) or not (-): +acl             -farsi           -mouse_sgr       -tag_any_white -arabic          -file_in_path    -mouse_sysmouse  -tcl -autocmd         -find_in_path    -mouse_urxvt     -termguicolors -balloon_eval    -float           -mouse_xterm     +terminfo -browse          -folding         +multi_byte      -termresponse +builtin_terms   -footer          -multi_lang      -textobjects -byte_offset     +fork()          -mzscheme        -timers -channel         -gettext         -netbeans_intg   -title -cindent         -hangul_input    +packages        -toolbar -clientserver    +iconv           -path_extra      -user_commands -clipboard       -insert_expand   -perl            +vertsplit -cmdline_compl   -job             -persistent_undo -virtualedit +cmdline_hist    +jumplist        -printer         +visual -cmdline_info    -keymap          -profile         -visualextra -comments        -langmap         -python          -viminfo -conceal         -libcall         -python3         -vreplace -cryptv          -linebreak       -quickfix        +wildignore -cscope          -lispindent      -reltime         -wildmenu -cursorbind      -listcmds        -rightleft       +windows -cursorshape     -localmap        -ruby            +writebackup -dialog          -lua             -scrollbind      -X11 -diff            -menu            -signs           +xfontset -digraphs        -mksession       -smartindent     -xim -dnd             -modify_fname    -startuptime     -xsmp -ebcdic          -mouse           -statusline      -xterm_clipboard -emacs_tags      -mouse_dec       -sun_workshop    -xterm_save -eval            -mouse_gpm       -syntax          -xpm +ex_extra        -mouse_jsbterm   -tag_binary       -extra_search    -mouse_netterm   -tag_old_static      system vimrc file: "$VIM/vimrc"      user vimrc file: "$HOME/.vimrc"  2nd user vimrc file: "~/.vim/vimrc"       user exrc file: "$HOME/.exrc"   fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-vY1bx1/vim-7.4.1829=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -DTINY_VIMRC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       Linking: gcc   -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux -lacl -lattr -ldl    I have tried :syntax on. Below is the error message of :syntax on  E319: Sorry, the command is not available in this version

I am new to Vim. I'm following  tutorials to help me learn to use it.  But some of my commands are not working, for example:  Capital W. f followed by a character. (To move to next same char.)   Why is this happening and how can I get these commands to work?


I found this problem at an elementary school festival and I've spent the last 30min making no progress whatsoever. I have a suspicion that the solution involves cleverly adding a line to the diagram, but can't find anything useful. Could somebody kindly provide a hint as to how to proceed?    (The question is to find $x$ and $y$)

The following is a geometry puzzle from a math school book. Even though it has been a long time since I finished school, I remember this puzzle quite well, and I don't have a nice solution to it.  So here is the puzzle:    The triangle $ABC$ is known to be isosceles, that is, $AC=BC$. The labelled angles are known to be $\alpha=\gamma=20°$, $\beta=30°$. The task is to find the angle labelled "?".  The only solution that I know of is to use the sine formula and cosine formula several times. From this one can obtain a numerical solution. Moreover this number can be algebraically shown to be correct (all sines and cosines are contained in the real subfield of the 36th cyclotomic field). So in this sense I solved the problem, but the solution is kind of a brute force attack (for example, some of the polynomials that show up in the computation have coefficients > 1000000). Since the puzzle originates from a book that deals only with elemetary geometry (and not even trigonometry if I remember correctly) there has to be a more elegant solution.


I want to show that   $$\operatorname{Ass}_R\left(\dfrac{R}{xR}\right)=\operatorname{Ass}_R\left(\dfrac{R}{x^3R}\right)$$  where $x\in R$ is a non-zero-divisor and non-unit element and $R$ is a Noetherian ring.  To proof this exercise, I've been used these two short exact sequences:  $$0\to\dfrac{R}{x^2R}\to\dfrac{R}{x^3R}\to\dfrac{R}{xR}\to0$$  and  $$0\to\dfrac{R}{xR}\to\dfrac{R}{x^3R}\to\dfrac{R}{x^2R}\to0.$$  From the first sequence we have:  $$\operatorname{Ass}_R\left(\dfrac{R}{x^2R}\right)\subseteq\operatorname{Ass}_R\left(\dfrac{R}{x^3R}\right)\subseteq\operatorname{Ass}_R\left(\dfrac{R}{xR}\right)\cup\operatorname{Ass}_R\left(\dfrac{R}{x^2R}\right)=\operatorname{Ass}_R\left(\dfrac{R}{xR}\right)$$  and second one gives us:  $$\operatorname{Ass}_R\left(\dfrac{R}{xR}\right)\subseteq\operatorname{Ass}_R\left(\dfrac{R}{x^3R}\right)\subseteq\operatorname{Ass}_R\left(\dfrac{R}{xR}\right)\cup\operatorname{Ass}_R\left(\dfrac{R}{x^2R}\right)=\operatorname{Ass}_R\left(\dfrac{R}{x^2R}\right).$$ So we have the equality.

Let $A$ be a Noetherian ring and let $x \in A$ be an element which is neither a unit nor a zerodivisor. Why the ideals $xA$ and $x^{n}A$ (where $n \in \mathbb{N}$) have the same prime divisors? i.e. $$\operatorname{Ass}(A/xA) = \operatorname{Ass}(A/x^{n}A).$$  (Matsumura, Commutative Ring Theory, Exercise 6.3)


I keep getting this messages :  W:Failed to fetch gzip:/var/lib/apt/lists/partial/ph.archive.ubuntu.com_ubuntu_dists_trusty_multiverse_source_Sources  Hash Sum mismatch W:Failed to fetch gzip:/var/lib/apt/lists/partial/ph.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-i386_Packages  Hash Sum mismatch E:Some index files failed to download. They have been ignored, or old ones used instead.

When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead.


If I have to sacrifice a creature every beginning of my upkeep and I play , will I get past the sacrifice?  Thanks

If i have two cards that force opponents to sacrifice every upkeep like for example  "At the beginning of each opponent’s upkeep, Mogis deals 2 damage to that player unless he or she sacrifices a creature."  And  "At the beginning of your upkeep, draw a card unless target opponent sacrifices a creature or pays 3 life."  Does the oppenent have to sacrifice twice? Or if they sacrifice Mogis's ability have they not allowed me to draw from indulgent tormentor?


I need to find all values of $a,b>0$ for which the series converge. I know that a geometric series converges if $|r| < 1$ but how can I find all the values for which the series converges in general?  $$ \sum_{n=0}^{\infty}(a^{n} - b^{n}) $$

We let a>0 and b>0 and  we have $\sum_{n=0}^{\infty}b^n-a^n$. We have to find all values a,b>0 where $\sum_{n=0}^{\infty}b^n-a^n$ is convergent. I think I can use that $$\sum_{n=0}^{\infty} b_n < \infty , \sum_{n=0}^{\infty} a_n < \infty \implies \sum_{n=0}^{\infty} (b_n-a_n) < \infty. $$. And I think $\sum_{n=0}^{\infty}b^n$ and $\sum_{n=0}^{\infty}a^n$ is convergent if a<1 and b<1? It will make sense. But how can I show it?


Why is the button used to start a bounty located below the comment thread, rather than just underneath the question with the other collection of links? This would make it much easier to find, as well as ensure that it appears in the same place on every question, regardless of the length of the comment thread.

Can we please move the  "Start a bounty" link to be in the same location as all of the other action buttons? It makes no sense to me for this to be buried after the comments - It's an action on the Question. It can be very difficult to locate, especially when your question gets .  I don't think this should be that difficult to implement - it's just moving the location of a design element. Can we please get this button moved?


I have a query like this:  SELECT      MCU.UserName     ,MCU.McUserId AS UserId     ,O.OrderId     ,PD.ProductId     ,O.ShippingId     ,PD.[Name] AS ProductName     ,O.OrderDate     ,O.Total     ,O.Subtotal     ,O.PaymentStatus     ,O.OrderNumber     ,O.[Type]     ,O.CreatedBy     ,O.ModifiedBy      FROM SecurityMc.McUsers AS MCU      INNER JOIN Store.[Order] AS O ON  MCU.McUserId = O.UserId      INNER JOIN Store.OrderItem AS OI ON O.OrderId = OI.OrderId      INNER JOIN Customer.Shipping AS CS ON O.ShippingId = CS.ShippingId      INNER JOIN Product.ProductDetail AS PD ON OI.ProductId = PD.ProductId      WHERE  O.[Type] = 'Order' AND O.IsDeleted = 0 AND 1 = LanguageId    It returns data like:  +--------+---------+-----------+-------------+ | UserId | OrderId | ProductId | ProductName | +--------+---------+-----------+-------------+ |      1 |       3 |         1 | Dress       | |      1 |       3 |         2 | Boots       | |      1 |       3 |         3 | Socks       | |      1 |       3 |         4 | Extension   | +--------+---------+-----------+-------------+   As you can see it returns one ProductName for each row, but I want to send it in just one array, as you can see it have same OrderId and UserId, its possible to concat ProductName if OrderId is the same and get something  like:  ProductName(1 column): Dress,Boots,Socks,Extension  How can I achieve it? Regards

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


I am getting the following error on my terminal   E: The package libllvm3.8 needs to be reinstalled, but I can't find an archive for it.  when I try to run apt-get install or apt-get upgrade. Please help. Thanks in advance.

Running Synaptic I get the following error message:  E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report.   Upon accepting the message, Synaptic quits.


Let $A_1, A_2$ be closed subspaces of a Banach space $B$ such that $A_1 \cap A_2 = \{0\}$ and:  $\inf\{\|x-y\|:x\in A_{1}, y\in A_{2}, \|x\|=\|y\|=1\}>0$  Show that $A_{1}+A_{2}$ is closed.    I'm completely lost on how to use the infimum assumption given. I know of a similar result for metric spaces, in where if we have a compact set $A$ and a closed set $B$ with trivial intersection, then we must have that $d(A,B)>0$. As well, I'm not sure on how to use the fact that the space is Banach. I was thinking of taking a sequence $x_n+y_n \to z$ and then showing $z \in A_{1}+A_{2}$, first by showing that the component sequences $x_n$ and $y_n$ are Cauchy, and then using completeness (i.e. closed subsets of a complete vector space) to find that $z=x+y$ for some $x\in A_1, y\in A_2$.  What would be the best/simpler way to solve this problem, preferably avoiding quotient spaces? Thanks for the help.

Let $X$ be a banach space, and let $A$, and $B$ be closed linear subspaces. Assume that $$\inf\{\|x-y\|\mid x\in A, y\in B, \|x\|=\|y\|=1\}>0$$  I want to show that $A+B$ is closed.   I was thinking of doing something like, let $z$ be a limit point of $A+B$, then there exist $z_n\in A+B$ such that $z_n\rightarrow z$, each $z_n$ can be written as $a_n+b_n$. Then I wanted to do something along the lines of determining whether $a_n$ and $b_n$ have a limit (if they do, then call them $a$ and $b$ and then $a\in A$, $b\in B$, and $z=a+b\in A+B$), but I can't seem to be able to use the condition given.   I am studying for a qual, so you can go ahead and either give a solution or sketch it.


I am searching a command-line tagging tool that supports ogg- and mp3-tagging and allows to add a picture to the tags.  Currently I use  but that does not support pictures.  is the tool I use before but it is lacking picture support as well.

Is there a way to read the mp3 tags of a file from the shell? Something like:  mp3tags MyFile.mp3 author should output the author-tag of an mp3-file.


Let's say I have this commandline:  ~/development/company/folder:   and i run this command  ./gradlew appRun   then my command line looks like this:  ~/development/company/folder: ./gradlew appRun   Now, if there is an error and there is a bunch of output, then i need to scroll up and, because unix just formats everything the same, it's real easy to get all the lines and commands mixed up.  What I would like is for each command I enter to be like, bright red or bold or something, and all the output from that to be white or whatever it currently is.   How do i do that?

There are a number of tutorials/posts online (e.g. ) about how to customize your prompt in bash by setting PS1.  Is there a way to customize the color/bolding of the command I type?    In other words, as an example lets say that I wanted a green prompt, a bold blue command, and then output in whatever colors would be default.  In the example below, I already know how to make "joe>" show as green, blue, bold, whatever by setting PS1.  But is there a way I can I make git status show as bold for example?  joe> git status # On branch master # Your branch is ahead of 'origin/master' by 2 commits. # ...


I am kind of new to blender and I was working on a player model. I ran into a problem where I dont have faces on the arm pit. I dont know how to fill them in... I am really sorry if this is a dumb question.

I have this bit of wall here:    As you can see, it is a window frame and I want the hole between the wall and the frame to be filled. I have searched it on youtube and so on but all I can find is tutorials for creating circular holes...  Thanks for help!


I know there are several ways to do this. Such as:  #include <stdio.h>  int main()  {        if (printf("Hello"))         return 0; }   But, how do I do this by removing the semicolon after return 0; as well?  Considering the fact that I can't use void as the return type of main()  Even this article below ignores this fact and skips return 0; statement though the return type of main() is int:

I'm working on a C-brain teaser:  Write the standard Hello-World program, without semi-colons.  My best answer so far is:  int main(void) {     if (printf("Hello World!\n"), exit(0), 0)     {         /* do nothing */     } }   But I don't understand why I don't get compiler error (Visual Studio):  error C4716: 'main' : must return a value   I've tried other functions with a return-type declared, but missing a return-statement, and get this compiler error.    Note that I've also tried:  int foo(void) {     if (printf("Hello World!\n"), exit(0), true)     {         /* do nothing */     } }  int main(void) {     foo(); }   And don't get a compiler error on foo.  If I remove the "exit(0)", I do get the compiler error.  Apparently the compiler has knowledge that "exit" is a special function?  This seems very odd to me.


$R=\left\lbrace\left.\begin{bmatrix}a & -b\\b&a\end{bmatrix}\,\right|  a, b\in \mathbb{R}\right\rbrace$  $(R,+,\cdot)$  is ring with binary operation $+$ and $\cdot$ ,  Give me a hint to show that $R$ is isomorphic to $\mathbb{C}$ where  $(\mathbb{C},+,\cdot)$ is the ring of complex numbers with binary operation $+$ and $\cdot$.

I have been trying to prove this, but I am having trouble understanding how to prove the following mapping I found is injective and surjective. Just as a side note, I am trying to show the complex ring is isomorphic to special $2\times2$ matrices in regard to matrix multiplication and addition. Showing these hold is simple enough.  $$\phi:a+bi \rightarrow \begin{pmatrix} a & -b \\ b & a \end{pmatrix}$$  This is what I have so far:  Injective: I am also confused over the fact that there are two operations, and in turn two neutral elements (1 and 0). Showing that the kernel is trivial is usually the way I go about proving whether a mapping is injective, but I just can't grasp this.  $$ \phi(z_1) = \phi(z_2) \implies \phi(z_1)\phi(z_2)^{-1} = I = \phi(z_1)\phi(z_2^{-1}) = \phi(z_2)\phi(z_2^{-1}).$$  So if we can just show that the kernel of $\phi$ is trivial, then it also shows that $z_1 = z_2$. The only complex number that maps to the identity matrix is one where $a = 1$ and $b = 0$, $a + bi = 1 + 0i = 1$.  Using a similar argument for addition we can just say that the only complex number $z$ such that $\phi(z) = 0\text{-matrix}$, is one where $a=0$ and $b=0$, $a+bi=0+0i=0$.   Surjective:  I forgot to add this before I posted, but I honestly don't really understand how to prove this because it just seems so obvious. All possible $2\times2$ matrices of that form have a complex representation because the complex number can always be identified by its real parts and since the elements of the $2\times2$ matrix are real then the mapping is obviously onto.  I have always had trouble understanding when I can say that I have "rigorously" proved something, so any help would be appreciated!


I think the question is clear.  Let me rephrase it.  In a function, there are two different sets of calculations. I want the function to return both "a" and "b". (both have same type(struct) but, a could be *pointer, whereas b could be **pointer)  But from what I am aware of is, that I can only return one.  Im not so familiar with class. but I know that with class u can get both back by doing something like x.a (returns a) and x.b (returns b).  Is there any to do this just in a function?

Is there a preferred way to return multiple values from a C++ function?  For example, imagine a function that divides two integers and returns both the quotient and the remainder.  One way I commonly see is to use reference parameters:  void divide(int dividend, int divisor, int& quotient, int& remainder);   A variation is to return one value and pass the other through a reference parameter:  int divide(int dividend, int divisor, int& remainder);   Another way would be to declare a struct to contain all of the results and return that:  struct divide_result {     int quotient;     int remainder; };  divide_result divide(int dividend, int divisor);   Is one of these ways generally preferred, or are there other suggestions?  Edit: In the real-world code, there may be more than two results.  They may also be of different types.