Jūs esateproject

project


How to calculate lines of code in Linux?

I have a C++ project on NetBeans IDE. I would like to count the lines of code. So, how to count the lines of code in Ubuntu Linux?
Well, you can install additional software like sloccount (sudo apt-get install sloccount): http://manpages.ubuntu.com/manpages/natty/man1/sloccount.1.html, or you can use wc command like this:
wc -l + `find . -name \* -print`

XNA. Change resolution & set full screen

I am creating a game with the XNA framework and I needed to change the resolution for XNA game. So, that's how it's done: public class MyCoolGame : Microsoft.Xna.Framework.Game // Code... // GraphicsDeviceManager graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = Width; graphics.PreferredBackBufferHeight = Height; graphics.ApplyChanges(); Another very useful property is IsFullScreen - boolean variable, which sets game to full screen or not (do not forget to call graphics.ApplyChanges().).