Slot Machine GUI JButton Not Implementing on JTextField

Our goal is to create a slot machine with 2 panels and it seemed that the button is not working and not displaying anything in the text field on the panel. The text field in the panel should display the random number generator when the button is clicked. I tried the Action Listener code but it is not doing anything as well. Please help! Thank you!  package slotMachineMain;   import java.awt.Color; import java.awt.Dimension; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Random;  import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField;    public class slot1 extends JFrame implements ActionListener {          JButton button1;     JTextField text1;          slot1(){                  Image icon = Toolkit.getDefaultToolkit().getImage("D:\\11.png");         ImageIcon image1 = new ImageIcon("D:\\12.png");         ImageIcon image2 = new ImageIcon("D:\\13.gif");         ImageIcon image3 = new ImageIcon("D:\\14.png");                   this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         this.setTitle("Take your Chance Here!");                  JLabel label1 = new JLabel();         label1.setIcon(image1);         label1.setBounds(120, 10, 138, 87);                  JLabel label2 = new JLabel();         label2.setIcon(image2);         label2.setBounds(0, 0, 400, 290);                   JTextField text1 = new JTextField();         text1.setPreferredSize(new Dimension(80,80));         text1.setEditable(false);                  JTextField text2 = new JTextField();         text2.setPreferredSize(new Dimension(80,80));         text2.setEditable(false);                   JPanel panel1 = new JPanel();         panel1.setBackground(Color.white);         panel1.setBounds(83, 100, 90, 90);         panel1.add(text1);                  JPanel panel2 = new JPanel();         panel2.setBackground(Color.white);         panel2.setBounds(207, 100, 90, 90);         panel2.add(text2);                  JButton button1 = new JButton();         button1.setBounds(152, 200, 75, 25);         button1.setIcon(image3);         button1.addActionListener(this);                  this.setResizable(false);         this.setSize(400, 290);         this.setLayout(null);         this.setIconImage(icon);         this.add(panel1);         this.add(panel2);         this.add(button1);         this.add(label1);         this.add(label2);         this.setVisible(true);      }      @Override     public void actionPerformed(ActionEvent e) {         Random rn = new Random();          if(e.getSource()==button1) {             text1.setText(Integer.toString(rn.nextInt()));         }              }  }


Markdown: Code directly after a list (and not as part of that list)

Sometimes, when I answer a question, I use a list to explain things and add some code after that, for example:  argument 1 is hoppa  argument 2 is klap  argument 3 is klap command hoppa klap klap   The command however is not formatted correctly on Stack Overflow. When I add a line between them (which basically does not mean anything)  argument 1 is hoppa argument 2 is klap argument 3 is klap  blah blah: command hoppa klap klap  The code is formatted correctly. Adding two spaces extra, will produce code that seems part of the last list item, which is not what is meant.  argument 1 is hoppa  argument 2 is klap  argument 3 is klap command hoppa klap klap    The question is closed with a referral to a completely different question: that of nesting code in a list. Also some comments point to that. This question is not about nesting code in a list. If you look at the accepted answer, you will also see that this is not the case.


how columns ordering in sql server database table impact performance?

As I read about database design from logical model to physical databases, I noticed that the column ordering may need to be changed the sequence recorded in the logical data model. The DBMS is SQL Server.My question is how columns ordering in sql server database table  impact performance ?  Thank you so much for answering! I REALLY APPRECIATE IT.


Do I really need to scroll through 1000 answers?

EDIT: Apparently someone has brought this up before , dating back to 2014. It was status declined because 'you should read all answers before answering' and 'Sandbox questions' like what I am talking about are edge cases to the system. Well I would disagree that on sites like Code Golf that gets well received with answers you absolutely don't need to read the other answers and some questions get a lot of answers.. so for basically any question on Code Golf we're forcing this bad functionality. I would like to revisit the issue if possible.   I was on Code Golf meta using the iOS app and was going to post a proposed challenge in the . I couldn't find how to add an answer.  I realized its at the very bottom of every other answer, checked by going to another question.    So do I really need to scroll through 1000+ answers before I can add my own? Is there no way to add an answer without scrolling to the absolute bottom? Should there be a way to if there's not? As it is I would be scrolling for a while..   For the record I don't just 'go into desktop mode on Chrome' because I actually prefer using the mobile app for writing questions and answers especially with the recently added functionality making drafts easier. Also I know the buttons in the top right go to the next and previous question. It doesn't change anything except for asking then 'do I need to tap 1000 times'. Disclaimer: this question was wrote with the iOS app.


Is it possible to make such code work?:      private List<Type> Models = new List<Type>()     {         typeof(LineModel), typeof(LineDirectionModel), typeof(BusStopTimeModel), typeof(BusStopNameModel)     };      foreach (Type model in Models) // in code of my method     {         Connection.CreateTable<model>(); // error: 'model' is a variable but is used like a type     }   Thanks in advance


Mistake in Calculating Area or a Bug in QGIS?

I am trying to calculate the area of a polygon following the step by step mentioned in all the questions related to this issues in this website. Nonetheless, the result of the area calculation is about 6.1 and of course it is wrong cause I was expecting something more than 50000 km². I don't know if I am mistaking in some point or there is a bug in the qgis version I have. I have:   changed the layer projection to UTM (In this case is UTM 23); changed the project layer projection to UTM; calculated in attributes/field calculator/geometry/$area.   Still the result is something weird. This is the polygon I am working


I am very sorry that I deleted my previous post on this same topic and specially to @lhf, since I forced him/her to delete his/her answer.     Prove that the product of two infinite cyclic groups is not infinite cyclic.   The part I did:  $G=<a>$ and $G'=<b>$. The product group is $G\times G'$, where mulplication rule is $$(a^{k_1},b^{l_1}),(a^{k_2},b^{l_2})\rightsquigarrow (a^{k_1+k_2},b^{l_1+l_2})$$ where $k_1,k_2,l_1,l_2\in \mathbb{Z}$  Now suppose the cyclic group $G\times G'$ is generated by $(a^k,b^l)$  Then for any $m,n\neq 0$, $(a^m,b^n)=(a^{ku},b^{lu})\Rightarrow \frac{k}{l}=\frac{m}{n}$, which can not be true since $k,l$ are fixed and $G,G'$ are infinite cyclic group.  But then I am stuck. What should be the lat argument to end this proof!


Camera motion tracking: How to adjust to make the solve < 0.5?

I am trying to understand how to best approach adjusting a camera track to get the error down to something < 0.5 px  Video clip is 141 frames, HD There are 8 markers/tracks All of these tracks look good when I visually inspect them  The solve gives me 2.48 px and the the graph, tells me that some of the tracks have errors around 3-5. I can't visually see why it is so:  If I select one of the tracks, "Track.001":  and follow that during the 141 frames, I dont see why it is so bad, see this video:  The "quick view", in the top right, its just a "mush", not clear at all, so it is hard to use, but from what I can tell, the track is on point. If someone is interested in helping a newbie out, I can upload the PNG files (248 MB) and the project file. ---- EDIT ---- After adding about 4 more tracks, the error goes up to 169.09 px. When testing different "Refine" options, no change. The weirdest thing is that I can see the "per frame average error" (blue line below), but when looking for a blue line per track, there is none:


Let $C[0,1]$ be the set of all continuous function from $[0,1]$ to $\mathbb R$.  Is the cardinality of $C[0,1]$ larger than or equal to that of $\mathbb R$?


The issue is basically this - where should I mount SSD and where should I mount the HDD if what I want is the system to be installed on the SSD, but new software installed through apt-get and such will be installed on the HDD.  Assuming this setup is possible of course.   suggests moving parts to the HDD is possible but does not specify how.  My specific case is I've installed ubuntu on a multiboot machine, mounting a 10GB ssd partition on root(may be a bit too small in retrospect), and HDD on /home. But it seems I'm filling up the ssd partition quicker than I wanted as everything seems to be installed there.   is on the same topic but does not mention where applications are typically installed and does not suggest where to mount HDD for new applications to be installed there.


How to take backup of all installed APKs from Phone to PC?

How do I take backup of all installed apks from my sgs2 to PC using android sdk/ 3rd party tool etc? My phone is not rooted. I can install/uninstall apks using adb, but is there any similar command line tool to take backup of the same?


Does replacing $\ge$ by $>$ lead to a strictly inequality too? (integral inequality)

I know that if $f:[a,b] \to \mathbb{R}$ is an integrable function such that $f(x) \ge 0,~\forall~x \in [a,b],$ then $$\int\limits_a^b f(x) \mathrm{d}x \ge 0.$$  What happens if we replace the condition $f(x) \ge 0$ by the condition $f(x)>0$? Will the last inequality be also strict?  I tried to use Riemann sums but taking the limit turns $>$ into $\ge$.


Question concerning Subject-Verb Agrement

Please consider the following sentences: He is one of the best players who has played for India. Can I use a singular verb if I am referring to the "one" of many? He is one of the best players that have played for India. Does this sentence mean that I am referring to all the great players who have played?


Let $M^{\prime}\xrightarrow{f}M\xrightarrow{g}M^{\prime\prime}\rightarrow 0 \DeclareMathOperator{\Hom}{Hom}$ be a sequence of $A$-modules and homomorphisms. I want to show that the sequence is exact if and only if for all $A$-modules $N$, the sequence $$0\rightarrow \Hom(M^{\prime\prime},N)\xrightarrow{\overline{g}} \Hom(M,N)\xrightarrow{\overline{f}} \Hom(M^{\prime},N)$$ is exact.  I have shown that $M^{\prime}\xrightarrow{f}M\xrightarrow{g}M^{\prime\prime}\rightarrow 0$  is exact implies $0\rightarrow \Hom(M^{\prime\prime},N)\xrightarrow{\overline{g}} \Hom(M,N)\xrightarrow{\overline{f}} \Hom(M^{\prime},N)$ is exact for all $A$-modules $N$.   Now suppose for all $A$-modules $N$, $0\rightarrow \Hom(M^{\prime\prime},N)\xrightarrow{\overline{g}} \Hom(M,N)\xrightarrow{\overline{f}} \Hom(M^{\prime},N)$ is exact. I want to show that $M^{\prime}\xrightarrow{f}M\xrightarrow{g}M^{\prime\prime}\rightarrow 0$ is exact. That is I have to show $g$ is onto and $\ker(g)=\operatorname{Image}(f)$. In Atiyah Macdonald's Commutative Algebra, it is written that since $\overline{g}$ is injective for all $A$-modules $N$, therefore $g$ is onto. But I could not understand it. Any explanation will be appreciated.


Bachelors in computer science and wanting a masters?

