I recently  . One of the users who read my answer felt that it would have been helpful if I included the output (from terminal) to the code I used in my answer:     You should include the output of your examples, people reading this won't always have the possibility to try it out. :)   Since I did not have access to a terminal at the time, I asked the user to run my code on the terminal and edit the output thereof into my post:     @flornquake: Normally, I would, but I'm not at a terminal at the moment. I'd appreciate it if you were and could, though   I had to walk away from my computer for a while, but eventually, I did see a suggested edit (it was however, already reviewed by the time I could weigh in). The edit does exactly what I asked and has been rejected (2-3) for reasons that I don't agree with (This edit is incorrect or an attempt to reply to or comment on the existing post).   Now, I would like to be able to overrule the decision and include the suggested edit into my post. I prefer this option, as the alternative is for me to copy-paste the suggested edit and manually splice it in, myself; which is less efficient.  Does anyone think this is a viable feature to add?

A user  which added useful information to one of my answers. However, because it was a substantial edit, it was rejected by the reviewers. That's fine. However, as the owner of the post I would like to be able to overrule their decision after reviewing the edit myself (as I was encouraged to do by the notification in my inbox).  Currently, I had to open the edit suggestion in a different tab and manually copy and paste over the changes from the markdown diff to apply the changes. This seems laborious and doesn't give credit to the user who suggested the edit.  Request:  I would like a button on the suggested edit page, visible to the owner of the post, which applies the suggested changes, preferably just as if it had been accepted by the reviewers (i.e. giving credit to the editor and the +2 reputation for editing, if applicable).  Related discussions: (note that since this is a feature request, these are not duplicates)


Hi I am (very) new to java and I come from a c++ background and I am getting this error: Array-Lists-In-java.java:3: error: '{' expected public class Array-Lists-In-java{                   ^  and here is my code:     import java.util.ArrayList;          public class Array-Lists-In-java {              public static void main(String[] args)         {             ArrayList<String> grocery = {"Onions","Carrots","Olives", "olive oil"};                          printArray(grocery);                          grocery.add("Tomatoes");                          printArray(grocery);                      }                  public static void printArray(ArrayList<String> list)         {             for(int i = 0; i < list.size(); i++)             {                 System.out.println(list.get(i));             }         }              }  what am I doing wrong??pls correct me where i am going wrong it would be really helpful thanks

What characters are valid in a Java class name? What other rules govern Java class names (for instance, Java class names cannot begin with a number)?


I'd like to place two charts next to each other and have the y-axis scaled the same in both; that is, I'd like the y axis in this example to be from the minimum value, which is 10, to the maximum, 100, in both charts, so they can be more easily compared visually. Or would the best thing to be to put them in the same plot? If so, how can I separate the data visually?   (I got the code for doing the chart from )    \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel near ticks, xtick=data, % Only put labels at positions of data points xticklabels={A,B,C}, % Provide text for labels xlabel={Type}, ylabel={Value}, ] \addplot [     only marks, % No lines between the points     mark=empty, % No marks at the points     error bars/y dir=plus,  % Error bars in the positive direction     error bars/y explicit,  % We provide the values for the error bars     error bars/error mark=empty,    % No markers at the end of the error bars     error bars/error bar style={thick}  % Use thick lines for the error bars ] table [     y error expr=\thisrow{Y2} - \thisrow{Y1} % Calculate the length of the error bars ] { X Y1 Y2 1 10  30 2 20 40 3 30 45 }; \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[  xlabel near ticks, xtick=data, % Only put labels at positions of data points xticklabels={D,E,F}, % Provide text for labels xlabel={Type}, ylabel={Value}, ] \addplot [     only marks, % No lines between the points     mark=empty, % No marks at the points     error bars/y dir=plus,  % Error bars in the positive direction     error bars/y explicit,  % We provide the values for the error bars     error bars/error mark=empty,    % No markers at the end of the error bars     error bars/error bar style={thick}  % Use thick lines for the error bars ] table [     y error expr=\thisrow{Y2} - \thisrow{Y1} % Calculate the length of the error bars ] { X Y1 Y2 1 60  80 2 70 80 3 90 100 }; \end{axis} \end{tikzpicture} \end{document}

OK, I've plotted these graphs but am unable to stretch the second one, so that they both have the same values on the vertical lines drawn from one to another. I've tried to set domain=0:2200 for both but it doesn't work.


I ran into this sentence written by a student:  This is an ordinary anxiety that comes and goes and does not interfere with someone’s life.  I feel that "someone's" should be replaced with one's, but I don't know the rule. When do we say someone and when one?

I've been searching about the ability to use "one" and "someone" interchangeably but found almost nothing. So what's the difference between them and can they be used interchangeably, for example, in these sentences:   There are numerous things (one, someone) could notice There is a hidden place (one, someone) might find  If (one, someone) comes up to you and asks....


After I upgraded from HDD to SSD, I followed some tips from Internet and turned swap off, but then, my OS would always freeze when out of memory although I have 8GB RAM and just open some applications.   Today I decide to turn swap on to get my system working better. Are there any better solutions for my case?

I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM?


Is hashing the individual items, and then XOR-ing the results together, a good way of uniquely hashing an arbitrary unordered set of items?  I am thinking of using hash-then-XOR since I want some sort of function that can compute the hash of a set incrementally: given the $H(S)$, I want to be able to calculate $H(S \cup \{x\})$ and $H(S \setminus \{x\})$ without knowing the elements of $S$. In my particular application it's assured that already existing elements will not be added to sets, and nonexisting elements will not be deleted from sets.  With hash-then-XOR, whenever an element is inserted or removed, its hash can simply be XORed onto the set hash, allowing identical sets formed by arbitrarily different series of insertions and removals to arrive at the same hash. This is due to XOR being commutative, associative, and its own inverse.  Is this sort of set hashing scheme secure, in the sense of preimage, collision, and second-preimage security? If not, can some other more secure scheme (perhaps hash-then-modular-addition?) have the same sort of incremental properties as hash-then-XOR? I am specifically asking for an incremental set hashing algorithm, where the hash can be updated as elements are removed and added to the set, without knowing the whole set. Schemes such as hashing a lexicographically sorted set won't work in this case.

Suppose I have a set of elements, with known hash (e.g. SHA-2). How can I calculate the hash of the set? With it I mean an unordered set, so the order of elements is undefined and shall not play any role in determining the hash of the set.  In theory any commutative operation applied to the hashes should be fine, but I have the strong feeling that XORing all of them together is quite unsafe. An attacker could add an element to the set to produce a hash collision, although finding an element with that wanted hash is as hard as breaking the hash of the whole set.  Anything better solution than the trivial one of sorting the elements into a list, calculating their hashes and then calculating the hash of the hash list?  I think Merkle trees can't help here if they are based on some sort of ordering of the elements.


I want to how that in any metric space,      Intersection of any number of compactsets is compact.

Is the the intersection of a finite number of compact sets is compact? If not please give a counter example to demonstrate this is not true.  I said that this is true because the intersection of finite number of compact sets are closed. Which therefore means that it will be bounded because the intersection is contained by every set. I am not sure if this is correct.  Thank you for the help


How do i change the line spacing of my entire document to 1.15 lines?

I would like to typeset a draft of my document with double linespacing so that my collaborators have space to write in their edits (with a pen).  How do I do it?


it's supposed to Array.slice() let me to make a copy of an array, and then I can modify that copy without modifying the original array, but when I use Array.forEach() over the copy for delete some values this values also are removed from the original array. Does anybody have an idea why this happens? Here is the code that I've used:  var originalArray = [     { id: 1, name: 'Sales', datasources: [         { id:1 , name: 'datasource1', fields: [] },         { id:2 , name: 'datasource2', fields: [] },     ] },     { id: 4, name: 'Accounts', datasources: [         { id:3 , name: 'datasource3', fields: [] },         { id:4 , name: 'datasource4', fields: [] },     ] },     { id: 123, name: 'my datasources', datasources: [         { id:1 , name: 'datasource1', fields: [] },         { id:2 , name: 'datasource2', fields: [] },         { id:3 , name: 'datasource3', fields: [] },         { id:4 , name: 'datasource4', fields: [] },     ] },     { id: 12, name: 'shared datasources', datasources: [         { id:13 , name: 'myshared datasource', fields: [] },         { id:16 , name: 'hello test', fields: [] },     ] }, ];  var copyOfOriginalArray = originalArray.slice();  copyOfOriginalArray.forEach((folder, index) => {     folder.datasources = folder.datasources.filter((o) => { return o.name.trim().toLowerCase().includes('hello'); }); });  JSON.stringify(originalArray); JSON.stringify(copyOfOriginalArray);

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


In the attack on the Jawas on Tatooine in A New Hope the Stormtroopers went to some lengths to indicate to observers that Sandpeople carried out the attack. They may not have fooled Obi-Wan but presumably others would have believed that Sandpeople were responsible. What is beyond doubt is the cover-up attempt.     Luke: It looks like the Sandpeople did this. There's Bantha tracks. They've never hit anything this big.   Obi-Wan: They didn't. But we are meant to think they did. These tracks are side-by-side. Sandpeople always ride single file to hide their numbers.   Luke: These are the same jawas that sold us R2 and C-3PO.   Obi-Wan: And these blast points, too accurate for Sandpeople. Only Imperial Stormtroopers are so precise.   What did the Empire hope to gain by covering up the attack? Would it really matter if people knew that they'd done it? They were, after all, in a pretty strong position at this point. The Jawas themselves hardly pose much of a threat. Even if the population of Tatooine was unhappy by the attack what did the Empire have to fear from that discontent. Especially in the light of this recent development.     Tarkin: The Imperial Senate will no longer be of any concern to us. I've just received word that the Emperor has dissolved the council permanently. The last remnants of the Old Republic have been swept away...The regional governors   now have direct control over their territories. Fear will keep the local systems in line. Fear of this battle station.   Why not just be open about the brutality of the Empire and their methods?    Edit: Whilst the linked question is along the same lines, neither answer deals with the Tarkin statement. The accepted answer argues that the attack on Tantive IV/the Jawas would cause unease in the Senate. This is rendered irrelevant on the disillusion of the Senate. The other answer says that killing Jawas is bad publicity for the Empire. As I say in the comments, if the Empire cared about this then they wouldn't have destroyed Alderaan. I'd like an answer that preferably deals with the Tarkin comments and the Empire's fear-based strategy. I've changed the question title accordingly.

