Why is Diffie Hellman used alongside public keys?

I just read this post here:  that asserts that in public key cryptography when asymmetric keys are used to secure communications, for parties to agree on a common shared secret, the following method is used:     So, say you want to send me a very long message, using asymmetric   encryption. Here's what you'd actually do:      (1) Pick a random key for use with a symmetric (fast) cipher. Encrypt   your message using that (fast) cipher and key. Send me that encrypted   message.      (2) Then use asymmetric (slow) encryption to encrypt the following   message and send it to me      "Hi, I just sent you a message encrypted using the BLAH   symmetric   cipher with key ABCDE123456."   So, you use your peer's public key to encrypt a shared secret, send the peer the encrypted secret, and then the peer decrypts the secret with his or her private key. In this way, you can use the big certificates to authenticate parties as well as use them to establish a shared secret.   This makes sense, but i have to be missing something. Why/how would DH be used here as well? I see that there are plenty of schemes like RSA2048 that have large keys, which i assume would be used in this way above, but also incorporate DH in their cipher suite:RSA_DHE, ECDHE.   What benefit does the DH component add? What can it do, now that we can establish a shared secret with the public keys in the certificates?


Windows folder and User folder only 10% of disk usage

My Users folder and the Windows folder, actually all my files together are suppossedly 123 Gb. The "pie" graphic at Hard Disk properties says, I'm using almost 500Gb. I know there's some people that had a similar problem, but all I found on the web or here, is something like "All my files together make 60 Gb and the pie says I use 75"... I think this isn't my case (in my case it is almost five times a difference!!)


Show that $\left(\bigcup_{i \in I}A_{i}\right )^{c}=\bigcap_{i \in I}A_{i}^{c}$

I'm learning for a test and I think there will be some task similar to this one. I'd like to know if I did it correct and if not can you please say how to do it correctly?     Let $\Omega$ be a set, let $I$ be an index-set and let $A \subseteq \Omega$ and $A_{i} \subseteq \Omega$ for all $i \in I$.      Show that $$\left(\bigcup_{i \in I}A_{i}\right )^{c}=\bigcap_{i \in I}{A_{i}}^{c}$$   We defined this in our readings:  Complement: $A^{c} \equiv \bar{A}= \left\{x \in \Omega; (x \notin A)\right\}$  and $$\overline{\bigcup_{i \in I}A_{i}}=\bigcap_{i \in I}\overline{A_{i}}$$  I did it like this:  $$\left(\bigcup_{i \in I}A_{i}\right)^{c}=\overline{\bigcup_{i \in I}A_{i}}=\bigcap_{i \in I}\overline{A_{i}}=\bigcup_{i \in I}{A_{i}}^{c}$$


Composition of measurable function and continuous function

Given an example of a continuous function $\phi$ and a lebesgue measurable function $F$. both defined on $[0,1]$, such that $F\circ\phi$ is not lebesgue measurable.


I have ssh configured for my system. It was working perfectly but now I'm able to ssh or sc to other systems but other systems are not able to ssh or scp to my system it shows connection timed out error. Please Help.


$ sudo apt-get install python3-aptdaemon Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  python3-aptdaemon.gtk3widgets :  Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19) but 1.1.1+bzr982-0ubuntu19.1 is to be installed  E: Unmet dependencies.  Try 'apt --fix-broken install' with no packages (or specify a solution).


Find the number of positive integers less than $1000$ of the form   $$\frac{(x+y+z)^2}{xyz}$$  where $x,y,z$ are positive integers.    Usually I have lots of ideas on how to solve a problem, and I include them in the post to show that I have thought a bit about the problem and so that others can build off my ideas if possible. But on this problem I must admit I am stuck. I can think of two possible approaches: (1) treat this as a Diophantine equation to characterize all triples $(x,y,z)$ such that $xyz|(x+y+z)^2$, or (2) to play around with the problem, try to find a class of numbers that are representable. I have made only trivial observations: If $n$ is representable, then scaling $x,y,z$ gives that all factors of $n$ are also representable. Also, if a prime $p|x$ and $p|y$ then $p|z$, so we may assume that $x,y,z$ are pairwise relatively prime. I believe bounding the numerator or denominator may be the way to solve this.


Is there any easy way to resample 30 meter NDVI from Landsat 8 images to 5 metres?  I use raster to point and the interpolation of point to raster using Kriging method.   I know that it may not be a proper way of  getting 5 m NDVI but for the purpose of demonstration I need to do.


bijective continuous function on $\mathbb R^n$ not homeomorphism?

Suppose we have a bijective continuous map $\mathbb{R}^n\to\mathbb{R}^n$ (relative to the standard topology). Must this map be a homeomorphism?  I have little doubt about this. I think that if it happens, I guess it's true, I've heard it is true, but I can not prove it.


Number of integer roots possible of the following polynomial

Let $p(x)$ be polynomial with integer coefficients, such that $p(0)$ and $p(1)$ are both odd. What is the maximum possible number of integer roots this polynomial can have?


I'm trying to make my own WYSIWYG editor. Is there any way, how to get the text which has user selected in textarea?   For example, if user selects some word and then clicks button, how do I find out which text was selected?   I'm using jQuery.


How to sort a List by two criterias in C#

I am currently developing a phone book in our Intranet (ASP.NET) that pulls out information from our Active Directory and stores them in a List  We have several branches in the country, and i need the employees to be shown grouped by branch, which i did using the following:  lstADUsers.Sort(delegate (MyUser x, MyUser y) {   return x.Branch.CompareTo(y.Branch); });   The problem is that i also want to apply a second sort, so employees are shown ordered by branch name and then in order of relevance (job position). So i want to show vicepresidents first, then managers, then engineers and such... I currently don't have that sort order stored anywhere, so i though of assigning each job position some kind of weight or priority and store it somewhere (database? map?)  I would appreciate any help in this matter. Thanks  EDIT: i would like an efficient method to store the weight of the second property. Right now i solved this by creating a property type int and then assigning weight manually with the following code:  if (objUsuarios.Cargo.Contains("something")) {     objUsuarios.OrdenCargo = 1; } else if (objUsuarios.Cargo.Contains("another thing")) {     objUsuarios.OrdenCargo = 2; }   and in my delegate i am using a triple sort, first by branch, then by job, then by employee name:  lstADUsers.Sort(delegate (Usuario x, Usuario y) {     int valor = x.Piso.CompareTo(y.Piso);     if (valor != 0)         return x.Piso.CompareTo(y.Piso);     else     {          int valorordencargo = x.OrdenCargo.CompareTo(y.OrdenCargo);         if (valorordencargo != 0)                                       return x.OrdenCargo.CompareTo(y.OrdenCargo);         else         {             int valornombrecargo = x.Cargo.CompareTo(y.Cargo);             if (valornombrecargo != 0)                 return x.Cargo.CompareTo(y.Cargo);             else             {                 return x.Nombre.CompareTo(y.Nombre);             }         }     } });


Why do I get "Permission denied" when redirecting the output of sudo echo "xyz" to a file?

Why do I get   -bash: test: Permission denied   when I run   sudo echo "xyz" > test   The directory permissions are:  drwxr-xr-x 3 root root 4096 2014-08-05 16:26    I have no problem creating a file in the directory using sudo.  But why can't I sudo echo into it?


Why is K-fold cross validation bad for time series?

If you are about to answer "because k-fold incorporates future information", I'm going to challenge you on that answer :)  If my time series exhibits some pattern (e.g. annual seasonality), that pattern must obviously occur every year, in the past and in the future.  For example, if some summer seasonality appears in the 2017 data, it should also appear in 2010, or in 2007, etc. Otherwise it's not really a pattern!  But if seasonality appears every year, then training the Model on chunks of future data and validating the Model on chunks of past data, should be fine as well.  So cross-validation rocks on time series too, right?


How can I use regex wildcard in assertion?

I am trying to do a general Assert.AreEqual call on some details in a table header, however I am struggling figuring out how to successfully format the expected results. The return value on the GetTableHeader call is as follows:  "× •••\r\nAcme Health Fund\r\nBalance Date: 9/27/2017"   I ONLY want to assert that the Acme Health Fund text is present. My current call is this:  Assert.AreEqual("/.*Acme Health Fund.*/" , GetTableHeader() );   How can I format my first parameter in the AreEqual call to ONLY expect "Acme Health Fund"?


Solving an integral using residue theorem

Do we have any residue formula to value the integral:  $$\int_{0}^{2 \pi}\frac{\sin^2 x}{ 5 + 4 \cos x} dx$$  I mean without finding out the pole and applying  the residues theorem each time.  Any fast and convenient approach will be appreciated.  I have found a very useful formula which is $$\int_{0}^{\infty}\frac{dx}{1 +x^n}= \frac{\pi}{n} cosc \frac{\pi}{n}$$  I can evaluate a lot of integral using the theorem.


Installing the development files libqgis-dev in Ubuntu 12.04

I am trying to install development files which include the headers and the libraries for qgis in Ubuntu 12.04. I used Ubuntu software center, synaptic and the terminal and am still getting the same result.  The following packages have unmet dependencies:  libqgis-dev:  -Depends: libgeos-dev (>= 3.0.0) but 3.3.3-2~precise2 is to be installed  -Depends: libgsl0-dev but it is not going to be installed  -Depends: libqgis1.9.0 (= 1.9.0+git20120902+5a0d2f5~precise-ubuntugis1) but 1.9.0+git20120902+5a0d2f5~precise-ubuntugis1 is to be installed  -Depends: libqt4-dev (>= 4.4.0) but 4:4.8.1-0ubuntu4.2 is to be installed  -Depends: python-qt4 (>= 4.1.0) but 4.9.1-2ubuntu1 is to be installed  -Depends: python-qt4-dev (>= 4.1.0) but it is not going to be installed  -Depends: qt4-designer (>= 4.4.0) but 4:4.8.1-0ubuntu4.2 is to be installed  Can anyone help me with this installation?  Thank You.


I am making a simple Discord bot with Node and I'm having an issue with Sqlite module. My sqlite database definition looks like this:     create table rooms (     id integer not null         constraint rooms_pk             primary key autoincrement,     channel_snowflake integer not null,     owner_snowflake integer not null );  create unique index rooms_channel_snowflake_uindex     on rooms (channel_snowflake);  create unique index rooms_id_uindex     on rooms (id);  create table room_users (     room_id integer not null         constraint room_users_rooms_id_fk             references rooms             on update restrict on delete cascade,     user_snowflake integer not null );   And I have the following data in my database:  I need to execute this query to get IDs of the channel owner and its members:  select owner_snowflake, room_users.user_snowflake from rooms          left join room_users on rooms.id = room_users.room_id where channel_snowflake = '702042586092667000'   When I execute it in the database, I get the following (corrrect) result:  But when I try to execute the same query in Node, I get different results: Here is my code:    rows = await db.all(`select owner_snowflake, room_users.user_snowflake                      from rooms                        left join room_users on rooms.id = room_users.room_id                      where channel_snowflake = '702042586092667000'`); console.log(rows);   And the results I get are as follows:  [   { owner_snowflake: 255371734771826700, user_snowflake: 1 },   { owner_snowflake: 255371734771826700, user_snowflake: 423 },   { owner_snowflake: 255371734771826700, user_snowflake: 5675 } ]   As you can see, the results are different and Sqlite module outputs channel_snowflake instead of owner_snowflake. Am I missing something? How can I fix this?  Thank you!


