Size of struct in C not as expected
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Why Does the Transaction Log Keep Growing or Run Out of Space? Light fixture with a switch that has an outlet I hope this explains it better: in this room there is a switch with one set of wires and only the black one went through the hole in it, and another black one in the other hole, and is hooked to the outlet by being wrapped around the screw terminals. The ground is cut short and not grounded.  Now on to the outlet: the wire from the switch is connected to the top screw - but it's on the side that says "white".   There are two more sets of wires that connect to the outlet as follows:   the two black ones are on the the other screw terminal on the bottom (one on the "white" side)  the grounds are grounded to the screw terminal below that  the white ones are connected by the one from the switch to the bottom (black side), with one of the white ones from the other set on the screw terminal, and the one from the other cable is on the top screw terminal on the "white" side.   Now to the light: there are the black and white that come out of the box, and that is the set that has the ground cut short.  The original light fixture was a single 660w/250v rated socket.  The one my friend put up was a fixture with two 660w /250v sockets.  At the light only black and white connected, not ground... It worked then made noise and this is where I'm at.  When I wire test them, the black one from the switch and the white ones from either sets nothing...  but all the other ones light up.....! I have been trying to make a short clip of a bullet hitting a wine glass with wine in it, but I keep running into the same problem with the add-on. Every time I have used it the result has left me with at least a partial box being generated as several of the fractured pieces.  I have tried subdividing and/or adding a sub-surf modifier but the result only changes where the large distorted fragments end up. I have been having trouble with this for quite some time and I would greatly appreciate any help. Session lost when switching from HTTP to HTTPS in PHP When sending the user to a checkout page, they are switched from http://sitename.com to https://sitename.com.  As a result, $_SESSION variables are lost.  The site has a valid SSL certificate which may or may not be of some use. How can I run a script that starts before my login screen? I was calibrating my touch screen, and saw that the best tool around was xinput_calibrator. So I used it. It have two options (one of which did not work), so I am here for the second. It says I should execute this command "in a script that starts with your X session":  xinput set-int-prop "3M 3M USB Touchscreen - EX II" "Evdev Axis Calibration" 32 14410 2146 14574 2115  So I tried ~/.xinitrc, ~/.xsession and ~/.xsessionrc, all of which did not exist. So I created them and the exact content was this command. The first two files made my logins fail (after I login, I fall back to the login screen).  With the last file, the calibration was functional, but only after logging in...  I need that command to run before the login dialog shows up. I thought of adding this command to the end of /etc/X11/xinit/xinitrc with no result (nothing changed). Also, I tried to add it to the end of /etc/X11/Xsession.d/40x11-common_xsessionrc (after inspecting some of the files), but the result was exactly the same as adding it to ~/.xsessionrc.  How can I make this command run before the login screen shows (is this before the window manager starts, or before the X session starts)?  (I am running Kubuntu with the default window manager, if that matters)  UPDATE As I am using Kubuntu, my display manager is kdm. As the accepted answer suggests, I edited the file /etc/kde4/kdm/Xsetup, and as mentioned  I added the command before the command that is there by default. And it works like a charm :) Counting integer partitions of n into exactly k distinct parts size at most M How can I find the number of partitions of $n$ into exactly $k$ distinct parts, where each part is at most $M$?  The number of partitions $p_k(\leq M,n)$ of $n$ into at most $k$ parts, each of size at most $M$, is given by the generating function: $$  \binom{M+k}{k}_{x} = \prod_{j=1}^{k}\frac{1-x^{M+k-j+1}}{1-x^j}= \sum_{n=0}^{kM} p_{k}(\leq M,n) x^n $$  For the number of the partitions $p_k(\mathcal{D},n)$ of $n$ into at most $k$ parts there is the recurrence relationship: $$   p_{k}(\mathcal{D},n) = p_{k}(\mathcal{D},n-k) + p_{k-1}(\mathcal{D},n) $$  But what, if I want to count only the partitions with distinct parts and restricted number of parts and restricted part size?  Update: Now I know the generating function for the number of distinct restricted partitions $p_k(\leq M, \mathcal{D},n)$ of $n$ into exactly $k$ distinct parts, all at most $M$ is $$    \prod_{j=1}^{M} (1+xq^{j}) = \sum_{k,n=0}^{\infty}p_k(\leq M, \mathcal{D},n)x^{k}q^{n} $$ and there is also a recurrence relation $$    p_k(\leq M, \mathcal{D},n) =         p_{k-1}(\leq M-1, \mathcal{D},n-k) +         p_k(\leq M-1, \mathcal{D},n-k) $$ How can I prove this? Could you recommend a book, where I could read about this? How to implement a follow author (or user) function? Is it possible to implement a Follow button for authors of posts in Drupal 7, so that users can:   Follow any one they wish, and Be notified about the new posts of those authors.   This sounds like 'Mashable Follow button' for authors.  Do you have any suggestions about how to implement this? A pseudometric on the space of the measurable functions is complete How can I add new autostart programs in Lubuntu? In Lubuntu, there's no 'Add New Program...' button in Desktop Session Settings. Is there an easy way to add new autostart programs in Lubuntu? In the previous version the logout button is under your username, which it can be found by clicking the down arrow. However, in the new version, after a couple minutes of searching, it is under the "site-switcher" button:        This is really illogical since the logout button is usually under your username, including Google and Yahoo! services.  I suggest bringing back the  which will definitely benefit new users and even old users. PHP Echo Line Breaks Where can I find the source code for the Ubuntu Kernel? I'd like to build my own copy of the Ubuntu kernel. Where can I get the source code? So I'm making this summary of a course where I've only been getting information from one book. Sometimes I want to show what page from the book a statement is taken from but I can't figure out a clean way of doing it.  Basically I would like to have something (in function) similar to:  "Statement[Book p123]"  Do you have any suggestions? I want to use input from a user as a regex pattern for a search over some text.  It works, but how I can handle cases where user puts characters that have meaning in regex? For example, the user wants to search for Word (s): regex engine will take the (s) as a group.  I want it to treat it like a string &quot;(s)&quot; .  I can run replace on user input and replace the ( with \( and the ) with \) but the problem is I will need to do replace for every possible regex symbol. Do you know some better way ? Semigroup analogue to the classification of finite simple groups? Is there a semigroup analogue to the classification of finite simple groups?  If so what are some of the major results?  --Edit, reference links--- How to change font-size, number of rows / columns in the console I'm running a Linux server without X11 or any kind of GUI, with a modern 22" LCD monitor.  Given the huge size of my monitor, I would like to increase the number of rows and columns in my console, how can I go about achieving it? Interior of cartesian product is cartesian product of interiors I have to prove that:  $$Int(A\times B) = Int(A)\times Int(B)$$  Where $A\subset M$ and $B\subset N$, both $M$ and $N$ metric spaces.  The problem is that the exercise does not specify the metric, so I need to try to prove it using a generic metric.  If $x\in Int(A\times B)$, then an open ball can be centered at $(x,y)$ such that it is contained in $A\times B$. Therefore, this open ball, $B((x,y),r)\subset A\times B$. It means that $d((x,y),a)&lt;r$ for any $a\in A\times B$ for some $r&gt;0$. I guess that if I can take from here that $d(x,a)&lt;r$ and $d(y,a)&lt;r$ I can prove thhat $Int(A\times B)\subset Int(A)\times Int(B)$, but I still have to prove the other way around.   Any ideas? How to change the desktop wallpaper to a photo of my own selection in Ubuntu 18.04? I'm not interested in downloading some wallpaper changer application, nor am I interested in coding something up. There has to be an easy way to select a photo as a custom wallpaper in Ubuntu 18.04. What would make a question popular with high views? I was wondering what might be making my questions less attractive to users?  I get very low views most of the time. What should be done to increase a question's popularity? I have a netbook that I want to install Ubuntu onto. I do have a good Mac computer that I can make a bootable USB drive from, but I'm confused on how to go about making it.