I graduated with a 2.98gpa in computer science with a minor in math. I am currently employed as a software engineer and I am wanting to go back to school for a masters degree. I would really like to Perdue a professional engineering masters and take the PE(professional engineering exam) after I graduate.  Is it even possible to go from a computer science bachelors degree to a masters program in systems engineering or computer engineering?  I am currently looking at the university of Alabama in Huntsville. I want a masters degree, but I don't specifically care to stick with computer science. I am wanting to broaden my horizons and prepare myself for a role in management in the future.


What do the --frontend and --mode options for do-release-upgrade do?

From the :        -m MODE, --mode=MODE               Run in a special upgrade mode. Currently "desktop" for regular upgrades of               a desktop system and "server" for server systems are supported.  That's fairly useless documentation. What do these modes mean? What is "special" about either of them? What is the default, and does it relate in any way to whether we're running Ubuntu Server or Ubuntu Desktop edition?        -f FRONTEND, --frontend=FRONTEND               Run the specified frontend  That's even less helpful. What's a frontend? What frontends are available, and how do they differ?


got weird email with server data. Does this mean I got hacked?

I just got the following "undelivered message" to my postmaster@mydomain.com  Does this mean someone might have tried to (or succeeded in) hacking me?  (I replaced certain parts in the below for privacy purpose, it's not exactly 100% the original I received here.)  This is the mail system at host mydomain.com.  I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.  For further assistance, please send mail to <postmaster>  If you do so, please include this problem report. You can delete your own text from the attached returned message.                     The mail system  <ubahreasons@yahoo.com>: host mta7.am0.yahoodns.net[98.138.112.35] said: 554     delivery error: dd Sorry your message to ubahreasons@yahoo.com cannot be     delivered. This account has been disabled or discontinued [#102]. -     mta1303.mail.ne1.yahoo.com (in reply to end of DATA command)    Reporting-MTA: dns; mydomain.com X-Postfix-Queue-ID: 684A933780CC X-Postfix-Sender: rfc822; root@mydomain.com Arrival-Date: Tue, 14 Oct 2014 21:16:56 +0200 (CEST)  Final-Recipient: rfc822; ubahreasons@yahoo.com Original-Recipient: rfc822;ubahreasons@yahoo.com Action: failed Status: 5.0.0 Remote-MTA: dns; mta7.am0.yahoodns.net Diagnostic-Code: smtp; 554 delivery error: dd Sorry your message to     ubahreasons@yahoo.com cannot be delivered. This account has been disabled     or discontinued [#102]. - mta1303.mail.ne1.yahoo.com   ForwardedMessage.eml Subject: TESTING - 2012 From: root@mydomain.com (root) Date: 10/14/2014 9:16 PM To: ubahreasons@yahoo.com  #############################iNFOS############################# #############################FOR YOU############################# Linux servername 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux uid=0(root) gid=0(root) context=system_u:system_r:initrc_t  #############################SSH iNFOS############################# #############################FOR YOU############################# #UsePAM no UsePAM yes PermitRootLogin  #GatewayPorts no #ListenAddress 0.0.0.0 #ListenAddress :: #############################SHADOWFILE############################# #############################SHADOWFILE############################# root:$1$H4zwKrgL$NA37jPGoTCiPA0mrq/OKq/:15231:0:99999:7::: bin:*:15431:0:99999:7::: daemon:*:15431:0:99999:7::: info:$1$dO1pvRG.$DZUXjGeS4NgDpGNCwX.0b0:14241:0:99999:7:::::: postmaster:$1$gW7jPsgB$dh09VlQ/W0FALpPlR1fPt/:16127:0:99999:7::: ... more stuff like that  #############################iPS############################# #############################iPS#############################           inet addr:111.11.111.11  Bcast:111.11.111.11  Mask:255.255.255.0           inet6 addr: ff11::11ff:11ff:ffff:1111/64 Scope:Link           inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host #############################USERS WITH SHELL############################# #############################USERS WITH SHELL############################# root:x:0:0:root:/root:/bin/bash shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash ... some more stuff like the first three lines   I am not the most experienced, so if anyone can give me suggestions on what this means and what to do next... thanks!  Update:  At the time of the breach I have the following in my httpd log file:  80.65.51.220 - - [14/Oct/2014:21:56:52 +0200] "POST http://80.65.51.219:6667/ HTTP/1.0" 302 225 "-" "-" 80.65.51.220 - - [14/Oct/2014:21:56:52 +0200] "CONNECT 80.65.51.219:6667 HTTP/1.0" 302 225 "-" "-" 80.65.51.220 - - [14/Oct/2014:21:56:52 +0200] "PUT http://80.65.51.219:6667/ HTTP/1.0" 302 225 "-" "-"   Otherwise I couldn't find anything suspicious.  Any further suggestions on anyone having seen something like this before, leave a comment or an answer. Thanks!


Limit (Cut-off) number returned by function 'count(*)' in MySQL

When I try this in MySQL:     select make,count(*) as num from TABLE where num > 100  group by   make   I got:   Error Code: 1054, SQL State: 42S22]  Unknown column 'num' in 'where clause'   Is there a way to limit count(*)?


Is the inter-atomic spacing of a conductive material directly proportional to its resistivity?

Is the inter-atomic spacing of a conductive material directly proportional to its resistivity as the more closely the atoms are packed the more resistance the material should have(According to me)?


What Type Of Switch Is only on for a second

I am looking for what type of switch is only only for a split second (1 second max) even when held.   Basically: Press and hold button-->LED only on for a split second and back off even though I am still holding it. If It is not a 'Switch' then what would I need to do to accomplish this.  EDIT: The Reason I Posted this one is because I'm a beginner, I have No Idea what a Logic Gate is. Is the a component I can just buy?


How do I create metal materials in Cycles?

I'm trying to make a gun for an alien space ship and I need to know how to create a dark gray metal look. I have tried mixing a Diffuse and Glossy BSDF, but it isn't quite what I am looking for. I need some light falloff to help get that "extra touch", but I don't know how to do that.


Prove that if a ≡ b mod m and c ≡ d mod m, then ac ≡ bd mod m.   In previous attempts I have tried to express a as b + mk and c as d + ml and I have also shown that m|a-b and m|c-d but I was unable to reach a complete proof.  Just a problem I have been trying to solve out of interest.


Is the speed of light the only speed that exists?

Well, it seems to me that if I move faster in space I move slower in the dimension of time which is orthogonal to the dimension of space.  All speeds are then equal. Is this statement correct?


I am using this  microcontroller. Can someone tell me , how is the input pin of the microcontroller would be? Can someone tell me how, if a GPIO is configured as an input pin, how would it be electrically? Just want to understand how the input impedance of the microcontroller pin would be? I could see the word CMOS input or output present in the datasheet.


My roommate and I are having trouble agreeing on how suction cups work.  Presumably, the ambient air pressure is the only thing which keeps the suction cup attached to the object.  When lifting an object with a suction cup (or a rigid chamber with air pumped out):   Given that the suction cup isn't physically affixed to the object, it can't apply any force to lift it. How does pulling actually lift the object? What dictates how much weight can be lifted?   If the object is touching the ground (so there's no air underneath it), can it be lifted? If not, can the suction cup be detached by pulling?   In practice, why does a rubbery suction cup work better than a rigid object (such as an inverted glass cup)? Inside a rigid spherical shell (with gravity towards the center), presumably a suction cup can be used to hang a mass.    Yet, the air pressure is acting nearly uniformly on the sphere. How does the gravitational force on the mass get balanced out so the whole system doesn't move?


Deriving ¬R from {R↔(R∨(P∧¬P)),R↔¬P,¬P→(P↔(Q→Q)),P→Q}

Give a derivation of $\neg R$ from the following premises: $$\{R\leftrightarrow(R\lor(P\land \neg P)), R\leftrightarrow\neg P, \neg P\to(P\leftrightarrow(Q\to Q)), P\to Q\}$$ using the rules found .  My assignment is due today, if someone can help me out. ty Is this correct? I know some dependence columns are wrong.  1 1) R↔(R/lor(P∧¬P)) P 2 2) R↔¬P P 3 3) ¬P→(P↔(Q→Q))  P 4 4)P→Q P 5 5)R P 2 6)R→¬P  2,BE 2,5 7)¬P 5,6,MP 2,3 8)P↔(Q→Q) 3,7,MP 2,3 9)(Q→Q)→P 8,BE 2,3,5 10)¬(Q→Q) 7,9,MT 2,3,5 11)Q∧¬Q 10,NC 2,3,5 12)Q 11,simp 2,3,5 12)¬Q 11,simp 2,3 14)¬R 12,13,RAA 2,15)¬R 5,14,RAA


has been solved, in XeTeX, by this code:  \def\kright#1{\leavevmode #1\kern-\XeTeXglyphbounds3 \the\XeTeXcharglyph`#1 } \def\kleft#1{\leavevmode \kern-\XeTeXglyphbounds1 \the\XeTeXcharglyph`#1 #1}   which allows me to align text more precisely to the ink by accessing the side-bearing measurements (\XeTeXglyphbounds1 and 3).  This XeTeX dependency is currently the only thing stopping me from moving to LuaTeX (mainly for microtype). Is an equivalent function available in LuaTeX, or planned?    After reading a bit more on microtype, could the equivalent effect be achieved by an appropriately-tailored set of character protrusions? That way, my move to LuaTeX might be a lot simpler.


Running Command Line from C# without Window and Getting Output

I am trying to run a command line script from C#. I want it to run without a shell and place the output into my string output. It doesn't like the p.StartInfo line. What am I doing wrong? I am not running a file like p.StartInfo.FileName = "YOURBATCHFILE.bat" like . I need to set the "CMD.exe" and command line string. I have tried p.Start("CMD.exe", strCmdText); but that gives me the error: "Memer 'System.Diagnostics.Process.Start(string,string)' cannot be accessed with an instance reference; qualify it with a type name instead."      string ipAddress;     System.Diagnostics.Process p = new System.Diagnostics.Process();     p.StartInfo.UseShellExecute = false;     p.StartInfo.RedirectStandardOutput = true;     string strCmdText;     strCmdText = "tracert -d " + ipAdress;     p.StartInfo("CMD.exe", strCmdText);     string output = p.StandardOutput.ReadToEnd();     p.WaitForExit();


