I have created a block named 'xyz'. I also created a form whose id is 'form-type-node-form' and i want this form to display in that block. How can i do this? please help me to get solution.
I just wanted to know how to add "create node form" in a block  when i  copy the source code and make a block out of that code, only public could post from that. when i am posting as a user it says timeout and tells us to refresh the page. plz someone give me solution.  SO i tried to add the following code in page.tpl.php  $form = node_add('nodetype'); print drupal_render($form);
The arrival of Minecraft Beta 1.5 brought weather conditions. However, it can at times be inconvenient when you're trying to screenshot something and show it off (as it reduces lighting and obstructs your view slightly). Is there anyway to turn weather off?  Alternatively, is there a way to speed up the duration of weather or "skip" it? Java Socket why server can not reply client How do I install PowerShell? Not long ago I read something on Microsoft's website about PowerShell being available for Ubuntu.   How would I go about the install of PowerShell?  I'd appreciate guidance for both Xenial &amp; Trusty.   Any installation method is fine, whether compiling source or relying on a package-manager.  Source-compiling methods should contain beginner-level detail. ! LaTeX Error: Undefined color `BLACK' i have written all the text in black color, but i get this error several times in the same page:  ! LaTeX Error: Undefined color `BLACK'.   i tried to solve it by writting this: \definecolor{black}{gray}{0,0,0} but it didn´t work.   what should i do? Should I vary input field lengths in a single page checkout form? Show that $\text{C}/c \cong (c/(\text{C}^{\text{op}}))^{\text{op}}$ I'm self studying from Category Theory in Context by Emily Riehl and have encountered the following question regarding slice categories:     Let $\text{C}$ be a category and $c$ be an object in $\text{C}$. Show that $\text{C}/c \cong (c/(\text{C}^{\text{op}}))^{\text{op}}$    The exercise appears in an chapter that introduces the notion of opposite categories and duality proofs.     My intuition of why the statement is true comes from the following observation:  Let $x,y$ be objects in $\mathbf{C}$ (or equivalently $\mathbf{C}^{\text{op}}$). Let $g^{\text{op}} : c \to y$ and $f^{\text{op}} : c \to x$ be objects in $c/(\mathbf{C}^{\text{op}})$. By the definition of slice category, there exists a morphism $h^{\text{op}} : y \to x$ in $\mathbf{C}^{\text{op}}$ such that the diagram below commutes:  $\hskip2in$   Now the 'corresponding diagram' in the opposite category $(c/(\mathbf{C}^{\text{op}}))^{\text{op}}$ would be:  $\hskip2in$    which, as I understand it, would also be commutative. Now, to me, this indicates:   that the objects in $(c/(\mathbf{C}^{\text{op}}))^{\text{op}}$ are the same as the objects in $\mathbf{C}/c$, namely, a morphism in $\mathbf{C}$ from an object $z \in \mathbf{C}$ to $c$. the commutativity of the seconds diagram describes morphisms $h$ in both $\mathbf{C}/c$ and $(c/(\mathbf{C}^{\text{op}}))^{\text{op}}$ if you reverse the arrows again you return to the same diagram. This makes me think you could construct a map between morphisms by first making a map from $ \mathbf{C}/c \to (\mathbf{C}/c)^{\text{op}} ( \cong c/(\mathbf{C}^{\text{op}}) )$ by $h \mapsto h^{op}$     Now, what I am really looking for is a way to structure a proof. I feel like I have some intuition but am very unsure of how to write it down in a concise way. I am new to category theory so I'm still very much learning how to construct these types of proofs using duality; I feel like what I have written is maybe overkill but I'm trying to be as explicit as possible to make sure I understand everything.  In particular, I don't know how I would get a concrete correspondence between morphisms in the two categories that respects associativity of composition etc.  Any help or pointers would be appreciated! How do you Programmatically Download a Webpage in Java How to rename partitions? I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error:  (Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test  (udisks-error-quark, 0))   and this happen also to any attached usb to my laptop. I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file.  The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping.  I've been able to send the raw script in the body an email by piping the backup text file to mailx like so:  $ cat mysqldbbackup.sql | mailx backup@email.com   cat echoes the backup file's text which is piped into the mailx program with the recipient's email address passed as an argument.  While this accomplishes what I need, I think it could be one step better, Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an attachment?  This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc. Checking if two Poisson samples have the same mean Printing pointers in C I was trying to understand something with pointers, so I wrote this code:  #include &lt;stdio.h&gt;  int main(void) {     char s[] = "asd";     char **p = &amp;s;      printf("The value of s is: %p\n", s);     printf("The direction of s is: %p\n", &amp;s);      printf("The value of p is: %p\n", p);     printf("The direction of p is: %p\n", &amp;p);      printf("The direction of s[0] is: %p\n", &amp;s[0]);     printf("The direction of s[1] is: %p\n", &amp;s[1]);     printf("The direction of s[2] is: %p\n", &amp;s[2]);      return 0; }   When compiling it with gcc I get these warnings:  $ gcc main.c -o main-bin -ansi -pedantic -Wall -lm main.c: In function ‘main’: main.c:6: warning: initialization from incompatible pointer type main.c:9: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘char (*)[4]’ main.c:11: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘char **’ main.c:12: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘char ***’   (The flags for gcc are because I must be C89)  Why incompatible types of pointer? Isn't the name of an array a pointer to it's first element? So if s is a pointer to 'a', &amp;s must be a char **, no? And why do I get the other warnings? Do I have to cast the pointers with (void *) in order to print them?   And when running I get something like this:  $ ./main-bin The value of s is: 0xbfb7c860 The direction of s is: 0xbfb7c860 The value of p is: 0xbfb7c860 The direction of p is: 0xbfb7c85c The direction of s[0] is: 0xbfb7c860 The direction of s[1] is: 0xbfb7c861 The direction of s[2] is: 0xbfb7c862   How can the value of s and it's direction (and of course the value of p) be the same? I want to create a wave made out of particles/dots. The wave should look like this:  I tried to achieve this effect by adding an ocean modifier to a plane. Then I added a particle system to the plane but now I don't know how to go on. How can I make the particles lay on the 'ocean' and move when the ocean is moving? PS: I know there is a way to do this with a material in the Blender Render. But firstly I want to create the whole thing in Cycles and secondly I want to have particles. What're the differences between PCA and autoencoder? Both PCA and autoencoder can do demension reduction, so what are the difference between them? In what situation I should use one over another? Adobe Illustrator: strange behavior while aligning objects Showing that ${\rm E}[X]=\sum_{k=0}^\infty P(X>k)$ for a discrete random variable Let $X$ be a discrete random variable whose range is $0,1,2,3,\ldots$. Prove that $$ {\rm E}[X]=\sum_{k=0}^\infty P(X&gt;k). $$  How to prove this? I tried a bit but unable to post due to formatting issue. Can anyone help? Is the integral $\int_0^\infty \frac{\mathrm{d} x}{(1+x^2)(1+x^a)}$ equal for all $a \neq 0$? Let $a$ be a non-zero real number. Is it true that the value of $$\int\limits_0^\infty \frac{\mathrm{d} x}{(1+x^2)(1+x^a)}$$  is independent on $a$? Crick’s Central Dogma — Counter Cases Isomorphism of quotient modules implies isomorphism of submodules? Let $A$ be a commutative ring, $M$ an $A$-module and $N_1, N_2$ two submodules of $M$.  If we have $M/N_1 \cong M/N_2$, does this imply $N_1 \cong N_2$?  This seems so trivial, but I just don't see a proof... Thanks! How to capture the scale of a scene? My framing in the following photo completely failed to capture the sheer height of the waterfall.  If you don't know I was standing at the top of the waterfall, and the "splinters" at the bottom are full-size tree trunks 2 feet in diameter, you wouldn't have a clue how tall it is.  It just looks like a smaller, shorter waterfall shot with a slower shutter speed.    My question isn't about this picture or waterfalls in particular, but about framing to capture the scale of your subject in general.  What are techniques to show just how big something really is?  Or conversely, something really small?  Especially things like rocks or water that look roughly the same at any size. What is the final price if the bid price exceeds the ask price in an order driven market?