I am working on a simple example of how to numerically solve the time-independent Schrodinger Equation for the infinite square well. I've used the Euler Method to find values of the wave function, $\psi (x)$, but now I've just realized something - I have no clue how to determine the energies from this! I know that analytically this comes down to applying the Hamiltonian to the wavefunction, but how do I find the energies numerically??  I can provide more info if needed.

This is my first question on here. I'm trying to numerically solve the Schrödinger equation for the  and find the energy eigenvalues and eigenfunctions but I am confused about how exactly this should be done.  I've solved some initial value problems in the past using iterative methods such as Runge–Kutta. I've read that  is the way to solve Schrödinger's equation but Wikipedia also describes it as an iterative method for initial value problems.  How do I use it to solve an eigenvalue problem?  This confuses me for the following reasons:   Wouldn't iteratively solving the DE require knowledge of the energy eigenvalues to use as input to the calculation? I don't know the eigenvalues yet; they're precisely what I'm trying to calculate. If I did that, wouldn't I simply get a unique solution, instead of a family of eigenfunctions and eigenvalues?    I've seen some mention of "tridiagonal matrices" being generated somehow, but am not sure what the elements of that matrix would be or how that applies to the problem. Leandro M. mentioned that "the discretization defines a finite dimensional (matrix) eigenvalue problem". This seems like the correct road I should be going down, but I haven't been able to find anything that explicitly explains this process or how the matrix is constructed. If this is the correct procedure, how is such a matrix constructed?


I am currently running 12.04 and I can't get Jupiter to install on my computer.  These are the commands I am running to install it:  sudo add-apt-repository ppa:webupd8team/jupiter sudo apt-get update sudo apt-get install jupiter   This is the error I get after updating:  W: Failed to fetch http://ppa.launchpad.net/webupd8team/jupiter/ubuntu/dists/saucy/main/binary-amd64/Packages  404  Not Found   and finally after install jupiter, I get this error:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package jupiter   Any ideas on how I can fix this issue?  Or can anyone point me in the right direction?

I'm trying to install the Jupiter power settings app but, I read it is no longer compatible with the new kernel. Is there a similar program or a way to manage the power settings on 13.04?


I've just finished installing Ubuntu, and now have Ubuntu in one partition and Windows 8 in another. I was under the impression that when my computer starts, I would be able to choose from a menu which one to run. However, what happens instead is that Ubuntu runs automatically if I don't press anything, or if I press escape I get a menu which includes only ubuntu and something called memtest - no Windows.  How am I supposed to run Windows?  Please avoid too much technical language and give me step by step instructions wherever possible.

