I recently asked a  on security.stackexchange.com. The question was related to XSS so in my opinion it belonged to the security website.  There was a comment on the question saying that a similar question exists on SO and my question was a duplicate (I think he gave it a down vote). The guy was right but the question was asked on another website (SO). There may be a case when person asking a question might not have an account with the other website.  Is it a good practice to mark questions duplicate if you have seen a similar question on some other website?

What's the right course of action for cross-site duplicates?  There are two flavors:   A question is posted which belongs on another site and ends up already having been asked there. I can't find an example right now, but it's bound to happen soon if it hasn't already. The same question is posted in two places at the same time. Take  for example, which is a duplicate of , posted within a half hour of each other by the same user.   Possible actions:   Move it to the proper site and close it once it gets there as a duplicate. Provide a way to close it right away as a cross-site duplicate, without moving it first. Flag it and let a moderator merge them. Close it as "no longer relevant" or something else.   Additionally, flavor 2 is a bit of a special case; perhaps the question really spans both sites in terms of content and intended audience. Should multiple-postings in this case be allowed? If so, should they somehow be linked to each other? If not, how do we avoid a migration war?


Static scenes are simple in HDr, but can we use it for scenes that contain moving water? (e.g. waterfall)

How do I take great HDR photos of moving objects? By moving objects, I mean cities with cars, ocean with moving water, malls with people moving by.  I tried it on moving people and had noticeable ghosting, using bracketed shots at + and - 2ev.  What's the basic technique on getting sharp looking HDR photos in areas that are moving? I'm assuming it's not bracketed shots but a single shot with exposure editing?


Which of the two sentences below is correct?   (i) Three hours is a long time. (ii) Three hours are a long time.

Time, distance, weight are treated as singular, like "3 hours is too long." Then, in this instance,      How many hours of sleep is /are needed to keep fit?"    Is "is" correct?


I like gaining the golden cards that you earn from leveling up you heroes. I find that the closer I get to obtaining the next gold card, the more I want to just get that card rather than just playing against other players.  My understanding is that you earn by playing cards, destroying enemy minions, and winning games. You get less by playing in solo content, but you can more easily win the game and you can also play specifically to win fast or play all of your cards.  What I have been doing lately is play against Razorgore in Normal mode. I will play through my entire hand. He spawns new minions each turn so I have plenty to destroy and its pretty easy so I win unless I do something stupid or get a terrible opening hand.  Does anyone have any other ideas that they use to level up their heroes?  The "duplicate" question does indeed ask the same basic thing, however that was asked over 1 year ago. Hearthstone has added 2 adventure modes that were not taken into consideration at the time of that question. It is possible that it's answer is still correct, but no one has shown that to be true just used anecdotal evidence.

I've two heros to level 10, and now I got a daily quest that is specific to two classes that I still have at level 1. Winning with those with a basic deck lacking any of the cards you gain on the way to level 10 looks very unlikely. I've played reasonably successful with my mage, so my opponents now are a bit too strong for a level 1 basic deck.  Levelling with practice games against the regular AI is tediously slow and boring. But playing casual or ranked games seems mostly suicide without it, though it might be an option if the XP gain even when defeated would be higher than in practice. Or should I play against the expert AI?  Which is the fastest way to level up my heros to 10 so that I can properly use them with all the basic cards?


We are working on generics which requires us to have an array of AnyType (the driver implements an array of strings then integers). One of the functions is a boolean function called 'remove' which finds 'x' and removes it, then it returns true. It has no issues finding and removing a string but can't seem to find ints. Why is this?  the code is  public boolean remove(AnyType x) {     for(int i = 0; i < length; i++)     {         if(arr[i] == x)         {             for(int j = i; j < length - 1; j++)             {                 arr[j] = arr[j + 1];             }             length--;             return true;         }     }     return false; }

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


$$f(x) f(y) = f(x + y) + xy$$  I found by substitution that $f(0)=1$, and that either $f(1)$ or $f(-1)$ or both are equal to zero. I tried to do casework on the $f(1)$ and $f(-1)$, but don't know how to find every solution for $f$. Hints? Any way to prove that a solution is the only one?

Find all functions $f : \Bbb R \to \Bbb R$ which satisfy $f(x)f(y) = f(x + y) + xy$ for all  $x, y \in \Bbb R$.


Which is correct: "Drs. Ha and Smith's comments" or "Drs. Ha's and Smith's comments" (referring to the comments of both drs.)

Which option is grammatical?        There will be readings from Nikki Giovanni’s and Alice Walker’s writings.   There will be readings from Nikki Giovanni and Alice Walker's writings.      Saying it out loud the latter sounds right, but looking at it the former looks better.


I'm using Ubuntu 13.10. I have installed Vidalia and Tor Browser but when I click on vidalia nothing happens.No Icon in the tray nor any Firefox pop up.  However, vidalia appears to be running (shown in the System Monitor).  I have downloaded Tor Browser Bundle and extracted it then ran the start-tor-browser file but nothing happens. What am I missing?  .

I have recently updated to 13.10 from 13.04 and noticed a compatibility issue between the new Ibus and the Tor Browser.  Basically, the Tor Browser does not accept any keyboard inputs, while all other programs do. I tested this with the 64 bit versions 2.3.25-11 and 2.3.25-13 and the 32 bit version 2.3.25-13.  According to this thread, quitting ibus "fixes" the problem:    Any ideas on how to fix this?


This will be an odd question, but... In the name , what is the meaning of word integral? Does it refer to integral such as adjective for noun integer? Or does it instead refer to noun integrity?  The reason I am asking... In Czech language this is translated (when I would translate it back literally) as a "Domain of integrity" ("" for czechs here). But I suspect the original meaning was perhaps intended to refer to integers, instead of integrity? Just wondering if the translation is perhaps inaccurate...  As pointed out in comments, this question might have answer to this , I just don't see what the answer is (it seems both the terms are referred there...)

Self-explanatory title really! A student today asked me why they were called integral domains -- and I realised that the word "integral" seems to be being used in a way totally unlike any other way I hear it used in mathematics. The student suggested that "integral" was used because the integers were an example -- but I didn't buy this because by that logic they could have been called "rational domains" or "real domains".  Any ideas anyone?


I've looking round the internet for a solution to this and everyone is talking about different things or just saying does size="x" help? I've made a Plunk to illustrate my issue. On my screen I can see up to item 20 when I click the drop down. I'd like to be able to set this to show more, or at least have some control.

Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box.   The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either.


It seems it is possible to compare two delegates in C# for equality, but I cannot figure out if one can compare two variables of type Func<>  Func<Task<Foo>> a = () => _service.GetFoo(); Func<Task<Foo>> b = () => _service.GetFoo();   Is it possible to do some comparison of these?  P.S. I need this for unit testing, I do pass a delegate like that to another method and I'd like to test that this is what is being passed (not _service.GetBar() that is). I have now solved this by calling the delegate and comparing the result, but I'd rather compare it directly if it is possible.  P.P.S. This is not duplicate even though people made it look like that. The other question is about expressions and it's a completely special thing in C# that is not an ordinary delegate.

Given a method signature:  public bool AreTheSame<T>(Expression<Func<T, object>> exp1, Expression<Func<T, object>> exp2)   What would be the most efficient way to say if the two expressions are the same? This only needs to work for simple expressions, by this I mean all that would be "supported" would be simple MemberExpressions, eg c => c.ID.  An example call might be:  AreTheSame<User>(u1 => u1.ID, u2 => u2.ID); --> would return true


The set of all n×n matrices having trace equal to zero is a subspace W of $M_{n\times n}(F)$ . Find a basis for W. What is the dimension of W?. A good hint would be helpful, thanks.

I am trying to find a basis for the set of all $n \times n$ matrices with trace $0$.  I know that part of that basis will be matrices with $1$ in only one entry and $0$ for all others for entries outside the diagonal, as they are not relevant.  I don't understand though how to generalize for the entries on the diagonal.  Maybe just one matrix with $1$ in the $(1, 1)$ position and a $-1$ in all other $n - 1$ positions?


I don't have enough space left in /var/cache/apt/archives, thus not able to install "gparted" so that I can increase Actual Size of Ubuntu vdi file. I have already increased the Virtual Size to 100 gig. But to make the Actual size to get increased as per Virtual size I need to perform partition on Ubuntu. Below are the details which can be helpful for you. Also let me know if there is any other way to perform the partition so that Actual size can be increased.  OS Inside my VM: Ubuntu 16.04 LTS VM Box: Version 5.2.8 r121009 (Qt5.6.2) Host: Windows 10

I am in the process of cleaning up my system. And I see a lot of space occupied by this folder /var/cache/apt/archives (1.5GB). Is it absolutely necessary to keep all these archives?


I applied poisson regresson on count data. In the model summary I got NULL deviance and residual deviance. I understood that residual deviance is the part which accounts for what is not explained by the model. But I am still not sure of significance of NULL deviance.

How to interpret the Null and Residual Deviance in GLM in R? Like, we say that smaller AIC is better. Is there any similar and quick interpretation for the deviances also?  Null deviance: 1146.1  on 1077  degrees of freedom Residual deviance:  4589.4  on 1099  degrees of freedom AIC: 11089


I've got a parent class, child class and inside this child class I've defined some struct. Within this struct I'd like to call parent method. Is it possible?  class Parent { public:     int foo(int x); }  class Child : public Parent { public:     struct ChildStruct {         int x;          int bar(int y) {             return GET_CLASS_CHILD->foo(this->x + y);         }     }; }   Is something like this possible in C++? Then how to achieve it?

class Outer {      class Inner {     public:         Inner() {}         void func() ;     };  private:     static const char* const MYCONST;     int var; };  void Outer::Inner::func() {     var = 1; }  const char* const Outer::MYCONST = "myconst";   This errors out when I compile with class Outer::Inner' has no member named `var'