I have downloaded Ubuntu 10.10 and burned the ISO but it will not boot.   I discarded problems with the ISO, as I've downloaded from the official website with no errors, and burned it with no errors. I discarded problems with the burning, as looks like it was recorded with no errors here and later in another computer. I discarded problems with my DVD reader as other cds boots fine.   I'm currently using Ubuntu 9.10, I know I can upgrade via internet, but I have this same problem with my Windows XP cd, so I really would like to discover what's going on here.. My Ubuntu 9.10 cd boots just right, but the new one not.  What else can be? Or what more precise tests can I make to discover where's the problem?   --More info  What happens when I try to boot with the Ubuntu 10.10 cd is that it behaves like there's no bootable cd in the drive. It just don't find the boot on the cd, and start the HD system.  My notebook is an Amazon PC Intel Celeron 1.5 with 2Gb memory, a DVD-RW driver, HD samsung with 260GB.  --update  If you put the media agains the light and see the other side, does that means that it's a bad quality dvd media? (it's a Philips)


E: Sub-process /usr/bin/dpkg returned an error code (1) (Related to Nvidia-418)

Have tried many things but the package can't be installed, attempted to remove corrupted packages but they were never there. Also tried reconfiguring and force-overwrite] root@chels-5f46dc6b67-7tct5:/var/lib/dpkg/info# apt --fix-broken install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   nvidia-418 The following NEW packages will be installed:   nvidia-418 0 upgraded, 1 newly installed, 0 to remove and 111 not upgraded. 8 not fully installed or removed. Need to get 97.9 MB of archives. After this operation, 410 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64  nvidia-418 418.126.02-0ubuntu1 [97.9 MB] Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64  nvidia-418 418.126.02-0ubuntu1 [97.9 MB]               Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64  nvidia-418 418.126.02-0ubuntu1 [97.9 MB]               Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64  nvidia-418 418.126.02-0ubuntu1 [97.9 MB]               Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64  nvidia-418 418.126.02-0ubuntu1 [97.9 MB] Fetched 71.3 MB in 2min 5s (572 kB/s)  debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 1.) debconf: falling back to frontend: Readline (Reading database ... 128611 files and directories currently installed.) Preparing to unpack .../nvidia-418_418.126.02-0ubuntu1_amd64.deb ... Unpacking nvidia-418 (418.126.02-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/nvidia-418_418.126.02-0ubuntu1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package libglx-mesa0:amd64 20.0.8-0ubuntu1~18.04.1 Errors were encountered while processing:  /var/cache/apt/archives/nvidia-418_418.126.02-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)


What is the difference between "n is even if $n^2$ is even" and "n is even only if $n^2$ is even"?

This is in the context of different ways of expressing P $\Rightarrow$ Q.  Some of you have suggested the similar question but it is not the same. He is asking for an explanation to why he casually dims down the statements, I'm asking for an explanation for the difference between the two aforementioned.  Thanks.


Alphanumeric Sorting using SQL Server / C#

I have alphanumeric numbers. After applying sorting thru SQL Server ORDER BY clause, I get following result  select *  from WO where WOCode = AnyNumber order by [ColumnName]   Result:  39660A1 39660A10 39660A11 39660A2 39660A3 39660A4 39660A5 39660A6 39660A7 39660A8 39660A9   Required result  39660A1 39660A2 39660A3 39660A4 39660A5 39660A6 39660A7 39660A8 39660A9 39660A10 39660A11


I have a problem with an SQL task (Microsoft SQL Server 2008).   This is the task: Show name and surname of clients in a way that first letters of name and surname are upper case (for example Michael Jackson). I don't know how to write it in SQL. I know that it would be something like this:   select UPPER(name), UPPER(surname) from client ;    But it shows all the letters in an upper form.