I've bought a Dell laptop with W8 pre-installed. I didn't like W8 much, so I wanted to try Ubuntu, but without uninstalling W8. So yesterday I installed Ubuntu, and it was extremely convoluted thanks to the gorgeous W8 UEFI boot mode.  Anyway Ubuntu is now installed and working with no problem. However I cannot boot on W8 anymore, which is a serious issue.  I tried Boot repair, first with the boot option in Legacy mode, then in UEFI. Boot repair tells me it got it fixed, but I still can't boot on W8.  When I boot, I have two options to boot on Windows: Windows UEFI bkpbootmgfw.efi and Windows Boot UEFI loader.  When I select any of them, I got the following error:   No such device BCE6-E3C4 /EFI/Microsoft/Boot/bkpbootmgfw.efi not found.   OR  No such device BCE6-E3C4 /EFI/Boot/bkpbootx64.efi not found.   I checked on my computer, and unexpectedly, I did find the two files, located at /boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi or /boot/efi/EFI/Boot/bkpbootx64.efi.  My computer has 2 hard drives. When I got the computer, the second one was empty, so I decided I'd install Ubuntu on my second hard drive, and keep W8 on my first one. Maybe that's the problem, maybe the bios or whatever it is is looking in the first hard drive for the efi files, while they are supposedly in the second one.  I've tried lots of stuff on the Internet (like updating grub's config) but nothing's worked so far.  Boot repair told me to paste this link if I need help, so here we go:   I read but that didn't help me much.  Does anyone know how to fix this? I can still access to my data on my first hard drive, but I still have many useful programs on Windows. I notably program in C++ for Windows, so I must, in order to compile for the OS, boot on Windows.


String s1 = "abcdef"; String s3 = new String(s1);     if(s3 == s1){      System.out.printf("yes");        }else{             System.out.printf("no");          }      Why is not print yes? Who can explain to me?

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


I know this is asked a lot, but right now (April 2016), what is the preferred method of storing passwords securely for my users? My data is not super-sensitive (it's just a game with no personal or financial details, but it would still be nice to have secure passwords).  I've read a large amount of tutorials and questions tonight, but it's still unclear. I just want a fairly simple to understand but fairly safe way to take a created password, store it in my database and then retrieve it. I've tried several methods, they all work fine but then later somebody says it's not safe or things have moved on since then. It would be nice to see a couple of clear functions to just encrypt and decrypt the passwords.  Edit - To clarify why the new answers are better than previous answers on stackoverflow. The language has been updated with password_hash() and password_verify() which hugely simplify and improve the situation. Previous answers gave manual solutions, saving salts, using different algorithms etc. None of that is needed now.

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


I came around this question:  Show that if $a$, $b$, and $c$ are integers such that $(a, b) = 1$, then there is an integer $n$ such that $(an + b, c) = 1$,   in the Chinese Remainder Theorem section of my textbook and wasn't too sure how I could break that up so I could use the CRT to solve it.  Any hints would be greatly appreciated thanks!

I can't crack this one.      Prove: If $\gcd(a,b,c)=1$ then there exists $z$ such that $\gcd(az+b,c) = 1$ (the only constraint is that  $a,b,c,z \in \mathbb{Z}$ and $c\neq 0)$


vector<int> myVector;   and lets say the values in the vector are this (in this order):  5 9 2 8 0 7   If I wanted to erase the element that contains the value of "8", I think I would do this:  myVector.erase(myVector.begin()+4);   Because that would erase the 4th element. But is there any way to erase an element based off of the value "8"?  Like:  myVector.eraseElementWhoseValueIs(8);   Or do I simply just need to iterate through all the vector elements and test their values?

I was looking at the API documentation for stl vector, and noticed there was no method on the vector class that allowed the removal of an element with a certain value. This seems like a common operation, and it seems odd that there's no built in way to do this.


Is there a way to make the print_str function be more concise and becomes one line?      def print_str(str):         if len(str)>0:             print(str + ", "+ "hi")         else:             print("hi")     if __name__ == '__main__':         print_str(("John"))         print_str((""))   In java we can do something like  print(str + (str.equals("") ? "" : ", ") + "hi");

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


I am looking for an adjective, a compound adjective or adjective phrase that would fill in the blanks below     He is a [...] stamp collector.   = He recently became a stamp collector.      She is a [...] mailwoman.   = She recently became a mailwoman.   The meaning I am looking for is that of a person being new to an activity, which is now performed by them regularly, in a positive sense.

What is a word for someone who is totally new in something or participates in something for the first time?


I have a scene with a rocket launching, so obviously fire is pretty important. However, after setting up the shaders and simulation, I can't get the fire to render. Strangely, the smoke is still rendered and the fire still emits light on the rocket, but doesn't appear below the rocket or shade the resulting smoke. Even stranger, the rendered viewport (ie 3D View set to Rendered) renders the scene perfectly. I'm at a complete loss. Here's a photo of the two views and my domain material:   And a closer image of the domain material after I redid it (still didn't work):   How can I get the fire to render? Thanks!

When rendering volumes with Film > Transparent enabled, the alpha appears to be the wrong type (premultiplied/straight). In the 3D view it works as expected:    This is a known .  Is there any way to work around this?


I am working on a project in which i send a base64 encoded image from my app to a server where the processing happens. The image received on the server is like this: (this data is huge) b'\xff\xd8\xff\xe1\x02;Exif\x00\x00MM\x00*\x00\.....'   So, now i want to convert it in this format: [255, 234, 70, 115, ....].

How can I convert a string of bytes into an int in python?   Say like this: 'y\xcc\xa6\xbb'  I came up with a clever/stupid way of doing it:  sum(ord(c) << (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))   I know there has to be something builtin or in the standard library that does this more simply...  This is different from  for which you can use int(xxx, 16), but instead I want to convert a string of actual byte values.  UPDATE:  I kind of like James' answer a little better because it doesn't require importing another module, but Greg's method is faster:  >>> from timeit import Timer >>> Timer('struct.unpack("<L", "y\xcc\xa6\xbb")[0]', 'import struct').timeit() 0.36242198944091797 >>> Timer("int('y\xcc\xa6\xbb'.encode('hex'), 16)").timeit() 1.1432669162750244   My hacky method:  >>> Timer("sum(ord(c) << (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))").timeit() 2.8819329738616943   FURTHER UPDATE:  Someone asked in comments what's the problem with importing another module. Well, importing a module isn't necessarily cheap, take a look:  >>> Timer("""import struct\nstruct.unpack(">L", "y\xcc\xa6\xbb")[0]""").timeit() 0.98822188377380371   Including the cost of importing the module negates almost all of the advantage that this method has. I believe that this will only include the expense of importing it once for the entire benchmark run; look what happens when I force it to reload every time:  >>> Timer("""reload(struct)\nstruct.unpack(">L", "y\xcc\xa6\xbb")[0]""", 'import struct').timeit() 68.474128007888794   Needless to say, if you're doing a lot of executions of this method per one import than this becomes proportionally less of an issue. It's also probably i/o cost rather than cpu so it may depend on the capacity and load characteristics of the particular machine.


I've seen a lot of similar issues, but none have quite answered my question. To elaborate, I am trying to dual boot Ubuntu 12.04 alongside Windows 8. I am using a linux usb creator to boot linux. I have tried LiliUSB creator, pendrive linux usb creator, and unetbootin. All three have given me the same result. When I select my flash drive from the BIOS to boot into, it successfully shows the GRUB menu. The GRUB menu however, is black instead of purple that I've seen when normally booting Ubuntu. It displays the normal options to, try linux, intall linux, and boot repair. However, if i select any of these options they all result in a black screen and nothing happening. I am trying a new flash drive in a moment to see if this fixes it. If it doesn't though I would still appreciate any advice or answers I can get. If this is a solved issue please redirect me! Thank you!   Also this is marked as a repeat question, but the question it was marked the same as was unresolved and all answers that were relevant were graphics driver solutions. Mine was a boot error and was resolved from me digging elsewhere in the askubuntu forum, so technically yes it's repeat, but not to that question, so I hope it gets remarked as a solved answer or re-linked to the appropriate question so others who encounter the same issue which isn't graphics related, might find help in this question.  Extra info on my computer if it helps: ASUS x55c model  intel hd 3000 graphics i3 duo core processor 4gb ddr3 Linux is not installed currently (hence my problem) Currently running: Windows 8

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


There are three files in the directory and I need to verify if there all from the same set. This is based on the 3 files using the same naming structure. One file is slightly different. Here is an example:       2014_UMW.xxx       2014_UMW.yyy       2014_UMW_web.zzz  2014_UMW is just one example. It has to work with all data sets.   I need to check that the three files match and have the same data set. I have written code to get the file names from the directory, drop the file extension and store the file name as a string. Now i need to compare the file names to see if they are equal. If they are equal the method should return true. I am having trouble figuring out how to deal with the file name that contains the _web. What is the best way to handle this issue.  import java.io.File; import java.io.IOException;  import org.apache.commons.io.*;  public class Verify_FileName {  private static void getAllFiles(File curDir) throws IOException{      File[] filesList = curDir.listFiles();     for(File f: filesList){         if(f.isFile()){             String File = FileUtils.readFileToString(f);             FilenameUtils.removeExtension(File);              String [] FileWithoutExtension = new String [filesList.length];             for(int i = 0; i < filesList.length; i++){                 FileWithoutExtension[i] = File;                              }          }      }  }  public static boolean compareFileNames(String [] f){    }   }

I would like to build a regexp in Java that would be passed in a FilenameFilter to filter the files in a dir.  The problem is that I can't get the hang of the regexp "mind model" :)  This is the regexp that I came up with to select the files that I would like to exclude   ((ABC|XYZ))+\w*Test.xml  What I would like to do is to select all the files that end with Test.xml but do not start with ABC or XYZ.  Could you please add any resources that could help me in my battle with regexps.  Thanks  The following resource explains a lot of things about regexp


Suppose that $A$ is a commutative ring with $1$ and suppose that $\forall x \in A   \exists n >1 \in \mathbb{N}$ dependent from x such that $x^n=x$. Prove that if $I$ is a prime ideal then $I$ is maximal.  Proof: Suppose that $I$ is prime. Then $A/I$ is an integral domain. Let $a \in A/I$. Then we have that exists $n$ such that $a^n=a \implies a(a^{n-1}-1)=0 \implies a=0 \vee a^{n-1}=1$ because $A/I$ is a domain. Now, if $a \neq 0$ then $a \times a^{n-2}=a^{n-1}=1$ so each $a \in A \setminus \{0\}$ is invertible and then $A/I$ is a field, so $I$ is maximal.  Does this proof seem legit? Thanks in advance. Can you suggest other ways to solve this?

Let R be a commutative ring with an identity such that for all $r\in$ R, there exists some $n>1$ such that $r^n = r$. Show that any prime ideal is  maximal. (Atiyah and MacDonald, Introduction to Commutative Algebra, Chapter 1, Exercise 7.)    Any hints?


I'm trying to unit test following piece of code using pytest: import json from typing import Any, Dict  from confluent_kafka import Consumer   def get_message(config: Dict[str, Any]):     consumer = Consumer(         {             "group.id": config["KAFKA_GROUP_ID"],             "bootstrap.servers": config["KAFKA_BROKERS"],             "default.topic.config": {"auto.offset.reset": "smallest"},         }     )     consumer.subscribe([config["KAFKA_TOPIC"]])     while True:         collect = consumer.poll()         if collect is None:             continue          try:             message = json.loads(collect.value().decode("utf-8"))         except json.JSONDecodeError:             continue          return message  But I can't mock subscribe function. I tried: mock_subscribe = MagicMock(return_value='test') monkeypatch.setattr('confluent_kafka.cimpl.Consumer.subscribe', mock_subscribe)  In result I got following error: TypeError: can't set attributes of built-in/extension type  How to mock this function properly?

Ruby can add methods to the Number class and other core types to get effects like this:  1.should_equal(1)   But it seems like Python cannot do this. Is this true? And if so, why? Does it have something to do with the fact that type can't be modified?  Update: Rather than talking about different definitions of monkey patching, I would like to just focus on the example above. I have already concluded that it cannot be done as a few of you have answered. But I would like a more detailed explanation of why it cannot be done, and maybe what feature, if available in Python, would allow this.  To answer some of you: The reason I might want to do this is simply aesthetics/readability.    item.price.should_equal(19.99)   This reads more like English and clearly indicates which is the tested value and which is the expected value, as supposed to:  should_equal(item.price, 19.99)   This concept is what  and some other Ruby frameworks are based on.


My teacher lists the following chaining operators:  & && ( ) ; ;; | || new line   How is ;; a chaining operator and what does it do?

If I try to run a;;b in sh, I get this error:  sh: <number>: Syntax error: ";;" unexpected   If I try a;;;b I get the same error, not ;;; instead of ;;, so I think that ;; means something, although I don't know what does it mean.  Here is an example:  $ echo A;;echo B sh: 1: Syntax error: ";;" unexpected $ echo A;;;echo B sh: 1: Syntax error: ";;" unexpected $ echo A; ;echo B sh: 1: Syntax error: ";" unexpected   Here you can see that when I use ; ; instead of ;; the error is different, pertaining to the fact that I used ; without a command before. ;; seems to be a different operator, although I don't know what it applies to.


Supposedly Braid has support for the Xbox 360 controller (as it's an XBLA port), but it refuses to recognize mine.  The controller shows up among my Devices & Printers, and works perfectly in Super Meat Boy, but Braid is totally oblivious.  Edit: It somehow fixed itself after I played SMB, but I have no idea how.  I didn't unplug/replug it between Braid, SMB and back again (though I had much earlier), or really do anything else at all.

So I asked  about Braid on PC/PS3 a while back, and one of the answers pointed me to the MotionInJoy drivers that allows PS3 controllers to be used on a PC. I've installed them properly and have used my DualShock 3 in a few games, but I can't figure out how to enable it when I'm playing Braid!   There doesn't seem to be any menu item to select an input type, which begs the question - is Braid not detecting my controller for some reason, or does Braid simply not allow you to use anything but the keyboard for input?


I am using Google Analytics to track the number of visitors coming on my page everyday. Yesterday, I happen to see the referrals and I saw   This is a public website and when I visited it, I saw it has exact contents which I put on   I thought this is not legal but how is it possible that people are copying the content without any kind of attribution.  Is this right ?  How can we prevent people from copying the content on their own website ?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I'm running Kubuntu 17.10, upgraded from 17.04 in-place.  I have a 2GB swap file on my SSD that was created by the installer when I first installed 17.04. Here's the contents of /proc/swaps (fresh after a reboot from running out of memory):  Filename                                Type            Size    Used    Priority /swapfile                               file            2097148 0       -1   How can I expand this swapfile to 4GB? I've found plenty of answers about resizing swap partitions and adding new swap files, but nothing about resizing existing ones.

Is there a way to increase my existing "swapfile" without having to destroy and re-create it? I would like to up my swap space from 1GB to 2GB.  Currently it is set up as such:  $ sudo swapon -s Filename                Type        Size    Used    Priority /swapfile               file        1048572 736640  -1 $ ls -lh /swapfile -rw------- 1 root root 1.0G Nov  9  2016 /swapfile   I'm using Ubuntu 14.04.


We can easily find commutative binary operations on a 2 element set from the truth table (if ab=ba then the operation is commutative, thus there are 8 commutative binary operations in a 2 element set).  Is there a similar method or algorithm to find how many and what are the associative binary operations in a 2 element set?  If there isn't a way to quickly check, we would need to test all 8 possible inputs independently (if not commutative) and only 4 (if commutative) - which is still a lot for a 2 element set - 96 total (16 operations, 8 are commutative, so 8*4+8*8=96).  A generalization to an n-element set be very helpful.

Suppose we have a set  $S=\{a,b\}.$ Obviously, the total number of binary operations on $S$ is the number of all the pairs such that $$*(a,b)=a \, \text{or}  \, b,$$ which gives  $ 2 \cdot 2 \cdot 2 \cdot 2=2^4$ possible ones. Is there a way to find which of these $16$ binary operations are associative without writing all the operation matrices and checking it by hand?


To score a RandomForestClassifier using GridSearchCV  for multiclass classification, I decided to use Brier score. However, I could only manage to get the Brier score for each class. Is it reasonable to get the average of that as an overall performance measure? Or can you think of a better way instead? Edit: I am aware  question is similar, so I'll explain why I think it's a different problem: When I run my model with brier_score as defined by that question's author (brier_multi), the score obtained for the best model is 202.3 However, when I apply the following code (made by me) def brier_score_multi(y_true, y_pred):         y_true_bin = label_binarize(y_true, classes=[0,1,2])     y_pred_bin = label_binarize(y_pred, classes=[0,1,2])     score = mean([brier_score_loss(y_true_bin[:,0], y_pred_bin[:,0]),brier_score_loss(y_true_bin[:,1], y_pred_bin[:,1]),brier_score_loss(y_true_bin[:,2], y_pred_bin[:,2])])     return score  The best score is 0.0432. As you can see, this is a big difference, and given the definition of a the brier score, I'm biased towards the second result. EDIT 2: Seeing as the first result is incorrect, I started thinking... maybe instead of the average between classes, the sum of the brier score between classes makes more sense?

tl;dr  How do I correctly compute the Brier score for more than two classes? I got confusing results with different approaches. Details below.    As suggested to me in a comment to , I would like to evaluate the quality of a set of classifiers I trained with the Brier score. These classifiers are multiclass classifiers and the classes are imbalanced. The Brier score should be able to handle these conditions. However, I am not quite confident about how to apply the Brier score test. Say I have 10 data points and 5 classes:  One hot vectors represent which class is present in a given item of data:  targets = array([[0, 0, 0, 0, 1],                  [0, 0, 0, 0, 1],                  [0, 0, 0, 0, 1],                  [0, 1, 0, 0, 0],                  [0, 0, 0, 0, 1],                  [0, 0, 1, 0, 0],                  [1, 0, 0, 0, 0],                  [0, 1, 0, 0, 0],                  [1, 0, 0, 0, 0],                  [1, 0, 0, 0, 0]])   Vectors of probabilities represent the outputs of my classifiers, assigning a probability to each class  probs = array([[0.14, 0.38, 0.4 , 0.04, 0.05],                [0.55, 0.05, 0.34, 0.04, 0.01],                [0.3 , 0.35, 0.18, 0.09, 0.08],                [0.23, 0.22, 0.04, 0.05, 0.46],                [0.  , 0.15, 0.47, 0.28, 0.09],                [0.23, 0.13, 0.34, 0.27, 0.03],                [0.32, 0.06, 0.59, 0.02, 0.01],                [0.01, 0.19, 0.01, 0.03, 0.75],                [0.27, 0.38, 0.03, 0.12, 0.2 ],                [0.17, 0.45, 0.11, 0.25, 0.01]])   These matrices are coindexed, so probs[i, j] is the probability of class targets[i, j].  Now,  the definition of the Brier Score for multiple classes is  $$\frac{1}{N} \sum_{t=1}^{N} \sum_{i=1}^{R} (f_{ti} - o_{ti})^2$$  When I program this in Python and run it on the above targets and probs matrices, I get a result of $1.0069$  >>> def brier_multi(targets, probs): ...     return np.mean(np.sum((probs - targets)**2, axis=1)) ...  >>> brier_multi(targets, probs) 1.0068899999999998   But I am not sure if I interpreted the definition correctly.  For Python the sklearn library provides . While the documentation states     The Brier score is appropriate for binary and categorical outcomes that can be structured as true or false   What the function actually does is pick one (or get one passed as an argument) of $n > 2$ classes and treat that class as class $1$ and all other classes as class $0$.  For example, if we choose class 3 (index 2) as the $1$ class and thus all other classes as class $0$, we get:  >>> # get true classes by argmax over binary arrays ... true_classes = np.argmax(targets, axis=1) >>>  >>> brier_score_loss(true_classes, probs[:,2], pos_label=2) 0.13272999999999996   alternatively:  >>> brier_score_loss(targets[:,2], probs[:,2]) 0.13272999999999996   This is indeed the , as can be shown by manually defining and running it:  >>> def brier_bin_(targets, probs): ...     return np.mean((targets - probs) ** 2) >>> brier_bin(targets[:,2], probs[:,2]) 0.13272999999999996   As you can see, this is the same result as with sklearn's brier_score_loss.  Wikipedia states about the binary version:     This formulation is mostly used for binary events (for example "rain"   or "no rain"). The above equation is a proper scoring rule only for   binary events;   So... Now I am confused and have the following questions:  1) If sklearn computes the multi class Brier score as a One vs. All binary score, is that the only and correct way to compute the multi class Brier score?  Which leads me to  2) If that is so, my brier_multi code must be based on a misconception. What is my misconception about the definition of the multiclass Brier score?  3) Maybe I am on the wrong track altogether. In which case, please explain to me, how I compute the Brier score correctly?


why  does the speed of light in vacuum never change? Under any circumstances, The speed of light in vacuum never change, why?

This question is about why we have a universal speed limit (the speed of light in vacuum). Is there a more fundamental law that tells us why this is? I'm not asking why the speed limit is equal to $c$ and not something else, but why there is a limit at all. EDIT: Answers like "if it was not.." and answers explaining the consequences of having or not having a speed limit are not--in my opinion-- giving an answer to whether there is a more fundamental way to derive it from a law to explain this limit.


root@root:~# airmon-ng  PHY Interface   Driver      Chipset  phy0    wlan0       ath9k       Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) phy1    wlan1       ??????         root@root:~#   root@root:~# lsusb Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 0b05:1788 ASUSTek Computer, Inc. BT-270 Bluetooth Adapter Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 005: ID 04f2:b071 Chicony Electronics Co., Ltd 2.0M UVC Webcam / CNF7129 Bus 001 Device 004: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader Bus 001 Device 003: ID 2357:010c   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub root@root:~#

I can not install the TP-LINK WN722N V2, which includes a 8188 EUS chip. Then I tried to install the backports v4.4.2,but   do not want to recognize either.  The TP-Link driver installation errors thrown out:  man@kman-livve:~$ cd '/home/kman/Documents/Tplink 722 N V2/rtl8188EUS_linux_v4.3.0.8_13968.20150417' kman@kman-livve:~/Documents/Tplink ...$ sudo make  "******************************************" "NO SKRC,we will use default KSRC" "******************************************" make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-15-generic/build M=/home/kman/Documents/Tplink 722 N V2/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules make[1]: Entering directory '/usr/src/linux-headers-4.10.0-15-generic' arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support make[1]: *** No rule to make target '722'.  Stop. make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-15-generic' Makefile:1367: recipe for target 'modules' failed   A method to know him, I do not know about. Thanks  Model:TL-WN722N(EU)_V2_161112_Linux.zip Chipset:rtl8188EUS_linux_v4.3.0.8_13


I have an ArrayList of Question Class objects and I need to output the random selected question. everithing seems OK but when I run it, gives me a java lang nullpointerException  public class GameBean implements Serializable {  private Random random; private String question;  private String answer; //above are the attributes   METHOD  public Question getQuestion() { int index = random.nextInt(questionList.size()); Question q = questionList.get(index);  return q;}

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


I have Ubuntu 14.04 Server with Apache.  All I want if people enter to server IP like x.x.x.x forward to DocumentRoot /var/www/site1/html   And if enter to my domain address like site.com forward to DocumentRoot /var/www/site2/html   How could it possible?

I currently have all my websites as directories under /var/www. I would like to set up a virtual host http://foo/ that points to the /var/www/foo/foo directory (and still keep the default localhost behavior).  I added the following file, foo, to /etc/apache2/sites-available/:  <VirtualHost *:80>     ServerName foo     DocumentRoot /var/www/foo/foo      # Other directives here     <Directory />         Options FollowSymLinks         AllowOverride None     </Directory>     <Directory /var/www/foo/foo>         Options Indexes FollowSymLinks MultiViews         AllowOverride None         Order allow,deny         allow from all     </Directory> </VirtualHost>   I then ran the following commands:  sudo a2ensite foo sudo /etc/init.d/apache2 reload   But when I go to http://foo/ it still returns an ISP search page.


So i want when i paste some text (Command + V), it always paste as plain text, without any formatting that could exist in the source.  Currently if i copy a text in Word that has bold and italic, when i paste it on another app it will paste with bold and italic. What i want is to paste only the text, without any formatting.  I know i could use another more complicated shortcut to do this, but i want to remap Cmd+V to do this by default.  Is this possible ?

When pasting text, some applications (Chrome, Microsoft Office, etc.) will do what they can to re-render copied text with style, and some of those applications do not appear to offer an option to paste without style.  This results in spending lots of time removing formatting (where it is even possible) and then cleaning up the mess left behind, just to get clean text.  I want to prevent text styling from attaching itself to text that I copy and paste between applications. Is there an OS-level way to do this, i.e. one that can apply to all applications? Failing that, is there a per-application way to tell Chrome, Safari, Word etc. not to copy and/or paste with style?


I use iTunes on Windows and recently installed Ubuntu 16.04.1. How can I install the same iTunes version in Ubuntu?  Thanks

I've tried different ways to install iTunes, but to no avail. I tried with Wine, but it didn't work. Is it possible to have iTunes on Ubuntu?


I'm Wondering how about do you solve this question. I'm using a software Called TValue 5 to double check my work. Principal = $100,000.00 Interest = 3% annual, Compounded Monthly Payment Frequency is Monthly And the Duration is 36 Months Months that will be skipped are September, October, November and Decemer The Loan Starts in February, But that doesn't Information isn't necessary. Calculate Monthly Payment Amount    When I hit the Calculate Button, The Monthly Payment Amount is 4351.27 If anyone would Like to Double Check. I've tried a previous Method suggested to me but it was off by $200. If Someone could help to get closer that would be great

Hi I can compute a Basic Loan Amortization Schedule, But now I'm trying to Calculate a Seasonal Loan Amortization Schedule . So for example A loan starts at January And Will go on for 3 years, with Monthly Payments. Interest is at 3% Annually and is compounded Annually. During the months of September, October, November, December It'll only accumulate Interest But no payments and principal. Principal is 100000. How Do I calculate Payments and interest.


I retrieved the date from firestore saved in the timestamp format like this:         Date retrievedDate = class.getDate();  the date saved in firestore format: //it is in timestamp format  How to convert this date to a normal presentable format like : 7 June 2020, Sunday, 15:09 PM? Thank you in advance.

How to format correctly according to the device configuration date and time when having a year, month, day, hour and minute?


I'm planning to travel to Vietnam (Hanoi).  I would like to make a local friend or travel companion there and vice versa.I'm willing to be a true travel accompany back in our country.  Is there any website for this?

Is there an online community to find travel partners for mountain trekking or sightseeing, or anything else?  I don't want to travel to foreign mountains alone, but I don't know where to search for company. There's a great community for accommodation (I mean CouchSurfing) so I think there should be something in "reverse" direction (searching not the place to stay but the people to go with).


Very new to programming and trying to understand why I'm getting a null pointer exception to my files in the R.raw folder. Android studio recognizes the files and I'm not getting any errors in the compiler. Thanks!  public class MainActivity extends AppCompatActivity {  private SoundPool mSoundPool; private int cID; private int dID; private int eID; private int fID; private int gID; private int aID; private int bID;   i just tried redoing the programming in a new project because I'm not sure what I'm doing wrong.  public void playC(View view) {      mSoundPool.play(cID, 1.0f, 1.0f, 0, 0, 1 );   }  public void playD(View view) {      mSoundPool.play(dID, 1.0f, 1.0f, 0, 0, 1 ); }  public void playE(View view) {      mSoundPool.play(eID, 1.0f, 1.0f, 0, 0, 1 ); }  public void playF(View view) {      mSoundPool.play(fID, 1.0f, 1.0f, 0, 0, 1 );  }  public void playG(View view) {      mSoundPool.play(gID, 1.0f, 1.0f, 0, 0, 1 );  }  public void playA(View view) {      mSoundPool.play(aID, 1.0f, 1.0f, 0, 0, 1 );  }  public void playB(View view) {      mSoundPool.play(bID, 1.0f, 1.0f, 0, 0, 1 );  }   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     cID = mSoundPool.load(getApplicationContext(), R.raw.note1_c, 1);     dID = mSoundPool.load(getApplicationContext(), R.raw.note2_d, 1);     eID = mSoundPool.load(getApplicationContext(), R.raw.note3_e, 1);     fID = mSoundPool.load(getApplicationContext(), R.raw.note4_f, 1);     gID = mSoundPool.load(getApplicationContext(), R.raw.note5_g, 1);     aID = mSoundPool.load(getApplicationContext(), R.raw.note6_a, 1);     bID = mSoundPool.load(getApplicationContext(), R.raw.note7_b, 1);   }   }


My FilePath.property file is as below.  filepath1 = /var/log/Test filepath2 = /home/Backups   I want to read this FilePath.property file inside my shell script and  use filepath1 and filepath2 in my script for deleting old logs inside the Test and Backups folders.

What is the best way to read a config file in bash? For example, you have a script and aren't willing to fill in all the config manually each time you call the script.    Edit 1: I think I didn't make it clear, so: what I want is... I have a configfile which is like    variable_name value   variable_name value ...     and I want to read that. I know I could just grep it for the arguments I'm looking for or so... but maybe there's a more intelligent way :)


By letting $$ \theta = a \arcsin(x) \, , $$ $$ x = \sin\left(\frac{\theta}{a}\right)$$ If $\theta / a$ is the angle in a right triangle then the hypotenuse of length $1$, and the opposite side $x$. I want to find $\sin(\theta)$ as $ \theta = a \arcsin(x)$. For $a = 2$ and $a = 4$ this is quite simple. When $a = 2$: $$\sin(\theta) = 2 \sin\left(\frac{\theta}{2}\right)\cos\left(\frac{\theta}{2}\right)$$ As $\theta/2$ is the angle in our triangle we can simply substitute this in terms of $x$ So $$ \sin(\theta) = \sin(2 \arcsin(x)) = 2x\sqrt{1 -x^2}$$ repeating this process for $a = 4$ $$ \sin(\theta) = 2 \sin\left(\frac{\theta}{2}\right)\cos\left(\frac{\theta}{2}\right) = 4 \sin\left(\frac{\theta}{4}\right)\cos\left(\frac{\theta}{4}\right)\left( 2 \cos^2\left(\frac{\theta}{4}\right) -a\right)$$ In other terms $$\sin(4 \arcsin(x)) =4x\sqrt{1- x^2} (1-2x^2) $$ How can I attempt to generalise this at least for even values of $a$, thanks.

I'm wondering if there's a simple way to rewrite this in terms of $k$ and $x$, especially as a polynomial. It seems to me to crop up every so often, especially for $k=2$, when I integrate with trig substitution. But $k=2$ is not so bad, because I can use the double angle formula; it's the prospect of higher values of $k$ that motivates this question.   I think the law of sines may help? Or maybe even De Moivre's theorem, to find the length of the hypotenuse as the length of the angle changes, if we think of the right triangle drawn from $\arcsin(x)$ with side1 = $x$, hypotenuse = $1$, and side2 = $\sqrt{1 - x^2}$ as a complex number, though I'm not sure how that might work.


Which is correct: If you have any questions in advance of the meeting, please don't hesitate to contact Mark Ingrao or me.

A question was asked in one of my friend's interview. The question was to determine the right form from the below sentences.     Q. Correct form of English:          Samuel was with Susan and I   Samuel was with Susan and me   Samuel was with I and Susan   Samuel was with me and Susan   None of these      Now I vaguely remember a rule of thumb from my school days. That is "2-3-1" i.e. where all the persons are acting in a sentence, second person comes first, then third person and it is followed by first person.  So according to this theory, 1 seems to be correct to me. Is this theory correct?


I've always seen MACs as a way to provide integrity and authentication. You would just append it to some message in clear.  But this is clearly not the case when you're doing Encrypt Then Mac. When you do that you provide authentication to something that already has authentication (to decrypt we need to know the key). So why use a MAC when we can use a hash instead: $E(m | h(m))$? (i.e., encrypt the message appended to a hash of the message)

Most of the time, when some data must be encrypted, it must also be protected with a , because encryption protects only against passive attackers. There are some nifty encryption modes which include a MAC (, ...) but let's assume that we are doing old-style crypto, so we have a standalone encryption method (e.g. AES with CBC chaining and PKCS#5 padding) and a standalone MAC (e.g.  with SHA-256). How should we assemble the encryption and the MAC?   MAC-then-Encrypt: Compute the MAC on the cleartext, append it to the data, and then encrypt the whole? (That's what  does) Encrypt-and-MAC: Compute the MAC on the cleartext, encrypt the cleartext, and then append the MAC at the end of the ciphertext? (That's what SSH does) Encrypt-then-MAC: Encrypt the cleartext, then compute the MAC on the ciphertext, and append it to the ciphertext? (In that case, we do not forget to include the initialization vector (IV) and the encryption method identifier into the MACed data.)   The first two options are often called "MAC-then-encrypt" while the third is "encrypt-then-MAC". What are the arguments for or against either?


Find a number in the form of 111...1 (e.g. 111111) that is divisible by 2019.  What I thought so far...  I know of Fermat's little theorem, which states following: $a^{p-1}\equiv 1$ for  $p \in \mathbb{P} \land a\in \mathbb{Z}$  111...1 (with n 1's) can be written as $\frac{10^n-1}{10-1}$. Unfortunately, 2019 is not a prime.  $\frac{10^n-1}{10-1} = 2019*k$ is also no solution to the problem since there are two variables.   Can anyone give me a hint how to find the solution or at least how to proof that the solution exists? Thanks.

I need to prove that there are infinitely many numbers  of the form $x = 111....1$ such that $31\mid x$  what I tried - I wrote x as   $\sum_0^{n-1} 10^i$  I know that $(10,31) = 1 $  now I'm stuck .. any help will be appreciated


So I want to on mouse click of a row take data from this selected row in a JTable in one JFrame and insert the data into another JFrame with different JComponents.   To this point I have set up the mouse listener and taken data from the selected row and stored it in variables. However I am having problems with setting the data to the JTextFields in the other JFrame. The problem is that 'JTextFields' are not showing any data nor is the println System.out.println(taskName); added to this after a mouse click I'm getting this exception Exception in thread "AWT EventQueue-0" java.lang.NullPointerException.  Below is the mouse listener code, if anymore code is needed I can provide this.  editFrame jtRowData = new editFrame();     tblCurrentTasks.addMouseListener(new MouseAdapter() {         public void mouseClicked(MouseEvent evt) {             int index = tblCurrentTasks.getSelectedRow();             DefaultTableModel model = (DefaultTableModel) tblCurrentTasks.getModel();              String taskID = model.getValueAt(index, 0).toString();             String taskName = model.getValueAt(index, 1).toString();             String taskDes = model.getValueAt(index, 2).toString();             String taskIm = model.getValueAt(index, 3).toString();             String taskFre = model.getValueAt(index, 4).toString();             String taskDr = model.getValueAt(index, 5).toString();              System.out.println(taskID);             System.out.println(taskName);             System.out.println(taskDes);             System.out.println(taskIm);             System.out.println(taskFre);             System.out.println(taskDr);              jtRowData.txtTaskName.setText(taskName);             jtRowData.txtTaskDesc.setText(taskDes);             System.out.println(taskName);              jtRowData.setVisible(true);             jtRowData.pack();             jtRowData.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);             jtRowData.setBounds(200, 200, 550, 370);             jtRowData.setLocation(new Point(700, 300));         }     }); }

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


I want to delete an option from the wp-options table when clicked on a button in the back-end.  i have created an option with this :   get_option( string $option, mixed $default );   is there any method in WordPress to get this done? i want to set it back to $default so basically deleting the $option

I am writing a WP plugin. I have created a button for the user to click in thw WP dashboard. I need to run a function when a user clicks the button, shown with a red arrow. The code snippet for the button is:
<button class="button button-primary">Update Media Titles and ALT Text</button>
. I have already created the function in my class like so:  public function kh_update_media_seo() {      //update media files title and alt tags here }   I can handle the code that goes in the function alone, I only need help making the button in the WP dashboard fire off this specific function when clicked.  Pardon me if this sounds dump or straight forward. It's my first time doing this.  My plugin is a one file plugin if that helps.


I have a cube (cube.1) parented to another cube (cube.2), and both cubes are dynamic bodies with the same properties. Both cubes have "box" collision bounds. Also, both cubes are inside a room.    When I move cube.2 while in the game engine, it collides with the walls of the room and stops.    But cube.1, which is parented to it, does not. Why is this happening? Also, what can I do to make cube.1 collide with objects and stop moving (stop going beyond their faces)?

I want to make a tree which is made of segments connected via parenting, i want the children have collision with the environment, atm the children will simply pass throught them.  How can i make it.  edit: described what i want in image


I found this awesome work designed by Kreativa Studio and I'm really curious about the effect of the woman picture. How to make an person image to blend into the background like this with photoshop.

I have seen such an effect being used in many places however I haven't figured out how to replicate it via Photoshop.  I have tried desaturating the image, placing it under a layer of solid colour and then lowering the opacity of the colour. I have also tried a couple of blend modes, to no avail. The effect is nowhere near the same.  Can someone please tell me the effect used on these images?


Since yesterday, my MacBook started to have rendering issues in the Finder app when I open specific directories.  I managed to fix some of them by removing the .DS_Store file in those directories. But now I have one that occurs every time.    Do you guys have an idea of how this can be fixed ? I bought this macbook one week ago so I don't know what to think..    MacBook Pro (15-inch, 2017) 2,9 GHz Intel Core i7 16 Go 2133 MHz LPDDR3 Radeon Pro 560 4 Go Intel HD Graphics 630 1536 Mo Mac OS High Sierra 10.13 (17A405)

I've had a very strange Finer error caused by recent macOS High Sierra betas that affected Macs running macOS 10.13 as well as macOS 10.12 Sierra. This error causes an entire Finder window to show visual artifacts when opening certain folders on either an APFS or HFS+ volume.  After moving the cursor or the affected Finder window, the window may look something like this;    Attempting to use Disk Utility to repair the affected volume does not resolve this issue, nor does restarting the affected Mac (even in Safe Mode).  Without formatting this disk, how can I prevent Finder from exhibiting this graphical error when opening particular folders?


We know that light is an electromagnetic wave which follows the wave equation. We write the wave as  $$f(x, t) = A\sin(kx - \omega t + \phi ),$$ which is sinusoidal. So my question is why can't it be a square wave or any other wave form which follows the wave equation?

I was researching sinusoidal functions when I realized that the wave produced by a wave function looks exactly the same as a light wave. Is a light wave a sinusoidal wave, and can a light wave be described as a sinusoidal function?


When I press F3 it only shows chunk-relative and up. How do I get the bottom back?

When I press F3 to see the debug screen in I use Minecraft 1.8.1, some information is missing.   Most notably, there are no X, Y, Z coordinates.     What happened to my debug overlay?


Quick question, most likely for a veteran will be easy, or maybe im asking for too much.  i have this code for laravel in php, im not fan to do a foreach, is there a better way? i guess should be an existing function that replace my values of arr to the keys match on arr2, but i dont know  Its really important not to change the order.  $arr=  ['filters', 'repeat', 'via', 'type']; $arr2= [         'filters' => 'text1',         'repeat' => 'text2',         'via' => 'text3',         'type' => 'text4',     ];  foreach($arr as $k)     $res[]=$arr2[$k];  return $res;

Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing.  $customer['address'] = '123 fake st'; $customer['name'] = 'Tim'; $customer['dob'] = '12/08/1986'; $customer['dontSortMe'] = 'this value doesnt need to be sorted';   And I'd like to do something like   $properOrderedArray = sortArrayByArray($customer, array('name', 'dob', 'address'));   Because at the end I use a foreach() and they're not in the right order (because I append the values to a string which needs to be in the correct order and I don't know in advance all of the array keys/values).  I've looked through PHP's internal array functions but it seems you can only sort alphabetically or numerically.


I read that the number of atoms in the entire observable universe is estimated to be within the range of $10^{78}$ to $10^{82}$.  Does the Universe have finite number of particles? If so, how could it be determined?

It is often quoted that the number of atoms in the universe is 10$^{70}$ or 10$^{80}$.  How do scientists determine this number?   And how accurate is it (how strong is the supporting evidences for it)?  Is it more likely (logically >50% chance) that the numbers are right, or is it more likely that the numbers are wrong?


I'm kinda new to Blender and I was asked for help for my event to make an animation. I want to make something like a box falling from the sky. I went through some tutorials and i did make it right. What is not right is, the object (which is a box with a rigidbody) quite not in focus as in a camera. Here's the screenshot of the object showing it's out-of-focus.    How do i make the image to be in focus in such way that the object didn't look like it's being blurred by the camera?

I was trying to render my scene, and the render turned out very blurred. (It is not supposed to be blurred). Is there a setting that I am missing somewhere which is making it look like this?


was deleted. And only users with required privileges can see it.        So, the modification date can be confusing for users without requiring privileges. Could you change the behavior to show the date of the last change that could be viewed?

When an answer has been deleted the information on unanswered question tabs still says that users modification was the last to the thread. For instance on Stack Overflow right now the top two  are listed as having been modified by .    While waiting for a moderator Zerkms, modified several answers in an effort to remove spam. However, once these answers were removed Zerkms still appears as the last person to modify the thread. While I imagine the hidden/deleted answers still exist somewhere causing this to occur, it can be confusing if you don't know why Zerkms is listed, as his modification is found nowhere within the linked question.  I would propose that when an answer / modification is deleted / rolled back, that the associated user is removed as the last modifier.


I'm playing around with applying texture diffuse, normal maps and speculars to 3d models. So I have downloaded a premade one and tried to play around with it. However i can't seem to apply the textures properly to the model.   I found it here   Everything is in the zip file, just need some help with applying the texture, normal & specular in blender. Thanks.

I created some texture maps in MindTex to use in Blender, but I can't figure out how to properly hook them up. The maps I have:  - Diffuse  - Normal  - Height   - Specular   - Gloss   - Self Illumination  - Reflection  - Ambient Occlusion   MindTex (left) vs. Blender (right)  As you can clearly see it's a pretty big difference.  is my material node setup in Blender. In the examples I don't actually use self illumination or reflection images, but including this in the answer would be helpful.


I've read a lot of threads about gksu being removed from many Linux flavours, including Ubuntu 18.04.  Many state that gksu is an abomination and no user should ever need to use anything like it.  I have 2 examples where, as far as I know, I must have something that allows me to run as root (not just for editing files).    First, I have a need to start mysql only after an encrypted folder is opened on (GUI) command.  This means having a script run by the encryption system that starts the mysql service.  That has to be done as root, so I use gksu in that startup script which asks me for a password.  How else can I start a service from a GUI system?  I also run Ubuntu system backups as root, otherwise many system files can't be backed up.  So the desktop file uses gksu to start the backup.  pkexec looks complicated, needing policy files.  Is that the only alternative, and if so, why is it any safer?  Other answers to similar questions don't seem to address individual issues that people have now that gksu is no more (or harder to find...).  I think such questions from non-expert users would benefit from more detailed answers.  I now have some, and so would like to answer my own question.

I have always recommended pressing ALT+F2 and typing for example gksu nautilus or gksudo nautilus both are equivalent; to run graphical programs with root privileges.  However, I have just installed raring on a test system and this no longer works.  gksu and gksudo are not installed as part of a default raring install; though they are in the repositories. In 12.04 at least gksudo was just a symbolic link to gksu  The reasons I have always done this are because while it is often safe to use sudo under some circumstances it can cause problems with graphical applications because gksu has you running the program as root while with sudo you are running as yourself but with elevated privileges.  This can mean you inadvertently change the owner of critical system files.  This can cause problems.  This reasoning is explained better here:         Why was command removed from a fresh install and what should we be using instead?


I have a Windows software with a GUI that does cool things but too quickly (I cannot figure see all the editing it does in realtime because it goes too fast).  How to reduce the CPU speed to 1% of actual CPU speed for a specific Windows process myprogram.exe ?

I am using an old laptop and doing heavy processing that needs high CPU usage for a long time (~30mins - 2hours). When the process puts heavy load on CPU for a long time, CPU overheats and computer shuts down. I don't want to use a cooler/stand because I am carrying this laptop around and working outside home.  Is there a way/application that I can limit CPU usage of a process in Windows?  Note: Setting the priority of the process from task manager does not work.  Note 2: Fans are clean.


People. Sorry about the English language.  I created an environment with some help here, and now I need help with the counter.  \newcounter{examplecounter} \newenvironment{exemplo}{\begin{framed}\noindent \refstepcounter{examplecounter} {\textbf{Exemplo \arabic{examplecounter}.}} }{\end{framed}}   I'm using this environment on a large book, so i need to reset the counter by part, by section, or (if possible) even make it just like the part numbering, like example part.chapter.#  How can I do that?

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I found this code  since it's exactly what I need to use, but also I need a caption under both of them. There is an example for a subcaption but that's not it. I simply tried to add the caption command but it doesn't work. Can someone tell me how to modify it? Thanks.   \begin{center}    \resizebox{1.0\textwidth}{!}{    \includegraphics[height=3cm]{pic1}  % \caption{Picture 1}    \label{fig:pic1} \quad    \includegraphics[height=3cm]{pic2}  % \caption{Picture 2}    \label{fig:pic2}  } \end{center}

I tend to use \subfloats[]{} in my figures when I want to list multiple labelled figures of similar content in one bigger picture.  However, I see that some people use \subfigure.  What is the difference between these two options? Is one better than the other?  \documentclass{article} \usepackage{float} \usepackage[caption = false]{subfig} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \subfloat[caption]{\includegraphics[width= 2in]{something}}\\ \subfloat[caption]{\includegraphics[width= 2in]{something}} \end{figure} \end{document}  Or \documentclass{article} \usepackage{subfigure} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \subfigure[caption]{\includegraphics[width = 2in]{something}}\\ \subfigure[caption]{\includegraphics[width = 2in]{something}} \end{figure} \end{document}  Since  is two years old, does Axel's solution still apply?  By this I mean, has nothing changed with subfig?  Are there only 2 'biased' pros for the use of subfig? Is the outcome still it is more advisable to use subcaption over subfig where I am using the latter subfig?


I have this program  #include <stdio.h> #include <stdlib.h>  int main() {     char text[30];     int i,j,n;     puts("Enter the Text:");     gets(text);     n=strlen(text);     for(i=n;i>=0;i--)     {        if(text[i-1]==' '||text[i-1]==NULL )        {            for(j=i;text[j]!=' ';j++)            {                printf("%c",text[j]);            }        }         printf(" ");       }      getche(); }   Suppose if i input is "I am Happy" then my output is "Happy am I"  I am not sure where i went wrong in this program, i am not getting all the words , I am getting result as "happy [=w   am " .Please programmers help me.  Thanks In Advance.  i have found the answer , thanks for your helps, Below is my code  #include <stdio.h> #include <stdlib.h>  int main() {     char text[100];     int i,j;     puts("Enter the Text:");     gets(text);     strrev(text);     for(i=0;text[i]!='\0';i++)     {        if(text[i+1]==' ' || text[i+1]==NULL)        {            for(j=i;j>=0 && text[j]!=' ';j--)             printf("%c",text[j]);        }        printf(" ");     }     getche(); }

Given an array of characters which forms a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.  Example input and output:  >>> reverse_words("this is a string") 'string a is this'   It should be O(N) time and O(1) space (split() and pushing on / popping off the stack are not allowed).  The puzzle is taken from .


Let $\frac{a}{b} = 1 - \frac{1}{2} + \frac13 - \frac14 + ... - \frac{1}{1318} + \frac{1}{1319}$. Show that $1979  | a$. Given that , $a$ and $b$ are coprimes.  I tried to compute in pairs , but I don’t know how to do next.  Any hints or solutions would be appreciated.

The question is $$\text{If }\, p, \ q\in \mathbb{N}, \;1-\frac12+\frac13-\frac14-\dotsb-\frac{1}{1318}+\frac{1}{1319}=\frac{p}{q}.\qquad \text{Prove that } 1979\mid p.$$ So my solution went like this:  $$S=1-\frac12+\frac13-\frac14-\dotsb-\frac{1}{1318}+\frac{1}{1319}\Rightarrow S=\sum_{k=1}^{1319}\frac{1}{k}-2\sum_{k=1}^{659}\frac{1}{2k}=\sum_{k=660}^{1319}\frac{1}{k}$$ Now this is equivalent to finding the sum of the roots of the equation $$\left(x-\frac{1}{660}\right)\left(x-\frac{1}{661}\right)\dots \left(x-\frac{1}{1319}\right)=0$$. Rewriting this equation, we get $(660x-1)(661x-1)\dotsc(1319x-1)=0$ (we can discard the $\displaystyle \frac{1319!}{659!}$ since $1979$ is a prime). Calculating the sum of the roots, we get the required value to be equal to $(1320+659)\times 330$ which is obviously divisible by $1979$ (again discarding the coeffecient of $x^{660}$).  Now my question is: Using the same method of converting the problem into finding the sum of roots of a polynomial, we get from the original equation something like this: $$(x-1)\left(x+\frac{1}{2}\right)\dots \left(x-\frac{1}{1319}\right)=0 \Rightarrow (x-1)(2x+1)\dotsc(1319x-1)=0$$ So, the sum of roots would be $-1+2-3+4-\dotsc+1318-1319=-660$ But this is not divisible by $1979$. Why does the former solution work while the latter doesn't? Is there a flaw in my reasoning? Note: I know that the question can be solved by some other methods. Please only explain my given doubts and don't instead give another solution  I realised my mistake after some hours of pondering over it. (In the 1st equation) To get the required sum I would need to take calculate $\displaystyle -\frac{\text{coeffecient of }x^{659}\,}{\text{coeffecient of }x^{660}}$. However what I've done is calculate this:  $\displaystyle -\frac{\text{ coeffecient of }x}{\text{coeffecient of }x^{660}}$ which is actually equal to $\text{sum of roots taken }659 \text{ at a time} $. It was just a coincidence that the value I calculated was divisible by $1979$. The correct way, indeed, would be through the link supplied


I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]


I'm planning a hardware design, where I have a main board and multiple peripheral boards. On each of these boards is a microcontroller with I2C, which is the communication bus for the boards. The same kind of a peripheral board can be attached multiple times to the bus.  The microcontroller (will be an ARM, not specified yet) supports dual address.   My idea now is, to set one address to an unique address (with switches for example) and the second to a "group" address, which will be the same for one kind of peripheral.  Is it possible to send commands from my main board to the peripheral, as long it doesn't need a "read back" (only master -> slave)?  For me, it looks like the same functionality as for the general call with address 0x00 except it allows me to make "grouped" general call. But I don't know for sure, if this will work.

I am currently designing a board where I need to include a whole bunch of I2C devices. Since the number is quite high, address clashing is an issue, that of course we can solve implementing different bus segments, or with translators.  There is a particular situation though, where I had an idea.  I have two arrays of 8x, and I want them to be configured in the exact same way. The I2C-compliant solution is to use a bus isolator, or an address translator, and get over it, but I was wondering if it is advisable to just hook them all to the same bus, and hope for the best.  To abstract a bit:  I have two identical devices, with an I2C slave interface, with the same address. I want to send them the same packets, in the same order and so on. Can I just connect SDA and SCL in parallel, and get away with it?  I do not need to read from the devices, and I am aware that a NACK would be hidden. Also, the devices do not support clock stretching.  Edit, to clarify some comments:  Yes, I do not care if a device stops working and understand I have no way of knowing  The master we are using does not resend data on a NACK, but raises the error to the host.  The board we are designing is meant to be used in an electronics lab environment, as a support to evaluate a product that my company is making. We expect to make ~20 boards, no mass production, no board will be sent to a third party.


After reading on the subject, in one of the many, many Q&As and comments on it, I noticed the original link is now a 404 page ().   What gives?   I understand it experienced a record-level downvote; yet at the same time, it would certainly be interesting from a community history standpoint, especially as passions wane as it becomes bygones.   Perhaps disable answers, edits, and lock it?

Recently, Sara Chipps posted her message . After reading it, I wanted to compare it with . It turns out that she deleted it. Does anyone know why? It looks strange since (as far as remember) it was a sort of official position of SE. Why would such a statement be deleted?


Hello guys for years I've been installing AMD drivers and usually no problems at all. I usuallu compile few .deb files with --buildpkg but today after installing latest Ubuntu 14.04 I got an error.  UBUNTU-MAIN:~$ sh omega.run --buildpkg Ubuntu/trusty Created directory fglrx-install.Jjz0kw Verifying archive integrity... All good. Uncompressing AMD Catalyst(TM) Proprietary Driver-14.501.1003................... =====================================================================  AMD Catalyst(TM) Proprietary Driver Installer/Packager  ===================================================================== Generating package: Ubuntu/trusty Resolving build dependencies... Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package (> E: Unable to locate package 2 Unable to resolve  xserver-xorg-dev (>= 2.  Please manually install and try again. ^CSignal caught, cleaning up xakep@UBUNTU-MAIN:~$   So okay no problem because of new installation even core xorg is not there so I decided to install them  UBUNTU-MAIN:~$ sudo apt-get install xserver-xorg-dev Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed                    Depends: libcogl15 (>= 1.15.8) but it is not going to be installed  libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed               Depends: gstreamer1.0-clutter but it is not going to be installed  libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed                     Depends: libcogl15 (>= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. xakep@UBUNTU-MAIN:~$   As you can see another set of errors. I mean whe way I see it it's a damn standard library that is not installing automatically as depended for some reason. Does anyone know why this is happening ? I mean this is a clean installation and I really havn't done anything diffirent this time around but I can;t install driver. Same error btw when installing steam, actual steam installed but on first boot you know how it installs all library it gave me exact error. some cheese-gtk23 and stuff can;'t be installed.  I am clueless on what is happening.  Please help.

I'm getting the following error message when attempting to install libglew-dev,  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed                    Depends: libcogl15 (>= 1.15.8) but it is not going to be installed  libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed               Depends: gstreamer1.0-clutter but it is not going to be installed  libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed                     Depends: libcogl15 (>= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   All those packages are however apparently already installed.  I have tried all possible solutions in  post, without any luck. I have not added any PPAs. The version of ubuntu is 14.04.2.  I have looked at similar posts, and tried the following:  Running  dpkg --get-selections | grep hold   prints nothing.  sudo apt-get -oDebug::pkgProblemResolver=true install -f   Gives me nothing of interest, 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Please help me figure out what is wrong I can't find anything about this and haven't found the definition of this function C# keeps coming up and it doesn't apply.       for (auto& p: fs::recursive_directory_iterator("c:"))         {             richTextBox1->AppendText("This works fine\n");         }      for (auto& p: fs::recursive_directory_iterator("c:"))         {             std::string pathString;              fs::path path = p.path();              pathString = path.string();              //I don't know why it doesn't work like this VS won't compile if I try this. I have tried              //multiple different formats of string to no avail              richTextBox1->AppendText(pathString);         }

How can I convert an std::string to a char* or a const char*?


How can I tell which application is trying to access my thumb drive? The drive happens to be locked and an Access is Denied notification keeps popping up again and again. The PC has Windows 10 Pro installed on it.

I've noticed the hard drive use light flashing like crazy and I'm not using this PC (hardly ever do). How can I log what's going on for a time period?   For example: what files are being created/accessed/deleted/moved/copied etc, what folders or programs are being used/accessed. If an external device/site is doing the access (I do have a Cloud/NAS), note that, perhaps a MAC ID, IP address, etc. I've seen a number of software apps to take a snapshot of disk usage, but I want to see what's going on without my (seeming) intervention.


I'm thinking of travelling to the UK, from a EU country, on the 29 Jun to 3 of July 2019.  Shall I need a Visa, or is my National Identity Card enough?

I am traveling as a Belgian citizen after 28 March (brexit). Can I still enter with my identity card?


The question asked  mentions:  When the polynomial ring Z[x] is quotiented by the ideal (2,x) we get a field as $\mathbb{Z}[x]/(x,2) \cong \mathbb Z/(2) \cong \mathbb{Z}_2$ which is a field.  I am not being able to flesh out my answer and connect the dots. I know that $\frac{\mathbb Z[x]}{\langle x,2 \rangle }= \frac{\frac{\mathbb Z[x]}{\langle x \rangle }}{\frac{\langle 2,x \rangle}{\langle x \rangle}}$. From here, I can individually show that: $\frac{\mathbb Z[x]}{\langle x \rangle} \cong \mathbb Z,$ and that, $\frac{\langle 2,x \rangle}{\langle x \rangle} \cong \langle 2 \rangle.$ How do I conclude that, $\frac{\frac{\mathbb Z[x]}{\langle x \rangle}}{\frac{\langle 2,x \rangle}{\langle x \rangle}}  \cong  \mathbb Z_{2}$? It seems like I am trying to prove something in this format: $\frac{I}{J} \cong \frac{K}{H}$ because $I \cong K$ and $J \cong H.$ (I believe, this basic concept is essentially what my doubt is) Am I thinking about this the wrong way?

I still struggle with elementary knowledge about quotient rings.  For example, why can I just write down the second following isomorphism:  $$\frac{\mathbb{C}[x, y, z]}{(x^2 + y^2 - 1, y \pm iz)} \simeq \frac{\frac{\mathbb{C}[x, y, z]}{(y \pm iz)}}{\frac{(x^2 + y^2 - 1,y \pm iz)}{(y \pm iz)}} \simeq \frac{\mathbb{C}[x, y]}{(x^2 + y^2 - 1)} $$  I know the first isomorphism is right by the third isomorphism theorem. But why can I write down the second one?


I am trying to solve:  $x = 1(\mod13), x = 2(\mod31)$. Using the chinese remainder theorem, I got $x = 31*8 + 13 *y$, where I don't know what $y$ is, since I don't know how to solve $x = 13(\mod31)$. Please help!

I understand there is a method for solving simultaneous modular equations. For example; $$x = 2 \mod{3}$$ $$x = 3 \mod{5}$$ $$x = 2 \mod{7}$$ We find numbers equal to the product of every given modulo except one of them - giving $5 \cdot 7$, $3 \cdot 7$ and $3 \cdot 5$. We then find the multiplicative inverses of these numbers with modulo equal to the number missing from the product. The numbers found are then 2, 1 and 1 in this case. The value of x is then given by: $$x = 2 \cdot (5 \cdot 7) \cdot 2 + 3 \cdot (3 \cdot 7) \cdot 1 + 2 \cdot (3 \cdot 5) \cdot 1 = 233 = 23 \mod{3\cdot5\cdot7}$$  But I do not understand how this method correctly gives the value of $x$. I understand that the Chinese remainder theorem proves that there is a unique value of $0\le x \lt 3\cdot5\cdot7 \mod{3\cdot5\cdot7}$ but can someone please explain why this method finds this value of x?


I can not solve this question   $$ \lim_{x\to0}\frac{\sin\frac{1}{x}}{\sin\frac{1}{x}} $$  Because I am getting two different answers for different situation.   Situation - 1 ) If $\sin(1/x) = 0$ then the answer will be indeterminate. Situation - 2 ) If $\sin(1/x) \neq 0$ then the answer will be "one".   Which one is correct and why?

What is the value of the limit: $$\lim_{x \to 0} \frac{\sin(\frac{1}{x})}{\sin(\frac{1}{x})}$$ I think the answer should be $1$, but one I overheard one of my teachers saying that it is actually undefined.


I have a math, that is too long for only one line. Now I want it to break like this:  f(x) =      x + ...   Or what is the mathematic right way to break such a long formula into several line?  Thanks for your help!!  P.S.: Its not an equation like   f(x) = x + ...       = ....

I have an equation long enough to occupy two lines. I want to break it to improve readability. How can I break it?  \begin{equation} F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap  (minPixels  < |S| < maxPixels) \cap  (|S_{connected}| > |S| - \epsilon)   \} \end{equation}   I want to break it in 3 lines after \cap. But \\ or \n didn't work.


I'm trying to apply changeset to an org, but the following line of code in my test class:  List<sObject> cmpn = Test.loadData(Campaign.sObjectType, 'testCampaigns'); and others similar to it, gives the following error during validation of the changeset. This error does not show up in the Developer console when tests are run. System.SObjectException: ORA-20001: ORA-06512: at "DOC.CACCESS", line 4277 ORA-06512: at "DOC.SSHARING", line 7654 ORA-06512: at "DOC.CSAVEUTILS", line 202 ORA-06512: at "DOC.MCAMPAIGN", line 689 ORA-06512: at line 1 {call mCampaign.insert_campaigns(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}  {call mCampaign.insert_campaigns(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} Stack Trace: Class.System.Test.loadData: line 53, column 1 Class.DailyLeadTaskUpdateBatchJobTest.testDailyLeadTask: line 35, column 1

I am getting the below error while uninstalling a package using metadata service. This issue is coming sometimes      Error:- . common.exception.SfdcSqlException: ORA-20011: 10743448001074344800126 ORA-06512: at "DOPEY.CLOCK", line 34 ORA-06512: at "DOPEY.CLOCK", line 217 ORA-06512: at "DOPEY.CLOCK", line 261 ORA-06512: at "DOPEY.CLOCK", line 272 ORA-06512: at line 1 SQLException while executing plsql statement: {call cLock.acquire_lock(?)}(PKG)


Creating the node                class Node{            int data;            Node left;            Node right;            Node(int data){                    this.data = data;                    left = null;                    right = null;            }        }  Creating the tree         //create tree         class Tree{             Node root = null;             void insert(Node temp, int data){                 Node NewNode = new Node(data);                 if(temp == null){                      temp = NewNode;                 }                 else{                     if(data<temp.data){                         insert(temp.left,data);                     }                     else{                         insert(temp.right,data);                     }                 }             }         }  Main function                  public class test{             public static void main(String[] args) {                 Tree t = new Tree();                 t.insert(t.root,3);                 // t.insert(t.root,1);                 System.out.println(t.root.data);                 }         }    Upon running I get t.root is null. I don't understand why. Need some help. I am passing t.root as temp, so when temp gets modified doesn't that mean t.root does too?

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


Is there a difference in these two sentences, and if so, what is the difference?   Immediately afterwards I remembered having met her. I remembered having met her immediately afterwards.   I think there is a difference but cannot identify what it is.

For example:     Ever wish you could share information broadly   Could it be rewritten to:     Ever wish you could broadly share information   Are there any rules for the position of the adverbs.


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

I've always heard this reasoning, and it makes obvious sense, but how do you actually show it for some arbitrary product? Would it be something like this?  $$(a(b(cd)))e=((ab)(cd))e=(((ab)c)d)e=abcde?$$  Do you just say that the grouping of the parentheses now corresponds to just multiplying straight through? Thanks.


After the last Windows update (), I got this weather icon on the taskbar and clicking on it shows the news, weather and traffic information. How can I remove it?

On Windows 10 version 1909 and newer releases, Microsoft has added a "News and Interests" widget on the Taskbar (see ):  How can I remove this Widget from the Taskbar?


Some of my apps having GUI are not working on Ubuntu 19.04 and I suspect it is due to them not supporting wayland. How do I switch it to X11?  EDIT: It is not similar to a solution that was suggested. Infact, uncommenting the statement  WaylandEnable = false   did not even boot up my Ubuntu( I later restored my Ubuntu another way)

Some of my applications don't work on Ubuntu 17.10 Wayland. How can I switch back to Xorg?


What makes better sense for situations like: low light, sports/action, wild life?   More cross-type sensor on AF (like Canon does) Or more sensitive cross-type sensors (like Nikon does)

Canon claims that EOS 6D has special capability to focus in low light, but it has only one cross-type sensor and overall only 11 focus points. Does only one cross-type focus point in the Canon EOS 6D affect its ability to focus in low light? Is it correct to assume that more cross-type focus points produce more accurate and sharper focus?


Watching it again today, I noticed the scars on his neck. What's the backstory on those?

In Inglourious Basterds First Lieutenant Aldo Raine (Brad Pitt) had a scar that made it look as though someone had tried to cut his throat.  Is there any reason mentioned for that scar (in the movie that I missed, or in interviews with Tarantino etc.)?  I kept expecting someone to ask about it, and get some background story.    Scar across throat    Scar continuing up behind left ear


I have one WordPress site using MySQL for the database, normally each post is attached with a lot of photos and daily traffic is about 5,000-8,000. My current Database size is 750MB and wp-content/uploads = 2.75GB  My question is in the future if my website grows to have 10,000 posts, will it be possible to be running? (in case of the disk space is enough) or will my site be very slow?  Thank you

What is the maximum size for a MySQL table? Is it 2 million at 50GB? 5 million at 80GB?  At the higher end of the size scale, do I need to think about compressing the data? Or perhaps splitting the table if it grew too big?


Say that I developed an hardware source of randomness, which I would like to use to seed a cryptographically secure random number generator.   How would I go about testing it? Are there standardized tests that one can use to check wether or not his source of entropy is reliable enough to seed cryptographic random number generation?  For example, the guys at onerng.info claim to generate the entropy any user needs to protect his privacy and blablabla. How do they substantiate their claim? How can random number generators be verified?

In the past I have used the Chi-squared test to check the statistical randomness of my generator. Is this a good test to use? Are there other tests?


I would like to know math websites, that are useful for students, PhD students and researchers (useful in the sense most of the students or researchers -of a particular area- are using it). Maybe you can share which math websites you sometime use and why you use it. Let me give my websites and why I use them: MathOverflow and StackExchange: Very good to look up questions about how to do mathematics, what mathematics is, how it evolves, and of course to have an exchange with smart people, who can help you if you stuck at something. arXiv: I don't use it now, but I think that's the main website to read papers and to publish (research level) The Stacks Project: It is very useful for me to loop algebraic things ups with more explanation as in some lectures... MathSciNet: To search for papers, that may help you. Number Theory Web: Since I want to become a number theorist, this site helps me to see which kind of things exist. Have you more websites, that help you to understand maybe mathematics, or just to connect to other mathematicians? Everything is welcome, just post it as an answer and not a comment. Thank you in advance!!

What are some of the web-tools which must be a part of every mathematician's arsenal? Tools which help mathematicians research, solve problems or even collaborate together! Here is a list I gathered. Many among you may already know these, But still, in case.  -- This is a great website for easy typing in LaTeX.   and the -- Especially useful when one wants to crack a tough indefinite question. Steps included for those who need them!  --A list of all mathematically interesting sequences that contains over 3 million of such. Many things are discovered thanks to OEIS.  --One of the best online graphing tool with loads of computing power.   and -- Who doesn't know them! A unique engine for computing answers and providing knowledge.  --Math. Graphics. Programming. Whether you’re analyzing data, developing algorithms, or creating models, MATLAB is designed for way you think and the work you do.   Software such as Maple, MATLAB, Mathcad, Pari/GP, R, and the WolframAlpha website, etc are famous, and this question is not asking for similar software alternatives. I haven't added  to this list  for obvious reasons :~) Thanks in advance to all for the over-enthusiastic help :-) You might want to check out   PS-No intention of advertisement or promotion of any website or software.


I am trying to install Ubuntu for the first time and have been unsuccessful. I am using Unetbootin. First i used the 14.04_Live distribution and was told i had a corrupt kernel. I then used 14.04_HDMedia. it trys to boot up, scrolls rapidly through several pages of notifications about what it is doing and such. It then hangs on a dark blank screen.  I welcome advice, but my first thought is, maybe I'm using the wrong distribution for my laptop.   Which distribution should I use for the following PC  HP Pavillion DV-5000 32 bit  XP windows media center.  Thanks.

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


I was trying out different desktop environments on Ubuntu 16.04 LTS and ran sudo apt install ubuntu-mate-desktop. It worked, but when I restarted my computer Ubuntu MATE took over start up and the login screen. After uninstalling ubuntu-mate-desktop nothing changed, so I ran sudo apt purge --auto-remove mate* and sudo apt purge --auto-remove *mate*. Now there is no loading screen when shutting down or starting up, and the login still has the layout from Ubuntu MATE.  How can I revert the start up and login back to Ubuntu default?    Edit: I tried tried the accepted response from the question . This got the splash screen back, but the login screen still has the Ubuntu MATE default not including the background. I also ran sudo apt install ubuntu-desktop, but that didn't do anything because it is already installed.  For more detail, startup appears slower, especially getting into the default DE from the Ubuntu MATE login. Once in the default DE, after timeout it goes to the default login, but if I logout it goes to the Ubuntu MATE login.

I have done this in the past in 16.04 and 17.10 but in 18.04 I can not get plymouth manager to work.  Downloaded it from the software center but it doesn't work.  Is there a guide available that will let me do it in terminal?


I need to find all FieldItemList's with a certain field type.  /* @var FieldItemList $field */ foreach ($p->getFields(FALSE) as $field_name =>  $field){   kint($field->getPluginId()); //NOPE   kint($field->getFieldDefinition()); //NOPE   kint($field->equals(array('MY_FIELD_TYPE'))); //NOPE }   I would expect there is a simple way of finding out the field type of a FieldItemList.

I'm able to get a list of the field types with the following code.  $defs = \Drupal::service('plugin.manager.field.field_type')->getDefinitions();   I want to get the field type of a specific field. How do I get it?  For example, I'd like to check if the field type of field_image is _image. Is there code similar to the following one?  $fieldType = \Drupal::service('plugin.manager.field.field_type')->getDefinition('field_image');


I was reading a book where the dialogues of the actors were written in paragraphs. The dialogues, were broken down by the author into pieces of sentences, and between the pieces, the author inserted his thoughts/facts/humour, and then proceeded with the dialogue. For example,  He continued, “Just after the Independence,” and rose from his chair.  Should this have been typed as ”, instead of ,”?  Or take a second example,  He said, “I am a good boy.”  This is how it is generally written. But it seems to me that there should be another fullstop at the end of the sentence to mark the end of He said, “———”. sentence.  How should inverted commas be closed?

Possible Duplicate:          I've heard that you should always place ending punctuation inside of quotes, no matter what.    Are there any cases where it is appropriate for a sentence to end with ".?


This should be an easy one... I have the following situation in my ubuntu server (ftpuser is not in the root group):  ftpuser$ ch /var/www/ ftpuser$ mkdir test ftpuser$ chmod 775 test   now login with root user  root$ cd var/www/test root$ touch a.txt root$ chmod 644 a.txt   now login with ftpuser again  ftpuser$ cd /var/www/test ftpuser$ rm a.txt   This works. And this is my question, why does this work? The file a.txt is created by root and has permission 644, so only root should be able delete it.  Or is everything in folder test now fully accessible by "ftpuser" user?  Thanks for the help.

From the post  I understand that rm just needs write permission on directory to remove the file. But I find it hard to digest the behaviour where we can easily delete a file who owner and group different.  I tried the following  mtk : my username abc : created a new user  $ ls -l file -rw-rw-r-- 1 mtk mtk       0 Aug 31 15:40 file $ sudo chown abc file $ sudo chgrp abc file $ ls -l file -rw-rw-r-- 1 abc abc       0 Aug 31 15:40 file $ rm file $ ls -l file <deleted>   I was thinking this shouldn't have been allowed. A user should be able to delete only files under his ownership? Can someone shed light on why this is permitted? and what is the way to avoid this? I can think only restricting the write permission of the parent directory to dis-allow surprised deletes of file.


I logged out from programmers.SE and have no intention to log back in, yet PSE is very insistent on logging me in whenever I accidentally visit the web site.  I'm using Chrome Sync but I don't think that synchronizes cookies. I'm logging in to other SE sites obviously and I just don't want to login to PSE.   The interesting thing is that I actually revoked access of PSE in my Google Accounts page. It's not listed there yet I keep getting logged in to the web site. This makes me think that there is something wrong with how OAuth is implemented somewhere.  I'm only using Google OAuth to login to SE sites.

When I tried to log out by clicking the logout link at the top (first time for me because I don't really log out of S[OFU] unless I clear my browser's session data), I got the following message:     You're a registered user.      You can log in or out at any time   using the OpenID you've already   associated with your account.   And when I clicked on the parts of the site, it seems that I'm still logged in (see, i'm creating this question after I logged out and this question would probably appear in the list of the questions I asked) and my name is still appearing at the top of the page.  Is this by-design or is this a bug?


