Spring MVC Service Implementation DAO is null
MVC Spring Implementation - error: java.lang.NullPointerException
How can I optimise a Minecraft-esque voxel world? I found Minecraft's marvelous large worlds extremely slow to navigate, even with a quad core and meaty graphics card.  I assume Minecraft's slowness comes from:   Java, as spatial partitioning and memory management are faster in native C++. Weak world partitioning.   I could be wrong on both assumptions. However, this got me thinking about the best way to manage large voxel worlds. As it is a true 3D world, where a block can exist in any part of the world, it is basically a big 3D array [x][y][z], where each block in the world has a type (i.e BlockType.Empty = 0, BlockType.Dirt = 1, etc.)  I assume that to make this sort of world perform well, you would need to:   Use a tree of some variety (//) to split all the cubes out; it seems like an oct/kd would be the better option, as you can just partition on a per cube level not a per triangle level. Use some algorithm to work out which blocks can currently be seen, as blocks closer to the user could obfuscate the blocks behind, making it pointless to render them. Keep the block object themselves lightweight, so it is quick to add and remove them from the trees.   I guess there is no right answer to this, but I would be interested to see peoples' opinions on the subject.  How would you improve performance in a large voxel-based world? What spell slot count formula can I use to base my homebrew mechanic on? Alignment issue in users page while searching user why is the set of all binary sequences not countable? Supporting Multiple Screen Sizes in Storyboards (3.5 and 4 inch screens) Iteration over std::vector: unsigned vs signed index variable What is the correct way of iterating over a vector in C++?  Consider these two code fragments, this one works fine:  for (unsigned i=0; i &lt; polygon.size(); i++) {     sum += polygon[i]; }   and this one:  for (int i=0; i &lt; polygon.size(); i++) {     sum += polygon[i]; }   which generates warning: comparison between signed and unsigned integer expressions.  I'm new in the world of C++, so the unsigned variable looks a bit frightening to me and I know unsigned variables can be dangerous if not used correctly, so - is this correct? Proving that if $G/Z(G)$ is cyclic, then $G$ is abelian Possible Duplicate:             If $G$ is a group and $Z(G)$ the center of $G$, show that if $G/Z(G)$ is cyclic, then $G$ is abelian.  This is what I have so far:  We know that all cyclic groups are abelian. This means $G/Z(G)$ is abelian.  $Z(G)= \{z \in G \mid zx=xz \text{ for all } x \in G \}$.  So $Z(G)$ is abelian.    Is it sufficient to say that since $G/Z(G)$ and $Z(G)$ are both abelian, $G$ must be abelian? Intuitive Understanding of the constant "$e$" $\int_{\frac{1}{3}\pi}^{\frac{2}{3}\pi} {\sin(x)\;dx}$ using Riemann sums? How can I make the Logitech Wingman Formula Force steering wheel work in Vista and 64 bit Windows 7? Reprojecting LiDAR data with libLAS, error: "latitude or longitude exceeded limits"? Remove OTA downloaded (but not installed) iOS 8 I've downloaded the new iOS 8 update on my iPhone 5 but am getting second thoughts about actually installing it.  Is there a way for me to delete that download or am I at the point of no return? Is the 2DS region locked? Will I be able to play NA games on a Japanese System? If I purchase a 2DS from Japan, will I be able to play American games on it? Injecting beans into a class outside the Spring managed context I'm an end-user of one of my company's products. It is not very suitable for integration into Spring, however I am able to get a handle on the context and retrieve the required bean by name.  However, I would still like to know if it was possible to inject a bean into this class, even though the class is not managed by Spring itself.  Clarification: The same application which is managing the lifecycle of some class MyClass, is also managing the lifecycle of the Spring context. Spring does not have any knowledge of the instance of MyClass, and I would like to some how provide the instance to the context, but cannot create the instance in the context itself. Comments can now be upvoted and flagged. How do those features work? Do users get rep for their upvoted comments? Do upvoted comments have any effect on comment sorting? And can users see their own comment upvote number somewhere?  Related:  The  about comments Why can't humans throw objects at bullet speed when the force involved seems so small? The force that propels a bullet should at least be similar in intensity to the force experienced as recoil and the force exerted on the target. But these forces seem really low (the equivalent of a shove).  If all it takes to make a small object achieve bullet speed is the equivalent of a shove, why can't humans throw objects at these speeds? 'apt-get' does not work with Proxy For the command   sudo apt-get update   I get following error:  W: Failed to fetch http://ch.archive.ubuntu.com/ubuntu/dists/maverick-updates/multiverse/binary-i386/Packages.gz   407  Proxy Authentication Required (The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )   I am running Ubuntu 10.10 installed on Windows XP using VirtualBox. For Internet connections I am using proxy server with an authentication. I tried to use gnome-network-proxy tool to set proxy settings system-wide.   After that /etc/environment has been updated by http_proxy variable with the format http://my_proxy:port/, there were no authentication data.  I checked this with Firefox. Browser asked my for login and password and everything was working fine. It was unfortunately not the case for apt-get. I have also tried to do as described . Unfortunately it does not work.  May it be somehow related to the fact that a proxy is in a Windows domain, any ideas?  My proxy name is http-proxy. Is '-' a special character here? Tighten rope without turnbuckles? I have two 4-ft x 4" x 4" wood posts, and each post has a screw eye. There's 12 feet of distance between each post.  How can I tighten a piece of 1/2" diameter rope that goes through each screw eye and it's stretched tightly without having to buy turnbuckles?  There has to be a knot just for this. How do I make animations a steady speed? Grub does not show a Windows 8 option after dual boot So, I've successfully dual-booted my Windows 8 machine with Ubuntu 12.04 . However, I still don't have a convenient method of choosing what OS to load at boot time.  After installing Ubuntu, my computer still loads Windows 8 directly. I then added grubx64.efi to the white list of my boot loader. But after that, my machine loads Ubuntu directly without even a shadow of GRUB showing up!  I used boot-repair and I got this paste.ubuntu URL: . After running boot-repair (and re-white listing the grubx64.efi file), GRUB now shows up but without any Windows 8 option!  Lastly, I ran sudo fdisk -l and it gave me this:  WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x6396389f     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1465149167   732574583+  ee  GPT Partition 1 does not start on physical sector boundary.   I'm guessing my problem has something to do with the warning from fdisk above but I don't know what to do with it. How do I proceed now?  Edit  My etc/default/grub is as follows:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2&gt; /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   Also, just for the record,  in installing my dual-boot. The tutorial (which uses, 11.10, I must note), doesn't mention anything about this problem. Is there anything there I shouldn't have done?