In a multi-tenant only one DB, one column is used to isolate customers data, that is customer_id.  Is it possible to get the storage size of a certain customer in all tables?
I have a PostgreSQL table. select * is very slow whereas select id is nice and quick. I think it may be that the size of the row is very large and it's taking a while to transport, or it may be some other factor. I need all of the fields (or nearly all of them), so selecting just a subset isn't a quick fix. Selecting the fields that I want is still slow. Here's my table schema minus the names: integer                  | not null default nextval('core_page_id_seq'::regclass) character varying(255)   | not null character varying(64)    | not null text                     | default '{}'::text character varying(255)   |  integer                  | not null default 0 text                     | default '{}'::text text                     |  timestamp with time zone |  integer                  |  timestamp with time zone |  integer                  |   The size of the text field may be any size. But still, no more than a few kilobytes in the worst case. Questions  Is there anything about this that screams 'crazy inefficient'? Is there a way to measure page size at the Postgres command-line to help me debug this?
I stopped dual booting and I don't want to have to choose the OS any more. I want to boot into Ubuntu 12.04 directly without seeing the GRUB menu.  How can I achieve that? Let $V$ be a representation with character $\chi$.  I would like to have a formula for the characters of the representations $\mathrm{Sym}^m[V]$ and $\wedge ^m[V]$ in terms of $\chi$.  Fulton and Harris presents such a formula for $m=2$, but not for general $m$.  Is there a "nice" such expression?  I found a paper by , but this doesn't seem to be what I'm looking for (it doesn't seem to give a general formula in terms of $\chi$).  In case the link does not work, here is the reference:  X. Zhou, P. Pulay. Characters for Symmetric and Antisymmetric Higher Powers of Representations: Application to  the  Number of Anharmonic Force Constants in Symmetrical Molecules. Journal of Computational Chemistry, Vol 10, Issue 7, (1989). options for [for /f "usebackq" %%f in (`find "" path`) do] sentence in batch I symplified my problem: @echo off set res=  for /f &quot;usebackq&quot; %%f in (`find &quot;a&quot; list.txt`) do set res=%%f echo %res%  pause&gt;nul and that things.txt file in the code is like:  list.txt file in the code is: apple pitch pear melon mango  As you expect, the result of this code is mango  because the line 'mango' is located below the line 'apple' and 'pear' But the result I want is apple  or pear  Specifically, I want to put each of the other values above mango such as apple and pear into the variable res using option keys provided. is there any way to do that? If $\omega \in \Omega^q(M)$, and $(\omega|_{U})_p = 0$, is $\omega_p = 0$? I was trying to do some of these questions to check my understanding about the topic, but I'm not sure if they're correct. Here are my answers.   1) Suppose $f$ is continuous on $[0,1]$. Must there be a nondegenerate closed subinterval $[a,b]$ of $[0,1]$ for which the restriction of $f$ to $[a,b]$ is of bounded variation?   No, because $f(x)$ might be a constant function. In this case, $f(x)$ will not be the difference of two increasing functions...and so will not be of bounded variation.  2) Let $f$ be the Dirichlet function, the characteristic function of the rationals in $[0,1]$. Is $f$ of bounded variation on $[0,1]$?   No, because we cannot express it as the difference of two increasing functions.  3) Let $f$ be a step function on $[a,b]$. Find a formula for its total variation.  If we partition $[a,b]$ in such a way that for each $[x_{i-1}, x_i]$ (which is part of the partition), $x_{i-1}$ and $x_i$ each correspond to the midpoint of a step. I know this is not a formal answer, but I'm just trying to check my understanding. The Monty Hall Problem - where does our intuition fail us? Factorial of $i$ With $i^2=-1$, what is $i!$ ?  I'm not sure if it is $i$ or if it is an infinite product $i(i-1)(i-2)(i-3)(i-4)(i-5)\dots$  It would make sense either way.  Is it not defined? I'm bugged by the following that's summarized on p. 109 of .     False theorem: All horses are the same color.      Proof by induction:      $\fbox{$P(n)$ is the statement: In every set of horses of size $n$, all $n$ horses are the same color.}$   $\fbox{Base Case or $P(1)$:}$ One horse is the same color as itself. This is true by inspection.   $\fbox{Induction Step:}$ Assume $P(k)$ for some $k \geq 1$.   $\fbox{Proof of $P(k + 1) :$}$   Since $\{H_1, H_2, ... , H_n\}$ is a set of $n$ horses, the induction hypothesis applies to this set. Thus, all the horses in this set are the same color.   Since $\{H_2, H_3, ... , H_{n+1}\}$ is also a set of $n$ horses, the induction step likewise holds for this set. Thus, all the horses in this set are the same color too.         Therefore, all $n +1$ horses in $\{H_1, H_2, H_3, ... , H_n , H_{n+1}\}$ are the same color. QED.   The issue the instructor was trying to point out is clearly valid. For the case $n = 1$, there is only ${H_1}$. So this case says nothing about possible overlapping elements of each set of $(n + 1)$, for instance $H_2$ in the above proof.    But it was proposed in the class discussion that this was the only problem. Had you been able to prove $P(2)$ true, then a proof of the above format would have been fine.    My interpretation is that yes, you could prove all horses are the same color, if you can prove that any set of two horses will be the same color. But this format would not work.  Why not? The problem I see is that the above proof is for the existence of at least one particular pair of sets of horses of sizes $n$ and $n + 1$, such that in each set, all horses are the same color.  Particularly when the set of size $n$ is a subset of the set of size $n + 1$.  In order to prove the induction step, don't you need to prove that sets of sizes $n$ and $n + 1$, do not necessarily contain the same, overlapping elements?  You could prove that any horse can be added to a set of 2 horses.  Take the last two, and they must be the same color, and so on.  Wwhatever color the first two happen to be, all other horses must thus be the same color.    Am I misinterpreting the example, or am I making a logical error? Thanks in advance. Subgroups of finite abelian groups. For every subgroup $H$ of a finite abelian group $G,$ there exists a subgroup $N$ of $G$ such that $G/N \cong H.$ I need to prove this or give a counter example.  I am aware of isomorphism theorems and classification of abelian groups, direct products etc. When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT? When the phrase is used as an object, why so many native speakers are saying "you and I" instead of "you and me"? I'm not a native speaker but I thought "you and me" is correct. Not sure if this falls into the same category, but "Just between you and me" sounds more natural than "Just between you and I". What are the readline word separators? How does the unit circle work for trigonometric ratios of obtuse angles? I know that the x coordinate is $cos (\theta )$ and the y coordinate is $sin (\theta )$. But I understand these in context of only acute angles? I don't understand why the unit circle definition works for other than acute angles? Somebody please provide me some good intuition. I am a software engineer but try to keep up with maths as I really enjoyed the subject at school. I just saw a great TED talk:   The talk states that the current largest known prime is $2^{57885161}-1$  This got me thinking - how does one actually prove whether a number this large is prime or not?  Is it just done by brute force via a computer algorithm or are there any well known mathematical techniques for doing so?  I would be really grateful for any pointers as I am eager to learn about these techniques (if they exist). One who has potential, but never gives the effort to show it.   What would be the best word or words that match this description? Ubuntu 17.10 windows' menu in panel I installed the latest version of Ubuntu (17.10) , but the problem is, I can't find the menu bars of applications in the GNOME panel. For instance, the Chrome menu bar doesn't appear on the panel like in Ubuntu 17.04 and earlier versions. I have been working on a Java project for a class for a while now. It is an implementation of a linked list (here called AddressList, containing simple nodes called ListNode). The catch is that everything would have to be done with recursive algorithms. I was able to do everything fine sans one method: public AddressList reverse()      ListNode:    public class ListNode{   public String data;   public ListNode next; }   Right now my reverse function just calls a helper function that takes an argument to allow recursion.  public AddressList reverse(){   return new AddressList(this.reverse(this.head)); }   With my helper function having the signature of private ListNode reverse(ListNode current).  At the moment, I have it working iteratively using a stack, but this is not what the specification requires. I had found an algorithm in C that recursively reversed and converted it to Java code by hand, and it worked, but I had no understanding of it.  Edit: Nevermind, I figured it out in the meantime.  private AddressList reverse(ListNode current, AddressList reversedList){   if(current == null)        return reversedList;   reversedList.addToFront(current.getData());   return this.reverse(current.getNext(), reversedList); }   While I'm here, does anyone see any problems with this route? I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data.  My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail.  $('#myimage').click(function { return false; }); I know as a fact that I've gotten liquids larger than 3 ounces through the TSA scanner systems (such as sunscreen). I was scolded one time for bringing a shampoo container, but I was still ultimately allowed to bring that container through.  In any case, how often are liquids larger than 3 ounces ultimately confisticated, if I put them in a ziploc bag where they can be clearly seen? Hydraulic Disk brake piston not fully retracting My front disk brake's piston doesn't fully retract.  While I can ride the bike, the brake is slightly rubbing.  (IE, if I just spin the wheel with my hand, it'll go around about one and a half times and then stop.) It's definitely slowing me down.   If this fixable?  The advice I got was that it's not worth the trouble and to buy a replacement set.  The current brakes are Avid Juicy 7s that are about 7 years old