Do I need Transit visa of Finland even I have Schengen Visa?

I am an Indian citizen traveling to Denmark. I have a connecting flight from Helsinki (Finland) to Denmark (stopover 3 hours in Helsinki). I have a Schengen Visa given by Denmark of Type C.   Question: Do I need Transit visa of Finland?


Insert a paragraph into a list that uses the whole text width

I want to insert a paragraph or possibly even a box with a background color into a list that uses the whole \textwidth. Something like this:  1st item     a subitem 1    b subitem 2  2nd item    a subitee  \begin{use the full width}    [ Here the text should use the full text width ignoring the list indent] \end{use the full width}    b subitem 3rd item   The list is a normal enumerate.


I am working with Java code in JSP and I am trying to compare strings and I am having problem with that.  I have declared two strings  s1 = "din"; s2 = "din";   However, the if (s1 == s2) never executes. Can someone help me?


How do I update NVIDIA drivers on Ubuntu 14.04?

I have a GTX 640 4 GB. I need help with drivers and how to install them please. I'm still very new to Ubuntu. I've been using it as my dedicated OS for about a week but I can't get my graphics card working properly.


i am trying to add a new line to a file using sed :  sed -i '/<field name="Users" indexed="true"/>/a <copyField source="New_user" dest="text"/>' $RTDIR/schema.xml   i get an error: unknown command: `>'  how can i make it work? and also, the change will be permanent?  Thanks!


Netbeans Autocompletion on PHP how to explicitly manipulate a class

I do know several posts exists on Netbeans and autocompletion, but none seems to give me the answer to the basic problem i'm facing:  if i do so:  use Project\Foo; $foo = new Foo; $foo-> //autocompletes properly all the methods   but if do so:  use Project\Foo; use Project\Bar;  $foo = $bar->getSomeObject(); $foo-> //doesn't show anything   I've been used to Visual Studio and VB .NET where the keyword AS simplifies the IDE to know which type to autocomplete  How can i explicitly inform Netebans autocompletion i'm manipulating a specific class ?  Any help or link to the same related topic would be much appreciated.


"Fake" 3d effect in Photoshop/Illustrator with raster images

I need to create a "fake" 3D effect for some raster image, like this one below:    do you know how I can achieve this in Photoshop (CS5) or Illustrator? Thanks.


I'm trying to use black fin 533, to create a delay of 1ms using one of its timers, I read the datasheet but I can't understand how to set a 1ms delay. here is the datasheet   Please I need clarification of timer width and timer period.


Javascript does not work when activated by element produced by javascript

I'm experiencing a seemingly simple but puzzling problem with javascript. Here I have two snippets; the two are almost the same, except that the yellow enter box of the latter snippet is produced by Javascript. The differences between the two codes are:

enter

 click the yellow box!
<textarea id="result"></textarea>         <button onclick="myfunction()">show</button>

<textarea class="txta" id="result"></textarea>       The yellow box of the second snippet is produced by: function myfunction(){ document.getElementById('show').innerHTML = ` <table><tbody><tr class="newdiv"><td style="background:yellow">enter</td></tr></tbody></table> click the yellow box! `; }  The second snippet generates the yellow box by a javascript function, and typing enter is functioned by jquery. My question is: why does the function work in the first snippet but not the second, although their differences (in my humble opinion) doesn't seem to affect the fuction itself?


Country boy goes to the city, encounters shooting galleries with live targets and true love

I'm pretty sure this was in an anthology of older stories that I read in a paperback in the 90s, although the book may have dated from when my parents were growing up in the 60s and the 70s. The protagonist is a country boy who goes into town. There a sort of a Coney Island setup with booths and items for sale. I remember there were prostitutes named something like "pork-upines" with vaginal openings scattered all over their bodies as well as a shooting gallery where you practiced on live targets, although I'm not entirely certain if they were robots of some sort, or genetically modified. The protagonist is horrified at the excesses of the city, but samples the wares of one of the prostitutes, falls in love with her, and buys her freedom.       Somehow, in the course of the story, he becomes disillusioned and he arranges for her to be a target at one of the shooting galleries. The story ends with him aiming his rifle at her.   I know it's a very vague description, but I'm hoping those salient points strike a memory in someone. It was in English. I read it while in the United States somewhere in the 90s, and I'm pretty sure it was one one story in an older paperback, the sort with the cheap paper that browns with age. It's also possible that it's one of the shooting gallery targets he purchases, although I'm pretty sure it was one of the prostitutes.


How to secure source code in an electron desktop application

Since source code is viewable in a electron desktop application is there a way to obfuscate or encrypt it? We are investigating electron for a future app but worried it can be reverse engineered. How would I prevent the source code from being viewed?


I'm having trouble of understanding the very basic concept of returning a value in functions (JS etc).  Why should I use  function add(x,y){   result=x+y;   return result; } add(5,3);   instead of  var result=0; function add(x,y){   result=x+y; } add(5,3);   I guess it's about saving memory, isn't it?


If in a commutative ring $R$ a maximal ideal is nilpotent, then $R$ is local

Let $R$ a commutative ring, and $M$ a maximal ideal of $R$. If there exists $n\in \mathbb{N}$ such that $M^n=0$, then $R$ is local.  In general, I have proved that $R/M^n$ is local with a unique maximal ideal $M/M^n$. But I don't see how to prove that $R$ is local.


These days, I have to use the NTFS-3G driver to write to an NTFS drive (which will later be used in Windows). But I still remember the olde times of Linux ntfs driver which clearly said in the docs: 'If you write to an ntfs volume, run our special program afterwards which will clean up the damage done.'  So, I read through the man, the docs, the Tuxera site and Askubuntu and found no discussion of the write-safety of NTFS-3G. The only thing that was mentioned somewhere is that the driver doesn't support the NTFS journal.  So, the question is, can I use NTFS-3G and be sure that I will later read what I have written to the files? Won't, for example, Windows find the journal entries missing and 'clean up' the data according to its own faulty understanding?


I have a large raster layer with wind speed values assigned to each cell. I also have point data that displays locations where wind farms have been constructed. I would like to add the raster values to the wind farm location data. The goal is to figure out when each wind farm was built over each wind speed value. Any ideas?


Let $(F_n)_{n\ge 1}$ be the sequence of numbers defined by $F_1=1=F_2$; $F_{n+1}=F_{n}+F_{n-1}$ for $n\geq2.$ Let $f_n$ be the remainder left when $F_n$ is divided by $5$. Then $f_{2000}$ equals $0$.   My Try: $F_3=2,F_4=3,F_5=5,F_6=8,F_7=13,\dots$  Then I subtracted $S_n=1+1+2+3+5+8+13+\dots$ from $S_n=1+1+2+3+5+8+13+\dots$ and got $0=1+0+1+1+2+3+5+8+13+\dots$ (Sorry, I can't $\LaTeX$ that properly.)  But, how to go further? How can we reach to conclusion that $f_{2000}=0$?


Does anything with non-zero rest mass and speed $c$ exist in the known universe?

As Einstein's theory tell us it takes infinite amount of energy to get something with a mass to reach the speed limit $c$.   How true is that when observed experimentally either in a laboratory or elsewhere in the universe?


pantograph file that says 'illegal copy'

I have a small publishing company that publishes, among other things, workbooks for elementary school. These workbooks are frequently copied and nowadays they are shared as pdf files on social media. In other words, the books hardly sell anymore. A few years ago, I received a Mercedes certificate of conformity via our car mechanic whereby the word 'copy' appeared when copying. After a long search I found out that it is a pantograph. Can you make me a pantograph file (for black and white printing) 18 cm (landscape) that says 'illegal copy'? Can I then simply put that image on top of the layout in indesign, make pdf and have it offset printed or digitally printed? If there is a cost to create this image, I would love to hear from you. I have no experience with TEX or something.


What are the elements of the dihedral group D(3)?

$D_3=\big<a,b| a^3=b^2=(ab)^2=1\big>$ and $|D_3|=6  $   $D_3=\{  1, a, a^2, b, ab, a^2b\} $  Are these correct?  Then so that I can compute the orders of all the elements of the group $D_3$


What's the best way to repave the family PC (running Win XP)?

I have a two-year-old system is badly in need of a repave. At startup there are messages about missing DLLs, and Firefox and a few other apps no longer work. I'd like to hook up an external disk, have everything copied to it, reinstall XP, reinstall the apps, and grab all the data back from the backup. Is there a good way to do this?


From the starting of the season.In season 1 episode 1 to the season 7 episode 6 we can clearly view that white walkers or army of dead can run fast and also can catch a running man with maximum speed (maximum speed here means a man running for his life). We can see them running or walking fast in the second last episode of season 7. So why they were so slow. This is a plot hole or there is some theory behind it?  Edit: This is not a duplicate question, that question which you are referring is not answering my question. My question is simple that why they are being shown at slow pace. Secondly in the duplicate question how people can speculate  that this is a war strategy. There is no such thing in white walkers like war strategy ever mentioned in the season.


Will clearing image cache delete images from phone?

In my Oppo A3s, in the settings app, there is an option to clear image cach(approx. 900mb).  I just want to know, if it will delete the image from the device(or sd card) or not.  Thanks.


So, I would like to ask those of you who have had this experience for some advice.   What book is best for GRE subject exam? I have noticed that some books online have mistakes, so I would like if you can give me specific publisher for GRE subject exam in physics book. I would appreciate any advice on how to prepare for it. How to get best out of my studying period?


How to label Table Header Label Date vs. Date/Time

I have a table with a date time column.  Right now the label reads "Closure Date" and it seems fine to me.   I was wondering it was better practice to label it something like "Closure Date/Time".  See this  for the example. Screen shot:    Option 1 is the current usage.  Two is the alternative.


I just started using tmux, and I really like it, but I need to be able to scroll within the buffers/panes/windows I have open. I don't care if it works with the mouse or not. When I search the tmux man page, I find only two instances of the word "scroll" even showing up, and both have to do with copy mode. Is there a way to scroll without all the overhead of entering copy mode?


The Normal Vector of two 3D vector's Cross Product

I am wondering why the cross product of two vectors in $\mathbb{R}^3$ would get the Normal Vector of the plane generated by them? I know it is the definition, but I am still wondering why we can get it just by calculating their cross product.  Is there any proof?    This is cross product of two vectors in $\mathbb{R}^3$ :  $$(a,b,c) \times (d,e,f) = (bf-ce, cd-af, ae-bd)$$


Delete all materials on all meshes and only add one default material to all meshes?

I want to delete all materials on all meshes and only add one default material to all meshes? I tried the "Copy Material to Others", but it's not working.  I still have some materials somewhere. Like this in the box:   EDIT: OK, I got it now. The problem was, that some objects were hidden. So the "Copy Material to Others" didn't worked. When you open the file, then first press "Alt + H" to unhide all objects. Then do the "Copy Material to Others". Save file and open it again.


Okay I have a VPS (DO 512 MB) and AWS RDS free tier . I wanna get the maximum performance , please help me cause I'm a little confused . I run a nginx server on the VPS and it can handle 1K traffic/Sec without much panic .  My problem is do I host the MySQL on the VPS or on AWS ? You migh say benchmark it , right !? I did , and here's the results (i have a pretty small database 500 Row , 15 columns ) i tested query executing time from my local location connecting to both of the servers .  i ran a big query to test them 4 times to be 100% sure of results ,both servers are optimized using the same parameters .   AWS -RDS - MYSQL    1st time :2.97 2nd time :2.88 3rd time :1.61 4th 4rd time :3.19   VPS - MYSQL   1st time :1.88  2nd time :1.81   3rd time :2.14 4th time :1.88   i get even faster VPS results executing queries Locally( on the VPS). and i got php+mysql test with Loader.io and here's the results too .    Even though the VPS mysql is faster in all ways but it uses a lot of system resources (5.7% MEM X 6 Process) .  is the speed difference worth the resources eaten from the VPS? any recommendation .


Estimating the true frequency of rare events

I have a dataset containing some hundreds of thousands of observations, out of which some small number contain an event of interest x. Let's say that my total dataset is large enough that I have a decent confidence in the overall frequency of x.  But what I'm really interested in is the frequency of x together with some other condition y, and the frequency of y in the dataset is much lower. The total number of observations of y doesn't give me enough data to make a confident prediction about how well it correlates with x, and the actual number of observations of x+y is often zero, even though the theoretical frequency of x+y must be something larger than zero.  So how can I estimate the true probability of x+y, given the overall frequency of x in the data set and the small-ish number of instances of y that I have?  Edit: I know that x and y are not independent, but at the outset I don't know anything about the nature of the relationship between them. The entire point of the exercise is to determine whether they have a positive or negative correlation.  Sorry, I know next to nothing about statistics and I don't know what the proper terminology is to describe this situation.


Display a list of names if today's date equals a date in any adjacent cell on the same row

My spreadsheet has "variant" names in Column B, and relevant dates in adjacent columns C-H on the same row. I have included a screenshot below I want to create formula that will display a list "variant" names when "todays's date" (today()) matches a date in the adjacent Columns C-H on the same row as the "variant" name. The list would be displayed in Column I. For example:  If today's date is, say, 26 March 2021 then (based on the data in the screenshot below) the list of "variants" would be those five names circled in red.  When today's date is 27 March 2021, the list of variants would automatically update to include only those five names with a value of 2021-03-27 (in the same row as the name) in one of the adjacent Columns C-H.   Normally some kind of vlookup/hlookup/lookup might do the trick, but this has to evaluate 6 date values and return the "variant" name from a column to the left of the date columns. Maybe a query or filter might be better since they could also apply to any new rows of data.


iconImages not working: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

I'm making a pet project with java GUI (netBeans) and while I was using ant, images worked properly. But I changed to maven since I don't know how to do tests work in ant with NetBeans. And the issue that I've encountered now with Maven is that image Icons keep creating this Exception.  I have this autogenerated code that creates buttons, actionEvents, listeners etc.  As I said, everything worked in ant but in maven it doesn't anymore. I'm using NetBeans. INeither do I understand exactly what to do with pom.xml, nor I know if I should put icons in another folder instead of "E:[...]\LeagueOfPokemon\src\main\java\icons". I don't mind ant or maven, I just want something that allows me to make tests and shows images. If someone knows what should I do please tell me.


Profile Page Makeover, Part 3: the Prototype returns

Update We have done a bunch of work following your feedback - just look at all those  tags on the different answers here! The top suggestion was to do something about the badge visualization - we have listened and completely redesigned that piece - check out the new and improved badge visualization, on the profile page. In the next few weeks we will preview further profile changes here on MSE - mostly to the activity page and following feedback and rework on those, the new profile page will go live to the rest of the network (6-8 weeks, give or take).  You may recall  - our profile page makeover prototype, the reloaded user page. We posted a prototype 6 months ago and got a lot of feedback. Since then, generations of dinosaurs were born, fell in love, had families and were eventually killed by a comet.  Or climate change, or maybe texting and driving or some nonsense like that. We picked up work again after a couple months of avoiding it ( or  of you noticed...) and started cleaning up some of the rough edges. We are looking to get this right and the change isn't urgent, so we are taking our time on it. We want to have something that is clearly better than the current page. What is all this about again? The user profile page was trying to address two fairly different use cases:  What is most valuable and useful when you want to see what someone else is all about. What you should see when looking at your own profile.  Because it was trying to solve both problems in one place, it was decent at both, but not great at either, and it probably was overall more optimized for the "looking at my own profile" use case. So, here's what's happening If you go to your profile on MSE right now, you'll see it now has two tabs in the top left:  The "Profile" page is your new public profile. It's what everyone will see by default when they click your picture at the bottom of a post or find you in the  list. It should communicate what you know and what you've done. The "Activity" page is intended to be your own personal dashboard, stuff that isn't necessarily of interest to others but that you want to see when visiting your own profile. Right now it's just the old profile page, but we'll be tackling that next and asking for feedback here on how to make it more useful. See for example the  and  pages of BalusC - the former shows you his overall activity on the site, the latter showcases him. Some of the things we changed based on your feedback: User info section:   We also added a new "people helped" counter based on the views your questions and answers have gotten. This is essentially a sum of views of your questions, and answers that fall within the following criteria: accepted, have a score of 5 or more, have more than 20% of total score of all answers on a question or are within the top 3 answers by score. No deleted posts are counted. Tags:   And some other tweaks and visual updates we can't quite remember - you can see . Unfortunately the very popular request to  didn't quite make it in -- but we may still come back to this later. Feedback We are looking for your feedback before this goes out to the rest of the network - what's broken? What's missing from the new page? What needs a bit of polish?


What is the correct way to say:  There are in total 485 devices spread over 46 accounts.  or   There is a total of 485 devices spread over 46 accounts.


Find the asymptotic tight bound for $T(n) = 4T(n/2) + n^{2}\log n$

Find the asymptotic tight bound in  $$ T(n) = 4T\left(\frac{n}{2}\right) + n^{2}\log n. $$  where $ \log n= \log _{2}n $ and $T(1) = 1$.  I should solve this using all three common methods: iteration, master theorem and substitution.  It is highly likely that this kind of recurrence equation will be in my test in two days. Thank you very much in advance!


What does the [Flags] Enum Attribute mean in C#?

From time to time I see an enum like the following:  [Flags] public enum Options  {     None    = 0,     Option1 = 1,     Option2 = 2,     Option3 = 4,     Option4 = 8 }   I don't understand what exactly the [Flags] attribute does.  Anyone have a good explanation or example they could post?


How can I have multiple colors and text of the /tellraw in Minecraft?

I'm using /tellraw to make myself be happy for my map on some of the stuffs i needed for command blocks, but I can't do some of the Multiple colors and text like from the other maps with the names "" and using colored chat. (By the way DrStranger is just an example, but I still need some help thou.)


Just out of curiosity : has the equation $$ x^r+y^r=z^r,\qquad(x,y,z)\in\Bbb Z^3,\quad r\in\Bbb R, $$ been studied? Any non trivial result for $r\in\Bbb R\setminus\Bbb N$ ?


I'm facing with the Fatal error: Maximum execution time of 30 seconds exceeded.  I'm trying to catch this error and show the error message to user but it seems that "try...catch..." in PHP can't handle this.  I have tried to use "register_shutdown_function" but not success, the script continue to run and display blank page.  $max_execution_time = ini_get("max_execution_time"); ini_set('display_errors', false); ini_set("max_execution_time", $max_execution_time * 0.8); register_shutdown_function([$this, 'shutdownHandler']);   ...  function shutdownHandler() {     $error = error_get_last();     if (($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)) {         ...     } }   Would anyone help me in this case?


Is there an option in algorithm2e to split the algorithm over several pages? Please no answer with "use algorithmic or listings packages". algorithm2e is the best package for algorithms in latex, so I want to get it running with this package.


How to interpret multinomial regression results?

I want to investigate the relationship between stock traders' past success rate (i.e. the number of total winning trades divided by the total trades executed) on the status of their current trading decision. The current trading decision is the dependent variable and is a categorical variable that takes the value of 1 if the trade is a win, -1 if it is a loss and 0 if the trader decides not to trade.  I am conducting a multinomial regression where the dependent variable is the current trade decision (1,-1,0) as mentioned above and the independent variable is the trader's historical success rate.   I choose a multinomial model rather than an ordinal model since, in my opinion, the 3 states are really independent. If the trader traded and made a profit of 0, then it would make sense to categorize the decision as an ordinal variable. But since trading (whether win or lose) is not the same as not trading then I argue that this should be a multinomial variable. Nevertheless, the relationship between win and lose is relative/ordinal. Is my reasoning correct here?  Given that no-trade is the baseline, I obtain the following results from the R output    I am not very clear on how to interpret the output in this case. I tried to follow the example . The R output states that these are coefficient values and not log odds. Does this mean that a 1 unit increase in historical success rate increases the log odds of winning by 1.224 and decreases the log odds of losing by 0.622? Or are these coefficients? How should I interpret the results?  UPDATE: R results  Call: multinom(formula = formula, data = data)  Coefficients:   (Intercept)           Success Rate Cummulative_NumTrades -1  -3.601953                 -0.622         -1.304052e-05 1   -4.660911                  1.224         -1.342798e-05  Std. Errors:    (Intercept)           Success Rate Cummulative_NumTrades -1 8.630168e-08           2.734970e-08          1.341129e-06 1  1.016195e-07           4.889536e-08          1.161023e-06  Residual Deviance: 392352.8  AIC: 392376.8


Get amount of reserved memory from an array

Consider the following case: int MyClass::MyMethod(char *myChar)  Am I able to get the amount of reserved space by myChar within memory (heap and stack) ? For example, if myChar points to the first element of an array called char myArray[10]: By use of myChar, can I get the amount of char that can be stored within myArray?


BASH getopts more arguments after option

how can I make getopts take 2 arguments after -h option? I mean it is supposed to be saved in array but either it doesn't work, or I am making mistake by writing it down like this: echo " ${array[1]}  ${array[2]}"    OPTIND=1      hh=     while getopts "h:" flag     do     case "$flag" in     h)     hh=($OPTARG)  ;;    esac    done    shift "$((OPTIND-1))"


Compact manifold without boundary is boundary of another manifold

Is it true, that a compact (topological?) manifold without boundary is a boundary of another compact manifold? Intuitively it looks like for most manifolds there must be some relation similar to $\mathbb{S}^n=\partial D^{n+1}$.  It looks like a very trivial question, though I can not find any reference.  Thanks.


I have tried to read the Wikipedia article but it is too confusing on what the current accepted standard is.  My questions are:   If a pawn makes it to the last row can they stay as a pawn? If a pawn makes it to the last row can they be promoted to a piece that hasn't been removed from the board e.g. 2 queens or 3 knights on the board?   If the last question is yes, do people normally carry around multiple sets with the same pieces?


I tried to change string,which looks like this : 4th of July 2016  The code I tried to run is:          Date d = null;         String[] formats = {"d'st of' MMMMM yyyy","d'nd of' MMMMM yyyy","d'rd of' MMMMM yyyy","d'th of' MMMMM yyyy"};         for (String format : formats) {             try {                 d = new SimpleDateFormat(format).parse(date);             }             catch (Exception e){                 System.out.println("Error in ConvertStringToDate s" + e);             }          } System.out.print(d.toString());   The error I was getting from the console:  Error in ConvertStringToDate sjava.text.ParseException: Unparseable date: "4th of July 2016" Error in ConvertStringToDate sjava.text.ParseException: Unparseable date: "4th of July 2016" Error in ConvertStringToDate sjava.text.ParseException: Unparseable date: "4th of July 2016" Error in ConvertStringToDate sjava.text.ParseException: Unparseable date: "4th of July 2016" Exception in thread "main" java.lang.NullPointerException     at MatchData.CollectMatch(MatchData.java:113)     at GetData.main(GetData.java:13)   Thank ahead to anyone who tries to help :)


How to draw Venn diagrams (especially: complements) in LaTeX

What I am up to is to write some exercises dealing with logical formulas for my students, like:     And the students should draw these formulas on . At the end of the lesson, I really would like to print the correct answer for them. I found a great resource on a forum thread at , which helped me a lot to make up some Venn diagrams with tikz, but have some problems with visualizing complements, like ~A.  A simple, modified version of the TeX file found on the forum linked above, can be seen below, which produces the following expression:    \documentclass{letter}   \usepackage{tikz}   \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}   \begin{document}     \begin{tikzpicture}       \begin{scope}     \clip \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \firstcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$A$};       \draw \secondcircle node [text=black,below left] {$B$};       \draw \thirdcircle node [text=black,below right] {$C$};     \end{tikzpicture}   \end{document}   Which looks like:    Could anyone please help me out plotting/defining some expressions dealing with complements? A nice example could be:    That should look like: (image from )    I do not insist on the red color :)  I would like to use the simplest possible solution, as I would like to mass generate the exercises with the help of . So any suggestion dealing with gnuplot, R or any other opensource packages is welcome. Thank you!    UPDATE (25/01/2011): added details based on answers.  Thank you @Leo Liu, you helped me a lot! I modified a bit the code you suggested to be able to color the area outside of the two circles also (in the H universe), but have no idea how to set a background to that polygon also. The code:  \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle (2,2)       (1,0) circle (1); \fill (0,0) circle (1); \endscope % right hand \scope \clip (-2,-2) rectangle (2,2)       (0,0) circle (1); \fill (1,0) circle (1); \endscope % outline \draw (0,0) circle (1) (0,1)  node [text=black,above] {$A$}       (1,0) circle (1) (1,1)  node [text=black,above] {$B$}       (-2,-2) rectangle (3,2) node [text=black,above] {$H$}; \end{tikzpicture}   And the image generated:    I will also look for even odd rule in the near future which does not make sense for me at the moment but looks really simple and promising!


Determining the slope of a DEM (SRTM-data) in QGIS

I'm new to QGIS and I have to calculate the slope of a DEM (I use srtm-data). I already detected the geoalgorithms toolbox and I also produced a raster layer with the slope using the tool "slope, aspect, curvature" (One can find it in Domain specific algorithms - Terrain analysis and geomorphometry). I used the 2. Degree Polynom (Zevenbergen & Thorne), which is the default. A visual check shows that the general location of slopes seems to fit (I compared it to Google Earth).  Now my problem is: I have no clue about the unit of the output. The pixels at the steepest slopes have values around 0.3.... I have never been to that area, but it is located in Southern Germany, in an area that is usually quite hilly. So I strongly doubt that the slope is only 0.3° in the steepest area. I have the assumption that it is just 30°, but I would like to check somewhere to be absolutely sure how to interpret the result (since it could also be percentage values). I find a lot of information about what the tool does, but never any site where the units of the output are clearly stated.  Does anybody know how I can find out the unit of this output?


I have two coordinates.   Lat:53.307718   Long:-6.230189  Lat:53.307708   Long:-6.229988   .  I then use the distance formula   distance = SQRT((Y2-Y1)*(Y2-Y1) +(X2-X1)*(X2-X1))   .  I put it points in.   distance = SQRT((53.307708-53.307718)*(53.307708-53.307718) +(-6.229988--6.230189)*(-6.229988--6.230189))   and it get a value of 0.000201  What is the factor to convert that point to convert to meters?  I but the two points into this website  and found the distance to be 12.92 meters. But when i do it then for the next point the factor isnt the same.


I was wondering if there's a rule against casting 2 cantrips on the same turn, one as an action and another one as a bonus action, to be more specific I'm playing a grave domain cleric and I was wondering if I can use let's say Toll the Dead (as an action) and Spare the Dying to stabilize a party member (as a bonus action) due to the "Circle of Mortality" feature that allows me to use that one cantrip as a bonus action.


Is it plagiarism when copying something that you have written before?

I am writing an essay and I have previously written and submitted an essay to a different professor about a similar subject. Would it be considered plagiarism if I copied my own exact sentences from my previous essay?


Confirming context menu entries via Enter when entering comments triggers comment to be posted

related:    While I'm not basically against this feature, it is annoying to press Enter from the context-menu (e.g. when verifying my spelling via FF, or pasting older clipboard entries via ) and realize that not only the effect I wanted (spelling correct, older entry pasted) occurs, but also my unfinished comment is posted.  (Please say this is not )


What order of precedence are events handled in JavaScript?  Here are the events in alphabetical order...   onabort - Loading of an image is interrupted onblur - An element loses focus onchange - The user changes the content of a field onclick - Mouse clicks an object ondblclick - Mouse double-clicks an object onerror - An error occurs when loading a document or an image onfocus - An element gets focus onkeydown - A keyboard key is pressed onkeypress - A keyboard key is pressed or held down onkeyup - A keyboard key is  released onload - A page or an image is  finished loading onmousedown - A mouse button is  pressed onmousemove - The mouse is moved onmouseout - The mouse is moved off  an element onmouseover - The mouse is moved  over an element onmouseup - A mouse button is  released onreset - The reset button is  clicked onresize - A window or frame is  resized onselect - Text is selected onsubmit - The submit button is  clicked onunload - The user exits the page   What order are they handled out of the event queue?  The precedence is not first-in-first-out (FIFO) or so I believe.


On a game show, the Monty Hall problem is being played. The contestant is told to pick a door, and he does, but just before being able to tell the host which door he picked, one of the doors that the contestant had not chosen gets knocked over by a poorly-hung light post, revealing a goat.   The host decides to continue the game, and asks the player to pick a door.  Does the player now have a 1/3 chance, a 2/3 chance, or a 1/2 chance of winning if he switches?    I don't understand why the chance after the event would be 1/2. Imagine that two Monty hall games are being played at once: one where the host picks randomly (chance of winning before entry of 1/2), and one where the host picks a door with a goat that the player has not picked (chance of winning before entry of 2/3).  In the random game, the contestant is asked to pick a door, and he picks door A where there's a goat. In the logical game, the contestant picks door A too, where there's another goat.  In the random game, the host (or the accident) randomly opens door B, revealing a goat. In the logical game, the host opens door B because he knows the other goat is there.  Now, both players are asked to choose a door. Why does the random game's player have a different chance of winning than the logical game's player?


Integer coefficient polynomial $p(x)$ has no integer roots of $\,p(0)$ and $p(1)$ are odd [Parity Root Test]

This came up an a training piece for the Putnam Competition and also in Ireland and Rosen.  The question posed was basically:  Let $p(x)$ be a polynomial with integer coefficients satisfying that $p(0)$ and $p(1)$ are odd. Show that $p$ has no integer zeros.  I&R give an example:  $p(x) = x^2 - 117x + 31$  and show (no problem) that for any $n$ whether even or odd, $p(n)$ will be odd. And claim that this shows $p(n)$ will never be $0$.  I can see, e.g., that $x^2 + 2x + 1$ will be odd substituting an even $n$ and even for an odd $n$.   But would appreciate help in understanding the underlying math and what is happening here.  Also, as a second part, can a general statement about the existence of an integer solution be made if $n$, even and odd, generates an even and an odd as in the last example.  I can see that if you look at these equations (mod $2$), you can distinguish whether there is an integer solution. And I would guess this is intimately connected with the question.  Thanks as always.


I feel like this is poor design. I have two wheelsets that are less than a year old which have damaged freehub bodys due to cogs digging in to the splines on the freehub. It's so bad that I can't remove the cassette spacer without filing down the splines. I had to use  pliers and chain whip to remove the cogs that were embedded in the freehub when trying to remove the cassette.  Most of the damage is on the center of the cassette as the largest 3 cogs are held together by carrier. I'm using a shimano 105 cassette and  Novatec disc hub and Velocity ATB convertible disc hubs (which were somewhat damaged in the same fashion, but not as bad as the novatec).  I'm using this bike for cyclocross, offroad exploring, light singletrack use, Rail trails and some road riding.    How can I prevent this damage to the freehub from happening?


FM Transmitter Circuit (range 3 km) on Multisim

I am new to the telecom simulations system specially multisim, which I am having a project that I want to simulate.  My project in (Analog Communications) is consisting to have FM Transmitter (Modulator) that accepts a generated signal (Sin, Cos) and get me the modulated output as a Graph.  I've found this FM transmitter circuit (3 km range):   ![two muppets][1]  and I am building that circuit on Multisim, and I failed. Because I faced many problems, first of, the variable capacitor symbol is weird here in the multisim, and the regular capacitor doesn't have variable options. Secondly, when I Use signal generator as (Sin, Cos), the output gets weird after 5 second of the simulation.  I want to show the input signal (before modulation) and the output signal (transmitted or modulated).  I guess my output result where not the as expected, as the signal (Sin with phase 90°) is giving weird result of few seconds of simulating.  Below are screenshots of the simulation results within time.          Any ideas how to edit or fix the above circuit to have this output is similar to what it should be?


Background in Motion Tracking isnt shown when rendered

When i render my video, i cant see the movie clip in the background, but in the camera. How can i render the video?  Thanks in advance.


I want to show that this series converges $$\sum_{n=1}^{\infty} \frac{i^n}{n}.$$ It is easy to see that it is not absolutely convergent. No use looking at the radius of convergence either.  Can Someone help me?


Equation (expression) parser with precedence?

I've developed an equation parser using a simple stack algorithm that will handle binary (+, -, |, &, *, /, etc) operators, unary (!) operators, and parenthesis. Using this method, however, leaves me with everything having the same precedence - it's evaluated left to right regardless of operator, although precedence can be enforced using parenthesis. So right now "1+11*5" returns 60, not 56 as one might expect. While this is suitable for the current project, I want to have a general purpose routine I can use for later projects. Edited for clarity: What is a good algorithm for parsing equations with precedence? I'm interested in something simple to implement and understand that I can code myself to avoid licensing issues with available code. Grammar: I don't understand the grammar question - I've written this by hand.  It's simple enough that I don't see the need for YACC or Bison.  I merely need to calculate strings with equations such as "2+3 * (42/13)". Language: I'm doing this in C, but I'm interested in an algorithm, not a language specific solution.  C is low level enough that it'll be easy to convert to another language should the need arise. Code Example I posted the  I was talking about above.  The project requirements altered and so I never needed to optimize the code for performance or space as it wasn't incorporated into the project.  It's in the original verbose form, and should be readily understandable.  If I do anything further with it in terms of operator precedence, I'll probably choose  because it matches the rest of the program in simplicity.  If I ever use this in a real project, though, I'll be going for a more compact/speedy parser. Related question    -Adam


PHP PDO -> SQL bad encode of czech language

im not new in php coding and have a problem. I need insert data to sql (czech language encoding).  I wanna input this string: +ěščřžýáíéůú  My DB output is: +ì¹èø¾ýáíéùú  So, im trying this solutions:  1) My config.php has this one:  header('Content-Type: text/html; charset=utf-8'); ini_set("default_charset", 'utf-8');   2) On top of the page is this meta-tags:   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  <meta charset="utf-8" />   3) When im connecting into db, im using:   @define("DB_Connect_Charset", "utf8");      $dsn = 'mysql:dbname='.DB_Connect_Database.';host='.DB_Connect_Hostname.';charset='.DB_Connect_Charset;   +  $this->pdo = new PDO($dsn, DB_Connect_Username, DB_Connect_Password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES ".DB_Connect_Charset));   Im trying some php functions like: iconv OR mb_convert_encode()  Database has utf8_czech_ci coding, when im trying to change it into windows-1251 or latin.. it doesnt help.  I spend a lot of time on stackoverflow and cannot find a solution about this problem, some problems will be deleted with SET NAMES UTF8.  Problem must be in part when im sending data to SQL, because if im put data manually into sql, im fetching it correctly.  Thank you for your time and help. Have a nice day!


Show the group $SL_2(R)$ is can be created by commutators

I want to show that $SL_2(R) = [SL_2(R),SL_2(R)]$.  I reduced the problem only show that the matrices $A=\{(1,x),(0,1)\}, B=\{(1,0),(x,1)\}, C=\{(x,0),(0,\frac {1}{x})\}$   are products of commutators.   How can I show this?  Help would be appreciated.


I can't find a booze barrel for the quest to get the dwarfs drunk and kill them in the slammer thing. Whatever it's called.


What benefit do plasterboard/drywall screws have?

I have some plasterboard screws like this:     However, without a drill I have a job getting them into the wall. Am I safe to use normal screws on hangings that aren't going to be taking a great deal of weight? In this case it is a rack of coat hooks.


Is the Golden Raspberry nomination the reason Katie Holmes didn't reprise her role?

I was reading Batman Begins (2005) , and was shocked to see that the movie got  for a  award for Worst Supporting Actress for Katie Holmes who played Rachel Dawes in the movie.  We know that Katie Holmes was replaced by Maggie Gyllenhaal in the sequel  which had me thinking that it may be because of the said nomination.  So, was Rachel Dawes role recast because of that nomination? If so, was it Holmes' decision or the filmmakers' (producers, director)?


Why can't a new user comment on questions?

I'm new here and wanted to help someone on Stack Overflow. The fact is I have a low reputation because I'm new, so I can't comment on a user's question... yet. I tried to help someone but had to put it in the "answer" box because it was the only way available to me.  That caused a "-1" that was explained to me because by "it was not an answer". As I think of it, the person was right and it seems fair. My question is: why can't we comment on a user's question when we have a low reputation but we CAN answer? I'd like to understand the logic behind it before stating that it should be allowed. :-) Thanks.


What should i use: var or explicitly type specify?

I use extension for VS named "ReSharper". It corrects my code and always says that i need to use "var" instead explicitly type specify. Why?  P.S. sorry for my english and check me please=)


Showing a compact metric space has a countable dense subset

I know that this is separable, but that has not been covered by the text at this point. I believe my proof (below) to be correct, but not very rigorous. Assuming that it actually is correct, could someone please help me make it more formal? (If it's not correct, please help with the proof). Thanks.  Proof: Let $X$ be a compact metric space. Let $B_n = \{B(x,\frac1{n}) : x\in X\}$. be the collection of open balls centered at $x$. Let $\{x\}^{(n)}$ be the set of centers for some particular $n$. Then by compactness of $X$, there are also a finite number of centers for a particular $n$ (corresponding to each open ball).   [This is where I have trouble properly saying what's on my mind:]  Consider $B(x,r_0)$, where $r_0 = \frac{1}{n_0}$. When we decrease the magnitude of $r_0$ to $r_1$, we must still be able to cover $X$. Meaning some open ball(s) must be "formed" where $B(x,r_0)$ was once "covering". So by adding open balls, we also add to our collection of centers. This means at $B(x,r_0)$, there was originally a point $y \in B(x,r_0)$ s.t. $B(y,r') \subset B(x,r_0)$ for some $r'$. That is, $B(x,r_0)$ contained another point of $X$. Thus, by definition, $X$ contains a countable dense subset.


Coefficients of the characteristic polynomial

Let $A$ be an $n\times n$ matrix. Then its characteristic polynomial is  $$\phi_A(x) = \det(xI - A) = x^n - (\operatorname{tr} A)x^{n-1} + \cdots + (-1)^{n-1}(\operatorname{tr}(\operatorname{adj}A))x + (-1)^n\det A,$$  where $\operatorname{adj}A$ denotes the  of $A$.     My question: Why are the coefficients of $\phi_A$ those shown above?   I can see why $(-1)^n\det A$ is the constant term, since $$\det(A) = \phi_A(0) = (0-\mu_1)\cdots(0-\mu_n) = (-1)^n\mu_1\cdots\mu_n,$$  where $\mu_i$ are the roots ($i=1,\dots,n$).  I also see why the coefficient of $x^{n-1}$ is minus the trace, since by Laplace expansion (along the first row):  \begin{align*}     &\det(xI-A)\\[10pt]    &= \begin{vmatrix}          x-a_{11} & -a_{12} & \cdots & -a_{1n}\\          -a_{21} & x-a_{22} & \cdots & -a_{2n}\\          \vdots & \vdots & \ddots & \vdots\\          -a_{n1} & -a_{n2} & \cdots & x-a_{nn}     \end{vmatrix}\\[10pt]     &= (x-a_{11})\begin{vmatrix}          x-a_{22} & \cdots & -a_{2n}\\          \vdots & \ddots & \vdots\\          -a_{n2} & \cdots & x-a_{nn}     \end{vmatrix} + \underbrace{a_{12} \begin{vmatrix}          -a_{21} & \cdots & -a_{2n}\\          \vdots & \ddots & \vdots\\          -a_{n1} & \cdots & x-a_{nn}     \end{vmatrix} + \cdots}_{\text{at most polynomial of degree $n-2$}}\\[10pt]    &=(x-a_{11})\bigg((x-a_{22})\begin{vmatrix}         x-a_{33} & \cdots & -a_{3n}\\        \vdots & \ddots & \vdots\\        -a_{n3} & \cdots & x-a_{nn}     \end{vmatrix}     +\underbrace{\underbrace{a_{23}\begin{vmatrix}         -a_{32} & \cdots & -a_{3n}\\        \vdots & \ddots & \vdots\\        -a_{n2} & \cdots & x-a_{nn}     \end{vmatrix}+\cdots}_{\text{at most polynomial of degree $n-3$}}      \bigg) + \cdots}_{\text{at most polynomial of degree $n-2$}}\\     &\kern10pt\vdots\\[10pt]     &=(x-a_{11})(x-a_{22})\cdots(x-a_{nn}) + \underbrace{\cdots}_{\text{at most polynomial of degree $n-2$}}\\[10pt]     &= x^n - (a_{11}+a_{22}+\cdots + a_{nn})x^{n-1} + \cdots\\[10pt]     &= x^n - (\operatorname{tr}A)x^{n-1} + \cdots \end{align*} (Let me know if there is a more elegant way to obtain this).   But what I cannot seem to prove is that the coefficient of $x$ is $ (-1)^{n-1}\operatorname{tr}(\operatorname{adj}A)$. Attempting to work with the Laplace expansion (as I did to obtain the trace above) is leading me nowhere.


List has more than 1 row for assignment to SObject on action button in a page from managed package

Installed a managed package, which contain simply 2 pages, controllers, styles, scripts etc. Then created a site using the a page within the package. When i clicked an action button, Received the exception ,      List has more than 1 row for assignment to SObject Error is in   expression '{!saveingData}' in page donation:donationform: (Donation)   An unexpected error has occurred. Your solution provider has been   notified. (Donation)   What will be the reason? Anything regarding the installation or configuration. Any help? Thanks in advance.


Exercise on Great Common Divisor and Prime Number

Let $p$ be a prime number and let $1 \leq n < p$ be a non-negative integer number.  Show that there exist $x,y \in \mathbb{Z}$ such that $n x + p y = 1$.


When I tried to install StarMade from  it told me The file '/home/gabriel/Downloads/StarMade-Starter (1).jar' is not marked as executable.  If this was downloaded or copied from an untrusted source, it may be dangerous to run.  For more details, read about the executable  any answers for me???


Single word for a pattern of behaviour where you keep swapping between possibilities

Some people don't have the ability to make up their mind. They keep swapping between two (or even more options). I'm not looking for a description of the type of person (like indecisive), but for a verb to describe this kind of behaviour.  Example sentence:     Bob's {swapping behaviour} is really annoying me!


Gnome shell: pressing the super key does not work

I am using 11.10 with Gnome 3.2 and completely loving it. On one computer it works like a charm, but on another computer the super does not show the activities window. Mousing over the top-left corner does bring up the window, so I am not totally blocked, but I am really missing being able to just press the key to get there.  Does anybody have a clue how I could fix this?  [update] In System Settings, Keyboard, there is an option to change the shortcut for Show the activities overview, but I can't set it to super (I guess because it is considered to be a modifier-key). Any idea how I can solve that?


Series Summation Problem $1+2+3+\dots+n=k$

Given the following formula, in order to obtain a given $k$, you need to   find the value of $n$.       $1 + 2 + 3  +\dots + n = k$   For example:  Given $k = 15$, The expression to be used will be: $1 + 2 + 3 + 4 + 5 = 15$  Here $n = 5$  Is there any formula to solve for $n$?


There set 2019-12-27, but print result is 2020-01-27. Is there mistake in the code?  public void testJavaDate(){     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");     Date checkInDate;     checkInDate = new Calendar.Builder()             .setDate(2019, 12, 27)             .build().getTime();     System.out.println("checkIn sdf: "+sdf.format(checkInDate)); }


What is keyboard shortcut to close terminal window?

I'm wondering if there is keyboard shortcut to close terminal window?


Open jInternalFrame at the centre of jDesktopPane

I am creating and application in Java using Netbeans. I have 1 jFrame on which there is few jmenus and a jdesktoppane and jinternalframes. Now my problem is I am not able to set jInternalFrame at the centre of jDesktopPane. I gor some help from  which is mentioned like this  Dimension desktopSize = desktopPane.getSize(); Dimension jInternalFrameSize = jInternalFrame.getSize(); jInternalFrame.setLocation((desktopSize.width - jInternalFrameSize.width)/2,     (desktopSize.height- jInternalFrameSize.height)/2);   I changed this according to my use like this -  Dimension desktopSize = this.getDesktopPane().getSize(); // Line No. 29 Dimension jInternalFrameSize = this.getSize(); this.setLocation((desktopSize.width - jInternalFrameSize.width)/2,     (desktopSize.height- jInternalFrameSize.height)/2);   But my code is throwing NullPointerException -     Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at newUserReg.(newUserReg.java:29)    at   smsMDI.mnuNewUserActionPerformed(smsMDI.java:278)     at   smsMDI.access$000(smsMDI.java:16)     at   smsMDI$2.actionPerformed(smsMDI.java:97)  at   javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)     at   javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)     at   javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)     at   javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)     at javax.swing.AbstractButton.doClick(AbstractButton.java:376)  at   javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)     at   javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)     at java.awt.Component.processMouseEvent(Component.java:6504)    at   javax.swing.JComponent.processMouseEvent(JComponent.java:3321)    at   java.awt.Component.processEvent(Component.java:6269)  at   java.awt.Container.processEvent(Container.java:2229)  at   java.awt.Component.dispatchEventImpl(Component.java:4860)     at   java.awt.Container.dispatchEventImpl(Container.java:2287)     at   java.awt.Component.dispatchEvent(Component.java:4686)     at   java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)     at   java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)     at java.awt.Container.dispatchEventImpl(Container.java:2273)    at   java.awt.Window.dispatchEventImpl(Window.java:2713)   at   java.awt.Component.dispatchEvent(Component.java:4686)     at   java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)    at   java.awt.EventQueue.access$000(EventQueue.java:101)   at   java.awt.EventQueue$3.run(EventQueue.java:666)    at   java.awt.EventQueue$3.run(EventQueue.java:664)    at   java.security.AccessController.doPrivileged(Native Method)    at   java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)     at   java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)     at java.awt.EventQueue$4.run(EventQueue.java:680)   at   java.awt.EventQueue$4.run(EventQueue.java:678)    at   java.security.AccessController.doPrivileged(Native Method)    at   java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)     at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)   at   java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)     at   java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)     at   java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)     at   java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)     at   java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)     at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)   If any one can explain or show me the right way to do this, that will be a great help for me.


What setting causes OS X to let you resize windows behind the dock?

I've set up my fair share of Macs over the years, but I've never been able to pinpoint what setting tells OS X that you're ok with being able to drag-resize a window vertically so that it goes behind the dock (assuming the dock is in its default position at the bottom of the screen), as opposed to only being able to resize it vertically so that it is touching the top of the dock's "space".  My work computer is a 21" iMac Core 2 Duo and it drives me crazy because I'll quickly drag-resize a window larger by pulling down and to the right but instead of staying locked vertically above the dock it'll slide behind it which I don't like so then I've gotta jiggle the window around to get it all back into visible space... my home computer (6 core tower) doesn't have this problem even though I've, from what I can tell, set it up nearly identically.  Both machines running the latest version of snow leopard.  Here's a video captured from my machine at home showing the window resize behaviour I prefer. If it helps at all I can do another one from my work machine tomorrow showing the windows resizing behind the dock.


Are $T\mathbb{S}^2$ and $\mathbb{S}^2 \times \mathbb{R}^2$ different?

I have seen the claim that $T\mathbb{S}^2$ and $\mathbb{S}^2 \times \mathbb{R}^2$ are not diffeomorphic, but I have only ever seen the proof that they are not isomorphic as vector bundles (which is a cute application of the hairy ball theorem). How would I prove that they are indeed not diffeomorphic (or better, not homeomorphic)?


How to implement oblivious transfer where probability of the receiver getting secret is exactly 1 out of 4?

As we know that oblivious transfer is done with probability of 1 out of 2. But how to implement it with probability of 1 out of 3 or 1 out of 4??


TiKZ: Why is a line visible between 2 fitted nodes with inner/outer sep =0?

Consider the snippet below (compiled with PDFLatex TexLive 2015).  Why is DocumentViewer (3.18.2, Ubuntu 16) displaying a thin line (some zoom levels)? I have set the outer/inner sep  to 0. Is this a flaw in PDF-rendering or has this TiKZ snippet an issue?     \documentclass{book} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture} \node[inner sep=0mm, outer sep=0mm, fill=blue,minimum width=5cm,minimum height=5cm] (first) at (10,10) {}; \node[inner sep=0mm, outer sep=0mm, fill=blue,minimum width=5cm, fit=(first.north)(first.south),anchor=east] (second) at (first.west) {}; \end{tikzpicture} \end{document}


Is there a way to filter the "hot questions" displayed in the Stack Exchange menu?    I have a profile on Stack Overflow and that's pretty much it. Therefore the list as it is now is pretty useless because it just adds noise - I'm not coming to Stack Overflow to discuss terrorists and the like ;-)


Code goes beyond the box, allowing you to scroll the whole post

You're able to scroll the whole post! This shouldn't happen. I believe the correct behavior is to not scroll the post, but scroll the gray code box that pops up when you click on it.  Android 5.1.1 on a Galaxy S6.  The problem question is


Find the order of a subgroup of $S_5$ generated by two elements

The Question I am trying to solve reads :  Find the order of a subgroup of $S_5$ generated by the elements $s=(123)$ and $r=(12345)$. Is this group sovable ? Is it nilpotent ?  I tried to compute a couple of terms but then I realized this subgroup is way large, and computing the elements one by one might not be a good idea (Is there another way to compute the order ?)  My calculation shows : $r, r^2, r^3, r^4, rs, r^3s, sr $ are all $5-$cycles but there are elements like $r^2s=(14)(25)$ and also $r^4s=(354)$...It seems that all sorts of things can happen in this subgroup...I do not even know how to approach the solvability and nilpotency before I know what the subgroup is...  I already appreciate your hints/ideas/answers


I have two flags defined in my site (false_negative_flag and false_negative_flag_passed). Each flag has different Flag link text.  In views, I have two displays. I have a flag link in each of these views, one with the first flag, the other with the second one. The link text shows correctly on both displays. I wanted to have images instead of the link text so I added the following css:  .flag-wrapper.{false_negative_flag} a.flag-action {     background: url(http://.../files/failed.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; } .flag-wrapper.{false_negative_flag} a.unflag-action {     background: url(http://.../files/passed.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; } .flag-wrapper.{false_negative_flag_passed} a.flag-action {     background: url(http://.../files/passed.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; } .flag-wrapper.{false_negative_flag_passed} a.unflag-action {     background: url(http://.../files/warning.png) no-repeat center center;     border:none;     width: 18px;     height: 18px;     margin-left: 0px;     float: left;     color: transparent;     text-indent:-9999em; }   There are 3 different images I use but in my views I always see the passed and warning ones (the last two entries of the css). Is there any error in my css?  NOTE: I'm using the displays in Panels, don't know if it's relevant.  EDIT after first answer: I got the css I'm using from the link in this answer. I simply duplicated and in the second part I added the second flag machine name. The problem is that now it ignores the first two blocks of the css.  Thanks!


Isekai manga where the mc is reincarnated through his own magic

The MC reincarnated himself through his own magic after his party defeated the demon king. Before he used his magic to do so, he took the daughter from the demon king and traveled with her over the world. After he used his reincarnation magic he was born in a noble family where the daughter of the demon king is now working as a maid in this family. He also has an older/younger (not sure) brother. Through his knowledge he starts his training of body, swordsmanship and magic as a baby. Years later his brother wants to play with him but he denies him every time. But one day he accepts it to play tag. His brother can't catch him. After that, he requests from the mc to teach him his magic. He denied again, but made an offer. Only when he can catch him, would he teach him his magic. I hope I'm not mixing up different mangas.


Share of variance explained by individual predictor

I am interested in how to calculate portion of explained variance of each individual independend variable in regression equation.  So regression model is $y=b_{0}+b_{1}x_{1}+...b_{n}x_{k}+\epsilon$ and suppose I even know true values of $b$ and have data for all $x$. It is clear how to find portion of variance explained by $\epsilon$ (just $\frac{var(\epsilon)}{var(y)}$), but how to make this trick to each $x$ if they are correlated? So the problem as I see is that additional covariations between $x$'s do not let repeat the technick applied to disturbance term because each $x_{i}$ contribute to y variation through var(x) as well as throught $cov(x_{i},x_{-i})$.  The problem I am interested in has been rised beofre in topic   In order to handle with this problem in matlab function anova(reg) can be used where reg is an fitlm object. But I am strongly interested in how to make these calculations by hand.  Will be very greatfull for help!


Calculating resistor value and power rating for LED driving

I have seen many resistances with difference Wattage i.e 1/4W, 1/2 W, 1 W, 2 W ,3W etc. If I have 3 W Load which is an (large 3W) LED in my case, which Resistance should I use?  Also The LED I am using needs 3.5V DC and 0.8 A current. I have a Battery which outputs 8V. How can I calculate the Value of the resistance which can drop 8V to 6V?


Building a character in Fallout 4 gives you 28 points in total to assign to your SPECIAL attributes during the initial character build - compared to 40 points in Fallout 3/ Fallout New Vegas.  In Fallout New Vegas you could increase your SPECIAL attributes over the course of the game via temporary buffs but you could also permanently increase your attributes using perks and implants. Using all available perks and implants there was a maximum of 61 SPECIAL points available (reference:  )  I realise it's day one and we've all got a long way to go but hopefully someone else can answer this question before I can:  How many permanent SPECIAL points are available in Fallout 4?


I know these 3 different kinds of declarations:  1) ClassParent var = new ClassParent (); 2) ClassChild var = new ClassChild(); 3) ClassParent var = new ClassChild();    Map<Character, Integer> hash = new HashMap<Character, Integer>();   Third case really common with collections.  Could you let me know the difference between all of them, advantages, disadvantages and how you know when to use one of them over the others. Thanks


My US visa has been stamped over by the immigration officer. Would this cause any issues?

When I entered the US last time , the officer at the port of the entry put the stamp partially on the visa page .Then he turned the page and stamped it there as well. Now I am worried about the stamp markings on the visa page. I have traveled multiple times to the US and this has never happened before.Will it really be an issue when I travel to the states again    Does this stamp on the visa page mean anything?


Could Gandalf predict future events? Throughout the legendarium, he seems to come up with prophecies which come true, but is this just lucky guessing/wisdom or genuine omniscience? If it is indeed omniscience is it complete omniscience (as in does he know for sure) or just a sort of 'feeling' that something may happen?  He accurately predicts "Gollum may have a part to play yet" amongst others I can't currently recall.


Objects stop emitting smoke/fire after a short time?

How can I maintain the flames on the pieces of an object after an explosion?   Here's a .


Develop rich API exposing Stack Overflow functionality

I would love to see an actual native iPhone app for Stack Overflow, Server Fault, Super User, etc.  I've actually developed a number of iPhone apps myself, and would certainly be interested and willing in doing the bulk of the legwork, but it would be necessary for the SO team to expose a real API, instead of simply RSS feeds.  Maybe if there's enough demand behind this, we can convince the SO team to build a rich API, which could be useful for many other applications, not just an iPhone app.


Installation (windows installer - Ubuntu 12.04 LTS)  I downloaded the (Ubuntu 12.04 LTS) ISO file then the (Install Ubuntu with the Windows installer) it fully installed and restarted.  Then I chose the Ubuntu OS and black screen... so I ESC and started in SAFE MODE and got "_" symbol flashing (to type something in) but turns off few seconds and black screen... have to force shutdown.  Please help thanks. Michael


I am running the latest version of Linux Mint with Cinnamon. I'm trying to map Caps Lock to Ctrl, but I cannot figure out how to do it. All web searches I've done have led me to older versions of Linux Mint (there is no keyboard layout option in my settings). How can I do this?


What is the best choice for .NET inter-process communication?

Should I use Named Pipes, or .NET Remoting to communicate with a running process on my machine?


Find the area of a map (Xkm x Ykm) from the left & right longitude and latitude

How can the area of a map from OpenStreetMap be determined in the form of Xkm x Ykm, given the following information:         Left Longitude  = 103.554879 Right Longitude = 103.740497  Top Latitude    = 1.585770 Bottom Latitude = 1.490873   Any ideas?


is this a correct way of using cross validation

I want someone to answer me if what I'm doing is correct. I have a labelled data that I want to train different machine learning models that can predict the outcome. here are the steps that I have went through:   I have divided the data into two sets 80% for training and 20% for testing. I have cross validated the training set (and only the training set) with 10 folds using different models (Knn, ANN, SVM ,...etc).  I kept tuning the parameters of the models until I got a satisfactory root mean squared error (RMSE) for each model. I used the parameters that produced the lowest RMSE to build each model using the training set (80% of the data). I fed the testing set (the remaining 20%) into the each model and got a prediction from each model. I evaluated the testing set prediction error of each model using MSE, RMSE,MAPE and MAE. Compare the models and recommend the model that produced the lowest error.   My questions:   is using 10-fold cross validation on the testing set alone is similiar to dividing the data into 70% training, 10 % validation and 20% testing? It would be really helpful if you could provide me with research papers that adopt such technique.  Does this procedure makes sense, or am I doing something wrong?


What is the easiest method to move files into current directory in terminal?

I was wondering if there was a cleaner method to move files into the current directory than this:  mv path/to/file ../current_directory   If I wanted to move a file to the directory above I could go:  mv file ..   Is there a way to represent the current directory?


Badges in achievement drop-down switches based on site

The achievements dialog drop-down in the top bar shows the recent achievements across all sites. Each entry has a site-specific icon next to it, so you know where it's from. Badges, however, seem to be displayed relative to the site that you're on.  Here is the view from :    Here is the view from :    Here is the view from :    This seems like a bug; the badge icon should also stay with the site.


I have a bash script that executes a python script like.  python script_name.py >> output.log 2>&1   As you can see I want standard output and std error in the same file called output.log.  However, the script_name.py is executing a system command using os.system method. Let's assume following is the python script.  import os print('Executing python script') os.system('echo Helloworld') print('python script finished')   Now the output.log file is getting the output from the python script. But the output from os.system method is being logged first. So the output.log file is having the output as:  Helloworld Executing python script python script finished   But I want the print statement to be logged first.  However, If I execute the script directly without the bash script. I get the following output in the console.  Executing python script Helloworld python script finished


Blender not recalculating normals for mesh properly

Thanks for any assistance you can provide on this. I've been iterating on this for a while now and am somewhat flummoxed by the problem.   I have a small .blend file here which illustrates the problem:    This object (a scroll and pegbox for a violin model) is enclosed and has no non-manifold geometry or duplicate vertices.   On the bottom front right of the mesh, you see that the mesh tapers down. On the bottom left, I've moved two vertices out slightly to demonstrate the problem.  When the bottom part of the model is shaped like this on both sides (as it is on the right side of the mesh in the .blend file):    Everything works fine.  If, on the other hand, the model is modified like so:    Then recalculating normals does not work properly. Blender flips normals improperly.  You can see this for yourself by opening the .blend file I posted above, pressing A and CTRL-N. If you move the edges back so they are not in front of the rest of the model, it works correctly.  My question is: Is there something wrong with this mesh to make it do this? Or is there a bug in Blender? I'm concerned that there's a problem in my mesh that makes it hard to determine the inside and outside, so I'd like to resolve it if there is.  I'm using Blender 2.73 on Windows 8.  Thank you for any assistance you can provide!  Edit: I don't feel this is a duplicate, based on the question linked. I've provided a specific example that demonstrates a reproducible scenario of incorrectly calculated norrmals.


Picking values from the list - how to make it more efficient

I'm trying to pick 8 values from the list and assign them to variables. How to simplify it, make it more efficient.    I was not enough specific. I would like to pick 8  values from the beginning of the list, make operation, add it to result, then pick next 8 number from the list and so on until the end of the list  input_data = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24] index=0 for n in range(int(len(input_data)/8)):         v1=input_data[n+index]         x1=input_data[n+1+index]          y1=input_data[n+2+index]         z1=input_data[n+3+index]         v2=input_data[n+4+index]         x2=input_data[n+5+index]          y2=input_data[n+6+index]         z2=input_data[n+7+index]         index+=7         print(v1,x1,y1,z1,v2,x2,y2,z2)


How to make a function give up after running for a long period with no output

I'm working on a function that should be dealing with differential equations and for some specific inputs it can take so long for the function to execute, it's probably because I've used Sympy's dsolve inside it. What I'd like to do now is make it report a time out incase the process takes any longer than 12 seconds or any number, how should I do that?


How can I setup my printer to print in black and white as default?

Is it possible to set up a printer, so it will always print in black and white?


Formal proof of the statement $\exists x \forall y: R(x,y) \implies \forall y \exists x: R(x, y)$

As an exercise, my textbook wants me to prove that $\exists x \forall y: R(x,y) \implies \forall y \exists x: R(x, y)$. It is easy to prove in mathematical English. Something like: Fix some $x = x_0$. Since $\forall y: R(x_0, y)$ holds, $\forall y \exists x: R(x, y)$ will certainly hold as well if we pick $x = x_0$ for all observed $y$. That proof is quite intuitive and easy to understand. Then I tried to prove the same formally... and failed. I see no way to swap $\exists x \forall y$ with $\forall y \exists x$. Can this statement be proved formally staying within first order logic?


Show finite ring has identity when for each $x$ there exists $y$ such that $xyx = x$.

I'm working through an old qualifying exam problem, and I'm stuck:     Let $R \neq (0)$ be a finite ring such that for any element $x \in R$ there is $y \in R$ with $xyx = x$. Show that $R$ contains an identity and that for $a,b \in R$ if $ab = 1$ then $ba=1$.     On first glance, I suspected that $xy$ is a perfectly good identity, but this doesn't work. For example, in $\mathbb Z_6$, if $x = 3$, then $y \in \{1, 3, 5\}$ works, but $xy = 3 \neq 1$.  Once I have solved the first part, I can do the second part, using an argument from .


HTTPS of my own website hijacked by someone else?

My site creativeblends(dot)tv as of right now has only a coming soon message, nothing more. The other day I sent someone the link with www in front and when opening (in Firefox) it opened automatically the secure protocol version of it.  The weird thing is, I don't have any secure protocol at all. I bought the domain from Godaddy and have my site(s) hosted there too (yes, it happens with more than just one site). But I don't need a SSL because I don't manage any kind of personal or private information.   The problem: When I accept to make an exception for the https version it opens my domain (the very same but with https in front) but with a completely other page content from iwant-glameyes(dot)com   The funny thing is, that iwant-glameyes(dot)com bought the SSL from Godaddy themselves. Did they hack me? Is GoDaddy involved somehow?  How do they manage: a) use my domain? b) use my host IP? c) without redirecting and hosting content on my server show their page?  And more important: How can I get rid of this problem?  Edit: This question:  seems to be similar, but unfortunately nobody could give a real solution.


How would I composite my rendered animation

I'm new to blender. I created an animation, and it saved in my folder as 140 pictures, for each frame. How do I take all of that and add it into the compositor to add some effects that I need?


After many hours of searching, trying and scratching my head I turn to you guys. Seems like many other have this same problem but haven't seen any solution to this yet.  I am rendering cars in blender and I do most of my post work in Photoshop. To do this I need a "correct" render of the normals and I just can't achieve this in Blender.  This is a ref image of what I am looking for and this Normal render is from 3Ds or Cinema 4D (I think).  I use this Normal to color range select parts of the car facing a certain way.


I have configured my own DNS server and want to make it possible for everyone on the subnet to lookup each other.  How do I do that?


My gravatar disappeared....and cannot be selected in profile picture change area....how can I get it back?

This issue seems to be different from others reported previously in the Meta SE (and I have looked at them all).  These things I identify in this message.  Without having changed my profile (or email address) in since I have been a SE member (about 6 years), my gravatar (which I grew attached to) disappeared and something else popped up apparently called an Identicon from my readings here.  I have used my common profile on all SE sites all had identical email addresses.  I understand from reading other meta SE entries that gravatar and identicon apparently are different.  The Gravatar uses email addresses, and the Identicon uses IP addresses.  I can assure you that I have used a fair quantity of IP addresses over the years to access the site for periods of time but the avatar assigned to my name never changed (till now).  Thus I would have expected the Identicon to have changed over these periods of time.  I tried to select my original gravatar under the profile picture option.  As was posted in another Meta SE posting to no avail.  The gravatar was not available as an option when attempting to change it.  The Identicon option was present however.  This is for ALL SE sites not just a single one.  As the postings of the Meta SEs seem to have this isolated to one site being different from another.  The lack of a gravitar under the selection seems puzzling since I have had the same email in my common profile without change.  So one question is why I don't have a gravitar selection but to have an identicon selection under my profile conditions?  I'm confused as my (valid) email address has been previously used in a couple of SE communications and again has not changed since I created my initial Server Fault account over five years ago.  This issue was listed in yet another Meta SE posting but not true.  I tried to set the email address to the same thing that I had it, but the gravatar did not return.  Because I could not return my Gravatar, I uploaded a cute picture until I could get a resolution.  What am I missing here?  NOTE: Remember the question...how can I get it back within the SE framework?  Thanks.


Do skins exterior quality reduce from use?

Say I had a Factory New weapon skin, if I used the skin in game would the quality gradually reduce and become Minimal Wear or less?  Will it go down over time even if I don't use it?


I am following the . In "II. ONLINE HANDLING OF MANUSCRIPTS " under "C. Preparation for online submission" they write:  Properly prepared manuscript/article file in LaTeX or Word format. Authors who wish to use LaTeX should use the JASA LaTeX package, which is available here: . (The requirements for a properly prepared manuscript are given further below.) It must be a single stand-alone file. If the author wishes to submit a LaTeX file, the references should be included in the file, not in a separate BibTeX file. Authors should take care to ensure that the submitted manuscript/article file is of reasonable length.  All of their supplementary materials, which can be found  only give examples using BibTex. My paper is also using BibTex. Is there any way to include the references into the tex file? Am I missing something?


Dynamic button event getting undefined id message on Jquery

I am trying to creat dynamic buttons and click event. Creating dynamic button is working but when I cliked it I am getting undefined message. What is my wrong? Sorry my lang. Thx in advance. My code is below:  $(function(){    var i = 1;  $('button').on('click',function(){       var r= $('<input type="button" class="dinamik" value="new button '+ i +' "/>');       $("body").append(r);       i++;    }); });      $(function(){         $(document).on('click', '.dinamik', function(){            var valueDeger = $(this).find('.dinamik').attr('value');            alert("Value değeri: " + valueDeger);     }); });


Biblatex problem, the list doesn't appear

I'm trying to customize my bibliography list, I have a problem. I'm using Biber, because it´s mandatory for \DeclareLabelalphaTemplate. The .bib file name is the same as in the code.     I have TexLive which includes Biblatex.  This is the error:     LaTeX Warning: Citation 'averroes/hannes' on page 1 undefined on input   line 26.      LaTeX Warning: Citation 'averroes/hannes' on page 1 undefined on input   line 28.      (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)   [1]      LaTeX Warning: Empty bibliography on input line 31.      (/Users/Isai/Documents/Info/Documentos/Estudios   estacionamientos/LaTex/.texpadtmp/Example.aux)      LaTeX Warning: There were undefined references.      Package biblatex Warning: Please (re)run Biber on the file: (biblatex)   Example (biblatex)                and rerun LaTeX afterwards.   \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[backend=biber,style=alphabetic,backend=biber]{biblatex} \usepackage{hyperref} \addbibresource{Untitled.bib}  \DeclareLabelalphaTemplate{   \labelelement{     \field[final]{shorthand}     \field{label}     \field[strwidth=3,strside=left,ifnames=1]{labelname}     \field[strwidth=1,strside=left]{labelname}   }   \labelelement{     \field[strwidth=2,strside=right]{year}   } }  \begin{document} Filler text \parencite{averroes/hannes}  It's weird to text like this: \cite{averroes/hannes}  \newpage \printbibliography \end{document}


When does (Riemann) regularization work?

I've seen the Wikipedia articles on how to sum  or .  Is there a theory behind it or is it a random trick? It basically uses analytic continuation of the Riemann zeta?  The article says it may be  used in physical applications. So I wonder, what are the conditions that this type of regularization will give me a useful and consistent result?  There are other series which can be summed differently: . Is it possible to obtain the same result with Riemann regularization? Are different type of regularizations giving the same results (if they exist)? If not, how can I know which one will work for my (physical?) calculation?


How to solve this algebra problem related to Pythagorean triplets?

If $a^2+b^2=c^2 $ and $a+b+c=1000$ where a,b,c are positive integers, find the product $abc$.  First I tried this: $$(a+b)^2=(1000-c)^2$$ $$a^2+b^2+2ab=c^2+1000^2-2000c$$ $$2ab=1000^2-2000c$$  But I didn't know how to proceed from here so I tried a different method. I tried to solve this by using the formula that generates Pythagorean triples: $m^2+1, m^2-1, 2m$ so I got: $$m^2+1 +m^2-1 +2m = 1000$$ $$2m^2+2m=1000$$ $$m^2+m=500$$  Now if I solve the quadratic equation $$m^2+m-500=0$$  then I'm getting an irrational answer. So how do I solve this?


A free utility for NTFS writing on Mac OS X 10.6.5?

Possible Duplicate:          Coming from Windows (Vista/7), I have a few NTFS formatted Hard Drives.  Are there any programs to make OS X write to NTFS?   Do I have any options aside from installing Windows via Boot Camp and reformatting?


Every Hilbert space has an orthonomal basis - using Zorn's Lemma

The problem is to prove that every Hilbert space has a orthonormal basis. We are given Zorn's Lemma, which is taken as an axiom of set theory:  Lemma If X is a nonempty  with the property that every  of X has an upper bound in X, then X has a maximal element.   Given a orthonormal set $E$ in a Hilbert space $H$, it is apparently possible to show that $H$ has an orthonormal basis containing $E$.   I tried to reason as follows: Suppose $E$ is a finite set of $n$ elements. Then one can number the elements of $E$ to create a totally ordered set of orthonormal elements. Then the span $<E>$ can be identified with $R^n$, where each element $v = v_1 e_1 + v_2 e_2 + ... + v_n e_n$ is identified with the vector $(v_1, v_2, ..., v_n)$. On $R^n$ we have a total order, namely the "lexigraphical order" $(x_1,x_2,...,x_n) \leq (y_1,y_2,...,y_n)$ if $x_1 < y_1$ or if $x_1 = y_1$ and $x_2 < y_2$ or if $x_1 = y_1$, $x_2 = y_2$ and $x_3 < y_3$ and so on. Hence $E$ is a totally ordered subset of $H$ and $H$ is a partially ordered set. However, this set doesn't seem to have an upper bound. The set $E$ does have an upper bound. If we define a total order on $E$ only, then X is a partially ordered set satisfying the criteria so X has a maximal element?   This is as far as I got, and I am not sure the entire argument is correct. I don't see how what kind of maximal element I am seeking, since the orthonormal basis of a Hilbert space can have countably infinity number of elements.


Can I use the Unity launcher icon to minimize applications/windows?

I don't know if this is a feature or a bug, but clicking on an active application's launcher icon doesn't minimize it. It is terribly inconvenient for folks using a persistent Unity bar to click minimize button every time. Is there any way to add minimize functionality to the launchers?


Eigenvector and eigenvalue of $\mathbf A+\lambda\mathbf I$ where $\mathbf A=\mathbf{vv}^\top$

Given $\mathbf v=\begin{bmatrix}v_1\\v_2\\\vdots\\v_n\end{bmatrix}$ and $\mathbf A=\mathbf{vv}^\top$, find the eigenvectors and eigenvalues of $\mathbf A+\lambda\mathbf I$.   My current work progress is:  Since $(\mathbf A+\lambda\mathbf I)\mathbf v =\mathbf{Av}+\lambda\mathbf v=\mathbf v(\mathbf v^\top\mathbf v) + \lambda\mathbf v=\mathbf v \|\mathbf v\|+ \lambda\mathbf v=(\|\mathbf v\|+\lambda)\mathbf v$ ,  so one of the eigenvalue is $\lambda_1=(\|\mathbf v\|+\lambda)$ with corresponding eigenvector $\mathbf v_1=\mathbf v$.  I'd like to find out other pairs of eigenvalues and eigenvectors. I first calculate the trace.  $$\mathrm{Tr}\,(\mathbf A)=n\lambda+\|\mathbf v\|=\lambda_1+(n-1)\lambda$$  Hence, the rest of $n-1$ eigenvalues has sum $(n-1)\lambda$.   From here, I do not know how to proceed.   Can I assume the rest of eigenvalues are $\lambda$ with multiplicities $n-1$? Why? How to find corresponding eigenvectors?   [Note1] This is like a follow up question regarding .  [Note2] Found later on there is a  but people focus on linking it to Note1.


Custom environment shorthand for multiple environments

I am interested in doing something like the following.  \documentclass{article}  \usepackage{amsmath}  \newenvironment{customeq}{\begin{equation}\begin{split}}{\end{split}\end{equation}}  \begin{document}  This is an equation. \begin{customeq} x=5 \end{customeq}  \end{document}   However, when I try to do this, I get an error saying that \begin{split} has been ended by \end{customeq}.  Is there a way to get around this issue?