I have the following example. I use \lstinline{} command to provide code within latex text. However the font size seems to be small. Please if you know how to to trigger this please let me know.    SETUP:  \documentclass[bsc]{bangorcsthesis} \title{title} \author{name name} \date{\today} \degreeScheme{BSc} \supervisor{Prof. prof prof}  \bibliographySetup[compressed] \addbibresource{references.bib}  \usepackage{soul} \newcommand{\lk}[1]{\textcolor{red}{#1}} \newcommand{\mk}[1]{\textcolor{green}{#1}} \newcommand{\question}[1]{\textcolor{blue}{#1}}   \usepackage{float} \usepackage{listings} \usepackage{color} \definecolor{lightgray}{rgb}{.9,.9,.9} \definecolor{darkgray}{rgb}{.4,.4,.4} \definecolor{purple}{rgb}{0.65, 0.12, 0.82}  \lstdefinelanguage{JavaScript}{   keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},   keywordstyle=\color{blue}\bfseries,   ndkeywords={class, export, boolean, throw, implements, import, this, image, createCapture},   ndkeywordstyle=\color{darkgray}\bfseries,   identifierstyle=\color{black},   sensitive=false,   comment=[l]{//},   morecomment=[s]{/*}{*/},   commentstyle=\color{purple}\ttfamily,   stringstyle=\color{red}\ttfamily,   morestring=[b]',   morestring=[b]" }  \lstset{    language=JavaScript,    backgroundcolor=\color{lightgray},    extendedchars=true,    basicstyle=\footnotesize\ttfamily,    showstringspaces=false,    showspaces=false,    numbers=left,    numberstyle=\footnotesize,    numbersep=9pt,    tabsize=2,    breaklines=true,    showtabs=false,    captionpos=b } \renewcommand\lstlistingname{Code Snippet}  \begin{document}     ...     The layout is displayed as soon as the page loads on the user's screen. There are three main parts of the web-page's content. The first one is the original video feed (left canvas) which would be loaded frame by frame according to \lstinline{function draw()} of Processing5 library. The second part (middle of the figure) is where all the events are represented by image buttons and would be executed when mouse event listeners are called for each button individually. The third and final part, is where the 3-Dimensional environment is set (right canvas), using all the necessary WebGL libraries and self-invoking functions are called, such as \lstinline{function animate()} \& \lstinline{function render()}.     ... \end{document}


It has been hard for me, following  directions I can find online on the Ubuntu sites and others, how to simply get 14.04 LTS loaded on to a Windows laptop.  I want to get remove  Windows 7 on the laptop and  replace with 14.04. I'm looking for step by step directions.  I found  a download button, nothing more than that. What do you do with the download once you get on your desktop.   Then I went to another directions page, and it says download from a DVD. How do I get it on the DVD? How do I use it from a memory stick, it is all I have.


How to replace string by other strings if the source string contain special characters

In order to clean some string, I have to remove some substring that contains some special UTF-8 characters.  example:   source = "Skoda" to_be_clean = "Škoda Rapid"   I need to replace from to_be_clean the string source by nothing. Obviously, the to_be_clean string contains some special character. Is there a way to do this task simply. Here is how I am doing it today.  output = to_be_clean.replace(source + ' ', '')   I was thinking about a regular expression but I need to list all the possible characters.


What's a good package for typesetting quantum circuits?

I want to typeset things that     I'm already aware of   Q-circuit, which has nice custom macros for this purpose, but is based on the relatively slow and clunky XyPic TikZ, which I can use to manually set things up (that's how the picture I've hotlinked was drawn)   Are there any other alternatives I should know about?


Should the administration section of a website have the same look & feel as the other parts of the website?  I'm building a SAAS application and all of the public-facing parts of the website (home page, blog, about us, etc) share a HTML/CSS look & feel. I now need to add HTML/CSS to the admin section of the website (the bit that someone gets access to once they have signed up so that they can configure the SAAS options). Should the admin section share the same look & feel as the website proper? Is there any reason not to have a completely difference layout and colour scheme? Is it better to keep the same look so that users know they are still in the application or have a different look to differentiate the admin from the public-facing pages?


Username is not in the sudoers file. This incident will be reported - WHERE/HOW?

When a user not in sudoers tries to elevate privileges to root (in Ubuntu 18.04 for example) the OS displays this alert: "Username is not in the sudoers file. This incident will be reported".  Now, where can the admin see this report? How can admins detect an invalid sudo attempt?  I'm specifically interested in CentOS 7.


Starting yed from ubuntu with i3 tile manager

Yed starts properly, when i install it, but i do not know how to start it in i3wm? i could as well just start the script every time, but there should be an easier way to do this.


Nothing to repeat at position 0 when replacing string in pandas dataframe

In my MySQL database, phone in a VARCHAR. Then, I import this to a pandas dataframe. Here's my data:  data5  id   phone 1     +62634783472 2       0834838483 3              +62   What I want is convert +62 to 0, expected output would be like this  id   phone 1       0634783472 2       0834838483 3                0   I already try two thing, there are  data5['phone'] = data5['phone'].str.replace('+62', '0')  data5['phone'] = data5['phone'].replace(to_replace='+62', value='0', regex=True)   And the result is:  error: nothing to repeat at position 0   What is I miss?


How can I jump to the first frame in the timeline?

As I was making an Animation I found my self to oftenly press AltA to start and stop the green slider, and then when I stopped it I had to get it with my mouse and move it back to the beginning of the Timeline to see the Animation again.    I know that you can cancel the animation, and take the slider to the beginning when its playing by pressing Esc key but I can't get used to that.  You can see what I mean in the video below on Minute 5:40 - 5:44


I'd like to retrieve the content and href link from an HTML tag in Python.  I'm a beginner in regex and am able to retrieve the href content in this way:  urls = re.findall('<a class="title" href="(.*?)" title', page)   When trying to extract tag's content as well, I get nothing.  urls = re.findall('(.*?)', page)   How to do it the right way?  Thanks in advance.


Why do some functions/variables have the character "_" in front of them , in C++ ?

I've seen quite a lot lately, in games or other applications that class data members, or methods or other stuff have "_" in front of the name. For example taken fro DXUT.cpp (Directx) _Acquires_lock_(g_cs) or _Releases_lock_(g_cs) or _tmain . There are numerous examples like this in game programming like there (Taken from GameFromScratch Tutorial)     static GameState _gameState;   static sf::RenderWindow _mainWindow;   These are just some data members of some type.  Is there any reason behind the _ char? Is if specifically for something?


Q: Find the volume cut off from the cylinder $x^2+y^2=ax$ by the planes $z=0 $ and $z=x$ Given Answer:$\frac{128a^3}{15}$ My answer:$\frac{\pi a^3}{4}$ Working: So, first off, we can decipher from the question that $z$ will vary from $0$ to $x$. $y$ will vary from $-\sqrt{ax-x^2}$ to $\sqrt{ax-x^2}$. $x$ will vary from $0$ to $a$ So, the integral to be evaluated will be: $$\int_{0}^a\int_{-\sqrt{ax-x^2}}^{\sqrt{ax-x^2}}\int_{0}^x 1\cdot dzdydx$$ $$=\int_{0}^a2x\sqrt{ax-x^2}dx$$ $$=a\int_{0}^a\sqrt{ax-x^2}dx - \int_{0}^a(a-2x)\sqrt{ax-x^2}dx$$ The second integral turns out to be $0$, so we're left with only the first integral $$=a\int_{0}^a\sqrt{ax-x^2}dx$$ $$=a\int_{0}^a\sqrt{\left(\frac{a}{2}\right)^2-\left(x-\frac{a}{2}\right)^2}dx$$ $$=a\left[\frac{x-\frac{a}{2}}{2}\sqrt{ax-x^2}+\frac{a^2}{4}\sin^{-1}\left(\frac{x-\frac{a}{2}}{\frac{a}{2}}\right)\right]_0^a=\frac{\pi a^3}{4}$$ The calculation looks to be fine, so I think I might be messing up with the limit calculation. If someone could verify, it'd be of great help. Thank you!!


Sharing Laptops wifi internet to Desktop via ethernet

I'm running Ubuntu 13.10 on a Dell Inspiron 530s. It has a Linksys network adapter card, but I do not have the adapter, so my computer is connection-less.  What I'd like to know is if there is a way to share the internet that my wireless laptop is receiving through an ethernet cord to give internet to my desktop computer. The laptop is a Compaq Presario CQ56, running Windows 8.  Any answer is well appreciated.


Differences in the behaviour of pinching a garden hose and closing a tap

Let's say you have a garden hose connected to an ordinary water tap which is opened fully. If you pinch the end of the hose, water leaves the hose at a higher speed (and this can be useful while watering plants, to reach pots which are further away). However when a tap (with no hose connected) is opened only slightly, water flows out at a low speed, possibly even in drops.  The actions of pinching the end of a hose and of almost-closing an open tap seem similar, so why the difference in behaviour?


How to setup apache to have overlapping virtual host wildcard server aliases?

I have a development setup of subdomains with apache/wamp, everything is working as I need with the "regular" setup and separately with the "xyz" setup, but I have to change the configuration and restart the server everytime I need a different setup.  Is there a way to have both setups working at the same time?  I'm looking for answer that allows me to access both setups at the same time without changing the urls or ports I use to access them.  this is my regular setup  <VirtualHost *:9090>     ServerName localhost.com     ServerAlias *.localhost.com     VirtualDocumentRoot u:\wamp\www\subdomains\%1     <directory "u:\wamp\www\subdomains\%1">         Options Indexes FollowSymLinks         AllowOverride all         Order Deny,Allow         Deny from all         Allow from all     </directory> </VirtualHost>   This is my secondary (xyz) setup  <VirtualHost *:9090>     ServerName localhost.com     ServerAlias *.xyz.localhost.com     VirtualDocumentRoot u:\wamp\www\subdomains\xyz     <directory "u:\wamp\www\subdomains\xyz">         Options Indexes FollowSymLinks         AllowOverride all         Order Deny,Allow         Deny from all         Allow from all     </directory> </VirtualHost>


How to prevent duplicate records in salesforce using validation Rule?

I want to prevent duplicate records of an object in Salesforce. I know how to do it by writing a trigger,but some one told me it can be possible by validation rule also.  Can anyone help me how to avoid duplicate records using validation rule ?


SQLVDI and Backup Database event viewer errors

We recently started seeing SQLVDI and MSSQLSERVER errors poping up on a number of our machines.  Shortly after event 3197 (I/O is frozen on database x), we start seeing SQLVDI 1 errors (signal abort) and MSSQLSERVER 3041 errors, failure to complete the command BACKUP DATABASE. We run our backups once daily, and looking at our DB backups, they restore fine and are not corrupt.  But batches of these errors are happening throughout the day, with no logs of our maintenance plans attempting to run at those times.  Even stranger, we are seeing these errors occouring on machines that do not have SQL Server 2012 installed.  Any ideas as to what might be causing these errors? or if they can be passed off as nuisance errors?


when I try to generate this code, this error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference.  That is my code:  public class MainActivity extends AppCompatActivity implements   View.OnTouchListener{ private Tablero fondo; int x; int y; private boolean activo = true; int intento = 10; String numerointentos;        @Override protected void onCreate(Bundle savedInstanceState) {     requestWindowFeature(Window.FEATURE_NO_TITLE);      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);      super.onCreate(savedInstanceState);      setContentView(R.layout.activity_main);      LinearLayout linearLayout1 = (LinearLayout) findViewById(R.id.linearLayout1);     TextView Tiradas = (TextView) findViewById(R.id.Intentos) ;     numerointentos = Integer.toString(intento);     Tiradas.setText(numerointentos);      fondo = new Tablero(this);     fondo.setOnTouchListener(this);     linearLayout1.addView(fondo);     fondo.casillas = new Casilla[8][8];     for (int f = 0; f < 8; f++){         for (int c = 0; c < 8; c++){             fondo.casillas[f][c] = new Casilla();         }     }   And this is the .xml code:  <?xml version= "1.01" encoding="utf-8"?>  <LinearLayout android:id="@+id/linearLayout1" android:layout_width= "fill_parent" android:layout_height="fill_parent" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android" android:weightSum="1">  <Button     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="@string/reiniciar"     android:id="@+id/btnReiniciar"     android:onClick="presionado"     android:layout_gravity="center_horizontal" />   <TextView      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:textAppearance="?android:attr/textAppearanceMedium"      android:id="@+id/Intentos"      android:layout_gravity="center_horizontal" />     Obviously there is more code and code and clases, but that is the unique that contains the setText.  And another question. If I want to modify the value of the TextView in another public voids or methods what should I do?  I appreciate your help guys, I searched for anwsers on that web but I can't solve it. I don't know the reason. Thanks!


Is it possible to convert a variable as a string?

I have a list, that I wanted to convert to a dictionary.    L =   [         is_text,         is_archive,         is_hidden,         is_system_file,         is_xhtml,         is_audio,         is_video,        is_unrecognised      ]   Is there any way to do this, can I convert to dictionary like this by program:  {     "is_text": is_text,      "is_archive": is_archive,      "is_hidden" :  is_hidden     "is_system_file": is_system_file     "is_xhtml": is_xhtml,      "is_audio": is_audio,      "is_video": is_video,     "is_unrecognised": is_unrecognised }   Variables are boolean here.  So that I can easily pass this dictionary to my function   def updateFileAttributes(self, file_attributes):     m = models.FileAttributes(**file_attributes)     m.save()


Thank you for giving me an idea to try to find a way to calculate this sum:  $$S= \sum_{i=0}^n \lfloor\sqrt{i} \rfloor$$


unable to create force:inputField using $A.createComponent

I am trying to create dynamic input fields on button click for contact fields using $A.createComponent.  From the examples I find online I am able to create <ui:inputText/> components but when I use <force:inputField/> I am getting error in browser console.  DemoComp.cmp  <aura:component >     <aura:attribute name="contact" type="Contact" default="{ 'sobjectType': 'Contact', 'LastName': 'Satapathy' }"/>     <force:inputField aura:id="contactName" value="{!v.contact.AccountId}"/>     <lightning:button label="Adjust Width" onclick="{!c.editField}"/>      <div aura:id="fieldPopup"></div> </aura:component>  Working code for <ui:inputText>  ({     editField: function(component,event,helper) {          var contact = component.get("v.contact");         $A.createComponent(             "ui:inputText",             {                 "aura:id" : "123",                 "value": "hello world"             },             function(newButton, status, errorMessage){                 //Add the new button to the body array                 if (status === "SUCCESS") {                     var popup = component.find("fieldPopup");                     var body = popup.get("v.body");                     body.push(newButton);                     popup.set("v.body", body);                 }                 else if (status === "INCOMPLETE") {                     console.log("No response from server or client is offline.");                 }                 else if (status === "ERROR") {                     console.log("Error: " + errorMessage);                 }             }         );     } })  Failing <force:inputField>  ({     editField: function(component,event,helper) {         var contact = component.get("v.contact");         $A.createComponent(             "force:inputField",             {                 "aura:id" : "123",                 "value": contact.AccountId             },             function(newButton, status, errorMessage){                 //Add the new button to the body array                 if (status === "SUCCESS") {                     var popup = component.find("fieldPopup");                     var body = popup.get("v.body");                     body.push(newButton);                     popup.set("v.body", body);                 }                 else if (status === "INCOMPLETE") {                     console.log("No response from server or client is offline.");                 }                 else if (status === "ERROR") {                     console.log("Error: " + errorMessage);                 }             }         );     } })


I want to resize my mount point partition of ubuntu 12.04 and install winndows 7 .HOw can I do that?

I want to resize the Ubuntu 12.04 partition and install Windows 7. How can I do that?  Please refer to the screenshot of Gparted editor. I want to resize the dev/sda3 partition.


So, I only bought Terraria less than a week ago, and I am really happy because I am loving the game and I am learning fairly quickly, so here is my question. Can items despawn in Terraria? This would be good to know, if ever I decided that hardcore difficulty was a good idea. I know that monsters, and even bosses can, but hopefully dropped items, including coins dropped upon death won't ever despawn over time. How does this mechanic work?


How to report your own post as duplicate

What if I notice I accidentally have made a duplicate post. Should I delete my post or should I link to the original/earlier post? If so, how can I do this?  Edit:  After reading this  it is clear I should not delete my duplicate posts. Though, now how do I report duplicate posts?


Top network post URL bug for migrated posts

I tried to see if this rare bug was brought up before, but I didn't find anything.  The following profiles:        ... have top posts like this:    A missing title, and the link goes to, for example:      ... which is 404 page not found, but the post is alive here:      All those posts were migrated as @Arulkumar noted in a comment here, so the issue seems to be with the migration.


I have been playing Clash of Clans on my iPhone 5. I have town hall 10. Now I have gotten a new Galaxy 5. I am trying to get my old village onto my new phone but it isn't work. When I first launched Clash of Clans on the new phone, it automatically did load a new village town hall 1. I can still launch the old village on my old phone. Is there any way to get my old village to my new phone?


Let$ p$ and $ q$ be two probability densities a subset of $\mathbb{R}^d $. Assume I know how to generate samples from $ p $ and how to generate samples from $ q $, but I do so without actually being able to evaluate the densities.   How do I algorithmically generate samples from the distribution whose density is $\propto pq $?


How can i fix the exception Cross-thread operation not valid in a timer tick event?

In a backgroundworker dowork event i'm starting a timer:  private bool cancelop = false;         private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)         {             BackgroundWorker bgw = (BackgroundWorker)sender;             int Counter = 0;             int percentage = 0;             int total = allfiles.Count;             for (int i = 0; i < allfiles.Count; i++)             {                 if (bgw.CancellationPending == true)                 {                     pictureBox1.Image.Dispose();                     pictureBox1.Image = Properties.Resources.Weather_Michmoret;                     e.Cancel = true;                     makeGif = false;                     cancelop = true;                     timer1.Stop();                     break;                 }                 else                 {                     timer1.Start();                     Counter += 1;                     percentage = Counter * 100 / total;                     bgw.ReportProgress(percentage);                 }             }             if (makeGif == true)             {                 unfreez.MakeGIF(allfiles, outputfile + DateTime.Now, 8, true);             }             bgw.ReportProgress(100);             e.Result = allfiles;         }   Then in the timer tick event:  private void timer1_Tick(object sender, EventArgs e)         {             try             {                 if (cancelop == true)                 {                     // Cancel the asynchronous operation.                     progressBar1.EndColor = Color.FromArgb(210, 0, 0);                     label7.ForeColor = Color.Red;                     label7.Text = "Operation Has Been Cancelled";                     timer1.Stop();                     backgroundWorker1.CancelAsync();                 }                 else                 {                     this.label7.Visible = !this.label7.Visible;                 }             }             catch(Exception errrr)             {                 string myer = errrr.ToString();             }         }   The exception message:  [System.InvalidOperationException] = {"Cross-thread operation not valid: Control 'label7' accessed from a thread other than the thread it was created on."}  at System.Windows.Forms.Control.get_Handle()    at System.Windows.Forms.Control.get_ContainsFocus()    at System.Windows.Forms.Control.SelectNextIfFocused()    at System.Windows.Forms.Control.SetVisibleCore(Boolean value)    at System.Windows.Forms.Control.set_Visible(Boolean value)    at Animated_Gifs.Form1.timer1_Tick(Object sender, EventArgs e) in d:\C-Sharp\Animated_Gifs\Animated_Gifs\Animated_Gifs\Form1.cs:line 179   Line 179 is in the timer tick event:  this.label7.Visible = !this.label7.Visible;


Is zero input impedance good or possible when considering impedance matching?

For RF applications, we are usually considering of impedance matching to choose load impedance as the conjugate of the source input impedance for the maximum transferred power. But how about design the source having zero input impedance? Is it even possible or good? A naive thought is that all the power will be on the load if so. I might think it is true for DC case and for amplifier design to have a small output impedance and big input impedance. I lack the knowledge to find the missed chain to put all the knowledge together. How do you think? Thanks!


In the scene The Butcher of Blaviken, Geralt killed or gravely wounded half a dozen men without hesitating but when fighting Renfri, he is rather hesitant and even though he had warned her "If we cross swords...", impling he'll kill her if they do cross swords.                                In the trailer for The Witcher 3: Wild Hunt, he kills three men he considers evil, again without hesitation, even torturing one by hanging him and deliver him at the merci of his victim.                                He protects Duny at the court of Cintra as he's an intelligent being (and not a monster) and also wants to help the Hirikka (before it is slayed for Kingdom and Honor). It somehow just is not consistent for me that at one moment, he kills without any hesitation and at others, he tries to save lifes and is risking his own. Is there a code he follows what intelligent being it is fine to slay and who shall be protected? And how ruthlessly is Geralt following that if he determines somebody needs to be killed? With Butcher of Blaviken, it would seem that he doesn't have any hesitation about killing people in his way.


Iterating over nested list of equal elements

I have a list of lists, with identical elements, created like this:  list1=[1,2,3] list2=[] for i in range(6):     list2.append(list1) list2   The outcome is:  [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]   I want to be able to change the elements of the nested list; for example:  list2[0][0]=4 list2   produces:  [[4, 2, 3], [4, 2, 3], [4, 2, 3], [4, 2, 3], [4, 2, 3], [4, 2, 3]]   But I only want to change the first element of the first list:  [[4, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]   How can I do this ? What am I missing in the iterating process ? At the end, I want to be able to reference any element in list1


Prove that if $ n > 2 $ then between $n$ and $n!$ is at least one prime.  Ok I can see that it's obviously true, but what to use to prove it?


After JS append a  in existing , i cannot selected it with click event

I have a dropdown list (Bootstrap), after selected an element in this dropdown list, i call a php file with ajax to load a specific content for a new dropdown list.  In my JS script i append the result i found in a existing ul list.  My problem is after append new li element in my ul list #submitPoint, i cannot select them with selector from js. I don't know why but JS seem to not see the new elements he just append before..  Here the PhP code with 2 dropdown list, one for flow name, other one for flow's submit point:  print "
" ; print "
" ; print "
" ; print "Select a Flow " ; print("
"); foreach ($flows as $flow) {     print("
" . $client->getNameOfFlow($flow) . "
"); } print "
" ; print "
" ; print "
" ; print "
" ; print "
" ; print "Select a SubmitPoint " ; print("
");   Here the JS code :     So after append li element in ul #submitPoint, if I click on it, the #submitPoint li click function is never call, but the li element appear in my list.... (Sorry I cannot add picture)  Do you have any ideas that can help me to the question why the JQuery selector does not work properly for the new li element append? Thanks for all!


Proof of equivalence of algebraic and geometric dot product?

Geometrically the dot product of two vectors gives the angle between them (or the cosine of the angle to be precise). Algebraically, the dot product is a sum of products of the vector components between the two vectors.  However, both formulae look quite different but compute the same result. What is an easy/intuitive proof showing the equivalence between the two definitions?  I.e., demonstrate that $a_x b_x + a_y b_y + a_z b_z = \lvert a \rvert \lvert b \rvert \cos{\theta}$


Which command is to take for to find out about program, which else programs are initialized by this one program?

Yes - this concerns the question which commands in terminal are possible, for to find out which programs are initialized (visible and non-visible) - by program1. (for example - when I only want to know, which programs are running by program1 only with name "crash-handler"?) I dont mean this here:  Step 1:  top   And then step 2:  sudo kill -9 PID 'number-of-process'   I mean for to list all programs, which are running by program1 (even hidden processes ... ). This question will be rewarded with bounty! (because of thunderstorm I had amnesia and wanted to put this question earlier - this then would have prevented the stupid "hoaxes" about so-called "shell-shock-vulnerabilities" and else news ... ).  How many possible commands would be out here for this ?! (- not only htop and top and pstree ... ) - thank you !


Can I undelete an answer myself if it was deleted via Recommend deletion votes from review?

In the  it says:  Depending on who deleted your post, you may or may not be able to undelete it. If it was deleted by [...] from review (without three trusted users voting to delete): you can undelete it, but doing so will alert moderators  However, a moderator has just informed me that it does not work like this. If any of the reviewers was a trusted user and they used their delete instead of the recommend deletion then the author of the answer can't undelete the answer by themselves. To undelete it would require two more trusted users's votes. To make it clear there are 3 possible scenarios:  Review ends with 3 delete votes by trusted users. Review ends with 4/6 recommend deletion votes and none of them was cast by a trusted user. Review ends with a mix of 1 or 2 delete votes and recommend deletion votes.  My understanding based on the excerpt above is that only in the first case the OP cannot undelete it themselves. In the remaining two situations the answer can be undeleted by the author, but such action would raise a moderator flag. When can the author of the answer undelete a post deleted via review and has it always been like this?


What is the difference between Node* p and Node *p?

In this line of code: Node* insert(Node *head,int data)  What is the difference between Node* insert and Node *head? Are they both pointers? And which is better?


This answer. Please notice the edit! I was about to downvote this answer because it did not actually solve it, it just explained why it didn't work. (Kind of like a 50% answer).  Notice the comment, he said he was editting. Ok, cool, I didn't downvote and his answer is good.  This brought on the question (or series of questions): When writing an answer, and you post something (I guess as a "placeholder"), I would assume I could downvote until the answer is editted, but what is the "breaking point" for a placeholder?  One time I saw an answer "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" that was editted to the right answer.  Even when it became a right answer it wasn't upvoted.


After installing 17.04 I get a end-of-life warning on SSH connections

I just installed Ubuntu 17.04 using the netinstaller (UEFI).  After connecting via SSH to the machine I see the 12.04 end-of-life warning.  Is this a bug and can I somehow remove it?  Using username "anonymous". Authenticating with public key "imported-openssh-key" Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64)   * Documentation:  https://help.ubuntu.com  * Management:     https://landscape.canonical.com  * Support:        https://ubuntu.com/advantage   * Ubuntu 12.04 LTS ('precise') end-of-life was April 28, 2017    ongoing security updates for 12.04 are available with Ubuntu Advantage    http://j.mp/U1204esm  Last login: Wed May 10 08:24:24 2017 from 8.8.8.8 anonymous@private-server:~$


I have 1TB hard disk. I have installed ubuntu on a 30GB partition and the rest is for Windows 8. I want to increase the ubuntu partition size to 100GB. How do I do this?


Why doesn't the sorting system actually show questions with most votes?

I was browsing  today for the first time, and wanted to look at the highest voted questions. The page to see highest voted questions (as far as I'm aware) is here:   At the moment the highest voted question has 79 votes, but that means this list is incomplete because minutes before I had come across a question with 90 votes ()  I'm guessing it's because the 90 vote question is locked. Which is confusing because there are questions on the top voted page that are closed (why aren't closed questions also erased from this list?)  If that's the case, can I request that the sort by votes page is accurate to all questions? If not could someone explain why this is not the case?


.getImage() on a null object reference android

I have a fragment. After click on image i strart activity. But i keep getting this error  Unable to start activity ComponentInfo{com.flag.app/com.flag.app.app.activity.MarkerDetailsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.flag.app.app.model.Image com.flag.app.app.model.Marker.getImage()'  on a null object reference   So, this is my activity    public class MarkerDetailsActivity extends AppCompatActivity {  public static Intent getStartIntent(Context context, Marker marker) {     Intent startIntent = new Intent(context, MarkerDetailsActivity.class);     startIntent.putExtra(EXTRA_MARKER, marker);     return startIntent; }   ImageView mImageView; TextView mNameTextView; Marker mMarker; MapView mMapView;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_details_marker);     mMarker = getIntent().getParcelableExtra(EXTRA_MARKER);      mImageView = findViewById(R.id.image_view);     mMapView = findViewById(R.id.map_view);     mMapView.onCreate(savedInstanceState);     bindMarker(mMarker); }  private void bindMarker(Marker marker) {     Picasso.with(mImageView.getContext())             .load(marker.getImage().getUrl())             .into(mImageView);     mAuthorTextView.setText(marker.getAuthor());     mDescriptionTextView.setText(marker.getDescription());     mDateTextView.setText(marker.getDate());  }    }   How to fix it?


How do I stop the setInterval() function?

How can I stop the interval using the same button I used to start the interval?    function slideShow() {    'use strict';     var pics = ['IMG_2135.jpg', 'IMG_2125.jpg', 'IMG_2119.jpg', 'IMG_2118.jpg'];     var output = document.getElementById('output');     output = pics[Math.floor(Math.random() * pics.length)];     document.getElementById('image').src = output; }  button.onclick = function () { setInterval(slideShow, 2000); }


App doesn't open correctly when I open a notification

I have Samsung A5, SM-A500H. Android version 5.0.2. Latest version of SE android app on Google Play Store.  If I ask a question, you answer, I receive a notification on my phone that you answered, I click on the notification, I see this        So it doesn't load correctly, I have to go back and click on the notification icon from within the app for it to open correctly.


Resources for learning R with Statistics

Already read:    I would prefer to have a textbook which covers statistics with R, accessible to a beginning graduate student in statistics. Since I'm not as familiar with R as I should be, I will be purchasing A Beginner's Guide to R by Zuur, but what is a good text for covering statistics with R for a beginning graduate student?


Prove that $n$th Term of the sequence $1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,\cdots$ is given by   $$T_n =\left[\sqrt{2n+\frac{1}{2}}\right]$$ where $[.]$ is Floor function  My Try:  Its clear that $1$st Term is $1$, $3$rd Term is $2$, $6$th term is $3$ and so on  We have Triangular numbers as $1,3,6,10,...$ whose $m$th term is given by $\frac{m(m+1)}{2}$  Hence for the given sequence  $$T_{\frac{m(m+1)}{2}}=m$$  Letting $$\frac{m(m+1)}{2}=n$$ we get Quadratic in $m$ as  $$m^2+m-2n=0$$ So $m$ takes $\frac{-1\pm \sqrt{1+8n}}{2}$ and since $m$ is a positive integer we have  $$m=\frac{-1+\sqrt{1+8n}}{2}$$  hence  $$T_n=\frac{-1+\sqrt{1+8n}}{2}$$  how to proceed further?


Are there any tools which support refactoring PHP code (renaming variables, extracting methods, finding method references, ...)? Thank you.


I am attempting to modify a /summon command to add an enchantment. My command looks like this:  summon item 8 62 -13 {Item:{id:minecraft:bow,Count:1}}   I have tried modifying the command like this:  summon item 8 62 -13 {Item:{id:minecraft:bow,Count:1,ench:[{id:19,lvl:1}]}}   But it does not apply any enchantments.


Einstein-Cartan theory - Book recommendation

I want to delve into Cartan's formulation of General Relativity but it don't really know where to look. Does anyone have any book suggestions?


Restore a large number of transaction logs

I'm using SQL Server 2008 R2, and I need to restore 36 .trn logs to a database. I have restored the first 4 using the restore transaction log functionality in SSMS (right-click database > tasks > restore > transaction log).   Is there a way to restore them all in order using this tool or with a script? The .trn files are in a folder on a remote server. I do not not need to restore all the files in the folder, only ones between specific dates.  I'm looking for a way to automate this so I don't have to manually restore each individual log.  I access the files using an address like the one below.  \\remote server IP\SQL_Backup\LMSQL02\TLog\file.trn


I have seen many people use "anyways" in chat and comments on SE. But I think I have read in many books as "anyway".   Which is the correct word?   suggests that "anyways" is an informal language.     Definition of anyways    [1]    US, informal:  anyhow, anyway    [2]    (a) archaic:  anywise    (b) dialect:  to any degree at all


I would like to be able to script some things that are not exposed via arcgisscripting or ArcPy.   How do I access  from Python?


How can I control the computer's fan speed?  On Windows there is a wonderful program called .


I proved that $f(x,y)= \dfrac{xy^2}{x^2 + y^3}$ does not have limit at origin. I used two paths test; first I followed the $x$ axis, then I followed $x = \frac{1}{2}(y^2 + (y^4 - 4y^3)^{1/2})$ for $y<0$.   However, I am STILL looking for other solutions other ideas.  Any kind of answer, help or hint is appreciated.


Root filesystem check fails after power failure during installation

During the "install" phase of the upgrade there was a power failure. After when starting up again the following errors are reported:  init: udevtrigger main process (420) terminated with status 1 init: udevtrigger post-stop process (428) terminated with status 1 init: udevmonitor main process (419) killed by TERM signal The disk drive for / is not ready yet or not present Continue to wait; or press S to skip mounting or M for manual recovery   Pressing M gives me the following message:  Root filesystem check failed. A maintenance shell will now be started. CONTROL-D will terminate this shell and reboot the system.


How do you make a square element symbol (\in), to show that an element belongs to a collection of set?

I was reading a book the other day and they distinguished between the usual element symbol (\in) and an element symbol to show that a set is a member of a collection of sets. For the latter they used a square element symbol that looked similar to a wide E. Does anyone know what the code for this might be? The book,says it was prepared with regular LaTeX. Thanks.  The Symbol is


Show that computation of all such expressions will result in the same element of $X$

Let $X$ be a non-empty set, and suppose that $*:X^2\to X$ is a   function with the associative property, that is,   $$(x*(y*z))=((x*y)*z),$$ for all $x,y,z\in X$, where we write the   image under the function of the pair $(a,b)$ in $X^2$ as $(a*b)$. Let   $x_1,x_2,...,x_n$ be elements of $X$ and suppose that the brackets and   $*$s are inserted into the string of symbols $x_1x_2...x_n$ to give an   expression which can be computed using the function $*$ to give an   element of $X$. Show that the computations of all such expressions   (for the same $x_1x_2...x_n$ in that order) will result in the same   element of $X$. [Hints: Use induction on $n$ with the hypothesis that   each such expression equals both of   $$(x_1*(x_2*(...*(x_{n-1}*x_n)...)))$$ and   $$(((...(x_1*x_2)*...)*x_{n-1})*x_n).]$$   I'm very confused about what exactly I'm doing induction on. My attempt is as follows:  First let $n$ be the number of $*$s appearing the the expression. Then, the base case $n=2$ is given to us. That is $((x_1*x_2)*x_3)=(x_1*(x_2*x_3))$, is the same element of $X$. Now suppose that we have the string $x_1x_2...x_n$, and we insert the $*$s and brackets into the string, so that the resulting expression is computable via the function $*$. We suppose that each expression equals both of $$(x_1*(x_2*(...*(x_{n-1}*x_n)...)))$$ and $$(((...(x_1*x_2)*...)*x_{n-1})*x_n).$$ We note that $n$ is at most $n-1$ here. We wish to prove for the case where $n=n$... I'm not sure if what I'm saying is making any sense here.


Is there an alternative to using comments for users who don't have enough Rep to chat, as it is frowned upon to chat in comments?

I often get the warning Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat? but a lot of the time, I am helping new users. What should I do to avoid discussion - should I suggest an external chat site, or continue using the comments?


I am using asp.net C# 4.0 as may server side script and jquery as my client side script. Our client provided us a SharePoint URL (aspx) to access. SharePoint machine different from my web application server. They want us to read/write to its SharePoint list.  Is there any way I can do the requirement using the current setup(remote access) without installing any on the SharePoint machine? Our client doesn't want to install or do anything on the SharePoint machine.  Sorry for duplicate question  Here some additional information.   I am using jquery 1.9.1 I need to perform read/write from the browser. Using Sharepoint 2013


How to pronounce P, T and K after an "s" in certain words?

I have been taught that the pronunciation the letters after /s/ should be changed. e.g.  school:  ch reads /g/ (as in grow) stay:    t reads /d/ (as in day)  But I'm not sure these words:   describe:  the c after des, /k/ or /g/? discrete:  the c after dis, /k/ or /g/? system:    the t after sys, /t/ or /d/? execute:   the c after  exe, /k/ or /g/?   Which is the correct pronunciation, and when shall I change, when not?  UPDATE: Matt asked me why not get them in dictionary, but the changed pronunciation won't present in dictionary. See:  stay    /stei/, it's t, not d school  /sku:l/, it's k, not g


I'm looking for a site, similar to StackOverflow, but with possibility to ask opinion based questions

Since opinion based questions are not allowed neither here nor on stackoverflow, I would like to ask if any of you, know some other web page (outside Stack* ecosystem), where we can ask questions like:  "Which Java Web framework would you recommend to learn"   or any other, which by nature are opinion based.  EDIT1:  Allow me to explain a bit more - I know there are webgroups, forums and mailing lists BUT most of those are for single programming language or framework and I'm looking for something more generic. Stackoverflow is great because there are experts from all sort of programming languages and frameworks, so if it would be allowed to ask:   "Best web frameworks similar to ASP.NET MVC4"  I would get a lot of opinions, from different languages and frameworks, and that exactly what I'm looking for.


Why dont radio waves diffract through radio telescopes instead of being reflected?

If you take this picture of a telescope   It has several gaps through it. My lecturer was mentioning how as long as the holes and imperfections in your disk are less than the wavelength of light you are observing, they can be ignored. He said the telescope shown above was used to measure hydrogen line emissions with wavelength of about 20cm. My question is, if the gaps are about a few cm wide, wont the incoming light diffract?   Is it just that the gaps and imperfections are significantly smaller than the the wavelength so there is no diffraction and just reflection?


I would like to validate a number column input to only accept 0.5, 1.0, 1.5 up to 25. I have set min and max value but user can enter any 1,2,3,4,6,7,8,9 after decimal place. I only want to allow .5 decimal value. I'd like a number column to codify calculations in workflow. Many thanks


Can Excel's Find formula have multiple find_text criteria?

I have a list of names on a NAMES tab range A1:A100.  On another tab 'Data Export', in column A I have an export of thousands of comments where one of those names from the NAME tab can be found within them.  In column B (on my Data Export tab) I am trying to write a formula, FIND or SEARCH ect that will incorporate the range of names in its find_text section.  Find({A1:A100},A2,1)  There must be a way in excel or VBA if someone is hot on that subject, as I am just a beginner, that can accomplish this.  Ideally, in an ideal world, the formula or vba code would return the name that is within a comment in Column B but I understand that that will almost definitely be in VBA territory.


Why does the direction of a dipole moment go from negative to positive charge?

An  is defined as $p = q\times d$ (for two point charges $\pm q$ separated by a distance $d$).    What is the physical meaning of this quantity?  Why does the direction of the electric dipole moment go from the negative charge to the positive charge? Another way of saying this, why electric dipole moment is a vector quantity?


How to avoid the break of framed/shaded?

I have a problem with the framed environment. I am writing a document (article), and several parts of it have a gray background. Unfortunately, when a new page comes, such a shaded environment is cut in half :(   How can I avoid this? (with no use of \newpage...)  Example: In the document generated by this code, I would like the second shaded environment to be placed in the second page:  \documentclass{article} \usepackage{framed,color} \definecolor{shadecolor}{gray}{.75} \begin{document} \begin{shaded} Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text \end{shaded} \begin{shaded} Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text \end{shaded} \end{document}


I am making a text based calculator that can do addition, subtraction, division, multiplication and powers. The code I have written so far seems to work, but when it reaches the section where it determines if the inputed text is a +, -, /, *, or a ^, it endlessly loops and doesn't recognize the input.       double inputX;  // Used for input 2     double inputY;  // Used for input 1     double output;  // Used for math purposes      String inputS;  // Used for string input      String subt;   // Store the - in a string     subt = "-";      boolean corrInput = true;     boolean repeat = true;      while (repeat == true){          System.out.print("Please enter a number: ");          inputX = TextIO.getlnDouble();  // Retrieves inputX          System.out.println("x: " + inputX + "\n");          System.out.print("Please enter a number: ");          inputY = TextIO.getlnDouble();  // Retrieves inputY          System.out.println("y: " + inputY + "\n");           while (corrInput == true){             System.out.println("Choose an operation: +, -, *, /, ^.");             inputS = TextIO.getlnString();  // Retrieves a strings input               // Calculator logic              if (inputS == subt){                 output = inputX - inputY;   // X minus Y                  System.out.println("Calculatorator says that " + inputX + " - " + inputY                     + " = " + output);             }              else if (inputS == "+"){                 output = inputX - inputY;   // X plus Y                  System.out.println("Calculatorator says that " + inputX + " + " + inputY                     + " = " + output);             }              else if (inputS == "*"){                 output = inputX * inputY;   // X multiplied by Y                  System.out.println("Calculatorator says that " + inputX + " * " + inputY                     + " = " + output);             }              else if (inputS == "/"){                 output = inputX / inputY;   // X divided by Y                  System.out.println("Calculatorator says that " + inputX + " / " + inputY                     + " = " + output);             }              else if (inputS == "^"){                 output = Math.pow(inputX, inputY);  // X to the power of Y                  System.out.println("Calculatorator says that " + inputX + " ^ " + inputY                     + " = " + output);             }               else {                  System.out.println("Please provide a valid input. '" + inputS                     + "' is not valid input");             }          }          System.out.println("Want to do another Calculatoration?");         repeat = TextIO.getBoolean();   // Retrieves input as a boolean      }      System.out.println("Thank you for using my calculator!");   The solution is most likely obvious, but I am not


Probability to obtain more than X with 3 dice.

This is a dice problem  1) I want to calculate the probability to have more than X throwing 3 dice of 6 faces. X = addition of the result of the 3 dice.  2) This is the first step but if you can also provide me a solution to calculate the probability to have more than X with Y dices of Z faces it would be really great.


Endomorphisms of modules satisfying chain conditions and counterexamples.

1) How can I show that any one to one endomorphism of an Artinian module is an automorphism.   2) I also want to show that any onto endomorphism of a Noetherian module is an automorphism.   I need counterexamples for modules without chain conditions.


Shortest path for positive edge weights, largest path weight known

Given a directed graph G(V,E) with (positive) weighted edges, is there an algorithm that computes the shortest paths from a single vertex to every other, given the total weight of the largest shortest path to be K, in O(K+V+E) time?


Show that if $G$ is simple a graph with $n$ vertices and 􏰈the number of edges $m>\binom{n-1}{2}$, then $G$ is connected.

I'm trying to pick up a little graph theory out of Bondy and Murty's Graph Theory as suggested .  Problem 1.1.12 has given me a little hitch.     Let $G$ be a simple graph of order $n$ and size $m$. (So there are $n$ vertices and $m$ edges). If $m>\binom{n-1}{2}$, then $G$ is connected.   I'm following a hint in an appendix which says if $G$ is not connected, we can partition the vertices into parts $(X,Y)$ such that no edge joins a vertex in $X$ to a vertex in $Y$. What is the largest number of edges in $G$ if $|X|=r$ and $|Y|=n-r$?  I suppose the graphs on $X$ and $Y$ are then complete graphs, for a total of $\binom{r}{2}+\binom{n-r}{2}$ edges. Simplifying, this is $\frac{2r^2+n^2-2rn-n}{2}$, so I'm trying to show $$ \frac{2r^2+n^2-2rn-n}{2}\leq\frac{(n-1)(n-2)}{2} $$ to get the contrapositive.   The above is equivalent, if my algebra is correct, to showing $r\geq\frac{n-1}{n-r}$ for any $0\lt r\lt n$. This seems reasonable, but I can't quite show it. How would I do so?  Thanks.  I'd also be happy to see a solution that doesn't necessarily make use of the hint.


I'm trying to make an ASCII table with binary numbers included, but I have no clue how. Here's the code. int main() {     unsigned int hi;     printf(" D | H | O | B\n");     for (hi = 0; hi <= 255; ++hi) {         printf("--------------------------\n%d | %x | %o | %b | %c |\n", hi, hi, hi, hi , hi);     } }  I want to add binary numbers where %b is. Thank you.


A million dollars "is" still needed, or "are" still needed?

Suppose that I'm trying to raise money for a fancy black tie gala, and I want to let the guests know how far we still are from the goal.  Should I say     One million dollars is still needed to reach our goal.   or     One million dollars are still needed to reach our goal.   I've heard people say it both ways and neither of them sound outright wrong.


What's the simplest way to print a Java array?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


How to remove a gap between two rows in longtable

Good afternoon  I would like to change gap between two rows (the picture below) in longtable because it doesn't look very nice and I want to save a place. I don't know how to do it.   Thanks for help.   \documentclass[10pt,a6paper]{book}  \usepackage[utf8]{inputenc} \usepackage[main=english,slovak]{babel} \usepackage[cm]{fullpage} \usepackage[a6paper, top=10mm, left=10mm, right=10mm,     bottom=10mm,foot=5mm,marginparsep=0mm,showframe]{geometry} %showframe \usepackage{tipa} \usepackage{tabularx,booktabs} \usepackage{multirow} \usepackage{rotating} \usepackage{graphicx} \usepackage{array} \usepackage{color} \usepackage[dvipsnames]{xcolor} \usepackage{longtable} \usepackage{lscape}  \usepackage{enumitem} \usepackage{tabularx,booktabs} \usepackage{enumitem} \usepackage{mathtools}  \begin{document} \catcode`\-=12 \sloppy  {\small  \begin{longtable}{llp{5cm}}   \toprule   {\sffamily some text}   & \textsl{some text}  &                                             \setlist{nosep,topsep=0sp,label=--}                             \vspace{-\baselineskip}                             \begin{itemize}                               \item[-] some text                               \item[-] some text                               \item[-] some text                             \end{itemize}\\ {\sffamily some text}   & \textsl{some text}  &                                             \setlist{nosep,topsep=0sp,label=--}                             \vspace{-\baselineskip}                             \begin{itemize}                               \item[-] some text                               \item[-] some text                               \item[-] some text                             \end{itemize}\\   \toprule \end{longtable}} \end{document}


Why could Mad-Eye Moody see through the Invisibility Cloak using his Magical Eye?

In the film and book series, Year 4 (Goblet of Fire), how is it Mad-Eye Moody/Barty Crouch could see Harry through his Magical Eye even when he was under the Invisibility Cloak?  As the cloak is a True Invisibility cloak, immune to charms and spells, and according to legend invisible to even Death, how did Mad-Eye detect Harry Potter under the cloak? How Nagini and Mrs. Norris were able to sense Harry were through other senses, such as smell and warmth, but not visually.  I'm referring to the scene/chapter where Snape follows Harry at night. Harry hides under the Invisibility Cloak but his foot is stuck at the broken staircase. Eventually Mad-Eye arrives, sees Harry through his Magical Eye, and talks Snape away.


Ubuntu gets stuck at this after upgrading to 18.04: TSC_DEADLINE

I am extremely new to Ubuntu, and upgraded my OS for the first time.  It seemed to go fine until I rebooted and came face to face with this error:  TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x25 (or later)   I so far have tried using the recovery option, but I'm not sure if my GRUB is up to date because the recovery mode seems to display earlier versions of my Ubuntu boot.  Also, in other questions they have used commands and such, but I don't know how to run them when I can't even boot into my Ubuntu install.  Any help is appreciated.


Which standard objects don't support triggers?

When architecting a solution, I often find myself wanting to know which (of the less-used) standard objects support triggers.    Does anyone know of a single compiled list of standard objects that are not triggerable, for quick reference?  The emphasis here is on quick reference.


How should pronoun-only edits be handled?

Currently there are multiple posts on main page bumped up by edit saying     My pronouns are He / Him   I just answered on  before looking at the date it was asked - no changes since 2015 except automatic http -> https replacement.  It's actually uncomfortable to answer a question and then find out, it's obsolete for almost 5 years, then go to another one, look at dates and understand that it's in the same state too.  Is such behavior considered correct? If yes, it would be nice to have some feature to exclude such edits from the main page.


I would like to remove a small portion (around 10 seconds) of a long video (2 hours). How can I do it using FFMPEG?


Sacrificing a creature you don't own but you control

I use a  and exile a  from my opponent's deck. I cast Kroxa, but then of course would have to sacrifice it because it wasn't escaped. Would it go back into my opponent's graveyard or mine? Am I able to escape it without the correct mana still?


I would like to add an array in another array but randomly, I would like the items of my second array to mix with the items of the first array simply, how to do? I searched everywhere but no response


What is projection of WGS84 in GIS software?

WGS84 is a reference ellipsoid that determines coordinates of every point on Earth using latitude, longitude and height about the its surface.  This ellipsoid is often used as a base to make maps. Though, to make a map on a flat paper or a flat digital screen you need a projection too. An example of a popular projection would be UTM.   Mainstream GIS software give plethora of projection alternatives to display your data layers. Among them, they also let you display your data using WGS84 only.  I think they are using a certain projection but what projection is that?


Why do I get unexpected behavior in Python isinstance after pickling?

Putting aside whether the use of , I have run into the following conundrum when trying to evaluate isinstance after serializing/deserializing an object via Pickle:  from __future__ import with_statement import pickle  # Simple class definition class myclass(object):     def __init__(self, data):         self.data = data  # Create an instance of the class x = myclass(100)  # Pickle the instance to a file with open("c:\\pickletest.dat", "wb") as f:     pickle.dump(x, f)  # Replace class with exact same definition class myclass(object):     def __init__(self, data):         self.data = data  # Read an object from the pickled file with open("c:\\pickletest.dat", "rb") as f:     x2 = pickle.load(f)  # The class names appear to match print x.__class__ print x2.__class__  # Uh oh, this fails...(why?) assert isinstance(x2, x.__class__)   Can anyone shed some light on why isinstance would fail in this situation? In other words, why does Python think these objects are of two different classes? When I remove the second class definition, isinstance works fine.


How to flag a link-only answer to make it land in Low Quality review queue?

In the review queue, I see posts flagged as link-only answer and I can recommend deletion with that reason.  But normally, I can't find the option to flag something as link-only answer. There's only 'not an answer' and ' very low quality' reason. How should I flag something, that it could be deleted as link-only answer through the review queue?  How the answers land in the queue in which they can be deleted as link-only?   and  are somewhat related, but not duplicate posts. These are discussions about making separate flag for link-only answers, but they do not explain how the answers land in the queue in which they can be deleted as link-only.


Why do the lightsaber moves of Luke Skywalker look so uncoordinated and crude compared to the prequels?

In the prequel trilogy of Star Wars (the more recent three), the swordsmanship of the actors is very coordinated and fast. There's lots of aerobatics and fast swordplay; generally impressive (albeit sometimes over-the-top) performances.  But in the original trilogy, Luke Skywalker's swordsmanship appears to be an aimless, desperate swinging motion in nearly every scene. He flails the lightsaber back and forth like a wild boar. It's astounding that Vader didn't quickly put him out of his misery.  Here's what I mean:                                 Is there some sort of explanation as to why Luke's skills are so poor? Does it have to do with the story element, or is it to do with the film itself?


How to import .py file from another directory?

I have this structure of files (directory and after arrow files):  model -> py_file.py  report -> other_py_file.py   main __init__.py:  import model import report   model directory:  import py_file   report directory:  import other_py_file   now in other_py_file I want to import py_file, but what ever I try I give error that there is no such module.  I tried this: from model import py_file  Then: import py_file  Looks like these two folders don't see each other. What is the way to import file from other directory? Do I need to specify some additional imports in init.py files?


How to use Fields in the Field Calculator?

I'm using the Field Calculator in ArcMap and I need to create a unique ID for every storm drain in my county. An ID Should look something like this: 16-I-003  The first number is the municipal number which is in the column/field titled "Munic"  The letter is using the letter in the column/field titled "Point"  The last number is simply just 1 to however many drains there are in a municipality.  So far I have:  rec=0 def autoIncrement() pStart=1 pInterval=1  if(rec==0):   rec=pStart  else:   rec=rec+pInterval return "16-I-" '{0:03}'.format(rec)   So you can see that I have manually been typing in the municipal number, the letter, and the hyphens. But I would like to pull the first number and letter from the fields: Munic and Point so I don't have to manually type them in each time it changes.  I was hoping I could just put !Munic! and !Point! in my return statement before the .format(rec) or somehow work it in there.    I'm a beginner when it comes to python and ArcMap, so please dumb things down a little. The simpler the better!


how drupal decide execution order of same hook in different modules?

if there is two modules A and B and both have same user_login hook. so when i log in. out of A_user_login() and B_user_login() function which one called first.and how drupal decide execution order of these two function


Locked out of Gmail account/I have tried too many times

I have been locked out my Gmail account for the last 36 hours because Google complains that I have tried to log in too many ways. I have three different devices home so that would stand a recently yes. I've used every way I can begin packing because I don't remember the password that was reset three days ago.


I am using windows 7 in my machine.  My pendrive got corrupted while i was using it.  so i just removed the pen drive, then again when i inserted my pendrive it was showing as some other unrecognized format..  so i just started the formatting the pen drive.after few minutes it gave an error.  WINDOWS WAS UNABLE TO COMPLETE THE FORMAT  What should i do for this?


No startup / boot chime; how to bring it back?

I'm one of the lucky (?) guys who managed to get a new MacBook Pro 2016 (the version that introduced the Touch Bar).  This MBP model does not have a boot chime by default.    , specifically going to Terminal.app and typing in:  sudo nvram BootAudio=%01  Unfortunately for me, this fix does not work on my own machine. .  My guess is that it's a firmware fix or enhancement that got rid of BootAudio as an option.  Does anyone know a different option to re-enable the startup chime?


Can I break down a weapon into mods (not junk)?

Let's say I have 10mm pistol. Can I break it down so I'm left with no pistol, and a [barrel, magazine, sight, grip] etc?  I ask because I'm finding myself in the early game with mods across 3-4 pistols that I'd like to combine into one, but I lack the extra junk/spare mods to swap things around.


What is the climate like in September this year in Toronto?

I am planning to rent a convertible when I am in Toronto this September, and drive around with the top down. My worry is whether the climate will be suitable for this?


Blender 2.8 eevee render light too bright than cycle

I use simple plane object with black material and put a point light above the plane. THe result is when using eevee , the light reflection is way to bright. (see the attachment : top image is cycle, bottom image is eevee). Is this my graphic card or any setting that i need to change ?  Thanks


My friends and I are visiting the Schengen area, specifically Italy (1.5 days, 2 nights), France (3 days, 3 nights) and Belgium (3.5 days, 3 nights), in that order.  Assuming that the duration of the longest stay is counted in nights, it would be either France or Belgium, is there any way to specify Belgium as my "main" destination? Or since we're going to France first, should we apply for a visa at the French consulate?


My phone broke and I can not afford to purchase a replacement but I need to access my information backed up on my icloud,  How do I download my backed up iphone files from icloud directly from my windows based pc


hi guys can you help me with this? Proof that expression is integer $$\frac{(2n)!}{2^nn!}$$


Translating Visualforce Page to Lightning Component (Where to put  tags?)

I have many  tags in my visualforce page, and am attempting to translate it to a lightning component. My  tags are necessary because I need Kendo templates wrapped in script tags.   I got an error saying I can't have script tags in the component, so I moved all of my javascript to the Controller, and it says invalid character '<', which is referencing the '<' on .  Am I not able to just throw all of my Javascript (there is a lot......) into the controller and have it function correctly? If not, how do you include  tags in a lightning component? Where do you put them?


How do you draw the "snake" arrow for the connecting homomorphism in the snake lemma?

How does one draw the "snake" arrow for the connecting homomorphism when using the ?  I'd also be interested in drawing similar arrows act as "carriage returns" when considering a long exact sequence of cohomology.  I'm sorry if this is a little vague. I'm hoping that someone who's already done this might be willing to share a template. I'd prefer things in xy-pic, but would also be interested to see other ways it can be done.


Is there a normalizer for undergrad grades in institutions across the world?

I could swear I once saw somewhere in under duke.edu a pdf that lists undergrad institutions across the world with a way to interpret their grades qualitatively. I can't find it anymore. Is there any other document that tells for various institutions how to interpret their grades?


Update previously undefined variable for asynchronous callback function in JavaScript

Let's have a look at this short JavaScript snippet:    function _function(param1, param2) {   console.log(param1 + " and " + param2); }  function test(callback) {   var i = 0;   var j = undefined;   var test = setTimeout(callback.bind(null, i, j), 1000);   i = 1;   j = 2; }  test(_function);     Now it works as expected: console.log is going to display      0 and undefined   Is it possible to only update j (here: to 2) while keeping i equal to 0 within _functions's scope  and without using j as a global variable ?


Is it ok to take a 2-month-old baby out on fresh air?

Is it OK to take a two-month-old baby out in fresh air and cool weather (14 C, 57 F) if properly warmed by adequate clothing? How long can the baby be outside?


I am selling some monthly basis services like website hosting. And I like to get prepaid payment for every month. So, how do I send email to my clients for notification by email to give payment for coming recurring date?  For example - A client purchase a digital service from our website in 5th of Jan. Next recurring payment date should be 5th Feb. So, I like to send recurring payment reminder before 15 days, then before 10 days (if not paid), then before 5 days (if not paid), then in the recurring date i.e. in 5th Feb.  I have install drupal 7, commerce recurring framework module, rules, rules scheduler. Currently I am stuck with how to send periodic email to my client for recurring date, after they have initially pay for the services?  Is this module is perfect for this - . I think this module -  is not sending email reminders. Specially I am looking for email reminders which will work with commerce recurring framework.  So, how can I do this?


I have problem understanding the direction of the shear stress

Is it in the direction of the velocity ?   If it is, can anybody describe it somehow that matches my physical feeling?   How the shear stress affects another layer of fluid ?   I faced a question today that fluid is moving alongside a horizontal tube and and if we write momentum equilibrium we must omit gravity force because it is not in the direction of the velocity, but what about shear stress ?


How to copy cell value twice in another column

How can I copy values in cell twice in another column? The values are in column A and I want them have copied in column B, like this:     A B 0 0 1 0 2 1 3 1   2   2   3   3   etc etc etc  EDIT: I saw it looks different when the question is posted, therefore I added a photo.


I have the following two numpy arrays:  a = array([400., 403., 406.]); b = array([0.2,0.55,0.6]);   Now I would like to create a dictionary where the array a acts as keys and b as corresponding values:  dic = {    400: 0.2,   403: 0.55,   406: 0.6 }   How could I achieve this ?


When should custom-properties be used instead of 'bpy.props'?

Python has two ways to define your own properties.    Via bpy.propsAccessible from data-editor, or via buttons defined in scripts:  # define the property bpy.types.Scene.my_prop = bpy.props.BoolProperty() # set the property bpy.context.scene.my_prop = True     Via Python's __getitem__/__setitem__Accessible from custom-properties panel:  # no need to declare it.  # set the property bpy.context.scene["my_prop"] = True     What should be considered when choosing which one to use?


Learning from Unix Programming Environment

I've got the Unix Programming Environment book by Kernighan & Pike, copyright 1984.  The book says that you need the Unix programmer's manual while reading the book. The preface of the Unix Programming Environment book  referenced a quote from the Unix programmer's manual 2nd edition June, 1972. Does anyone know if that means that  that is the edition of the Unix programmer's manual, I should use and/or whether I can use that edition of the manual? If not so, which edition of Unix programmer's manual should I use, for that edition of the Unix programming Environment book? I think that maybe someone that read the book, might be more helpful, telling me the manual edition they used.  Finally I've a Windows machine, does anyone know the best option for me to be able to use a Unix terminal, while reading this book


How to derive this Combinatorial identity

I was in my Combinatorics class the other day, and at some point in a problem, we needed to know $$\sum_{n=1}^{m} n 2^n.$$ Someone in class looked it up and proved what it was by induction, but I was wondering how we can derive what th actual identity is.