All variable are $\in \mathbb{Z}$. $k$ divides $n$ and $k$ divides $m$ therefore because $k$ is a divisor of $n$ and $m$ it must be also a divisor for the greatest common divisor of $n$ and $m$. Assume there is no number $w\in \mathbb{Z}$ such that $kw$ = gcd$(n,m):=z$ then there would be a contradiction since there exists $n',n'',m',m''$ such that $n+m = k(n'+m') = z(n''+m'') \Rightarrow \frac{k(n'+m')}{k(n'+m')} = \frac{z(n''+m'')}{k(n'+m')} = 1 $   That's my thought process so far, Maybe it's the wrong Approach- Maybe I am in the Right direction if the latter is the case please tell me how I should continue otherwise it would be Kind if you could give me the proof.

Let $S = \{ax + by: x,y \in \mathbb{Z}\}$  and let $e > 0$ be the smallest element in $S$. Prove that $e \mid a$, and hence prove that $e = \gcd(a,b)$  I'm afraid I can't provide much of my initial working here because I'm at a loss of how to start.  I suppose that to show $e\mid a$ I would have to show that $eg = a$ for some $g \in \mathbb{Z}$. But I have no idea how I would do this.


The debugfs manpage gives the impression that the command 'rdump . .' will recursively copy all files found on the specified filesystem from the debugfs cwd to the native filesystem's cwd. Instead I seem to receive a syntax error, and no copy is initiated?  These are the commands I run:  cd /path/to/transfer/destination debugfs /dev/sda1 -R rdump . .   My task is to copy the entire contents of a clean yet unmountable USB storage device to its host machine's HD. The host machine does not support the inode size used by the USB device's filesystem (256) and its software is not upgradeable, so my intention was to use debugfs to transfer the files. If anyone has any other suggestions for this task I'd be grateful.

I have ext3 filesystem mounted with default options. On it I have some ~ 100GB files.  Removal of any of such files takes long time (8 minutes) and causes a lot of io traffic, which increases load on server.  Is there any way to make the rm not as disruptive?


Suppose I'm asked to solve for $\cos\theta=−0.5$, for $\theta$ between $0^\circ$ and $360^\circ$ inclusive. I am told that the first step would be to buy the basic angle, $\alpha$. The way I am told to do this is by omitting the negative sign from -0.5 and hence finding sine inverse of 0.5 to get $60^\circ$. I understand the next steps of identifying the quadrant $\theta$ lies in etc: what I don't understand is why I need to omit the negative sign when finding the basic angle.

Suppose I'm asked to solve for $\cos \theta = -0.5$, for $\theta$ between $0^\circ$ and $360^\circ$ inclusive.  I am told that the first step would be to buy the basic angle, $\alpha$. The way I am told to do this is by omitting the negative sign from -0.5 and hence finding sine inverse of 0.5 to get $60^\circ$. I understand the next steps of identifying the quadrant $\theta$ lies in etc: what I don't understand is why I need to omit the negative sign when finding the basic angle. I know the basic angle itself is acute and positive but why must the trigonometric function of the angle be positive for me to find the basic angle too?


I have a list new_l_2 = [['0', '0', '10'], ['0', '2', '30'], ['1', '1', '20']] and a list of lists matrix = [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]] and when I execute for i in new_l_2:     matrix[int(i[0])][int(i[1])] = i[2]  I get [['10', '20', '30'], ['10', '20', '30'], ['10', '20', '30']] but my wanted output is [[10.0, 0.0, 30.0], [0.0, 20.0, 0.0], [0.0, 0.0, 0.0]] where the first element of the first sublist of new_l_2 is the sublist of matrix wanted and the second element of the first sublist of new_l_2 is the position inside the sublist of matrix in which I put the third element of the first sublist of new_l_2. What am I missing here ? matrix was created via             matrix = []             li = []             for i in range(lignes):                 li.append(0.0)             for i in range(colonnes):                 matrix.append(li)

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I am trying to connect a 15-inch Macbook Pro 2017 to a p3418HW Dell monitor, through a USB-C to HDMI adapter (). The monitor shows: "No HDMI signal from your device". I have tried the following suggestions on the net, with NO result:  resetting SMC resetting NVRAM several times disconnecting and reconnecting power and HDMI cables with different orders  I have also tried the cable, adapter with the same monitor with a 13-inch Macbook Pro 2016 and strangely everything works well!! Any advice is appreciated!

Please, does anyone know whether Macbook (2015) with MacOS Sierra (10.12) is able to drive Dell P2415Q 4K (3840x2160) monitor at 60Hz? What dongles do I need?  I have  which is said to support "UHD (3840 by 2160) at 30Hz". But Apple's  states:     With macOS 10.12 or later, MacBook (2015 and later) and MacBook Pro (2016 and later) support these resolutions and refresh rates over HDMI 1.4b using the USB-C Digital AV Multiport Adapter:         4096x2304 at 48Hz refresh rate   3840x2160 at 60Hz refresh rate (mirroring is not supported at this resolution)         MacBook (2016 and later) and MacBook Pro (2016 and later) support 60Hz refresh rates over HDMI when used with a supported HDMI 2.0 display, an HDMI Premium Certified cable, and a supported USB-C to HDMI 2.0 adapter.   So I'm confused now: would it work somehow? Would it work over HDMI? Would it work over DisplayPort? Is the adapter I have suitable?


I've installed Ubuntu 15.10 Mate edition perfectly fine. I've created a swap, root, home partition and I've used the 100MB partition that Windows create as the efi partition.  Everything seems to work fine, except the moment I boot into windows. For some reason my computer doesn't seem to boot into grub anymore, but straight into Windows.  I've look into my uefi bios to look for the boot order. at first it said Ubuntu, but now it says Windows Boot Manager.  I am clueless at the moment, maybe you guys could help me.

I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).  I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.  How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it...


Are damage boosts capped? Damage resistance is capped at 50%, but I'm wondering if damage boost are capped.  If a player is affected by Orisa's Damage Boost, while being damage boosted by Mercy, while under the effects of Nanoboost, are the effects additive or multiplicative, and would they stack together or not?

Orisa's ultimate is a damage boost to all allied heroes in line of sight. Does this stack at all with other boosts such as Mercy's right click or with Ana's nano-boost or can all 3 stack together?


I have a table from which I want to fetch all the td and pass their values using an AJAX call. Here is what I attempted, but details are coming through blank.  $('#createData > tbody > tr').each(function(i) {   var rowobj = new Object();   var $tds = $(this).find('td'),     Number = $tds.eq(0).val(),     Quantity = $tds.eq(1).val(),     date = $tds.eq(2).val(),     Value = $tds.eq(3).val(),     Containers = $tds.eq(4).val(),     typeOfContainer = $tds.eq(5).val();    rowobj.Number = Number;   rowobj.Quantity = parseFloat(Quantity);   rowobj.Date = eta;   rowobj.alue = parseFloat(Value);   rowobj.noofContainers = parseInt(Containers);   rowobj.containerType = typeOfContainer;   Details.push(rowobj); });

I am trying to work out how to get the value of table cell for each row using jQuery.  My table looks like this:

     Customer Id	     Result

     123

     456

     789

   I basically want to loop through the table, and get the value of the Customer Id column for each row.  In the code below I have worked out that I need to do this to get it looping through each row, but I'm not sure how to get the value of the first cell in the row.  $('#mytable tr').each(function() {     var cutomerId =  }


I have a piece of code that looks something like this:  if(System.getenv(ZOOKEEPER_HOSTS_SYS) == null){     //here I want to do something like:     //System.setenv(ZOOKEEPER_HOSTS_SYS,""); }   Any idea how to set the environment variable like in the comment?   I do not want to launch a new process or anything like that, I want to set it for the current process.  Thanks. Regards,  Serban

How do I set environment variables from Java?  I see that I can do this for subprocesses using . I have several subprocesses to start, though, so I'd rather modify the current process's environment and let the subprocesses inherit it.  There's a System.getenv(String) for getting a single environment variable. I can also get a Map of the complete set of environment variables with System.getenv(). But, calling put() on that Map throws an UnsupportedOperationException -- apparently they mean for the environment to be read only. And, there's no System.setenv().  So, is there any way to set environment variables in the currently running process?  If so, how?  If not, what's the rationale?  (Is it because this is Java and therefore I shouldn't be doing evil nonportable obsolete things like touching my environment?)  And if not, any good suggestions for managing the environment variable changes that I'm going to need to be feeding to several subprocesses?


Say I have 3 commands linked through pipes:  A | B | C   I would like B to output error messages to stderr and some progress to the terminal. If stderr is the same as the terminal, then that is easy: Simply send the progress information to stderr. But what if stderr is redirected?  A | B 2>/tmp/file | C   Then I still want the progress information to go to the terminal, while error messages go to the file.  Can I now somehow identify the terminal that stderr would have ended up on had it not been redirected?  My initial idea would be to find the tty using tty and then opening that and writing to it. However, if I call tty from inside B tty says: not a tty, which I believe is because of the pipe between A and B.  I would like to do this from Perl.

I'd like to send stdout from one process to the stdin of another process, but also to the console. Sending stdout to stdout+stderr, for instance.  For example, I've got git edit aliased to the following:  git status --short | cut -b4- | xargs gvim --remote   I'd like the list of filenames to be sent to the screen as well as to xargs.      So, is there a tee-like utility that'll do this? So that I can do something like:  git status --short | \     cut -b4- | almost-but-not-quite-entirely-unlike-tee | \     xargs gvim --remote


Please help to reach answer for the following problem:     $A∈M_5(R)$ is a matrix and in relation to $A^2-4A-I=0$. if   $a_1,a_2,a_3,a_4,a_5$ is eigenvalues for A; solve the following   problem:       $(a_1-\frac{1}{a_1})+(a_2-\frac{1}{a_2})+⋯+(a_5-\frac{1}{a5})$   Thanks a lot.

