Scripting out database user level permissions

I have tried to search this and was able to find few but could not find exactly the way to script out the database level permissions for a database.  I am migrating this database whose logins I can create using sp_help_revlogin, but user permissions will not get copied.  I can extract permissions with below query:  SELECT    ISNULL(OBJECT_NAME(major_id),'') [Objects], USER_NAME(grantee_principal_id) as [UserName], permission_name as [PermissionName] FROM     sys.database_permissions p WHERE grantee_principal_id>0 ORDER BY     OBJECT_NAME(major_id), USER_NAME(grantee_principal_id), permission_name   But I need something like rev login which generates a script and you can execute to get the permissions mapped.  I have tried DBAtools, but i am unable to use as it fails with error     Unable to find type [DbaInstanceParameter]   I have more than 50 logins and about 20 roles to be copied.


Should I use "or" or "nor" in the following case?

I wasn't forcing myself to say anything, or/nor trying to be funny.   "Or" sounds more grammatically correct to me. But "nor" has more Google results. So I'm confused.


How can I find position of matched regex of a single string in Perl?

Let's say my $string = "XXXXXTPXXXXTPXXXXTP"; If I want to match: $string =~ /TP/; multiple times and return the position for each, how would I do so?  I have tried$-[0], $-[1], $-[2] but I only get a position for $-[0].  EDIT: I have also tried the global modifier //g and it still does not work.


The order of a group $G$ is $pq$ where $p$ and $q$ are both prime. Show that all proper subgroups of $G$ are cyclic. I need help with this. I know that all the orders of subgroups divide the order of the larger group, but I do not know where to go from there.


Resizing partition with 18.04 does not succeed with GParted

I have Ubuntu 18.04 (Bionic) installed on 1 partition (ext 4) using whole disk. I want to downsize it with GParted running from live USB, but after resizing, 18.04 does not boot, showing lots of errors.   I was able to try several times, because I have an ISO image of the system and I recreate it after with Clonezilla.   What should I do?


"my brother, *who/whom* she later married": Which is correct?

I know very well that my question is in the duplicate department, but I need to be sure on the usage of "Who/Whom" in this particular example.     She met my brother, who/whom she later married.    Please strike-through the wrong option.  The source where I encountered this example states that both options are valid.  My understanding is that we say "She married to him", so "whom" is the correct option.  Please advise.


Definition of irreducible polynomial via the units of an integral domain.

Let $D$ be an integral domain. A polynomial $f(x)$ from $D[x]$ that is neither the zero polynomial nor a unit in $D[x]$ is said to be irreducible over $D$ if, whenever $f(x)$ is expressed as a product $f(x)= g(x)h(x)$, with $g(x)$ and $h(x)$ from $D[x]$, then $g(x)$ or $h(x)$ is a unit in $D[x]$.  This is the definition of the irreducible polynomial in Gallian's book. What I don't understand is how this definition translate to the fact that the polynomial cannot be factored into a product of polynomials of lower degree when $D$ happens to be a field.  There is also this examples that the polynomial $f(x)=2 x^2+ 4$ is irreducible over $\mathbb R$, but reducible over $\mathbb{C}$.  To me it seems that it is also irreducible over $\mathbb{C}$ since in its factorization $2(x^2+2)$, $2$ is unit over $\mathbb{C}$.


How do I remove my "page not found" pages from Google's index?

I have a wordpress site that has had a large number of blog posts removed. How can i ask google to remove all these 404 page not founds, but leave the active blog posts. I see the removal tool in google webmasters but it doesnt say if it will just remove the 404s. I understand 404s naturally are removed from the index, but i want to expedite this.


Is the assertion 'loans create deposits' true in banking?

I have read that banks don't really need deposits to make loans but rather it is the other way round. I thought that banks could only lend out money that customers deposited.  If this is the wrong idea, then where do banks get the money to loan out in the first place?


Issue attaching an event to a button inserted with jQuery