In Episode IV, why did the stormtroopers spend time making Bantha tracks and dropping gaffe sticks just to hide their killing of the Jawas?  I know that it shows off Obi-Wan's Sherlock Holmes wit but it seems like something the stormtroopers wouldn't care about.   So why did they bother?


Maybe this is already answered somewhere else, but this is the kind of situation where the question in itself is hard to formulate.  Excuse me in advance if it is the case.  I have a container class who contains base properties and a list of items of the generic type specified in the class definition.  public class Container<TItem> where T : IItem {    public string PropA {get; set;}     public List<TItem> Items {get; set;} }   IITem is only an empty interface used for the purpose of grouping specific classes.  It will be clearer in a short while.  public interface IITem {}   I then have some classes who inherits this interface.  public class ItemA : IItem {    public string ItemAProperty { get; set; } }  public class ItemB : IItem {    public int ItemBProperty { get; set; } }   Here is the problem.  I have a method who populate a Container class and I want it to return it.  So, I have this :  public Container<IItem> GetItems(int itemCategory) {    Container<IItem> items;     switch(itemCategory)    {       case 1 :          items = GetItemsA(); // Will return an instance of Container<ItemA>.          break;        case 2:          items = GetItemsB(); // Will return an instance of Conainter<ItemB>.          break;    } }   The lines begining with item = GetItems... don't compile, indicating :  Container<ItemA> can't be cast as Container<IITem>.

It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way.  List<string> sl = new List<string>(); List<object> ol; ol = sl;   results in Cannot implicitly convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  And then...  List<string> sl = new List<string>(); List<object> ol; ol = (List<object>)sl;   results in Cannot convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  Of course, you can do it by pulling everything out of the string list and putting it back in one at a time, but it is a rather convoluted solution.


$ cat /etc/*release* | grep -i distrib DISTRIB_ID=Ubuntu DISTRIB_RELEASE=13.10 DISTRIB_CODENAME=saucy DISTRIB_DESCRIPTION="Ubuntu 13.10"  $ lspci | grep -i bcm 02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)  $ lshw -c network *-network                   description: Network controller    product: BCM43142 802.11b/g/n    vendor: Broadcom Corporation    physical id: 0    bus info: pci@0000:02:00.0    version: 01    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list    configuration: driver=bcma-pci-bridge latency=0    resources: irq:16 memory:f1900000-f1907fff  $ lsmod | grep -i bcma bcma                   46670  0   $ rfkill list 0: hci0: Bluetooth    Soft blocked: no    Hard blocked: no  $ dmesg | grep -i wlan  $ ifconfig lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:374 errors:0 dropped:0 overruns:0 frame:0           TX packets:374 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:40211 (40.2 KB)  TX bytes:40211 (40.2 KB)   seems like the module for the wifi is not loaded (or loaded incorrectly). i will appreciate if one could shed the light on the issue and assist bringing the wifi up again.  also tried  $ rmmod bcma $ modprobe bcma   but it did not help  update: i did the following and it seems to help. can it be?  $ apt-get install bcmwl-kernel-source

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I am working with a student who sends me essays and I help edit them. In one of his paragraphs, he wrote "The lecturer indicates this is illegal since it is considering stealing." In my head, I know it should be "considered stealing." But I am having trouble explaining why. Is there a specific grammar rule? My student's first language is Spanish so I want to try and explain this in a way he can remember.

Perhaps I've got the wrong idea, but I've been taught that two verbs ending in -ing shouldn't go together. However, I come across such cases occasionally.  *I'm considering buying a new car. I'm practicing playing the piano. He is finishing saying his prayers at the moment.*  So, is it grammatically correct to put one -ing after another?


I just took my chicken breast out of the packet and cut it up to make schnitzel then realised I had no oil. Is it safe to put it back in my fridge for a day?

What general rules do I need to follow to keep my food safe? How do I know what temperature to cook something to, or whether my food is safe at room temperature?


I have a Windows application, in which there is a login form and registration form. In the registration form there are 4 textboxes in which one of them is for getting the user contact number (Mobile Number), where only numbers are allowed. I want that user can enter only integer number not char just like in asp application, where using ajax textfilter we restrict the user to enter only integer number.   Does this type of functionality exist, such that the Windows application can restrict the user?

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.


A picture environment at exactly the size of the text area can fit snugly on one page. However when I replace the environment with a wrapper environment with exactly the same definition, it takes two pages instead! This is a problem because I need to define my custom full-page environment but it is critical that an extra page not be inserted after it.  To be precise, the following compiles into one page:  \documentclass{article} \usepackage[margin=1in]{geometry}  \newenvironment{wrap}{   \begin{picture}(6.5,9) }{   \end{picture} }  \begin{document} \setlength{\unitlength}{1in}  %\begin{wrap} %\end{wrap}  \begin{picture}(6.5,9) \end{picture}  \end{document}   However if you comment out \begin{picture}...\end{picture} and un-comment \begin{wrap}...\end{wrap}, it compiles into two pages, even though it has exactly the same definition. Why is this the case?  Narrowing it down: replacing 9 with 8.5 solves the problem, that is, both wrap and picture versions compile to one page. So it seems that the problem is that while the 9-inch picture environment maxes out the space, while the wrap environment adds an extra sliver of space from \newenvironment that causes a page break. Can someone verify this guess?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


I am under the impression that in western culture, it is quite common to conceive the Self as an illusion — probably as an import from eastern religions, and in particular from Buddhism, and in connection with the widespread practice of meditation.  That is, to see the Self as a collection of psychological dispositions, and so on, and in particular to conceive of reality as a continuum where nothing starts and nothing ends, and nothing exists separated — I think that in Buddhism it is called dependent arising.  People often speak about having had a spiritual experience in which they realized that everything is One and all distinctions are an illusion.  It seems to me that people are disposed to accept that without much issue.  But I also have the opposite impression about Free Will — that people have a lot more trouble letting go of that concept and of conceiving it as an illusion.  What is that which has Free Will, if the Self is an illusion?  What is that which merits praise or blame, or bears moral responsibility, if all arises dependently?  How can we let go of one (the Self) and not the other (Free Will)?  Have any philosophers discussed this last question?    Note — Naturally these questions dissolve within the framework of compatibilist Free Will, and therefore, to clarify, I am concerned with how this problem is dealt with within a layperson or libertarian view of Free Will.    Note #2 — I realize this is not a purely philosophical question. One might say that it is a scientific question. I'd say it is both. That a question cannot be solved a priori from one's couch does not mean that it is not philosophical. See for example Dennett's Consciousness Explained which is a 500 pages long scientifically informed influential philosophy book.

William James believed that there was no central entity or ego that embodied the "I" in "I feel" or "I think". That the continuous stream of thoughts and sensations generated the illusion of their being a central entity doing the thinking and perceiving, but that no such entity existed.    Here's James as quoted in Russell's "The Analysis of Mind"      I believe (he continues) that 'consciousness,' when once it has evaporated to this estate of pure diaphaneity, is on the point of disappearing altogether. It is the name of a nonentity, and has no right to a place among first principles. Those who still cling to it are clinging to a mere echo, the faint rumour left behind by the disappearing 'soul' upon the air of philosophy"(p. 2).   and      "I have mistrusted 'consciousness' as an entity; for seven or eight years past I have suggested its non-existence to my students, and tried to give them its pragmatic equivalent in realities of experience. It seems to me that the hour is ripe for it to be openly and universally discarded"   This seems to me to be a variation on the bundle theory of the self, as proposed by Hume and the Buddha among others.   Yet William James also believed in freewill. But for there to be freewill, doesn't there have to be a central personal identity that is free to do the willing in the first place?   My questions:    Is William James stream of consciousness indeed a bundle theory of the self?  Does the concept of will necessarily require a subject that is doing the willing?  How can a bundle theory/stream of consciousness model of self and personal identity (or any theory that denies the existence of a central "I" in the mind) be compatible with freewill?


UPDATE: WORKING SOLUTIONS Getting an array type: column1, CONCAT('[', GROUP_CONCAT(column2), ']') AS array FROM table GROUP BY column1  And this returns a column named array with following results: [x,y,z] Getting an object type: column1, CONCAT('[', GROUP_CONCAT(CONCAT('{ property_A:', column2, ', property_B:', column3, '}')), ']') AS object FROM table GROUP BY column1  And this returns a column named object with following results: [{property_A: x, property_B: z},{property_A: y, property_B: w}] ORIGINAL QUESTION I have SQL table like that: N | B 1 | z 1 | w 1 | y 2 | x 2 | k  how has to be the query that returns something like that: N | C => alias of collection of B 1 | [z, w, y] 2 | [x, k]  Thanks

Basically the question is how to get from this:   foo_id   foo_name 1        A 1        B 2        C   to this:   foo_id   foo_name 1        A B 2        C


I am trying to install Ubuntu 15.x without a bootable USB thumbdrive using UNetbootin. I was not able to install UNetbootin:  sudo apt-get install -f unetbootin   It resulted in unmet dependencies, and here is the exact error text:  The following packages have unmet dependencies: unetbootin: Depends: libqt4-network (>= 4:4.5.3) but it is not installable               Depends: libqtcore4 (>= 4:4.6.1) but it is not installable               Depends: libqtgui4 (>= 4:4.5.3) but it is not installable               Depends: p7zip-full but it is not installable               Recommends: extlinux but it is not installable E: Broken packages   I currently have Ubuntu 10.04 on my system.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Prove by induction that for every integer n, $\frac{11n^3 + 25n}{6}$ is an integer (i cant post the actual given expression since it might cause academic offence). I have only worked with proofs with natural numbers so induction was quite linear. For integers how do i go about showing that it is an integer. I tried cases where n = 1, 2, 3, -1, -2, -3 and it is all true but i dont know how to start it. Any insight would be appreciated. Thank you for your time.

I'm trying to prove that $6 \mid (n^3 - n)$ where $n$ is a nonnegative integer. I started off by proving the basic step with $P(6)=4$. The next step would be the induction. However I'm having a bit f trouble understanding and using the method. Could someone show me how I would prove the statement and explain to me how I would get the answer. Thanks in advance.


On Stack Overflow a user asked the following question:   As noted by user , this exact question has been asked on Nvidia's forums as well:    He goes on to state "Vote to close". Not taking into account the quality of this particular question, I would say that this is a bit much. The OP is, in my opinion, fully within his right to ask the same question on a different Q&A-site or forum if he wishes to do so.   So my question is: If the question asked on SO is a duplicate of a question asked on a different (non-SE/SO) site, does that warrant a vote to close (as duplicate)?  I would say it does not, but would like to hear your thoughts on this.

I just posted a question to  and afterward realized that it might not be answered very quickly due to how specific it was. So I also posted it on the   I plan to update both the SU and Ubuntu posts with the final answer I end up using, but I can't help but feel users from both places might not like that I've posted to both.  So my question is: Is it frowned upon to post the same question elsewhere and link to it?


I have only the Canon 18-55mm lens for my 1300D. I want to buy an EF 75-300mm lens. Will I be having a problem using those lenses?

I have a canon 760D. It has a EF-S lens mount. Am I able to use a EF lens with my camera?


I wanted to know is ui and ux design is all about designing a website and app on how it looks? Like how should a particular box should appear whether it should be small or big? Should it have shadow or how will it aling? Is this how ui and ux design is all about?

I've looked at this site for the first time today. I've checked , the  and the  and searched, and I don't seem to be able to find an answer on this site.  These are the closest I can find:        Reading the first few responses, I'm perceiving quite a difference in scope between 'user experience' as a concept and what I see discussed as 'User Experience' on this site and elsewhere, and I'm definitely interested in opinions addressing this.  Also, while I appreciate the field is broad, maybe there are some human interactions that definitely aren't UX - between two of them face-to-face, for example?


I cannot update the ubuntu-keyring package on my Ubuntu WSL.  I tried to run sudo apt update ubuntu-keyring and this is the command output:  Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded:   ubuntu-keyring 1 upgraded, 0 newly installed, 0 to remove and 86 not upgraded. Need to get 0 B/26.9 kB of archives. After this operation, 6,144 B of additional disk space will be used. Preconfiguring packages ... (Reading database ... 91158 files and directories currently installed.) Preparing to unpack .../ubuntu-keyring_2018.09.18.1-4_all.deb ... Unpacking ubuntu-keyring (2018.09.18.1-4) over (2012.05.19) ... dpkg: error processing archive /var/cache/apt/archives/ubuntu-keyring_2018.09.18.1-4_all.deb (--unpack):  trying to overwrite '/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg', which is also in package ubuntu-cloudimage-keyring 2013.11.11 Warning: The postinst maintainerscript of the package ubuntu-keyring Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2. Warning: This will BREAK in the future and should be fixed by the package maintainer(s). Note: Check first if apt-key functionality is needed at all - it probably isn't! Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package ubuntu-keyring) Warning: 'apt-key update' is deprecated and should not be used anymore! Note: In your distribution this command is a no-op and can therefore be removed safely. Errors were encountered while processing:  /var/cache/apt/archives/ubuntu-keyring_2018.09.18.1-4_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  I also tried to download the ubuntu-keyring_2018.09.18.1-4_all.deb file and then install it using sudo dpkg --install ubuntu-keyring_2018.09.18.1-4_all.deb, but the same error shows up.

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


We investigate on an arbitrary $a_i$ : $c(a_1 \ a_2 \dots \ a_k)c^{-1}(a_i)$.   First step, $c(a_i)=a_k$. Second step, $(a_1 \ a_2 \dots \ a_k)(a_k)=a_{k+1}$, Third step, $c^{−1}(a_{k+1})=? $.   Any answer that I read in MSE was not helpful to understand. In the final step, they all imply $c^{−1}(a_{k+1})=c(a_i)$, but why $c^{−1}(a_{k+1})=a_k=(a_1 \ a_2 \dots \ a_k)^{−1}(a_{k+1})$? which may imply $c=(a_1 \ a_2 \dots \ a_k)$ !  I would appreciate any simple clear detailed explanation.

I am trying to see that two permutations are conjugate exactly when they have the same cycle decomposition. I fail to see that     $$r(i_1,i_2,\dots,i_k)r^{−1}=(r(i_1),r(i_2),\dots,r(i_k))$$   for permutations $r$ in a set $X\ni \{i_p\}^k_0$   Any thoughts would be appreciated.  p.s. I ask this question in a new post as suggested by . Still, I believe it belongs to the above thread.


How can I get more information than what top shows me about a process?  I currently have a process that displays as j and has the CPU running at +2400%. Searching for j yields no results.  Here's an example of the top output:  PID  USER  PR  NI    VIRT    RES    SHR S  %CPU %MEM   TIME+     COMMAND                                                                              1722 root  20   0 2118996  57076   1148 S  2488  0.2   43934:45  j                                                                                This is being run on CentOS Linux release 7.2.1511 (Core) using 2 x Intel Xeon E5-2660v3 with 2.60 GHz.  ls -l /proc/1722/exe gives me:  lrwxrwxrwx 1 root root 0 Mar  3 17:13 /proc/1722/exe -> /usr/games/j   ls -lH /proc/1722/exe gives me:  -rwxr-xr-x 1 root root 313496 Dec 29 09:58 /proc/1722/exe

I am currently using this command to get some information about some specific processes:  ps -C beam.smp -o pid,user:20,%cpu,%mem,args   As I use it for two process names, I would like to do it in one command in order to get a snapshot. Like that:  ps -C beam.smp,docker -o pid,user:20,%cpu,%mem,args   The problem is that the output does not display a specific column with beam.smp or docker, which would be really useful for me. How could I get a new line in my output showing that?


I have to find exact n(any number specified) factors of a number whose all product combined yield the number and largest of n factors is minimised.  Eg: n=2 for number 12; 12= 6*2,12*1,4*3,we will take 4*3 as largest of n factors is minimised here.  Rephrased:      Given $n$ and $M$, write $M$ as a product of $n$ numbers so as to   minimise the largest of them.   What can be the approach to solve this problem?  My approach: break number in prime factors as 12=2*2*3,count each unique number and then distribute it among the n factors like for n=2; let the factors be a and b then as count of "2" is 2 I distribute it as one "2" to both a and b then the remaining 3 can be given to any of a and b but it will produce a=2*3 and b=3 which is wrong,can anyone provide better solution?

Say I have 12 and have to factorize it in 2 factors. Now possible factors are 1, 12 2, 6 3, 4   Now 3,4 is such that value of maximum factor i.e. 4 is minimized among all pairs.  How to find the solution in generic case where a number N is to be divided in K factors minimizing maximum value.


Prove that for every p - prime, $p>3$ the numerator of sum of $p-1$ summands of harmonic series is divisible by $p$ square.  I've written 1 A4 but so far without victory. This can't require advanced tools, as it is an exercise after chapter with only Euler's Theorem, Wilson's Theorem and CRT.  I've tried with Wilson's by multiplying everything by $(p-1)!$ and then write $(p-1)!=(p-1)*(p-2)!$ and later calculus -  but it does not work so far.  Thanks in advance for help.

Show that   $$(p-1)!\left(1+\dfrac{1}{2}+\dfrac{1}{3}+\cdots+\dfrac{1}{p-1}\right)\equiv 0\pmod{p^2}.$$   Maybe use this $$\dfrac{1}{k}+\dfrac{1}{p-k}=\dfrac{p}{k(p-k)}$$ and then I can't. Can you help me to prove it?   Thank you.


I am working on a project to read data in from a text file regarding different athletes' scores at the winter Olympics.  I have successfully been able to find each country's total score by comparing each athlete with their country and adding it to a total.  Each of these totals are stored in doubles: FRA, CHN, UKR, GER, RUS, CAN, ITA, USA, JPN, and GBR.  (All representing different countries)  So now I have a bunch of values stored as doubles that I need to sort in descending order.  I know I could just put the doubles into an array and sort it, but I will lose the name of the country associated to each value.  In PHP I could simply put it into an associative array and sort it - but unfortunately I have a very poor understanding of java and don't have a clue what to do.  I would appreciate it if someone could at least point me in the right direction.  The output needs to Display the countries name and it's score in descending order.

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I have 1TB of hard disk and I don't know why but only 930gb is usable and then I have 4 partition 3 NTFS and 1 for Linux they all have 2-6gb less storage than there actual size ie: Linux partition have 300gb but there only 293gb is usable windows partition eat 4gb for no reason is there any solution for this

I just got a new Lenovo Laptop which has been installed with Windows 7 and is supposed to have 250 GB hard disk.   Windows 7 reports that the hard disk drive has two parts: 221 GB C: and 9.76 GB Lenovo Recovery. The sum of the two parts is 230.76 GB.  If I remember correctly, if divide 250 GB by 1024 three times, I will get 232.8 GB, which should be what the OS reports as the hard drive size. But why the sum 230.76 GB of the two parts of hard drive is still smaller than 232.8 GB?


We have used the verbal system, but what about the musical subsystem of the auditory system of the brain? For many people the activation of this system by a particular kind of music leads to a relaxing effect. Note that the music might well not be a gentle flute. There are people who find a heavy drum-beat relaxing.  What does "might well not be" mean in the above text? What can be used instead of that phrase?

"The famous slogan about the strong and the weak comes, obviously, from the Athenian side of the argument, and its current popularity owes much to the nice balance between the powerful doing 'what they can' and the weak suffering 'what they must' -- as well as that iron law of inevitability (or realism, depending on your point of view) that is introduced by the phrase 'what they must.' But that is not what Thucydides wrote. As Simon Hornblower correctly acknowledges in the third and final volume of his monumental, line-by-line commentary on the whole of Thucydides' History, a more accurate translation is: 'The powerful exact what they can, and the weak have to comply.' Even that exaggerates the idea of compulsion on the weak: to be precise, what Thucydides claimed was only that 'the weak comply' -- no necessity was introduced at all. And Hornblower's commentary also raises the question of exactly what the action of the strong was supposed to be; it could equally well be translated from the original Greek as 'do' or 'exact' or even (as one Renaissance scholar thought) 'extort'. 'Do what they can' and 'extort what they can' conjure up very different pictures of the operation of power.   Does this mean that "do" "exact" or "extort" are equally possible for translation?


In the new review queue page, in the "This question has been flagged as" section, there is a header that shows up as "subreason.InputTitle"  I believe this is unintentional since that string doesn't seem to be very helpful.

The  would like to announce another release in a  for the Review queues. This release focuses on refreshing the queue user interface in preparation for further improvements to the user experience. Starting today, we will roll out these changes in three phases across the network. Roll-out plan We have planned for these UI changes to ship in three distinct phases affecting specific queues across the network. We will update this post as each phase is rolled out.      What Where When     Phase 1 • Home page (/review) • Close and reopen votes queue• Stats/History view• Steward badge Meta Stack ExchangeMeta Stack Overflow Shipped! January 28, 2021   Phase 2 • Changes from Phase 1• Suggested edits queue • Low quality posts queue • First posts queue • Late answers queue SuperUserAsk Ubuntu Shipped! February 16, 2021   Phase 3 • Changes from Phase 1 + 2• Triage queue (SO only)• Help and improvement queue (SO only) All network sites Shipped!February 23, 2021    UI changes to all queues  All review queues will be adopting a new user interface that focuses on providing reviewers with context to make deliberate, thoughtful decisions on review tasks. We shared an initial design proposal in our  and made sure to include that feedback into the final design. Responsive/Mobile-friendly design  We utilized  to update the visual design in the review queues. As part of this update, we were also able to make the queues responsive and utilize mobile-friendly UI components. Changes  Actions menu -  We’ve removed the action buttons for a menu-style component. Selecting an action now requires a bit of pause and mitigates robo-reviewer behaviors we've seen in the past. Instructions are now always visible and associated with each action.  More context - Users can now toggle between the review task and the necessary context (original question, answers, and comments) on the task page to assist in making educated decisions on a task. No need to open new browser tabs!  Vote controls and follow feature - We heard from you that being able to vote directly on all tasks as well as the option to follow posts and receive updates on changes would help in the reviewing process. These features will be available in all queues.  Filter button - We’re highlighting this feature (where it’s available) with a button and replacing the easily missed text-link.  Review count - We’ve removed the badge progress bar in lieu of keeping track of how many tasks you can complete in a queue (don’t worry, the badge bar isn’t gone).   Review home page  The review homepage has received a Stacks update as well, setting it up for forthcoming plans to create better onboarding for new reviewers. This page now provides a bit more information to new reviewers. Changes  Only the queues available/earned by the user are clickable  Includes additional text about necessary reputation to earn access to new queues  Available queues are prioritized to the top and then sorted by the number of tasks in each queue   Additional updates   All aspects of the Review queues are receiving some much needed design attention. Here a few more changes you can expect to see:  There is more incentive to continue reviewing. The Steward badge can now be earned multiple times for every 1,000 reviews in each queue. If you have already completed 2,000 or more reviews, we will backfill any additional Steward badges that you have already earned. You can expect to see them accrue over the next few days.  History view - Added and rearranged a few UI components so that users can better navigate and utilize the page  Stats view - Updated badge progress bar   Feedback Please leave any feedback or bug reports related to this release below this post. We will be reviewing responses on this post for one month following Phase 3 (March 23, 2021). After March 23rd, please ask a new question to report any new issues.


I am a returning student to the US. My passport suffered water damage but the personal details and US visa page is legible. I have applied for a new passport .   My question is: Can I travel to the US with the new passport and the original with the valid US visa?

I got my US B1 visa last month on my Indian passport. Someone in my family wrote a phone number on one of the blank page of my passport. As my passport is damaged now, can I travel with my current passport to US or I should apply for new passport? Also, will B1 visa be valid on old damaged passport if I get new passport?


I created a software, and now I want to make software public.If ysers will type on terminal command   apt-get install printx   then software will installed on their pc, and updated ~/.bashrc file.  How can I do it ?   Thank you.

As a developer of free software, I want to get my application into Ubuntu.  Should I provide a source tarball and ask for packaging? Or should I create a package myself? Should I target Ubuntu directly, or should I try to get into Debian and then into Ubuntu automatically?


I've been trying to install Ubuntu to a USB drive so I can save files and take it to friends house that don't use Ubuntu.  This way I still have all my files with me when I travel.  My issues is it seems to install I select install grub onto the USB stick but grub installs to the internal hard drive every time.  I don't know if this is a bug I asked this question awhile back and someone said it might be a bug but I was hopping it would be fixed with the new version.  Any thoughts?

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


I'm using slick2d for this process and trying to rotate a minigun to face the mouse. My problem is that the minigun in my game is actually rotating but no towards the mouse at all! Also, the minigun goes as far as 180 degrees and stops there.  Here is my minigun class that I have put inside another core class to be updated and rendered.  public class Minigun {      private Animation Shoot;     private SpriteSheet sheet;     private int x = 200, y = 150;     private double angleToTurn;     private Input input;      public Minigun(){         try {             sheet = new SpriteSheet(new Image("res/minigun.png"), 130, 34);             Shoot= new Animation(sheet, 1, 0, 2, 0, true, 1, true);             Shoot.setLooping(true);             input = new Input(1);         } catch (SlickException e) {             e.printStackTrace();         }      }     public void render(Graphics g){         g.pushTransform();         g.rotate(x + Shoot.getWidth() / 2 , y + Shoot.getHeight() /2,   (int) angleToTurn);         Shoot.draw(x, y);         g.popTransform();     }     public void update(){         double mX = input.getMouseX();         double mY = input.getMouseY();         angleToTurn = Math.toDegrees(Math.atan2(mY - y, mX - x));         System.out.println(angleToTurn);     } }

I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion).  I want the target to rotate and be facing right at the player.  The target, when it shoots something should shoot right at the player.    I've seen plenty of examples of slerping to the player, but I don't want incremental rotation, well, I suppose that would be ok as long as I can make the slerp be 100%, and as long as it actually worked.  FYI - Im able to use the position and rotation to do plenty of other things and it all works great except this last piece I cant figure out.  Code samples run in the Target's class, Position = the targets position, Avatar = the player.  EDIT  Im now using Maik's c# code he has provided and it works great!


I would like \pause to work in align environements as it works with normal text.  Here is an MWE:  \documentclass{beamer} \begin{document}  \begin{frame} \begin{align*}     1+1 &= 2 \\  \pause     1+2 &= 3 \\  \pause     2+2 &= 4  \end{align*} \end{frame}  \end{document}   It causes three pages in the PDF, where only the second page has the second equation missing, otherwise all equations are always visible.  I know there are workarounds with \visible, but a working \pause would be the simplest solution.

I'm writing a beamer presentation, and trying (unsuccessfully) to use \pause to step through a numbered array of equations, with the equations appearing in turn, and the corresponding numbers appearing at the correct time (i.e. when the equation first appears).   edit: I have partially solved the problem, using a variant on the \alt trick described , but with some vertical wiggling.  The solution ought to be a little more elegant than the one I've proposed below, given that the end user of the document (not me) is likely to need to make changes, and is not an advanced (La)TeX-user.  \documentclass{beamer} \begin{document}   \begin{frame}     \begin{gather}        1\alt<2->{\\2\alt<3>{\\3}{}}{}     \end{gather}   \end{frame} \end{document}


I would like to see the structure of object in JavaScript (for debugging). Is there anything similar to var_dump in PHP?

We need to see what methods/fields an object has in Javascript.


Initially, I thought since this field was isomorphic to $({0,...,12})$ , the elements $(0,4,9)$ would have square roots. However, when I checked the solutions, the answer was different. Thank you in advance.

Why is it that in $\mathbb F_q\setminus\{0\}$, when $q\neq 2^k$, there are exactly as many squares as non-squares?  My combinatorics textbook states this without proof :/


I'm diagnosing some networking issues with an inordinate amount of network interfaces on a Linux server.   I'm needing to dump all interface traffic as per tcpdump -i any, but I'm not finding any definition of the interface identifier (eth0, eth10, br4, etc.)   Is there a way to instruct tcpdump to include interface info with each packet per line?

This seems to be quite a trivial problem, but after some searching I can't stil figure out the answer. One can run tcpdump using "any" as the interface description, ie:   # tcpdump -i any -n host 192.168.0.1   Is there any way to force tcpdump to show on which interface displayed packet was captured?  Update:  As more people confirmed this is probably not possible with vanilla tcpdump, can someone propose a solution to mentioned problem? Perhaps different sniffer?   General issue is as follows: On a system with 50 interfaces determine what is inbound interface for packets coming from specific ip address.


I know how to create a shortcut to the configuration screen of Windows Update with this command:  %windir%\System32\rundll32.exe url.dll,FileProtocolHandler wuapp.exe     However is there any way to specifically open this window?    If so, how?

I am giving a presentation about Microsoft/Windows updates. To get the attention of the public I want this screen to pop-up in the middle of my presentation; maybe with a shortcut.    Does anyone have an idea on how to do this?


Here is a very simple drawing of a battery pole and a capacitor plate connected by a wire (exaggerated in thickness).    The question is, why is the capacitor not being charged? But as you will see below, I feel that I can explain why it should get charged. So ultimately what I should rather ask is: Where am I wrong in my understanding of moving charges?  Here is my reasoning that the capacitor should become charged:   Consider the battery alone. The positive terminal is $a$. The positive and negative terminals are "charged" and creates an electric field $\vec E$ around them. A charge $q$ placed in the field would move, $E=F/q$. We add a wire to terminal $a$. Electrons in the wire are attracted to the positive $a$. Negative charge in the wire therefor moves towards $a$, and positive charge towards the other wire end $b$. At some point enough positive charge is build up at $b$ to cancel out the field $\vec E$ from the battery. Charges stop moving. The ideal proporty of the battery is that it will keep the terminal $a$ at a constant positive charge (by moving the incoming electrons away from $a$ to the opposite pole, by electromotive "force" $emf$). The charge at $a$ therefor remains constant and there is equally as much charge in the wire end $b$ as at the terminal $a$ We add a capacitor plate $c$ at the wire end $b$. Since this is just to be considered as a new wire "end", this whole plate will have the same positive charge as the terminal $a$. We add the second capacitor plate $d$. There is a very small gab between $c$ and $d$. Because of the positive charge at $c$, electrons will be attracted and crowd up at the $d$ plate. This induced charge will be negative and equal in magnetude as the charge at $c$. From $d$ to $e$ same story. $e$ should get a positive charge of equal magnetude as all the others.   Since we all know that an initially uncharged capacitor in an open circuit (which this clearly is) stays at zero potential difference, which means equal amount of charge on both plates, I don't see where I am wrong in this reasoning. If anyone can help me out, please do.     There is a  apparently asking the exact same thing. But the asker takes a different point of view (considers the open part as a second capacitor and the reasoning I follow is not given). Since my problem here is rather a misunderstanding somewhere in the understanding of charge behaviour and movements, I have made this into a new question.

Say I have a circuit consisting of a battery, a wire, an open switch, and a capacitor. The circuit is open since the switch is open.  My book says that the capacitor will only be charged when the switch is closed, but I don't see why this is true. I would expect the capacitor to be charged a little - not as much as if the circuit is closed, but still charged none the less.  To further illustrate my point consider this: If the circuit is open, the current must be zero. Consequently the field must be zero. For the field to be zero, the capacitor's field must cancel out the battery's field. Therefore the capacitor must be charged.  Generalizing this concept, shouldn't capacitors be charged (to a lesser degree) in open circuits?  EDIT: In other words, if the field is zero, the capacitor must be charged to cancel out the field of the battery.


I have some issues with classicthesis' \spacedlowsmallcaps command that I could bring down to the following MWE:  \documentclass{scrartcl}  \usepackage{microtype}  \newcommand{\spacedword}[1]{\textls[150]{#1}}  \begin{document}     Hello! $abc = def + ghi$      \spacedword{Hello! $abc = def + ghi$}      Hello! $abc = def + ghi$ \end{document}   The first line is displayed as it should. The second line as well with larger spacings between the characters. However, in the third line, the text "Hello!" is shown as it should be (with normal spacing), but the formula in the math mode is still spaced.  As it was shown , this is a known bug. In the first answer, it was suggested to use the following command after \textls:  \makeatletter\let\glb@currsize\@empty\makeatother   However, is there a possibility to incorporate this workaround into the command spacedword such that I do not have to care about the bad spacing any more? This would be the preferred solution since I use \textls quite a lot. Simply adding it into the command definition does not work, likely due to makeatletter/makeatother parsing issues.  Update: Okay, next problem. Consider the following MWE:  \documentclass{scrreprt}  \usepackage{etoolbox} \usepackage{microtype} \usepackage{textcase}   % From classicthesis.sty: \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\sffamily\textls[80]{\scshape\MakeTextLowercase{#1}}} % From arsclassica.sty: \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}% \bfseries\spacedlowsmallcaps{#1}}   % New Workaround: \makeatletter \let\OldSpacedLowSmallCaps\spacedlowsmallcaps \renewrobustcmd{\spacedlowsmallcaps}[1]{\OldSpacedLowSmallCaps{#1}\let\glb@currsize\@empty} \makeatother   \begin{document}     Hello $abc = def + ghi$      \spacedlowsmallcaps{Hello $abc = def + ghi$}      Hello $abc = def + ghi$      \begin{description}         \item[$x$] y     \end{description}      Hello $abc = def + ghi$ \end{document}   Thanks to the solution suggested by Ulrike Fischer in the comments below, the first three lines look as they should. However, after the description environment, the rendering of the last line again breaks, i.e., the characters have too much space between them although the description x, which appears in spacedlowsmallcaps, is afterwards "repaired" by the wordaround.

Using the \lsstyle command gives wrong math latterspacing afterwards. I came upon this problem when using the classicthesis and putting math in a section (microtype is used there too). After the section is rendered, math letterspacing is wrong from then on.  Minimal working example  \documentclass{minimal} \usepackage{amsmath} \usepackage{microtype}  \DeclareMathOperator{\MyOp}{MyVeryLargeOperator}  \begin{document} Before: $\MyOp(1,2,3)$. % this is how it should be.  {\lsstyle $X^2 + Y^2 = Z^2$} % \lsstyle and math inside a group.  After: $\MyOp(1,2,3)$. % now math has wrong letterspacing.  \end{document}   Output    Question  Any ideas how to fix this? I would especially be interesting in a fix working with classicthesis. You can see the problem here:  \documentclass[pdfspacing]{scrreprt} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[eulermath]{classicthesis} \usepackage{amsmath}  \DeclareMathOperator{\diag}{diagonal}  \begin{document} \section{Usual section works fine}  \[ \int f(x) \mathrm dx, \; \diag(a_1, \ldots, a_n), \; \ker(f) \]  \section{But some math in a title $X^2+Y^2=Z^2$ messes it up}  \[ \int f(x) \mathrm dx, \; \diag(a_1, \ldots, a_n), \; \ker(f) \]  \end{document}


I am just looking for a quick check whether my reasoning is correct when calculating $E(X)$, given that $X \sim \Gamma(\alpha, \beta)$. My calculations are as follows:    \begin{align*} \text{E}(X) &= \int_0^{\infty} x \frac{1}{\Gamma(\alpha) \beta^{\alpha}} x^{\alpha - 1} e^{-\frac{x}{\beta}} dx\\ &= \alpha \beta  \int_0^{\infty} \frac{1}{\alpha\Gamma(\alpha) \beta \beta^{\alpha}} x^{\alpha} e^{-\frac{x}{\beta}} dx\\ &= \alpha \beta  \int_0^{\infty} \frac{1}{\Gamma(\alpha + 1) \beta^{\alpha + 1}} x^{(\alpha + 1) - 1} e^{-\frac{x}{\beta}} dx \text{ (property of gamma function)}\\ &= \alpha \beta, \end{align*}  since the integrand is the density of a $\Gamma(\alpha + 1, \beta)$-distributed random variable.    I know my answer is correct. However, the answer key in the textbook I have at hand (Introduction to Probability, by Roussas) is different, and is actually very similar to Michael Hardy's answer here ().  In essence it appears that my approach is to turn the integrand into a pdf, whereas the alternate approach is to turn the integral into a value of the gamma function. My method seems very slightly simpler, but the fact that I haven't found anyone else using my approach leads me to ask: is there a flaw in my reasoning?  Thanks.

If $X \sim \text{Gamma}(\alpha,\beta)$, how would I go about finding $E\left(\frac 1{X^2}\right)$?


I have studied physics for about three years at university but after these years I still don't know how Newton derived his laws.  I know that he tried to find the best model to describe the motions  but It's a bit hard to believe for example how did he knew that an object can move at constant velocity without an external force? how he could be sure about that?!  Or, how could he derive his third law?, there was no instrument to measure forces or velocities..., he couldn't lie on the observations without any reliable data. Should I consider his laws as principles?!

The three laws are:  First law: The velocity of a body remains constant unless the body is acted upon by an external force.  Second law: The acceleration a of a body is parallel[disambiguation needed ] and directly proportional to the net force F and inversely proportional to the mass m, i.e., F = ma.  Third law: The mutual forces of action and reaction between two bodies are equal, opposite and collinear.  The first law had already been formulated by some philosophers prior to Newton, Hobbes said in the Leviathan '...[the proposition] that when a thing is in motion it will eternally be in motion unless somewhat else stay it, though the reason be the same (namely that nothing can change itself)...', given his reasoning, I think it safe to mean constant speed and direction, otherwise change is occuring and he explicitly rules that out. I think the same proposition is mentioned in Lucretious's De Rerum Natura.  Are there any antecedents for the second and third law?


Where is the verb in this sentence below?     No Small Business Brands On YouTube     Does this sentence mean "There are no small business brands on YouTube"? If so, then why does the sentence "No smoking" mean "Don't smoke"?

I am studying in the imperative sentence and I wonder what "No parking" is short for.I also want to get more comprehensive material of the imperative sentence.


I want to remote unlock a fully encrypted server using dropbear in the initramfs process.  My procedure that has worked from ubuntu 10.04 to ubuntu 14.04, does not work on ubuntu 16.04.  I noticed that it does not reply to ping in initramfs stage.  Is there a procedure for remote unlocking a 16.04 ubuntu server?  Thanks to all.

I want to unlock an encrypted LVM at startup on a headless Ubuntu 16.04 server. This is a fairly fresh install. The only installs I have done are mate-desktop, xrdp, dropbear, and busybox. My client is PuTTY on a Windows machine. I am fairly new to Linux, but here is the progress I have made:  Installed dropbear and busybox  Used puttygen to generate a key pair  Copied public key to ~/.ssh/authorized_keys and set proper permissions (700 on directory, 600 on file)  Copied public key to /etc/initramfs-tools/root/.ssh/authorized_keys and set proper permissions (700 on directory, 600 on file)  Confirmed my keys are good by successfully connecting to normal user session via PuTTY using key authentication  Created the script and modified the config files as outlined at  (Note: I did not perform step 8, but my /var/log/auth.log file did not contain the errors showcased in the Troubleshoot section of that blogpost if step 8 is not performed.)  Updated initramfs   When the system boots and shows the graphical LUKS unlock prompt, I get no response from the server when I try to connect via PuTTY. The connection times out. I have not been able to find any resources that deal with dropbear/busybox not running on boot. I am certain that if I could get a response, my key would work and I could unlock without problems. How can I find out why dropbear/busybox isn't running at boot? (For clarification, I can still unlock at the server and SSH into user session.)


I've lost so much time on this problem. I have two classes, one for a set of cards   #include <boost/serialization/vector.hpp> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <vector>  class Set { private:   friend class boost::serialization::access;   std::string _name;   std::vector<Card*> _cards;  public:   template <class Archive>   void serialize(Archive & ar, const unsigned int version);   Set(); };   And an other for a card itself :  class Card {    private:     friend class boost::serialization::access;       std::string _front;     std::string _back;     std::vector<CardReview> _reviews;        public:     template <class Archive>     void serialize( Archive & ar, const unsigned int version);     Card();  };   Here are my serializers :   template <class Archive> void Set::serialize ( Archive & ar, const unsigned int version ) {   ar & _cards; // If I comment this line, everything works !!   ar & _name; }  template <class Archive> void Card::serialize ( Archive & ar, const unsigned int version ) {     ar & _back;     ar & _front;     ar & _id;     ar & _reviews; }   Unless I comment the line serializing the vector of cards called _cards, I get the following linker error :  [ 33%] Building CXX object CMakeFiles/supercards.dir/set.o Linking CXX executable supercards CMakeFiles/supercards.dir/set.o: In function `void boost::serialization::access::serialize<boost::archive::text_oarchive, Card>(boost::archive::text_oarchive&, Card&, unsigned int)': set.cpp:(.text._ZN5boost13serialization6access9serializeINS_7archive13text_oarchiveE4CardEEvRT_RT0_j[_ZN5boost13serialization6access9serializeINS_7archive13text_oarchiveE4CardEEvRT_RT0_j]+0x1b): undefined reference to `void Card::serialize<boost::archive::text_oarchive>(boost::archive::text_oarchive&, unsigned int)' CMakeFiles/supercards.dir/set.o: In function `void boost::serialization::access::serialize<boost::archive::text_iarchive, Card>(boost::archive::text_iarchive&, Card&, unsigned int)': set.cpp:(.text._ZN5boost13serialization6access9serializeINS_7archive13text_iarchiveE4CardEEvRT_RT0_j[_ZN5boost13serialization6access9serializeINS_7archive13text_iarchiveE4CardEEvRT_RT0_j]+0x1b): undefined reference to `void Card::serialize<boost::archive::text_iarchive>(boost::archive::text_iarchive&, unsigned int)' collect2: error: ld returned 1 exit status make[2]: *** [supercards] Error 1 make[1]: *** [CMakeFiles/supercards.dir/all] Error 2 make: *** [all] Error 2 *** Failure: Exit code 2 ***   I really don't understand why this is happening. If I comment the above mentioned line, there is no compile-time error and the serialization works fine - but the _cards property is not included of course. So this not a linker error, the library is correctly linked. I've spent 3 hours trying to find out what is missing in my code without success.  Any idea would be appreciated,  Thanks !

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


In  on page 3 I find the following relation (eq. 1.1):   I tried detexify to identify the latex code for this symbol and work from there, but no success. What does this symbol mean?

I'm reading a  by Andrew Granville on analytic number theory.  On page 22 of the paper, there appears a strange looking symbol, undefined.  I've circled it in red in the screenshot below.    Since it's not defined in the paper, I'm assuming it must be standard notation.   From the context, I'm assuming it means something like "as compared to", or "with reference to", but that's just a guess.  Can anyone identify the symbol, even better explain what it means and/or provide a reference?  Is there a name to speak the symbol?  Thanks in advance.


I have a for loop with a map like this.  std::map<int,std::string> mymap = {{1,"a"},{2,"b"},{3,"c"}};  for(std::map<int,std::string>::iterator it = mymap.begin(); it!=mymap.end(); ++it) {     if(it->first==3)     {         mymap.erase(it);     } }  std::cout << mymap.rbegin()->second << std::endl;   The output is "b" as expected. The question is: Can this lead to an infinite loop (or a crash) somehow? I mean after  erase(it)   the iterator it is invalid. If the erased item was not the last one, it should be ok, because "it" is incremented after the erasion and when the condition is evaluated it points to mymap.end() at max. But if I erase the last one, after erasion mymap.end() should be after the last remaining item, and then it is incremented anyways. Can't it somehow run out of range? Shouldn't I use something like  for(std::map<int,std::string>::iterator it = mymap.begin(); it!=mymap.end(); ++it) {     std::map<int,std::string>::const_iterator tempit = it;     const bool lastItemErased = ++tempit == mymap.end();      if(it->first==3)     {         mymap.erase(it);     }      if(lastItemErased) break; }   to be safe?  note: both of the above runs and behaves as expected if I try to erase the element with key 3 and 2. I don't see how is this possible and why doesn't it crash. How can I increment an invalid iterator?  update: It has to work with c++03. I initialized the map like this, to post the question more easily.

In the following code I loop through a map and test if an element needs to be erased.  Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()?  map<string, SerialdMsg::SerialFunction_t>::iterator pm_it; for (pm_it = port_map.begin(); pm_it != port_map.end(); pm_it++) {     if (pm_it->second == delete_this_id) {         port_map.erase(pm_it->first);     } }   UPDATE: Of course, I then  which I didn't think would be related but answers my question.


When I go into task manager, everything acts normal except for my laptop being slow. But when I select priority, and try to change it, it gives me the massage "An error was encountered by setting priority to the PID 1904. It is likely that you don't have the required privileges," but I am on the admin and original account on this laptop. If anyone know how to fix this, or another task manager that works for stopping task/ apps and setting priorities, it would be greatly appreciated.

Is it possible to set a new nice level of a running process with a known id?  Does this operation require root access, or just being the owner of the process?


There had emerged on the steppes of Inner Eurasia the distinctive types of pastoralism that were to dominate the region’s history for several millennia.   I have questions about the excerpt above:     What is the meaning of "there" in "there had emerged", which tense is that, can I say it in a different way and how?    Why the writer used "were to dominate" not "were dominating"?

What part of speech is there in the sentence “There is a book on the table?”  Also, while typing it out, another question pops up vis-à-vis punctuation. In my complete first sentence above, I ended it with a question mark since my main sentence is a question. The quote is not a question, but it looks like it because of the question mark. Is this the right way to punctuate?


I have a MSc degree in Computer Science from a well known university, but the problem is that my degree is, for example in Computer Graphics. Now I would like to study PhD in computer Science, but related to another topic such as Green Computing.    How I can convince the admission committee or the Professor in charge of the research group that I can be a good student in his group?  One friend told me that one important thing is the motivation letter others about the research proposal (which for me is somewhat not so clear, because for what I know one do a research proposal only when one is inside a group)  Any help will be valuable? I have applied to a lot of PhD positions and the frustration is getting higher with each rejection.

Here is my case, before I studied my master´s degree I managed to write a research paper jointly with a Professor (not from my university) on databases. After that I pursue my master´s degree in CS, but on neural networks rather than databases. The thing is that I would like to do my PhD in databases with the professor I wrote the research paper with. Do you think that I can have problems with the admission committee? I would not like to go to study a PhD without any financial support at all.


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

Show $$\frac{(2n)!}{n!\cdot 2^n}$$ is an integer for $n$ greater than or equal to $0$.   Could anyone please help me with this proving? Thanks!


Is any way to sort out the disciplines of physics where one understands under "finite value" a value that cannot be zero? Is any historical justification for this contradictory terminology?

Infinity, is clearly not . But there is some dissent on whether or not zero is finite. I have seen authors use "finite" to indicate the value of $0$ is excluded as well as infinity.  Is there any rule about this?


I have code that looks something like this (compiling using the Arduino IDE).  main sketch file:  #include "myHeader.h"  //setup stuff here, including setting up Serial & SerialBT  loop(){   CheckForMessages(&Serial);   //Check USB first   CheckForMessages(&SerialBT); //Then check Bluetooth }   myHeader.h:  #include "Arduino.h" //other includes  template <class T> void CheckForMessages(T *port);  //declarations of other stuff   myHeader.cpp:  #include "myHeader.h"  template <class T> void CheckForMessages(T *port){   if(port->available() !=0){     //rest of function... }  //definitions of other stuff   When I compile, I get the "undefined reference" errors for both calls to CheckForMessages in the main sketch file. This goes away if I move the definition of the template into the .h file.  I have no issues splitting the declaration and definition of functions in this way as far as I can tell, can anyone explain to me why it isn't working for my templates?

I have some template code that I would prefer to have stored in a CPP file instead of inline in the header.  I know this can be done as long as you know which template types will be used.  For example:  .h file  class foo { public:     template <typename T>     void do(const T& t); };   .cpp file  template <typename T> void foo::do(const T& t) {     // Do something with t }  template void foo::do<int>(const int&); template void foo::do<std::string>(const std::string&);   Note the last two lines - the foo::do template function is only used with ints and std::strings, so those definitions mean the app will link.  My question is - is this a nasty hack or will this work with other compilers/linkers? I am only using this code with VS2008 at the moment but will be wanting to port to other environments.


I was just getting back into using Blender a few days ago and I must have hit a couple of buttons. But now I cannot get these dashed lines to go away. Does anybody know how I can make them go away?

When I attempt to triangulate a mesh I end up with that dotted yellow bounding box when I mistakenly press Shift+t instead of Ctrl+t.  I cannot get rid of it by using Undo.    From what I can tell, it has something to do with Texture Space but I cannot find anything in the Object Data panel that will remove it once it's there.    So does anyone know how to get rid of this and set things back to how they were before I hit that wrong shortcut?


I understand we cannot state with arbitrary precision the position and momentum of a micro-particle as we superpose infinite waves to create a wave packet at the exact position of the particle and hence cannot say which wave is corresponding to its momentum. This is theoretically said. Also some people say that measurement of one disturbs the other and some say it's reality.  Firstly, the theoretical explanation: why should I consider that a wave out of many superposed will give us the momentum or position? We might use another single wave which is not sine in nature and might get the results. Or why won't a single sine wave suffice? This all considers the micro-particle as wave because of de Broglie.  Secondly, the practical thing seems legit.  Thirdly, the electron must have some kinetic energy and position. It is who we are measuring and can't get it exact so why blame the electron as in theoretical concept. How we quantify the uncertainty, it must depend on the measuring device and various other factors.  I might need to edit this post based on your answer so that I can explain more clearly my thinking.  Edit: From here is what gets the measurement problem:        Text: Imagine that you're blind and over time you've developed a technique for determining how far away an object is by throwing a medicine ball at it. If you throw your medicine ball at a nearby stool, the ball will return quickly, and you'll know that it's close. If you throw the ball at something across the street from you, it'll take longer to return, and you'll know that the object is far away.   The problem is that when you throw a ball -- especially a heavy one like a medicine ball -- at something like a stool, the ball will knock the stool across the room and may even have enough momentum to bounce back. You can say where the stool was, but not where it is now. What's more, you could calculate the velocity of the stool after you hit it with the ball, but you have no idea what its velocity was before you hit it.   This is the problem revealed by Heisenberg's Uncertainty Principle. To know the velocity of a quark we must measure it, and to measure it, we are forced to affect it. The same goes for observing an object's position. Uncertainty about an object's position and velocity makes it difficult for a physicist to determine much about the object.   Edit: After seeing this answer one of my doubts is very well cleared, the other answers are also written and helpful:        Text: There is a definine velocity and momentum, we just don't know it.   Nope. There is no definite velocity--this was the older interpretation. The particle has all (possible) velocities at once;it is in a wavefunction, a superposition of all of these states. This can actually be verified by stuff like the double-slit experiment with one photon--we cannot explain single-photon-fringes unless we accept the fact that the photon is in "both slits at once".So, it's not a knowledge limit. The particle really has no definite position/whatever.

From what I understand, the  states that there is a fundamental natural limit to how accurately we can measure velocity and momentum at the same time. It's not a limit on equipment but just a natural phenomenon.  However, isn't this just an observational limit? There is a definite velocity and momentum, we just don't know it. As in, we can only know so much about the universe, but the universe still has definite characteristics.  Considering this, how do a wide range of quantum mechanical phenomena work? For example, quantum tunneling - its based on the fact that the position of the object is indefinite. But the position is definite, we just don't know it definitely. Or the famous light slot experiment? The creation of more light slots due to uncertainty of the photon's positions?  What I am basically asking is why is a limit on the observer, affecting the phenomenon he is observing? Isn't that equivalent to saying  because we haven't seen Star X, it doesn't exist? It's limiting the definition of the universe to the limits of our observation!


This was a movie I saw as a young child, which means it was probably made in the 80's or earlier, though conceivably it could have been early 90's.  It was animated, but I don't recall if it was Japanese or Western.  The scene I remember most clearly is a young man coming to a house where an older man and woman live; I believe it was a son coming home to his parents.  However, he now serves some sort of monstrous big-bad and has magical powers.  I remember he made flowers grow out of his father's hair and one grow out of his nose.  His mother brushes away the flowers from the hair but not the one on the nose.  Later, the big bad has some evil scheme going on that turns humans into these nondescript block people that look like they are crude stone carvings of people.  They all start marching together, and you can tell that one of them is the boy's father because it still has a flower coming out of its nose.  I also remember a scene where the block people are climbing on each others' shoulders to make a big tower, and I think the main badguy is inside.  The badguy himself is some sort of ghost or monster - I don't remember specifically, but I'm pretty sure he was non-human.  There might have been a unicorn as a major character in this story, but I may be confusing it with a different movie.  Does anyone know what show I'm talking about?

In the late 80s or early 90s I remember watching an animated series that followed a young unicorn and a demon.   In one episode the unicorn gave the demon his horn, and the unicorn almost died.   In another episode there was a man who was able to turn people into human shaped building blocks and built a huge tower from them.   Those are the two scenes I remember with any clarity.   Does anyone have any idea?


I have a MacBook Pro 2015 model (A1052). About two days ago, the keyboard and trackpad went completely unresponsive. On the trackpad, the force touch seems to be active but the cursor does not move. I am not able to reset the NVRAM or the SMC since the keyboard is unresponsive. After a bit of searching, I saw that many have recommended replacing the small cable that connects the trackpad and the keyboard. I got a new one and tried that as well but still no joy! Apart from taking it to the service center any other ideas?

Recently the keyboard and trackpad on my 2015 13" MacBook Pro have stopped working. This is the second laptop to do this, the same issue happened about 6 months ago and Apple gave me a new one when they could not figure it out.  The issue usually starts with force touch not working then progresses to the keyboard and trackpad not being recognized at all. Currently the power button works and force touch works but all other keys and the trackpad don't work.  When this happens there are a lot of errors in the console regarding the AppleHSSPIController.  4/21/16 6:56:47.000 AM  kernel[0]   Error: AppleHSSPIDevice::start failed to get device descriptor 4/21/16 6:56:47.000 AM  kernel[0]   Error: AppleHSSPIController::_enumerateDevice Start failed 4/21/16 6:56:47.000 AM  kernel[0]   Error: AppleHSSPIController::_handleEnumerationFailureGated Giving up on device   You can see the full log here:


I have an Electric Bike with rear brakes which are not as strong as front disc brake (countless amount of tweaks never solved it well without rubbing the wheel too much). So, I am looking at converting to disc brakes  Is it possible? Using which products? I was thinking of a start with those two:   And since I cant post more than 2 links, search on AliExpress for "brand new hs1 brake rotors" - the one from "Store:Carbon-Bicycle Co.,Ltd" for 9$ is the one that was recommended.  But I lost contact with the guy who guided me to those once in a train, so I don't know how to proceed what else do I need...  The frame is made of aluminium, and below you can see pictures of the read wheel, to understand the construction and my options...        Note: The question referred to:   Deals with question on how to piece together parts for the specific branded Doberman frame, while in my case, I am not entirely sure which parts do I need, and my frame is Chinese generic no-brand frame, making it much more difficult to find the correct parts that would fit together well.

I have a leader doberman with a front disc brake that I want to install on the rear. I know that it hasn't a rear disc brake tab, but I have found an adaptor for the caliper ()    Now I don't know how to mount the rotor, but I have found something to mount it ().    But is this compatible with my rear hub? What can I do? Only to stich it with glue or there is a solution?   I have the classic Shimano gear levers. Will I have to change the shifters to install hydro disc brakes?


I have to find the power series of $$\frac{1}{1+x^{2}}$$ centered at $a=1$. So, I tried to write it as $$\frac{1}{1-(-(x-1)^{2})}$$ to sue the fact that $$\frac{1}{1-x}=\sum_{n=0}^{\infty} x^{n}$$ Since $1-(-(x-1)^{2})=1+x^{2}-2x+1$, then what I did next was: $$\frac{1}{1+x^{2}}=\frac{1}{1+x^{2}-2x+1+2x-1}=\frac{1}{1+(x-1)^{2}+2x-1}=\frac{1}{2x+(x-1)^{2}}$$ My question is: what am I supposed to do after this? I also thought about doing something like: $$\frac{1}{1+x^{2}}=\frac{1}{1+x^{2}-2x+1+2x-1}=\frac{1}{1+(x-1)^{2}+2x-1}=\frac{1}{(1+(x-1)^{2})+(2x-1)}$$ and then, using partial fractions, try to finish it.

I'm trying to solve a question where I need to write $\frac {1}{1+z^2} $ as a power series centered at $z_0=1$  I'm not allowed to use taylor expansion. So my first thought was to rewrite the function in a form where I can apply the basic identity:  $$ \frac{1}{1-x} = \sum_{n=0}^\infty x^n $$  So let's rewrite the original function $f(z) = \frac {1}{1+z^2} $ and use above identity:  $$\frac {1}{1+z^2} = \frac {1}{1-(-z^2)} $$ But observe that I need to center it at $z_0=1$ so I rewrote it to:  $$\frac {1}{1-(-z^2)}=\frac {1}{2z-(-(z-1)^2)} $$  I can factor out $\frac {1}{2z}$ and use the basic identity to get : $$\frac {1}{2z}\frac {1}{1-\frac{(z-1)^2}{2z}} = \frac {1}{2z}\sum_{n=0}^\infty \left(\frac{-(z-1)^2}{2z}\right)^n =\frac {1}{2z}\sum_{n=0}^\infty \frac{(-1)^n(z-1)^{2n}}{(2z)^n} = \sum_{n=0}^\infty \frac{(-1)^n(z-1)^{2n}}{(2z)^{n+1}}$$  The problem is if I ask wolfram alpha: power series$ \frac{1}{1+z^2} $centered at z = 1 it will give me a different answer that doesn't match the sum I found.  Can anyone help me figure this one out? What am I doing wrong?


How can I change profile for terminator or terminal without touching the mouse?   in terminal alt-t will allow me to get to menu to change profile echo -en "\033]0;$*\a"   will allow me to set title from terminal   I'd like to have aliases called "red", "green" etc that allow me to easily change terminal profile so I can more easily distinguish between the many terminals on which I'm doing work.  Does anyone know how to change profile via an echo or keybinding.  It doesn't look like it is supported.  Thanks

I created a new profile for gnome-terminal and I can switch between "Implicit" profile and the new created profile as you can see in the below image:  Now I wonder how can I switch between profiles using a command-line/script or maybe using a shortcut for this.  Note: Solutions like: gnome-terminal --tab-with-profile=Implicit && exit   are excluded because I prefer not to close and open another terminal or get another terminal window in this process of changing the profile.


i have two tables tourist(touristid,touristname,city), bookings(bookingid,touristid,bookingamount)  i need the touristid,touristname,city of tourist who have paid the maximum amount in a single booking

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


Didn't see this in any of the errata:    Problem 1-8(b): Suppose $T$ is a linear transformation. If there is a basis $x_1, \dotsc, x_n$ of $\mathbb{R}^n$ and numbers $\lambda_1, \dotsc, \lambda_n$ such that $Tx_i = \lambda_i x_i$, prove that $T$ is angle preserving if and only if all $|\lambda_i|$ are equal.    Counterexample: the linear transformation taking $(0,1)$ to itself and $(1,1)$ to $-(1,1)$ does not preserve the angles between those two vectors, although it is diagonalizable with all eigenvalues of norm $1$.  Did Spivak perhaps mean to require that the $x_i$ be an orthogonal basis?

This an exercise out of Spivak's "Calculus on Manifolds".  Edit:  There was a typo in the exercise as is noted below in the answers.  The statement has been edited to reflect this.  Given $x,y\in\mathbb{R}^{n}$, the angle between $x$ and $y$ is defined by  $$\angle(x,y) = \arccos\left(\frac{\langle x,y \rangle}{|x|\cdot |y|}\right),$$ where $\langle x,y \rangle$ denotes the standard Euclidean inner product.  A linear operator $T:\mathbb{R}^{n}\to\mathbb{R}^{n}$ is said to be angle-preserving if $\angle(T(x),T(y)) = \angle(x,y)$ for every $x,y\in\mathbb{R}^{n}$.  The exercise as stated:  Let $\{x_{1},\dots, x_{n}\}$ be a basis for $\mathbb{R}^{n}$.  Then suppose that $\lambda_{1}, \dots, \lambda_{n}\in \mathbb{R}$ are such that $Tx_{j} = \lambda_{j}x_{j}$ for each $j = 1,\dots, n$.  Then $T$ is angle-preserving only if (not if and only if!)$|\lambda_{i}| = |\lambda_{j}|$ for every $1\leq i\leq j\leq n$.  I'm having problems with the $(\Rightarrow)$ direction.  My best attempt (which seems to lead nowhere) is to suppose that $|\lambda_{j}|\neq |\lambda_{k}|$.  Then by assumption, \begin{align*} \angle(Tx_{j},Tx_{k}) & = \arccos\left(\frac{\langle Tx_{j},Tx_{k} \rangle}{|Tx_{j}|\cdot |Tx_{k}|}\right)\\ & = \arccos\left(\frac{\langle \lambda_{j}{x_{j}},\lambda_{k}{x_{k}} \rangle}{|\lambda_{j}{x_{j}}|\cdot |\lambda_{k}{x_{k}}|}\right)\\ & = \arccos\left(\frac{\lambda_{j}\lambda_{k}\langle {x_{j}},{x_{k}} \rangle}{|\lambda_{j}|\cdot|\lambda_{k}|\cdot|{x_{j}}|\cdot |{x_{k}}|}\right)\\ & = \arccos\left(\text{sign}(\lambda_{j})\text{sign}(\lambda_{k})\frac{\langle {x_{j}},{x_{k}} \rangle }{|{x_{j}}|\cdot |{x_{k}}|}\right)\\ \end{align*} may also be calculated as \begin{align*} \angle(Tx_{j},Tx_{k}) & =  \angle(x_{j},x_{k})\\ & = \arccos\left(\frac{\langle x_{j},x_{k} \rangle}{|x_{j}|\cdot |x_{k}|}\right). \end{align*}  Then since $\arccos$ is injective, I believe I can make the jump that $\text{sign}(\lambda_{j})\text{sign}(\lambda_{k}) = 1$, which does not resemble the conclusion that I should arrive at.  Note:  I wasn't sure what tag to put this under, so anyone who knows better please feel free to adjust.  Thanks for any help you can give.


I am trying to see how to get from $\sqrt{1-x}$ to the power series $\displaystyle\sum_{m=0}^\infty\frac{-1}{2m-1}\,{2m \choose m}\,\frac{x^m}{4^m}$, ideally using the generalized binomial theorem.  I see that the Taylor expansion evaluated at $0$ is,  $f(x)=(1-x)^{1/2}$; $f(0)=1$; and the first coefficient of the power series is $1$.  $f^1(x)= - \frac{1}{2}(1-x)^{-1/2}$; $f^1(0)=-1/2$; and the second coefficient, $-\frac{x}{2}$.  $f^2(x) = -\frac{1}{4}(1-x)^{-3/2}$; $f^2(0)=-1/4$; and the third coefficient, $-\frac{x^2}{8}$.  $f^3(x)=-\frac{3}{8}(1-x)^{-5/2}$; $f^3(0)=-3/8$; and the fourth coefficient, $-\frac{3\cdot x^3}{8\cdot3!}=-\frac{x^3}{16}$.  It is also likely that ${2m\choose m}=\frac{2m!}{m!m!}$ may be part of the derivation, but I don't see a straightforward link.

How do you prove that $\sum\limits_{n=0}^{\infty}{2n \choose n}x^n=(1-4x)^{-1/2}$? I tried to identify the sum as a binomial series, but the $4$ and the $-1/2$ puzzle me. (This series arises in studying the first passage time of a simple random walk.)


I'm using Ubuntu 14.04 and 2 or 3 months ago the system was updating but the internet went down then the system couldn't update correctly, since then I'm facing this error:    Package operation failed, The installation or removal of a software package failed.   I was trying to install vuze torrent package from the Ubuntu Software-Center, but failed according to the preivous error.

When I try to download some software from Ubuntu center or from Synaptic, I get package operation failed...    How to fix this?  edit:  I tried to install this game:    This is the details from the installation:  installArchives() failed: Selecting previously deselected package libbulletml0d2. (Reading database ... 100% (Reading database ... 239257 files and directories currently installed.) Unpacking libbulletml0d2 (from .../libbulletml0d2_0.0.6-4_i386.deb) ... Selecting previously deselected package tumiki-fighters-data. Unpacking tumiki-fighters-data (from .../tumiki-fighters-data_0.2.dfsg1-4_all.deb) ... Selecting previously deselected package tumiki-fighters. Unpacking tumiki-fighters (from .../tumiki-fighters_0.2.dfsg1-4_i386.deb) ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for python-gmenu ... Rebuilding /usr/share/applications/desktop.en_US.UTF8.cache... Processing triggers for menu ... Processing triggers for man-db ... Processing triggers for python-support ... Setting up plymouth-theme-mib-ubuntu (0.5.0-2) ... update-alternatives: error: alternative path /lib/plymouth/themes/MIB-Ubuntu/MIB-Ubuntu.plymouth doesn't exist. dpkg: error processing plymouth-theme-mib-ubuntu (--configure):  subprocess installed post-installation script returned error exit status 2 Setting up libbulletml0d2 (0.0.6-4) ... Setting up tumiki-fighters-data (0.2.dfsg1-4) ... Setting up tumiki-fighters (0.2.dfsg1-4) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place Processing triggers for menu ... Errors were encountered while processing:  plymouth-theme-mib-ubuntu Setting up plymouth-theme-mib-ubuntu (0.5.0-2) ... update-alternatives: error: alternative path /lib/plymouth/themes/MIB-Ubuntu/MIB-Ubuntu.plymouth doesn't exist. dpkg: error processing plymouth-theme-mib-ubuntu (--configure):  subprocess installed post-installation script returned error exit status 2


We are working with the following question for an exercise:   We got the definition: A subset $K$ in a metric space $(M,d)$ is called precompact if for every $\epsilon > 0$ there exist finitely many points $x_1, \dots , x_p \in K$ such that $K \subset B_\epsilon(x_1) \cup \dots \cup B_\epsilon(x_p)$.  We then have to show that a subset $K \subset\Bbb R^n$ in the space $\Bbb R^n$ (with Euclidean metric) is precompact if and only if it is bounded.

I'm trying to show that any subset bounded of $\Bbb{R}^k$ is totally bounded.  Here is what I did:   (1)A subset of a totally bounded Set is bounded:  Proof: Let $X$ be a totally bounded subset and $Y\subset X$ then there exists an $\epsilon /2$-net $\{x_1,x_2,..,x_n\}$ and $X\subset \displaystyle\bigcup_{i=1}^n B(x_i,\epsilon/2)$ . Let $\{x_1,x_2,..,x_m\}$ be the points whose balls contain $Y$ $(m\le n)$. Now $\forall i \in \{1,..,m\} \exists q_i \in A \cap B(x_i,\epsilon/2) $ and $B(x_i,\epsilon/2)\subset B(q_i,\epsilon)$. We have for every $x\in B(x_i,\epsilon/2)$ $$ d(x,q_i)\le d(x,x_i)+d(x_i,q_i) < \frac \epsilon 2 + \frac \epsilon 2 =\epsilon$$  Hence $Y \subset \displaystyle\bigcup_{i=1}^m B(x_i,\epsilon/2) \subset \bigcup_{i=1}^m B(q_i,\epsilon)$ and $q_i \in Y$ for all $i$ hence $Y$ is totally bounded  Back to the problem:  Let $A \subset \Bbb{R}^k$ be a bounded set  then $A \subset B(0,R)$ for some $R$ then $A \subset [-R,R] \times [-R,R] \times ...\times [-R,R] $ then $A$ is a subset of a compact set by the Heine-Borel Theorem which is also a totally bounded set, hence by (1) $A$ is totally bounded.  I'm trying to do this problem by only using (1) without invoking the Heine-Borel theorem, can anyone tell me how that can be done? (Is the proof of (1) right for that matter?)


If you want to compare two learning algorithms, which metric is better to use in general: ROC or accuracy? I understand that in ROC, you get both the sensitivity and specificity?

What is the advantages of the ROC curves?  For example I am classifying some images which is a binary classification problem. I extracted about 500 features and applied a features selection algorithm to select a set of features then I applied SVM for classification. In this case how can I get a ROC curve? Should I change the threshold values of my feature selection algorithm and get sensitivty and specificity of the output to draw a ROC curve?  In my case what is the purpose of creating a ROC curve?


just found out how to write and read to a csv file. It's very helpful, but im having some trouble with it.  I noticed that when I scroll down in the csv file, it creates new lines, which then messes up when I want to append data to the csv file (it shows up at the bottom of a bunch of empty lines).  So what I plan on doing is:  Going down the document until it finds an empty row and get that line number with the line_num  reader object. So then I would just need to be able to write to a specific line. Is that possible?   I have been using this webpage as a guide.

I'm using Python, and would like to insert a string into a text file without deleting or copying the file. How can I do that?


I have a poem with an unknown number of rows and I want to display only the penultimate one. What command should I use?

I have a client that updates/writes into myfile.csv arbitrarily.  I've written the following code, I left the MySQL snippet out:  while true do   awk_variables_value_array=`tail -n2 myfile.csv | awk -F, '$7 == "status" {print $4, $5, $10 }'`   var1=${awk_variables_value_array[0]}   var2=${awk_variables_value_array[1]}   var3=${awk_variables_value_array[2]}    if[ "var3" -gt "0" ]   --MYSQL SNIPPET IS--   fi done  Q: tail -n2 reads the last 2 lines, how can I change it is so it's the second last line  the file:  where n is the last line of the file  line 1 line 2 line 3 line 4 .... line n-2 line n-1 line n  current output yields:  line n-1 line n   I would like it so that the output is:  line n-1