$A\in M_5({R})$  and $A^2-4A-I=0$ If $a_1,a_2,a_3,a_4,a_5$ are eigenvalues of $A$ what is value of $$\left(a_1-\dfrac{1}{a_1}\right)+\left(a_2-\dfrac{1}{a_2}\right)+\cdots+\left(a_5-\dfrac{1}{a_5}\right)$$ I tried to work with $A^2-4A-I=0$ but get nothing because $A_{5\times5}$ characteristic polynomial is something like $A^5+k_1A^4+...$ Any hint will be appreciated .


I am creating a 'Troll' like application to use in a YouTube video, and I want a JFrame to jump around the screen every 1/2 second.   Heres my code:  package troll1;  import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Random;  import javax.swing.JFrame; import javax.swing.Timer;  public class troll extends JFrame implements ActionListener{     private static final long serialVersionUID = 1L;      public static void main(String args[]) {         troll w1 = new troll();         w1.setVisible(true);         w1.setSize(500,500);     }      public Random ran;     public int random;     public troll w1;     public Timer t;      public troll() {         Timer t = new Timer(500, this);         t.start();      }      @Override     public void actionPerformed(ActionEvent arg0) {         Random ran = new Random();          for(int counter=1; counter<=1;counter++) {             int random = 1+ran.nextInt(500);             w1.setLocation(random, random);         }      }  }   The problem is, when I run this code, I get a error saying,  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at troll1.troll.actionPerformed(troll.java:37)     at javax.swing.Timer.fireActionPerformed(Unknown Source)     at javax.swing.Timer$DoPostEvent.run(Unknown Source)     at java.awt.event.InvocationEvent.dispatch(Unknown Source)     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)     at java.awt.EventQueue.access$500(Unknown Source)     at java.awt.EventQueue$3.run(Unknown Source)     at java.awt.EventQueue$3.run(Unknown Source)     at java.security.AccessController.doPrivileged(Native Method)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)     at java.awt.EventQueue.dispatchEvent(Unknown Source)     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)   Also, once I get this error gone, I will make it so the JFrame jumps around the entire screen, not just 500,500 and below.

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


I think "a number of vendors are" is the right way, but "MS Word Grammar Check" suggested "a number of vendors is". I need a clarification on this.

Formally, is it correct to write:     A number of questions has been asked here.   or:     A number of questions have been asked here.   As a non-native speaker of English, I would prefer the former: the subject seems to be "number", therefore the verb ought to be singular, I'd say. However, the latter seems more common, and therefore I believe that my gut feeling is just plain wrong — but I would really like to have a definite answer.  Moreover, is it the same for "a myriad of", "a plethora of", and so on?


As of right now (3/17/12 02:24 -07:00)  has a +50 bounty from the OP, but the user has only 22 rep. How is this possible?    BTW, the question itself has 6 downvotes and is flagged "not a real question"

I am not sure if it is correct to post this on the general Meta of StackExchange, but I encountered a strange thing on Security.  There is this  where a user offers a 100 bounty but only has a reputation of 23.  Now according to  this should not be possible as ...     You must have at least 75 reputation to start a bounty, and at least as much reputation as the bounty amount.   which is certainly not true in this case. Is this a bug?


I know that I used to be able to start up Console to see things like what happened due to a system error: you could just fire it up and search for the most recent "boot" and look at the events before that to see what had happened.  Now, however, it seems that my scrollback in Console.app is limited to the moment I started it. That is, I would have to have it running all the time in order to see what's going on on the system, and what I described above (i.e., seeing what's going on around a boot/reboot) is impossible.  Is this now the new behaviour? I admit I hadn't looked at it for a while (probably an OS version or two).  I should mention that I had to restore my machine recently from a Time Machine backup. That's the only notable variable I can think of.

In previous versions of OS X the Console.app had buttons to allow you to see earlier or later in the logs.  In Sierra it seems to only show entries from when you start Console.app.  How do you get Console.app to show earlier entries?  e.g. I want to see the logs before my last reboot to see why it hung.