I have the following code that dynamically creates an environment over a page. The ultimate goal is to create a "walk-through wizard" for users.   This code adds an overlay over my page, and then a container with a next and previous button in it.  Then, using Ajax, I populate the container for each step (triggered by the Next/Prev buttons).  In order to achieve some unique styles and apply unique functions to each step, I add a class to the container and to the buttons for each step. For example, The first step, the container has the class step1, as do the buttons, second step has the class step2 applied to the container and buttons and so on.  What I'm finding is that I can't apply functions to buttons based on the class that changes using jQuery.  For example, here is my code that creates the environment, calls the files for each step and adds all the classes:  jQuery(function ($) {   $('body').attr('onboarding_step', 'step1');   $('body.wp-customizer').addClass('skizzar_onboarding');   $('

').insertBefore('body.wp-customizer');  // first step   $('#so_overlay').html('

');   $('#onboarding_steps_container').html('

<button id="prev" class="step1"> PREV</button><button id="next" class="step1">NEXT </button>
');  // here's the steps var steps = [   "wp-content/plugins/skizzar-onboarding/ajax/step1.php",   "wp-content/plugins/skizzar-onboarding/ajax/step2.php",   "wp-content/plugins/skizzar-onboarding/ajax/step3.php",   "wp-content/plugins/skizzar-onboarding/ajax/step4.php",   "wp-content/plugins/skizzar-onboarding/ajax/step5.php", ]; counter = 0; $('.onboarding_steps').load(steps[counter]);  $('#next').click(function () {   counter = (counter + 1) % steps.length;    $('.onboarding_steps').load(steps[counter]);    $('#onboarding_steps_container, .button_holder button, #so_overlay').attr('class', 'step' + (counter + 1));    $('body').attr('onboarding_step', 'step' + (counter + 1));  });  $('#prev').click(function () {   counter = (counter - 1) % steps.length;    $('.onboarding_steps').load(steps[counter]);    $('#onboarding_steps_container, .button_holder button, #so_overlay').attr('class', 'step' + (counter + 1));    $('body').attr('onboarding_step', 'step' + (counter + 1));  });  });   Now if I were to add the follownig code to send a message to the console when the button with class .step2 is pressed:  $('.step2 #next').click(function () {     console.log('step 2 pressed'); });   Nothing happens. I think this is because I am changing the class via jQuery, however, I have no idea how to get around this problem.  Here is a jsfiddle showing my issue:   (Obviously I can't load the files using jsfiddle, but if you inspect the elements, you will see that second time you press NEXT (which has the class step2 it should send an alert, but it does nothing)


Mapping an Image on a Acrylic Glass Pane

I managed to put an image onto a glass pane (using UV-mapping and nodes). Following a tutorial on YouTube on acrylic glass, I was able to improved the pane (adding Fresnel to have the edges reflect). Unfortunately, I cannot seem to figure out how to add the image texture to the pane. The Fresnel is now blocking the port of the Mix Shader where my Image Texture used to go. This is my node-setup:  Using version 2.9.1.0 rendering with cycles.


How to get lookup field in Search REST API?

How to retrieve the lookupId or lookupvalue in Search REST API results with other fields. http://server/_api/search/query?querytext='sharepoint'&selectproperties='Title,Age'


I am trying to create a kind of pseudocode in Latex resembling the one shown below .   What I tried is:  1. Convert R to a binary region using the threshold $\theta_{0}$\\  2. Assume N is the sum of the number of non-zero pixels within $F_{l}$ and $F_{r}$.\\  3. If N is larger than a predefined threshold $\beta$, then\\              \begin{center}             $\theta_{0} = \theta_{0} + \Delta\theta$\\             Repeat the procedure from step 1             \end{center}    Else              \begin{center}             $\theta = \theta_{0}$             \end{center}    End   Its not turning out like I want though. Can anyone please suggest how to fix this?


How To Detect If Type is Another Generic Type

example:  public static void DoSomething<K,V>(IDictionary<K,V> items) {    items.Keys.Each(key => {       if (items[key] **is IEnumerable<?>**) { /* do something */ }       else { /* do something else */ } }   Can this be done without using reflection? How do I say IEnumerable in C#? Should I just use IEnumerable since IEnumerable<> implements IEnumerable?


Can you be involuntarily denied boarding if you already checked in AND already have your seat assigned?

Some companies allow you to check-in online prior to the flight, assigning you the seats.  Is it still somehow possible to be involuntarily bounced, despite having already checked in and already having an assigned seat?  This assuming you don't arrive late.


I'm getting a lot of "System program problem detected" error dialogs, is there any way I can make them go away?

After upgrading to Ubuntu 13.10 I get a lot of error messages with no info when the desktop starts:    How can I solve this? I tried to update and install kde-full and gnome. But it was not solved.


How to create a command in linux from a bash executable when my program uses an internal database?

I wrote a small program in bash and would like to make it executable from anywhere on my computer using a custom command. In addition, my program uses a small internal database that I would also like to have "embedded" in the program. Below is an example of my problem and what I have tried so far. Suppose my program returns the capital of a Brazilian state selected by the user. The program folder has 3 files. An internal base called capitals.csv: Capitais,Estados,Siglas dos Estados,Regiões Rio Branco,Acre,AC,Norte Maceió,Alagoas,AL,Nordeste Macapá,Amapá,AP,Norte Manaus,Amazonas,AM,Norte Salvador,Bahia,BA,Nordeste Fortaleza,Ceará,CE,Nordeste Brasília,Distrito Federal,DF,Centro-Oeste Vitória,Espírito Santo,ES,Sudeste Goiânia,Goiás,GO,Centro-Oeste São Luís,Maranhão,MA,Nordeste Cuiabá,Mato Grosso,MT,Centro-Oeste Campo Grande,Mato Grosso do Sul,MS,Centro-Oeste Belo Horizonte,Minas Gerais,MG,Sudeste Belém,Pará,PA,Norte João Pessoa,Paraíba,PB,Nordeste Curitiba,Paraná,PR,Sul Recife,Pernambuco,PE,Nordeste Teresina,Piauí,PI,Nordeste Rio de Janeiro,Rio de Janeiro,RJ,Sudeste Natal,Rio Grande do Norte,RN,Nordeste Porto Alegre,Rio Grande do Sul,RS,Sul Porto Velho,Rondônia,RO,Norte Boa Vista,Roraima,RR,Norte Florianópolis,Santa Catarina,SC,Sul São Paulo,São Paulo,SP,Sudeste Aracaju,Sergipe,SE,Nordeste Palmas,Tocantins,TO,Norte  One python file: #get_capital.py import pandas as pd import sys from unidecode import unidecode  df=pd.read_csv("capitais.csv")  df["Estados"] = [unidecode(k.lower()) for k in df["Estados"]] user_state = unidecode(sys.argv[1].lower()) answer = df[df["Estados"]==user_state]["Capitais"].to_list()[0]  print("A capital de {} é {}".format(user_state.title(), answer))  And, finally, a bash file: #!/usr/bin/bash python get_capital.py $1  An example of execution would be: bash stack.sh bahia  Output: A capital de Bahia é Salvador  What I've tried so far: I read  that it is possible to create a kind of hyperlink to the bash file so that it can be called from anywhere on the computer. To do this, I just type:  sudo ln -s PATH / stack.sh /usr/bin/stack.sh  Where PATH is the path where my bash file is currently located. This works, but it's still not what I want for two reasons. First, I still need to use the word bash before the file name. I know I can create a binary using chmod +x stack.sh (see this  for more details on this). However, what I would like to do is just use a custom command as stack instead of ./stack. In addition, although the hyperlink works and I can access my bash file from anywhere on the computer, my program itself only works in its original folder since the csv file is only there. Anyway, how do I "package" these files in a folder that is accessible from anywhere on my computer and that can be called up using a custom command?


I think that a color is intangible and a paint (thing) is concrete but a color (property) is abstract. Isn’t ‘color’ itself an abstract noun? I cannot imagine a red color but only a red-colored thing.


Why break function is not working and program says it's out of loop?

My break function is not working even though it is in the loop. Please, someone, explain in detail, because I'm new to Python.  q1 = input('want a question?: ') if q1 == 'yes':     print("let's get started!, press enter")     a1 = input() else:     print('why did you even start me ?!')     break   Here I expect break to stop the program from going any further.


Comparing the work required for a mass to escape the Earth's gravity to the necessary initial kinetic energy gives us the escape velocity from the surface of the Earth of around $11\;\mathrm{km\cdot s^{-1}}$.  But assuming no air friction and hence no loss in energy on the axis perpendicular to gravity it shouldn't matter what angle the projectile is projected at.  Is this true?  If there were no air and we fired a projectile at $1^\circ$ to the horizontal at a velocity of $11\;\mathrm{km\cdot s^{-1}}$ should it still escape the Earth's gravity despite such a low ( $11000\sin(01^\circ)\;\mathrm{m\cdot s^{-1}}$) vertical velocity?  Could it be that firing a projectile horizontally at the escape velocity in a frictionless medium would result in a perfect orbit?  Also: Taking escape velocity of $11200\;\mathrm{m\cdot s^{-1}}$ and radius af Earth of $6371000\;\mathrm{m}$ and $g=9.80665\;\mathrm{m\cdot s^{-2}}$. On a flat Earth if you fired an object horizontally at $112000\;\mathrm{m\cdot s^{-1}}$ it would fall  $0.039\;\mathrm{m}$ after $1000\;\mathrm{m}$. But using trigonometry the Earth would have curved away by $0.078\;\mathrm{m}$. Twice the value necessary for an orbit. Can someone check this?


Program that logs the CPU usage in Windows 7

Is there any program that logs the CPU usage of all programs? I want to know, over a period of one month, which programs use the CPU more intensely.


In Star Wars, did anyone travel outside the Galaxy?

Given the Hyperdrives and other tech in the Star Wars universe surely someone has traveled outside the Galaxy? Or does this happen but doesn't impact the stories or characters we know of? (I don't know much outside films and the CW series so be nice).


How should a field in read-only be indicated from a usability perspective?

As the question states - How should a field in read-only mode be indicated?   Should it be just a label, some very light grey background behind it, or something else? Is there any user research that exist regarding the optimal way to display fields in read-only mode?


Prove if $a>b>0$ and $n\in\mathbb{N}$ then $a^{1/n}-b^{1/n}<(a-b)^{1/n}$

If $a>b>0$ and $n\in\mathbb{N}$ then $a^{1/n}-b^{1/n}<(a-b)^{1/n}$  I know $f(x)=x^{1/n}-(x-1)^{1/n}$ is strictly decreasing if $x>1$. Since after taking the derivative I get that $f'(x)=\frac{1}{n}x^{\frac{1-n}{n}}-\frac{1}{n}(x-1)^{\frac{1-n}{n}}$ which is decreasing for all $x>1$  Now evaluating $f(1)$ I get just $1$ and evaluating $f\left(\frac{a}{b}\right)$ I get $\frac{a}{b}^{\frac{1}{n}}-\left(\frac{a-b}{b}\right)^{\frac{1}{n}}$. Now I'm not sure how to then show that  $a^{1/n}-b^{1/n}<(a-b)^{1/n}$


StackOverflowError - how is it possible?

package qwertyuiop;  public class Confusion {     Confusion com = new Confusion();      public static void main(String[] args) {         Confusion con = new Confusion();         System.out.println(4);         con.A();         System.out.println(5);     }      public void B() {         System.out.println(3);     }      public void A() {         System.out.println(4);         com.B();         System.out.println(4);     } }   I know the code is wrong but I am interested in knowing why this is throwing StackOverflowError. I would also like to know how this code is executing internally.


Does a ski racer with a larger mass have an advantage?

Does a ski racer with a greater mass have an advantage over a racer with a lesser mass?  If mass of one racer is 54 kg and the mass of a more slender racer is 44 kg I know the speed at which they descend should be equal if they were to fall in a vacuum. How does friction force, air resistance and momentum play a part in determining the advantage or disadvantage of larger mass in ski racing?


Context sensitive "it doesn't belong here" options?

I've noticed that questions will come up that belong on another site within the stack exchange network, however the "it doesn't belong here" option only shows popular sites.   Is it possible to have a context sensitive flag box that reads the questions tags and provide the appropriate options to migrate the question?    For instance, question   was flagged drupal-7,drupal-modules and drupal-theming, yet the option to migrate to the drupal SE site is not present:     Having context sensitive migration would allow the drupal site to appear in the selections.  I think this would be better than using the "needs moderator attention -> other" option, or flagging in another inappropriate way.


I posted this question on stack overflow first, but I guess no one is very interested in video games there...  What are some path finding algorithms used in games of all types? (Of all types where characters move, anyway) Is Dijkstra's used a whole lot? I would think not, as it doesn't actually trace out the steps to take to get somewhere, right? If I'm understanding it right, it only determines which object is the closest. I'm not really looking to code anything; just doing some research, though if you paste pseudocode or something, that would be fine (I can understand Java and C++). I'm basically looking for a quick overview of path finding in general.  I know A* is like THE algorithm to use in 2D games. That's great and all, but what about 2D games that are not grid-based? Things like Age of Empires, or Link's Awakening. There aren't distinct square spaces to navigate to, so what do they do?  What do 3D games do? I've read this thingy , which I hear is a great authority on the subject, but it doesn't really explain HOW, once the meshes are set, the path finding is done. IF A* is what they use, then how is something like that done in a 3D environment? And how exactly do the splines work for rounding corners?


I see the different folders bin, dev, mnt, proc, srv, sys, etc.   What are the properties of all these different folders? What are their purposes? Are there files in some of them that I should not touch? Should I be touching files in the other folders?  Final question: in a Unix environment, do folders == directories? I apologize for all the questions.


I have enough reputation but can't get to the chat room?

I have 21 reputation here:  But it won't let me get into chat (I only have 19):  Why is this so? Thanks in advance


I am going to apply for a postdoc position. Applicants are asked to send their CV,research statement, name of referees etc as a single PDF file directly mailing to the "principle investigator" of that project. I was wondering whether I need to add my cover letter into that PDF file or just write it in my email itself.


Null pointer exception thrown when trying to add things to a TreeMap

in my Network class on line 10 i am creating a TreeMap, and then giving it the values of Network device and Channel so it would add the Networkdevice to a new Channel..  on line 21 in the Network class i am creating a method called AddDevice which takes in a NetworkDevice as a parameter so this would be an AccessPoint object because AccessPoint extends NetworkDevice and this method takes the NetworkDevice thats been passed in and then adds it to the TreeMap by saying join.put...  Within Network i am also creating a private field called Channel  in the NetworkDevice class i am creating a new object on line 9  public void join(Network network){ network.addDevice(this); }   which takes a network as a parameter and calls its .addDevice method to add the device its called upon so example i am trying to test in my main method is:  accessPoint.join(network);   however this is giving me a null pointer exception when i try to test it  The Three main places I am having this exception is occuring from the following chunks of code:     In Network class i have   public class Network { private TreeMap<NetworkDevice, Channel> join; private Map<AccessPoint, Channel> records;  private static List<Channel> channels = new ArrayList<Channel>(); private Channel channel;  public Network(Channel channel){         this.channel = channel;     }      public void addDevice(NetworkDevice device){         channel = new Channel(0);         join.put(device, channel);         channels.add(channel);     } }      In my NetworkDevice class i have:   public class NetworkDevice { protected String address; protected Channel channel;  public void join(Network network){         network.addDevice(this);     }  }      My main class is for testing purposes only however, it does return a   null pointer exception   public class Main { public static void main(String[] args) { Channel channel = new Channel(1); Network network = new Network(channel); AccessPoint accessPoint = new AccessPoint("168.0.0.1"); //Client client = new Client("192.1.1.1"); accessPoint.join(network);   } }   my output and problem is:  Exception in thread "main" java.lang.NullPointerException     at Network.addDevice(Network.java:23)     at NetworkDevice.join(NetworkDevice.java:9)     at Main.main(Main.java:10)


Problem internal partition macOS high sierra

Please help me, this is my last year at university, and all my files and projects are on my device.  I had two sections 399 gigs for the Mac system and 100 gaps on which I installed Linux .. After a while I deleted the Linux and upon restart I couldn't log in and some solutions worked out but the problem still exists.     Update:    Thanks, the answer worked, but I have this problem: When I start my compute, it goes to EFI boot, I think it's for windows 10. I don't need it. I want to delete it and put my priority macOS. How i can do that? I'm soooo scare to do any things.  And, I can't see the 100 GB partition.


How to add CSV data to 2D Array and display array in Java?

I am having an issue of verifying that the data from a csv file has been stored by a 2D array. When I try to display the array in my main, I get a Null Pointer Exception.  I have tried various youtube videos and looking on stackoverflow.   My add to 2D array code:    public static void addTo2DArray(String[] tmpArray, int minCapacity) {     int row = 0;     int columns = 0;      if ((minCapacity > row)) {         row = (row * 3) / 2 + 1;         String[][] newArray = new String[row][columns];         for (int i = 0; i < crime2DArray.length; i++) {             for (int j = 0; j < crime2DArray[i].length; j++) {                 newArray[i][j] = crime2DArray[i][j];             }         }         crime2DArray = newArray;     }     crime2DArray[minCapacity - 1] = tmpArray;  }   Also my main code to display     public class TestUSCrime {  public static void main(String[] args) {      for (int row = 0; row < crime2DArray.length; row++) {        for ( int column = 0 ; column <crime2DArray[row].length; column++) {            System.out.print(crime2DArray[row][column] + " ");        }          System.out.println();     } }   }  I am expecting to display the csv file in a 2D array but the output I am getting is the Null Pointer Exception that takes me back to line 15 of my main.   Line 15 is:     for (int row = 0; row < crime2DArray.length; row++) {


If a graph has a Hamilton Path starting at every vertex, must it contain a Hamilton Circuit?

If a graph $G$ has at least three vertices, and has a Hamilton Path starting at every vertex, must it contain a Hamilton Circuit?    I have been struggling with this problem.  It seems that because every vertex both starts and does not start a Hamilton Path, every vertex is contained in a circuit.  But I cannot extend this idea to show that there is a Hamilton Circuit.


Don't know password, how do I set a new one?

I have been using UbuntuLKB 17 for almost half a year now, and recently, when attempting to download updates, am prompted for a password. I never set a password for Ubuntu. I've read similar threads on this sight telling me where to go via terminal to simply set a new one, but I can't do any of this without entering the current password, which I don't know. Help? Thanks.


How to access aura:id value in init method of salesforce lightning

When I click on Edit Button   When I have changed value of "Case Type" picklist, Request Detail section is to appear on change of picklist value  I want to show this section on load of this edit page. I am using following code.  <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>   <lightning:inputField fieldName="Type" aura:id ="caseTypeId" onchange="{!c.caseTypeChange}"/>   <aura:if isTrue="{!v.caseTypeValue =='Requests'}">

Request Details

                                                           <lightning:inputField fieldName="Description" />
                         &nbsp;&nbsp;
                                                           <lightning:inputField fieldName="Subject" />

 </aura:if>   component code  doInit: function(component, event, helper) {     //Edit Case     helper.caseTypeChangeHelperFun(component, event);                         },  caseTypeChange : function(component, event, helper) {            helper.caseTypeChangeHelperFun(component, event); },   Helper Code   caseTypeChangeHelperFun: function(component, event){                         var caseTypeIdValue=component.find("caseTypeId").get("v.value");            component.set("v.caseTypeValue", caseTypeIdValue);                console.log('--caseTypeIdValue---'+caseTypeIdValue);      },   Problem   When I click on the 'case Type' pick list "request detail" section is showing perfectly. When I load the "Edit" page and if value is selected as "request" the related section is not showing. This is the problem.


How to write to command line using python

I need to run a series of commands in command prompt and I want to automate this process. I can run a command in command prompt using Python code:  import os os.system("start /B start cmd.exe @cmd /k {command}")   OR  import os import subprocess p = subprocess.Popen(["start", "cmd", "/k", "command"], shell = True)   However, after executing a command, I cannot write another command to the same command prompt. Is there a way to do this?  The thread  is similar but I don't think it explains how to write a new command to the same command prompt after the one before finishes executing  Also, as I understand  explains how to run commands in parallel not one after each other.


Can I cross into USA on the day my visa expires

My wife is a (Mexican national) her visa expires on June 3rd, can she cross into the US from Mexico on that day?  Or does her Visa expire at midnight on the 2nd or midnight on the 3rd? We will be driving across and returning same day.


There are $150$ switches. First, You turn on all $150$ switches.Next, you turn off the even indexes.Then you toggles every third index and turn it off if it is on or turn it on if it is off. After $150$th pass. in which you toggle only switch number $150$, how many switches are on?  I solved it "brut force" and I found that the answer is $75$ (correct me if I'm wrong)  But I'm looking for explanation "number theory" style.  Attempt:  $1.$ turn on all $150$ switches  $2.$ turn off all index $i=0\pmod 2$  $3.$ something $\pmod 3$


Why C# Task.Run() method print the same number in the loop in console app?

I have created a console app which print the number in a for loop using C# Task.Run() method. If you look at the code, I am initializing the Employee object in the loop and pass the number in the method, though it prints the same number.  Code:  class Program     {         static void Main(string[] args)         {             for (int i = 1; i <= 500; i++)             {                 Task.Run(() => new Employee().ProcessEmployee(i));             }             Console.Read();         }     }      public class Employee     {         public void ProcessEmployee(int employeeId)         {             Console.WriteLine($"The number is: {employeeId} and thread is {Thread.CurrentThread.ManagedThreadId}");         }     }   Output:    The question is- How would I fix this issue? I still want to use Task.Run() method because in my real application scenarios, I want to process the stream (JSON data) in a different thread and do not want to block my main callback method which receive the stream (JSON data).  Thanks in advance.


In Newton's gravity, is the inverse square law related to the fact that our Universe has (apparently) 3 dimensions?

I read, long ago, a book, whose title I can't remember but I think the author was Carl Sagan. In the book was saying that gravity follows the inverse square law because of our Universe was 3 dimensions of space. (I'm obviously not taking into account string theory which states that are extra dimensions). By this logic, if the Universe had 4 spatial dimensions the law would be 1/r^3 and if there were 5 dimensions, it would be 1/r^4.  So my question is: is this true? And if it is, could you elaborate and state exactly how do we know this is true? I think this might be related to GR theory, but I'm not very sure. Thank you in advance.


Can a functor $ F: A\to B$ not map $A$ to a subcategory of $B$?

So, I'm studying Category Theory, and I'm stuck with some questions. One of them is this one:  Can a functor $F:A \to B$, meaning, a functor $F$ from category $A$ to category $B$, have an image that is NOT a subcategory of $B$?  I can't really find a situation where this happens, but by my readings this is wrong of my part.  Thanks in advance.


Can I install ubuntu over Vista on a laptop computer?

Can I install ubuntu OS over the Vista OS on a Compaq laptop.  Are there any instructions out there for this???


Ordinary user can read /etc/passwd. Is it a a security hole?

When check the /etc/passwd file permissions, I discover that all user have the read permission to it.      $ ls -l /etc/passwd -rw-r--r--. 1 root root 3381 2015-11-04 11:02 /etc/passwd   Is it a security hole? Why or why not?


There should always be a way to intervene and stop a bounty from being auto-awarded

Auto-selecting answer for rewards is really annoying   had no good answers so I set a bounty on it. It received one new answer that was completely irrelevant, and that was auto-selected. I do understand the policy of losing the points regardless of if an answer is selected, in order to not motivate people to not accept an answer. But I don't see how the auto-selection feature contributes constructively to anything.  I figured this would have been discussed extensively elsewhere but I only found .


Automatically adjust display brightness based on sunrise and sunset

There are similar questions and answers in Ask Ubuntu that point to these solutions:         but they either require manual entry of sunrise and sunset times or they merely adjust the color balance and add more red at night.  I'm looking for a solution that automatically obtains sunrise and sunset times each day and physically adjusts the display brightness. Furthermore I want a transition effect over a period of 60 to 120 minutes so I don't notice the display change.   Re-configuring on cloudy days (dimmer outside) or when the sun happens to set between two three story buildings instead of their roof tops (brighter before sunset) should be a quick and easy process.


How did Severus know where the Cloak of Invisibility was?

In Harry Potter and the Prisoner of Azkaban, Severus goes into the Shrieking Shack with Harry's Invisibility Cloak on him.      Harry's fists clenched as they watched Snape skid to a halt next to the tree, looking around. He grabbed the cloak and held it up.   How did he know where it was?


Pasting "Foo" into LXterminal in XFCE produces "0~Foo1~"

I use LXTerminal 0.20. with XFCE 4.12.2 on Linux Mint 18.2 (upgraded from 18.1).  When I copy text in some desktop app and paste it into an LXTerminal session, I get 0~ and 1~ prepended and appended, respectively, to the text. So,  Hello world   becomes  0~Hello World1~   This doesn't happen with XFCE4's "native" terminal app (xfce4-terminal), so not the same issue as in  - and not resolved by the answer there. It also doesn't happen if I copy the text to apps with GUI (i.e. the text itself, in the clipboard, is fine).  Why is this happening and what can I do to avoid it?


I'm merging in a remote branch that may have a lot of conflicts.  How can I tell if it will have conflicts or not?  I don't see anything like a --dry-run on git-merge.


How to make Blogger show the last modified date of any post?

How can I make Blogger show the last modified date of a post?  When I edit an old post in Blogger, is there anyway to list the last modified date somewhere? anywhere?


Does a late reference letter to UWaterloo accepted?

One of my referees had to take an emergency leave because of a family death and because of that she would not be able to complete the recommendation to University of Waterloo(for MDSAI program) by end of deadline. She has informed me that she could complete the recommendation 2 days later from the deadline but the university website mentions that the reference needs to be submitted by deadline. Can this cause an issue and get my application rejected?


I have read a lot of stackoverflow questions but none seems to be working for me. i am using math.round() to round off. this is the code:  class round{     public static void main(String args[]){      double a = 123.13698;     double roundOff = Math.round(a*100)/100;      System.out.println(roundOff); } }   the output i get is: 123 but i want it to be 123.14. i read that adding *100/100 will help but as you can see i didn't manage to get it to work.  it is absolutely essential for both input and output to be a double.  it would be great great help if you change the line 4 of the code above and post it.


If we say, Is this necklace yours?  Then would it be the same if a dog has a necklace and we refer it by saying, Is the necklace its?  It sounds so weird to me but is it grammatically correct?


How do I calculate the ratio of a distribution of random variables

I'm quite lost with regards to solving this problem. Any help is appreciated. Thanks.  Suppose $X_1, X_2, . . .$ are independent discrete random variables, having the same distribution, and $E[X_i]>0$, for each $i$. Is it true that for any two positive integers $m$ and $n$  $E[\frac{X_1+...+X_m}{X_1+...+X_n}]=\frac{m}{n}$ ?


What do you call it when an ethnic slur has lost its offensive sense?

Or when the supposed target of the slur claim it as an unoffensive word and treat like something of a term of endearment among themselves.


Difference Between Double Implications and Equal Signs

I always thought equal signs (=), indicated double implications, however after thinking about this example, I am very confused.  For example, the Theorem (in Linear Algebra):  L($\vec{0}$) = $\vec{0}$, where L is a linear mapping can be described as:  In the equation L($\vec{x}$) = $\vec{y}$,  if $\vec{x}$ = $\vec{0}$, then $\vec{y}$ = $\vec{0}$.  However, the other implication is not true, which is if $\vec{y}$ = $\vec{0}$, then $\vec{x}$ = $\vec{0}$.  Do equals not always indicate double implications?  Thanks


Give a bijection $f: (c,d) \to \Bbb R$ (f no trigonometric) to prove every open interval has the same cardinality of R

I want to prove that every open interval has the same cardinality of R.  I've proved that $|(a,b)|=|(c,d)|$ so I may find a bijection $f: (a,b) \to (c,d)$.  I need a bijection $f: (c,d) \to \Bbb R$ (a bijection defined by an interval to $\Bbb R$) The problem is that the only function like this that I know is tan(x) that is bijective in ($- \pi/2, \pi/2)$ but I am not allowed to use trigonometric functions.  Does anybody know another function like this?


In beamer, how do I number theorems but not definitions?

I want my theorems numbered, but not my definitions. The options I'm finding turn numbering on or off universally. My attempts at customizing different theorem environments are not having any effect.  This issue is addressed for the article document class, but I cannot find a solution in beamer. There is a solution posted to the issue of making a seperate sequence for different theorem environments, but not for turning the number off entirely in one environment but not another.  Consider this:  \documentclass[t,handout]{beamer} \mode<presentation> \usepackage[english]{babel} %\setbeamertemplate{theorems}[ams style]   \begin{document} \frame{     \begin{theorem}     \end{theorem}     \begin{definition}     \end{definition}     } \end{document}   Notice that there is no numbering on the Theorem or Definition. Uncommenting the 4th line places numbers on both (and also bolds the terms, which I could take or leave). How can I do one of the following:   Activate the fourth line, then modify its settings so that the definitions are not numbered, With the fourth line de-activated, define the environments separately so that theorems are numbered, but not definitions, Use a different package with which one of the above is possible?   What surprises me especially is that if I leave the template out, and do like I would in an article, which is this:  \newtheorem*{definition}{Definition} \newtheorem{theorem}{Theorem}   I get an error that these environments are already defined. But if I strip the file down anymore it doesn't even generate a document, so what is defining the environments and why can't I customize it?


Twitter Integration getting error Failed to validate oauth signature and token

i am trying to implement twitter authorization in my salesforce app.in first step i am trying to get request token from twitter.here is my code :      public String getTwitterReqToken(){          String base_string = 'POST&';                                   String state = getRandomNonce();           base_string += EncodingUtil.urlEncode(twitterReqToken,'UTF-8');             String callback = EncodingUtil.urlEncode(returnUrl,'UTF-8');                 String timestamp = String.valueOf(DateTime.now().getTime()/1000);                            String param_string = 'oauth_callback='+callback+'&oauth_consumer_key='+twitterConsumerKey                               +'&oauth_nonce='+state+'&oauth_signature_method=HMAC-SHA1&oauth_timestamp='+timestamp                               +'&oauth_version=1.0';          param_string = EncodingUtil.urlEncode(param_string,'UTF-8');          base_string += '&' + param_string ;                              System.debug('base string is '+base_string);         Blob sig = Crypto.generateMac('HmacSHA1', Blob.valueOf(base_string),          Blob.valueOf(twitterConsumerSecret));                           String signature = EncodingUtil.urlEncode(EncodingUtil.base64encode(sig), 'UTF-8');         System.debug('signature is'+ signature);             String header ='OAuth oauth_callback="'+callback+'",'                   +'oauth_consumer_key="'+twitterConsumerKey+'",'                   +'oauth_nonce="'+state+'",'                   +'oauth_signature="'+signature+'",'                   +'oauth_signature_method="HMAC-SHA1",'                   +'oauth_timestamp="'+timestamp+'",'                   +'oauth_version="1.0"';                   Map<String,String> map1 =new Map<String,String>();                   map1.put('Authorization',header);                   map1.put('Content-Type','application/x-www-form-urlencoded');         String bb = basicAuthCallout(twitterReqToken,map1,'','POST');         System.debug(bb+'');         return bb;      }  public String basicAuthCallout(String endPoint,Map<String,String> header, String body,String method){      HttpRequest req = new HttpRequest();     //endPoint = EncodingUtil.urlEncode(endPoint,'UTF-8');     if(body != null && body.length() > 0)     endpoint=endpoint+'?'+body;     req.setEndpoint(endPoint);     req.setMethod(method);     for( String x : header.keySet())     req.setHeader(x,header.get(x));      Http http = new Http();     System.debug('=========== REQ BODY:'+endPoint);     HTTPResponse res = http.send(req);     return res.getBody();  }   when i call method getTwitterReqToken .its giving me error "Failed to validate oauth signature and token" .i think i called this callout properly .can any one please point out why i am facing this issue ??


Converting KML to shapefile without losing attributes using QGIS?

I have a KML file with hundreds of points. To each point there is information, such as Name, Power, Age (it's a map of hydroenergy powerplants).  If I import that KML file to QGIS, this information is lost.    Is there a way I can keep this information?  The Information looks like this:     <ExtendedData>  <SchemaData schemaUrl="#vorlage">   <SimpleData name="Name">Test</SimpleData>   <SimpleData name="Power">10895</SimpleData>   <SimpleData name="Location">L</SimpleData>  </SchemaData> </ExtendedData>   Is there anything wrong with my code?


I've accidentally deleted a  project directory from my Ubuntu with rm -rf.  is it possible to restore them somehow?


"According to preliminary sequences, 99.7% of the nucleotide sequences of the modern human and Neanderthal genomes are identical, compared to humans sharing around 98.8% of sequences with the chimpanzee."   What precisely is the issue with the supposed 2-4% of Neanderthal genetic material, how does that connect with the general near-total-identity of genetic material?   Does the 2-4% refer largely to analysis of haplotypes, which I take to mean clusters of alleles/ groups of specific traits, which reveal direct contact between the populations?


how to make some border lines of a table thick and colored (either vertical lines or horizental lines)?I tried Xcline but could not color it. Also I tried make the cline thick but failed.


How many wires can be connected to the C terminal at the furnace?

I'd like install a new Wi-Fi thermostat. The old one didn't have a C-wire but luckily there is an unused wire on both sides (one coming out of the wall and one at the furnace not connected yet), so I am going to use this unused wire as the C-wire. My only concern is that the C terminal at the furnace is already occupied with other two wires (that have nothing to do with the thermostat, but are connected one to the humidifier and the other one not sure to what, probably the air purifier). The question is: can I add a third wire to the C board of the furnace and use it as C-wire for the wi-fi thermostat? See picture: yellow is the unused wire.


How to interpret probabilities in logistic regression with interactions?

Transforming from logit to probabilities in logistic regression models facilitate the interpretation when terms are additive. But, what about interactions?   How can I interpret probabilities when terms include interactions between continuous predictors, just as the same way as interpreting logit relations?


How to Fix "Read-only file system" error when I run something as sudo and try to make a folder/file?

When I try to save something or rename a file/folder it say this error " Read-only file system" or run something as root in the terminal it say this error  sudo: unable to open /var/lib/sudo/"My User Name"/0: Read-only file system  W: Not using locking for read only lock file /var/lib/dpkg/lock E: Unable to write to /var/cache/apt/   E: The package lists or status file could not be parsed or opened.   When I make a Folder the error dialog in the details with Nautilus is this:    Error creating directory: Read-only file system   I would show you I picture of it but it isn't even letting my save onto my flash drive. Please help me.


Label size changes when exporting or printing WMTS layers

I am using QGIS2.4.0 on a Windows computer. When I export a map containing OSM landscape, the labels in the output map are smaller then in the view in the composer. (even if the view in the composer is at zoom 100%) This is not the only difference, here an example (click to magnify images): The view in the composer  The exported file  You can see that the labels are now impossible to read. I want to be able to print and export the view as I see it in the composer. I tried the solutions for the question  but that didn't help. So the problem is not the openlayers plugin.


Problem with Action-Reaction pairs and gravity

There are lot of question on this site similar to this, but they give contradicting opinions. When standing on earth, my gravitational pull to the earth and earth's gravitational pull towards me cancel, and they are action reaction pairs. Also, I exert a normal force on the ground, and the ground exerts a reactionary normal force, which cancel each other. If this is correct, how is normal force exerted? Should we consider it as another force independent of gravity? This comes from .


How to change an Eclipse default project into a Java project

I checked out a project from SVN and did not specify the project type, so it checked out as a "default" project.  What is the easiest way to quickly convert this into a "Java" project?  I'm using Eclipse version 3.3.2.


how surjection between two sets imply bijection?

Suppose there exist a surjection from set A to set B and there also exist a surjection from set B to set A . Does that imply there should exist a bijection from set A to set B?


Setup of secure storage in a VM of Ubuntu w/ ecryptfs?

What are the steps to setup secure storage in a Ubuntu VM, preferably by using ecryptfs.


What is a magic number, and why is it bad?

What is a magic number?  Why should it be avoided?  Are there cases where it's appropriate?


Suppose $M$ is a finitely generated module over $R$ where $R$ is a Noetherian ring. Prove that $M$ is a noetherian module.   Proof: Since $M$ is finitely generated module, there exists a free module $N$ such that $M \cong N/\ker(f)$ where $f:N \rightarrow M$. Since $N$ is free, it can be expressed as direct sum of isomorphic copy of underlying ring, i.e. $N \cong\bigoplus R$. Since $R$ is noetherian ring, $\bigoplus R$ is also noetherian. Since $\ker(f)$ is a submodule of $\bigoplus R$, $\ker(f)$ is also noetherian, which implies that $M$ is noetherian.  Is my proof correct? Is it true that direct sum of noetherian ring is noetherian?    Remark: Since $N$ and $\ker(f)$ are both noetherian, then $N/\ker(f)$ is also noetherian, and hence $M$ is also noetherian.  Since $M$ is finitely generated, the free module $N$ is of finite rank, and hence is isomorphic to finitely many copies of $R$.


How to use dot as splitter in currency format with Russian locale

I want to write currency in the format:  ₽ 3 812.23   But if I select Russia as region in the table settings and format the string  ₽ 0.00   result formatted number like  ₽ 3 812,23   with a comma, because the comma is default separator in Russian locale. How to change comma to dot?


Systematic attacks on multiple services & ports (getting past NAT) on hobby server

Fresh install of Fedora 25 Server Server behind a router with only a few NAT-rules Many SSH login attempts from hundreds of different IPs / ports (ever-changing) Recently attacks / exploits on nginx (running in a docker instance) shows up in the log, too.   A few examples from the log:  error: maximum authentication attempts exceeded for invalid user root from 88.14.203.97 port 56548 ssh2 [preauth]  error: Received disconnect from 52.221.236.126 port 62639:3: com.jcraft.jsch.JSchException: Auth fail [preauth]  [error] 6#6: *138 open() "/usr/share/nginx/html/nice ports,/Trinity.txt.bak" failed (2: No such file or directory), client: 77.77.211.78, server: localhost, request: "GET /nice%20ports%2C/Tri%6Eity.txt%2ebak HTTP/1.0"   I went through the basic hardening measures at install, including only allowing SSH login  with a certificate (no passwords, no root).  Questions   How can the attackers reach different ports on my LAN, not configured in NAT? UPnP…? Is it possible to block / stop these blind attacks?   Additional and possibly relevant information  I use the Dynamic DNS service freedns.afraid.org with a newly registered domain name.


The question asks: Let $n\ \in \mathbb{N}$ in base $10$ as $n=a_ka_{k-1}\cdots a_1a_0$. Let $m=a_k+a_{k-1}+\cdots + a_1+a_0$. Then $9\mid n$ if and only if $9\mid m$ Here is my Proof: $9\mid n$ implies that $n=9k$ where $k\in \mathbb{Z}$ Next, we can express $n$ as such: $$n=a_0+10a_1+100a_2+\cdots\\ n=a_0+(9+1)a_1+(99+1)a_2+\cdots\\ n=a_0+9a_1+a_1+99a_2+a_2+\cdots\\ n=(\underbrace{a_0+a_1+a_2+\cdots}_\text{m}) + 9(\underbrace{a_1+11a_2+\cdots}_\text{k})$$ Thus, $n=m+9k$ which implies that $9\mid(n-m)$ which can be written as the congruence, $n\equiv m\pmod 9$. Now, from here, what steps do I need to take to prove the theorem?


what is the geometical interpretation of $\vec a.\vec b$?(dot product)  I know the projection of $\vec a $ on $\vec b$ is $\vec a.\hat b$.  But what is a projection here?


Why should a flag be declined if it was correct at the time?

was posted a couple of days ago that was blatantly off topic. I do not yet have 3,000 reputation here so I am unable to vote to close a question. Instead I flagged it with the "Blatantly off-topic" reason:    One minute after I flagged it, someone edited the post to make it ask for a site recommendation for where to ask the question that had originally been posted. Now, of course, the question is on topic. The question went through the close review queue and unsurprisingly got three votes to be left open. This caused my flag to be declined.  As I understand it, there is some kind of penalty for having a certain number of flags declined. It seems odd that I could possibly get into this situation by flagging a question for a perfectly valid reason which only became invalid due to a change that was made after I flagged it.  Is this ? Should I not flag posts for closure due to the concern that they might later be edited which will render my flag retroactively invalid?  Here are some screenshots just to show the timeline:   This one shows that I flagged the post at 16:52:38.    This one shows that the post was edited at 16:53:41.    This one shows the three leave open votes over the course of the next hour or so, with the final one coming at 17:59.    And this one shows that the flag was declined at precisely 17:59, i.e. as soon as the review was completed.


I tried to prove this question but without a success: Let $K_1$ and $K_2$ be definable sets, prove that $K_1\cup K_2$ is definable.  What I tried to do is to assume: $K_1=Ass(X)=\{ v|v \vDash X \}$ and $K_2=Ass(Y)=\{ v|v \vDash Y \}$ and to say that $K_1\cup K_2=Ass(X \cap Y)$. but I couldn't prove that: $K_1\cup K_2 \supseteq Ass(X \cap Y)$ .   I would like to get help with this proof


If each eigenvalueof $A$ is either $+1$ or $-1$ $ \Rightarrow$ $A$ is similar to ${A^{ - 1}}$

Let $A \in {M_n}$ is nonsingular and each eigenvalue of $A$ is either $+1$ or $-1$.Why $A$ is similar to ${A^{ - 1}}$?


$A=\{1,2,\dots,10\}$  Define $f:A \rightarrow A$  then $f^{30}(x) = x$ ($30$ times composite of $f(x) = x$ and the number $30$ is the least number for $f$ to become an identity function)  How many $f:A \rightarrow A$ are there ?  P.S : I don't know what category is right.


could someone explain this code( list of list in python)?

what I want to manipulate is the first element of v, the second print is supposed to be   [[3], [], [], [], []].   Code:  v = [[]] * 4  print(v) v[0].append(3);  #what i want to manipulate is the first element of v  print(v)   output:   [[], [], [], [], []] [[3], [3], [3], [3], [3]]


What are "lenses?" I keep seeing the term in comments by people who have been around Linux forever, but it does not appear in any of the legends on the Ubuntu desktop.  And now you people are driving me up the wall - why are you confusing me with kubuntu, xubuntu, edubuntu, lubuntu ... and "Unity" ????????????????  How does KDE relate to Ubuntu?  I am trying to get a handle on Ubuntu, and now people are talking about Unity - which it appears is for nerds. There is no hope for refugees from Windows, looks like I will have to keep plugging along with Win 7.


Why Doesn't the Adamantium Bone Covering Kill Wolverine?

I've seen the  here before, as well as on many sites on the web.  I've also seen different info on what was covered.  I'm not a huge X-Men fan, but I do enjoy the characters and stories, so I know I'm probably missing out on a lot, and may have missed the obvious along the way because I didn't read a particular series or something like that.  I had a relative die from leukemia a few years ago and that reminded me of basic junior high science: that red and white blood cells are produced in the bone marrow and must be able to reach from the marrow into the blood vessels.  The leukemia my relative had was the kind where the "bad" cells would surround the marrow and prevent the new "good" blood cells from getting out to the rest of the body.  So just how much of Wolverine's skeleton is covered with Adamantium?  If it's the whole thing, there'd have to be openings for new red blood cells to get out if he is to remain alive.  I've never seen a reference to this issue, is it ever addressed?  That also raises another issue along the same line: Are hard to reach areas, such as ball and socket joints covered?  If not, then stress on other covered areas could be transferred to the weaker uncovered areas, which would lead to breakage there.  And if joints like that are covered, is there anything to say how it was done?  Are there openings or gaps in the Adamantium covering on his body?  Are there any references to any of these issues that deal with them?


For such an extension:  public static class ImageExtensions {     public static Image LoadImage(string path)     {         using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(path)))             return Image.FromStream(ms);     } }   How to make it possible to be called Image.LoadImage(path) instead of ImageExtensions.LoadImage(path)?  I can normally use other extension methods, where their first parameter is this Image img. Those work by using instance.Method().


How can I know what keyboard combination shortcuts are currently set in my computer ?

I have  many keyboard shortcuts in my pc (windows 7 , 64 bit) .  I set those keyboard shortcuts  to the "shortcut" of the program/script.  For example , if I want to run chrome via ctrlshiftalt+d then I go to     Question  Since I have many shortcuts like these , I forgot some.  Is there any way to see all current assigned keyboard shortcuts?


Which graphics cards are supported by a Late-2009 iMac 27inch?

I have the ATI Radeon HD 4850 graphics processor with 512MB of GDDR3 memory installed on an . Given that my current card is malfunctioning and that versions of that card are prohibitively expensive, which cards could I theoretically upgrade to?


I have  that allows you to open your "My Computer" ("This PC" in Windows 10), Mail Client, Web Homepage or Calculator with a press of a button.    I also have TI-NSpire CAS Software on my computer, which is useful for calculating more complex things like integrals (areas underneath a curve above the x-axis).  I know that it's possible to change your default mail and web client in the settings under . However, my question is:  Is it possible to rebind the calculator app that Windows opens upon pressing the Calculator button?  The default calculator doesn't really cut it for calculating integrals and summations in their algebraic or equation format


I am making a scene where I have balls pouring into a invisible container. The problem is these balls pass through each other which makes it unrealistic. I have tried searching for the 'Molecular Addon' by Pyroevil but it seems the website no longer exists. PLease help Thank you very much    to all those suggesting and giving me links to pyroevil I have told you it's not working for me all i see is this.


I can't install any software on Ubuntu 18.04.  I'm facing some error like:   Unmet dependencies. Try 'apt --fix-broken install' with no packages   Output of sudo apt --fix-broken install:  Reading package lists... Done  Building dependency tree  Reading state information... Done  Correcting dependencies... failed.  The following packages have unmet dependencies:  dbconfig-mysql : Depends: default-mysql-client but it is not installed or virtual-mysql-client  E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.  E: Unable to correct dependencies   How can I solve this?


Suppose X and Y are i.i.d and $\frac{X+Y}{\sqrt{2}}\overset{d}=X\overset{d}=Y$, show that X has a normal distribution.

Suppose $X$ and $Y$ are independent with mean zero and variance 1, and $\frac{X+Y}{\sqrt{2}}\overset{d}=X\overset{d}=Y$. Use the CLT to show that $X\sim \mathcal N(0,1)$.  I saw in many places that set $\frac{S_{2^n}}{\sqrt{2^n}}$ to prove the problem. Is it feasible to go through the proof by using $\frac{S_{2n}}{\sqrt{2n}}$?    I see, we need to set $\frac{S_{2^n}}{\sqrt{2^n}}$. Thus $X\overset{d}=\frac{S_{2^n}}{\sqrt{2^n}}\overset{d}\to \mathcal N(0,1)$.


How to make bin + cue image of audio CD under macOS

I want to make a bin and cue files of my audio cd. On Windows I use PowerISO but on macOS I don't know how to do it.


Let $A$ and $B$ be sets. If $|2^A| = |2^B|$, then must $|A| = |B|$?

Here $2^A$ is the set of all functions from $A$ to $\{0,1\}$.  This is evidently true if one of $A$, $B$ is finite.  To me it seems like it should be true for infinite $A$, $B$, but a proof is oddly hard to come by.  Is there a quick proof or counterexample?


Why can a manifested creature be turned face up if it loses all it's abilities but a morphed card can't?

This question is dedicated to a better understanding of a card: .  The Gather entry has the following ruling.     "Unlike a face-down creature that was cast using the morph ability, a manifested creature may still be turned face up after it loses its abilities if it's a creature card."   I would like to know its exact meaning, and possible use. Thank you!


Installing Windows 10 effect on installed programs

I currently got Windows 8 on my machine and would like to upgrade to windows 10.  I got several products installed on my machine, will I have to do a re-installation for each of them after the upgrade?   Also Will I lose my Office product license and other licenses on doing the upgrade?   EDIT:  The installed software I got is :  1- Microsoft Office 2- Visual Studio 2013 3- SQL Server 2014


OpenSSL warning while using x509 purpose command

I tried to find my root CA today and went through all my certificates using openssl x509 -in /path/to/certificate -purpose.  As I found what should be my root CA I got this output:  Certificate purposes: SSL client : Yes SSL client CA : Yes (WARNING code=3) SSL server : Yes SSL server CA : Yes (WARNING code=3) Netscape SSL server : Yes Netscape SSL server CA : Yes (WARNING code=3) S/MIME signing : Yes S/MIME signing CA : Yes (WARNING code=3) S/MIME encryption : Yes S/MIME encryption CA : Yes (WARNING code=3) CRL signing : Yes CRL signing CA : Yes (WARNING code=3) Any Purpose : Yes Any Purpose CA : Yes OCSP helper : Yes OCSP helper CA : Yes (WARNING code=3) Time Stamp signing : No Time Stamp signing CA : Yes (WARNING code=3)   It seems that some parts of linux or its tools are not as well documented as one thought. It could find no answer to this question not even this site could answered it three years ago ().  I hope that times have changed and someone here is now capable of answering the question what that WARNING code=3 is all about. Maybe also supplying a list of all possible warning messages and their cause, if there is such.


the closure of subgroup of $\mathrm{GL}(n,\mathbb{R})$ is a subgroup?

I have read the following sentece on a lecture notes:  If $G\subset\mathrm{GL}(n,\mathbb{R})$ is a subgroup then its topological closure $\overline{G}$ is a topologically closed subgroup. $\overline{G}$ is obviously topologically closed, and I'm claiming that it's still a subgroup.  Now, I guess the topology is a metric topology (on $\mathrm{GL}(n,\mathbb{R})$ all metrics  are equivalent), but I cannot see how it is true: as it is, it seems a false statement to me. For example, if $G=\mathrm{GL}(n,\mathbb{R})$ then its closure is all the space of $n\times n$ matrixes, which is not a group. Or if I consider the subgroup of diagonal matrix of the form $\lambda\mathrm{Id}_n$, $0\neq\lambda\in\mathbb{R}$, then the zero matrix is in the closure so it is not a group (with respect to the matrix multiplication). I would need the assumption that $\overline{G}\subset\mathrm{GL}(n,\mathbb{R})$ to prove that it is a subgroup. Am I missing something?


how to force a figure to appear in a particular place in report

I'm a new user for latex, I would be grateful if you could help me to force a figure to appear in a particular place in report, my code I've already used is:  \usepackage{graphicx} \begin{figure} \centering \includegraphics[scale=0.3]{fig_ch1} \caption{Types of DG} \label{fig_ch1} \end{figure}


Is the following good enough to avoid a SQL injection?  mysql_real_escape_string(htmlentities (urlencode($_POST['postmessage'])));


Just wondering how I can produce a south-east double arrow like this:    Ok great there is a reverse lookup for latex symbols .. my new favourite link. thank you !  but i still think this is a valid question. good way to find the next important link.  also this:


Search which man sections contain a given entry

On Linux (or any other OS that uses the man tool), there are typically several sections of the manual. Often, a given entry (such as echo or printf) exists in multiple sections, but not all of them. Is there a simple way to check which sections of the manual that entry can be found in?  Obviously, one can try man [section] [entry] and just run through every section in the manual, but honestly, I'm not even sure what the complete list of sections is (or how to find that definitively), and I'm looking for something a little less brute-force.


Why does assigning null to a node does not delete that node in a linked list

To remove the last node of the list, I just traversed till the last node and assigned it to null. But I still see the last node value. I am wondering why node = null does not have any effect.  void deleteLastNode(Node node){     while(node.next != null)     {         node = node.next;     }     node = null; }


I saw some responses here saying that the singularity into the black hole is one dimension object so my question is : is it possible that the singularity is simply a merger of the 4 dimensions of the spacetime? Is it possible physically and mathematically that many dimensions can merge into one ?


How to hide common desktop icons on my profile?

I share a PC with some other people in the office (we all work different hours).  They've installed a bunch of programs they use (AIM, etc...) that place a shortcut in C:\Users\Public\Desktop.    If I delete the icon, it's also going to be gone from their desktops as well.  Is there a way to hide these icons on my desktop, yet have them be visible on other people's desktops?


Is the Sigma 18-200 F3.5-6.3 DC Macro compatible with full-frame Nikon DSLRs?

Is the Sigma 18-200 F3.5-6.3 DC Macro lens compatible with the full frame D610?


Prove that if $A$ is a set with infinite cardinality, then there exists a bijection between $A$ and $A^2$.   I know that there exists a bijection between $\Bbb{R}$ and $\Bbb{R^2}$, but I don't think that technique can be generalized.  I think the proof of this may be highly non-trivial. Any help would be great.


It's an easy excercise in set theory to exhibit a bijection $\Bbb Q \cong \Bbb Q\times \Bbb Q$. However, none of the bijections I'm aware of respect the topologies on $\Bbb Q$ and $\Bbb Q^2$, inherited from their respective embeddings into $\Bbb R$ and $\Bbb R^2$.  Therefore, I'm asking whether there exists a homeomorphism $\phi: \Bbb Q^2 \to \Bbb Q$.  I don't believe that there is any such map, but since the standard techniques of algebraic topology don't enable one to discern between $\Bbb Q$ and a discrete space, I wasn't able to prove it. Maybe Cech cohomology provides a means to attack this problem, but I haven't even got the slightest Iiea how to calculate $H^1(\Bbb Q,\Bbb Z)$.


I often wonder what is the proper pronunciation of "lives", like how would I pronounce "human lives", am I suppose to pronounce it like:  Leeves  Like i in thing. Or more like:  Laives  Like i in I'm. I usually say the "Leeves" way, but I mostly hear people say the "Laives" version. I would like to know the proper pronunciation of "lives".


In his answer to , our friend @egreg explains:     It happens that certain combination of letters have “bad” spacing.   I have noticed this too. As I understand it, LaTeX is supposed to make producing beautiful documents easy, by taking care of the formatting for you, so that you can focus on the content.  Now, obviously, "good" and "bad" kerning is quite subjective - witness @egreg's scare quotes. And yet, in the linked example, I'd say the case is pretty clear cut.  So, I'm wondering if anybody knows of any references which explain the rationale behind LaTeX's kerning decisions.  Are there any plans to modify LaTeX's kerning behaviour, or is this behaviour desired?  Also, is there any package which allows you to systematically alter the kerning across the document - so that you don't have to fiddle around yourself on a case by case basis?


Polygon count standards for low poly indie games?

What are the polygon count standards for game assets? I'm thinking about games that are lower poly but aim for the best graphics possible, I'm thinking like L4D / L4D2 or Insurgency level of detail.


I asked something similar . Now, when I make my circuit, I've seen that I don't need something that gives a pulse after being powered-up, but I just need a delayed pulse.  I know nothing about electronics, so here my (easy?) question.  Which circuit do I need, when I want to give a input pulse with a push-button (16V DC), a delay of 0.5 s and then an output pulse? This pulse doesn't have to be the same length.  I'm open to everything. I know that, in my previous question, the solution was with a 555 timer. Now it is not necessary. I only need a (cheap) circuit that does the things I want.  EDIT: I know this is more or less a duplicate of my previous question, and my english is not very good. The point is: I know nothing about electronics and I know the circuit I need will be similar to what I already have in the previous answers. I know that. But I'm not capable to adapt that solution, sorry. Is there someone so kind to help me. A solution with two 555 timers is good, but will someone be so kind to make a scheme? Please?


Is there a simple way to prove this fact :      For all holomorphic functions $f : \mathbb C \to \mathbb C$, there is an holomorphic function $\psi : \mathbb C \to \mathbb C$ such that $$\psi(z+1) = \psi(z) + f(z) $$   The solution I know use Galois covering spaces and summand of automorphy.  Thanks in advance.


Wi-fi network not found in network list, Ubuntu 20.04, Dell, Broadcom BCM43142

I'm running Ubuntu 20.04 on a Dell Inspiron with a Broadcom  BCM43142 network controller and it does not show all Wi-Fi networks, specifically from a mobile phone. Please help me solve this issue, thanks!


How to install Ubuntu alongside Windows 8.1?

I want to install Ubuntu alongside Windows 8.1, but I can't do the partitioning because Ubuntu does not recognize Windows 8.1. Everything was OK in Ubuntu, but when I shut down Ubuntu and booted to Windows, it looked like I had changed to "Zoom" because everything on the screen looked too big. I checked the appearance of the screen, and it was set at the default. What can I do to fix this?


Find a graph on eight vertices with a pair of pseudosimilar vertices

Can somebody give me an example of a graph on eight vertices that has a pair of pseudosimilar vertices? Or, is it not possible? If it is not possible, please do not give me a proof, as I would like to figure out how to prove it myself.     Definition: vertices $u$ and $v$ in a graph $X$ are similar if there is an automorphism of $X$ that maps $u$ to $v$. If $u$ and $v$ are similar, then the vertex-deleted subgraphs $X-u$ and $X-v$ are isomorphic. If $X-u$ and $X-v$ are isomorphic but $u$ and $v$ are not similar, we say that they are pseudosimilar.


Using memory layer as input and/or output with runalg?

Can a memory layer be used as an input and/or output with runalg?  With runandload I get this to work:   processing.runandload("qgis:mergevectorlayers","memory:bufferOne", "memory:bufferTwo", r"memory:merged")  processing.runandload("qgis:dissolve", r"memory:merged", True, '', r"D:\PythonTesting\dissolved.shp")   Parameter 2 and 3 are the input layers, which are in memory already, and parameter 3 is the output layer, which is written into memory and used in the following tool (Dissolve). This works fine, but when I try to use the same logic with runalg, then my merged layer in memory does not seem to be created, as the Dissolve tool never runs. The following, for example, would not work:   processing.runalg("qgis:mergevectorlayers","memory:bufferOne", "memory:bufferTwo", r"memory:merged")  processing.runandload("qgis:dissolve", r"memory:merged", True, '', r"D:\PythonTesting\datenschrott\dissolved.shp")   Can I assume that runalg either does not accept layers that are in memory or that it cannot output any?


I've been reading about the philosophy of the mind, and I'm a bit confused. Everything I've read seems to start with the (unjustified) assumption that there is some aspect of the mind that isn't purely physical or deterministic. For example, take the idea of a :  [T]hey are exactly like us in all physical respects but without conscious experiences: by definition there is ‘nothing it is like’ to be a zombie. Yet zombies behave just like us, and some even spend a lot of time discussing consciousness. Few people, if any, think zombies actually exist.  I'm confused about what this means. Isn't a "conscious experience", such as seeing the color red, just a firing of neurons in a certain area of the brain that triggers other neurons and eventually leads to us saying "I see red"? Why do few people think zombies exist? Aren't we all philosophical zombies? We're just very complex chemical computers, programmed to act in certain ways to certain inputs. What we call "conscious experiences" are just abstractions our brains make to organize and manipulate inputs and memories before producing an output, but it all boils down to biology, chemistry, and eventually physics. So I guess my question is what the philosophy of the mind is really about. Won't physics, chemistry, and neuroscience eventually fully explain why humans act the way they act?


Variance with minimal MSE in normal distribution

Given $X_1,...,X_n$ ~ i.i.d. $N(\mu, \sigma^2)$ where the mean is unknown, let the estimator for $\sigma^2$ be $\hat{e} = p\sum_{i=1}^n(X_i-\overline{X})^2$ How do I choose $p$ so that this estimator has the minimal mean squared error (MSE)?  I've found that  $E(\hat{e}) = p\sigma^2(n-1)$  $Var(\hat{e}) = 2p^2\sigma^4(n-1)$  But I can't find the minimal square error, because everytime I try to solve for the min of $MSE = Bias^2 + Var$, it doesn't work out.


What does it mean in general to show something is well defined?

There is  that addresses this but quickly fix the problem to be something in arthmetics, and in turn what it means for that arithematics problem to be well defined. I have never encontered the definition of "well defined" in a textbook, only in questions where I am asked to show something is well defined For example  Given a functional $$L(f) = \int\limits_0^1 [f^2 - f] dx$$ where $f\in [0,1] \to \mathbb{R}$, $f(0) = 0$ and Lipschitz, show $L(f)$ is well defined  Example 2:  Let $d$ be a metric on $X$, and define the point to set distance $$d(x,C) = \inf\{d(x,y): y \in C\}$$ where $C \subset X$ is a nonempty set Show $d(x,C)$ is well defined  In general, given object $\phi = f$, whatever $\phi, f$ is, what does it mean to show that $\phi$ is well defined?


Show that $n$ divides $\phi(a^n -1)$ for any $a>n$ where $\phi$ is Euler's totient function.  I would really appreciate a hint.


If A exerts a force of 200N on B, then by newton's third law, 200N would be exerted on it. Similarly, if B exerts 100N on A, by newton's third law, 100N would be exerted on it. Therefore the net forces acting on both would be 300N in opposite directions. In this case how would A accelerate forward?


I have a problem that my disk is filling up but I cant find the files that fill it. When I run df -h I get:  Filesystem      Size  Used Avail Use% Mounted on /dev/root        53G   51G  2.0G  97% / devtmpfs        2.0G  4.0K  2.0G   1% /dev none            395M  204K  395M   1% /run none            5.0M     0  5.0M   0% /run/lock none            2.0G     0  2.0G   0% /run/shm none            100M     0  100M   0% /run/user   I cleared all caches, logs and auto remove files. When I read this command du -h /var | sort -nr | head -n 10 I get:  1016K   /var/www/soFit/cache/class_folder-242/soinfitcom/cl 1016K   /var/www/landing/PHPMailer/vendor 1008K   /var/www/dating/libs/vendor 988K    /var/www/libs/mPDF/ttfontdata 968K    /var/www/landing/PHPMailer/vendor/phpmailer 964K    /var/www/landing/PHPMailer/vendor/phpmailer/phpmailer 960K    /var/www/soFitTest/groupChats/vendor/symfony/http-foundation 960K    /var/www/soFitTest/chat/vendor/symfony/http-foundation 960K    /var/www/soFit/groupChats/vendor/symfony/http-foundation 960K    /var/www/soFit/chat/vendor/symfony/http-foundation   Using du -x / | sort -rn | head -n 10  2471828 / 1592004 /var 1091532 /var/lib 929776  /var/lib/mysql 776620  /usr 715092  /var/lib/mysql/soFit 306064  /var/www 291376  /usr/lib 269176  /usr/share 180868  /var/www/libs   My mysql db size is ~500MB, not that big.  Where is all the 51G of space are gone to?  My linux is:  Debian GNU/Linux 7.11 (wheezy)  du -h --max-depth=1 / 4.0K    /dev 6.4M    /etc 4.0K    /mnt 759M    /usr 4.0K    /selinux 5.5M    /root 20K     /home 24K     /srv 4.0K    /opt 0       /sys 8.0K    /tigo 8.0K    /media 16K     /lost+found 1.6G    /var 6.5M    /sbin 4.0K    /lib64 7.0M    /bin 4.0K    /.ssh 204K    /run 15M     /lib 4.0K    /boot 12K     /tmp du: cannot access `/proc/4557/task/19375/fdinfo/312': No such file or directory du: cannot access `/proc/13067/task/13067/fd/4': No such file or directory du: cannot access `/proc/13067/task/13067/fdinfo/4': No such file or directory du: cannot access `/proc/13067/fd/5': No such file or directory du: cannot access `/proc/13067/fdinfo/5': No such file or directory 0       /proc 61M     /backups   2.4G    /  The answer was to find the files using: lsof | grep -i deleted and to delete this files.  Shutdown the machine completely  not only reboot  var/libs/mysql delete (none).log


how do I copy selected text automatically by using Javascript?  For example, when I highlighted a word (by double-clicking it) in a page, and that word is being automatically copied into clipboard.  Is there a way to do this?


Let $\{a_k\}_{k\ge 0}, \{b_k\}_{k\ge 0}, \{\xi_k\}_{k\ge 0}$ are non-negative sequences, for all $k\ge 0$, $a_{k+1}^2 \le (a_k + b_k)^2 - \xi_k^2$.    (1) Prove that $\sum_{i=1}^k \xi_i^2 \le \left( a_1 + \sum_{i=0}^k b_i \right)^2$.  (2) If $\{b_k\}_{k\ge 0}$ satisfy that $\sum_{k=0}^{\infty} b_k^2 < +\infty$, then $\lim\limits_{k\to \infty} \frac{1}{k}\sum_{i=1}^k \xi_i^2 = 0$.  Any hints are appreciated, thanks for your help.


I cannot find the "Change the Look" option in a My Site site. Is theming possible in a My Site Host web application?


Background notebook template with spiral with XeLaTeX

How to inset wire-O bookbinding. I tried the answer here  by @Gonzalo Medina but it doesn't work properly when I compile with XeLaTeX  while usin an RTL language as the main language of a document    the complete Code:  \documentclass{article} \usepackage[contents={}]{background} \usepackage{tikzpagenodes} \usetikzlibrary{shadows,calc} \usepackage{lipsum}  \def\ShadowXshift{0.5ex} \def\ShadowYshift{-0.5ex}  \makeatletter \define@key{educnotebook}{spiralnumber}{\def\SpiralNumber{#1}} \define@key{educnotebook}{nbcolorbg}{\def\NbColorBg{#1}} \define@key{educnotebook}{minorgridcolor}{\def\MinorGridColor{#1}} \define@key{educnotebook}{majorgridcolor}{\def\MajorGridColor{#1}} \define@boolkey{educnotebook}{majorgrid}[false]{ \ifKV@educnotebook@majorgrid    \def\DrawMajorGrid{     \path[clip,rounded corners=10pt]         ([xshift=-30pt,yshift=20pt]current page text area.north west) rectangle         ([xshift=30pt,yshift=-20pt]current page text area.south east);     \draw[\MajorGridColor,opacity=0.3]           ([xshift=30pt,yshift=-20pt]current page text area.south east) grid[step=10mm]           ([xshift=-30pt,yshift=20pt]current page text area.north west);   } \else   \def\DrawMajorGrid{\relax} \fi } \define@boolkey{educnotebook}{minorgrid}[false]{ \ifKV@educnotebook@minorgrid    \def\DrawMinorGrid{     \path[clip,rounded corners=10pt]         ([xshift=-30pt,yshift=20pt]current page text area.north west) rectangle         ([xshift=30pt,yshift=-20pt]current page text area.south east);     \draw[\MinorGridColor,opacity=0.3]           ([xshift=30pt,yshift=-20pt]current page text area.south east) grid[step=1mm]           ([xshift=-30pt,yshift=20pt]current page text area.north west);   } \else   \def\DrawMinorGrid{\relax} \fi } \define@choicekey+{educnotebook}{spiralposition}[\val\nr]{left,right,top}[left]{%   \ifcase\nr\relax     \def\SpiralPosition{       ([xshift=9pt,yshift=3pt-\Valor*\textheight/(\SpiralNumber-1)]current page text area.north west)     }     \def\RotateAngle{0}   \or     \def\SpiralPosition{       ([xshift=-9pt,yshift=-5pt-\Valor*\textheight/(\SpiralNumber-1)]current page text area.north east)     }     \def\RotateAngle{180}     \def\ShadowXshift{-0.5ex}     \def\ShadowYshift{-0.5ex}   \or     \def\SpiralPosition{       ([yshift=-19pt,xshift=5pt+\Valor*\textwidth/(\SpiralNumber-1)]current page text area.north west)       }     \def\RotateAngle{270}   \fi }{}  \setkeys{educnotebook}{   nbcolorbg=white,   minorgrid=false,   majorgrid=false,   minorgridcolor=black!20,   majorgridcolor=black!60,   spiralposition=left,   spiralnumber=15   } \def\RotateAngle{0} \def\ShadowXshift{0.5ex} \def\ShadowYshift{-0.5ex}  \makeatother  \tikzset{ spiral/.pic={   \draw[rotate=\RotateAngle,     draw=black,     left color=black!70,     right color=black!60,     middle color=gray!40     ]      (-1.1,-0.35) rectangle ++(10pt,10pt);   \draw[     rotate=\RotateAngle,     double=gray!80,     double distance=1pt,     ]     (-1,-0.2) arc (40:-250:10pt and 2pt);   \draw[     rotate=\RotateAngle,     double=gray!80,     double distance=1pt,     ]     (-1,-0.05) arc (40:-250:10pt and 2pt);   } }  \newcommand\EducNotebook[1][]{% \begingroup \AddEverypageHook{%   \setkeys{educnotebook}{#1}%   \backgroundsetup{     scale=1,     opacity=1,     color=black,     angle=0,     contents={       \tikz[remember picture,overlay]       {       \draw[rounded corners=10pt,fill=\NbColorBg,drop shadow={shadow xshift=\ShadowXshift, shadow yshift=\ShadowYshift}]         ([xshift=-30pt,yshift=20pt]current page text area.north west) rectangle         ([xshift=30pt,yshift=-20pt]current page text area.south east);       \foreach \Valor in {0,1,...,\numexpr\SpiralNumber-1\relax}         \pic at \SpiralPosition {spiral};       \DrawMajorGrid       \DrawMinorGrid       }         }     }   \BgMaterial   } \endgroup }  \EducNotebook \usepackage{xepersian}%-----------for RTL language \settextfont[Scale=1.3]{Arial} \setlatintextfont[Scale=1.2]{Arial} \defpersianfont\Sayeh[Scale=1.3]{Arial}  \usepackage{ptext} \begin{document} \lipsum[1-4] \end{document}


High Sierra not detecting Trackpad - Trackpad settings

Recently upgraded to High Sierra, Trackpad only searches for bluetooth trackpad,  And shows "No trackpad found".  My trackpad functions very well and it's not defective so it's not a hardware issue, I can see the relevant information of my trackpad in system information.  I want to edit settings for my 13" 2011 Macbook Pro internal trackpad/touchpad.  On Sierra I had:    Now on High Sierra I have:    System Information: (Taken from Sierra)    System Information: (Taken from High Sierra)    My Mac:


What is the name of words or phrases people insert into sentences, seemingly unintentionally? And the practice?

For instance, I have a friend who just can't help himself constantly saying "ok". He'll say things like "ok, now we're going to [...]" or "now we've seen that, ok", and I'm just wondering what this practice is called.  I used to think this sort of thing was called a "verbal tic", but according to :     Phonic tics are involuntary sounds produced by moving air through the nose, mouth, or throat. They may be alternately referred to as verbal tics or vocal tics, but most diagnosticians prefer the term phonic tics to reflect the notion that the vocal cords are not involved in all tics that produce sound.


Python 2.7 division not showing exact result

When I divide 1/5e-5 it gives the correct answer but 1/5e-6 gives an answer close to the correct one.  >>> 1/5e-5 20000.0 >>> 1/5e-6 199999.99999999997 (should be 200000) >>>   How can I get it to show the exact value. I tried importing decimel, numpy and scipy but none of them change the result.


My terminal dies when I use commands like dmesg, ls -la, history, sudo apt-get update

So I was working on something today, needed to use online banking, and the bank asked me to install a security module, refusing to let me bank without it. The annoying thing is that the standard Ubuntu install did not work my 14.04 LTS due to dependency versions, so I tried the other distros install. Here's the link of instructions I followed (not too good of any idea of what's inside warsaw.run):   I can't say for sure this caused my problem, but my shell terminal quits abruptly when I run dmesg, history, ls -la, sudo apt-get update, ls /usr/bin and probably others.   I have no idea how to even diagnose this! I can run these commands just fine from a tty1, and my PATH seems to be intact. How can I discover more about the problem to fix it? I'd rather not reinstall, as I've got tons of work I need to finish.  stat /tmp  controlfreak ~ $ stat /tmp   File: ‘/tmp’   Size: 4096            Blocks: 8          IO Block: 4096   directory Device: 807h/2055d      Inode: 14811137    Links: 6 Access: (0775/drwxrwxr-x)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2017-03-08 21:58:28.233840725 -0300 Modify: 2017-03-08 22:17:01.273853887 -0300 Change: 2017-03-08 22:17:01.273853887 -0300  Birth: -   error messages upon crashing gnome-terminal that was opened from xterm:  controlfreak ~ $ gnome-terminal  (gnome-terminal:7062): GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain '&' (key 'monospace-font-name' from schema 'org.gnome.desktop.interface'). This call will probably stop working with a future version of glib.  **Vte-2.90:ERROR:/build/vte3-dpQaUV/vte3-0.34.9/./src/vtestream-file.h:319:_file_write: assertion failed: (_file_isopen (f) || !len) Aborted (core dumped)


How can I avoid players spending too much time planning?

Several times when I have played in or ran a game in which the players had an objective and reasonable resources, a lot of (real) time was spent trying to plan for every contingency.   For example, the last part of one objective is "Get Away". This resulted in a discussion that covered five methods of transport, where said transport should wait, how the party should get to it, if it should have an NPC hireling controlling it so it could be called in, and what defences might threaten it. The discussion took 45 minutes of real time … to plan just the get away.  These discussions are usually driven by one or two of the players and leave the rest of the group having less then the ideal amount of fun. Both as a player and as a GM, what techniques can I use to speed up these planning sessions?


Having a Subsection Number Colour that is different to the Section Number Colour

Currently I am using the following code to give my Section Numbers a different colour (I am using the xcolor package):  \documentclass{article}  \usepackage[dvipsnames]{xcolor} \definecolor{darkmidnightblue}{rgb}{0, 0.2, 0.4}  \makeatletter \renewcommand\@seccntformat[1]{\color{darkmidnightblue} {\csname  the#1\endcsname}\hspace{0.5em}} \makeatother  \begin{document}  \section{\textcolor{darkmidnightblue}{Section}} \subsection{\textcolor{MidnightBlue}{Subsection}}  \end{document}   However, I understand that as  it is, it also applies the same scheme to the other section levels. I am trying to make the Subsection have a different colour to the Section, but it turns out like this:    I would like the Subsection Number to be the same colour as the text. Can this code be modified to alter each section level independently, or will I need to use different commands altogether?  Elliot


Who is responsible for the scene involving Bruce and Barbara in 2016 "The Killing Joke"?

I was very surprised to see a      sex scene between Batman and Batgirl    given that it was the genius Bruce Timm directing the movie, with legends such as Mark Hamill and Kevin Conroy reprising their parts.   The scene seemed a bit off from the overall story, not to mention that a sexual and romantic relationship between Barbara and Bruce isn't a very popular one.  All of this got me wondering whether it was actually Timm's idea to include this scene. Has there been any statement on that?


Installed FULL Ubuntu on USB, boots up, but not on other computers

I had two USB sticks plugged into the computer. An empty 16GB stick which I planned to install FULL Ubuntu on, 8GB stick with live Ubuntu and installer. I followed  on how to install full Ubuntu on a USB.  When I checked to see if the 16GB USB works on other computers, I found that I get no operating system found and the the system on the internal drive (Windows) boots. It only works on the computer I used to install Ubuntu on, but not the others. Hmmm...  Is there another method of installing FULL Ubuntu on a USB stick?


How to safely replace NiCD/NiMH with Li-ion in a small electric screwdriver?

I'd like to repair and re-use a small Bosch electric screwdriver. It currently has a battery of 3 small AA-type rechargables (unmarked cardboard wrapping) that has almost the same occupancy volume of a single 18650 Li-ion cell. The existing battery pack has an inline diode between the charging contacts and the battery pack.  I know about the risks as shown in .  My key question: I want to re-use the two contacts on the base of the scredriver that connect to the battery for recharging. I have an existing external Li-ion charger (so not use the dumb AC brick that came with the drill). Should I (a) use or (b) explicitly not use a diode between the contacts and the cell for short-circuit protection?   Without a diode, I have a small risk of short circuit if something touches both contacts (small, because the contacts are recessed). With a diode I have a voltage drop that can interfere with the voltage sense of my charger.  I'd prefer not to throw away this otherwise perfectly functional screwdriver, and I'm not sure where to buy the same kind of NiMH battery pack.


I installed Ubuntu 11.10 on a newly bought Lenovo ThinkCentre Edge 71 (model: 1577-G3G) with EFI boot enabled. I opted for the Use Entire Disk option. Even though the installation process went without any problems/errors, when rebooting it now just gives me:     No bootable operating system. Insert bootable disk and press any key...   I figure this is because of EFI.   Regression:   I have checked the System Setup (F1 during POST) to find a BIOS option to disable EFI/UEFI boot, however, there is no such option for this machine. This might be caused by a "Secure Boot" feature in the BIOS. The hardware vendor does not know of any such "secure boot" setting in the BIOS that would prevent Linux from booting. Lenovo support did not know anything about a BIOS setting called secure boot. They also did not know of any limitations that would prevent Linux from booting. The  does not mention EFI, UEFI nor secure boot.   How do I install Ubuntu on a machine with EFI? - Or, since Ubuntu is probably already installed: how do I make it boot Ubuntu?


What is the mistake in my calculation of $\int_0^\infty {\cos(ax)\over(x^2+1)^2}dx$?

What is the mistake in the calculation of $$\int_0^\infty {\cos(ax)\over(x^2+1)^2}dx$$ where $0<a\in\mathbb{R}$?  I know that the question itself has already an answered in  but when I comment about questions I rarely get answers so I opned a new question, I hope that ok, sorry in advence if it's not. My worng attempt: $$ I:= \int_0^\infty {\cos(ax)\over(x^2+1)^2}={1\over2}\int_{-\infty}^\infty{\cos(ax)\over(x^2+1)^2}= \\ \int_{C_R}{\cos(ax)\over(x^2+1)^2} $$ where $C_R$ is the half semicircle centered at the origin with radii $R$ joint with $[-R,R]$. The above equality holds because $\int_{-R}^R=0$. $$I= {1\over2}\cdot 2\pi i\text{Res}({\cos(ax)\over(x^2+1)^2},i)=\\ \pi i({\cos(ax)\over(x^2+i)^2})'|_{z=i}=\\ \pi i\cdot({-a\sin(az)(z+i)^2-2(z+i)\cos(az)\over (z+i)^4})|_{z=i} =\\ {\pi i\over 16}(a\sin(ai)\cdot 4-4i\cos(ia)=\\ {\pi\over 4}(\cos(ai)+ia\sin(ai))={\pi\over 8}(e^{ai}+e^{-ai}+a(e^{ai}-e^{-ai}))={\pi\over8}(e^{ai}(1+a)+e^{-ai}(1-a)) $$ But the answer should be ${\pi\over 2e}$.


Additional books in Tolkien's Legendarium

I read the trilogy once in 6th grade and I LOVE the movies, but I want to read more into the background and everything, but I'm not quite sure which extra books to read. So my question is: What are all the extra books, and,  in your opinion, what order should I read everything? (by everything, I mean including the Hobbit and the trilogy again)


How to call 32bit unmanaged DLL from "Any CPU/64bit" build project?

I must call a 32bit unmanaged DLL from an external provider from my C# WinForms project.  However I must build my C# project as "Any CPU" to take advantage of the greater memory on 64bit computers.  Therefore, when I try to call the 32bit DLL from a machine running 64bit, I get this error:  BadImageFormatException : An attempt was made to load a program with an incorrect format   Changing the build to target x86 is not an option for us.  We do not have any ability to modify the external DLL itself.  How can I get around this error?


Would a Patronus animal change throughout your life due to emotionally changing?

Would a Patronus animal change throughout your life, if different things make you happy to what you used to like?


Given the following function, f:  f (a b c d e) = (5*a + 4*b + 3*c + 2*b + 1*a) modulo 11  How can I distribute the modulo operation?  In short, How can I compute f without computing (5*a + 4*b + 3*c + 2*b + 1*a) first, and then mod-ing by 11.


I'm making something but I can't seem to make it work. I get a nullpointerexception, but I can't figure out why.  public class Bus implements Serializable {      ArrayList<Reiziger> reizigers;      public String add(Reiziger reiziger) {         reizigers.add(reiziger);         return "lijst";     } }   The nullpointer happens at line "reizigers.add(reiziger);" in the add method of Bus.java


Find all functions from $\mathbb{Z}$ to $\mathbb{Z}$ such that   $f(x+y)=f(x)+f(y)$.  We showed these claims:  Claim1. $f(0)=0$.  Claim2. $f(-x)=-f(x)$.  But, how should I show that there is no other $g$ function from $\mathbb{Z}$ to $\mathbb{Z}$ which satisfies  $g(x+y)=g(x)+g(y)$.


Why is concatenating strings with ''.join(list) so popular?

I know that ''.join(list) is the preferred method to concatenate strings as opposed to say:  for x in list:     s += x   My question is why is this much faster?  Also, what if I need to concatenate items that are not already in a list?  Is it still faster to put them in a list just for the purpose of doing the ''.join(list)?  EDIT:  This is different than the previously linked question because I'm specifically interested in knowing if the items are not in a list already, is it still recommended for performance reasons to put them in a list for the sole purpose of joining.


I have the following if block in my bash script:  if [ ${PACKAGENAME} -eq kakadu-v6_4-00902C ]; then   echo "successfully entered if block!!" fi   The script execution is not entering my if block even though $PACKAGENAME is equal to kakadu-v6_4-00902C. What am I doing wrong?


I have on DB2 table that stores one Json string on one of the fields and I need to get this value and display on a browser, so this is here my problem begins...  Some json string has German chars that for some reason only when I execute the php from a browser gets error 5 on json_last_error(), if I execute the same script on terminal, it execute with success.  Another thing is, if I get the same json string, and put direct on a var instead of get the var from DB2 using db2_exec() it works too.  so I built one script to test, and here my tests:  EXECUTING FROM TERMINAL:  message to be decoded:  From DB: {"location":" Ã–sterr","street1":"straÃŸe"}  From var: {"location":" Ã–sterr","street1":"straÃŸe"}  -------------------------------------------------------------  Json Decode From Var... stdClass Object (     [location] =>  Ã–sterr     [street1] => straÃŸe )   -------------------------------------------------------------  Json Error Checking Json Decode Var...   - No errors  -------------------------------------------------------------  Json Decode From DB... stdClass Object (     [location] =>  Ã–sterr     [street1] => straÃŸe )   -------------------------------------------------------------  Json Error Checking Json Decode DB...   - No errors   EXECUTING FROM BROWSER:    I already tried:  utf8_encode() - but this does nothing and the var still the same.  iconv - get an error saying that there is one invalid char.  I am running out of options to solve this.. I really need help on this.  Thank you.


How do we get figure references to not render as "??"

Below is some source code for a short/brief document. When I compile the short document document only once, the source code \ref{figure:FORMULA:anatomy} becomes ?? in the pdf. If I run PDFLaTeX a second time, the .aux files etc... get updated and the figure reference becomes 1.1.  \documentclass{article} \usepackage{graphicx}                             \begin{document}                               \section{Yellow} \subsection{Submarines}  blah blah \ref{figure:FORMULA:anatomy}.   \begin{figure}[htpb] \label{figure:FORMULA:anatomy}   \centering    \fbox{         \begin{minipage}{\linewidth}             \includegraphics[width=\linewidth]{FORMULA_anatomy}             \caption{I'm a caption}         \end{minipage}     }% end fbox \end{figure}  \clearpage  \end{document}   I have a different document which after running through PDFLaTeX a dozen times still has the figure references showing as ??. How can I get the figure references to render properly? Its very long document, so I will provide a  to the source code rather than pasting in the body of this question.  The source code for the document for which \ref{lable} almost always becomes ?? is


Automated a minipage+fcolorbox with a newenvironment

How could I create a new environment to automated the following code?  \noindent\fcolorbox{white}{lightgray}{ \begin{minipage}{0.96\textwidth}  some text in here \end{minipage} }


Any nice, stable ways to keep a window 'Always on top' on the Mac?

I am looking for a stable way to keep any window 'always on top' on OSX.  , an app that does that requires SIMBL/easySIMBL, which it seems is not very stable.  Are there any better solutions? It's actually surprising that there is no native way to implement this.


Tracker icon is misaligned in activity page

Found something different with my  today, seems something goes wrong.    After inspect the element, found the class of it is choose-tracker-settings. As i used to click label location to choose tracker, the added icon is not useful to me. Anyway, the location is not proper.    More details:    OS: macOS Sierra 10.12.1 Browser: Chrome Version 58.0.3029.110 (64-bit)


Prove that for every complex $2$x$2$ matrix $A$, there exists a matrix $X$ such that $X^3=A^2$.

This is a problem I've been stuck on for a while. I know that this statement is false if it had $A$ instead of $A^2$, for example, the matrix $A = \begin{bmatrix} 0&1\\0&0 \end{bmatrix}$ can't be written as $X^3$, but since $A^2$ equals $ \begin{bmatrix} 0&0\\0&0 \end{bmatrix}$, it can be written as $X^3$ with $X$ being$ \begin{bmatrix} 0&0\\0&0 \end{bmatrix}$ for example. Other than this, I have no insight into why this statement could be true: nothing can be assumed about diagonalizability, invertibility or anything else. I might be overlooking something simple. Thanks in advance.


Is a two hour layover at London, UK Heathrow too short?

Plan to fly from USA to Switzerland through London Heathrow. There is only 1.5-2h to catch connecting flight. The terminal for arrival and departure is the same.  Is it too tight?


Error while using client certificate in callouts

I am integrating with an external API which expects client certificate in the request. They had provided .p12 file. I have converted it into .jks and imported in Salesforce. I have tried to use it two ways and both failed.  req.setClientCertificateName('certname') named credentials with this certificate  The error that is displayed on dev console when I execute the code is System.CalloutException: PKIX path building failed:   sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  Has anybody faced such issue or have any idea of potential reason for this error? Thanks.


Stuck on Python Fibonacci loop, only returns one value?

def GenerateFibonaci(x):   if(x == 0):   return 0   elif(x == 1):   return 1   else:     for i in range(x):        return GenerateFibonaci(x-1) + GenerateFibonaci(x-2)   print(GenerateFibonaci(x))   I'm attempting to write a program GenerateFibonaci(x) that takes one input and prints a listed fibonaci sequence depending on the length of x.   Here's what I get as an output, only one value instead of a list:  >>> GenerateFibonaci(6) 8   This is what I'm trying to get it to look like:  >>> GenerateFibonaci(5) [0,1,1,2,3] >>> GenerateFibonaci(8) [0,1,1,2,3,5,8,13]   Not sure if I need to add a list statement or a new nested loop? Any help would be greatly appreciated.