if I ge  ArrayList<String> myList; // add some stuff to myList ArrayList<String> copyOf=myList;   copy will be a reference to myList, thus if I change copyOf, myList will change to. Hpw can I make coyyOf be a copy of myList, so if copyOf chnages, myList will not change.

How can I clone an ArrayList and also clone its items in Java?  For example I have:  ArrayList<Dog> dogs = getDogs(); ArrayList<Dog> clonedList = ....something to do with dogs....   And I would expect that objects in clonedList are not the same as in dogs list.


I had given a pen drive of mine to a friend with some data on it. He plugged the pen drive into the Windows 7 powered Acer netbook, didn't eject (unmount) it before pulling it out.  When I again plugged in my pen drive on his netbook or on my desktop, it shows that its write protected. Even in Ubuntu, it mounts as write protected.  I have read these posts and none worked:         The Problems I'm facing:   I have no write protection switch on the Pen Drive. I have no registry in the Registry Editor called "StorageDevicePolicies", I'm using Windows 7. I can't format it using EASEUS Partition Manager on Windows 7 or with gPartEd on Ubuntu.   Note: I have Windows 7, Ubuntu 11.10 and Mac OS X Lion available to me.  Is there any way to format the pen drive so I can use it again?  Or is the only way now, to throw it?

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.