public IQueryable<DepartmentBreakdownReport> GetDepartmentBreakdownByReviewID(int ClientID, int? ReviewID) {     var x = (from d in camOnlineDb.Details              join h in camOnlineDb.Headers              on new { d.ClientID, d.ClaimID }              equals new { h.ClientID, h.ClaimID }              where h.ClientID == d.ClientID               join sd in camOnlineDb.SuppDepts              on new { a = d.ClientID, b = d.CategoryID ?? 0 }              equals new { a = sd.ClientID, b = sd.CategoryID }               join r in camOnlineDb.Reviews              on new { h.ClientID, h.ReviewID }              equals new { r.ClientID, r.ReviewID }               join rp in camOnlineDb.ReviewPeriods              on new { a = r.ClientID, b = r.ReviewPeriodID ?? 0 }              equals new { a = rp.ClientID, b = rp.ReviewPeriodID }               select new {                  d.ClientID,                  h.ReviewID,                  sd.DepartmentID,                  sd.DepartmentName,                  d.Amount              });      x.GroupBy(r => new { r.DepartmentID, r.ReviewID, r.ClientID })     .Select(g => new {         ClientID = g.Key.ClientID,         ReviewID = g.Key.ReviewID,         Dept = g.Max(d => d.DepartmentName),         Amount = g.Sum(d => d.Amount)     })     .OrderBy(r => r.Dept)     .Where(r => r.ReviewID == 37);     //.Dump();      return x;   I know it has something to do with returning x. I tried returning is asQueryable but this didn't work. How do I get my statement to return x?

Using the simple example below, what is the best way to return results from multiple tables using Linq to SQL?  Say I have two tables:  Dogs:   Name, Age, BreedId Breeds: BreedId, BreedName   I want to return all dogs with their BreedName.  I should get all dogs using something like this with no problems:  public IQueryable<Dog> GetDogs() {     var db = new DogDataContext(ConnectString);     var result = from d in db.Dogs                  join b in db.Breeds on d.BreedId equals b.BreedId                  select d;     return result; }   But if I want dogs with breeds and try this I have problems:  public IQueryable<Dog> GetDogsWithBreedNames() {     var db = new DogDataContext(ConnectString);     var result = from d in db.Dogs                  join b in db.Breeds on d.BreedId equals b.BreedId                  select new                         {                             Name = d.Name,                             BreedName = b.BreedName                         };     return result; }   Now I realize that the compiler won't let me return a set of anonymous types since it's expecting Dogs, but is there a way to return this without having to create a custom type?  Or do I have to create my own class for DogsWithBreedNames and specify that type in the select?  Or is there another easier way?


What's the other terms if adults get kidnap?

As per , the word 'kidnap' originated to denote nabbing away of a child. When and how did kidnap come to denote nabbing of adults?  Update: Just found a link to a  that mentions kidnapping of souls. Now not sure how correct the above link is.


If I have 3 different metrics and I wanted to find an "average" (not necessarily arithmetic mean) of the 3 metrics so that observations can be ranked, what would be the most "statistically sound" method of doing so?  Here's an example with baseball:   I have 3 metrics:    Batting Average (ranges from 0.000 to 0.350) Home Runs (ranges from 0 to 50) RBI (ranges from 0 to 120)   And I want to equally weight each metric and take some sort of average so that I can rank different players, with the best players being great in all 3 metrics.  If I wanted to "average" the metrics so that each metric has equal weight, I could:   Standardize each metric so they're all on the same scale and calculate the arithmetic mean Calculate the geometric mean Calculate the harmonic mean   Is 1 of these methods more/less "statistically sound" than the others, in terms of not violating any assumptions or anything of the like?

I have four numeric variables. All of them are measures of soil quality. Higher the variable, higher the quality. The range for all of them is different:  Var1 from 1 to 10  Var2 from 1000 to 2000  Var3 from 150 to 300  Var4 from 0 to 5  I need to combine four variables into single soil quality score which will successfully rank order.  My idea is very simple. Standardize all four variables, sum them up and whatever you get is the score which should rank-order. Do you see any problem with applying this approach. Is there any other (better) approach that you would recommend?  Thanks  Edit:  Thanks guys. A lot of discussion went into "domain expertise"... Agriculture stuff... Whereas I expected more stats-talk. In terms of technique that I will be using... It will probably be simple z-score summation + logistic regression as an experiment. Because vast majority of samples has poor quality 90% I'm going to combine 3 quality categories into one and basically have binary problem (somequality vs no-quality). I kill two birds with one stone. I increase my sample in terms of event rate and I make a use of experts by getting them to clasify my samples. Expert classified samples will then be used to fit log-reg model to maximize level of concordance / discordance with the experts.... How does that sound to you?


I am able to change the float to right and left and the effect apply but when i put in center it does not go there. I am trying to align the container to the center, Not sure when i am going wrong here. I am new to HTML and CSS and the enviorment i am running is sharepoint    .footer { clear:both; font-family: 'McLaren', cursive; background-color:black; text-align:center; height:50px; padding-top: 10px; box-sizing: border-box; }  .Book {   float:right;   position:relative;   width: 20%;   padding:0px;   height:40px;   text-align:center; }

How can I horizontally center a
 within another
 using CSS?

Foo foo


I have 320GB HDD messed with Ububtu 10.04 and Windows Developers preview. I formated Windows partition and deleted the Linux boot folder from the disk, I thought it may help me to install newer version of Linux because my Windows installation was messed up with a problem and I can't install Windows on Linux .  Now I get a grub rescue terminal and after searching a lot I got someway out but there was another a problem when I insert the windows 7 disc. It does not give anything just a paused Starting Windows screen.  I tried the Ubuntu Live CD but same problem occurred so I starting to mess with GRUB rescue terminal when I ran the commands:  set root=(hd0,12) set prefix=(hd0,12)/boot/grub insmod /boot/grub/linux.mod   I got the message file not found  How would I fix this problem?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


Any CSGO items drops you can get after level 21 or prime status? What can you get? Are stickers drops possible?

Just curious as to how to obtain item drops from the last update.  To clarify, item drops as in weapon skins, crates, anything else Valve added without letting us know, etc.  It seems that after playing a bit, I've gotten no drops, but I've seen players who've gotten drops after a few short minutes of gameplay, but I've been playing for hours.  Is the item drop system like TF2, where you can just idle, get an item drop, come back? Is it like Dota2, where you have to be in the matchmaking system and complete matches for the chance to get drops? Or do you have to be MvP to get item drops? Is it a certain time you play the game?   Also, are weapon and crate drops independent or dependent on each other? Meaning, is the drop counter shared between Weapons and Crates, or are they both separate drop counters?


A friend of mine is traveling from Iran to Vienna, he has got a Visa for 6 months. We were able to find flights as cheap as $130.15 with Aegean Airlines. ( We have never heard of such an airline before )   Anyways, there is a layover of an hour in Athens. Does he need to get a transit Visa?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


Find all functions $f: \mathbb{R} \rightarrow \mathbb {R}$ such that $f(x+y)+f(x-y)=2f(x)\cos y$(*) for any x,y real numbers  my attempts: for $x=y=\frac{2\pi}{3}$ in the (*): $f(\frac{2\pi}{3})+f(0)=f(\frac{\pi}{3})$(1) now for $x=0$ and $y=\frac{\pi}{3}$ in the ( *) then $f(\frac{\pi}{3})+f(-\frac{\pi}{3})=f(0)$(2)  (1)+(2) it results that $f(\frac{2\pi}{3})=-f(\frac{\pi}{3})$  now for $x=y=\frac{\pi}{3}$ in the (*) we have $f(\frac{2\pi}{3})+f(0)=f(\frac{\pi}{3})$ so $f(0)=2f(\frac{\pi}{3})$ and also $f(\frac{\pi}{3})=f(-\frac{\pi}{3})$ i dont know if f is a odd function but i have discovered any points with that property $f(x)=f(-x)$ but i dont know how to prove it in general for any x.I don't have any ideas from here.Also i think that the parity of function $cos$ it's important to solve the functional equation.

How can I solve this functional equation, where $x,y$ are any real numbers and $f:\mathbb{R}\to \mathbb R$ is a function such that : $$f(x+y)+f(x-y)=2f(x)\cos y$$    I tried substituting $x=0$ to get $f(y)+f(-y)=2f(0)\cos y$ . Taking $x=y$ gives $f(2x)+f(0)=2f(x)\cos x$. I similar get some more relations like that, but its not really helping me in finding anything useful. I also think the function must either be $\sin$ or $\cos$ looking at the product to sum formulae. Can anyone tell me how should I solve this?


Just a thought, but would Stack Overflow be able to add some keyboard navigation shortcuts? Something along these lines:   Shortcut Key - Page to navigate to:            H - Home            Q - Questions            T - Tags            U - Users            B - Badges            N - Unanswered            A - Ask Question  Shortcut Key - Action to Perform (While on page with a listing of questions)            K - Previous Question            J - Next Question

we had implemented keyboard shortcuts as a user script. We have now finally made the change to have them integrated into the site.  When you go to the Edit Profile & Settings page on your profile, and then select the Preferences submenu, you’ll find a new checkbox labeled Enable keyboard shortcuts (which is located about half the way down on that page). Click it, and from there on, everything works as with the user script. Press ? to get started.  .  If you already have the user script installed you don’t need to do anything. We detect the user script, disable its functionality, and run the built-in version instead. That means you don't have to manually enable anything, while still running the correct version of the keyboard shortcuts (currently the two are identical, but in the future, fixes and improvements will be made to the built-in version).


I though it was British vs. American but watching Star Trek I've noticed the same character using two different pronunciations. Then I noticed other characters doing the same.  Is there any rule for using one or another?  I've searched online and found two definitions, one singular and another plural, both uncountable.  How can something uncountable be plural?

My non-native English speaking friend just asked me: "Data is..." or "Data are..."?  I said both but that's because I've been desensitized from reading/writing both (especially from writing code and adding quick comments).  My question: Is it acceptable to utilize either for a university paper? Or is one safer than the other (when confronted with stickler professors)?    Related questions:


Sometimes you want to buy an avocado, but all they have are hard on touch and you know they are not ready yet; they are rubbery and untasty.  One can buy them and wait couple days, they ripen sooner or later (hopefully before they get spoiled).  Are there any tricks and tips on how to speed up the ripening? Like special storage, some treatment to the avocado etc.

I bought some avocados recently, and one of them was rock hard when I tried to cut it.  I left it out for a couple days hoping it would ripen, but it didn't help.  What can I do to help my avocados ripen?


I am travelling to Barcelona for a conference for 4 days but also spending 5, 2, 1 days at Paris, Madrid and Lisbon with my entry and exit point (to India) being Paris. The problem is that Spain does not have a visa centre where I live and I would have to travel far (and expensively) whereas France has a visa centre in my city.  I know 'technically' the right visa to get is from Spain but I would like to know if it is OK to apply to France (with a visa centre closer to home) since the number of days in France and Spain are almost identical and entry/exit is from France, even though the main event I am attending is in Spain.  Will it be a problem to obtain the visa at the France visa centre or will I get denied entry at Paris, since my main event is in Barcelona?  Need to apply quick.

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I'm trying to make an external system call using mono. I'd like to know if it's possible to emulate something like the example below (Of course I'm looking for cross platform support).  public static int ExecuteExternalApp()             {                 int ExitCode = -1;                 Process Process = new Process(); ;                  //Defining the filename of the app                 Process.StartInfo.FileName = "java";                  //Assigning the args to the filename                 Process.StartInfo.Arguments = @"-jar """ + ConfigurationManager.AppSettings["JarPath"].ToString();                  try                 {                     //Starting the process                     Process.Start();                      //Waiting for the process to exit                     Process.WaitForExit();                      //Grabbing the exit code                     ExitCode = Process.ExitCode;                      //Close the process                     Process.Close();                 }                 catch (Exception ex)                 {                     throw new Exception(ex.Message);                 }                  return ExitCode;             }   **UPDATE: This code does work in mono. The first implementation did not work because of a non-existent reference to the System namespace (no idea of how that happened), this code block works as long as the System.Diagnostics namespace is used.

Here is the premise:  I have a desktop that I need to be able to start up and stop applications on, but cannot get remote access to. What I had in mind is setting up a service on the machine that will start/stop a list of applications as told. This windows service will periodically pole a web service for new commands and execute them accordingly.  These are my questions.   1) Is this the easiest solution? What else would you recommend?  2) How hard is it to run an exe from a windows service? How about stopping one?  This isn't for a project or anything, just something I am interested in implementing (mostly for fun). Any answers or even thoughts are appreciated. General discussion is also welcome (feel free to leave comments).


Hello I have a big problem,  When I am trying to sync my music with iPhone 4 using rhythmbox it just exits.   When I am trying to sync my music using banshee its just freezes.   anyone have ideas?

What ubuntu applications provide support? (guides, how to's, status) Also, specifically, details on support for syncing music to iPhone's and iPod's with the latest OS version:   Can you sync music to apple devices using >iOS4? (iPhone & iPod) What applications allow you to do this and how? (guides, how to's, status)    What has already been established is:   Apple does not support Linux and has no plans to.  provides some support, however it currently does not support music/video synchronization with devices >iOS4. Go to  and scroll to the section titled "" to see if your device version is supported.


I have TeXLive 2013 on my Linux Mint Cinnamon 17. Is there any possibility to get TeXLive 2014/2015? Because I need usepackages like "tcolorbox", which aren't in TeXLive 2013 Version.  Kind regards!

Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed.   So how do I install "vanilla" TeXLive on Debian/Ubuntu?   Also how do I make dpkg aware that I have TeXLive installed?


I am interested in buying the new Mac Mini as I cannot afford a Mac book or Air. The laptop I have is Dell Inspiron 3537. So I wanted to know is it possible to connect Mac Mini with my Dell laptop. Any help will be appreciated.

I have a Dell Inspiron 1525 laptop and I am planning on purchasing a mac mini, new version , I am tight on money for a while and want to use my current laptop screen as monitor for mac mini, I just want to know if it is at all possible to do, I have windows 7 and ubuntu 11.04 installed in my laptop, and I don't really care if need to wipe them out, or purchasing a monitos is the only option left, also I am planning to use it for coding and stuff, so VNC is probably not a good choice.


In the following code, I expect the if condition to be true, but actually the else condition is true. Can anyone explain the reason behind it?  $a = (float) 0; $b = 0; if ($b === $a) {     echo "$a and $b are equal"; } else{     echo "$a and $b are not equal";  // true }

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


I'm quite new to Java and I'm trying to understand static variables and methods. Could someone give me a brief explanation of why I'd use the static method over the instance method and also what would be the ideal situation to use static variables? I know that static variables and methods are part of the class and not an instance of said class but I'm having trouble understanding when I'd use it.  Thanks!

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


For some reason, when I go to 'Texture paint' and paint my model, it doesn't keep those changes when I get back to the normal object stuff, and I didn't observe much, but sometimes it even doesn't save my painted texture so I have to start all over again, anyone please help?

I was following a  on how to use the Texture Paint feature on blender so I could paint on a terrain I am modeling. I was successful to paint the whole terrain with beautiful, exuberant vegetation, and crystalline water running through the valley.  So I saved my file, and I went to sleep. But now I've reopened the file and everything seems like I left it yesterday, except that I can see no texture in the terrain... The weird thing is that the textures i used are still there... I don't understand, I barely understand the interface, please help. I'm not even sure if the texture is there or if it was never "saved" or something...     I am now going through the second part of the tutorial for possible answers but I (and hopefully many more) will be grateful for your help.


I buy watermelon from the market, sometimes they are sweet and sometimes they are not. How can I check if a watermelon is sweet or not?

Lately, every watermelon I bring home form the organic section of the supermarket has not been sweet.  Among the small, seedless varieties, I try to pick the densest. How do I know if it is ripe?  Can I ripen them at home?  Should I keep them in the fridge?


why the result of this function is not 1?       function call(t) {     t = 1; };  var b = 0;  call(b);  console.log(b)

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I'm having a problem with my code I don't know why isn't making the comparison but prints it well. These is my code...    public void read() throws IOException {         String entered = one.next(); // Read from the console         try (BufferedReader reader = new BufferedReader(new FileReader("file.csv"))) {             while (true) {                 String line = reader.readLine(); // Read file line                 if (line == null) {                     break;                 } //Break if there is no more lines                 String[] lineTwo = line.split(","); // Split into Array the line to compare it                 if (lineTwo[1].replaceAll(" ", "") == entered.replaceAll(" ", "")) {                     // compare record 1 with the entered value replace all is not needed I was testing if it have some spaces                     System.out.println("entered");                 }                 System.out.println(lineTwo[0]);             }         }     }   It print all the information of the file but when I'm going to to compare it the condition never gets printed. First read from the console and then read the file line .. line and compare if the record [1] = entered from the console. For some reason print all but it doesn't enter that if statement.

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


i am really confused with the UTF-8, displaying "Ä", "Ö", "Ü" and such.   On my page i have a form where the user can enter a message. This text is supposed to be stored in a mysql database and loaded from the database to show on the screen.  These symbols are not properly stored in the mysql database and if i manually change them in the database they are not printed properly after i fetch them. I dont understand how to get this to work.   mysql_set_charset("utf-8");Doesn't work somehow, and i probably dont know how to use it properly. Same with the encoding / decoding. Could you please enlighten me on the concept of how to properly handle those "Umlauts" and the UTF-8?  Thanks!

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


i want to get items in android via web api web service.  when user click on items web api return values step by step from sharepoint task list.          using (ClientContext context = new ClientContext(siteUrl))         {             context.Credentials = new NetworkCredential(user, password, shp.domainname);              //SP.List oList = context.Web.Lists.GetByTitle(id);             Web web = context.Web;             List list = web.Lists.GetByTitle(listname);             context.Load(list);             CamlQuery camlQuery = new CamlQuery();             camlQuery.ViewXml = "<View Scope=\"Recursive\"><RowLimit></RowLimit>/View>";             //camlQuery.ViewXml = "<View Scope=\"RecursiveAll\"><RowLimit></RowLimit>/View>";             ListItemCollection items = list.GetItems(camlQuery);             context.Load(items);             try             {                 context.ExecuteQuery();             }             catch (Exception e1)             {                 //some code here             }              foreach (ListItem item in items)             {                 AndroidReport andRep = new AndroidReport();                  andRep.id = int.Parse(item["ID"].ToString());                 andRep.title = item["Title"].ToString();                 andRep.rootlevel = int.Parse(item["_Level"].ToString());                 int a = int.Parse(item["ItemChildCount"].ToString());                 int b = int.Parse(item["FolderChildCount"].ToString());                 if(a>b)                     andRep.FolderChildCount = a;                 else                     andRep.FolderChildCount = b;                 //note                 //todo: r1 when subfolder in data downsn exist                 if (andRep.FolderChildCount >= 0)                     andRep.type = "true";                  andReps.Add(andRep);             }   but problem is which way to get only items (folders) on specific folder... not all the folders and items...  i want to get only the folders on root folder...  when i query          camlQuery.ViewXml = "<View Scope=\"Recursive\"><RowLimit></RowLimit>/View>";   only leaf appears   and when this query:          camlQuery.ViewXml = "<View Scope=\"RecursiveAll\"><RowLimit></RowLimit>/View>";   all the childs and parents returned.  thanks in advanced

I have a list that contains folders.   Using c# and object model, how can I see if the folder contains any items, or return a collection of all the items in that folder.


Is it right to use this word when referring to the past:      I didn't knew he was the antecedent of my problem.

Should I use the past tense with did? For example, I was to say:     The important question is: Did they knew what it means or not?   Or should I say:     The important question is: Did they know what it means or not?   In other words: Should I use past tense with did?  I looked at this:    but it didn't really answer my question.


I have built a Windows Service which on start builds a list of file paths from a specified directory. I then do some processing on those files and delete them. My question is how often will the service build this list? Can we specify a time interval when this service would look into the directory and build the list?  OR   Is it better that I create a console application and assign it to a scheduler?

I need to create some windows service which will execute every N period of time. The question is: Which timer control should I use: System.Timers.Timer or System.Threading.Timer one? Does it influence on something?    I am asking because I heard many evidences to non correct work of System.Timers.Timer in windows services. Thank you.


The older apprentices in my company use "this." a lot.  Two weeks ago I started coding object-oriented and still don't get for what it is being used.

I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


public class Exercise05_08 {   public static void main(String[] args) {     System.out.println("Celsius\t\tFahrenheit\t|\tFahrenheit\tCelsius");     System.out.println("---------------------------------------------");      double celsius = 40; double farenheit = 120;     for (int i = 1; i <= 10; celsius--, farenheit -= 10, i++) {       System.out.println(celsius + "\t\t" + celsiusToFahrenheit(celsius) + "\t|\t" +     farenheit + "\t\t" + fahrenheitToCelsius(farenheit));     }   }    public static double celsiusToFahrenheit(double celsius) {     return (9.0 / 5.0) * celsius + 32;   }    public static double fahrenheitToCelsius(double fahrenheit) {     return (5.0 / 9) * (fahrenheit - 32);   } }   Some of the values print out with several decimal places and i want all of the values to print with just 2 decimal places.

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


Let $(X,d)$ be a metric space and $ ( x_{n} )$ , $ ( y_{n} )$ convergent sequences in $X$. Is the sequence $( d(x_{n},y_{n}))$ convergent if $X = \mathbb{R}$ with standard topology.   I am having trouble showing that it is convergent because it seems to me like the metric $d$ could be anything. Or does it have to be the absolute value on $\mathbb{R}$?

Let $(X,d)$ be a metric space. Suppose that $x_n \to x$ and $y_n \to y$. Is it true that $$ d(x_n,y_n) \to d(x,y)? $$


This question is from $\text{p-adic numbers}.$  My questions are-  $(1)$ Is the set $  \ (\mathbb{Z}_p \setminus \mathbb{Z}) \cap \mathbb{Q}$ non-empty?  If non-empty, then what are the elements or the intersection set?  $(2)$ Is the set  $ \ (\mathbb{Z}_p \setminus \mathbb{Z}) \cap \mathbb{Q}_p $ non-empty?  If non-empty what are the elements or the intersection set?  I can not conclude the answer.  Please someone help me with details answer or at least hints.

$\text{p-adic numbers}:$  My questions are-  $(1)$ Is the set $  \ (\mathbb{Z}_p \setminus \mathbb{Z}) \cap \mathbb{Q}$ non-empty?  $(2)$ Is the set  $ \ (\mathbb{Z}_p \setminus \mathbb{Z}) \cap \mathbb{Q}_p $ non-empty?  $(3)$ If non-empty , then what are the intersection sets ?  I can not conclude the answer.  Please someone help me with details answer or at least hints.


I have a table with a very large amount of rows. Duplicates are not allowed but due to a problem with how the rows were created I know there are some duplicates in this table. I need to eliminate the extra rows from the perspective of the key columns. Some other columns may have slightly different data but I do not care about that. I still need to keep one of these rows however. SELECT DISTINCT won't work because it operates on all columns and I need to suppress duplicates based on the key columns.  How can I delete the extra rows but still keep one efficiently?

What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null


I understand that the price of silicon doesn't always scale linearly with its size/number of components, but I'm just genuinely curious as to why we haven't seen any digital camera sensors at true medium format sizes yet. It seems even the high-end camera makers are pushing some sort of current upper limit in sensor size, as the camera with the largest sensor size I can find, the Phase One IQ4, a $50,000 camera, has a sensor size just under 645 film size.  I'd think that the bigger the sensor, the better the image quality, and hence there'd be a market for professional photographers looking to differentiate themselves from the competition. So one would think there's a market incentive to produce sensors corresponding to some of the larger film sizes.  Is it mainly economies of scale that are just making it expensive to produce certain sizes of sensors which are currently not mass produced? Do factories have to be updated to facilitate production of these larger sensors? Or is there some limitation with existing fabrication techniques that keeps companies from making an arbitrarily large CMOS sensor?

In the digital age of photography, we can see a range of digital camera sensors sizes in use, from 1/3.2" in small phones, up to Medium format sensors that are 53.4 x 40.0mm in size or more!  Why has no company endevoured to produce a sensor that can be considered to be large format (50mm X 80mm or larger)? Do such camera sensors exist in non-consumer products?


I have gone around and around trying to reset my password.  I have repeatedly gone through the reset stages and I never get the email from you to reset my password.  over and over I wait for your response and I never get it.  I have the same email address and cannot remember my password  everything else is still the same   still I do not ever receive the password reset   I get nothing from you bmarrs@bcmvco.net

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


I am fairly new to networking but I can understand its basics. I recently found out that my file copying over wireless LAN speed is low and specifically doesn't exceed my maximum download speed that I bought through my ISP.  To explain :  I have a home modem that has a 4MB plan, so my download speed never exceeds 400Kb/s. When I connect my Two computers or generally any two devices and try to copy a file from one to an other, that file transfer speed, though from a local machine to a local machine is also capped at 400Kb/s.  This can't be because my local network is not affected by my ISP in any way.  I must say that I didn't do any special configuring like create NATs or any static IPs/MACs.  A Second Point :   When I Upgraded my Plan to 20Mb/s, what I found is that the maximum speed for file transfer also jumped up to 2000Kb/s average. which does point an issue in my modem, I guess.  EDIT: To transfer I use FTP and HTTP file Download (basically make a file available over the network and download it from an other device via browser)  My question is : is this normal ? or is there a way to fix it ?, especially if I want to stream files from one device to an other and I need a higher transfer rate.

Recently I wanted to transfer some movie files (ranging from 1gb to 4.5gb) from one computer on the ground floor to another on the first floor.   The wifi router Im using is this one most likely:    The speed at which I am able to transfer averages around 1Mb/s.  How can I make it faster.  Both the laptops that I am using for transfer are relatively new so the wifi adapters in them cant be too slow. None of the hard drives in the laptops are SSD but I still would like to know how I can increase the transfer speed.  Also the wifi signals on the laptop arent too bad.  Thanks.


I wish to know all those groups in which there is single conjugacy class of subgroups of fixed order.For example, In finite cyclic groups and in Alternating group of degree 4, number of conjugacy class of subgroups of fixed order is one. But I am unable to search a general result. Please Help me.

As we know, Alternating Groups $A_n$ of degree $n\leq 5$, Dihedral Groups $D_{2n}$ of order $2n$ (for odd natural number $n$) and Cyclic Groups $C_n$ of order $n$ (for positive integer $n$) have subgroups of same order conjugate. Are such (finite) groups classified? Is there some more groups of this type?


Suppose we have a sequence $(a_n)_{n\in\mathbb N}$ with $a_n>0$ and $a_{n+1}\geq a_n$ for all $n\in\mathbb N$.  Then, I want to prove that $$\sum_{n=1}^\infty\left(\frac{a_{n+1}-a_n}{a_n}\right)\text{ converges}\quad\implies\quad (a_n)_{n\in\mathbb N}\text{ is bounded}.$$  I tried to prove this by contradiction and using inequalities, but I never arrived at a divergent series.

So I've been thinking through some test cases. If $a_n = n$ then $\sum_n \frac{a_{n+1} - a_n}{a_n}$ is the harmonic series which diverges. And if $a_n = \sum_{k=1}^n 1/k$ then $\sum_n \frac{a_{n+1} - a_n}{a_n}$ diverges like $\sum_n 1/(n \log n)$. So that got me thinking, if $a_n$ is a strictly increasing unbounded sequence, does $\sum_n \frac{a_{n+1} - a_n}{a_n}$ necessarily diverge?


I want to know why   $$\int_0^\infty \frac{\cos wx\sin w}{w}\,dw = \frac{\pi}{4}?$$ at x=0,given that  $$\int_0^\infty \frac{\cos wx\sin w}{w}\,dw = \frac{\pi f(x)} {2}$$ where f(x) is  \begin{cases}     1       & \quad \text{if } |x|<1\\     0  & \quad \text{if } |x|>1\\   \end{cases}

A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral: $$\int\limits_0^\infty \frac{\sin x} x \,\mathrm  dx = \frac \pi 2$$ Well, can anyone prove this without using Residue theory?  I actually thought of using the series representation of $\sin x$: $$\int\limits_0^\infty \frac{\sin x} x \, dx = \lim\limits_{n \to \infty} \int\limits_0^n \frac{1}{t} \left( t - \frac{t^3}{3!} + \frac{t^5}{5!} + \cdots \right) \,\mathrm  dt$$ but I don't see how $\pi$ comes here, since we need the answer to be equal to $\dfrac{\pi}{2}$.


Im running 64 bits version, Im very new to ubuntu, just dived into it. this is what I do:  wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb   then get:  `2016-10-01 23:22:41 (1.30 MB/s) - ‘google-chrome-stable_current_amd64.deb’ saved [49990192/49990192]`   then   sudo dpkg –I google-chrome-stable_current_amd64.deb   and get:  dpkg: error: need an action option   Type   dpkg --help for help about installing and deinstalling packages [*];  Use 'apt' or 'aptitude' for user-friendly package management;   Type  dpkg -Dhelp for a list of dpkg debug flag values;   Type  dpkg --force-help for a list of forcing options;   Type  dpkg-deb --help for help about manipulating *.deb files;   Options marked [*] produce a lot of output - pipe it through 'less' or 'more' ! Thanks in advance and sorry for my idiocy too

How do I install a .deb file via the command line?


'Is' and 'their' don't mix well... But I have heard people saying 'Don't bring up the past of a person who is trying to improve their future.' Is it correct? Or should it be 'Who are trying to' instead?

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


In my Terraria iOS world I have made a glowing mushroom biome and made 4 houses. The chat keeps on saying the truffle would like to settle down but he has never settled down.    The update is 1.2, can you please help me?

I currently find myself in a pickle because even after I've built the mushroom biome and met all other requirements, the Truffle NPC won't move in.   I've defeated not only the Wall of Flesh but Ocram already. Created a surface mushroom biome. Built a house made out of mushrooms with mushroom furniture.   I have no idea how long it takes for the NPC to move in or if I'm wrong in any of the steps.


I have a byte array that comes as a result of doing a get to a method called "getFoto()". Now my question is how to convert this array of bytes into an image, to set this image to a specific JLabel.         InputStream myInputStream = new ByteArrayInputStream(t.getFoto());           BufferedImage someImage;         try {             someImage = ImageIO.read(myInputStream);             Icon icon = new ImageIcon(someImage);             portada.setIcon(icon);         } catch (IOException ex) {             Logger.getLogger(VeryModificarTrailers.class.getName()).log(Level.SEVERE, null, ex);         }         }      portada.setIcon((Icon) Imagen; is not working

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


From our docs, written by non-native speakers:  Frobnicators often support only discrete values.  my gut feeling (non native speaker):  Frobnicators often only support discrete values.  a) Is either blatantly incorrect? b) Is one generally preferred? c) If both correct, do they differ in meaning?

Is there any difference in meaning between the three following sentences?   We only have two possibilities. We have only two possibilities. We have two possibilities only.   I have already read  and I know that the position of only and the emphasis (written or oral) may change the meaning of some sentences, but I am not sure if it does here.  Note: It is clear that “only we have two possibilities” has a different meaning. My question is restricted to the sentences I’ve listed above.


When browsing within one of my communities I sometimes would like to navigate back to the top site "StackExchange" (= ) to see the hot questions for example, but I don't see a proper navigation element for that path.  Doesn't it make sense to have this link in the top navigation as well? Or do I oversee something?

One thing I've noticed about the relatively new sitewide layout is that I can't find a quick way to get back to www.stackexchange.com without finding StackExchange in the sites list. As a result, I am typing stackexchange in my toolbar a whole lot more often now. In particular, I tend to enjoy browsing the hot questions list and my own personal feed quite often so visit these pages on a daily basis. Is there an easy link to them that I'm missing?  (On the android app, there is a feed in the menu that I really appreciate, something like that on the desktop would be ideal!)


I am having some trouble wrapping my head around this, and it might just be some small error somewhere, that I keep missing .. but as it stands, I am trying to create a hardware "delay" that can run at the same time some code executes.  For practise purposes, I am simply trying to blink an LED at PD4 at an interval of 1 second.  I have used the following formula to determine the prescaler, and the value of the Output Compare Register A (OCR1A):    Using a prescaler of 256, I get a value for OCR1A of 62499:    Looking at the registers TCCR1A and TCCR1B in the datasheet, I set the Waveform Generation Mode bits (WGM) to use CTC and the Clock Select bits to use the 256 prescaler.  Now, in my main function, I am starting of by turning on the LED, then calling my function that should start the timer. I am then checking to see if the overflow flag has been set in TIFR1, and if it has, I am turning of the LED and writing a logic 1 to TOV1 to reset the overflow flag.  int main(void) {    DDRD = 0xFF;    PORTD = 0x00;     while (1) {        // Turn on LED at PD4       PORTD |= (1 << PD4);        oneSecondDelay();        // Checking to see if the overflow flag has been set       if (TOV1 == 1) {           // Turn off LED at PD4          PORTD &= ~(1 << PD4);           // Set 1 in the Output Compare A Flag to reset the overflow flag          TIFR1 = (1 << TOV1);       }    }     return 0; }   In my function I start off by setting OCR1A to the value that I calculated earlier. I then set the bits in the TCCR1B register that needs to be set for using the specific prescaler and CTC mode, and I then create a loop while waiting for the overflow event to happen; which I envision should take one second.  void oneSecondDelay() {    // Set the target value to 62499    OCR1A = 0xF423;     // Set prescaler to 256 and start the timer    TCCR1B |= (1 << WGM12) | (1 << CS12);     // Waiting for the overflow event    while ((TIFR1 & (1 <<  OCF1A))) {     } }   TLDR: Now the problem is that no matter what I can dream up, the LED is just constantly turned on, and I am not sure if I am setting the the wrong values in the registers, or if I am just having some brain farts?

I am trying to turn on a LED for 5sec every 12 hours. I tried:  #include <mega16.h> #include <delay.h>  void main(void) {     DDRC.0 = 1;     PORTC.0 = 0;      while(1)     {              unsigned long i;        unsigned long j;        PORTC.0=1;         for(i=1; i<432; i++)        {              delay_ms(100);          }         PORTC.0 = 0;         for(j=1; j<100; j++)        {            delay_ms(50);          }     } }   but the LED was on for about 2 hour every week.


I am trying to use bibtex in a , but it seems to give absolutely no output. Using the bibtex command gives me the output "I couldn't open file name ref.bib.aux", where ref.bib is the name of the bibtex database. On the other hand, using "Quick Build" in texmaker produces the output file, but without the references. Any ideas why?  Thanks.

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


How does $(ab)^{3}=a^{3}b^{3}$ and $(ab)^{5}=a^{5}b^{5}$ for all $a,b \in G$ implies that $G$ is abelian? I know that the first criteria alone isn't enough because there's a counterexample. What could we say if in those equation instead 3 and 5 we had two other relatively prime numbers?

Let G be a group, where $(ab)^3=(a^3)(b^3)$ and $(ab)^5=(a^5)(b^5)$. Prove that $G$ is abelian group.  Thank you in advance. Any help is appreciated.


How do you close windows/tabs in 2.8? I've tried a lot of stuff, but always end up opening up more.


The equation  $$ a_n x^n+\dots+a_0=1, \qquad a_n\neq 0, \qquad a_i\in\mathbb{Z} $$ has $\geq 4$ distinct integral solutions. How can I prove that  $$ a_n x^n+\dots+a_0=-1 $$ has no integral solution?

Given a polynomial $f(x)$ with integral coefficients and $f(x) = 37$ has 5 distinct integral roots, find the number of integral roots of $f(x) = 41$?  My Approach: Say $f(x) = (x-r_1)(x-r_2)(x-r_3)(x-r_4)(x-r_5)g(x) + 37$, where $r_i$ are the distinct integers.   Now for $f(x) = 41$ we have $(x-r_1)(x-r_2)(x-r_3)(x-r_4)(x-r_5)g(x) = 4$, so the factors can be $\pm 1, \pm2$ or $\pm 4$. Given $r_i$ are distinct at most two of them will give $\pm1$, then there can be both of $\pm 2$ or one of $\pm 4$. This is where I get lost, since even if I use all of $\pm1, \pm2$, I will be still be left with one $x-r_i$ factor. What about that? Does it matter that 37 and 41 are primes, or is it just a coincidence?  Thanks in advance.


I created a virtualbox for ubuntu guest and my host is windows 8.1. Do I need to be carefull with virus passing from the ubuntu virtualbox to the real hard drive on windows?

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


This has been asked before on stackoverflow but the answers were very unsatisfying.  I am looking for a tasked based plugin to Visual Studio that operates much in the same way as Mylyn does for Eclipse.  I am interested in something that a team could use to manage issues and requests from within VS, and it would be awesome if that could integrate with Eclipse (using something like bugzilla)  VS2012.   Any thoughts?

is a task oriented plugin that allows for example to assign a set of files to a task. Is there a Mylyn type plugin for Visual Studio?


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


ROS answers said the following was an askubuntu question:  Upgraded (overwrote) one of my Windows 8.1 OS machines to 1TB Ubuntu/ROS training box to run ROS Melodic on Ubuntu 18.04 LTS. Previously completing all Kenetic (and subsequent Melodic) basic training + sims. Passed Gazebo basics with successful sims, including Velodyne. Having more recent Unix experience would have helped.  Want to go back and load ROS/Gazebo robot sims that require legacy Ubuntu 16.04.4 LTS/ROS Kenetic.  ROS Answers explained simply use a docker to continue on my training box (which I was/am about to do) when I received a windows 7 quad-core box from storage that works great, and certified for new life.  Would prefer not to clutter my lab's Ubuntu 1TB 18.04 training/research box with a docker: Just run released Gazebo sims on a separate machine. My old Windows 7 box's system boot OS was boot-user-programmed to boot from USB stick, but after USB flashing lights (signaling a USB OS search was underway), software says no operating system found (on the blinking USB stick). Was not Windows 7 the a non-Unix OS when ROS Kenetic was under development?  Would prefer not to upgrade or buy new lab computers until  robot simulation tests are completed. Thank you in advance for your recommendations. - -  PS.  Flash drive file: (“ubuntu-16.04.6-desktop-amd64.iso” was downloaded and ported to the USB before the attempt to upgrade Windows 7 quad-core box)

I would like to see a full how-to guide on how to install Ubuntu.


If we consider the space given by $\{(x_{1}, x_{2}, ..., x_{n}) : (x_{1}, x_{2}) \neq (0, 0)\} \subset \mathbb{R}^{n}$, for $n \ge 3$, how can we show that it is path-connected? For $n=3$, the space is just $\mathbb{R}^{3}$ with the z-axis removed, so intuitively I know to construct a straight line composition around the removed axis, but not sure how to put do it explicitly. As for higher dimensions I am really stuck as I cant even visualize what the space looks like. Was thinking maybe a homeomorphism from a space we know is path connected such as $\mathbb{R}^{n}-\{0\}$, since it would preserve the path-connectedness condition.

Is the set $\mathbb{R}^4\setminus \{(0,0,0,w)  | w\in \mathbb{R} \}$ simply connected? I started trying to grasp the notion of simple connectedness in higher dimensions and realized I could not even a figure out such a basic question.   My intuition says it is not simply connected but maybe you can twist things around in 4 dimensions in ways I can not visualize.


I am doing the Coursera Statistics Inference course and one of the questions is to find the regression through the origin, when the regression line has an intercept.  Can you please explain what the point of this is? Why would you want to find the regression line through the origin when there is an intercept?

In a number of statistical packages including SAS, SPSS and maybe more, there is an option to "suppress the intercept". Why would you want to do that?


Considering     $$\sum_{n=1}^\infty\sin(\pi\sqrt{n^2+k^2})$$   depending on $k$, which can be real. I have absolutely no clue how to proceed. Tried to taylor it, but with no result.

I am given a series: $$\sum\limits_{n=1}^\infty \sin\left(\pi \sqrt{n^2+\alpha}\right)$$ And in the description of the problem it is said that I must show by Leibniz test that it is convergent. How can I even get the $(-1)^n$ symbol out of the starting series?


While installing WP, I created a mysql user to access only the relevant WP database.  It's likely that not technical people will end up with access to this account, so I decided to remove DELETE and DROP privileges from this user.  Was this a bad idea?  Will anything in WP not function correctly because of this.  Thus far, I got a couple of error messages during the install, but I looked up what they were doing, and that was precisely nothing.  The DROP queries didn't match anything they would have dropped.  UPDATE: It seems that my question is addressed by answers in this question:

The short installation instruction for WordPress () state that:     Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.   While setting up a new blog professionally I was wondering how that maps to what the MySQL database user privileges/permissions configuration offers me:   Data: SELECT, INSERT, UPDATE, DELETE Definition: CREATE, ALTER, DROP Extra: INDEX More:  LOCK TABLES REFERENCES CREATE TEMPORARY TABLES CREATE VIEW SHOW VIEW CREATE ROUTINE EXECUTE ALTER ROUTINE    I'm pretty sure for the first three groups, I named them Data, Definition and Extra here. But what about the others below the More entry? Normally I would say, those are not needed, but I would like to get a second opinion.


I am trying to prove the following assertion: The set of subgroups of $(S^1)^n$ which are isomorphic by an element of $\operatorname{Aut}((S^1)^n)$ to the standard copy $(S^1)^k$ is naturally parametrized by the set of $k$-dimensional unimodular subspaces of $\mathbb{Z}^n$.  By a $k$-dimensional unimodular subspace of $\mathbb{Z}^n$ we mean a rank $k$ submodule which is a direct summand.     My guess is that the $k$-dimensional unimodular subspaces of $\mathbb{Z}^n$ would be those that are isomorphic by an element of $\operatorname{Aut}(\mathbb{Z}^n)$ to the standard copy of $\mathbb{Z}^k$. Is that correct?   In that case, since $\operatorname{Aut}(\mathbb{Z}^n)\cong GL(n,\mathbb{Z})\cong\operatorname{Aut}((S^1)^n)$ I thought I could do the following:  Given any subgroup $H$ of $(S^1)^n$, as in the stated assertion, there is an $f \in GL(n,\mathbb{Z})$ such that $f(\mathbb{(S^1)^k}) = H$. So I can send this subgroup to $f(\mathbb{Z}^k)$. But this map need not be well defined. So what do I do?  Thank you.

I am interested in knowing the rank $k$ submodules of the $\mathbb{Z}$-module $\mathbb{Z}^n$ which are are also direct summands.   I know that $\mathbb{Z}^k$ sitting in $\mathbb{Z}^n$ in the standard way, i.e., $(z_1, \dots, z_k) \mapsto (z_1, \dots, z_k, 0, \dots, 0)$ is one such summand. So if I look at all the different ways in which $\mathbb{Z}^k$ is embedded in $\mathbb{Z}^n$ will that give me all the required summands or will there be more?  If so, how do I characterize all the embeddings, i.e., injective $\mathbb{Z}$-module homomorphisms from $\mathbb{Z}^k$ into $\mathbb{Z}^n$?  Thank you.


Premise: In a automotive gate automation scenario, I'm building a daemon, that I think to run in an Ubuntu headless server.       linux headless host     +----------------------+     |                      |     |                      |     |                      |     |   +--------------+   |     |   | graphic card |   |     +---+------+-------+---+                | HDMI                |                | +--------------v---------------+ |                              | | Please contact the operator. | | Push the emergency button    | |                              | |                              | |                              | |                              | +------------------------------+      high resolution screen  Goal: The daemon program has to display some simple texts on a screen. Basically I just need to write text lines on a stdout, but with configurable BIG size fonts and geometry, as I could with a gnome terminal on a desktop environment. The point is that I would avoid to install a desktop environment just to solve the problem.   In the screenshot it's displayed the command clear && echo "Please contact operator" on a gnome terminal with different font size setting.  BTW, the reason of big font requirement is that displayed text will be read by truck drivers, at a distance of 1/2 meters from the computer monitor. Notes:  A way I explored is to set the TTY character setting (at GRUB level). Unfortunately it doesn't appear to be a good option, because the font setting are very limited.  Reading , maybe framebuffer mode could be an option?   Question: How can I display big front texts (so in a graphic mode) on a headless computer?

I have a Unix-like OS installed without a windowing environment; i.e., just a text-mode console and no GUI.  Is it possible to change the font used by the console?  To be clear, I am not talking about the terminal emulator that comes with a desktop environment like KDE or GNOME.


My Office 2013 applications (Word, Excel and Outlook) are maximized, but somehow there is a gap of like 1 or 2 pixels above the minimize, maximize and close buttons. When I try to minimize an Office application, I move my cursor to the top of my screen thinking I will hit the minimize icon, but I hit the minimize button of the application behind. Quite annoying.    Is there a way I can fix this? Thank you!   Office 2013 x64 (French)  Windows 7 Enterprise x64 (French)

This is an odd one. I've got a user on a wide-screen Dell laptop. Everything is working great, but when he maximizes Word it leaves about a centimeter worth of space at the top of the screen, where the desktop is in the background. Everything else maximizes full screen just not word. I can manually resize the window to full screen, but when you choose maximize or double click the title bar it fills in the width but not the height?  Has anyone seen this?


I am trying to figure out how I can draw my 3D surface plot using pgfplots when external data is scattered to an excel file in 2D with no headers. I wasted almost 2 days now and have no clue how can I achieve this.  The visualization of the data with 3D surface plot in LABVIEW is given below. I also added how the excel file looks like and gave tab delimited txt file below.  Thanks in advance.

This question arised in , but since it is of general interest, I add a separate question and my answer here.  Suppose you have a matlab figure which needs to be converted to pgfplots. The matlab figure contains a 2d function f(x,y) which is typically visualized as a matrix.  Suppose it is given as  [X,Y] = meshgrid( linspace(-1,1,3), linspace(4,5,5) ); Z = X + Y; surf(X,Y,Z) shading interp   such that  octave:7> Z Z =     3.0000   4.0000   5.0000    3.2500   4.2500   5.2500    3.5000   4.5000   5.5000    3.7500   4.7500   5.7500    4.0000   5.0000   6.0000   and the outcome is    I would like to reproduce that in pgfplots. To this end, I saved the Z matrix as ascii and imported it into an \addplot3 table statement:  \documentclass{standalone}  \usepackage{pgfplots}  \pgfplotsset{compat=1.9}   \begin{document}  \begin{tikzpicture}     \begin{axis}     \addplot3[surf] table {   3.0000   4.0000   5.0000    3.2500   4.2500   5.2500    3.5000   4.5000   5.5000    3.7500   4.7500   5.7500    4.0000   5.0000   6.0000      };     \end{axis} \end{tikzpicture} \end{document}   which leads to the unexpected result    How can I reproduce my intented surface plot?


How can I make my main user which I log into, an administrator just like in Windows XP?

I would like to enable the root account on my Ubuntu installation.  I realize the security implications of this.


See below example in c:      #include <stdio.h>       int main()      {          int arr[] = {1, 2 ,3};          int *ptr = arr;          printf("sizeof arr[] = %d ", sizeof(arr));          printf("sizeof ptr = %d ", sizeof(ptr));           return 0;      }   output: sizeof arr[] = 12 sizeof ptr = 4  Why sizeof on pointer "ptr" outputs 4 and on array variable "arr"(although "arr" is also being a pointer) outputs 12 ?

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I’m newbie in photography. I’ve been trying to catch the Milky Way it stars trials.   But I always end up with dark noisy picture with blurred stars and even faint ones. Unlike the second picture I’m trying to achieve.   I had entry level canon eos. ISO set at max. Maximum shutter speed was 60 seconds. And lens was I think f1/8  What am I doing wrong? What do I need to adjust?

Can the milky way actually be photographed ? I know the image is manipulated, and is probably a composite, but how do you capture such contrast in the milky way? Is an equitorially mounted scope required? Any advice or pointers are welcome, thanks.  I'm heading out towards much less light polluted areas middle of next week and I want to try some nighttime sky captures with my 7D.  Additional info: I just found  on wikipedia that says: 54s, tripod mounted 5D, 16mm lens, f/2.8, ISO800. What else do I need to be aware of? My 7D is only an APS-C and the widest lens I have is 19mm. I'm thinking that might not be wide enough to capture an interesting shot?


I'm new to unix. I typed this command in ubuntu terminal:  pwd | echo   I expected to see the output of pwd in terminal(/home/fatemeh/Documents/Code/test)  but the output was just a single empty line.  why this happens?

Why doesn't this command output "1"?  echo 1 | echo   I imagine it working this way:  1. echo 1 (outputs 1) 2. | echo (takes the 1 as an input, then echos it)   Isn't this what should happen?


How do you update the python addin wizard code to write directly into access or pgdb? I have a combo box and need to have my users enter data into the combobox to write into the database. Can someone provide an example of how to accomplish this task?

I am having some issues. In ArcGIS, I created a custom toolbar (with the python addin wizard) to do the following: 1. Button to connect to feature class, 2-5. A series of comboboxes to view, edit data in a field in the feature class. I want each of the combo box classes to directly connect to the field. And be able to write new data from the boxes into the fields.  Example: Combobox 1 to connect to field 1. So that when I deploy this a user can edit data without doing this the traditional way. Its a way to have inexperienced users edit data. I am new to python and willing to pay for the time required to help me as I am out of ideas. And ESRI doesn't have a solution either.   import arcpy import pythonaddins from arcpy import env   class ButtonClass1(object):     """Implementation for QuickTableEdit_addin.button (Button)"""     def __init__(self):         self.enabled = True         self.checked = False     def onClick(self):         print("Button1 Clicked")         env.workspace = "C:/data"         arcpy.CreateTable_management("C:/data", "test_table.dbf","template.dbf")         mxd = arcpy.mapping.MapDocument("CURRENT")         df = arcpy.mapping.ListDataFrames(mxd)[0]         dbf_Table = arcpy.mapping.TableView(r"C:\data\test_table.dbf")         arcpy.mapping.AddTableView(df, dbf_Table)         arcpy.RefreshTOC()         pass  class ComboBoxClass2(object):     """Implementation for QuickTableEdit_addin.combobox_1 (ComboBox)"""     def __init__(self):         self.items = [1,2]         self.editable = True         self.enabled = True         self.dropdownWidth = 'WWWWWW'         self.width = 'WWWWWW'     def onSelChange(self, selection):         global cb1         cb1 = self.value         pass     def onEditChange(self, text):         pass     def onFocus(self, focused):         pass     def onEnter(self):         pass     def refresh(self):         pass


sudo apt-get install nfs-kernel-server I have my /etc/expots file here;  /mnt/extHD 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)  I have restarted all the services and set ufw to allow nfs, yet when I do a  sudo showmount -e localhost  I get;  clnt_create: RPC: program not registered

NFS mounts recently automatically got un-mounted. When I checked, the NFS service status it was shown to be running.  [root@hsluasrepo]# service nfs status rpc.svcgssd is stopped rpc.mountd (pid 4083) is running... nfsd (pid 4148 4147 4146 4145 4144 4143 4142 4141) is running... rpc.rquotad (pid 4079) is running...  [root@hsluasrepo]# service rpcbind status rpcbind (pid  4203) is running...  [root@hsluasrepo common]# rpcinfo -p 10.80.3.154    program vers proto   port  service     100000    4   tcp    111  portmapper     100000    3   tcp    111  portmapper     100000    2   tcp    111  portmapper     100000    4   udp    111  portmapper     100000    3   udp    111  portmapper     100000    2   udp    111  portmapper   But showmount output was showing an error.  [root@hsluasrepo ]# showmount -e 10.80.3.154 clnt_create: RPC: Program not registered   After restarting the NFS service, showmount output displayed the NFS server's export list.  Can anyone tell me the root cause of this issue and How to avoid this problem in future?  /var/log/messages:  Jul 7 03:22:01 hsluasrepo rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="1188" x-info="rsyslog.com"] rsyslogd was HUPed Jul 7 03:22:02 hsluasrepo rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with RHN. Please enter your Red Hat login to ensure your system is up-to-date. Jul 8 03:22:01 hsluasrepo rhsmd: In order for Subscription Manager to provide your system with updates, your system must be registered with RHN. Please enter your Red Hat login to ensure your system is up-to-date. Jul 8 16:36:55 hsluasrepo kernel: nfsd: last server has exited, flushing export cache Jul 8 16:36:55 hsluasrepo rpc.mountd[4083]: Caught signal 15, un-registering and exiting. Jul 8 16:36:55 hsluasrepo rpc.mountd[24463]: Version 1.2.3 starting Jul 8 16:36:55 hsluasrepo kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory Jul 8 16:36:55 hsluasrepo kernel: NFSD: starting 90-second grace period Jul 8 16:37:32 hsluasrepo rpc.mountd[24463]: authenticated mount request from 10.60.5.208:1004 for /common/PROD (/common/PROD) Jul 8 16:38:09 hsluasrepo rpc.mountd[24463]: authenticated mount request from 10.60.5.181:869 for /common/PROD (/common/PROD)  Jul 8 16:38:43 hsluasrepo rpc.mountd[24463]: authenticated mount request from 10.60.5.180:825 for /common/PROD (/common/PROD) Jul 8 16:39:12 hsluasrepo rpc.mountd[24463]: authenticated mount request from 10.60.5.176:688 for /common/PROD (/common/PROD)


I really want to upgrade but if I do I need to be able to downgrade. I also want to know the spec are right for my system info.  System Info  Memory 2.0 GiB Processor Intel Pentium(R) 4 CPU 2.80GHz x 2 Graphics are Gallium 0.4 on AMD CEDAR OS type 32 bit Disk 90.1 GB

I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible?